token-pilot 0.30.0 → 0.30.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 +2 -4
- package/README.md +24 -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 +17 -2
- package/dist/ast-index/client.js +233 -107
- package/dist/core/edit-prep-state.d.ts +42 -0
- package/dist/core/edit-prep-state.js +108 -0
- package/dist/handlers/explore-area.js +6 -1
- package/dist/handlers/read-for-edit.d.ts +5 -5
- package/dist/handlers/read-for-edit.js +188 -110
- package/dist/hooks/installer.js +18 -0
- package/dist/hooks/pre-bash.d.ts +9 -0
- package/dist/hooks/pre-bash.js +48 -0
- package/dist/hooks/pre-edit.d.ts +69 -0
- package/dist/hooks/pre-edit.js +104 -0
- package/dist/hooks/pre-grep.d.ts +10 -0
- package/dist/hooks/pre-grep.js +38 -2
- package/dist/index.d.ts +30 -0
- package/dist/index.js +83 -20
- package/dist/server/tool-definitions.js +18 -6
- package/dist/server.js +21 -5
- package/docs/installation.md +27 -1
- package/hooks/hooks.json +18 -0
- package/package.json +1 -1
- package/start.sh +19 -9
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Token Pilot \u2014 save 60-90% tokens when AI reads code",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.30.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. 22 MCP tools + 19 subagents + budget watchdog hooks.",
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.30.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.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"description": "Saves 60-90% tokens when AI reads code. AST-aware lazy reading, symbol navigation, cross-session tool-usage analytics, 22 subagents (haiku/sonnet/opus-tiered) with budget watchdog.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Digital-Threads",
|
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
"mcpServers": {
|
|
22
22
|
"token-pilot": {
|
|
23
23
|
"command": "sh",
|
|
24
|
-
"args": [
|
|
25
|
-
"${CLAUDE_PLUGIN_ROOT}/start.sh"
|
|
26
|
-
]
|
|
24
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/start.sh"]
|
|
27
25
|
}
|
|
28
26
|
},
|
|
29
27
|
"skills": "./skills/"
|
package/README.md
CHANGED
|
@@ -91,6 +91,30 @@ Rules of thumb: read code → `smart_read`/`read_symbol`; execute code with big
|
|
|
91
91
|
|
|
92
92
|
TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, PHP, Ruby. Non-code (JSON/YAML/Markdown/TOML) gets structural summaries. Regex fallback handles most other languages.
|
|
93
93
|
|
|
94
|
+
## Update / New Machine
|
|
95
|
+
|
|
96
|
+
**Claude Code (plugin — recommended):**
|
|
97
|
+
```bash
|
|
98
|
+
# Install on a new machine:
|
|
99
|
+
claude plugin marketplace add https://github.com/Digital-Threads/token-pilot
|
|
100
|
+
claude plugin install token-pilot@token-pilot
|
|
101
|
+
|
|
102
|
+
# Update to latest:
|
|
103
|
+
claude plugin update token-pilot
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Other clients (Cursor, Codex, Cline, …):**
|
|
107
|
+
```bash
|
|
108
|
+
# Install on a new machine:
|
|
109
|
+
npx -y token-pilot init
|
|
110
|
+
|
|
111
|
+
# Update to latest — npx always pulls fresh, just restart your client.
|
|
112
|
+
# Or if installed globally:
|
|
113
|
+
npm i -g token-pilot@latest
|
|
114
|
+
npx token-pilot install-hook
|
|
115
|
+
npx token-pilot install-agents --scope=user --force
|
|
116
|
+
```
|
|
117
|
+
|
|
94
118
|
## Troubleshooting
|
|
95
119
|
|
|
96
120
|
```bash
|
package/agents/tp-debugger.md
CHANGED
package/agents/tp-dep-health.md
CHANGED
package/agents/tp-doc-writer.md
CHANGED
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.30.
|
|
13
|
+
token_pilot_version: "0.30.1"
|
|
14
14
|
token_pilot_body_hash: 4e82f7b3c6446663e958fb6bf5eb5348bbdf33389269c888ce0dab766e50561f
|
|
15
15
|
---
|
|
16
16
|
|
package/agents/tp-pr-reviewer.md
CHANGED
package/agents/tp-run.md
CHANGED
package/agents/tp-spec-writer.md
CHANGED
package/agents/tp-test-triage.md
CHANGED
package/agents/tp-test-writer.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FileStructure } from
|
|
2
|
-
import type { AstIndexSymbolDetail, AstIndexSearchResult, AstIndexUsageResult, AstIndexImplementation, AstIndexHierarchyNode, AstIndexRefsResponse, AstIndexMapResponse, AstIndexConventionsResponse, AstIndexCallerEntry, AstIndexCallTreeNode, AstIndexChangedEntry, AstIndexUnusedSymbol, AstIndexImportEntry, AstIndexAgrepMatch, AstIndexTodoEntry, AstIndexDeprecatedEntry, AstIndexAnnotationEntry, AstIndexModuleEntry, AstIndexModuleDep, AstIndexUnusedDep, AstIndexModuleApi } from
|
|
1
|
+
import type { FileStructure } from "../types.js";
|
|
2
|
+
import type { AstIndexSymbolDetail, AstIndexSearchResult, AstIndexUsageResult, AstIndexImplementation, AstIndexHierarchyNode, AstIndexRefsResponse, AstIndexMapResponse, AstIndexConventionsResponse, AstIndexCallerEntry, AstIndexCallTreeNode, AstIndexChangedEntry, AstIndexUnusedSymbol, AstIndexImportEntry, AstIndexAgrepMatch, AstIndexTodoEntry, AstIndexDeprecatedEntry, AstIndexAnnotationEntry, AstIndexModuleEntry, AstIndexModuleDep, AstIndexUnusedDep, AstIndexModuleApi } from "./types.js";
|
|
3
3
|
export declare class AstIndexClient {
|
|
4
4
|
private static readonly MAX_INDEX_FILES;
|
|
5
5
|
private binaryPath;
|
|
@@ -13,6 +13,8 @@ export declare class AstIndexClient {
|
|
|
13
13
|
private autoInstall;
|
|
14
14
|
private astGrepAvailable;
|
|
15
15
|
private astGrepBinDir;
|
|
16
|
+
private periodicTimer;
|
|
17
|
+
private periodicUpdateInFlight;
|
|
16
18
|
constructor(projectRoot: string, timeout?: number, options?: {
|
|
17
19
|
binaryPath?: string | null;
|
|
18
20
|
autoInstall?: boolean;
|
|
@@ -63,6 +65,19 @@ export declare class AstIndexClient {
|
|
|
63
65
|
deprecated(): Promise<AstIndexDeprecatedEntry[]>;
|
|
64
66
|
annotations(name: string): Promise<AstIndexAnnotationEntry[]>;
|
|
65
67
|
incrementalUpdate(): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Periodic safety-net so long sessions don't drift when FileWatcher misses
|
|
70
|
+
* events (Docker bind mounts, NFS, files changed by sibling tools). We
|
|
71
|
+
* explicitly avoid spawning `ast-index watch` as a daemon — it duplicates
|
|
72
|
+
* our FileWatcher, needs PID/lifecycle management, and goes zombie if the
|
|
73
|
+
* MCP server is killed with SIGKILL.
|
|
74
|
+
*
|
|
75
|
+
* Default cadence is 5 minutes. `unref()` lets the process exit naturally
|
|
76
|
+
* even if a tick is pending. An in-flight guard prevents overlapping runs
|
|
77
|
+
* when a single update exceeds the interval (rare — timeout is 15 s).
|
|
78
|
+
*/
|
|
79
|
+
startPeriodicUpdate(intervalMs?: number): void;
|
|
80
|
+
stopPeriodicUpdate(): void;
|
|
66
81
|
modules(pattern?: string): Promise<AstIndexModuleEntry[]>;
|
|
67
82
|
moduleDeps(module: string): Promise<AstIndexModuleDep[]>;
|
|
68
83
|
moduleDependents(module: string): Promise<AstIndexModuleDep[]>;
|