Expand description
Data-layer reads for the MCP server.
Every function here returns plain Rust / serde_json values built from
deterministic sources: the broker’s HTTP /log, files on disk, git
process output, and parsed configuration. No MCP types appear in this
module — that boundary (design D2) keeps the tool layer and any future
transport reusable on top of the same reads.
Degradation contract (design D4): functions return empty / None results
when their data source is simply absent (no broker, no session, no
governance config). They return Err only for genuine misconfiguration —
a configured path that exists but cannot be read — so the tool layer can
surface it to the client as a protocol error.
Modules§
- conflicts
- Conflict reads.
- docs
- Documentation reads for the MCP server.
- git
- Git-context reads — thin wrappers over
gitinvoked against the resolved repository root. These always work (the repo always exists), so there is no degradation path here. - governance
- Governance-document reads.
- intents
- Active-intent reads, reconstructed from the broker’s
/log. - learnings
- Parses
.git-paw/session-learnings.mdinto structured sections. - session
- Session-state reads.
- source
- Source-tree reads for the MCP server.
- specs
- Spec & task reads across the
OpenSpec, Markdown, and Spec Kit backends.
Functions§
- now_
unix - Current wall-clock time in seconds since the Unix epoch.
- read_
optional_ doc - Reads a configured document.
- resolve_
under_ root - Resolves a possibly-relative configured path against the repository root.