Expand description
A person’s approvals and rejections.
When an attempt stops for approval, its pending call is saved with the
attempt. speccoder task approve turns that call’s resolved object —
the canonical file of a write, the exact argv of a command with its
directory and executable, an MCP tool with its definition’s digest —
into an approval for the task, bound to the run it was made in (a grant
never outlives its run); speccoder task reject into a denial with a
reason the model is told. The next attempt carries the task’s decisions
in its journaled input, so strict replay needs nothing else. Standing
approvals for commands are [commands] allow in speccoder.toml
(exact argvs), committed by the person.
Re-exports§
pub use present::PresentContext;pub use present::Presentation;pub use present::present;
Modules§
- coverage
- What a prefix entry would newly allow, from the project’s journal: the
preview a prefix is saved from (
[commands] allow_prefix,[sandbox] network_allow_prefix). Every distinct argv the journal records that the prefix covers and today’s policy does not allow, with how often, when last and how it was decided then; what a fixed rule still asks for or denies is marked. An unreadable journal or run makes the preview incomplete — never “covers nothing” — and an incomplete preview cannot be saved. - derived
- Arguments copied from repository content: a call needing a person whose arguments occur verbatim in content the attempt received from a source other than the model, the person and speccoder’s own instructions (file reads, search results, command and check output, MCP results, inlined worktree text) names that source and offers no remembered option — the mechanism by which planted content becomes a standing rule is broken at the prompt.
- present
- What a person sees when a call needs them: built live from the
journaled
Requestand what only the live run knows — the file as it is now, the sandbox — and never journaled itself, so replay does not depend on the worktree. The terminal prompt, editors (ACP), theapprovalslisting and the dashboard all render this one value. - tasks
- A person’s decision as an agentplane human task.
Structs§
- Answer
- A person’s answer (“later” is no answer: nothing is journaled until one exists).
- Batch
Choice - What a batch decision decides.
- Choice
- Which waiting calls to decide, and how (
approve/rejectoptions). - Confirm
Request - A bug’s reproductions, waiting for the person’s one confirmation.
- Decided
- One decision, as it was made.
- Decisions
- All decisions, by
feature/task. - Elsewhere
- What a run of
taskfinds before it starts: another task of the feature whose attempt waits for a person, with what it waits on (its attempt holds the feature’s worktree until it is decided and resumed). - Request
- A call that needs a person: the identity of the journaled question, so only what the journal already holds goes in (the presentation — the diff, the sandbox line — is built live from it).
- RunGrant
- An approved object and the run it belongs to: it covers calls of that
run only.
runisNonefor a decision on a call a parallel lane stopped (its run ended): the next run that attempts the task claims it (Decisions::claim), and it ends with that run. - Shown
Reproduction - One reproduction as a person is shown it.
- Source
- An argument of a call found verbatim in content the attempt received from a source other than the model, the person or speccoder: where it came from, so the person can tell a planted command from the model’s own.
- Task
Decisions - One task’s decisions.
- Who
- Who decided, through what, and how speccoder knows the name.
Enums§
- Confirm
Answer - The person’s answer.
- Decision
- What a person decided.
- Scope
- How far an approval reaches.
- Verb
- What to do with a pending call.
Constants§
- FILE
- The decisions file in a project’s state directory.
Traits§
- Approver
- Asks a person, synchronously, while an attempt waits (a terminal prompt in the CLI, a permission request in an editor). The answer is journaled; replay never asks again.
Functions§
- allow_
always AllowAlways: the waiting commandcalloftaskruns once and exactly its argv joins[commands] allow(or[sandbox] network_allowfor a network call). Only for a call that offered it; a call still waiting is decided here, one answered Always Allow inline in this process was decided there.- answered_
always - Records that the waiting call
callwas approved once by an Always Allow answer, here and now. - batch_
digest - SHA-256 over the sorted digests of the calls listed
(
speccoder_core::PendingCall::digest): each binds its id and its object, so a lane’s newer attempt stopped on another object changes it. - batches
- The runs whose asking budget is used, each with every call of it that waits (its lanes’ included), by class.
- call_
digest speccoder_core::PendingCall::digest: SHA-256 over the call’s id and the object a decision covers, as recorded.- claim
- A model’s text, one line, at most 200 characters, control characters escaped: what it claimed in the turn that asked.
- decide
decide_within the default state directory.- decide_
batch DecideBatch: decides the listed calls of a run’s batch, each once — never for the task or the run — recorded per call with who decided and through what; refused when the list changed since the person saw it.- decide_
in decide_withinstate, if there is one.- decide_
with approvals,approve --taskandreject --task --reasonagainststate, decided throughvia.- expire_
due - Denies, as expired, every call in the journal at
dirwhose deadline passed atnow(nobody’s decision); their attempts read the refusal when they next resume. The path a journal this build could not read was moved aside to, if it was. - kind_of
- The kind of call, from the call alone (it is part of the journaled
question, so it never depends on the worktree):
write(write_file),edit(edit_file),run,network(a command asking for the network) ormcp. Whether a write replaces a file is the presentation’s to say. - list
list_within the default state directory.- list_
with approvalsagainststate: the calls waiting and the decisions made.- object_
view - The object as reports show it.
- offered_
grants offered_objectsas the sheet shows them.- offered_
objects - The object-bound grants a person approved earlier for this feature’s tasks — distinct, by grant id, in the order first decided — with the objects themselves: what an autopilot run may be given.
- options
- The choices offered, in the fixed order
once, task, run, always, reject, stop. Remembered options (task,run,always) only for a call with a resolved object whose arguments were not copied from content the attempt read (derived); “for this run” never for high risk; “always” only for a command (run,network) whose argv is not high risk without the network (always_risk: an exact allow-list entry is committed, reviewed policy). - risk
- The risk tier of a call that needs approval, from the policy’s reason.
- waiting_
elsewhere Elsewherefor a run oftask, read through the journal’s writer: one a killed run left unclosed is repaired, not taken for one where nothing waits.- who
- The local person’s name, the same for every decision and attestation:
git’s
user.name(what their commits say), else the operating-system user, elseunknown— never a guess. - who_in
who, reading git’s configuration as it applies indir.- withdraw_
waiting - Withdraws every call of
featurewaiting on a person: their attempts were set aside (--return, changed intent), so nothing resumes them. Listed and withdrawn through the journal’s writer.