v0.41.0 — apply_patch multi-edit tool for venice code
Continues the #59 agent-toolset epic (kimi-k3 field feedback): edit_file fails on non-unique strings and can't batch edits — the #1 retry-loop for an LLM editing code.
apply_patch(confirm-gated) takes{patches: [{path, edits: [{old, new, occurrence?}, ...]}, ...]}and applies them atomically per file — all hunks validate + apply in-memory (in order), and the file writes only if every hunk succeeds, so no half-edited files.- Non-unique solved —
occurrence=N(1-based) picks which match to replace; without it a non-uniqueolderrors with a pointer tooccurrenceor more context. - Surgical errors — failures name file + hunk index + reason, so the model retries one hunk instead of the whole batch.
- Same sandbox + atomic write as the other coding tools; schema steers the model (
apply_patchfor multi-hunk/non-unique,edit_filefor a single unique change).
Closes #63. 549 tests green.