Resolve permission requests through the API #139

Closed
opened 2026-09-03 10:36:22 +01:00 by naps62-yolo · 0 comments
Collaborator

session/request_permission from the adapter becomes an approval row and a
pending entry in the reduced state; the turn blocks until someone answers.

POST /api/sessions/:id/structured/approvals/:nonce takes the outcome
(allow once / allow for session / deny) and resolves the ACP request. The nonce is
generated by the daemon, single-use, and never sent to the agent — a compromised
agent must not be able to synthesise its own approval.

Resolving an already-resolved approval clears the row quietly rather than erroring:
two clients are attached to the same session and both may answer.

An approval that is pending when the daemon dies is gone with the turn. The event
log records that it was requested and never answered, so reopening the session
shows what happened instead of a permanently pending card.

Depends on: #138

`session/request_permission` from the adapter becomes an `approval` row and a pending entry in the reduced state; the turn blocks until someone answers. `POST /api/sessions/:id/structured/approvals/:nonce` takes the outcome (allow once / allow for session / deny) and resolves the ACP request. The nonce is generated by the daemon, single-use, and **never sent to the agent** — a compromised agent must not be able to synthesise its own approval. Resolving an already-resolved approval clears the row quietly rather than erroring: two clients are attached to the same session and both may answer. An approval that is pending when the daemon dies is gone with the turn. The event log records that it was requested and never answered, so reopening the session shows what happened instead of a permanently pending card. Depends on: #138
naps62-yolo added this to the Structured view milestone 2026-09-03 10:36:22 +01:00
naps62-yolo added the area/protocolarea/daemondifficulty/mediumtype/feat labels 2026-09-03 10:36:22 +01:00
naps62-yolo added a new dependency 2026-09-03 10:36:29 +01:00
naps62-yolo added a new dependency 2026-09-03 10:36:29 +01:00
naps62-yolo added a new dependency 2026-09-03 10:36:29 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#139