Skip to content

feat: expose edit-and-resend and regenerate over v4 rewind commands - #409

Merged
william0wang merged 1 commit into
mainfrom
feat/acp-rewind-extensions
Nov 19, 2026
Merged

william0wang merged 1 commit into
mainfrom
feat/acp-rewind-extensions

Conversation

@william0wang

Copy link
Copy Markdown
Owner

What

Implements the ACP rewind extensions (spec + ADR-0012 in zcode-acp-app): message-level edit-and-resend and regenerate, mapped onto the v4 conversation commands editUserQuery / retryTurn that the desktop already uses.

Surface

  • session/edit_user_message {sessionId, messageId, newText} — rewrite the latest user message and resend
  • session/retry_turn {sessionId, messageId?} — regenerate the latest turn (omitted messageId = newest retryable row)
  • _meta.zcode.mid on every replayed user/agent/thought/tool_call update (session/load, session/load_earlier) — the stable handle clients address a rewind point with; additive, ignored by older clients
  • initialize advertises _meta.zcode.rewind: true on desktop bundles ≥ 3.14.3 (static version floor, fail-closed); absent on older setups, where the methods answer a clean rewind unavailable on this backend error

Notes

  • The v4 replacement turn has no bridge turn loop (upstream starts it from the command); a rewind claim in BackgroundTaskListener forwards its text + running state — clients see the ordinary session/update + $/zcode/turnState contract
  • CAS envelope (baseRevision + baseLogEpoch from the same rowsRange read), one stale retry, blocked-on-accepted converted to a clean error
  • Zero behavior change for clients that never call the new methods; full wire contract in docs/PROTOCOL.md + client recipe in docs/REMOTE-CLIENTS.md
  • 23 new tests (handlers, replay mid, capability flag, claim integration); full suite 1293 passed / 9 skipped; review pass fixed 2 Important findings (claim guard, token-guarded release)

@william0wang
william0wang merged commit 7b3ea56 into main Nov 19, 2026
2 checks passed
@william0wang
william0wang deleted the feat/acp-rewind-extensions branch November 19, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant