internal/

directory
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0

Directories

Path Synopsis
Package activity is the daemon's short operator-facing history: what happened to the model store and the runtimes, by whom (the mesh, the operator, or the daemon's own housekeeping), and why.
Package activity is the daemon's short operator-facing history: what happened to the model store and the runtimes, by whom (the mesh, the operator, or the daemon's own housekeeping), and why.
Package assign executes the coordinator's ModelAssignment pushes on the operator's terms (SPEC §4.1, §4.4; plan 05).
Package assign executes the coordinator's ModelAssignment pushes on the operator's terms (SPEC §4.1, §4.4; plan 05).
Package browser opens URLs in the operator's default browser.
Package browser opens URLs in the operator's default browser.
Package clock abstracts time for deterministic tests (governor yield latency, backoff, rolling stats).
Package clock abstracts time for deterministic tests (governor yield latency, backoff, rolling stats).
Package config loads flockd configuration from defaults, an optional TOML file, and FLOCKD_-prefixed environment variables (koanf).
Package config loads flockd configuration from defaults, an optional TOML file, and FLOCKD_-prefixed environment variables (koanf).
Package decision implements the JSON side of typed decisions (TypeSafe's "System One" API, POST /v1/systemone): validating the public request into an ordered runtime.DecisionInput, building the llama-server request body from it, mapping llama-server's answers back onto typed answers, and writing the public response.
Package decision implements the JSON side of typed decisions (TypeSafe's "System One" API, POST /v1/systemone): validating the public request into an ordered runtime.DecisionInput, building the llama-server request body from it, mapping llama-server's answers back onto typed answers, and writing the public response.
Package engine routes completion requests to loaded runtime Instances, applying governor admission and telemetry accounting.
Package engine routes completion requests to loaded runtime Instances, applying governor admission and telemetry accounting.
Package enroll manages node identity (Ed25519 keypair that never leaves the device), CSR generation, the Enroll RPC, credential storage, and the `tera login` PKCE-style browser handoff (SPEC §4.1, §6).
Package enroll manages node identity (Ed25519 keypair that never leaves the device), CSR generation, the Enroll RPC, credential storage, and the `tera login` PKCE-style browser handoff (SPEC §4.1, §6).
Package events is the daemon's in-process event bus: governor state changes, model download progress, and model lifecycle changes fan out to SSE subscribers (web dash, desktop app, TUI).
Package events is the daemon's in-process event bus: governor state changes, model download progress, and model lifecycle changes fan out to SSE subscribers (web dash, desktop app, TUI).
Package gguf reads the metadata header of a GGUF model file: enough of it to size the KV cache exactly (flockd#46) and to learn the training context when the catalog does not say.
Package gguf reads the metadata header of a GGUF model file: enough of it to size the KV cache exactly (flockd#46) and to learn the training context when the catalog does not say.
Package governor is the resource-governance policy engine (SPEC §4.1, §10).
Package governor is the resource-governance policy engine (SPEC §4.1, §10).
Package hardware detects the node's compute capability and produces the typesv1.CapabilityProfile sent at enrollment and in heartbeats.
Package hardware detects the node's compute capability and produces the typesv1.CapabilityProfile sent at enrollment and in heartbeats.
Package live tracks what the node is doing right now and what it did a moment ago: the requests in flight on each model and a bounded ring of the ones that finished.
Package live tracks what the node is doing right now and what it did a moment ago: the requests in flight on each model and a bounded ring of the ones that finished.
Package localapi is the daemon's loopback HTTP surface on localhost:7777: the OpenAI-compatible /v1 endpoints (Phase 0 exit criterion) and the management /api/v1 REST+SSE API that the CLI, TUI and embedded web dashboard all consume (SPEC §A1.2: one source of truth).
Package localapi is the daemon's loopback HTTP surface on localhost:7777: the OpenAI-compatible /v1 endpoints (Phase 0 exit criterion) and the management /api/v1 REST+SSE API that the CLI, TUI and embedded web dashboard all consume (SPEC §A1.2: one source of truth).
client
Package client is the loopback client of the daemon's local API on localhost:7777 — the one client the tera CLI, the TUI, `tera mcp` and any Go tooling share (SPEC §A1.2: CLI, TUI and web dash are all clients of one API).
Package client is the loopback client of the daemon's local API on localhost:7777 — the one client the tera CLI, the TUI, `tera mcp` and any Go tooling share (SPEC §A1.2: CLI, TUI and web dash are all clients of one API).
client/clienttest
Package clienttest stands up a real localapi.Server on an httptest listener — the generated router, the mock runtime, a governor with fake signal sources, the event hub and the log ring — so client, CLI, TUI and `tera mcp` tests talk to the actual API contract rather than a hand-rolled fake that could drift from it.
Package clienttest stands up a real localapi.Server on an httptest listener — the generated router, the mock runtime, a governor with fake signal sources, the event hub and the log ring — so client, CLI, TUI and `tera mcp` tests talk to the actual API contract rather than a hand-rolled fake that could drift from it.
gen
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.
Package logging provides slog setup plus an in-memory ring buffer handler backing GET /api/v1/logs.
Package logging provides slog setup plus an in-memory ring buffer handler backing GET /api/v1/logs.
Package memory is the daemon's model-memory accounting: the budget loaded models may use, the footprint estimate for a model before it is loaded, and the measured physical footprint of a running runtime process.
Package memory is the daemon's model-memory accounting: the budget loaded models may use, the footprint estimate for a model before it is loaded, and the measured physical footprint of a running runtime process.
Package modelops is the daemon's on-demand model operations service: catalog browsing, operator-triggered downloads (with cancel), and runtime load/unload/default switching.
Package modelops is the daemon's on-demand model operations service: catalog browsing, operator-triggered downloads (with cancel), and runtime load/unload/default switching.
Package models manages the local model cache: catalog manifests (teraflock/models format), resumable GGUF downloads with SHA256 verification, and LRU eviction under the operator's disk budget.
Package models manages the local model cache: catalog manifests (teraflock/models format), resumable GGUF downloads with SHA256 verification, and LRU eviction under the operator's disk budget.
Package runtime defines the inference Runtime interface (SPEC §A1.3) and its adapters.
Package runtime defines the inference Runtime interface (SPEC §A1.3) and its adapters.
llamacpp
Package llamacpp adapts a supervised llama-server subprocess to the runtime.Runtime interface (SPEC §A1.3: subprocess, never cgo).
Package llamacpp adapts a supervised llama-server subprocess to the runtime.Runtime interface (SPEC §A1.3: subprocess, never cgo).
Package svc installs and controls flockd as a per-user OS service: launchd LaunchAgent (macOS), systemd --user unit (Linux) and a Task Scheduler logon task (Windows).
Package svc installs and controls flockd as a per-user OS service: launchd LaunchAgent (macOS), systemd --user unit (Linux) and a Task Scheduler logon task (Windows).
Package telemetry assembles heartbeats and keeps rolling performance stats (tok/s, request counters) shared by the tunnel, local API and TUI.
Package telemetry assembles heartbeats and keeps rolling performance stats (tok/s, request counters) shared by the tunnel, local API and TUI.
Package tunnel implements the node side of flock.tunnel.v1.TunnelService: the persistent, node-initiated session over which the coordinator pushes dispatches, challenges and model assignments (SPEC §3: nodes dial out, never listen).
Package tunnel implements the node side of flock.tunnel.v1.TunnelService: the persistent, node-initiated session over which the coordinator pushes dispatches, challenges and model assignments (SPEC §3: nodes dial out, never listen).
fakecoord
Package fakecoord is an in-process fake coordinator implementing flock.tunnel.v1.TunnelService over bufconn (SPEC §A2.2 key seam).
Package fakecoord is an in-process fake coordinator implementing flock.tunnel.v1.TunnelService over bufconn (SPEC §A2.2 key seam).
Package update checks for a newer flockd release.
Package update checks for a newer flockd release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL