Skip to content

Commit d681857

Browse files
Shahinyanmshahinyanmclaude
authored
feat: v0.47.0 — explore tool + ast-index 3.48.1 + rebuild resilience (#55)
* feat: v0.47.0 — `explore` tool + ast-index 3.48.1 + rebuild resilience Leverage ast-index 3.48 in token-pilot: - feat(explore): new MCP tool `explore` — one-shot ranked context. Wraps ast-index's `explore --rwr`: ranked symbols + top-file source heads + graph neighbours (callers/subclasses = blast radius via RWR) + related tests, in one compact block. Replaces find_usages → read_symbol → call_tree chaining. Graph on by default; degrades with a clear "requires ast-index >= 3.48" note on an older binary. Client method + types + handler + server registration + tests. - chore(deps): bump @ast-index/cli ^3.44 → ^3.48.1 (TS-indexing fix, rebuild swap-and-restore, memory caps, FUSE-safe canonicalize). npm audit still 0. - fix(buildIndex): trust the binary's swap-and-restore — on rebuild failure use the preserved index instead of throwing and falling back to raw reads. Lock and generic recovery paths unified. Deferred: --local / subtree scoping (multi-repo/worktree) needs a rooting rework. Full suite: +5 new tests; 23 failures unchanged (pre-existing env-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: repair stale statusline assertions + harden install-test env isolation Pre-existing CI breakage surfaced while landing 0.47.0 (master CI has been red since the "label savings + efficiency %" badge change): - statusline.test.ts: badge now renders `· saved <N>` (labelled) plus an efficiency `%` for tool-call-backed totals. Updated the 8 stale regexes to match the current format; EFF-bearing cases assert ` \d+%`. - installer.test.ts / index.test.ts: installHook branches on CLAUDE_PLUGIN_ROOT. When another test sharing the vitest worker leaks that env var, the standalone-install assertions failed (sharding-dependent). beforeEach now neutralises it and afterEach restores — deterministic regardless of file-to-worker distribution. No production code change. The 2 git-root tests that flake under parallel load (real `git` subprocess, 3s timeout) are unrelated and pre-existing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: shahinyanm <mher.shahinyan@12go.asia> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5cc9905 commit d681857

43 files changed

Lines changed: 747 additions & 80 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": "Token Pilot — save 60-90% tokens when AI reads code",
9-
"version": "0.46.1"
9+
"version": "0.47.0"
1010
},
1111
"plugins": [
1212
{
1313
"name": "token-pilot",
1414
"source": "./",
15-
"description": "Reduces token consumption by 60-90% via AST-aware lazy file reading, structural symbol navigation, and cross-session tool-usage analytics. 23 MCP tools + 25 subagents + budget watchdog hooks.",
16-
"version": "0.46.1",
15+
"description": "Reduces token consumption by 60-90% via AST-aware lazy file reading, structural symbol navigation, and cross-session tool-usage analytics. 24 MCP tools + 25 subagents + budget watchdog hooks.",
16+
"version": "0.47.0",
1717
"author": {
1818
"name": "Digital-Threads"
1919
},

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "token-pilot",
3-
"version": "0.46.1",
3+
"version": "0.47.0",
44
"description": "Saves 60-90% tokens on AI code reading. AST-aware lazy reads, symbol navigation, find_usages, structural git diff/log, edit-safety guard, Task-routing matcher, cross-session telemetry (errors + diagnostics), 25 tp-* subagents tiered to haiku/sonnet/opus with budget watchdog.",
55
"author": {
66
"name": "Digital-Threads",

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@ All notable changes to Token Pilot will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.47.0] - 2026-06-24
9+
10+
### Added — `explore` tool: one-shot ranked context + graph blast-radius
11+
12+
New MCP tool **`explore`** wraps ast-index 3.48's `explore` command: for a query
13+
it returns ranked relevant symbols, the source heads of the top files, **graph
14+
neighbours (callers + subclasses — the blast radius, via RWR over the
15+
call/inheritance graph)**, and related test files — in a single compact block.
16+
Replaces the common `find_usages``read_symbol``call_tree` chain with one
17+
call. `graph` defaults on; `max_files` caps the source heads. Falls back to a
18+
clear "requires ast-index >= 3.48" message when an older binary is resolved.
19+
20+
### Changed — bump `@ast-index/cli` to 3.48.1
21+
22+
Picks up the upstream TypeScript-indexing fix, the rebuild **swap-and-restore**
23+
guard (a failed rebuild no longer wipes the index), memory caps, and FUSE-safe
24+
canonicalisation. `npm audit` stays at 0 vulnerabilities.
25+
26+
### Changed — `buildIndex` trusts swap-and-restore
27+
28+
When a rebuild fails, `buildIndex` now checks for the index the binary preserved
29+
and uses it (instead of throwing and falling back to raw reads). The lock-case
30+
and generic-failure recovery paths are unified.
31+
32+
_Deferred:_ `--local` / subtree query scoping (to re-enable ast-index on
33+
multi-repo / worktree parents instead of disabling it) needs a rooting-model
34+
rework and ships separately.
35+
836
## [0.46.1] - 2026-06-18
937

1038
### Fixed — node:test (`node --test`) TAP output parsing

agents/tp-api-surface-tracker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tools:
99
- mcp__token-pilot__read_symbol
1010
- Bash
1111
model: haiku
12-
token_pilot_version: "0.46.1"
12+
token_pilot_version: "0.47.0"
1313
token_pilot_body_hash: dd184501203fa7f3c73f419c4ffbe33c4be75400cb64a7a51733a3fe23f6e085
1414
requiredMcpServers:
1515
- "token-pilot"

agents/tp-audit-scanner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tools:
1111
- Grep
1212
- Read
1313
model: sonnet
14-
token_pilot_version: "0.46.1"
14+
token_pilot_version: "0.47.0"
1515
token_pilot_body_hash: d172f600bf32277ea6eb4cbbee4542ddd698a986dcd96997d33930561964569b
1616
requiredMcpServers:
1717
- "token-pilot"

agents/tp-commit-writer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tools:
88
- mcp__token-pilot__test_summary
99
- mcp__token-pilot__outline
1010
- Bash
11-
token_pilot_version: "0.46.1"
11+
token_pilot_version: "0.47.0"
1212
token_pilot_body_hash: de64a406b5176de19f7422619c7de7949b1f28865f225402c9cea9255f377428
1313
requiredMcpServers:
1414
- "token-pilot"

agents/tp-context-engineer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ tools:
1313
- Edit
1414
- Glob
1515
model: sonnet
16-
token_pilot_version: "0.46.1"
16+
token_pilot_version: "0.47.0"
1717
token_pilot_body_hash: 68b32af2dacd82ebe52c4eec93edb903d452688274c3065218270627c564d8b0
1818
requiredMcpServers:
1919
- "token-pilot"

agents/tp-dead-code-finder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tools:
1111
- Grep
1212
- Read
1313
model: sonnet
14-
token_pilot_version: "0.46.1"
14+
token_pilot_version: "0.47.0"
1515
token_pilot_body_hash: d9b7f5b7ae6f4ae21305c775361bcab097cc774370a6d976c093571d46d55021
1616
requiredMcpServers:
1717
- "token-pilot"

agents/tp-debugger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tools:
1212
- Read
1313
- Bash
1414
model: sonnet
15-
token_pilot_version: "0.46.1"
15+
token_pilot_version: "0.47.0"
1616
token_pilot_body_hash: 052413de8d92377edcde6ae5c823f5378db304baccfa29e8866467f42553a500
1717
requiredMcpServers:
1818
- "token-pilot"

agents/tp-dep-health.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tools:
99
- Bash
1010
- Read
1111
model: haiku
12-
token_pilot_version: "0.46.1"
12+
token_pilot_version: "0.47.0"
1313
token_pilot_body_hash: e14dc57493d816f8c2e017963e2ef5f66bea50fd0b805a80e8a0d97c968427e7
1414
requiredMcpServers:
1515
- "token-pilot"

0 commit comments

Comments
 (0)