Documentation
¶
Overview ¶
Command local-offload delegates short-context grunt work (summarize, classify, extract, triage) to a free local model, exposed as both a CLI and an MCP server. It never calls a cloud model: on failure it returns a structured defer so the caller (Claude) handles the task itself.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
genexample
command
Command genexample regenerates config.example.json from config.Default() (LO-17: the committed example had drifted — escalation_model still said gemma4-26b-a4b while the code default was qwythos, and ~20 newer keys were missing entirely).
|
Command genexample regenerates config.example.json from config.Default() (LO-17: the committed example had drifted — escalation_model still said gemma4-26b-a4b while the code default was qwythos, and ~20 newer keys were missing entirely). |
|
internal
|
|
|
agent
Package agent implements the local Agent-loop: the canonical "while the model requests tools, execute them and feed results back" cycle (Phase 0 — read-only).
|
Package agent implements the local Agent-loop: the canonical "while the model requests tools, execute them and feed results back" cycle (Phase 0 — read-only). |
|
audioio
Package audioio converts a local audio (or video) file into the 16 kHz mono 16-bit PCM WAV that whisper.cpp expects, using ffmpeg.
|
Package audioio converts a local audio (or video) file into the 16 kHz mono 16-bit PCM WAV that whisper.cpp expects, using ffmpeg. |
|
breaker
Package breaker provides a per-tier circuit breaker with a sliding-window failure counter, hand-rolled with no external dependencies.
|
Package breaker provides a per-tier circuit breaker with a sliding-window failure counter, hand-rolled with no external dependencies. |
|
cache
Package cache is a bbolt content-hash cache: identical (task+input+params+ model+grammar) requests return the stored result and skip the model entirely.
|
Package cache is a bbolt content-hash cache: identical (task+input+params+ model+grammar) requests return the stored result and skip the model entirely. |
|
calibration
Package calibration implements Phase 2 conformal threshold calibration for the local-offload harness.
|
Package calibration implements Phase 2 conformal threshold calibration for the local-offload harness. |
|
confhead
Package confhead implements a per-task logistic correctness head.
|
Package confhead implements a per-task logistic correctness head. |
|
confidence
Package confidence derives a decision-confidence signal from a grammar- constrained model's per-token logprobs.
|
Package confidence derives a decision-confidence signal from a grammar- constrained model's per-token logprobs. |
|
config
Package config loads harness configuration.
|
Package config loads harness configuration. |
|
contextbudget
Package contextbudget trims oversized input before it reaches the local model, keeping requests inside the model's context window.
|
Package contextbudget trims oversized input before it reaches the local model, keeping requests inside the model's context window. |
|
core
Package core holds the shared types used across the local-offload harness.
|
Package core holds the shared types used across the local-offload harness. |
|
eval
Package eval is the harness's code-based quality evaluation: replay a curated per-task gold set through the live cascade and score with deterministic graders (grounding for extract/summarize, label-match for classify/triage).
|
Package eval is the harness's code-based quality evaluation: replay a curated per-task gold set through the live cascade and score with deterministic graders (grounding for extract/summarize, label-match for classify/triage). |
|
exemplars
Package exemplars implements BM25-based few-shot exemplar mining with greedy-diverse k-center selection.
|
Package exemplars implements BM25-based few-shot exemplar mining with greedy-diverse k-center selection. |
|
gbnf
Package gbnf generates GBNF grammars that constrain llama.cpp output to a fixed JSON shape.
|
Package gbnf generates GBNF grammars that constrain llama.cpp output to a fixed JSON shape. |
|
gpugen
Package gpugen is the shared Go exec wrapper for every LOCAL GPU generation runner (image / video / audio).
|
Package gpugen is the shared Go exec wrapper for every LOCAL GPU generation runner (image / video / audio). |
|
gpulock
Package gpulock is the READ-ONLY Go view of the single-slot GPU lock owned by the Node render runners (render/gpu-lock.mjs).
|
Package gpulock is the READ-ONLY Go view of the single-slot GPU lock owned by the Node render runners (render/gpu-lock.mjs). |
|
grounding
Package grounding is the harness's free, deterministic quality check: did the model invent values not present in the source? No inference, sub-millisecond string ops.
|
Package grounding is the harness's free, deterministic quality check: did the model invent values not present in the source? No inference, sub-millisecond string ops. |
|
health
Package health provides offline health monitoring for the local-offload harness.
|
Package health provides offline health monitoring for the local-offload harness. |
|
imagegen
Package imagegen generates an image from a text prompt by shelling out to the repo's render/comfy-generate.mjs (Node), which wraps the proven comfy-render.mjs with the GPU-lock + ComfyUI start/stop lifecycle.
|
Package imagegen generates an image from a text prompt by shelling out to the repo's render/comfy-generate.mjs (Node), which wraps the proven comfy-render.mjs with the GPU-lock + ComfyUI start/stop lifecycle. |
|
imageio
Package imageio loads a local image (or validates a data URI) into a data:image/...;base64,...
|
Package imageio loads a local image (or validates a data URI) into a data:image/...;base64,... |
|
judge
Package judge provides local-model judges for the shadow-labeling flywheel: an embeddings-based similarity used to score whether a counterfactual tier's summary agrees with the reference summary (exact-match doesn't work for paraphrase).
|
Package judge provides local-model judges for the shadow-labeling flywheel: an embeddings-based similarity used to score whether a counterfactual tier's summary agrees with the reference summary (exact-match doesn't work for paraphrase). |
|
knn
Package knn implements a zero-training k-nearest-neighbor entry-tier pre-filter over embeddinggemma vectors of past inputs.
|
Package knn implements a zero-training k-nearest-neighbor entry-tier pre-filter over embeddinggemma vectors of past inputs. |
|
ledger
Package ledger records per-call telemetry to an append-only JSONL file and reports estimated tokens (and dollars) kept out of Opus — how the harness proves it earns its keep.
|
Package ledger records per-call telemetry to an append-only JSONL file and reports estimated tokens (and dollars) kept out of Opus — how the harness proves it earns its keep. |
|
llamaclient
Package llamaclient calls a llama.cpp server to generate grammar-constrained output.
|
Package llamaclient calls a llama.cpp server to generate grammar-constrained output. |
|
mcpserver
Package mcpserver exposes the offload pipeline as MCP tools over stdio so Claude Code can delegate grunt work.
|
Package mcpserver exposes the offload pipeline as MCP tools over stdio so Claude Code can delegate grunt work. |
|
nimclient
Package nimclient calls an OpenAI-compatible NVIDIA NIM endpoint — either NVIDIA's hosted build.nvidia.com API (https://integrate.api.nvidia.com/v1, authenticated with an nvapi- key) or a self-hosted NIM container (http://host:8000/v1, no key).
|
Package nimclient calls an OpenAI-compatible NVIDIA NIM endpoint — either NVIDIA's hosted build.nvidia.com API (https://integrate.api.nvidia.com/v1, authenticated with an nvapi- key) or a self-hosted NIM container (http://host:8000/v1, no key). |
|
parser
Package parser forgivingly extracts a JSON object from messy model output.
|
Package parser forgivingly extracts a JSON object from messy model output. |
|
pipeline
Package pipeline orchestrates one offload request end to end: trivial-check -> context-budget trim -> cache -> build -> generate(grammar) -> parse -> verify -> validate -> (retry|defer|accept) -> cache + ledger.
|
Package pipeline orchestrates one offload request end to end: trivial-check -> context-budget trim -> cache -> build -> generate(grammar) -> parse -> verify -> validate -> (retry|defer|accept) -> cache + ledger. |
|
report
Package report turns the telemetry-only ledger into per-task quality stats (no model calls).
|
Package report turns the telemetry-only ledger into per-task quality stats (no model calls). |
|
router
Package router implements a per-task logistic entry-tier router.
|
Package router implements a per-task logistic entry-tier router. |
|
sandbox
Package sandbox builds the P4 OS-level cage for running an untrusted command (a future broad-shell/exec tool) confined so it CANNOT bypass the agent's app-level cages.
|
Package sandbox builds the P4 OS-level cage for running an untrusted command (a future broad-shell/exec tool) confined so it CANNOT bypass the agent's app-level cages. |
|
shadow
Package shadow holds the capture-queue for the nightly shadow-labeling flywheel.
|
Package shadow holds the capture-queue for the nightly shadow-labeling flywheel. |
|
sttclient
Package sttclient calls a whisper.cpp whisper-server (over llama-swap's /upstream/<model>/inference passthrough) to transcribe a 16 kHz mono WAV.
|
Package sttclient calls a whisper.cpp whisper-server (over llama-swap's /upstream/<model>/inference passthrough) to transcribe a 16 kHz mono WAV. |
|
svgkit
Package svgkit renders brand-agnostic, parametric SVG components (gauge, comparison-bar, chromatogram, icon) from JSON specs.
|
Package svgkit renders brand-agnostic, parametric SVG components (gauge, comparison-bar, chromatogram, icon) from JSON specs. |
|
tasks
Package tasks builds the per-task prompt, grammar, and validation schema.
|
Package tasks builds the per-task prompt, grammar, and validation schema. |
|
trajectory
Package trajectory holds the capture queue + label sidecar for the P6 agentic- trace flywheel.
|
Package trajectory holds the capture queue + label sidecar for the P6 agentic- trace flywheel. |
|
validator
Package validator checks model output JSON against a JSON schema.
|
Package validator checks model output JSON against a JSON schema. |
|
verifier
Package verifier runs structural quality checks on a model response and decides whether to retry, accept, or defer.
|
Package verifier runs structural quality checks on a model response and decides whether to retry, accept, or defer. |
|
videoio
Package videoio samples frames from a local video file (via ffmpeg) into data:image/...;base64 URIs for the multimodal vision path.
|
Package videoio samples frames from a local video file (via ffmpeg) into data:image/...;base64 URIs for the multimodal vision path. |
Click to show internal directories.
Click to hide internal directories.