token-pilot 0.19.0 → 0.19.1
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ 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.19.1] - 2026-04-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`decisions` field in `session_snapshot`** — stores key decisions with reasoning (e.g., "removed sysfee step — caused double counting"). Prevents the model from revisiting rejected approaches after context compaction.
|
|
12
|
+
|
|
8
13
|
## [0.19.0] - 2026-04-15
|
|
9
14
|
|
|
10
15
|
### Added
|
package/README.md
CHANGED
|
@@ -215,7 +215,7 @@ For more control, you can add rules to your project:
|
|
|
215
215
|
|
|
216
216
|
| Tool | Description |
|
|
217
217
|
|------|-------------|
|
|
218
|
-
| `session_snapshot` | Capture session state as a compact markdown block (<200 tokens): goal, confirmed facts, relevant files, blockers, next step.
|
|
218
|
+
| `session_snapshot` | Capture session state as a compact markdown block (<200 tokens): goal, decisions (with reasoning), confirmed facts, relevant files, blockers, next step. Decisions field prevents revisiting rejected approaches after compaction. |
|
|
219
219
|
| `session_analytics` | Token savings report: total saved, per-tool breakdown, top files, per-intent breakdown, decision insights, policy advisories. |
|
|
220
220
|
|
|
221
221
|
## CLI Commands
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export function handleSessionSnapshot(args) {
|
|
2
2
|
const lines = ['## Session State'];
|
|
3
3
|
lines.push(`**Goal:** ${args.goal}`);
|
|
4
|
+
if (args.decisions?.length) {
|
|
5
|
+
lines.push('**Decisions:**');
|
|
6
|
+
for (const item of args.decisions) {
|
|
7
|
+
lines.push(`- ${item}`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
4
10
|
if (args.confirmed?.length) {
|
|
5
11
|
lines.push('**Confirmed:**');
|
|
6
12
|
for (const item of args.confirmed) {
|
|
@@ -70,6 +70,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
70
70
|
runner?: undefined;
|
|
71
71
|
timeout?: undefined;
|
|
72
72
|
goal?: undefined;
|
|
73
|
+
decisions?: undefined;
|
|
73
74
|
confirmed?: undefined;
|
|
74
75
|
files?: undefined;
|
|
75
76
|
blocked?: undefined;
|
|
@@ -144,6 +145,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
144
145
|
runner?: undefined;
|
|
145
146
|
timeout?: undefined;
|
|
146
147
|
goal?: undefined;
|
|
148
|
+
decisions?: undefined;
|
|
147
149
|
confirmed?: undefined;
|
|
148
150
|
files?: undefined;
|
|
149
151
|
blocked?: undefined;
|
|
@@ -218,6 +220,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
218
220
|
runner?: undefined;
|
|
219
221
|
timeout?: undefined;
|
|
220
222
|
goal?: undefined;
|
|
223
|
+
decisions?: undefined;
|
|
221
224
|
confirmed?: undefined;
|
|
222
225
|
files?: undefined;
|
|
223
226
|
blocked?: undefined;
|
|
@@ -282,6 +285,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
282
285
|
runner?: undefined;
|
|
283
286
|
timeout?: undefined;
|
|
284
287
|
goal?: undefined;
|
|
288
|
+
decisions?: undefined;
|
|
285
289
|
confirmed?: undefined;
|
|
286
290
|
files?: undefined;
|
|
287
291
|
blocked?: undefined;
|
|
@@ -343,6 +347,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
343
347
|
runner?: undefined;
|
|
344
348
|
timeout?: undefined;
|
|
345
349
|
goal?: undefined;
|
|
350
|
+
decisions?: undefined;
|
|
346
351
|
confirmed?: undefined;
|
|
347
352
|
files?: undefined;
|
|
348
353
|
blocked?: undefined;
|
|
@@ -404,6 +409,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
404
409
|
runner?: undefined;
|
|
405
410
|
timeout?: undefined;
|
|
406
411
|
goal?: undefined;
|
|
412
|
+
decisions?: undefined;
|
|
407
413
|
confirmed?: undefined;
|
|
408
414
|
files?: undefined;
|
|
409
415
|
blocked?: undefined;
|
|
@@ -489,6 +495,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
489
495
|
runner?: undefined;
|
|
490
496
|
timeout?: undefined;
|
|
491
497
|
goal?: undefined;
|
|
498
|
+
decisions?: undefined;
|
|
492
499
|
confirmed?: undefined;
|
|
493
500
|
files?: undefined;
|
|
494
501
|
blocked?: undefined;
|
|
@@ -553,6 +560,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
553
560
|
runner?: undefined;
|
|
554
561
|
timeout?: undefined;
|
|
555
562
|
goal?: undefined;
|
|
563
|
+
decisions?: undefined;
|
|
556
564
|
confirmed?: undefined;
|
|
557
565
|
files?: undefined;
|
|
558
566
|
blocked?: undefined;
|
|
@@ -632,6 +640,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
632
640
|
runner?: undefined;
|
|
633
641
|
timeout?: undefined;
|
|
634
642
|
goal?: undefined;
|
|
643
|
+
decisions?: undefined;
|
|
635
644
|
confirmed?: undefined;
|
|
636
645
|
files?: undefined;
|
|
637
646
|
blocked?: undefined;
|
|
@@ -694,6 +703,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
694
703
|
runner?: undefined;
|
|
695
704
|
timeout?: undefined;
|
|
696
705
|
goal?: undefined;
|
|
706
|
+
decisions?: undefined;
|
|
697
707
|
confirmed?: undefined;
|
|
698
708
|
files?: undefined;
|
|
699
709
|
blocked?: undefined;
|
|
@@ -752,6 +762,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
752
762
|
runner?: undefined;
|
|
753
763
|
timeout?: undefined;
|
|
754
764
|
goal?: undefined;
|
|
765
|
+
decisions?: undefined;
|
|
755
766
|
confirmed?: undefined;
|
|
756
767
|
files?: undefined;
|
|
757
768
|
blocked?: undefined;
|
|
@@ -816,6 +827,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
816
827
|
runner?: undefined;
|
|
817
828
|
timeout?: undefined;
|
|
818
829
|
goal?: undefined;
|
|
830
|
+
decisions?: undefined;
|
|
819
831
|
confirmed?: undefined;
|
|
820
832
|
files?: undefined;
|
|
821
833
|
blocked?: undefined;
|
|
@@ -874,6 +886,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
874
886
|
runner?: undefined;
|
|
875
887
|
timeout?: undefined;
|
|
876
888
|
goal?: undefined;
|
|
889
|
+
decisions?: undefined;
|
|
877
890
|
confirmed?: undefined;
|
|
878
891
|
files?: undefined;
|
|
879
892
|
blocked?: undefined;
|
|
@@ -938,6 +951,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
938
951
|
runner?: undefined;
|
|
939
952
|
timeout?: undefined;
|
|
940
953
|
goal?: undefined;
|
|
954
|
+
decisions?: undefined;
|
|
941
955
|
confirmed?: undefined;
|
|
942
956
|
files?: undefined;
|
|
943
957
|
blocked?: undefined;
|
|
@@ -1009,6 +1023,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1009
1023
|
runner?: undefined;
|
|
1010
1024
|
timeout?: undefined;
|
|
1011
1025
|
goal?: undefined;
|
|
1026
|
+
decisions?: undefined;
|
|
1012
1027
|
confirmed?: undefined;
|
|
1013
1028
|
files?: undefined;
|
|
1014
1029
|
blocked?: undefined;
|
|
@@ -1071,6 +1086,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1071
1086
|
runner?: undefined;
|
|
1072
1087
|
timeout?: undefined;
|
|
1073
1088
|
goal?: undefined;
|
|
1089
|
+
decisions?: undefined;
|
|
1074
1090
|
confirmed?: undefined;
|
|
1075
1091
|
files?: undefined;
|
|
1076
1092
|
blocked?: undefined;
|
|
@@ -1136,6 +1152,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1136
1152
|
runner?: undefined;
|
|
1137
1153
|
timeout?: undefined;
|
|
1138
1154
|
goal?: undefined;
|
|
1155
|
+
decisions?: undefined;
|
|
1139
1156
|
confirmed?: undefined;
|
|
1140
1157
|
files?: undefined;
|
|
1141
1158
|
blocked?: undefined;
|
|
@@ -1201,6 +1218,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1201
1218
|
runner?: undefined;
|
|
1202
1219
|
timeout?: undefined;
|
|
1203
1220
|
goal?: undefined;
|
|
1221
|
+
decisions?: undefined;
|
|
1204
1222
|
confirmed?: undefined;
|
|
1205
1223
|
files?: undefined;
|
|
1206
1224
|
blocked?: undefined;
|
|
@@ -1265,6 +1283,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1265
1283
|
runner?: undefined;
|
|
1266
1284
|
timeout?: undefined;
|
|
1267
1285
|
goal?: undefined;
|
|
1286
|
+
decisions?: undefined;
|
|
1268
1287
|
confirmed?: undefined;
|
|
1269
1288
|
files?: undefined;
|
|
1270
1289
|
blocked?: undefined;
|
|
@@ -1330,6 +1349,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1330
1349
|
ref?: undefined;
|
|
1331
1350
|
count?: undefined;
|
|
1332
1351
|
goal?: undefined;
|
|
1352
|
+
decisions?: undefined;
|
|
1333
1353
|
confirmed?: undefined;
|
|
1334
1354
|
files?: undefined;
|
|
1335
1355
|
blocked?: undefined;
|
|
@@ -1347,6 +1367,13 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1347
1367
|
type: string;
|
|
1348
1368
|
description: string;
|
|
1349
1369
|
};
|
|
1370
|
+
decisions: {
|
|
1371
|
+
type: string;
|
|
1372
|
+
items: {
|
|
1373
|
+
type: string;
|
|
1374
|
+
};
|
|
1375
|
+
description: string;
|
|
1376
|
+
};
|
|
1350
1377
|
confirmed: {
|
|
1351
1378
|
type: string;
|
|
1352
1379
|
items: {
|
|
@@ -29,7 +29,7 @@ export const MCP_INSTRUCTIONS = [
|
|
|
29
29
|
'17. Module architecture → module_info (deps, dependents, public API)',
|
|
30
30
|
'18. Read markdown/yaml/json/csv section → read_section (loads one heading/key/row-range, NOT the whole file)',
|
|
31
31
|
' - For editing sections: read_for_edit(path, section="Section Name")',
|
|
32
|
-
'19. Long session / before compaction → session_snapshot (capture goal, confirmed facts, files, next step as <200 token block)',
|
|
32
|
+
'19. Long session / before compaction → session_snapshot (capture goal, decisions, confirmed facts, files, next step as <200 token block)',
|
|
33
33
|
' - Budget-constrained? Use smart_read(max_tokens=N) to auto-downgrade output size',
|
|
34
34
|
'',
|
|
35
35
|
'USE DEFAULT TOOLS ONLY FOR: regex text search → Grep | exact raw content → Read | non-code configs → Read',
|
|
@@ -362,6 +362,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
362
362
|
type: 'object',
|
|
363
363
|
properties: {
|
|
364
364
|
goal: { type: 'string', description: 'Session goal — what and why' },
|
|
365
|
+
decisions: { type: 'array', items: { type: 'string' }, description: 'Key decisions made and why (e.g., "removed sysfee step — caused double counting"). Prevents revisiting rejected approaches.' },
|
|
365
366
|
confirmed: { type: 'array', items: { type: 'string' }, description: 'Established facts (what has been verified)' },
|
|
366
367
|
files: { type: 'array', items: { type: 'string' }, description: 'Relevant file paths' },
|
|
367
368
|
blocked: { type: 'string', description: 'Current blocker or obstacle' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-pilot",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
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",
|