mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-21 23:55:22 -04:00
a9ae1a6778
Matrix Protocol: - docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS - src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation - docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local) MCP Server Integration: - docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs - docs/mcp-curiosity-mapping.md: Gap-to-capability mapping Node Sync Architecture: - src/services/node-sync-service.ts: WebSocket peer sync + presence detection - src/services/node-sync-service.test.ts: Unit tests - docs/node-sync-architecture.md: Architecture docs Triad Resilience: - scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity - docs/triad-resilience.md: Recovery procedures - .secure/deployment-logs/README.md: Schema v2 - skills/triad-heartbeat/SKILL.md: Corruption check integration NPM Publish Workflow: - scripts/npm-publish.mjs: version, changelog, validate, publish, rollback - .github/workflows/npm-publish.yml: GitHub Actions with provenance - docs/npm-publish-guide.md: Complete documentation All deliverables tested in Docker before production.
1.5 KiB
Executable File
1.5 KiB
Executable File
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Apply multi-file patches with the apply_patch tool |
|
apply_patch Tool |
apply_patch tool
Apply file changes using a structured patch format. This is ideal for multi-file
or multi-hunk edits where a single edit call would be brittle.
The tool accepts a single input string that wraps one or more file operations:
*** Begin Patch
*** Add File: path/to/file.txt
+line 1
+line 2
*** Update File: src/app.ts
@@
-old line
+new line
*** Delete File: obsolete.txt
*** End Patch
Parameters
input(required): Full patch contents including*** Begin Patchand*** End Patch.
Notes
- Patch paths support relative paths (from the workspace directory) and absolute paths.
tools.exec.applyPatch.workspaceOnlydefaults totrue(workspace-contained). Set it tofalseonly if you intentionally wantapply_patchto write/delete outside the workspace directory.- Use
*** Move to:within an*** Update File:hunk to rename files. *** End of Filemarks an EOF-only insert when needed.- Experimental and disabled by default. Enable with
tools.exec.applyPatch.enabled. - OpenAI-only (including OpenAI Codex). Optionally gate by model via
tools.exec.applyPatch.allowModels. - Config is only under
tools.exec.
Example
{
"tool": "apply_patch",
"input": "*** Begin Patch\n*** Update File: src/index.ts\n@@\n-const foo = 1\n+const foo = 2\n*** End Patch"
}