feat(api): GET /api/agent/proposals/{id} — read a proposed agent write #342
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#342
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The built-in agent's write tools never mutate — they persist a
ProposedChange(summary + structured diff + safe/destructive classification) as anagent_proposalsrow, and the conversation'sawaiting_confirmationpause (and the persisted assistant message) carry only theproposalId. There is currently no way to read that proposal back, so a client can't render what's about to change before committing/rejecting it. The commit/reject endpoints (#51) exist; the read side is the missing piece.This blocks the chat-UI confirmation card (epic #47: "the PWA renders a diff and applies on confirm") and is also what an MCP client would use to show a confirmation prompt. API-first: land the endpoint before the
@carol/api-clienthooks + chat UI consume it.Scope
GET /api/agent/proposals/{id}— returns aProposalDto:proposalId,action(safe_create|safe_update|destructive_update|destructive_delete),tool,entity{type,id},summary,diff,status,createdAt,expiresAt. The original toolinputstays server-side (apply-time replay detail).pendingproposal past its expiry reads asexpired, computed read-only (a GET must not mutate; the commit path keeps its lazyexpiredpersist).openapi.json).Out of scope
@carol/api-clienthook for this endpoint (lands with the conversation hooks).Part of epic #47; unblocks the chat-UI confirmation flow.