feat(acp_client): settle a sandboxed agent's permission requests through the gate

Aperta
#1,279 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@LivXue ci sta già lavorando.

Dal 12/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Reserved for @LivXue: waiting for LivXue to resolve this. Please do not pick it up.

Summary

An external ACP agent's session/request_permission is answered by auto_approver in raven/acp_client/permissions.py: approve, unless the host's deny rules refuse the command. PR #1269 gives Raven's own agents the host's whole permission set and, where the platform supports it, the host's OpenShell sandbox. When such an agent runs sandboxed, its permission requests should be settled by the gate of the turn that owns the run (PermissionGate.authorize_runtime): ask asks the user, full approves, a deny rule refuses. This is the second half of decision D12, left out of PR #1269.

Ruled constraint

A subagent that does not run in a sandbox keeps auto-approving every request (OpenShell does not support Windows, among other cases). Only a sandboxed child changes.

What is missing

  • A route from an ACP session to the gate and responder of the turn that owns it. request_dispatcher answers every request on the pool's connection, outside the turn's task, so current_gate() is not bound there. Elicitations already have such a route, by sessionId: _SessionElicitors in raven/acp_client/pool.py, with identity-checked attach and detach. Permission requests have none.
  • A marker that a child runs sandboxed, recorded when its config is rendered (raven/config/product_render.py, inherit_host_permissions), so the dispatcher can tell the two cases apart.

Tests to have

  • A sandboxed child in ask mode prompts the user through the owning turn.
  • A sandboxed child in full mode is approved without a prompt.
  • A child that is not sandboxed never prompts, and still has a host-denied command rejected.
Lingua principale
Python
Stelle
4.1k
Fork
94
Merge medio
2g 7h
PR unite (30g)
216

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EverMind-AI/Raven

Tutte le issue di EverMind-AI/Raven

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.