token-pilot 0.42.2 → 0.42.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/cli/install-statusline.d.ts +23 -4
- package/dist/cli/install-statusline.js +62 -55
- 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.42.
|
|
9
|
+
"version": "0.42.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.42.
|
|
16
|
+
"version": "0.42.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.42.
|
|
3
|
+
"version": "0.42.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",
|
|
@@ -9,7 +9,7 @@ tools:
|
|
|
9
9
|
- mcp__token-pilot__read_symbol
|
|
10
10
|
- Bash
|
|
11
11
|
model: haiku
|
|
12
|
-
token_pilot_version: "0.42.
|
|
12
|
+
token_pilot_version: "0.42.3"
|
|
13
13
|
token_pilot_body_hash: dd184501203fa7f3c73f419c4ffbe33c4be75400cb64a7a51733a3fe23f6e085
|
|
14
14
|
requiredMcpServers:
|
|
15
15
|
- "token-pilot"
|
|
@@ -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.42.
|
|
11
|
+
token_pilot_version: "0.42.3"
|
|
12
12
|
token_pilot_body_hash: de64a406b5176de19f7422619c7de7949b1f28865f225402c9cea9255f377428
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
package/agents/tp-debugger.md
CHANGED
package/agents/tp-dep-health.md
CHANGED
package/agents/tp-doc-writer.md
CHANGED
|
@@ -12,7 +12,7 @@ tools:
|
|
|
12
12
|
- mcp__token-pilot__read_symbols
|
|
13
13
|
- Read
|
|
14
14
|
model: sonnet
|
|
15
|
-
token_pilot_version: "0.42.
|
|
15
|
+
token_pilot_version: "0.42.3"
|
|
16
16
|
token_pilot_body_hash: 351a987e11eba63852f5431a16d8eb53104f4f689f82fdcc5a2bf4db948ba92f
|
|
17
17
|
requiredMcpServers:
|
|
18
18
|
- "token-pilot"
|
|
@@ -8,7 +8,7 @@ tools:
|
|
|
8
8
|
- mcp__token-pilot__read_symbol
|
|
9
9
|
- Bash
|
|
10
10
|
model: inherit
|
|
11
|
-
token_pilot_version: "0.42.
|
|
11
|
+
token_pilot_version: "0.42.3"
|
|
12
12
|
token_pilot_body_hash: de5722bfea374eaab096c1ae635c37879e7a91370ee3cd0532f4240be03c91eb
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
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.42.
|
|
13
|
+
token_pilot_version: "0.42.3"
|
|
14
14
|
token_pilot_body_hash: 832e95633fbc8e9b0c10f3e540a327d4be062fb4b3f17a6cce6be13f414e2927
|
|
15
15
|
requiredMcpServers:
|
|
16
16
|
- "token-pilot"
|
package/agents/tp-pr-reviewer.md
CHANGED
|
@@ -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.42.
|
|
14
|
+
token_pilot_version: "0.42.3"
|
|
15
15
|
token_pilot_body_hash: f83f50d05b4f70285ae7afed2b1a406fc436df56e61a0aedbfb31edc7f2b6e66
|
|
16
16
|
requiredMcpServers:
|
|
17
17
|
- "token-pilot"
|
|
@@ -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.42.
|
|
11
|
+
token_pilot_version: "0.42.3"
|
|
12
12
|
token_pilot_body_hash: c5f6fc122c89e16e5cf774045f92169ee3468555320b898171ba13eca5323550
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
|
@@ -9,7 +9,7 @@ tools:
|
|
|
9
9
|
- mcp__token-pilot__module_info
|
|
10
10
|
- Bash
|
|
11
11
|
model: sonnet
|
|
12
|
-
token_pilot_version: "0.42.
|
|
12
|
+
token_pilot_version: "0.42.3"
|
|
13
13
|
token_pilot_body_hash: 8ef3c3341cbfed4eb8dd130126a9683edc57e378c92ff0ca764d584fd941c55c
|
|
14
14
|
requiredMcpServers:
|
|
15
15
|
- "token-pilot"
|
package/agents/tp-run.md
CHANGED
package/agents/tp-spec-writer.md
CHANGED
|
@@ -10,7 +10,7 @@ tools:
|
|
|
10
10
|
- mcp__token-pilot__test_summary
|
|
11
11
|
- Glob
|
|
12
12
|
- Grep
|
|
13
|
-
token_pilot_version: "0.42.
|
|
13
|
+
token_pilot_version: "0.42.3"
|
|
14
14
|
token_pilot_body_hash: be81eed53a3720d146cf89e4a14a7a56577633f7c84c234c412ab70d64c05b11
|
|
15
15
|
requiredMcpServers:
|
|
16
16
|
- "token-pilot"
|
package/agents/tp-test-triage.md
CHANGED
|
@@ -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.42.
|
|
11
|
+
token_pilot_version: "0.42.3"
|
|
12
12
|
token_pilot_body_hash: 362ecf4cb03b059421ea26933473700900073dc38b3a7fe271208dfb1ae14f90
|
|
13
13
|
requiredMcpServers:
|
|
14
14
|
- "token-pilot"
|
package/agents/tp-test-writer.md
CHANGED
|
@@ -22,18 +22,37 @@
|
|
|
22
22
|
* want to replace a custom statusLine.
|
|
23
23
|
*/
|
|
24
24
|
import type { StatuslineStatus } from "./ecosystem-check.js";
|
|
25
|
-
/**
|
|
25
|
+
/** TP-only badge command (DEFAULT — just token-pilot's [TP] badge). */
|
|
26
|
+
export declare const TP_ONLY_COMMAND = "bash \"$(ls -t ~/.claude/plugins/cache/token-pilot/token-pilot/*/hooks/tp-statusline.sh 2>/dev/null | head -1)\"";
|
|
27
|
+
/**
|
|
28
|
+
* Chain command — renders token-pilot's badge AND any other ecosystem
|
|
29
|
+
* badge (caveman) side by side. Opt-in via `--chain`.
|
|
30
|
+
*/
|
|
26
31
|
export declare const CHAIN_COMMAND = "bash \"$(ls -t ~/.claude/plugins/cache/token-pilot/token-pilot/*/hooks/statusline-chain.sh 2>/dev/null | head -1)\"";
|
|
27
32
|
export interface InstallStatuslineResult {
|
|
28
33
|
action: "installed" | "upgraded" | "noop" | "skipped";
|
|
29
34
|
message: string;
|
|
30
35
|
}
|
|
36
|
+
export interface DecideStatuslineOpts {
|
|
37
|
+
force: boolean;
|
|
38
|
+
/** `--chain`: render caveman + [TP] together. Default false → [TP] only. */
|
|
39
|
+
chain: boolean;
|
|
40
|
+
}
|
|
31
41
|
/**
|
|
32
|
-
* Pure decision: given the current statusline status, what
|
|
33
|
-
* installer do
|
|
42
|
+
* Pure decision: given the current statusline status + options, what
|
|
43
|
+
* should the installer do and which command should it write?
|
|
44
|
+
*
|
|
45
|
+
* v0.42.3 — DEFAULT is now the TP-only badge. The previous default
|
|
46
|
+
* silently installed the chain wrapper, which also rendered caveman's
|
|
47
|
+
* badge — presumptuous (we install OUR badge, we don't decide that a
|
|
48
|
+
* third-party tool's badge belongs in your status bar). `--chain`
|
|
49
|
+
* opts into the combined view. token-pilot's own previous choices
|
|
50
|
+
* (tp-only ↔ chain) are switched freely; a non-token-pilot statusLine
|
|
51
|
+
* (caveman-only, custom) is never clobbered without `--force`.
|
|
34
52
|
*/
|
|
35
|
-
export declare function decideStatuslineAction(status: StatuslineStatus,
|
|
53
|
+
export declare function decideStatuslineAction(status: StatuslineStatus, opts: DecideStatuslineOpts): {
|
|
36
54
|
write: boolean;
|
|
55
|
+
command: string;
|
|
37
56
|
result: InstallStatuslineResult;
|
|
38
57
|
};
|
|
39
58
|
/**
|
|
@@ -24,70 +24,73 @@
|
|
|
24
24
|
import { readFile, writeFile, mkdir, access } from "node:fs/promises";
|
|
25
25
|
import { homedir } from "node:os";
|
|
26
26
|
import { dirname, join } from "node:path";
|
|
27
|
-
/**
|
|
27
|
+
/** TP-only badge command (DEFAULT — just token-pilot's [TP] badge). */
|
|
28
|
+
export const TP_ONLY_COMMAND = 'bash "$(ls -t ~/.claude/plugins/cache/token-pilot/token-pilot/*/hooks/tp-statusline.sh 2>/dev/null | head -1)"';
|
|
29
|
+
/**
|
|
30
|
+
* Chain command — renders token-pilot's badge AND any other ecosystem
|
|
31
|
+
* badge (caveman) side by side. Opt-in via `--chain`.
|
|
32
|
+
*/
|
|
28
33
|
export const CHAIN_COMMAND = 'bash "$(ls -t ~/.claude/plugins/cache/token-pilot/token-pilot/*/hooks/statusline-chain.sh 2>/dev/null | head -1)"';
|
|
29
34
|
/**
|
|
30
|
-
* Pure decision: given the current statusline status, what
|
|
31
|
-
* installer do
|
|
35
|
+
* Pure decision: given the current statusline status + options, what
|
|
36
|
+
* should the installer do and which command should it write?
|
|
37
|
+
*
|
|
38
|
+
* v0.42.3 — DEFAULT is now the TP-only badge. The previous default
|
|
39
|
+
* silently installed the chain wrapper, which also rendered caveman's
|
|
40
|
+
* badge — presumptuous (we install OUR badge, we don't decide that a
|
|
41
|
+
* third-party tool's badge belongs in your status bar). `--chain`
|
|
42
|
+
* opts into the combined view. token-pilot's own previous choices
|
|
43
|
+
* (tp-only ↔ chain) are switched freely; a non-token-pilot statusLine
|
|
44
|
+
* (caveman-only, custom) is never clobbered without `--force`.
|
|
32
45
|
*/
|
|
33
|
-
export function decideStatuslineAction(status,
|
|
46
|
+
export function decideStatuslineAction(status, opts) {
|
|
47
|
+
const command = opts.chain ? CHAIN_COMMAND : TP_ONLY_COMMAND;
|
|
48
|
+
const badgeDesc = opts.chain ? "caveman + [TP] badges" : "[TP] badge";
|
|
49
|
+
const noWrite = (action, message) => ({
|
|
50
|
+
write: false,
|
|
51
|
+
command,
|
|
52
|
+
result: { action, message },
|
|
53
|
+
});
|
|
54
|
+
const doWrite = (action, message) => ({
|
|
55
|
+
write: true,
|
|
56
|
+
command,
|
|
57
|
+
result: { action, message },
|
|
58
|
+
});
|
|
34
59
|
switch (status) {
|
|
35
60
|
case "not-configured":
|
|
36
|
-
return {
|
|
37
|
-
write: true,
|
|
38
|
-
result: {
|
|
39
|
-
action: "installed",
|
|
40
|
-
message: "statusLine configured — the [TP] badge will show in your status bar (restart Claude Code).",
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
case "configured-caveman-only":
|
|
61
|
+
return doWrite("installed", `statusLine configured — the ${badgeDesc} will show in your status bar (restart Claude Code).`);
|
|
44
62
|
case "configured-tp-only":
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
message: "statusLine upgraded to the chain wrapper — both caveman and [TP] badges now render side by side.",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
63
|
+
// Already ours. Switch only if the user asked for the chain.
|
|
64
|
+
return opts.chain
|
|
65
|
+
? doWrite("upgraded", "statusLine upgraded to the chain wrapper — caveman + [TP] now render side by side.")
|
|
66
|
+
: noWrite("noop", "statusLine already shows the [TP] badge. Nothing to do.");
|
|
52
67
|
case "configured-chain":
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
// Also ours. Switch to tp-only unless the user wants the chain.
|
|
69
|
+
return opts.chain
|
|
70
|
+
? noWrite("noop", "statusLine already uses the chain wrapper. Nothing to do.")
|
|
71
|
+
: doWrite("installed", "statusLine switched to the [TP]-only badge (caveman badge removed from the status bar).");
|
|
72
|
+
case "configured-caveman-only":
|
|
73
|
+
// Caveman's own statusline — NOT ours. Don't replace it silently.
|
|
74
|
+
if (opts.chain) {
|
|
75
|
+
return doWrite("upgraded", "statusLine upgraded to the chain wrapper — keeps caveman and adds [TP].");
|
|
76
|
+
}
|
|
77
|
+
if (opts.force) {
|
|
78
|
+
return doWrite("installed", "Replaced caveman's statusLine with the [TP]-only badge (--force).");
|
|
79
|
+
}
|
|
80
|
+
return noWrite("skipped", "Your statusLine is caveman's. Left untouched. Run with --chain to show " +
|
|
81
|
+
"both badges, or --force to replace it with [TP] only.");
|
|
60
82
|
case "configured-other":
|
|
61
|
-
if (force) {
|
|
62
|
-
return {
|
|
63
|
-
write: true,
|
|
64
|
-
result: {
|
|
65
|
-
action: "installed",
|
|
66
|
-
message: "Replaced your custom statusLine with the token-pilot chain wrapper (--force).",
|
|
67
|
-
},
|
|
68
|
-
};
|
|
83
|
+
if (opts.force) {
|
|
84
|
+
return doWrite("installed", `Replaced your custom statusLine with the ${badgeDesc} (--force).`);
|
|
69
85
|
}
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
action: "skipped",
|
|
74
|
-
message: "You already have a custom statusLine — left untouched. " +
|
|
75
|
-
"To show the [TP] badge too, set statusLine.command to:\n " +
|
|
76
|
-
CHAIN_COMMAND +
|
|
77
|
-
"\nor re-run with --force to replace it.",
|
|
78
|
-
},
|
|
79
|
-
};
|
|
86
|
+
return noWrite("skipped", "You already have a custom statusLine — left untouched. To use the " +
|
|
87
|
+
`${badgeDesc}, re-run with --force, or set statusLine.command to:\n ` +
|
|
88
|
+
command);
|
|
80
89
|
case "unknown":
|
|
81
90
|
default:
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
action: "skipped",
|
|
86
|
-
message: "Could not read ~/.claude/settings.json as JSON — not modifying it. " +
|
|
87
|
-
"Add this manually under \"statusLine\":\n " +
|
|
88
|
-
CHAIN_COMMAND,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
+
return noWrite("skipped", 'Could not read ~/.claude/settings.json as JSON — not modifying it. ' +
|
|
92
|
+
'Add this manually under "statusLine":\n ' +
|
|
93
|
+
command);
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
/**
|
|
@@ -126,9 +129,13 @@ export async function classifyStatuslineAt(settingsPath) {
|
|
|
126
129
|
*/
|
|
127
130
|
export async function handleInstallStatusline(argv, opts) {
|
|
128
131
|
const force = argv.includes("--force");
|
|
132
|
+
const chain = argv.includes("--chain");
|
|
129
133
|
const settingsPath = opts?.settingsPath ?? join(homedir(), ".claude", "settings.json");
|
|
130
134
|
const status = await classifyStatuslineAt(settingsPath);
|
|
131
|
-
const { write, result } = decideStatuslineAction(status,
|
|
135
|
+
const { write, command, result } = decideStatuslineAction(status, {
|
|
136
|
+
force,
|
|
137
|
+
chain,
|
|
138
|
+
});
|
|
132
139
|
if (!write) {
|
|
133
140
|
process.stdout.write(`[token-pilot] ${result.message}\n`);
|
|
134
141
|
return 0;
|
|
@@ -145,7 +152,7 @@ export async function handleInstallStatusline(argv, opts) {
|
|
|
145
152
|
catch {
|
|
146
153
|
/* fresh file — start clean (only reached when status was safe) */
|
|
147
154
|
}
|
|
148
|
-
settings.statusLine = { type: "command", command
|
|
155
|
+
settings.statusLine = { type: "command", command };
|
|
149
156
|
try {
|
|
150
157
|
await mkdir(dirname(settingsPath), { recursive: true });
|
|
151
158
|
await writeFile(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.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",
|