From 4d49097e3b4cb799dbe77913dc876ebc730fe115 Mon Sep 17 00:00:00 2001 From: "Anna.Zhdan" Date: Mon, 2 Feb 2026 14:40:19 +0100 Subject: [PATCH 1/2] Added file-delete.mdx --- docs/rfds/file-delete.mdx | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/rfds/file-delete.mdx diff --git a/docs/rfds/file-delete.mdx b/docs/rfds/file-delete.mdx new file mode 100644 index 00000000..e8bc2f6f --- /dev/null +++ b/docs/rfds/file-delete.mdx @@ -0,0 +1,57 @@ +--- +title: "Diff event for the case of deleted file" +--- + +Author(s): [anna239](https://github.com/benbrandt) + +## Elevator pitch + +> What are you proposing to change? + +Add flag `deleted` to [Diff](https://agentclientprotocol.com/protocol/tool-calls#diffs) entity type for the case of a deleted file. + +## Status quo + +> How do things work today and what problems does this cause? Why would we change things? + +Currently, in Diff entity type `newText` is not nullable, so it's not possible to distinguish between a deleted file and empty file. + +## What we propose to do about it + +> What are you proposing to improve the situation? + +Add flag `deleted` to [Diff](https://agentclientprotocol.com/protocol/tool-calls#diffs) entity type for the case of a deleted file. + +Note: we would ideally make newText nullable, but that would break existing clients. + +## Shiny future + +> How will things will play out once this feature exists? + +It is possible for the agent to distinguish between a deleted file and an empty file. + +## Implementation details and plan + +> Tell me more about your implementation. What is your detailed implementation plan? + + + +## Frequently asked questions + +> What questions have arisen over the course of authoring this document or during subsequent discussions? + + + +### What alternative approaches did you consider, and why did you settle on this one? + +We considered making newText nullable, but that would break existing clients. + +## Revision history + + From c5f1dd700381097818d399030a76065d2e3ab822 Mon Sep 17 00:00:00 2001 From: "Anna.Zhdan" Date: Wed, 4 Feb 2026 09:40:26 +0100 Subject: [PATCH 2/2] add json example --- docs/rfds/file-delete.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/rfds/file-delete.mdx b/docs/rfds/file-delete.mdx index e8bc2f6f..efc76a91 100644 --- a/docs/rfds/file-delete.mdx +++ b/docs/rfds/file-delete.mdx @@ -22,6 +22,29 @@ Currently, in Diff entity type `newText` is not nullable, so it's not possible t Add flag `deleted` to [Diff](https://agentclientprotocol.com/protocol/tool-calls#diffs) entity type for the case of a deleted file. +**Current structure (cannot distinguish deleted file from empty file):** + +```json +{ + "type": "diff", + "path": "/home/user/project/src/config.json", + "oldText": "{\n \"debug\": false\n}", + "newText": "" +} +``` + +**Proposed structure with `deleted` flag:** + +```json +{ + "type": "diff", + "path": "/home/user/project/src/config.json", + "oldText": "{\n \"debug\": false\n}", + "newText": "", + "deleted": true +} +``` + Note: we would ideally make newText nullable, but that would break existing clients. ## Shiny future