Skip to main content

Module approvals

Module approvals 

Source
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 class — the path of a write, the exact argv of a command — into an approval for the task; 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.

Re-exports§

pub use present::PresentContext;
pub use present::Presentation;
pub use present::present;

Modules§

present
What a person sees when a call needs them: built live from the journaled Request and 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), the approvals listing 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).
Choice
Which waiting calls to decide, and how (approve/reject options).
Decided
One decision, as it was made.
Decisions
All decisions, by feature/task.
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).
TaskDecisions
One task’s decisions.
Who
Who decided, through what, and how speccoder knows the name.

Enums§

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§

claim
A model’s text, one line, at most 200 characters, control characters escaped: what it claimed in the turn that asked.
decide
decide_with in the default state directory.
decide_with
approvals, approve --task and reject --task --reason against state.
expire_due
Denies, as expired, every call in the journal at dir whose deadline passed at now (nobody’s decision); their attempts read the refusal when they next resume.
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) or mcp. Whether a write replaces a file is the presentation’s to say.
options
The choices offered: “for this run” never for high risk; neither “task” nor “run” when the class is not shown in full.
risk
The risk tier of a call that needs approval, from the policy’s reason.
waiting_elsewhere
Another task of 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.
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, else unknown — never a guess.
who_in
who, reading git’s configuration as it applies in dir.
withdraw_waiting
Withdraws every call of feature waiting on a person: their attempts were set aside (--return, changed intent), so nothing resumes them.