token-pilot 0.30.2 → 0.30.3

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.30.2"
9
+ "version": "0.30.3"
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.30.2",
16
+ "version": "0.30.3",
17
17
  "author": {
18
18
  "name": "Digital-Threads"
19
19
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.30.2",
3
+ "version": "0.30.3",
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",
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__read_symbol
10
10
  - Bash
11
11
  model: haiku
12
- token_pilot_version: "0.30.2"
12
+ token_pilot_version: "0.30.3"
13
13
  token_pilot_body_hash: c9d33476fdf70c8a7a493ec8720f54792eda2f81585996246e94c130ff3ec356
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Grep
12
12
  - Read
13
13
  model: sonnet
14
- token_pilot_version: "0.30.2"
14
+ token_pilot_version: "0.30.3"
15
15
  token_pilot_body_hash: 7095ffab66aca2e424f00875933e3f63bc10651eef2fde6a59f08bbbdbf86f7c
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.30.2"
11
+ token_pilot_version: "0.30.3"
12
12
  token_pilot_body_hash: b6831f11c61a9b255c2b6ffa04837130242fd02843463a7d30f109c1a06b3e3f
13
13
  ---
14
14
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Glob
15
15
  model: sonnet
16
- token_pilot_version: "0.30.2"
16
+ token_pilot_version: "0.30.3"
17
17
  token_pilot_body_hash: 43f9364ce722ff76daf0f8720ddaf9f77e18d4c4ed8bee3e15f12d207798e778
18
18
  ---
19
19
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Grep
12
12
  - Read
13
13
  model: sonnet
14
- token_pilot_version: "0.30.2"
14
+ token_pilot_version: "0.30.3"
15
15
  token_pilot_body_hash: 386760aed26df6c3595d3267954605565fad08afa8761e016079ae60c19887a8
16
16
  ---
17
17
 
@@ -12,7 +12,7 @@ tools:
12
12
  - Read
13
13
  - Bash
14
14
  model: sonnet
15
- token_pilot_version: "0.30.2"
15
+ token_pilot_version: "0.30.3"
16
16
  token_pilot_body_hash: 71738830d025e86c70988e046a2f7f30b4590f3d284291a18609ed5fdd732321
17
17
  ---
18
18
 
@@ -9,7 +9,7 @@ tools:
9
9
  - Bash
10
10
  - Read
11
11
  model: haiku
12
- token_pilot_version: "0.30.2"
12
+ token_pilot_version: "0.30.3"
13
13
  token_pilot_body_hash: 12634cd28889d0a0ef1b4a6b994ba978353e14f3cb349011c393076e7e2b5c96
14
14
  ---
15
15
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Glob
15
15
  model: haiku
16
- token_pilot_version: "0.30.2"
16
+ token_pilot_version: "0.30.3"
17
17
  token_pilot_body_hash: 8e29d07dd8f58adeb9530ec477a59a6e42de6c624f322d2c6cfa8da66456b46a
18
18
  ---
19
19
 
@@ -10,7 +10,7 @@ tools:
10
10
  - Bash
11
11
  - Read
12
12
  model: haiku
13
- token_pilot_version: "0.30.2"
13
+ token_pilot_version: "0.30.3"
14
14
  token_pilot_body_hash: 260197bc31531352f5eda3b70cf114c7c57bb7e9373f68ca76161dd68a804b0d
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.30.2"
15
+ token_pilot_version: "0.30.3"
16
16
  token_pilot_body_hash: 1da6936cc117a7627640fae3cc85bf13a17f0b0b0d0d533423dfb4b7c0b4b1c2
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.30.2"
11
+ token_pilot_version: "0.30.3"
12
12
  token_pilot_body_hash: 213746bab7acb6730a6edb16e1ff7b2c56572c3adf4f94990799f1c168cfa2ad
13
13
  ---
14
14
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Bash
15
15
  model: sonnet
16
- token_pilot_version: "0.30.2"
16
+ token_pilot_version: "0.30.3"
17
17
  token_pilot_body_hash: 14c9adcabfb772c77a467a5fbfa682abbd5adc87e22d7fbe5d1329ffd790dde5
18
18
  ---
19
19
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Grep
12
12
  - Glob
13
13
  model: sonnet
14
- token_pilot_version: "0.30.2"
14
+ token_pilot_version: "0.30.3"
15
15
  token_pilot_body_hash: 62893e448e943d0e1b928a670823ec3e152de395e487564862f145bd82161fcb
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.30.2"
13
+ token_pilot_version: "0.30.3"
14
14
  token_pilot_body_hash: 4e82f7b3c6446663e958fb6bf5eb5348bbdf33389269c888ce0dab766e50561f
15
15
  ---
16
16
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Bash
12
12
  - Read
13
13
  model: sonnet
14
- token_pilot_version: "0.30.2"
14
+ token_pilot_version: "0.30.3"
15
15
  token_pilot_body_hash: 8b9f454a47e57e3761668de788850ef97d5d6f127b059cf8e0cef03deaca3f98
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.30.2"
14
+ token_pilot_version: "0.30.3"
15
15
  token_pilot_body_hash: 91003b244472c4e65d840b55474a86ce04fba379859d588cc0fa54850b0e1e4f
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.30.2"
11
+ token_pilot_version: "0.30.3"
12
12
  token_pilot_body_hash: 45f972c6b36929491a529322bac3c34fd44872f7be4a974d25c7e27cb12e9dc3
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.30.2"
12
+ token_pilot_version: "0.30.3"
13
13
  token_pilot_body_hash: 3c1c66f952ac63a5936bec86fefda8c842fb9713bca81e48ca5bb568ccb5f367
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.30.2"
19
+ token_pilot_version: "0.30.3"
20
20
  token_pilot_body_hash: de342efe1e3ee265df1773ebde1241555750ab17de249190a5c1c200f1f8f51a
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.30.2"
12
+ token_pilot_version: "0.30.3"
13
13
  token_pilot_body_hash: d031f30e9cc4ea454aa256427659ed27249d820b75dc8b9b99c81ba7635230a7
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@ tools:
11
11
  - Read
12
12
  - Grep
13
13
  model: sonnet
14
- token_pilot_version: "0.30.2"
14
+ token_pilot_version: "0.30.3"
15
15
  token_pilot_body_hash: 6b1c27b3dc4fad622cebff7c49e079fc764ca0ae57ef5bc4e61b563d8321092d
16
16
  ---
17
17
 
@@ -9,7 +9,7 @@ tools:
9
9
  - Read
10
10
  - Write
11
11
  model: sonnet
12
- token_pilot_version: "0.30.2"
12
+ token_pilot_version: "0.30.3"
13
13
  token_pilot_body_hash: 4ae44482db80a8a3a43794c6ecb665ec0b5385a274e1e5b2e3a404956075be88
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.30.2"
13
+ token_pilot_version: "0.30.3"
14
14
  token_pilot_body_hash: 6d862d1bcaeda3fb13099f51e40faaaf45d16d7d41d1b938609500192aa606f2
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.30.2"
11
+ token_pilot_version: "0.30.3"
12
12
  token_pilot_body_hash: f4e0dcbd2b4e8648efcafc9d53101a66bf394d7c90e97df7581ac47fcfbff5cb
13
13
  ---
14
14
 
@@ -13,7 +13,7 @@ tools:
13
13
  - Edit
14
14
  - Bash
15
15
  model: sonnet
16
- token_pilot_version: "0.30.2"
16
+ token_pilot_version: "0.30.3"
17
17
  token_pilot_body_hash: 960fe9e907e9c7d13b14dcc22af99e8cc7e7335f99791fa808df76ac21e1f5e9
18
18
  ---
19
19
 
@@ -43,15 +43,6 @@ function createHookConfig(options) {
43
43
  },
44
44
  ],
45
45
  },
46
- {
47
- matcher: "Write",
48
- hooks: [
49
- {
50
- type: "command",
51
- command: buildHookCommand("hook-edit", options),
52
- },
53
- ],
54
- },
55
46
  {
56
47
  matcher: "Bash",
57
48
  hooks: [
@@ -30,7 +30,13 @@
30
30
  */
31
31
  export function decidePreEdit(input, ctx) {
32
32
  const toolName = input.tool_name ?? "";
33
- if (toolName !== "Edit" && toolName !== "MultiEdit" && toolName !== "Write") {
33
+ // Only Edit and MultiEdit touch a file partially with an old_string that
34
+ // MUST match disk byte-for-byte — those are the calls read_for_edit
35
+ // actually prepares. Write replaces the whole file (new content, no
36
+ // old_string) so enforcing prep on Write is overreach: blocks legit
37
+ // script regeneration / template overwrites that never needed prep.
38
+ // Pre-v0.30.3 we blocked Write too; that was wrong. Rolled back.
39
+ if (toolName !== "Edit" && toolName !== "MultiEdit") {
34
40
  return { kind: "allow" };
35
41
  }
36
42
  const filePath = input.tool_input?.file_path;
@@ -41,10 +47,8 @@ export function decidePreEdit(input, ctx) {
41
47
  // carry the same value, skip enforcement.
42
48
  if (!ctx.isCodeFile)
43
49
  return { kind: "allow" };
44
- // Non-existent files are out of scope for the enforcement:
45
- // - Write on a new file is legitimate new-file creation
46
- // - Edit / MultiEdit on a missing path will error downstream in
47
- // Claude Code itself — nothing for us to add there
50
+ // Non-existent files Edit/MultiEdit will error downstream in Claude Code
51
+ // itself. Nothing for us to add.
48
52
  if (!ctx.fileExists)
49
53
  return { kind: "allow" };
50
54
  // Explicit escape hatch. Documented as TOKEN_PILOT_BYPASS=1.
package/hooks/hooks.json CHANGED
@@ -28,15 +28,6 @@
28
28
  }
29
29
  ]
30
30
  },
31
- {
32
- "matcher": "Write",
33
- "hooks": [
34
- {
35
- "type": "command",
36
- "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js hook-edit"
37
- }
38
- ]
39
- },
40
31
  {
41
32
  "matcher": "Bash",
42
33
  "hooks": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.30.2",
3
+ "version": "0.30.3",
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",