fix: cancel_loose_end approval kind is root-agent-only, no own-approval carve-out

This commit is contained in:
damocles 2026-06-05 00:47:03 +02:00 committed by mara
commit 2fff9485b9

View file

@ -864,10 +864,9 @@ impl AgentServer {
`\"reminder\"`; `id` is the row id from the matching `get_loose_ends` entry \
or the `question_queued` reply you got when you submitted. Auth: you can only \
cancel rows where you're the asker / owner. Returns `ok` or an error string.\n\
Agents with the `approvals` tool group can also pass `kind: \"approval\"` to \
withdraw a pending approval they submitted (before the operator acts on it). \
The root agent (`ruth`) may cancel any approval; non-root agents are restricted \
to their own approvals and the server rejects `approval` kind otherwise."
`kind` may also be `\"approval\"` to withdraw a pending approval you submitted \
(before the operator acts on it) root agent (`ruth`) only; the server rejects \
`approval` kind for all other callers."
)]
async fn cancel_loose_end(&self, Parameters(args): Parameters<CancelLooseEndArgs>) -> String {
let log = format!("{args:?}");