Commit d681857
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
File tree
- .claude-plugin
- agents
- src
- ast-index
- core
- handlers
- server
- tests
- ast-index
- handlers
- hooks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
8 | 36 | | |
9 | 37 | | |
10 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments