Skip to content

feat(delegation): the owner answers delegated approval requests with tole - #746

Merged
ajianaz merged 1 commit into
developfrom
feat/approval-owner-cli
Nov 14, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/approval-owner-cli

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

Part 3 of #714: tole delegation approvals list|show|allow|deny, the owner's side of the approval queue, and an approvals section in tole audit <goal>. With the default [delegation] approvals = "off" no child creates a request, so nothing changes.

Why

Parts 1 and 2 let a delegated child park at a Write, but nothing could answer: every request expired to a denial. This gives the owner the surface to read a request and answer it, and the audit shows who decided what.

Changes

  • tole delegation approvals list [--all], show <ID>: read-only. Output is redacted through the process secret set, control characters dropped, capped, and the display and input preview are fenced as data (the fence grows past any run of ~ in the text). show gives the asking node and profile, the goal, the chain of levels with who can answer (and why a level is skipped), tool, target, workspace, flags, the fingerprint, age and time left.
  • allow <ID> and deny <ID>: append a Decide at the owner level (via: cli) bound to the request's fingerprint, under the lock. They refuse under an agent session (TOLE_UNDER_SESSION, TOLE_AGENT_DEPTH) before reading anything. Only a pending request is decided: unknown, expired, consumed, already decided and settled-node requests are refused with the reason. The child's one-shot consume still decides whether the call runs.
  • A mistaken allow is hard: the full id is required (no prefix, no pattern, no "all"), the request is shown and the id must be typed back; --yes skips only the typing; --fingerprint <HEX> (12+ chars) pins the content. deny asks nothing.
  • The owner can answer always-owner requests (secrets, external tools, oversized): those can only be decided here until agent levels exist.
  • tole audit <goal> (text and --json): the goal's requests, who decided at which level and via what, consumed or expired.
  • README, CHANGELOG, design note status.

Not in this PR: serve's /approvals (part 4), the agent tools (part 5).

Testing

  • 14 unit tests (approvals_owner_tests.rs): id validation, list, show (redaction incl. a quoted secret, fence, caps, chain), refusal under a session before any read, typed confirmation (wrong text, trimmed id), --yes, --fingerprint rules, deny, every refused state, owner-only requests, the audit section; a binary test in owner_only_e2e (both commands refuse under a session and write nothing, a terminal can read).
  • Mutation sweep: 36 mutations of the command and the audit section; the survivors of the first round were an equivalent redaction pass (removed) and gaps closed by new tests; all killed.
  • fmt, clippy --workspace --all-targets --all-features -D warnings, cargo test --workspace, tole-core and tole-cli with --no-default-features.

Refs #714

…tole

Part 3 of #714. Adds tole delegation approvals list|show|allow|deny.
list and show read the approvals log and print redacted, capped data
with the model-influenced text fenced. allow and deny append an owner
decision bound to the request's fingerprint, refuse under an agent
session before reading anything, and only decide a pending request: an
unknown, expired, consumed, already decided or settled one is refused
with its reason. allow needs the full request id, shows the request and
asks for the id typed back (--yes skips only the typing, --fingerprint
pins the content); deny asks nothing.

tole audit <goal> now lists the goal's approval requests with who
decided at which level and what became of each. Requests exist only
for children started with [delegation] approvals on, so nothing changes
with the default off.

Refs #714
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 23cf674 into develop Nov 14, 2026
21 checks passed
@ajianaz
ajianaz deleted the feat/approval-owner-cli branch November 20, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants