docs(rfd): client-owned fs/apply_patch#808
Open
leovigna wants to merge 1 commit intoagentclientprotocol:mainfrom
Open
docs(rfd): client-owned fs/apply_patch#808leovigna wants to merge 1 commit intoagentclientprotocol:mainfrom
leovigna wants to merge 1 commit intoagentclientprotocol:mainfrom
Conversation
Add an initial RFD draft for a client-owned patch-application capability under the filesystem surface. The proposal introduces fs/apply_patch as a client capability-backed mutation method for applying structured multi-file edits against the client’s current editor-backed document state, including unsaved buffers. The draft explicitly distinguishes ACP tool-call diff content from client-owned mutation APIs, recommends a boolean fs.applyPatch capability to stay aligned with the existing filesystem capability model, and frames patch application as client-owned so editors can preserve undo/redo, diagnostics, formatting, save lifecycle, and conflict handling. It also proposes starting from the publicly documented V4A-style apply_patch grammar used in Codex-style workflows as the initial default format, while profiling it for ACP semantics such as absolute paths and live-buffer application rather than direct disk mutation. The RFD includes a first-pass method sketch, failure and atomicity discussion, and a set of open questions for follow-up iteration.
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.
Summary
This adds an initial RFD draft for a client-owned
fs/apply_patchcapability.The draft proposes:
clientCapabilities.fs.applyPatchfs/apply_patchdiffcontent as presentation/reporting, not as a mutation APIapply_patchenvelope as the initial default format, profiled for ACP semantics such as absolute pathsWhy
ACP already has client-owned file access via
fs/read_text_fileandfs/write_text_file, but it does not yet have a client-owned mutation method for structured patch-style edits against current buffer state.That gap matters for coding agents that want precise multi-file edits without falling back to whole-file overwrite.
Open questions
The draft calls out a few areas to iterate on next:
patchfield should stay a string envelope or become a richer objectThis is intended as an early draft for discussion rather than a finalized wire shape.