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. |
|
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
|
|
|
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. |
|
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. |
|
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 metrics turns component/run reports into telemetry.
|
Package metrics turns component/run reports into telemetry. |
|
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 wraps bifrost's provider-agnostic chat schema with the helpers context-guru components need: token accounting, deep-clone for fail-open snapshots, tool-result iteration, and byte-preservation for lossless round-trips of provider-specific fields.
|
Package schema wraps bifrost's provider-agnostic chat schema with the helpers context-guru components need: token accounting, deep-clone for fail-open snapshots, tool-result iteration, and byte-preservation for lossless round-trips of provider-specific fields. |
|
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. |
Click to show internal directories.
Click to hide internal directories.