Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
flockd
command
Command flockd is the Teraflock node daemon: hardware detection, model management, a supervised llama.cpp runtime, resource governance, the loopback OpenAI-compatible API, and the coordinator tunnel (in-process fake coordinator in --standalone / Phase 0 mode).
|
Command flockd is the Teraflock node daemon: hardware detection, model management, a supervised llama.cpp runtime, resource governance, the loopback OpenAI-compatible API, and the coordinator tunnel (in-process fake coordinator in --standalone / Phase 0 mode). |
|
tera
command
Command tera is the operator CLI/TUI for the Teraflock node daemon.
|
Command tera is the operator CLI/TUI for the Teraflock node daemon. |
|
internal
|
|
|
activity
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. |
|
assign
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). |
|
browser
Package browser opens URLs in the operator's default browser.
|
Package browser opens URLs in the operator's default browser. |
|
clock
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). |
|
config
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). |
|
engine
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. |
|
enroll
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). |
|
events
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). |
|
governor
Package governor is the resource-governance policy engine (SPEC Β§4.1, Β§10).
|
Package governor is the resource-governance policy engine (SPEC Β§4.1, Β§10). |
|
hardware
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. |
|
localapi
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). |
|
localapi/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). |
|
localapi/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. |
|
localapi/gen
Package gen provides primitives to interact with the openapi HTTP API.
|
Package gen provides primitives to interact with the openapi HTTP API. |
|
logging
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. |
|
memory
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. |
|
modelops
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. |
|
models
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. |
|
runtime
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. |
|
runtime/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). |
|
svc
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). |
|
telemetry
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. |
|
tunnel
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). |
|
tunnel/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). |
|
update
Package update checks for a newer flockd release.
|
Package update checks for a newer flockd release. |
|
Package web embeds the built local dashboard (web/dist) into the daemon binary.
|
Package web embeds the built local dashboard (web/dist) into the daemon binary. |
Click to show internal directories.
Click to hide internal directories.