token-pilot 0.24.1 → 0.24.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "description": "Enforcement layer for token-efficient AI coding: MCP-first hook with structural denial summaries, SessionStart reminder, bless-agents CLI, and six tp-* subagents — works for every agent including those without MCP access.",
5
5
  "author": "token-pilot",
6
6
  "license": "MIT",
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ 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.24.2] - 2026-04-18
9
+
10
+ ### Changed — README manual-install section restored and expanded
11
+
12
+ In v0.20.2 I collapsed "Manual install" under a `<details>` to keep the README slim. That was overcorrection: users on Cursor / Codex / Cline / CI / team-shared configs had no quick "how do I add the MCP server?" answer visible.
13
+
14
+ Restored the section as a proper `## Manual MCP install` heading with **per-client examples**:
15
+
16
+ - **Claude Code** — both `claude mcp add` CLI and direct `.mcp.json` edit
17
+ - **Cursor** — `.cursor/mcp.json` example
18
+ - **Codex CLI** — `~/.codex/config.toml` TOML stanza
19
+ - **Cline (VS Code)** — `cline_mcp_settings.json` example
20
+ - **Any MCP-compatible client** — generic `command + args` pattern
21
+ - **Subagents install** (Claude-Code-only) — scope flags + `--force`
22
+ - **From source** — for contributors / vendored installs
23
+
24
+ Also added an env-var table (`TOKEN_PILOT_DENY_THRESHOLD`, `TOKEN_PILOT_ADAPTIVE_THRESHOLD`, `TOKEN_PILOT_BYPASS`, `TOKEN_PILOT_SKIP_POSTINSTALL`) — these used to be scattered across the codebase with no single reference.
25
+
26
+ Docs-only change. No code / test changes. 911 tests still green.
27
+
8
28
  ## [0.24.1] - 2026-04-18
9
29
 
10
30
  ### Fixed — two findings from v0.23.6 field verification
package/README.md CHANGED
@@ -46,10 +46,35 @@ This does two things:
46
46
 
47
47
  Restart your AI assistant to activate. The Read hook auto-installs the first time `token-pilot` starts inside Claude Code. Works with **Claude Code, Cursor, Codex, Antigravity, Cline**, and any MCP-compatible client.
48
48
 
49
- <details>
50
- <summary>Manual install (other MCP clients, from source, scripted CI)</summary>
49
+ ## Manual MCP install (per-client examples)
51
50
 
52
- Add to your `.mcp.json`:
51
+ If `init` isn't right for your setup — CI, non-TTY environments, editing a shared team config, or a client without an interactive installer — add Token Pilot as an MCP server directly. The server command is `npx -y token-pilot` on every client; only the config file shape differs.
52
+
53
+ ### Claude Code
54
+
55
+ Two equivalent paths:
56
+
57
+ ```bash
58
+ # Via CLI (recommended — handles scope + scoping)
59
+ claude mcp add token-pilot -- npx -y token-pilot
60
+ claude mcp add --scope user token-pilot -- npx -y token-pilot
61
+ claude mcp add --scope project token-pilot -- npx -y token-pilot
62
+
63
+ # Or edit .mcp.json directly (project-level) / ~/.mcp.json (user-level)
64
+ ```
65
+
66
+ ```json
67
+ {
68
+ "mcpServers": {
69
+ "token-pilot": { "command": "npx", "args": ["-y", "token-pilot"] },
70
+ "context-mode": { "command": "npx", "args": ["-y", "claude-context-mode"] }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ### Cursor
76
+
77
+ Cursor reads `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
53
78
 
54
79
  ```json
55
80
  {
@@ -59,27 +84,64 @@ Add to your `.mcp.json`:
59
84
  }
60
85
  ```
61
86
 
62
- Claude Code shortcuts:
87
+ ### Codex CLI
63
88
 
64
- ```bash
65
- claude mcp add token-pilot -- npx -y token-pilot
66
- claude mcp add --scope user token-pilot -- npx -y token-pilot
89
+ Codex reads `~/.codex/config.toml`:
90
+
91
+ ```toml
92
+ [mcp_servers.token-pilot]
93
+ command = "npx"
94
+ args = ["-y", "token-pilot"]
67
95
  ```
68
96
 
69
- From source:
97
+ ### Cline (VS Code)
98
+
99
+ Cline reads `cline_mcp_settings.json` (accessible via Cline panel → MCP Servers → Edit):
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "token-pilot": { "command": "npx", "args": ["-y", "token-pilot"] }
105
+ }
106
+ }
107
+ ```
108
+
109
+ ### Any MCP-compatible client
110
+
111
+ Use the generic MCP protocol — the server is a plain stdio process:
112
+
113
+ ```
114
+ command: npx
115
+ args: -y token-pilot
116
+ ```
117
+
118
+ No env vars required. Optional overrides:
119
+
120
+ | Env var | Default | Purpose |
121
+ |---|---|---|
122
+ | `TOKEN_PILOT_DENY_THRESHOLD` | `300` | Line count above which the Read hook intervenes |
123
+ | `TOKEN_PILOT_ADAPTIVE_THRESHOLD` | `false` | Enable the adaptive curve as the session burns |
124
+ | `TOKEN_PILOT_BYPASS` | unset | Set to `1` to disable the Read hook for one session |
125
+ | `TOKEN_PILOT_SKIP_POSTINSTALL` | unset | Skip the `ast-index` safety-net install at `npm install` time |
126
+
127
+ ### Subagents (Claude Code only)
128
+
129
+ `tp-*` subagents are a Claude Code feature. Other clients use only the MCP tools + Read hook. To install on a target scope explicitly:
70
130
 
71
131
  ```bash
72
- git clone https://github.com/Digital-Threads/token-pilot.git
73
- cd token-pilot && npm install && npm run build
74
- # then point .mcp.json at dist/index.js
132
+ npx token-pilot install-agents --scope=user # all projects
133
+ npx token-pilot install-agents --scope=project # this repo only
134
+ npx token-pilot install-agents --scope=user --force # re-apply after an update
75
135
  ```
76
136
 
77
- Non-interactive subagent install (CI):
137
+ ### From source (contributors / vendored installs)
78
138
 
79
139
  ```bash
80
- npx token-pilot install-agents --scope=user|project [--force]
140
+ git clone https://github.com/Digital-Threads/token-pilot.git
141
+ cd token-pilot && npm install && npm run build
142
+ # Point your client's config at dist/index.js:
143
+ # "command": "node", "args": ["/abs/path/to/token-pilot/dist/index.js"]
81
144
  ```
82
- </details>
83
145
 
84
146
  ## Modes
85
147
 
@@ -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.24.1"
11
+ token_pilot_version: "0.24.2"
12
12
  token_pilot_body_hash: 1ab0a379cfa6cf59c908be61c573ba208c0a8c47d7712bc5341c3600dd49ac3c
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.24.1"
13
+ token_pilot_version: "0.24.2"
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.24.1"
11
+ token_pilot_version: "0.24.2"
12
12
  token_pilot_body_hash: 559a0b61d20974bf33e35bc4c80dcf1b41d10d4df46cf9d05d3d5620713cd46f
13
13
  ---
14
14
 
@@ -9,7 +9,7 @@ tools:
9
9
  - mcp__token-pilot__related_files
10
10
  - Grep
11
11
  - Read
12
- token_pilot_version: "0.24.1"
12
+ token_pilot_version: "0.24.2"
13
13
  token_pilot_body_hash: 482e33ba566dc75d87753d980267fb2e01763e5924612efd54ec89993b5e12fd
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@ tools:
11
11
  - mcp__token-pilot__read_for_edit
12
12
  - Read
13
13
  - Bash
14
- token_pilot_version: "0.24.1"
14
+ token_pilot_version: "0.24.2"
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.24.1"
11
+ token_pilot_version: "0.24.2"
12
12
  token_pilot_body_hash: abf5f78b2d55e4611eb1cdde75d604993071f14ac7b5cd6b51ecd5cc1beddc38
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.24.1"
12
+ token_pilot_version: "0.24.2"
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.24.1"
14
+ token_pilot_version: "0.24.2"
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.24.1"
10
+ token_pilot_version: "0.24.2"
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.24.1"
13
+ token_pilot_version: "0.24.2"
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.24.1"
13
+ token_pilot_version: "0.24.2"
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.24.1"
13
+ token_pilot_version: "0.24.2"
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.24.1"
10
+ token_pilot_version: "0.24.2"
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.24.1"
11
+ token_pilot_version: "0.24.2"
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.24.1"
18
+ token_pilot_version: "0.24.2"
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.24.1"
12
+ token_pilot_version: "0.24.2"
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.24.1"
13
+ token_pilot_version: "0.24.2"
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.24.1"
10
+ token_pilot_version: "0.24.2"
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.24.1"
15
+ token_pilot_version: "0.24.2"
16
16
  token_pilot_body_hash: 533b3d2387e631a24291314b2b8ad8c3e01c19e0b9ec1d3fe08ae0011f0c73f9
17
17
  ---
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-pilot",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
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",