token-pilot 0.26.5 → 0.26.6

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 — save 60-90% tokens when AI reads code",
9
- "version": "0.26.5"
9
+ "version": "0.26.6"
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.26.5",
16
+ "version": "0.26.6",
17
17
  "author": {
18
18
  "name": "Digital-Threads"
19
19
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.26.5",
3
+ "version": "0.26.6",
4
4
  "description": "Saves 60-90% tokens when AI reads code. AST-aware lazy reading, symbol navigation, cross-session tool-usage analytics, 19 subagents with budget watchdog.",
5
5
  "author": {
6
6
  "name": "Digital-Threads",
package/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ All notable changes to Token Pilot will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.26.6] - 2026-04-18
9
+
10
+ ### Fixed — EPIPE stacktrace when piping CLI to `head`/`less`/`grep`
11
+
12
+ First field report after the plugin install worked: user ran
13
+ `npx token-pilot doctor | head -5` and got a red "Unhandled 'error' event"
14
+ stacktrace from node:events. Classic Node.js CLI wart — `console.log`
15
+ tries to write after `head` closed stdin, EPIPE propagates, no handler,
16
+ crash.
17
+
18
+ Fixed by swallowing `EPIPE` on stdout and stderr at process start
19
+ (`process.stdout.on('error', ...)`). Any CLI piped to `head | less | grep`
20
+ should behave this way; ours now does.
21
+
22
+ Confirmed: `node dist/index.js doctor | head -5` returns exit 0 with a
23
+ clean truncated output, no stacktrace.
24
+
8
25
  ## [0.26.5] - 2026-04-18
9
26
 
10
27
  ### Fixed — plugin installation path was broken since 2026-03-01
@@ -8,7 +8,7 @@ tools:
8
8
  - mcp__token-pilot__smart_diff
9
9
  - mcp__token-pilot__read_symbol
10
10
  - Bash
11
- token_pilot_version: "0.26.5"
11
+ token_pilot_version: "0.26.6"
12
12
  token_pilot_body_hash: f30fb3378463d6518041650487f1074b5411c6c3d6d7df315d21267f25f812d6
13
13
  ---
14
14
 
@@ -10,7 +10,7 @@ tools:
10
10
  - mcp__token-pilot__read_section
11
11
  - Grep
12
12
  - Read
13
- token_pilot_version: "0.26.5"
13
+ token_pilot_version: "0.26.6"
14
14
  token_pilot_body_hash: a740dc6c928d11d7c2c5fbaa953c50b0e35f2abc2dd6e5ef5117bf469a2d0207
15
15
  ---
16
16
 
@@ -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.26.5"
11
+ token_pilot_version: "0.26.6"
12
12
  token_pilot_body_hash: 559a0b61d20974bf33e35bc4c80dcf1b41d10d4df46cf9d05d3d5620713cd46f
13
13
  ---
14
14
 
@@ -10,7 +10,7 @@ tools:
10
10
  - Bash
11
11
  - Grep
12
12
  - Read
13
- token_pilot_version: "0.26.5"
13
+ token_pilot_version: "0.26.6"
14
14
  token_pilot_body_hash: 33798b70002a206c4547d08ff46caefe6dbe5a9300f94ab5dad4a57ab5fb4478
15
15
  ---
16
16
 
@@ -11,7 +11,7 @@ tools:
11
11
  - mcp__token-pilot__read_for_edit
12
12
  - Read
13
13
  - Bash
14
- token_pilot_version: "0.26.5"
14
+ token_pilot_version: "0.26.6"
15
15
  token_pilot_body_hash: 04864ae0bf0689863d7de9f4c0b44b293087b34098ad2771837e491d37dab953
16
16
  ---
17
17
 
@@ -8,7 +8,7 @@ tools:
8
8
  - mcp__token-pilot__find_unused
9
9
  - Bash
10
10
  - Read
11
- token_pilot_version: "0.26.5"
11
+ token_pilot_version: "0.26.6"
12
12
  token_pilot_body_hash: 6224d989835ea284985b474005b8b46052b7007c4610e661b10658286b5c6624
13
13
  ---
14
14
 
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__outline
10
10
  - Bash
11
11
  - Read
12
- token_pilot_version: "0.26.5"
12
+ token_pilot_version: "0.26.6"
13
13
  token_pilot_body_hash: b2daca007e959eaf26bf9a4d92ba36c3aa277a51de4ca4db674833d36acbe11b
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@ tools:
11
11
  - mcp__token-pilot__smart_read_many
12
12
  - mcp__token-pilot__read_symbols
13
13
  - Read
14
- token_pilot_version: "0.26.5"
14
+ token_pilot_version: "0.26.6"
15
15
  token_pilot_body_hash: 0be2620ce0303f912f6b3334f261d169f064970c0d16602fa1e76db4cb2ea441
16
16
  ---
17
17
 
@@ -7,7 +7,7 @@ tools:
7
7
  - mcp__token-pilot__find_usages
8
8
  - mcp__token-pilot__read_symbol
9
9
  - Bash
10
- token_pilot_version: "0.26.5"
10
+ token_pilot_version: "0.26.6"
11
11
  token_pilot_body_hash: 420ffc423c7479a8d4e1b226cf73eb98d6d41388317c74a950d7f3b6240b6786
12
12
  ---
13
13
 
@@ -10,7 +10,7 @@ tools:
10
10
  - mcp__token-pilot__smart_read_many
11
11
  - Grep
12
12
  - Glob
13
- token_pilot_version: "0.26.5"
13
+ token_pilot_version: "0.26.6"
14
14
  token_pilot_body_hash: cf32cdee777430ecc6732db32b3f883a685c8a02b6dc93379d71b15555e79b3e
15
15
  ---
16
16
 
@@ -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.26.5"
13
+ token_pilot_version: "0.26.6"
14
14
  token_pilot_body_hash: ae0b86eaffaf34bf283b94b5572481fa8c2d6a2a25193f1173b70bef0fbe1919
15
15
  ---
16
16
 
@@ -10,7 +10,7 @@ tools:
10
10
  - mcp__token-pilot__smart_read_many
11
11
  - mcp__token-pilot__read_for_edit
12
12
  - Read
13
- token_pilot_version: "0.26.5"
13
+ token_pilot_version: "0.26.6"
14
14
  token_pilot_body_hash: eb9fb7f87d9ab61c5b18248a40b283008b5d73414ddb2e3094ff0826e7e463d0
15
15
  ---
16
16
 
@@ -7,7 +7,7 @@ tools:
7
7
  - mcp__token-pilot__read_diff
8
8
  - mcp__token-pilot__outline
9
9
  - mcp__token-pilot__read_symbol
10
- token_pilot_version: "0.26.5"
10
+ token_pilot_version: "0.26.6"
11
11
  token_pilot_body_hash: a058518619fd6e2def0c9226f6c70438a5e0a80efe680c935414ecd7e1b14a4f
12
12
  ---
13
13
 
@@ -8,7 +8,7 @@ tools:
8
8
  - mcp__token-pilot__outline
9
9
  - mcp__token-pilot__module_info
10
10
  - Bash
11
- token_pilot_version: "0.26.5"
11
+ token_pilot_version: "0.26.6"
12
12
  token_pilot_body_hash: 72b635f511492188587d6cb6fd70f936ae34cf5df1f9cd9eff7849cf1231e185
13
13
  ---
14
14
 
@@ -15,7 +15,7 @@ tools:
15
15
  - Grep
16
16
  - Glob
17
17
  - Bash
18
- token_pilot_version: "0.26.5"
18
+ token_pilot_version: "0.26.6"
19
19
  token_pilot_body_hash: d665d57085db38077d0eeab74bda8bdb84c9ad59688495486059af5d3fac67cf
20
20
  ---
21
21
 
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__session_budget
10
10
  - Bash
11
11
  - Read
12
- token_pilot_version: "0.26.5"
12
+ token_pilot_version: "0.26.6"
13
13
  token_pilot_body_hash: 35b7f333a28c94e7dc89fcc3171703c4b466225f55cd5c701b7592f4f6486440
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.26.5"
13
+ token_pilot_version: "0.26.6"
14
14
  token_pilot_body_hash: cc3d1f46fdb95ac3caf9344f69f1ddcd5ce5a175ee70aa150b7f9fda93edb152
15
15
  ---
16
16
 
@@ -7,7 +7,7 @@ tools:
7
7
  - mcp__token-pilot__read_range
8
8
  - mcp__token-pilot__find_usages
9
9
  - mcp__token-pilot__read_symbol
10
- token_pilot_version: "0.26.5"
10
+ token_pilot_version: "0.26.6"
11
11
  token_pilot_body_hash: 255912c47661d203c8f9a735237bc419f97e937f788a01811bbe126ee3dd5878
12
12
  ---
13
13
 
@@ -12,7 +12,7 @@ tools:
12
12
  - Write
13
13
  - Edit
14
14
  - Bash
15
- token_pilot_version: "0.26.5"
15
+ token_pilot_version: "0.26.6"
16
16
  token_pilot_body_hash: 533b3d2387e631a24291314b2b8ad8c3e01c19e0b9ec1d3fe08ae0011f0c73f9
17
17
  ---
18
18
 
package/dist/index.js CHANGED
@@ -1,4 +1,20 @@
1
1
  #!/usr/bin/env node
2
+ // v0.26.6 — handle EPIPE silently. Piping `token-pilot doctor | head -5`
3
+ // causes EPIPE once head closes stdin. Classic Node.js CLI wart. Default
4
+ // behaviour is a red "throw er; // Unhandled 'error' event" stacktrace,
5
+ // which scares users who just wanted a quick look. Standard fix: swallow
6
+ // EPIPE on stdout/stderr and exit 0 — any CLI piped to head|less|grep
7
+ // behaves this way.
8
+ process.stdout.on("error", (err) => {
9
+ if (err.code === "EPIPE")
10
+ process.exit(0);
11
+ throw err;
12
+ });
13
+ process.stderr.on("error", (err) => {
14
+ if (err.code === "EPIPE")
15
+ process.exit(0);
16
+ throw err;
17
+ });
2
18
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
19
  import { readFileSync, realpathSync, appendFileSync, mkdirSync } from "node:fs";
4
20
  import { join } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.26.5",
3
+ "version": "0.26.6",
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",