internal/

directory
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: Apache-2.0

Directories

Path Synopsis
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).
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.
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.
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.
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.
Package confhead implements a per-task logistic correctness head.
Package confhead implements a per-task logistic correctness head.
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.
Package config loads harness configuration.
Package config loads harness configuration.
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.
Package core holds the shared types used across the local-offload harness.
Package core holds the shared types used across the local-offload harness.
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).
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.
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.
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).
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).
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.
Package health provides offline health monitoring for the local-offload harness.
Package health provides offline health monitoring for the local-offload harness.
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.
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,...
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).
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.
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.
Package llamaclient calls a llama.cpp server to generate grammar-constrained output.
Package llamaclient calls a llama.cpp server to generate grammar-constrained output.
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.
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).
Package parser forgivingly extracts a JSON object from messy model output.
Package parser forgivingly extracts a JSON object from messy model output.
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.
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).
Package router implements a per-task logistic entry-tier router.
Package router implements a per-task logistic entry-tier router.
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.
Package shadow holds the capture-queue for the nightly shadow-labeling flywheel.
Package shadow holds the capture-queue for the nightly shadow-labeling flywheel.
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.
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.
Package tasks builds the per-task prompt, grammar, and validation schema.
Package tasks builds the per-task prompt, grammar, and validation schema.
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.
Package validator checks model output JSON against a JSON schema.
Package validator checks model output JSON against a JSON schema.
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.
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.

Jump to

Keyboard shortcuts

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