bfb2dca7deca6c747eaeb8b4bb42d1c71e0b2057
Direct port of ~/repos/opencode/packages/opencode/src/tool/edit.ts: the 9-stage replacer chain (Simple, LineTrimmed, BlockAnchor, WhitespaceNormalized, IndentationFlexible, EscapeNormalized, TrimmedBoundary, ContextAware, MultiOccurrence), Levenshtein-based block-anchor similarity, and the disproportionate-match guard that hard-stops rather than falling through to the next candidate. Also ports edit.test.ts's scenarios: new-file creation, BOM preservation, CRLF handling, replaceAll, directory/not-found/identical errors, loose block-anchor rejection, and concurrent edits to the same file serializing through a per-path tokio::Mutex without losing either change. 99 tests passing across the workspace, clippy clean. This lands the last of the six M1 built-in tools (read/write/edit/bash/glob/grep).
ai-harness
A terminal AI coding harness in Rust — ratatui TUI, GitHub Copilot / OpenAI / Anthropic providers, and fully config-driven multi-agent orchestration inspired by opencode and oh-my-opencode-slim.
Status: design phase. The full design lives in docs/.
Languages
Rust
100%