pub struct RunPlan {Show 21 fields
pub run: RunId,
pub who: String,
pub addr: Address,
pub task: String,
pub goal: String,
pub opening: Opening,
pub job: Locator,
pub parent: Option<RunId>,
pub predecessor: Option<RunId>,
pub dispatched_by: Who,
pub run_policy: PolicyCell,
pub inherited: Vec<ChatMessage>,
pub shape: CallShape,
pub second_threshold: Option<SecondThreshold>,
pub context: ContextReading,
pub prefix: FrozenPrefix,
pub policy: BuildingPolicy,
pub tools: Vec<ToolDef>,
pub skills: Vec<SkillPin>,
pub retries: Retries,
pub naming: Option<B3Hash>,
}Expand description
Everything constant about one run. Assembled by the caller, because what a prefix contains and which tools exist are decisions of the city that dispatches, not of the loop that runs.
Fields§
§run: RunId§who: String§addr: Address§task: String§goal: String§opening: OpeningWhether this session was handed a written task or a person. Decided by the city when it laid the brief down, carried here so the window and the prefix’s run segment cannot disagree about which situation the agent is in.
job: Locator§parent: Option<RunId>The run that handed this work down, when one did. Written into
run_started so the tree is a fact anybody folding the ledger
can read, rather than an inference from two lines happening to
be next to each other.
predecessor: Option<RunId>The run this one replaces, when a resident succeeded itself.
Written into run_started beside parent, so a lineage is a
fact folded from the ledger rather than inferred from two runs
sharing an address.
dispatched_by: WhoWho dispatched this run, written into run_started: the line’s
author is always the city’s desk, so only the dispatch site
knows whether the person, the city or a resident sent it.
run_policy: PolicyCellThe run policy this run was dispatched under, written into
run_started as it was chosen (crates/kernel/Spec.lean §8-77), and
the cell that holds it while the run goes: the one value here
that changes, and only at SafePoint::BeforeWave (§8-62). Whoever
builds the tools builds the cell first and hands each write gate
its reader. Named apart from policy, which is the building’s,
because the two answer different questions: what the building
allows, and what this dispatch asked for inside that.
inherited: Vec<ChatMessage>The conversation this run starts from, when it is the first run of a session that branched off another. Empty for every other run.
It is the window’s material and not the prefix’s: a prefix segment
is a document a person can read and edit, while this is what the
model said and what the tools answered, and the ledger is where
those live (runtime::fork::inherited_indexed rebuilds them from it).
shape: CallShape§second_threshold: Option<SecondThreshold>Where the context reminder’s second rung sits for this run: the
configuration ladder’s answer, or None when no layer stated one
and the policy default sounds. Frozen with the run like every
setting here, so “each rung sounds once per run” cannot depend on
when somebody edited a file.
context: ContextReadingWhere this run records the provider’s count after each call. The
caller keeps a clone for whatever reports the reading, which is
status: the run writes it and nothing else does.
prefix: FrozenPrefix§policy: BuildingPolicy§tools: Vec<ToolDef>§skills: Vec<SkillPin>The skills this run’s reading room admitted, and what each one
hashed to when the shelf was read. Written into run_started
beside parent, and for the same reason: once the process that
read the shelf is gone, the ledger is the only thing that can
still say which bytes this run was given.
retries: RetriesHow many times this run may make a failed call again, as the person set it on the endpoint it calls. Frozen with the run for the reason every other setting here is: a number changed halfway through would make the account of what this run did depend on when somebody looked at a form.
naming: Option<B3Hash>The identity version this run’s session froze, which
run_started records as it is (crates/runtime/spec/Run.lean §8-56).