Expand description
The Agent Harness: the drop-in inline proxy wrapping agent → LLM traffic.
Hot path (per request): validate identity → check token quota → sanitize →
compress → dispatch a copy to the async workers (non-blocking try_send,
bounded channels) → forward upstream → stream chunks back. Workers do the
heavy work: embeddings, loop delta, OCSF emission, bridge publish, ATIF
appends. Receipts are signed once, at session close, asynchronously.
Silent-error posture: every dropped worker message increments
av_events_dropped_total; audited chat/tool work reserves worker capacity
before quotas mutate, so ATIF-bearing jobs are admission-gated (fail
closed), never dropped mid-flight; client aborts still finalize sessions;
worker panics are supervised and counted.
Re-exports§
pub use config::HarnessConfig;pub use pipeline::AppState;pub use routes::build_router;
Modules§
- authz
- Intent mapping, mission narrowing, and AuthZEN PDP (pillar 2).
- authzen
- Client for an external AuthZEN policy decision point (Authorization API 1.0).
- backend
- Per-backend credential routing and network isolation (pillar 4).
- config
- Harness configuration (TOML surface, versioned).
- content
- Content export for external telemetry (the tenant OpenTelemetry collector).
- dashboard
- Read-only operator dashboard.
- http_
serve - Accept loop with client-silence reaping — the slowloris defense
axum::servecannot provide. - mcp_
client - MCP Streamable HTTP client for backends configured with
transport = "mcp"(the default for[[backends]]). - otel_
content - Full-content OpenTelemetry export to the tenant collector.
- pipeline
- Ordered hot-path middleware and upstream forwarding.
- reconciler
- Session finalization and periodic idle reconciliation.
- revocation
- Token revocation list kept in the harness state store (pillar 1).
- routes
- Axum HTTP routes for proxy, MCP interception, lifecycle, and operations.
- service_
binding - Cloud-platform service binding discovery.
- session
- Per-session state: sequence numbers, event chain, ATIF builder, loop state, lifecycle (open → active → closed/promoted), and finalization products.
- worker
- Bounded asynchronous worker for loop analysis, event emission, and capture.
- workload
- Agent identities for platform workloads: the RFC 7523 JWT-bearer grant
on
/v1/token.
Functions§
- control_
key_ from_ signer - Derive the deployment-local HMAC key used for authenticated control files.