token-pilot 0.47.0 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +20 -0
- package/agents/tp-api-surface-tracker.md +1 -1
- package/agents/tp-audit-scanner.md +1 -1
- package/agents/tp-commit-writer.md +1 -1
- package/agents/tp-context-engineer.md +1 -1
- package/agents/tp-dead-code-finder.md +1 -1
- package/agents/tp-debugger.md +1 -1
- package/agents/tp-dep-health.md +1 -1
- package/agents/tp-doc-writer.md +1 -1
- package/agents/tp-history-explorer.md +1 -1
- package/agents/tp-impact-analyzer.md +1 -1
- package/agents/tp-incident-timeline.md +1 -1
- package/agents/tp-incremental-builder.md +1 -1
- package/agents/tp-migration-scout.md +1 -1
- package/agents/tp-onboard.md +1 -1
- package/agents/tp-performance-profiler.md +1 -1
- package/agents/tp-pr-reviewer.md +1 -1
- package/agents/tp-refactor-planner.md +1 -1
- package/agents/tp-review-impact.md +1 -1
- package/agents/tp-run.md +1 -1
- package/agents/tp-session-restorer.md +1 -1
- package/agents/tp-ship-coordinator.md +1 -1
- package/agents/tp-spec-writer.md +1 -1
- package/agents/tp-test-coverage-gapper.md +1 -1
- package/agents/tp-test-triage.md +1 -1
- package/agents/tp-test-writer.md +1 -1
- package/dist/ast-index/client.d.ts +7 -0
- package/dist/ast-index/client.js +31 -8
- package/package.json +1 -1
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Token Pilot — save 60-90% tokens when AI reads code",
|
|
9
|
-
"version": "0.47.
|
|
9
|
+
"version": "0.47.1"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "token-pilot",
|
|
14
14
|
"source": "./",
|
|
15
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.
|
|
16
|
+
"version": "0.47.1",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Digital-Threads"
|
|
19
19
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"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.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Digital-Threads",
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to Token Pilot will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.47.1] - 2026-06-24
|
|
9
|
+
|
|
10
|
+
### Fixed — gate AST_INDEX_WALK_UP on the `.git` marker (nested-worktree escape)
|
|
11
|
+
|
|
12
|
+
`exec()` set `AST_INDEX_WALK_UP=1` unconditionally. The flag tells ast-index to
|
|
13
|
+
traverse past nested VCS markers and reuse a parent-level index — it exists for
|
|
14
|
+
bare monorepo subdirs (no `.git`, no local DB). But forcing it when `projectRoot`
|
|
15
|
+
is itself a git repo/worktree root let a worktree nested under the main repo
|
|
16
|
+
(`main-repo/.worktrees/feature`) walk up past its own `.git` and **escape to the
|
|
17
|
+
main repo's index, returning the wrong files**. Now the flag is set only when
|
|
18
|
+
`projectRoot` has no `.git` marker of its own (a `.git` dir or worktree gitlink
|
|
19
|
+
file both count). See `docs/adr/0002-ast-index-multi-root-scoping.md` — also
|
|
20
|
+
records the deferred `--local`/subtree plan for multi-repo parents.
|
|
21
|
+
|
|
22
|
+
### Fixed — deterministic CLI tests under parallel sharding
|
|
23
|
+
|
|
24
|
+
`index.test.ts` / `installer.test.ts` now neutralise `CLAUDE_PROJECT_DIR` and
|
|
25
|
+
`CLAUDE_PLUGIN_ROOT` in setup so the git-detection and install assertions don't
|
|
26
|
+
flake when another suite leaks those env vars into a shared vitest worker.
|
|
27
|
+
|
|
8
28
|
## [0.47.0] - 2026-06-24
|
|
9
29
|
|
|
10
30
|
### Added — `explore` tool: one-shot ranked context + graph blast-radius
|
|
@@ -9,7 +9,7 @@ tools:
|
|
|
9
9
|
- mcp__token-pilot__read_symbol
|
|
10
10
|
- Bash
|
|
11
11
|
model: haiku
|
|
12
|
-
token_pilot_version: "0.47.
|
|
12
|
+
token_pilot_version: "0.47.1"
|
|
13
13
|
token_pilot_body_hash: dd184501203fa7f3c73f419c4ffbe33c4be75400cb64a7a51733a3fe23f6e085
|
|
14
14
|
requiredMcpServers:
|
|
15
15
|
- "token-pilot"
|
|
@@ -8,7 +8,7 @@ tools:
|
|
|
8
8
|
- mcp__token-pilot__test_summary
|
|
9
9
|
- mcp__token-pilot__outline
|
|
10
10
|
- Bash
|
|
11
|
-
token_pilot_version: "0.47.
|
|
11
|
+
token_pilot_version: "0.47.1"
|
|
12
12
|
token_pilot_body_hash: de64a406b5176de19f7422619c7de7949b1f28865f225402c9cea9255f377428
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
package/agents/tp-debugger.md
CHANGED
package/agents/tp-dep-health.md
CHANGED
package/agents/tp-doc-writer.md
CHANGED
|
@@ -12,7 +12,7 @@ tools:
|
|
|
12
12
|
- mcp__token-pilot__read_symbols
|
|
13
13
|
- Read
|
|
14
14
|
model: sonnet
|
|
15
|
-
token_pilot_version: "0.47.
|
|
15
|
+
token_pilot_version: "0.47.1"
|
|
16
16
|
token_pilot_body_hash: 351a987e11eba63852f5431a16d8eb53104f4f689f82fdcc5a2bf4db948ba92f
|
|
17
17
|
requiredMcpServers:
|
|
18
18
|
- "token-pilot"
|
|
@@ -8,7 +8,7 @@ tools:
|
|
|
8
8
|
- mcp__token-pilot__read_symbol
|
|
9
9
|
- Bash
|
|
10
10
|
model: inherit
|
|
11
|
-
token_pilot_version: "0.47.
|
|
11
|
+
token_pilot_version: "0.47.1"
|
|
12
12
|
token_pilot_body_hash: de5722bfea374eaab096c1ae635c37879e7a91370ee3cd0532f4240be03c91eb
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
package/agents/tp-onboard.md
CHANGED
|
@@ -10,7 +10,7 @@ tools:
|
|
|
10
10
|
- mcp__token-pilot__smart_read
|
|
11
11
|
- mcp__token-pilot__smart_read_many
|
|
12
12
|
- mcp__token-pilot__read_section
|
|
13
|
-
token_pilot_version: "0.47.
|
|
13
|
+
token_pilot_version: "0.47.1"
|
|
14
14
|
token_pilot_body_hash: 832e95633fbc8e9b0c10f3e540a327d4be062fb4b3f17a6cce6be13f414e2927
|
|
15
15
|
requiredMcpServers:
|
|
16
16
|
- "token-pilot"
|
package/agents/tp-pr-reviewer.md
CHANGED
|
@@ -11,7 +11,7 @@ tools:
|
|
|
11
11
|
- mcp__token-pilot__read_for_edit
|
|
12
12
|
- Read
|
|
13
13
|
model: sonnet
|
|
14
|
-
token_pilot_version: "0.47.
|
|
14
|
+
token_pilot_version: "0.47.1"
|
|
15
15
|
token_pilot_body_hash: f83f50d05b4f70285ae7afed2b1a406fc436df56e61a0aedbfb31edc7f2b6e66
|
|
16
16
|
requiredMcpServers:
|
|
17
17
|
- "token-pilot"
|
|
@@ -8,7 +8,7 @@ tools:
|
|
|
8
8
|
- mcp__token-pilot__outline
|
|
9
9
|
- mcp__token-pilot__read_symbol
|
|
10
10
|
model: sonnet
|
|
11
|
-
token_pilot_version: "0.47.
|
|
11
|
+
token_pilot_version: "0.47.1"
|
|
12
12
|
token_pilot_body_hash: c5f6fc122c89e16e5cf774045f92169ee3468555320b898171ba13eca5323550
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
|
@@ -9,7 +9,7 @@ tools:
|
|
|
9
9
|
- mcp__token-pilot__module_info
|
|
10
10
|
- Bash
|
|
11
11
|
model: sonnet
|
|
12
|
-
token_pilot_version: "0.47.
|
|
12
|
+
token_pilot_version: "0.47.1"
|
|
13
13
|
token_pilot_body_hash: 8ef3c3341cbfed4eb8dd130126a9683edc57e378c92ff0ca764d584fd941c55c
|
|
14
14
|
requiredMcpServers:
|
|
15
15
|
- "token-pilot"
|
package/agents/tp-run.md
CHANGED
package/agents/tp-spec-writer.md
CHANGED
|
@@ -10,7 +10,7 @@ tools:
|
|
|
10
10
|
- mcp__token-pilot__test_summary
|
|
11
11
|
- Glob
|
|
12
12
|
- Grep
|
|
13
|
-
token_pilot_version: "0.47.
|
|
13
|
+
token_pilot_version: "0.47.1"
|
|
14
14
|
token_pilot_body_hash: be81eed53a3720d146cf89e4a14a7a56577633f7c84c234c412ab70d64c05b11
|
|
15
15
|
requiredMcpServers:
|
|
16
16
|
- "token-pilot"
|
package/agents/tp-test-triage.md
CHANGED
|
@@ -8,7 +8,7 @@ tools:
|
|
|
8
8
|
- mcp__token-pilot__find_usages
|
|
9
9
|
- mcp__token-pilot__read_symbol
|
|
10
10
|
model: sonnet
|
|
11
|
-
token_pilot_version: "0.47.
|
|
11
|
+
token_pilot_version: "0.47.1"
|
|
12
12
|
token_pilot_body_hash: 362ecf4cb03b059421ea26933473700900073dc38b3a7fe271208dfb1ae14f90
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
package/agents/tp-test-writer.md
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { FileStructure } from "../types.js";
|
|
2
2
|
import type { AstIndexSymbolDetail, AstIndexSearchResult, AstIndexUsageResult, AstIndexImplementation, AstIndexHierarchyNode, AstIndexRefsResponse, AstIndexMapResponse, AstIndexConventionsResponse, AstIndexCallerEntry, AstIndexCallTreeNode, AstIndexChangedEntry, AstIndexUnusedSymbol, AstIndexImportEntry, AstIndexAgrepMatch, AstIndexTodoEntry, AstIndexDeprecatedEntry, AstIndexAnnotationEntry, AstIndexModuleEntry, AstIndexModuleDep, AstIndexUnusedDep, AstIndexModuleApi, AstIndexExploreResult } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* True when `projectRoot` is itself a git repo or worktree root. A `.git`
|
|
5
|
+
* entry counts whether it's a directory (normal repo) or a file (worktree /
|
|
6
|
+
* submodule gitlink). Used to gate AST_INDEX_WALK_UP — see exec().
|
|
7
|
+
*/
|
|
8
|
+
export declare function computeHasGitMarker(projectRoot: string): boolean;
|
|
3
9
|
export declare class AstIndexClient {
|
|
4
10
|
private static readonly MAX_INDEX_FILES;
|
|
5
11
|
private binaryPath;
|
|
6
12
|
private projectRoot;
|
|
13
|
+
private hasGitMarker;
|
|
7
14
|
private indexed;
|
|
8
15
|
private indexOversized;
|
|
9
16
|
private indexDisabled;
|
package/dist/ast-index/client.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
2
4
|
import { promisify } from "node:util";
|
|
3
5
|
import { findBinary, installBinary } from "./binary-manager.js";
|
|
4
6
|
import { parseFileCount, parseOutlineText, parseImportsText, parseImplementationsText, parseHierarchyText, parseAgrepText, parseTodoText, parseDeprecatedText, parseAnnotationsText, parseModuleListText, parseModuleDepText, parseUnusedDepsText, parseModuleApiText, } from "./parser.js";
|
|
@@ -8,10 +10,21 @@ import { parsePythonRegex } from "./regex-parser-python.js";
|
|
|
8
10
|
const TS_JS_EXTENSIONS = new Set(["ts", "tsx", "js", "jsx", "mjs", "cjs"]);
|
|
9
11
|
const PYTHON_EXTENSIONS = new Set(["py", "pyw"]);
|
|
10
12
|
const execFileAsync = promisify(execFile);
|
|
13
|
+
/**
|
|
14
|
+
* True when `projectRoot` is itself a git repo or worktree root. A `.git`
|
|
15
|
+
* entry counts whether it's a directory (normal repo) or a file (worktree /
|
|
16
|
+
* submodule gitlink). Used to gate AST_INDEX_WALK_UP — see exec().
|
|
17
|
+
*/
|
|
18
|
+
export function computeHasGitMarker(projectRoot) {
|
|
19
|
+
return existsSync(resolve(projectRoot, ".git"));
|
|
20
|
+
}
|
|
11
21
|
export class AstIndexClient {
|
|
12
22
|
static MAX_INDEX_FILES = 50_000;
|
|
13
23
|
binaryPath = null;
|
|
14
24
|
projectRoot;
|
|
25
|
+
// True when projectRoot is itself a git repo/worktree root (has a `.git`
|
|
26
|
+
// marker). Gates AST_INDEX_WALK_UP in exec() — see the comment there.
|
|
27
|
+
hasGitMarker;
|
|
15
28
|
indexed = false;
|
|
16
29
|
indexOversized = false;
|
|
17
30
|
indexDisabled = false;
|
|
@@ -26,6 +39,7 @@ export class AstIndexClient {
|
|
|
26
39
|
periodicUpdateInFlight = false;
|
|
27
40
|
constructor(projectRoot, timeout = 5000, options) {
|
|
28
41
|
this.projectRoot = projectRoot;
|
|
42
|
+
this.hasGitMarker = computeHasGitMarker(projectRoot);
|
|
29
43
|
this.timeout = timeout;
|
|
30
44
|
this.configBinaryPath = options?.binaryPath ?? null;
|
|
31
45
|
this.autoInstall = options?.autoInstall ?? true;
|
|
@@ -846,6 +860,7 @@ export class AstIndexClient {
|
|
|
846
860
|
}
|
|
847
861
|
updateProjectRoot(newRoot) {
|
|
848
862
|
this.projectRoot = newRoot;
|
|
863
|
+
this.hasGitMarker = computeHasGitMarker(newRoot);
|
|
849
864
|
this.indexed = false;
|
|
850
865
|
}
|
|
851
866
|
async exec(args, timeoutMs) {
|
|
@@ -871,14 +886,22 @@ export class AstIndexClient {
|
|
|
871
886
|
// ast-index v3.39+ honours AST_INDEX_WALK_UP=1 — read-commands then
|
|
872
887
|
// traverse past nested VCS markers (submodule .git, inner Cargo.toml,
|
|
873
888
|
// nested settings.gradle) to reuse a parent-level index if one exists.
|
|
874
|
-
//
|
|
875
|
-
//
|
|
876
|
-
//
|
|
877
|
-
//
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
889
|
+
// We only want this for a BARE SUBDIR that has no VCS marker of its own
|
|
890
|
+
// and no local DB — without walk-up, `search`/`outline` from a monorepo
|
|
891
|
+
// subdir stops at the nearest marker and finds nothing.
|
|
892
|
+
//
|
|
893
|
+
// We must NOT force it when projectRoot is itself a git repo/worktree
|
|
894
|
+
// root: a git worktree nested under the main repo (e.g.
|
|
895
|
+
// `main-repo/.worktrees/feature`) would walk up past its own `.git`
|
|
896
|
+
// marker and escape to the MAIN repo's parent index, returning the
|
|
897
|
+
// wrong files. Repo/worktree roots already own their index, so walk-up
|
|
898
|
+
// is at best a no-op and at worst that escape bug — skip it. When the
|
|
899
|
+
// user set AST_INDEX_WALK_UP themselves and a marker is present, we
|
|
900
|
+
// leave their value untouched (we only refrain from forcing it).
|
|
901
|
+
const env = { ...process.env };
|
|
902
|
+
if (!this.hasGitMarker) {
|
|
903
|
+
env.AST_INDEX_WALK_UP = "1";
|
|
904
|
+
}
|
|
882
905
|
if (this.astGrepBinDir) {
|
|
883
906
|
env.PATH = `${this.astGrepBinDir}:${process.env.PATH ?? ""}`;
|
|
884
907
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Save up to 80% tokens when AI reads code — MCP server for token-efficient code navigation, AST-aware structural reading instead of dumping full files into context window",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|