Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
bifrost
Package bifrost adapts context-guru's pipeline to bifrost's LLMPlugin interface: our components run as a pre-LLM-call hook (design D2).
|
Package bifrost adapts context-guru's pipeline to bifrost's LLMPlugin interface: our components run as a pre-LLM-call hook (design D2). |
|
Package apply is the one place the pipeline meets a raw wire request, shared by every host adapter (the bifrost proxy and the AuthBridge plugin).
|
Package apply is the one place the pipeline meets a raw wire request, shared by every host adapter (the bifrost proxy and the AuthBridge plugin). |
|
cmd
|
|
|
context-guru-proxy
command
Command context-guru-proxy is the LLM proxy integration and the eval-containers gateway.
|
Command context-guru-proxy is the LLM proxy integration and the eval-containers gateway. |
|
Package components defines context-guru's component model: the abstract API every context-engineering operation implements, the per-component report used for metrics, the runtime context handed to each component, and the pipeline that stacks them in configured order.
|
Package components defines context-guru's component model: the abstract API every context-engineering operation implements, the per-component report used for metrics, the runtime context handed to each component, and the pipeline that stacks them in configured order. |
|
all
Package all blank-imports every built-in component so their init() registrations run.
|
Package all blank-imports every built-in component so their init() registrations run. |
|
dsl
Package dsl is a declarative, user-extensible text-filter engine, adapted from rtk's TOML filter DSL (design D11).
|
Package dsl is a declarative, user-extensible text-filter engine, adapted from rtk's TOML filter DSL (design D11). |
|
offload
Package offload holds the lossy-but-reversible components (they drop bytes and stash the original for the expand tool loop).
|
Package offload holds the lossy-but-reversible components (they drop bytes and stash the original for the expand tool loop). |
|
reformat
Package reformat holds the lossless components (they repack the request denser or add caching hints without losing information).
|
Package reformat holds the lossless components (they repack the request denser or add caching hints without losing information). |
|
Package config loads context-guru's configuration and builds a pipeline from it.
|
Package config loads context-guru's configuration and builds a pipeline from it. |
|
Package dash is context-guru's persistent observability layer: the durable per-request store behind the dashboard, the off-hot-path capture pipeline that fills it, the JSON/SSE API the UI reads, and the embedded single-file UI.
|
Package dash is context-guru's persistent observability layer: the durable per-request store behind the dashboard, the off-hot-path capture pipeline that fills it, the JSON/SSE API the UI reads, and the embedded single-file UI. |
|
examples
|
|
|
llm-d-service/client
command
Command client is a minimal, dependency-free example of calling the context-guru compaction service the way the llm-d-router request-inline-compaction step does: POST the inference request body to the service and, on a 200 with a non-empty JSON object, use the returned (smaller) body in place of the original.
|
Command client is a minimal, dependency-free example of calling the context-guru compaction service the way the llm-d-router request-inline-compaction step does: POST the inference request body to the service and, on a 200 with a non-empty JSON object, use the returned (smaller) body in place of the original. |
|
Package expand holds the host-agnostic half of reversibility (design D6, after headroom's CCR): the marker format Offload components write, the expand(id) tool definition injected per provider, and resolution of a stashed original from the Store.
|
Package expand holds the host-agnostic half of reversibility (design D6, after headroom's CCR): the marker format Offload components write, the expand(id) tool definition injected per provider, and resolution of a stashed original from the Store. |
|
internal
|
|
|
adjudicate
Package adjudicate declares the context-maintenance tool the cold-sweep adjudication asks with, and the wire helpers that keep it byte-stable in the prompt-cache prefix.
|
Package adjudicate declares the context-maintenance tool the cold-sweep adjudication asks with, and the wire helpers that keep it byte-stable in the prompt-cache prefix. |
|
buildinfo
Package buildinfo exposes version metadata stamped at build time via -ldflags.
|
Package buildinfo exposes version metadata stamped at build time via -ldflags. |
|
cheapmodel
Package cheapmodel provides a minimal Anthropic Messages client used as the engine's injected extraction model.
|
Package cheapmodel provides a minimal Anthropic Messages client used as the engine's injected extraction model. |
|
extract
Package extract is the cheap-model tool-output extractor.
|
Package extract is the cheap-model tool-output extractor. |
|
logging
Package logging is context-guru's logging plumbing: the level/format/sink decision, the credential scrubber that sits in front of every handler, and the per-request logger that carries tenant and session onto the lines of one request's lifecycle — including the ones written after the response, off the request path (see With, and the boundary named there).
|
Package logging is context-guru's logging plumbing: the level/format/sink decision, the credential scrubber that sits in front of every handler, and the per-request logger that carries tenant and session onto the lines of one request's lifecycle — including the ones written after the response, off the request path (see With, and the boundary named there). |
|
modelinfo
Package modelinfo resolves a model's context window (max input tokens) DYNAMICALLY, so context-guru's triggers can scale with the model rather than hard-coding thresholds.
|
Package modelinfo resolves a model's context window (max input tokens) DYNAMICALLY, so context-guru's triggers can scale with the model rather than hard-coding thresholds. |
|
redact
Package redact holds the credential-scrubbing primitives: the patterns that recognise a credential in arbitrary text, and the key-name test that recognises one by the name it is stored under.
|
Package redact holds the credential-scrubbing primitives: the patterns that recognise a credential in arbitrary text, and the key-name test that recognises one by the name it is stored under. |
|
skills
Package skills parses Claude Code's skills listing — the prose block that declares which skills a request carries.
|
Package skills parses Claude Code's skills listing — the prose block that declares which skills a request carries. |
|
tokens
Package tokens estimates token counts using a real BPE tokenizer (o200k_base, the modern GPT family encoding) — an accurate offline proxy.
|
Package tokens estimates token counts using a real BPE tokenizer (o200k_base, the modern GPT family encoding) — an accurate offline proxy. |
|
treesitter
This file is the pure-Go face of the treesitter package: when the cg_skeleton tag is absent, the real cgo implementation (treesitter.go) is excluded and this empty package takes its place, so `go build ./...` under CGO_ENABLED=0 links no tree-sitter grammars.
|
This file is the pure-Go face of the treesitter package: when the cg_skeleton tag is absent, the real cgo implementation (treesitter.go) is excluded and this empty package takes its place, so `go build ./...` under CGO_ENABLED=0 links no tree-sitter grammars. |
|
Package kvcache is the KV-cache TTL domain: the per-request analysis dataset the dashboard's KV-cache page reads, the pricing model for the six things a prompt-cache policy can spend money on, the Strategy interface a TTL policy (or a future learned predictor) implements, and the historical replay simulator that scores one strategy against another.
|
Package kvcache is the KV-cache TTL domain: the per-request analysis dataset the dashboard's KV-cache page reads, the pricing model for the six things a prompt-cache policy can spend money on, the Strategy interface a TTL policy (or a future learned predictor) implements, and the historical replay simulator that scores one strategy against another. |
|
Package metrics turns component/run reports into telemetry.
|
Package metrics turns component/run reports into telemetry. |
|
Package modes holds the per-session state context-guru's operating modes need.
|
Package modes holds the per-session state context-guru's operating modes need. |
|
Package proxy is the context-guru HTTP proxy: it runs the component pipeline on inbound chat requests, then forwards them to the configured upstream provider.
|
Package proxy is the context-guru HTTP proxy: it runs the component pipeline on inbound chat requests, then forwards them to the configured upstream provider. |
|
Package schema holds the helpers this project layers over bifrost's message schema: token counting, deep-clone, MessageText/SetMessageText, Rewritable, ToolCalls (which pairs a tool result with the call that produced it), SessionHead, and static message-SHAPE validation.
|
Package schema holds the helpers this project layers over bifrost's message schema: token counting, deep-clone, MessageText/SetMessageText, Rewritable, ToolCalls (which pairs a tool result with the call that produced it), SessionHead, and static message-SHAPE validation. |
|
Package session resolves the conversation key that state is scoped to.
|
Package session resolves the conversation key that state is scoped to. |
|
Package store holds context-guru's cross-call state behind one interface so both hosts (bifrost proxy, AuthBridge plugin) share it.
|
Package store holds context-guru's cross-call state behind one interface so both hosts (bifrost proxy, AuthBridge plugin) share it. |
|
Package tenant is the control plane for a hosted, multi-user context-guru: who the users are, which token identifies them, and what configuration their traffic runs under.
|
Package tenant is the control plane for a hosted, multi-user context-guru: who the users are, which token identifies them, and what configuration their traffic runs under. |
Click to show internal directories.
Click to hide internal directories.
