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.
- 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 +0 -9
- package/dist/hooks/pre-edit.js +9 -5
- package/hooks/hooks.json +0 -9
- 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.30.
|
|
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.
|
|
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.
|
|
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",
|
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.3"
|
|
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
package/dist/hooks/installer.js
CHANGED
package/dist/hooks/pre-edit.js
CHANGED
|
@@ -30,7 +30,13 @@
|
|
|
30
30
|
*/
|
|
31
31
|
export function decidePreEdit(input, ctx) {
|
|
32
32
|
const toolName = input.tool_name ?? "";
|
|
33
|
-
|
|
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
|
|
45
|
-
//
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.30.
|
|
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",
|