token-pilot 0.33.0 → 0.34.0

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.
@@ -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.33.0"
9
+ "version": "0.34.0"
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.33.0",
16
+ "version": "0.34.0",
17
17
  "author": {
18
18
  "name": "Digital-Threads"
19
19
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.33.0",
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.",
3
+ "version": "0.34.0",
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",
7
7
  "url": "https://github.com/Digital-Threads"
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__read_symbol
10
10
  - Bash
11
11
  model: haiku
12
- token_pilot_version: "0.33.0"
12
+ token_pilot_version: "0.34.0"
13
13
  token_pilot_body_hash: dd184501203fa7f3c73f419c4ffbe33c4be75400cb64a7a51733a3fe23f6e085
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Grep
12
12
  - Read
13
13
  model: sonnet
14
- token_pilot_version: "0.33.0"
14
+ token_pilot_version: "0.34.0"
15
15
  token_pilot_body_hash: d172f600bf32277ea6eb4cbbee4542ddd698a986dcd96997d33930561964569b
16
16
  ---
17
17
 
@@ -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.33.0"
11
+ token_pilot_version: "0.34.0"
12
12
  token_pilot_body_hash: de64a406b5176de19f7422619c7de7949b1f28865f225402c9cea9255f377428
13
13
  ---
14
14
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Glob
15
15
  model: sonnet
16
- token_pilot_version: "0.33.0"
16
+ token_pilot_version: "0.34.0"
17
17
  token_pilot_body_hash: 68b32af2dacd82ebe52c4eec93edb903d452688274c3065218270627c564d8b0
18
18
  ---
19
19
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Grep
12
12
  - Read
13
13
  model: sonnet
14
- token_pilot_version: "0.33.0"
14
+ token_pilot_version: "0.34.0"
15
15
  token_pilot_body_hash: d9b7f5b7ae6f4ae21305c775361bcab097cc774370a6d976c093571d46d55021
16
16
  ---
17
17
 
@@ -12,7 +12,7 @@ tools:
12
12
  - Read
13
13
  - Bash
14
14
  model: sonnet
15
- token_pilot_version: "0.33.0"
15
+ token_pilot_version: "0.34.0"
16
16
  token_pilot_body_hash: 052413de8d92377edcde6ae5c823f5378db304baccfa29e8866467f42553a500
17
17
  ---
18
18
 
@@ -9,7 +9,7 @@ tools:
9
9
  - Bash
10
10
  - Read
11
11
  model: haiku
12
- token_pilot_version: "0.33.0"
12
+ token_pilot_version: "0.34.0"
13
13
  token_pilot_body_hash: e14dc57493d816f8c2e017963e2ef5f66bea50fd0b805a80e8a0d97c968427e7
14
14
  ---
15
15
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Glob
15
15
  model: haiku
16
- token_pilot_version: "0.33.0"
16
+ token_pilot_version: "0.34.0"
17
17
  token_pilot_body_hash: 57d741794ab40e31a7ac49c68ea39a9088f5827cdef866ce81bfca1b7c9180cf
18
18
  ---
19
19
 
@@ -10,7 +10,7 @@ tools:
10
10
  - Bash
11
11
  - Read
12
12
  model: haiku
13
- token_pilot_version: "0.33.0"
13
+ token_pilot_version: "0.34.0"
14
14
  token_pilot_body_hash: 7b70fa76a60e3c58a1de4f56c32c0f166424137e203a0cf1c8654e7c9235d904
15
15
  ---
16
16
 
@@ -12,7 +12,7 @@ tools:
12
12
  - mcp__token-pilot__read_symbols
13
13
  - Read
14
14
  model: sonnet
15
- token_pilot_version: "0.33.0"
15
+ token_pilot_version: "0.34.0"
16
16
  token_pilot_body_hash: 351a987e11eba63852f5431a16d8eb53104f4f689f82fdcc5a2bf4db948ba92f
17
17
  ---
18
18
 
@@ -8,7 +8,7 @@ tools:
8
8
  - mcp__token-pilot__read_symbol
9
9
  - Bash
10
10
  model: inherit
11
- token_pilot_version: "0.33.0"
11
+ token_pilot_version: "0.34.0"
12
12
  token_pilot_body_hash: de5722bfea374eaab096c1ae635c37879e7a91370ee3cd0532f4240be03c91eb
13
13
  ---
14
14
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Bash
15
15
  model: sonnet
16
- token_pilot_version: "0.33.0"
16
+ token_pilot_version: "0.34.0"
17
17
  token_pilot_body_hash: 375a824d0d847bb5453ec594c7a62ad566ee7e4d92717b0473f771f1a0477c60
18
18
  ---
19
19
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Grep
12
12
  - Glob
13
13
  model: sonnet
14
- token_pilot_version: "0.33.0"
14
+ token_pilot_version: "0.34.0"
15
15
  token_pilot_body_hash: 0334de1bf99b431b65359637d125cda7c44c6f780eb92c57cc538715b1939536
16
16
  ---
17
17
 
@@ -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.33.0"
13
+ token_pilot_version: "0.34.0"
14
14
  token_pilot_body_hash: 832e95633fbc8e9b0c10f3e540a327d4be062fb4b3f17a6cce6be13f414e2927
15
15
  ---
16
16
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Bash
12
12
  - Read
13
13
  model: sonnet
14
- token_pilot_version: "0.33.0"
14
+ token_pilot_version: "0.34.0"
15
15
  token_pilot_body_hash: b61f06380d80798fa2e49d37bcba0653495bee04dd6bdbc1feff9a75607b0508
16
16
  ---
17
17
 
@@ -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.33.0"
14
+ token_pilot_version: "0.34.0"
15
15
  token_pilot_body_hash: f83f50d05b4f70285ae7afed2b1a406fc436df56e61a0aedbfb31edc7f2b6e66
16
16
  ---
17
17
 
@@ -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.33.0"
11
+ token_pilot_version: "0.34.0"
12
12
  token_pilot_body_hash: c5f6fc122c89e16e5cf774045f92169ee3468555320b898171ba13eca5323550
13
13
  ---
14
14
 
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__module_info
10
10
  - Bash
11
11
  model: sonnet
12
- token_pilot_version: "0.33.0"
12
+ token_pilot_version: "0.34.0"
13
13
  token_pilot_body_hash: 8ef3c3341cbfed4eb8dd130126a9683edc57e378c92ff0ca764d584fd941c55c
14
14
  ---
15
15
 
package/agents/tp-run.md CHANGED
@@ -16,7 +16,7 @@ tools:
16
16
  - Glob
17
17
  - Bash
18
18
  model: haiku
19
- token_pilot_version: "0.33.0"
19
+ token_pilot_version: "0.34.0"
20
20
  token_pilot_body_hash: 2b08618d34a61f00aafccbda9fed6d83243296dedb83440edbd2d5c28bb6dbc4
21
21
  ---
22
22
 
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__session_budget
10
10
  - Bash
11
11
  - Read
12
- token_pilot_version: "0.33.0"
12
+ token_pilot_version: "0.34.0"
13
13
  token_pilot_body_hash: 529374ed728f5eed5b758b3be3da65624783c0bf0c1a253d7d661a843eb5f767
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Read
12
12
  - Grep
13
13
  model: sonnet
14
- token_pilot_version: "0.33.0"
14
+ token_pilot_version: "0.34.0"
15
15
  token_pilot_body_hash: a60f6ae110eb3138064bce074e8ba26fa0ce5f4659df1624a9d9d3646803391b
16
16
  ---
17
17
 
@@ -9,7 +9,7 @@ tools:
9
9
  - Read
10
10
  - Write
11
11
  model: sonnet
12
- token_pilot_version: "0.33.0"
12
+ token_pilot_version: "0.34.0"
13
13
  token_pilot_body_hash: c7a4e8b39228fd5158528f389c924c5ff2d98c4b9b05ee0106d54a26c5dc1350
14
14
  ---
15
15
 
@@ -10,7 +10,7 @@ tools:
10
10
  - mcp__token-pilot__test_summary
11
11
  - Glob
12
12
  - Grep
13
- token_pilot_version: "0.33.0"
13
+ token_pilot_version: "0.34.0"
14
14
  token_pilot_body_hash: be81eed53a3720d146cf89e4a14a7a56577633f7c84c234c412ab70d64c05b11
15
15
  ---
16
16
 
@@ -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.33.0"
11
+ token_pilot_version: "0.34.0"
12
12
  token_pilot_body_hash: 362ecf4cb03b059421ea26933473700900073dc38b3a7fe271208dfb1ae14f90
13
13
  ---
14
14
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Bash
15
15
  model: sonnet
16
- token_pilot_version: "0.33.0"
16
+ token_pilot_version: "0.34.0"
17
17
  token_pilot_body_hash: 269f2fe22ff4517c277d3f56ca67d8a5527b93290ab21079a83ba7af22c1b5a9
18
18
  ---
19
19
 
@@ -17,7 +17,7 @@
17
17
  * Everything else passes through untouched — a real project root like
18
18
  * `/home/user/my-project` or `./subdir` goes to startServer as before.
19
19
  */
20
- export declare const KNOWN_COMMANDS: readonly ["hook-read", "hook-edit", "hook-pre-bash", "hook-pre-grep", "hook-post-bash", "hook-post-task", "hook-session-start", "install-hook", "uninstall-hook", "install-ast-index", "doctor", "bless-agents", "unbless-agents", "install-agents", "uninstall-agents", "stats", "tool-audit", "save-doc", "list-docs", "init", "--version", "-v", "--help", "-h"];
20
+ export declare const KNOWN_COMMANDS: readonly ["hook-read", "hook-edit", "hook-pre-bash", "hook-pre-grep", "hook-pre-task", "hook-post-bash", "hook-post-task", "hook-session-start", "install-hook", "uninstall-hook", "install-ast-index", "doctor", "bless-agents", "unbless-agents", "install-agents", "uninstall-agents", "stats", "tool-audit", "save-doc", "list-docs", "init", "migrate-hooks", "errors", "--version", "-v", "--help", "-h"];
21
21
  export interface TypoGuardResult {
22
22
  kind: "pass-through" | "typo";
23
23
  suggestion?: string;
@@ -23,6 +23,12 @@ export const KNOWN_COMMANDS = [
23
23
  "hook-edit",
24
24
  "hook-pre-bash",
25
25
  "hook-pre-grep",
26
+ // v0.31.0 — Task routing enforcement. Missing from this list since
27
+ // v0.31.0 caused typo-guard to reject every PreToolUse:Task hook
28
+ // invocation with exit 1, which is why tool-audit logs across
29
+ // multiple machines showed 0 task events for weeks. Restored in
30
+ // v0.33.0+ alongside the rest of this release's CLI surface.
31
+ "hook-pre-task",
26
32
  "hook-post-bash",
27
33
  "hook-post-task",
28
34
  "hook-session-start",
@@ -39,6 +45,9 @@ export const KNOWN_COMMANDS = [
39
45
  "save-doc",
40
46
  "list-docs",
41
47
  "init",
48
+ // v0.33.0
49
+ "migrate-hooks",
50
+ "errors",
42
51
  "--version",
43
52
  "-v",
44
53
  "--help",
@@ -28,6 +28,16 @@ export interface HookEvent {
28
28
  /** null for top-level session; agent_type string inside a subagent. */
29
29
  agent_type: string | null;
30
30
  agent_id: string | null;
31
+ /**
32
+ * v0.34.0 — agent_id of the parent that dispatched this subagent.
33
+ * Claude Code now ships `x-claude-code-parent-agent-id` headers
34
+ * and exposes the value in PostToolUse:Task input. Capturing it
35
+ * lets us reconstruct the full dispatch chain
36
+ * (main → general-purpose → tp-* delegate, etc.) instead of seeing
37
+ * only the leaf agent. Optional — older Claude Code versions
38
+ * never populate it; events stay shape-compatible.
39
+ */
40
+ parent_agent_id?: string | null;
31
41
  event: "denied" | "allowed" | "bypass" | "pass-through" | "task" | "diagnostic" | string;
32
42
  file: string;
33
43
  lines: number;
@@ -12,6 +12,23 @@ function buildHookCommand(action, options) {
12
12
  }
13
13
  return `token-pilot ${action}`;
14
14
  }
15
+ /**
16
+ * v0.34.0 — build the `args: string[]` companion to `command`. Claude
17
+ * Code's new hook schema runs `args` directly via `posix_spawn`
18
+ * without an intermediate `/bin/sh -c`. That's safer for paths with
19
+ * spaces, faster (no extra fork), and sidesteps a class of EAGAIN
20
+ * burst-spawn failures on macOS/WSL when many SessionStart hooks
21
+ * fire at once. We emit BOTH fields side by side — older Claude
22
+ * Code versions ignore `args` and use `command`; newer versions
23
+ * prefer `args` and ignore `command`. No version negotiation needed.
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
32
  /**
16
33
  * Detect a stale token-pilot hook command — one that points at a
17
34
  * pinned npx-cache snapshot (`npx/_npx/<hash>/...`) or any other
@@ -46,93 +63,61 @@ export function isStaleTokenPilotHookCommand(cmd) {
46
63
  }
47
64
  return false;
48
65
  }
66
+ /**
67
+ * Helper — build the canonical pair `{type, command, args}` for one
68
+ * hook action so emit stays uniform across every matcher. v0.34.0
69
+ * adds `args` alongside `command` (Claude Code prefers `args` when
70
+ * present; older versions ignore it).
71
+ */
72
+ function hookEntry(action, options) {
73
+ return {
74
+ type: "command",
75
+ command: buildHookCommand(action, options),
76
+ args: buildHookArgs(action, options),
77
+ };
78
+ }
49
79
  function createHookConfig(options) {
50
80
  return {
51
81
  hooks: {
52
82
  PreToolUse: [
53
83
  {
54
84
  matcher: "Read",
55
- hooks: [
56
- {
57
- type: "command",
58
- command: buildHookCommand("hook-read", options),
59
- },
60
- ],
85
+ hooks: [hookEntry("hook-read", options)],
61
86
  },
62
87
  {
63
88
  matcher: "Edit",
64
- hooks: [
65
- {
66
- type: "command",
67
- command: buildHookCommand("hook-edit", options),
68
- },
69
- ],
89
+ hooks: [hookEntry("hook-edit", options)],
70
90
  },
71
91
  {
72
92
  matcher: "MultiEdit",
73
- hooks: [
74
- {
75
- type: "command",
76
- command: buildHookCommand("hook-edit", options),
77
- },
78
- ],
93
+ hooks: [hookEntry("hook-edit", options)],
79
94
  },
80
95
  {
81
96
  matcher: "Bash",
82
- hooks: [
83
- {
84
- type: "command",
85
- command: buildHookCommand("hook-pre-bash", options),
86
- },
87
- ],
97
+ hooks: [hookEntry("hook-pre-bash", options)],
88
98
  },
89
99
  {
90
100
  matcher: "Grep",
91
- hooks: [
92
- {
93
- type: "command",
94
- command: buildHookCommand("hook-pre-grep", options),
95
- },
96
- ],
101
+ hooks: [hookEntry("hook-pre-grep", options)],
97
102
  },
98
103
  {
99
104
  matcher: "Task",
100
- hooks: [
101
- {
102
- type: "command",
103
- command: buildHookCommand("hook-pre-task", options),
104
- },
105
- ],
105
+ hooks: [hookEntry("hook-pre-task", options)],
106
106
  },
107
107
  ],
108
108
  SessionStart: [
109
109
  {
110
- hooks: [
111
- {
112
- type: "command",
113
- command: buildHookCommand("hook-session-start", options),
114
- },
115
- ],
110
+ hooks: [hookEntry("hook-session-start", options)],
116
111
  },
117
112
  ],
118
113
  PostToolUse: [
119
114
  {
120
115
  matcher: "Bash",
121
- hooks: [
122
- {
123
- type: "command",
124
- command: buildHookCommand("hook-post-bash", options),
125
- },
126
- ],
116
+ hooks: [hookEntry("hook-post-bash", options)],
127
117
  },
128
118
  {
129
119
  matcher: "Task",
130
- hooks: [
131
- {
132
- type: "command",
133
- command: buildHookCommand("hook-post-task", options),
134
- },
135
- ],
120
+ hooks: [hookEntry("hook-post-task", options)],
136
121
  },
137
122
  ],
138
123
  },
@@ -62,6 +62,12 @@ export interface PostTaskHookInput {
62
62
  session_id?: string;
63
63
  agent_type?: string;
64
64
  agent_id?: string;
65
+ /**
66
+ * v0.34.0 — Claude Code now passes the dispatching agent's id so
67
+ * we can reconstruct the full delegation chain. Older versions
68
+ * never populate it.
69
+ */
70
+ parent_agent_id?: string;
65
71
  }
66
72
  /**
67
73
  * Resolve the plugin's own `agents/` directory. The hook binary lives
@@ -198,6 +198,11 @@ export async function processPostTask(projectRoot, homeDir, input) {
198
198
  session_id: input.session_id ?? "",
199
199
  agent_type: input.agent_type ?? null,
200
200
  agent_id: input.agent_id ?? null,
201
+ // v0.34.0 — capture parent_agent_id when Claude Code provides it.
202
+ // Lets us reconstruct main → general-purpose → tp-* chains.
203
+ ...(input.parent_agent_id
204
+ ? { parent_agent_id: input.parent_agent_id }
205
+ : {}),
201
206
  event: "task",
202
207
  file: "",
203
208
  lines: 0,
package/dist/index.js CHANGED
@@ -485,6 +485,32 @@ export async function startServer(cliArgs = process.argv.slice(2)) {
485
485
  }
486
486
  }
487
487
  }
488
+ // v0.34.0 — fire-and-forget startup diagnostic so we can verify
489
+ // in real-world telemetry whether the new Claude Code (which exposes
490
+ // CLAUDE_PROJECT_DIR to MCP stdio servers since the May 2026 update)
491
+ // is what actually drove the projectRoot decision. NOT awaited — an
492
+ // extra await before createServer breaks tests that rely on a tight
493
+ // microtask flush, and the emit is purely advisory.
494
+ {
495
+ const cpd = process.env.CLAUDE_PROJECT_DIR;
496
+ appendDiagnostic(projectRoot, {
497
+ code: "mcp_startup",
498
+ level: "info",
499
+ detail: {
500
+ project_root_source: explicitRoot
501
+ ? "args"
502
+ : cpd && projectRoot === cpd
503
+ ? "CLAUDE_PROJECT_DIR"
504
+ : process.env.INIT_CWD && projectRoot === process.env.INIT_CWD
505
+ ? "INIT_CWD"
506
+ : "git-detect-or-cwd",
507
+ claude_project_dir_present: !!cpd,
508
+ platform: process.platform,
509
+ },
510
+ }).catch(() => {
511
+ /* best-effort */
512
+ });
513
+ }
488
514
  // Guard: refuse to use dangerous roots that would index the entire disk
489
515
  if (isDangerousRoot(projectRoot)) {
490
516
  console.error(`[token-pilot] WARNING: project root "${projectRoot}" is too broad (system/home directory).\n` +
package/hooks/hooks.json CHANGED
@@ -6,7 +6,12 @@
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
9
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-read"
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
+ ]
10
15
  }
11
16
  ]
12
17
  },
@@ -15,7 +20,12 @@
15
20
  "hooks": [
16
21
  {
17
22
  "type": "command",
18
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
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
+ ]
19
29
  }
20
30
  ]
21
31
  },
@@ -24,7 +34,12 @@
24
34
  "hooks": [
25
35
  {
26
36
  "type": "command",
27
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
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
+ ]
28
43
  }
29
44
  ]
30
45
  },
@@ -33,7 +48,12 @@
33
48
  "hooks": [
34
49
  {
35
50
  "type": "command",
36
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-bash"
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
+ ]
37
57
  }
38
58
  ]
39
59
  },
@@ -42,7 +62,12 @@
42
62
  "hooks": [
43
63
  {
44
64
  "type": "command",
45
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-grep"
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
+ ]
46
71
  }
47
72
  ]
48
73
  },
@@ -51,7 +76,12 @@
51
76
  "hooks": [
52
77
  {
53
78
  "type": "command",
54
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-pre-task"
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
+ ]
55
85
  }
56
86
  ]
57
87
  }
@@ -61,7 +91,12 @@
61
91
  "hooks": [
62
92
  {
63
93
  "type": "command",
64
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-session-start"
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
+ ]
65
100
  }
66
101
  ]
67
102
  }
@@ -72,7 +107,12 @@
72
107
  "hooks": [
73
108
  {
74
109
  "type": "command",
75
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-post-bash"
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
+ ]
76
116
  }
77
117
  ]
78
118
  },
@@ -81,7 +121,12 @@
81
121
  "hooks": [
82
122
  {
83
123
  "type": "command",
84
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-post-task"
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
+ ]
85
130
  }
86
131
  ]
87
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
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",