pub enum CandidateContent {
Prompt {
name: String,
prompt: String,
},
Policy {
family: DecisionFamily,
parameters: Value,
},
MemorySet {
scope: ScopeAddress,
adds: Vec<MemoryRecord>,
supersedes: Vec<String>,
},
ToolPermission {
tool: String,
direction: GrantDirection,
},
ToolContract {
tool: String,
schema: Value,
},
ModelSettings {
name: String,
model: String,
parameters: Value,
},
MemoryConfiguration {
name: String,
budget: ContextBudget,
default_filters: MemoryQuery,
schema_version: String,
},
MiddlewareComposition {
name: String,
layers: Vec<MiddlewareLayerConfig>,
},
}Expand description
The change a candidate declares, per CandidateKind. Serialized with
internal tagging ({"kind": "memory_set", …}): the kind is part of
the content address — a prompt text and a policy parameter set that
happened to serialize alike must never converge.
Variants§
Prompt
New prompt text. The text’s digest — sha256_hex over its UTF-8
bytes — is exactly the pin RunManifest::pin_prompt records, so
the candidate and the run manifest speak one content address.
Fields
Policy
Executor policy parameters for one
crate::record::DecisionFamily — backoff caps, timeout bounds,
concurrency limits. The closed legal-action sets stay closed: a
learned policy chooses among declared actions, never free-form
outputs.
Fields
family: DecisionFamilyThe decision family the parameters govern.
MemorySet
A set of memory records at one scope: adds and supersessions.
Carrying full MemoryRecords — not ids — is what lets the set
carry wave 2’s attributed correction candidates: the records’
provenance (and therefore their own content addresses) is inside
this candidate’s address.
Fields
scope: ScopeAddressThe scope the set applies at.
adds: Vec<MemoryRecord>The records the set adds (already content-addressed, already immutable — a record in two sets is the same record).
ToolPermission
A narrowed or widened tool grant.
Fields
direction: GrantDirectionThe direction of the change (see GrantDirection).
ToolContract
The JSON schema a tool’s pin digests (R0.11). The digest —
canonical-JSON SHA-256 — is exactly what
RunManifest::pin_tool_schema records, so the candidate and the
manifest speak one content address, the
CandidateContent::Prompt precedent applied to tool schemas.
Fields
ModelSettings
A model id plus its parameters (R0.11). The pair is what
RunManifest::pin_model pins: the provider-precise model id
verbatim, the parameters as a canonical-JSON digest.
Fields
MemoryConfiguration
Memory retrieval/assembly settings (R0.11): the budget and default
filters that shape what a run’s memory reads return, plus the
record-schema version the settings assume (the
manifest.memory_schema pin). Deliberately a new kind rather than
a CandidateContent::MemorySet reuse: a memory set carries
records at a scope; this carries the configuration reads run
under. Conflating the two would fake coverage.
Fields
budget: ContextBudgetThe default assembly budget reads run under.
default_filters: MemoryQueryThe default filters reads start from (a run’s own query narrows further; it never widens past the configuration).
MiddlewareComposition
An ordered middleware layer list plus per-layer configuration
(R0.11): interception policy versioned like everything else. The
layers are code — the registry versions their composition and
configuration, not their behavior; a layer’s logic change is a
deploy, covered by the checkpoint header’s graph_hash story.
Fields
layers: Vec<MiddlewareLayerConfig>The layers in declared order — before-hooks run in this order, after-hooks in reverse (the chain’s onion semantics, governed here, untouched there).