Repository navigation
feat(delegation): the owner answers delegated approval requests with tole - #746
Merged
Merged
Conversation
…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
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 3 of #714:
tole delegation approvals list|show|allow|deny, the owner's side of the approval queue, and an approvals section intole 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).showgives 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>anddeny <ID>: append aDecideat 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.allowis hard: the full id is required (no prefix, no pattern, no "all"), the request is shown and the id must be typed back;--yesskips only the typing;--fingerprint <HEX>(12+ chars) pins the content.denyasks nothing.tole audit <goal>(text and--json): the goal's requests, who decided at which level and via what, consumed or expired.Not in this PR: serve's
/approvals(part 4), the agent tools (part 5).Testing
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,--fingerprintrules, deny, every refused state, owner-only requests, the audit section; a binary test inowner_only_e2e(both commands refuse under a session and write nothing, a terminal can read).--workspace --all-targets --all-features -D warnings,cargo test --workspace,tole-coreandtole-cliwith--no-default-features.Refs #714