core

module
v0.0.0-...-53bd38a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0

README

core — the Cortex runtime library

The Go module every sidecar binary and both external consumers import. It holds the plugin framework, the listeners, the cost pipeline, the session store, and the auth primitives — roughly 84,000 non-test lines.

It was called authlib and described as "the shared auth library". Measured by non-test lines, auth is 1.1% of it (counted 2026-11-05):

Theme Packages Lines Share
Framework pipeline, model, plugins, listener, config, spiffe 48,904 58.3%
Cost cost/* 13,850 16.5%
Observability session, sessionapi, observe, redact 11,985 14.3%
Auth auth, bypass, capabilities 920 1.1%

The remainder is transport, storage and integration glue — the table covers themes, not every package.

On the two names. Cortex is the product; AuthBridge is the injected sidecar component, and it is still the correct word inside artifact identifiers — the images the cortex* binaries that import this module ship in, the authbridge-proxy container the operator runs them as, the x-authbridge-* headers they set, the AUTHBRIDGE_* env vars they read. None of those can be renamed from here. So in prose, say Cortex for the product and AuthBridge for the sidecar. The full frozen list is in CLAUDE.md.

It is not protocol-free. An earlier version of this file claimed no gRPC and no Envoy dependency; that stopped being true when the listeners moved in. listener/extproc is an Envoy ext_proc gRPC server, and core has 20 direct dependencies including google.golang.org/grpc, envoyproxy/go-control-plane, OPA, OpenTelemetry and CPEX.

Packages

Framework — the plugin machinery and the processes' entry points:

Package Purpose
pipeline/ Plugin interface + lifecycle (Configurable, Initializer, Shutdowner) — see docs/framework-architecture.md
model/ Shared data types: session events, parsed requests, client labels. Imports no engine code
parse/ Parser libraries for MCP, A2A and inference: plain values in, core/model types out. Import no engine code and compute no cost. The three parser plugins wrap them
plugins/ Registry + every concrete plugin, each owning its own config — see docs/plugin-reference.md
listener/ Every listener implementation: the Envoy extproc gRPC server, the forward/reverse/transparent HTTP proxies
config/ YAML config with mode presets, ${ENV_VAR} expansion, credential-file waiters, top-level validation
bootstrap/ Process-level helpers shared by the binaries — logging setup, the SIGUSR1 toggle, the health and stats servers
reloader/ fsnotify-based config hot-reload — atomic pipeline swap on ConfigMap change
capabilities/ Capability interfaces protocol extensions implement, plus the vocabulary plugins share without importing each other — role constants, the ContentSource / Fragment shape, and PluginCapabilities.Claims constants

Cost — 17% of the module, and the part the old description omitted entirely:

Package Purpose
cost/pricing/ Owns model rates and the arithmetic that turns tokens into money
cost/settle/ Turns one response's facts into one settled cost
cost/event/ The canonical wire shape of the per-request cost
cost/ledger/ Persists per-minute cost and token totals to disk
cost/usage/ Aggregates session events into fixed-width time buckets

Observability:

Package Purpose
session/ In-memory session store correlating requests, with message interning — see the session store memory limits in framework-architecture.md
sessionapi/ The :9094 HTTP API — /v1/sessions, /v1/events SSE, /v1/pipeline
observe/ The :9093 server — /stats, /config, /reload/status
redact/ Best-effort stripping of sensitive values before anything is stored or served

Auth and identity. The theme table's 920-line Auth figure is auth + bypass + capabilities — capabilities is grouped here by subject even though it is listed under Framework above, which is where it is used from. spiffe is counted under Framework, not here:

Package Purpose
auth/ Composes building blocks into HandleInbound / HandleOutbound. Used internally by jwt-validation and token-exchange; plugin-internal in practice
bypass/ Path pattern matcher for public endpoints (health, agent card). Any inbound gate plugin can use it
spiffe/ Framework-shared SPIFFE credential helpers: in-process Workload API client plus the /opt file mirror
routing/ Host-to-audience router with glob matching. Used by token-exchange

Transport, storage and integration:

Package Purpose
tlsconfig/ Builds *crypto/tls.Config values. Every importer aliases it authtls, because crypto/tls owns the bare name
tlsbridge/ The outbound TLS bridge — forges a certificate so plaintext interception can continue past a CONNECT
peerproc/ Names the process at the other end of a TCP connection this process accepted, the process listening on an address, and a process's parents — macOS's kernel TCP table, Linux's /proc. No caller yet: per-process session attribution (#1187) will use it
storage/ The Store interface and its provider registry. The Redis driver lives at storage/redis/, its own nested module, so its dependency stays out of core
memstore/ A generic, process-scoped, TTL key→value store, intentionally semantics-free. Contrast storage/, which is the cross-pod persistent one
llmclient/ Small helper for calling OpenAI-compatible endpoints
placeholder/ The convention for opaque credential handles. Named accurately despite reading like a TODO, and tied to the abph_ wire prefix, which cannot change
clientstate/ The on-disk record agentop writes when it points an agent at a local proxy

Plugin internals worth knowing about:

Package Purpose
plugins/jwtvalidation/ The jwt-validation plugin. Owns validation/ (JWKS-backed verifier)
plugins/tokenexchange/ The token-exchange plugin. Owns exchange/ (RFC 8693 client) and cache/ (token TTL cache). Its JWT-SVID source is the framework's spiffe/, not a plugin-internal copy
plugins/plugintesting/ Test helpers — stubs that skip file IO, for listener-level tests

Packages that used to live at core/validation, core/exchange, core/cache moved under their owning plugin. They had no reuse outside that plugin; keeping them at core/ top-level implied wider usefulness than reality. New plugins should follow the same pattern: if the package is plugin-internal, colocate it under plugins/<plugin>/.

Usage

Plugins own their own configuration and construct any auth.Auth they need internally from their per-plugin config (see docs/plugin-reference.md). Host processes (cmd/cortex, cmd/cortex-envoy) just load the YAML, call plugins.Build, run the pipelines, and let each plugin handle its own dependencies.

import (
    "github.com/rossoctl/cortex/core/config"
    "github.com/rossoctl/cortex/core/plugins"
)

cfg, _ := config.Load("config.yaml")
config.ApplyPreset(cfg)
_ = config.Validate(cfg) // mode + listener combo only; plugins self-validate

inbound,  _ := plugins.Build(cfg.Pipeline.Inbound.Plugins)
outbound, _ := plugins.Build(cfg.Pipeline.Outbound.Plugins)

_ = inbound.Start(ctx)   // invokes Init on plugins that implement pipeline.Initializer
_ = outbound.Start(ctx)

// Listeners drive the pipelines — see core/listener/*

For direct use of the auth/ composition layer (outside of plugins), see auth/auth.go — auth.New(cfg) takes an auth.Config containing the specific building blocks a caller needs.

Go Module

module github.com/rossoctl/cortex/core

Twenty direct dependencies. The ones that shape the module: envoyproxy/go-control-plane and google.golang.org/grpc (the ext_proc listener), open-policy-agent/opa (the opa plugin), spiffe/go-spiffe/v2, lestrrat-go/jwx/v2 (JWT), go.opentelemetry.io/otel, contextforge-org/cpex, maximhq/bifrost/core, rossoctl/context-guru, gobwas/glob, fsnotify/fsnotify, tidwall/gjson + sjson, gopkg.in/yaml.v3.

core is consumed outside this repo — by rossoctl/operator and rossoctl/rossoctl-cli, both public repos that compile against this module — so removing exported API here is a cross-repo change.

Directories

Path Synopsis
Package accounting is Cortex's own host for github.com/rossoctl/accountant: it computes context-savings figures with the same rules the context-guru proxy uses, following the host obligations in accountant/docs/cortex-wiring.md W6.
Package accounting is Cortex's own host for github.com/rossoctl/accountant: it computes context-savings figures with the same rules the context-guru proxy uses, following the host obligations in accountant/docs/cortex-wiring.md W6.
facts
Package facts classifies which LLM provider a request went to, and gives the cache facts (accountant.EntryFacts) that provider's prompt cache has for a model.
Package facts classifies which LLM provider a request went to, and gives the cache facts (accountant.EntryFacts) that provider's prompt cache has for a model.
push
Package push sends Cortex's accountant counters (llm.savings.*) to the central collector over OTLP/HTTP (design §5.10).
Package push sends Cortex's accountant counters (llm.savings.*) to the central collector over OTLP/HTTP (design §5.10).
reqstats
Package reqstats pushes the llm.inference.* transport metrics (requests by status class, duration, time-to-first-byte, time the proxy added, request/response bytes) that core/accounting/metrics.go's per-request accountant data cannot provide, because that call site never sees an HTTP status, a wall-clock duration, or a byte count.
Package reqstats pushes the llm.inference.* transport metrics (requests by status class, duration, time-to-first-byte, time the proxy added, request/response bytes) that core/accounting/metrics.go's per-request accountant data cannot provide, because that call site never sees an HTTP status, a wall-clock duration, or a byte count.
wire
Package wire reads an inference request body into the shape github.com/rossoctl/accountant hashes: tools, then system, then messages, one []byte per position, in the provider's cache order (accountant/docs/cortex-wiring.md W6.3).
Package wire reads an inference request body into the shape github.com/rossoctl/accountant hashes: tools, then system, then messages, one []byte per position, in the provider's cache order (accountant/docs/cortex-wiring.md W6.3).
Package attribution decides which agent, process and session a request belongs to.
Package attribution decides which agent, process and session a request belongs to.
Package auth composes core building blocks into HandleInbound and HandleOutbound — the two functions that all listeners call.
Package auth composes core building blocks into HandleInbound and HandleOutbound — the two functions that all listeners call.
Package bootstrap holds process-level helpers shared by the authbridge binaries (cortex, cortex-envoy).
Package bootstrap holds process-level helpers shared by the authbridge binaries (cortex, cortex-envoy).
Package bypass provides path pattern matching for skipping JWT validation on public endpoints (e.g., health probes, agent card discovery).
Package bypass provides path pattern matching for skipping JWT validation on public endpoints (e.g., health probes, agent card discovery).
Package capabilities defines capability interfaces that protocol extensions implement to participate in framework services like content inspection, session bucketing, and summarization.
Package capabilities defines capability interfaces that protocol extensions implement to participate in framework services like content inspection, session bucketing, and summarization.
Package clientstate owns the on-disk record agentop writes when it points an agent at Cortex, and which cortex reads back to check the agent is still pointed at the CA in force.
Package clientstate owns the on-disk record agentop writes when it points an agent at Cortex, and which cortex reads back to check the agent is still pointed at the CA in force.
Package config provides YAML-based configuration with mode presets and startup validation for the AuthBridge auth layer.
Package config provides YAML-based configuration with mode presets and startup validation for the AuthBridge auth layer.
cost
event
Package event is the canonical wire shape of the per-request cost that litellm-budget-track publishes onto a session event.
Package event is the canonical wire shape of the per-request cost that litellm-budget-track publishes onto a session event.
ledger
Package ledger persists per-minute cost and token totals to disk so "what did today cost" survives a restart.
Package ledger persists per-minute cost and token totals to disk so "what did today cost" survives a restart.
pricing
Package pricing owns model rates and the arithmetic that turns tokens into dollars.
Package pricing owns model rates and the arithmetic that turns tokens into dollars.
pricing/internal/gen command
Command gen regenerates the bundled price table from LiteLLM's public price map.
Command gen regenerates the bundled price table from LiteLLM's public price map.
pricing/internal/pricegen
Package pricegen turns LiteLLM's public model_prices_and_context_window.json into pricing.Entry rows and renders them as Go source.
Package pricegen turns LiteLLM's public model_prices_and_context_window.json into pricing.Entry rows and renders them as Go source.
pricing/pricelist
Package pricelist keeps vendor list prices current by downloading LiteLLM's public price map while the proxy runs, rather than only when the binary is built.
Package pricelist keeps vendor list prices current by downloading LiteLLM's public price map while the proxy runs, rather than only when the binary is built.
settle
Package settle turns one response's facts into one settled cost.
Package settle turns one response's facts into one settled cost.
usage
Package usage aggregates session events into fixed-width time buckets so a client can chart volume, errors, latency and cost over wall-clock time.
Package usage aggregates session events into fixed-width time buckets so a client can chart volume, errors, latency and cost over wall-clock time.
Package fsutil holds file operations that need care on Windows.
Package fsutil holds file operations that need care on Windows.
Package intent finds the text that a human typed in an agent's inference request.
Package intent finds the text that a human typed in an agent's inference request.
internal
hostglob
Package hostglob is the one place cortex turns an operator-supplied host pattern into a matcher, and the one place that decides what counts as a dangerously broad pattern.
Package hostglob is the one place cortex turns an operator-supplied host pattern into a matcher, and the one place that decides what counts as a dangerously broad pattern.
parsefixture
Package parsefixture runs a parser plugin over saved request and response pairs and compares the result with a golden file.
Package parsefixture runs a parser plugin over saved request and response pairs and compares the result with a golden file.
parsercommon
Package parsercommon holds small helpers shared by the protocol parser libraries in core/parse (mcp, a2a, inference), the mcp-parser and inference-parser plugins, and the cpex plugin.
Package parsercommon holds small helpers shared by the protocol parser libraries in core/parse (mcp, a2a, inference), the mcp-parser and inference-parser plugins, and the cpex plugin.
tztest
Package tztest loads real time zones for tests from a tz release pinned in this repository, never from the machine that runs them.
Package tztest loads real time zones for tests from a tz release pinned in this repository, never from the machine that runs them.
wirefixture
Package wirefixture checks a handler's JSON against a shared fixture file.
Package wirefixture checks a handler's JSON against a shared fixture file.
listener
egressallow
Package egressallow implements the forward proxy's deny-by-default destination allow list (#1483, MOCA MI1 §8.5): a sandbox may reach only the host:port entries the operator lists, and a request for anything else is refused by name — never left to time out — before DNS resolution and before any dial.
Package egressallow implements the forward proxy's deny-by-default destination allow list (#1483, MOCA MI1 §8.5): a sandbox may reach only the host:port entries the operator lists, and a request for anything else is refused by name — never left to time out — before DNS resolution and before any dial.
egressguard
Package egressguard implements the forward proxy's SSRF dial guard (#1484, MOCA MI1 §8.5): resolve a destination once, refuse addresses a sandbox must never reach through the proxy, and dial the address that was checked — never a second resolution's answer.
Package egressguard implements the forward proxy's SSRF dial guard (#1484, MOCA MI1 §8.5): resolve a destination once, refuse addresses a sandbox must never reach through the proxy, and dial the address that was checked — never a second resolution's answer.
extproc
Package extproc implements an Envoy ext_proc gRPC streaming listener.
Package extproc implements an Envoy ext_proc gRPC streaming listener.
forwardproxy
Package forwardproxy implements an HTTP forward proxy listener.
Package forwardproxy implements an HTTP forward proxy listener.
httpx
Package httpx contains the HTTP helpers shared across this repo's servers: the forward, reverse and ext_proc listeners, the stats and session APIs, and the agentop viewer's pprof surface.
Package httpx contains the HTTP helpers shared across this repo's servers: the forward, reverse and ext_proc listeners, the stats and session APIs, and the agentop viewer's pprof surface.
httpx/pprofx
Package pprofx mounts Go's net/http/pprof handlers behind the browser defenses.
Package pprofx mounts Go's net/http/pprof handlers behind the browser defenses.
internal/bodycount
Package bodycount counts the bytes a listener reads off an upstream response body, so every listener reports the same figure for the same response (#1309).
Package bodycount counts the bytes a listener reads off an upstream response body, so every listener reports the same figure for the same response (#1309).
internal/bodyread
Package bodyread reports why buffering a request body failed.
Package bodyread reports why buffering a request body failed.
internal/sessionevent
Package sessionevent builds the session rows every listener records for a request: Request and Response for one the pipeline let through, Deny and DenyResponse for one it rejected.
Package sessionevent builds the session rows every listener records for a request: Request and Response for one the pipeline let through, Deny and DenyResponse for one it rejected.
internal/sseframe
Package sseframe reads complete Server-Sent Event frames off a streaming HTTP response body.
Package sseframe reads complete Server-Sent Event frames off a streaming HTTP response body.
internal/tlssniff
Package tlssniff provides a net.Listener wrapper that detects whether each accepted connection is a TLS handshake or a plain HTTP request, and dispatches accordingly.
Package tlssniff provides a net.Listener wrapper that detects whether each accepted connection is a TLS handshake or a plain HTTP request, and dispatches accordingly.
internal/wsframe
Package wsframe reads and writes RFC 6455 WebSocket frames for a proxy that relays a connection it also needs to read.
Package wsframe reads and writes RFC 6455 WebSocket frames for a proxy that relays a connection it also needs to read.
reverseproxy
Package reverseproxy implements an HTTP reverse proxy listener.
Package reverseproxy implements an HTTP reverse proxy listener.
skiphost
Package skiphost matches an outbound destination Host against an operator-configured pattern list to decide whether the listener should short-circuit — bypassing the plugin pipeline and session recording — and forward the request as a transparent proxy.
Package skiphost matches an outbound destination Host against an operator-configured pattern list to decide whether the listener should short-circuit — bypassing the plugin pipeline and session recording — and forward the request as a transparent proxy.
transparentproxy
Package transparentproxy implements transparent (iptables-REDIRECTed) proxy listeners for proxy-sidecar mode.
Package transparentproxy implements transparent (iptables-REDIRECTed) proxy listeners for proxy-sidecar mode.
vmcontrol
Package vmcontrol carries the per-VM listening socket from MOCA's vmpool to the Cortex forward proxy (#1477).
Package vmcontrol carries the per-VM listening socket from MOCA's vmpool to the Cortex forward proxy (#1477).
Package llmclient is a small helper for calling OpenAI-compatible chat-completions endpoints from authbridge plugins.
Package llmclient is a small helper for calling OpenAI-compatible chat-completions endpoints from authbridge plugins.
Package memstore provides a generic, process-scoped, TTL key→value store that plugins reach via pipeline.Context.Shared.
Package memstore provides a generic, process-scoped, TTL key→value store that plugins reach via pipeline.Context.Shared.
claude
Package claude owns the Claude Code session-metadata contract: the shape agentop's harvester writes to ~/.cortex/session-metadata.json, the path it lives at, and the harvest that produces it.
Package claude owns the Claude Code session-metadata contract: the shape agentop's harvester writes to ~/.cortex/session-metadata.json, the path it lives at, and the harvest that produces it.
parse
a2a
Package a2a parses A2A JSON-RPC 2.0 requests and responses from plain values.
Package a2a parses A2A JSON-RPC 2.0 requests and responses from plain values.
inference
Package inference parses LLM inference requests and responses from plain values: Anthropic Messages, OpenAI Chat Completions and the Responses API.
Package inference parses LLM inference requests and responses from plain values: Anthropic Messages, OpenAI Chat Completions and the Responses API.
mcp
Package mcp parses MCP JSON-RPC 2.0 requests and responses from plain values.
Package mcp parses MCP JSON-RPC 2.0 requests and responses from plain values.
Package peerproc names the process at the other end of a TCP connection this process accepted, so a proxy on the same host can tell its clients apart by process rather than by what they claim in their requests.
Package peerproc names the process at the other end of a TCP connection this process accepted, so a proxy on the same host can tell its clients apart by process rather than by what they claim in their requests.
Package placeholder defines the convention for opaque credential handles: a random "abph_" token the agent receives in place of the real Authorization value, plus the namespaced key used to store the real token in a shared store.
Package placeholder defines the convention for opaque credential handles: a random "abph_" token the agent receives in place of the real Authorization value, plus the namespaced key used to store the real token in a shared store.
all
Package all registers the bundled plugins for every binary that imports it.
Package all registers the bundled plugins for every binary that imports it.
contextguru
Package contextguru is an outbound AuthBridge plugin that compacts an agent's LLM request context before it is forwarded upstream, using the embedded github.com/rossoctl/context-guru engine.
Package contextguru is an outbound AuthBridge plugin that compacts an agent's LLM request context before it is forwarded upstream, using the embedded github.com/rossoctl/context-guru engine.
cpex
Package cpex bridges AuthBridge requests through the CPEX (Context Plugin Execution) framework so operators can drive policy with CPEX's APL (Attribute Policy Language) DSL — or any of CPEX's built-in plugins (JWT identity, OAuth delegation, the Cedar, CEL and OPA decision points) — without writing Go code.
Package cpex bridges AuthBridge requests through the CPEX (Context Plugin Execution) framework so operators can drive policy with CPEX's APL (Attribute Policy Language) DSL — or any of CPEX's built-in plugins (JWT identity, OAuth delegation, the Cedar, CEL and OPA decision points) — without writing Go code.
evolve
Package evolve connects Cortex to altk-evolve, a service that learns guidelines from agent trajectories (https://github.com/AgentToolkit/altk-evolve), using only the tools a stock `evolve-mcp --transport sse` server exposes.
Package evolve connects Cortex to altk-evolve, a service that learns guidelines from agent trajectories (https://github.com/AgentToolkit/altk-evolve), using only the tools a stock `evolve-mcp --transport sse` server exposes.
ibac
Package ibac implements an Intent-Based Access Control plugin for authbridge.
Package ibac implements an Intent-Based Access Control plugin for authbridge.
inferencerouter
Package inferencerouter is the inference-router plugin: it sends a coding agent's new sessions to the inference server chosen for that agent, and keeps every session on the server it started on.
Package inferencerouter is the inference-router plugin: it sends a coding agent's new sessions to the inference server chosen for that agent, and keeps every session on the server it started on.
inferencerouter/routerconfig
Package routerconfig is the inference-router plugin's configuration: its shape, its validation, and the host rules the plugin routes by.
Package routerconfig is the inference-router plugin's configuration: its shape, its validation, and the host rules the plugin routes by.
internal/hostmatch
Package hostmatch matches a request host against the bypass_hosts globs that ibac, sparc, cpex and lineage share.
Package hostmatch matches a request host against the bypass_hosts globs that ibac, sparc, cpex and lineage share.
jwtvalidation/validation
Package validation provides JWT verification with JWKS-based key resolution.
Package validation provides JWT verification with JWKS-based key resolution.
lineage
Package lineage provides the lineage-telemetry authbridge plugin.
Package lineage provides the lineage-telemetry authbridge plugin.
litellm_budgettrack
Package litellm_budgettrack provides a pipeline plugin that tracks per-request cost and enforces a daily spending budget, rejecting requests with HTTP 429 when the budget is exceeded.
Package litellm_budgettrack provides a pipeline plugin that tracks per-request cost and enforces a daily spending budget, rejecting requests with HTTP 429 when the budget is exceeded.
opa
plugintesting
Package plugintesting exposes stub plugin adapters for listener tests that need to inject pre-built *auth.Auth instances (for example, with a mock verifier or a mock exchanger) without going through the real plugins' Configure path.
Package plugintesting exposes stub plugin adapters for listener tests that need to inject pre-built *auth.Auth instances (for example, with a mock verifier or a mock exchanger) without going through the real plugins' Configure path.
script
Package script is the script plugin: it runs every executable file in a folder as a pipeline step, so a user can customize Cortex with a small Python or shell script instead of a Go plugin and a rebuild.
Package script is the script plugin: it runs every executable file in a folder as a pipeline step, so a user can customize Cortex with a small Python or shell script instead of a Go plugin and a rebuild.
script/catalog
Package catalog is the script plugins Cortex ships: each folder under entries/ is one entry, which installed is one slot.
Package catalog is the script plugins Cortex ships: each folder under entries/ is one entry, which installed is one slot.
script/internal/worker
Package worker runs one script as a long-lived child process and exchanges line-delimited JSON with it: one object per line on the child's stdin, one per line back on its stdout.
Package worker runs one script as a long-lived child process and exchanges line-delimited JSON with it: one object per line on the child's stdin, one per line back on its stdout.
sessionbudget
Package sessionbudget enforces per-session lifetime budgets on tokens, inference calls, and wall-clock duration.
Package sessionbudget enforces per-session lifetime budgets on tokens, inference calls, and wall-clock duration.
sparc
Package sparc implements a pre-tool reflection plugin for authbridge.
Package sparc implements a pre-tool reflection plugin for authbridge.
staticinject
Package staticinject implements the static-inject outbound AuthBridge plugin: it swaps a placeholder credential on the outbound Authorization header for a real static credential, so a model-influenced workload never holds the real secret.
Package staticinject implements the static-inject outbound AuthBridge plugin: it swaps a placeholder credential on the outbound Authorization header for a real static credential, so a model-influenced workload never holds the real secret.
tokenbroker/client
Package client provides an HTTP client for the Token Broker service.
Package client provides an HTTP client for the Token Broker service.
tokenexchange/cache
Package cache provides a SHA-256 keyed token cache with TTL-based eviction.
Package cache provides a SHA-256 keyed token cache with TTL-based eviction.
tokenexchange/exchange
Package exchange implements RFC 8693 OAuth 2.0 Token Exchange and client credentials grant.
Package exchange implements RFC 8693 OAuth 2.0 Token Exchange and client credentials grant.
tokenexchangeaiac
Package tokenexchangeaiac is an outbound token-exchange plugin that needs no routes.
Package tokenexchangeaiac is an outbound token-exchange plugin that needs no routes.
toolprune
Package toolprune removes unused tool definitions from outbound inference requests.
Package toolprune removes unused tool definitions from outbound inference requests.
Package project names the project an agent process works in: the git repo root of its cwd.
Package project names the project an agent process works in: the git repo root of its cwd.
Package redact provides best-effort stripping of sensitive values from JSON config payloads served by unauthenticated diagnostic endpoints.
Package redact provides best-effort stripping of sensitive values from JSON config payloads served by unauthenticated diagnostic endpoints.
content
Package content finds secrets in content: the text of request and response bodies, SSE streams, and the text fields of session events (#1921).
Package content finds secrets in content: the text of request and response bodies, SSE streams, and the text fields of session events (#1921).
Package reloader watches a config file and atomically swaps the inbound / outbound plugin pipelines when the file changes.
Package reloader watches a config file and atomically swaps the inbound / outbound plugin pipelines when the file changes.
Package routing provides host-to-audience routing for token exchange.
Package routing provides host-to-audience routing for token exchange.
Package session provides an in-memory session store for correlating inbound user intents with outbound tool calls across request boundaries.
Package session provides an in-memory session store for correlating inbound user intents with outbound tool calls across request boundaries.
archive
Package archive persists sessions to disk so they survive a restart and the store's own eviction, and so agentop can browse them afterwards.
Package archive persists sessions to disk so they survive a restart and the store's own eviction, and so agentop can browse them afterwards.
importer
Package importer writes sessions from an agent's own transcripts on disk into the session archive and the cost ledger, as sessions with the imported mark.
Package importer writes sessions from an agent's own transcripts on disk into the session archive and the cost ledger, as sessions with the imported mark.
importer/bob
Package bob is the importer source for Bob (Bob Shell and Bob IDE).
Package bob is the importer source for Bob (Bob Shell and Bob IDE).
importer/claude
Package claude is the importer source for Claude Code.
Package claude is the importer source for Claude Code.
importer/codex
Package codex is the importer source for Codex.
Package codex is the importer source for Codex.
importer/opencode
Package opencode is the importer source for OpenCode.
Package opencode is the importer source for OpenCode.
importer/pi
Package pi is the importer source for Pi (pi.dev).
Package pi is the importer source for Pi (pi.dev).
importer/sqlitecli
Package sqlitecli reads a SQLite database through the sqlite3 program, so that no module links a SQLite driver.
Package sqlitecli reads a SQLite database through the sqlite3 program, so that no module links a SQLite driver.
timeline
Package timeline turns one session's events into spans on a time axis: which Claude Code agent was generating, which tool it was running, when a subagent was spawned and when its result came back, and which hosts the session talked to.
Package timeline turns one session's events into spans on a time axis: which Claude Code agent was generating, which tool it was running, when a subagent was spawned and when its result came back, and which hosts the session talked to.
toolpair
Package toolpair pairs a session's tool calls with their results.
Package toolpair pairs a session's tool calls with their results.
Package sessionapi exposes AuthBridge's in-memory session store over HTTP: JSON snapshots plus an SSE stream of live events.
Package sessionapi exposes AuthBridge's in-memory session store over HTTP: JSON snapshots plus an SSE stream of live events.
Package sessionexport projects a session event to a flat, content-free record for post-processing outside the proxy.
Package sessionexport projects a session event to a flat, content-free record for post-processing outside the proxy.
core/spiffe/consumer.go
core/spiffe/consumer.go
filestore
Package filestore is a storage.Store kept in memory and saved to one file, for a single process that needs its plugins' state to outlive it: the laptop proxy, where a restart is routine and there is no redis.
Package filestore is a storage.Store kept in memory and saved to one file, for a single process that needs its plugins' state to outlive it: the laptop proxy, where a restart is routine and there is no redis.
Package tlsbridge implements AuthBridge's outbound TLS bridge: it forges a per-origin leaf so the agent's egress TLS terminates at AuthBridge, the existing outbound pipeline runs on the decrypted request, and the call is relayed over a separately-verified upstream TLS connection.
Package tlsbridge implements AuthBridge's outbound TLS bridge: it forges a per-origin leaf so the agent's egress TLS terminates at AuthBridge, the existing outbound pipeline runs on the decrypted request, and the call is relayed over a separately-verified upstream TLS connection.
Package tlsconfig builds *crypto/tls.Config values for authbridge's reverse-proxy and forward-proxy listeners using a SPIRE X.509 SVID source.
Package tlsconfig builds *crypto/tls.Config values for authbridge's reverse-proxy and forward-proxy listeners using a SPIRE X.509 SVID source.
Package translate converts inference requests and replies from one protocol to another through the pivot type in package pivot.
Package translate converts inference requests and replies from one protocol to another through the pivot type in package pivot.
anthropic
Package anthropic is the anthropic-messages translation protocol: the Anthropic Messages API.
Package anthropic is the anthropic-messages translation protocol: the Anthropic Messages API.
chat
Package chat is the chat-completions protocol of the translation hub.
Package chat is the chat-completions protocol of the translation hub.
pivot
Package pivot holds the protocol-neutral form of an inference request and reply, and the contract that each protocol package implements.
Package pivot holds the protocol-neutral form of an inference request and reply, and the contract that each protocol package implements.
responses
Package responses is the responses protocol of the translation hub: the OpenAI Responses API that Codex sends.
Package responses is the responses protocol of the translation hub: the OpenAI Responses API that Codex sends.
Package upstreamproxy sends Cortex's own egress through a parent HTTP proxy (listener.upstream_proxy).
Package upstreamproxy sends Cortex's own egress through a parent HTTP proxy (listener.upstream_proxy).

Jump to

Keyboard shortcuts

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