Files
Tabula Myriad a9ae1a6778 feat: Triad development iteration complete
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.
2026-03-24 00:44:50 -04:00

1.5 KiB
Executable File

summary, read_when, title
summary read_when title
Apply multi-file patches with the apply_patch tool
You need structured file edits across multiple files
You want to document or debug patch-based edits
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 Patch and *** End Patch.

Notes

  • Patch paths support relative paths (from the workspace directory) and absolute paths.
  • tools.exec.applyPatch.workspaceOnly defaults to true (workspace-contained). Set it to false only if you intentionally want apply_patch to write/delete outside the workspace directory.
  • Use *** Move to: within an *** Update File: hunk to rename files.
  • *** End of File marks 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"
}