Expand description
Library surface of agentstategraph-mcp.
The binary (src/main.rs) re-uses these modules. Exposing them as a
library lets integration tests under tests/ exercise the HTTP
router, auth middleware, and rate-limit wiring directly against the
same code paths the server runs in production.
Modules§
- auth
- Multi-tenant authentication middleware.
- http
- HTTP REST API for AgentStateGraph.
- policy_
signing - Adapter bridging
agentstategraph_policy::SignatureVerifierto theagentstategraph_policy_sign::Ed25519Verifier+canonicalizeprimitives. - server
- AgentStateGraph MCP Server — exposes AgentStateGraph operations as MCP tools.
- store_
gauges - The store gauges (DESIGN.md Plan H t-008): what’s in the store, sampled on a slow interval because counting reads every row’s key, and what the last garbage collection this server ran reclaimed.
Constants§
- COMMIT_
EVENTS_ DIRECTIVE - The log filter directive that lets
asg.commitevents through whatever level the rest of the log runs at.
Functions§
- commit_
events_ from_ env - Whether each commit is logged as an
asg.commitevent (DESIGN.md Plan H t-010): only whenASG_COMMIT_EVENTSis1,on,trueoryes. - current_
trace - The trace the current work belongs to, from oxtel’s current span context,
as a commit links to it (DESIGN.md Plan H t-009). The server passes it to
agentstategraph::link_commits_to_tracesunlessASG_TRACE_LINKSis off. - trace_
links_ from_ env - Whether commits are linked to their traces: yes, unless
ASG_TRACE_LINKSis0,off,falseorno. - traces_
filter - The server’s trace filter (DESIGN.md Plan H t-011). Spans at
info, but not one per SQL statement: that cost a small read more than anything else telemetry does.ASG_SQL_SPANS=onadds them back, andRUST_LOG, when set, replaces the whole filter.db.client.operation.durationrecords either way.