v0.42.0
v0.42.0: leaner tool output and configurable backups
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.
Leaner navigation and search output
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.
aft_zoomon 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 shapeaft_outlinegives 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.aft_searchexpands 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.aft_callgraphcollapses standard-library noise. Incall_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. PassincludeUnresolved=trueto see every edge individually.aft_zoomcall lists are deduplicated.calls_out/called_bynow list each callee once with a count, instead of repeating a line per call site.- Ambiguous name zooms return candidate signatures to choose from, instead of an error.
- Generated documentation trees are down-ranked in search. Committed jazzy/javadoc/sphinx output (
.html/.css/.jsonartifacts) no longer crowds real source out ofaft_search's top results.grepstays exhaustive and unchanged; hand-written docs are unaffected. aft_searchinvites natural-language questions for conceptual queries (its semantic lane is tuned for intent), and hides test files by default.
Configurable backups behind undo
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:
- New settings:
backup.enabled(defaulttrue),backup.max_depth(default20), andbackup.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. - 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.
- Rollback safety is preserved. Internal transactional rollback for failed multi-file refactors and renames stays active regardless of the
backup.enabledsetting.
Search ranking
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.
Fixes
- Editing Rust code containing
&raw(a variable namedrawpassed by reference, e.g.handle(&raw)) no longer fails validation and silently rolls back. Bumpedtree-sitter-rustand several other grammars to current releases. - Editing files whose paths contain
[brackets]or{braces}— e.g. Next.js dynamic routes likeapp/[id]/page.tsx— now resolves the literal path first instead of treating it as a glob pattern. Thanks to @tobwen. - Dependency bumps:
zod,@opencode-ai/*, the Pi SDK, and@clack/prompts.
Under the hood
- 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.