Expand description
On-disk state schema types per design.md §1.
Structs§
- Agent
Selection - Compact profile resolution recorded at create time.
- Awaiting
Input - Durable open-discussion state projected from
node.awaiting_input. - Caller
Merge Link - Immutable provenance for a caller-owned merge. Checked against the intent projection when the transaction is folded, not inferred from Git ancestry.
- Caller
PiLifecycle - Current generation projection of append-only caller Pi lifecycle history.
- Caller
PiSession - Immutable caller-owned native Pi session identity. This is an association, not evidence of writer quiescence, history retention, or settlement authority.
- Caller
Settlement Intent - One durable, single-run settlement fence. Never cleared by failed attempts.
- Child
Ref (child_run_id, child_node_id)pointer recorded inNode::children.- Closed
Ask - A closed question with its outcome (
Node::last_ask). - Creator
Session - Immutable same-user display attribution, never ownership or authorization. Currently only Pi sessions with canonical lowercase hyphenated UUIDs are accepted.
- Event
- One event-log line (design.md §1.4).
- Manifest
manifest.json(design.md §1.2).- Merge
Txn - A durable, in-flight
run mergetransaction recorded bymerge.startedBEFORE the git mutation, and the sole input to deterministic merge-crash recovery (design.md §2.1b / A2, issuemerge-transaction-recovery). - Node
- Durable
nodes/<node-id>.jsonprojection (design.md §1.3). - NodeId
- A validated node identifier:
n-followed by 4 or more ASCII digits (e.g.n-0001). Mirrors whatcrate::format_node_idemits. - OpenAsk
- A worker’s open blocking question to its parent, projected from
node.asked. The id is theseqof that event, so an answer addressed to an older question can never close a newer one. - Resident
Policy - Create-time policy of a named resident run (ADR 0003): a worker that works in told rounds and is resumed from its native session by the next message.
- Resident
State - Durable round state of a resident worker node (ADR 0003). Folded only from
told events; the read surfaces derive
working | waiting | dormantfrom it. - Retained
Display - Durable identity of one inert completed-worker display.
- Round
Landing - A round landed into the source branch by
run land(node.round_landed). - Round
Report - One told round report of a resident worker (
node.round_reported). - RunId
- A validated run identifier: a lowercase ULID (26 Crockford base32
characters whose first character keeps the encoded timestamp within
ULID’s 48-bit range). Mirrors what
crate::new_run_idemits. - Selected
Agent Candidate - Exact selected candidate pinned for launch and retry.
- Skipped
Agent Candidate - One rejected candidate and its first applicable reason.
- Tmux
Identity - A fully-qualified tmux window identity recorded at spawn time.
- Tmux
Retention Policy - Opt-in policy recorded on a run placed in a persistent tmux session.
- Worker
Evidence - Durable native Pi session and terminal evidence for one worker attempt.
- Worker
Exit - The observed exit status of a node’s worker process, recorded by the
run-workerlauncher shim under the run lock (design.md §2.1 / A1).
Enums§
- Agent
Owner - Who launches and owns the agent. This is independent of lifecycle: an interactive Taskfleet worker is still a Taskfleet-owned worker.
- AskOutcome
- How a question ended.
- Caller
PiState - A caller attests a Pi lifecycle transition. This is not a worker exit or proof of quiescence: only an external writer-fence protocol can authorize settlement. The event log retains every distinct transition.
- Evidence
Status - State of durable native worker evidence capture.
- IdValidation
Error - Error returned when a typed identifier fails parse-time validation.
- Kind
- The run/node kind enum (design.md §1.2).
- Lifecycle
- How a run is driven — its how-run state (design.md §2, §6).
- Settlement
Operation - Sticky caller-owned settlement operation. An intent is not a terminal report.
- Status
- Run/node status (design.md §1.2).
Constants§
- STATE_
SCHEMA_ VERSION - The current state-on-disk schema version this crate writes.
- SUPPORTED_
STATE_ SCHEMAS - All state-schema versions this crate can read.
Functions§
- aggregate_
terminal_ status - Aggregate a set of node statuses into the run’s rolled-up terminal status,
or
Nonewhen the run is not yet complete. - is_
run_ id_ prefix - True iff
sis a syntactically valid (possibly partial) prefix of aRunId: non-empty, no longer than a full ULID, every character a lowercase Crockford base32 digit, and a first character within ULID’s0..=7timestamp bound. Used by the CLI to resolve an unambiguous run-id prefix (likegit) — a value failing this is a malformed argument (invalid_run_id), not a legitimate-but-unknown prefix. The first-char bound is enforced because no validRunIdcan begin outside0..=7, so an8…/9…prefix is impossible rather than merely absent — reporting it as malformed keeps the error class honest and consistent with howRunId::parse_strrejects a full-length id with the same leading digit.