|
| 1 | +# v0.42.0: leaner tool output and configurable backups |
| 2 | + |
| 3 | +This release focuses on the cost of every tool call — how much context AFT's navigation and search tools spend to answer a question — and adds configurable file backups behind undo. The output changes were measured against an external head-to-head benchmark suite and cut AFT's per-task tool-context cost substantially at unchanged answer quality. |
| 4 | + |
| 5 | +## Leaner navigation and search output |
| 6 | + |
| 7 | +The navigation and search tools were dumping more than the agent needed: a whole class body when only a menu of its methods was wanted, every standard-library call in a call tree, the same callee repeated once per call site. This release trims each of these to what's actually useful, with no loss of information. |
| 8 | + |
| 9 | +- **`aft_zoom` on a large container returns a member menu, not the whole body.** Zooming a class, struct, impl, trait, or enum larger than ~150 lines now returns its members listed with their signatures and line ranges — the same shape `aft_outline` gives a file — instead of the entire body. Zooming a specific method still returns its full body; a small container is still returned whole. This stops one zoom of a large class from spending tens of thousands of characters the agent then bypasses to zoom the method it actually wanted. |
| 10 | +- **`aft_search` expands only the top match, within a budget.** The top result is shown as full symbol source (so it can be edited without a re-read); ranks 2-3 are short previews; the rest are headers only. If the top match is itself a large symbol, it is rendered within a budget — a member menu for a big container, a head slice for a big function — rather than dumped whole. |
| 11 | +- **`aft_callgraph` collapses standard-library noise.** In `call_tree`, unresolved external/stdlib calls (`len`, `Some`, `clone`, …) are folded into one summary line per caller instead of one line each. These made up over half of call-graph output and can't be navigated anyway. Resolved, project-internal edges are unchanged. Pass `includeUnresolved=true` to see every edge individually. |
| 12 | +- **`aft_zoom` call lists are deduplicated.** `calls_out` / `called_by` now list each callee once with a count, instead of repeating a line per call site. |
| 13 | +- **Ambiguous name zooms return candidate signatures** to choose from, instead of an error. |
| 14 | +- **Generated documentation trees are down-ranked in search.** Committed jazzy/javadoc/sphinx output (`.html`/`.css`/`.json` artifacts) no longer crowds real source out of `aft_search`'s top results. `grep` stays exhaustive and unchanged; hand-written docs are unaffected. |
| 15 | +- **`aft_search` invites natural-language questions** for conceptual queries (its semantic lane is tuned for intent), and hides test files by default. |
| 16 | + |
| 17 | +## Configurable backups behind undo |
| 18 | + |
| 19 | +`aft_safety`'s undo is backed by per-file snapshots on disk. This release makes that configurable and removes write amplification from the edit hot path: |
| 20 | + |
| 21 | +- **New settings:** `backup.enabled` (default `true`), `backup.max_depth` (default `20`), and `backup.max_file_size` — control whether backups are kept, how deep the per-file history goes, and a size ceiling above which a file isn't snapshotted. |
| 22 | +- **Faster edits.** Each edit now appends a single backup file instead of rewriting the entire backup stack, so backup cost no longer grows with history depth. |
| 23 | +- **Rollback safety is preserved.** Internal transactional rollback for failed multi-file refactors and renames stays active regardless of the `backup.enabled` setting. |
| 24 | + |
| 25 | +## Search ranking |
| 26 | + |
| 27 | +Semantic search adds ranking priors that lift exact-name definitions and "type + concept" matches, improving retrieval on identifier and concept queries without changing the index format or requiring a re-index. |
| 28 | + |
| 29 | +## Fixes |
| 30 | + |
| 31 | +- **Editing Rust code containing `&raw`** (a variable named `raw` passed by reference, e.g. `handle(&raw)`) no longer fails validation and silently rolls back. Bumped `tree-sitter-rust` and several other grammars to current releases. |
| 32 | +- **Editing files whose paths contain `[brackets]` or `{braces}`** — e.g. Next.js dynamic routes like `app/[id]/page.tsx` — now resolves the literal path first instead of treating it as a glob pattern. Thanks to **tobwen**. |
| 33 | +- Dependency bumps: `zod`, `@opencode-ai/*`, the Pi SDK, and `@clack/prompts`. |
| 34 | + |
| 35 | +## Under the hood |
| 36 | + |
| 37 | +- Lower peak memory and CPU during indexing: cold semantic builds and the Tier-2 code-health scan are serialized so they don't pile onto the same cores at once. |
0 commit comments