token-pilot 0.34.1 → 0.34.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 +2 -3
- package/README.md +32 -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/hooks/pre-bash.js +8 -1
- package/dist/index.js +22 -0
- 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.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.34.
|
|
16
|
+
"version": "0.34.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.34.
|
|
3
|
+
"version": "0.34.3",
|
|
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",
|
|
@@ -23,6 +23,5 @@
|
|
|
23
23
|
"command": "sh",
|
|
24
24
|
"args": ["${CLAUDE_PLUGIN_ROOT}/start.sh"]
|
|
25
25
|
}
|
|
26
|
-
}
|
|
27
|
-
"skills": "./skills/"
|
|
26
|
+
}
|
|
28
27
|
}
|
package/README.md
CHANGED
|
@@ -122,6 +122,38 @@ npx token-pilot install-hook
|
|
|
122
122
|
npx token-pilot install-agents --scope=user --force
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
+
## Tips for Claude Code 2.1.139+
|
|
126
|
+
|
|
127
|
+
The May 2026 Claude Code update changed a few things that affect how
|
|
128
|
+
token-pilot is invoked. Nothing breaks on older versions — these are
|
|
129
|
+
quality-of-life notes for the newer ones.
|
|
130
|
+
|
|
131
|
+
- **Run a tp-\* agent directly without the `plugin:` prefix.**
|
|
132
|
+
`claude --agent tp-debugger "fix the stack trace"` now works the same
|
|
133
|
+
as `--agent token-pilot:tp-debugger`. The Task tool dispatcher
|
|
134
|
+
resolves the short name automatically.
|
|
135
|
+
|
|
136
|
+
- **Cold ast-index calls — raise `MCP_TOOL_TIMEOUT`.**
|
|
137
|
+
The first `find_usages` / `outline` / `read_symbol` on a large repo
|
|
138
|
+
triggers an index build. Default per-MCP-tool timeout (60 s) is
|
|
139
|
+
enough for ~50k-file repos; bigger ones benefit from
|
|
140
|
+
`MCP_TOOL_TIMEOUT=120000` in `~/.claude/settings.json`. Subsequent
|
|
141
|
+
calls hit the cache and return in ~50 ms.
|
|
142
|
+
|
|
143
|
+
- **Background sessions with `--mcp-config`.**
|
|
144
|
+
Dispatching a worker via `claude agents` or `--bg` with
|
|
145
|
+
`--mcp-config /path/to/other.json` swaps the MCP set for that
|
|
146
|
+
session. If `token-pilot` is not in the override config, MCP tools
|
|
147
|
+
(`smart_read`, `find_usages`, …) are unavailable in that worker
|
|
148
|
+
even though the hooks (Read / Edit / Bash / Grep / Task) still
|
|
149
|
+
fire — hooks are project-level, MCP tools are session-level. Add
|
|
150
|
+
`token-pilot` to the override config or skip `--mcp-config`.
|
|
151
|
+
|
|
152
|
+
- **`claude plugin details token-pilot`.**
|
|
153
|
+
Shows the projected per-turn token cost, the hook event names, and
|
|
154
|
+
the MCP server entry. The skill list, the agent list, and the LSP
|
|
155
|
+
list are all auto-discovered from the canonical sub-folders.
|
|
156
|
+
|
|
125
157
|
## Troubleshooting
|
|
126
158
|
|
|
127
159
|
```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.34.
|
|
13
|
+
token_pilot_version: "0.34.3"
|
|
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/pre-bash.js
CHANGED
|
@@ -100,10 +100,17 @@ function detectHeavyPatternSingle(command) {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
// 2. find / | find ~ | find . without bounds
|
|
103
|
+
//
|
|
104
|
+
// Claude Code 2.1.149 (May 2026) fixed the macOS-specific kernel-level
|
|
105
|
+
// file/vnode exhaustion crash from large unbounded `find` walks. The
|
|
106
|
+
// hook still denies because the *context* problem is unchanged — an
|
|
107
|
+
// unbounded walk easily dumps tens of thousands of paths into the
|
|
108
|
+
// tool result and blows past the per-turn token budget regardless of
|
|
109
|
+
// how stable the host stays.
|
|
103
110
|
if (/\bfind\s+(\/|~|\$HOME)/.test(cmd) && !/-maxdepth\s+\d+/.test(cmd)) {
|
|
104
111
|
return {
|
|
105
112
|
kind: "deny",
|
|
106
|
-
reason: "Unbounded `find /` walks the whole filesystem and dumps every match. " +
|
|
113
|
+
reason: "Unbounded `find /` walks the whole filesystem and dumps every match into the tool result. " +
|
|
107
114
|
"Use the Glob tool for pattern matching, or add `-maxdepth N -type f -name <glob>` " +
|
|
108
115
|
"to bound the walk. Re-run with `-maxdepth` to bypass.",
|
|
109
116
|
};
|
package/dist/index.js
CHANGED
|
@@ -207,6 +207,28 @@ export async function main(cliArgs = process.argv.slice(2)) {
|
|
|
207
207
|
agentIndex,
|
|
208
208
|
force,
|
|
209
209
|
});
|
|
210
|
+
// v0.34.2 — emit a diagnostic for every non-allow Task decision
|
|
211
|
+
// so we can count miss-rate and pair-popularity without waiting
|
|
212
|
+
// for PostToolUse:Task to land. If the post-task hook ever fails
|
|
213
|
+
// again (see typo-guard bug from v0.33.1), pre-task diagnostics
|
|
214
|
+
// are still recoverable from hook-events.jsonl. Best-effort —
|
|
215
|
+
// never blocks the dispatch decision.
|
|
216
|
+
if (decision.kind !== "allow") {
|
|
217
|
+
const subagentType = input?.tool_input?.subagent_type ?? "";
|
|
218
|
+
appendDiagnostic(process.cwd(), {
|
|
219
|
+
code: "task_pre_intercept",
|
|
220
|
+
level: decision.kind === "deny" ? "warn" : "info",
|
|
221
|
+
detail: {
|
|
222
|
+
decision: decision.kind,
|
|
223
|
+
subagent_type: typeof subagentType === "string" ? subagentType : "",
|
|
224
|
+
index_size: agentIndex.agents.length,
|
|
225
|
+
force,
|
|
226
|
+
mode: parseEnforcementMode(process.env.TOKEN_PILOT_MODE),
|
|
227
|
+
},
|
|
228
|
+
}).catch(() => {
|
|
229
|
+
/* never block dispatch on telemetry */
|
|
230
|
+
});
|
|
231
|
+
}
|
|
210
232
|
const rendered = renderPreTaskOutput(decision);
|
|
211
233
|
if (rendered)
|
|
212
234
|
process.stdout.write(rendered);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.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",
|