magi-code 0.63.4

Repository-aware CLI coding agent for terminal work
Documentation
### Hash Edit Tool
**Tool Name**: `hash_edit`
**Tool Description**: Apply hashline patches to existing files using tags from latest current-session `read` output.
**Tool Arguments**:
- `input`: required string. Full hashline patch text.

Format:
```text
[PATH#TAG]
OP ...
+body row
```
- Every section starts `[PATH#TAG]`; `TAG` is 4-hex tag from most recent `read` of that file.
- Use latest tag only. After any edit, use fresh tag from response or re-`read` before next edit.
- If stale-tag/mismatch/surprise: stop, `read` file again, retry with new tag.
- Use `read` default hashline output (`LINE:TEXT`) for anchors. Use `path:raw` only when you need plain text; raw reads do not provide hash_edit anchors.
- New files use `write`; existing-file edits use `hash_edit`.

Ops:
```text
SWAP N.=M:
+replacement line
SWAP.BLK N:
+replacement block
DEL N.=M
DEL.BLK N
INS.PRE N:
+insert before N
INS.POST N:
+insert after N
INS.BLK.POST N:
+insert after block starting N
INS.HEAD:
+insert at file start
INS.TAIL:
+insert at file end
MV DEST
REM
```
- `SWAP N.=N:` / `DEL N` for one line.
- Ranges use original line numbers from read; never shift numbers between hunks.
- `.BLK` anchors opening line of multi-line syntax block; use plain ops for single lines/closers.
- `MV` moves section file after line edits. `REM` removes whole file. Both have no body.

Body rows:
- Body appears only after ops ending `:`.
- Every body row is `+TEXT`; file receives literal `TEXT`.
- `+` alone inserts blank line.
- Literal content starting `+` or `-` still needs body prefix: `++value`, `+- item`.
- No `-old`, no context rows, no bare lines.
- Body is final content, not diff.

Examples:
```text
[src/app.rs#A1B2]
SWAP 10.=12:
+fn main() {
+    println!("ok");
+}
```

```text
[src/app.rs#A1B2]
INS.POST 20:
+    log::info!("done");
DEL 25.=27
```

```text
[src/lib.rs#C3D4]
SWAP.BLK 8:
+pub fn name() -> &'static str {
+    "magi-code"
+}
```

```text
[README.md#BEEF]
INS.TAIL:
+
+## Notes
+- keep tags fresh
```

```text
[src/old.rs#1234]
MV src/new.rs
```

```text
[target/tmp.txt#9ABC]
REM
```