Expand description
Data model of the context compiler: the request/response value types.
Like crate::model, these are pure data with Serialize/Deserialize +
JsonSchema derives, so the domain types double as the MCP wire types —
no duplicate DTO layer. Invariants the compiler upholds over these shapes:
same request ⇒ byte-identical CompiledContext (determinism), and the
assembled content never exceeds the request’s token budget.
Structs§
- Compile
Policy - Tuning knobs of one compilation.
Defaultis the recommended profile. - Compile
Request - A full compile request: what to compile, under which budget, for whom.
- Compiled
Context - The compiler’s output: the assembled context plus its full audit trail.
- Compiled
Section - One contiguous block of the assembled output.
- Context
Decision - The auditable record of what happened to one fragment and why.
- Context
Decision Ref - A lightweight pointer to a past
ContextDecision. - Context
Fact - One asserted fact inside a
WorkingContext. - Context
Fragment - One unit of caller-supplied context to compile.
- Context
Savings - Aggregated savings over the recorded compilation events (memory bridge).
- Memory
Scope - Which memories the compiler may pull in alongside the caller’s fragments. Consumed by the memory bridge (US-002); carried in the request shape from the start so the wire contract does not change when it lands.
- Retrieval
Handle - A not-emitted fragment the caller can fetch back on demand.
- Source
Reference - A pointer from a compiled output back to one original fragment.
- Working
Context - The distilled working state of an agent session — small enough to carry
across sessions, structured enough to resume from. Persisted and reloaded
by the memory bridge (US-002) under
type = working_contextmetadata.
Enums§
- Context
Action - What the compiler decided to do with one fragment.
- Fidelity
Risk - How much fidelity a compiled context may have lost versus its input.
- Section
Kind - Where a section sits in the assembled output.