Files
HomerandClaude Opus 5.5 253ef4a8a0 Harness spec 3.0.0-draft: where each tool is offered; the chat's tools
Every tool says its `sessions` (chat, agent or both). The file tools read, write,
edit, glob, grep and list are shared; mkdir, mv, rm, search, python and the forge
verbs (commit, branch, pr, merge, tag, release) are the chat's; show and recall
are new and shared. New fields: `requires` (page, display, forge) with the exact
`unavailable` answer, and `confirm: always` for merge, tag and release.
knowledge_*, notes_search, note_view and note_manage leave the chat. Default
rules for the new tools; modes.json says what `confirm` does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:52:24 +00:00

34 lines
1.5 KiB
JSON

{
"name": "apply_patch",
"scope": "cli",
"sessions": "agent",
"risk": "write",
"exclusive": false,
"block": "edit",
"purpose": "purpose",
"aliases": {
"cli": [],
"llembas": [
"file_edit"
]
},
"description": "Change files with a patch, in either of two formats.\n\nThe envelope:\n\n*** Begin Patch\n*** Add File: path/new.py\n+every line of the new file, each prefixed with +\n*** Update File: path/app.py\n*** Move to: path/main.py (optional rename)\n@@ def greet(): (optional: a line to find first)\n unchanged line\n-removed line\n+added line\n*** Delete File: path/old.txt\n*** End Patch\n\nOr a unified diff (as `git diff` writes it): `--- a/<file>` and `+++ b/<file>` lines, then hunks starting `@@ -old,count +new,count @@`. Without those two lines, name the file with `path`. The line numbers are only a hint; the context lines must match the file exactly.\n\n- Every changed hunk needs a few unchanged context lines (prefixed with a space) so it can be found.\n- New files: every line starts with + (a unified diff starts with --- /dev/null).\n- All files in one patch are applied, or none are.",
"parameters": {
"type": "object",
"properties": {
"patch": {
"type": "string",
"minLength": 1,
"description": "The whole patch: from *** Begin Patch to *** End Patch, or a unified diff"
},
"path": {
"type": "string",
"description": "A unified diff without ---/+++ lines: the file it changes"
}
},
"required": [
"patch"
]
}
}