(chore) Approval resolutions are stored in two different shapes

Aperta
#7,292 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start with services/runner/src/engines/sandbox_agent/run-turn.ts at settleInBandInteractions, then read acp-interactions.ts and transcript.ts to trace how gateway approvals are written and read. Check the sessions interaction schema and its tests; done means all paths write the chosen resolution shape, readers handle existing rows, and the schema documents it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

tech debt

Approval resolutions are stored in two shapes. Gateway tool approvals store {"approved": true} or {"approved": false}. Other approval paths store {"verdict": "approved"} or {"verdict": "denied"} (with tool_call_id). Both end with status resolved.

Reproduction

  1. Approve and deny a gateway run_tool approval on an agent. Read the session interaction rows: resolution is {"approved": ...}.
  2. Approve and deny a built-in approval (for example Bash). resolution is {"verdict": ...}.

Seen in the v0.121.7 QA on staging.

Why it matters

Any reader of the audit history (inbox, reports, API clients) must handle both shapes. A new reader that checks only one will miss half of the decisions.

Pointers

The runner writes the {verdict} form in services/runner/src/engines/sandbox_agent/run-turn.ts:1052-1080 (settleInBandInteractions). The {approved} form is the in-band answer payload that the gateway gate reads back (see acp-interactions.ts:171 and transcript.ts:53). I did not trace the exact writer of the gateway row.

Proposed fix

Pick one shape ({verdict, tool_call_id} is the richer one), write it from every path, and have readers normalize the old rows. Document the shape in the sessions interaction schema.

Lingua principale
TypeScript
Stelle
4.8k
Fork
690
Merge medio
20h 11m
PR unite (30g)
448

Preparare l'ambiente

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 Agenta-AI/agenta

Tutte le issue di Agenta-AI/agenta

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.