token-pilot 0.34.0 → 0.34.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/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/hooks/installer.js +20 -22
- package/hooks/hooks.json +9 -54
- package/package.json +1 -1
|
@@ -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.34.
|
|
9
|
+
"version": "0.34.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.34.
|
|
16
|
+
"version": "0.34.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.34.
|
|
3
|
+
"version": "0.34.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/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.34.
|
|
13
|
+
token_pilot_version: "0.34.1"
|
|
14
14
|
token_pilot_body_hash: 832e95633fbc8e9b0c10f3e540a327d4be062fb4b3f17a6cce6be13f414e2927
|
|
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
package/dist/hooks/installer.js
CHANGED
|
@@ -12,23 +12,15 @@ function buildHookCommand(action, options) {
|
|
|
12
12
|
}
|
|
13
13
|
return `token-pilot ${action}`;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
function buildHookArgs(action, options) {
|
|
26
|
-
if (options?.scriptPath) {
|
|
27
|
-
const node = options.nodeExecPath || process.execPath;
|
|
28
|
-
return [node, options.scriptPath, action];
|
|
29
|
-
}
|
|
30
|
-
return ["token-pilot", action];
|
|
31
|
-
}
|
|
15
|
+
// v0.34.0 added a `buildHookArgs()` companion that emitted an
|
|
16
|
+
// `args: string[]` field alongside `command`. The intent was to take
|
|
17
|
+
// advantage of Claude Code's new direct-spawn schema, but real
|
|
18
|
+
// installs hit ENOENT because Claude Code does NOT expand
|
|
19
|
+
// `${CLAUDE_PLUGIN_ROOT}` inside `args` array elements. The literal
|
|
20
|
+
// `${CLAUDE_PLUGIN_ROOT}/dist/index.js` then went to posix_spawn as
|
|
21
|
+
// a real path and bounced. v0.34.1 dropped the helper entirely and
|
|
22
|
+
// kept `command`-only emission. Re-introduce only when Claude Code
|
|
23
|
+
// docs confirm the env-expansion rules for `args`.
|
|
32
24
|
/**
|
|
33
25
|
* Detect a stale token-pilot hook command — one that points at a
|
|
34
26
|
* pinned npx-cache snapshot (`npx/_npx/<hash>/...`) or any other
|
|
@@ -64,16 +56,22 @@ export function isStaleTokenPilotHookCommand(cmd) {
|
|
|
64
56
|
return false;
|
|
65
57
|
}
|
|
66
58
|
/**
|
|
67
|
-
* Helper — build the canonical
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
59
|
+
* Helper — build the canonical `{type, command}` pair for one hook
|
|
60
|
+
* action so emit stays uniform across every matcher.
|
|
61
|
+
*
|
|
62
|
+
* v0.34.0 introduced an `args: string[]` field alongside `command` to
|
|
63
|
+
* adopt Claude Code's new direct-spawn schema, but that path caused
|
|
64
|
+
* ENOENT on real installs because the new spawn skips shell expansion
|
|
65
|
+
* and Claude Code does NOT interpolate `${CLAUDE_PLUGIN_ROOT}` inside
|
|
66
|
+
* `args` array elements (only inside `command` strings). v0.34.1
|
|
67
|
+
* reverts: shell-expanded `command` remains the safe, portable form
|
|
68
|
+
* for every Claude Code version we know of. When Claude Code docs
|
|
69
|
+
* confirm the env-expansion rules for `args`, we can revisit.
|
|
71
70
|
*/
|
|
72
71
|
function hookEntry(action, options) {
|
|
73
72
|
return {
|
|
74
73
|
type: "command",
|
|
75
74
|
command: buildHookCommand(action, options),
|
|
76
|
-
args: buildHookArgs(action, options),
|
|
77
75
|
};
|
|
78
76
|
}
|
|
79
77
|
function createHookConfig(options) {
|
package/hooks/hooks.json
CHANGED
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-read"
|
|
10
|
-
"args": [
|
|
11
|
-
"node",
|
|
12
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
13
|
-
"hook-read"
|
|
14
|
-
]
|
|
9
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-read"
|
|
15
10
|
}
|
|
16
11
|
]
|
|
17
12
|
},
|
|
@@ -20,12 +15,7 @@
|
|
|
20
15
|
"hooks": [
|
|
21
16
|
{
|
|
22
17
|
"type": "command",
|
|
23
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
|
|
24
|
-
"args": [
|
|
25
|
-
"node",
|
|
26
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
27
|
-
"hook-edit"
|
|
28
|
-
]
|
|
18
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
|
|
29
19
|
}
|
|
30
20
|
]
|
|
31
21
|
},
|
|
@@ -34,12 +24,7 @@
|
|
|
34
24
|
"hooks": [
|
|
35
25
|
{
|
|
36
26
|
"type": "command",
|
|
37
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
|
|
38
|
-
"args": [
|
|
39
|
-
"node",
|
|
40
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
41
|
-
"hook-edit"
|
|
42
|
-
]
|
|
27
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
|
|
43
28
|
}
|
|
44
29
|
]
|
|
45
30
|
},
|
|
@@ -48,12 +33,7 @@
|
|
|
48
33
|
"hooks": [
|
|
49
34
|
{
|
|
50
35
|
"type": "command",
|
|
51
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-bash"
|
|
52
|
-
"args": [
|
|
53
|
-
"node",
|
|
54
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
55
|
-
"hook-pre-bash"
|
|
56
|
-
]
|
|
36
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-bash"
|
|
57
37
|
}
|
|
58
38
|
]
|
|
59
39
|
},
|
|
@@ -62,12 +42,7 @@
|
|
|
62
42
|
"hooks": [
|
|
63
43
|
{
|
|
64
44
|
"type": "command",
|
|
65
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-grep"
|
|
66
|
-
"args": [
|
|
67
|
-
"node",
|
|
68
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
69
|
-
"hook-pre-grep"
|
|
70
|
-
]
|
|
45
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-grep"
|
|
71
46
|
}
|
|
72
47
|
]
|
|
73
48
|
},
|
|
@@ -76,12 +51,7 @@
|
|
|
76
51
|
"hooks": [
|
|
77
52
|
{
|
|
78
53
|
"type": "command",
|
|
79
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-task"
|
|
80
|
-
"args": [
|
|
81
|
-
"node",
|
|
82
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
83
|
-
"hook-pre-task"
|
|
84
|
-
]
|
|
54
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-task"
|
|
85
55
|
}
|
|
86
56
|
]
|
|
87
57
|
}
|
|
@@ -91,12 +61,7 @@
|
|
|
91
61
|
"hooks": [
|
|
92
62
|
{
|
|
93
63
|
"type": "command",
|
|
94
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-session-start"
|
|
95
|
-
"args": [
|
|
96
|
-
"node",
|
|
97
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
98
|
-
"hook-session-start"
|
|
99
|
-
]
|
|
64
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-session-start"
|
|
100
65
|
}
|
|
101
66
|
]
|
|
102
67
|
}
|
|
@@ -107,12 +72,7 @@
|
|
|
107
72
|
"hooks": [
|
|
108
73
|
{
|
|
109
74
|
"type": "command",
|
|
110
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-post-bash"
|
|
111
|
-
"args": [
|
|
112
|
-
"node",
|
|
113
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
114
|
-
"hook-post-bash"
|
|
115
|
-
]
|
|
75
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-post-bash"
|
|
116
76
|
}
|
|
117
77
|
]
|
|
118
78
|
},
|
|
@@ -121,12 +81,7 @@
|
|
|
121
81
|
"hooks": [
|
|
122
82
|
{
|
|
123
83
|
"type": "command",
|
|
124
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-post-task"
|
|
125
|
-
"args": [
|
|
126
|
-
"node",
|
|
127
|
-
"${CLAUDE_PLUGIN_ROOT}/dist/index.js",
|
|
128
|
-
"hook-post-task"
|
|
129
|
-
]
|
|
84
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-post-task"
|
|
130
85
|
}
|
|
131
86
|
]
|
|
132
87
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.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",
|