Publish committed file diffs over ACP - #495
Draft
haveanicedavid wants to merge 1 commit into
Draft
Conversation
|
Security review: https://vercel.slack.com/archives/C0BSEH6GB18/p1787897765901289 |
haveanicedavid
marked this pull request as ready for review
August 28, 2026 06:17
haveanicedavid
marked this pull request as draft
August 30, 2026 07:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
fx computes and retains an authoritative committed-file handoff containing the
canonical path, previous content, new content, and tool-call identity.
The ACP adapter currently discards that handoff:
publishCommittedFileHandoffreports the diff as skipped.edited README.md (5115 bytes).summaries.
A client cannot safely recover the missing information by parsing that prose,
watching the filesystem, or taking Git snapshots. Those approaches cannot
reliably attribute changes to a specific tool call and may include pre-existing
or concurrent edits.
ACP already defines structured
difftool-call content withpath,oldText,and
newText, so no protocol extension is needed.Change
Publish the existing committed-file handoff as an ACP
tool_call_updatecontaining:
nullfor a new fileThe subsequent completion update omits
content. ACP content updates replacethe collection when present, so omitting it preserves the previously published
diff while still advancing the tool status to
completed.This uses fx's existing source of truth and adds no filesystem polling,
snapshotting, or provider-specific client behavior.
Verification
zig buildzig fmt --check src/bun test acp.test.ts -t 'ACP publishes committed file changes as authoritative diffs'The end-to-end test drives the freshly built
fx acpbinary and verifies:Required label:
type: bug.