pi-context-kit 0.4.0 → 0.4.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 +44 -0
- package/README.md +32 -16
- package/package.json +5 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Pi shows the entries newer than your installed version after `pi update`.
|
|
4
|
+
|
|
5
|
+
## [0.4.1] - 2026-11-13
|
|
6
|
+
|
|
7
|
+
- The README has a quick start and a troubleshooting section. No change to the extension.
|
|
8
|
+
|
|
9
|
+
## [0.4.0] - 2026-11-13
|
|
10
|
+
|
|
11
|
+
- The footer shows how full the context is and when cleanup starts, for example `Context 62% · cleanup at 75%`.
|
|
12
|
+
- `/context-kit` opens a panel to turn cleanup on or off, and to choose when and how to clean up.
|
|
13
|
+
- Settings move to their own file: `~/.pi/agent/context-kit.json`, and `.pi/context-kit.json` in a trusted project. At the first start, the `contextKit` entry of Pi's `settings.json` moves there with the same behavior.
|
|
14
|
+
- The default threshold is now `75%`. Set `"threshold": "pi"` to wait for Pi's limit as before.
|
|
15
|
+
|
|
16
|
+
## [0.3.2] - 2026-11-11
|
|
17
|
+
|
|
18
|
+
- Documentation only.
|
|
19
|
+
|
|
20
|
+
## [0.3.1] - 2026-11-11
|
|
21
|
+
|
|
22
|
+
- Documentation and package metadata only.
|
|
23
|
+
|
|
24
|
+
## [0.3.0] - 2026-11-11
|
|
25
|
+
|
|
26
|
+
- Breaking: the `staleSuffixTokens` setting is removed. Remove it from your settings.
|
|
27
|
+
- Supports Pi 1.5. Pi 1.0.3 is still the oldest supported version.
|
|
28
|
+
- Requires Node.js 22.19 or later, as Pi does.
|
|
29
|
+
- pi-context-kit edits the context only at the threshold, in one batch, so the provider's prompt cache breaks less often.
|
|
30
|
+
- After a handoff note, shaking runs only when pruning is not enough.
|
|
31
|
+
- With Pi's compaction off, pi-context-kit changes the context only on `/compact`.
|
|
32
|
+
- Background handoff notes are cancelled after session-tree navigation.
|
|
33
|
+
|
|
34
|
+
## [0.2.1] - 2026-10-06
|
|
35
|
+
|
|
36
|
+
- The README explains each term, the steps of a session, and each setting.
|
|
37
|
+
|
|
38
|
+
## [0.2.0] - 2026-10-06
|
|
39
|
+
|
|
40
|
+
- Handoff notes use the session's thinking level and tool choice, so Anthropic can reuse the cached conversation.
|
|
41
|
+
- An earlier threshold compacts at the end of a turn, even when no handoff note is ready.
|
|
42
|
+
- Recall regex searches are bounded and can be cancelled.
|
|
43
|
+
- Handoff notes that are truncated, too large or that call a tool are rejected.
|
|
44
|
+
- A failed threshold note is not retried until the next compaction.
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
# pi-context-kit
|
|
1
|
+
# pi-context-kit: long Pi sessions that stay sharp
|
|
2
2
|
|
|
3
|
-
[](https://github.com/HugoLopes45/pi-context-kit/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/pi-context-kit)
|
|
5
|
+
[](https://pi.dev/packages/pi-context-kit)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
[](LICENSE)
|
|
6
8
|
|
|
7
9
|
Pi compaction and context management for the [Pi coding agent](https://github.com/earendil-works/pi). pi-context-kit clears stale file reads and old tool outputs out of the context window, writes the handoff summary in the background before Pi needs it, and keeps the original text of the current branch one `recall` search away.
|
|
8
10
|
|
|
@@ -10,7 +12,7 @@ Pi compaction and context management for the [Pi coding agent](https://github.co
|
|
|
10
12
|
pi install npm:pi-context-kit
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
Restart Pi.
|
|
15
|
+
Restart Pi. The defaults work without configuration.
|
|
14
16
|
|
|
15
17
|
## Why pi-context-kit
|
|
16
18
|
|
|
@@ -75,22 +77,24 @@ In a long session, the conversation fills the context window. File reads and com
|
|
|
75
77
|
|
|
76
78
|
</details>
|
|
77
79
|
|
|
78
|
-
##
|
|
79
|
-
|
|
80
|
-
1. Open a terminal.
|
|
81
|
-
2. Type this command and press Enter:
|
|
80
|
+
## Quick start
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
pi install npm:pi-context-kit
|
|
85
|
-
```
|
|
82
|
+
You need Pi 1.0.3 or later and Node.js 22.19 or later.
|
|
86
83
|
|
|
87
|
-
|
|
84
|
+
1. Install the package with the command above.
|
|
85
|
+
2. Restart Pi.
|
|
86
|
+
3. Look at the footer. It shows `Context 0% · cleanup at 75%` when the extension is active.
|
|
87
|
+
4. Work as usual. Type `/context-kit` to change the settings.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
## Update, try or remove
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
```sh
|
|
92
|
+
pi update npm:pi-context-kit # update, then restart Pi
|
|
93
|
+
pi -e npm:pi-context-kit # try for one session without installing
|
|
94
|
+
pi remove npm:pi-context-kit # remove, then restart Pi
|
|
95
|
+
```
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
After an update, Pi shows what changed, from [CHANGELOG.md](CHANGELOG.md).
|
|
94
98
|
|
|
95
99
|
## Use it
|
|
96
100
|
|
|
@@ -329,6 +333,18 @@ pi-context-kit has no setting per model. To start earlier for one model only, ma
|
|
|
329
333
|
- **The method order stops at `soft`.** The methods after `soft` do not run.
|
|
330
334
|
- **Subagents** read the same settings files. They show no warnings and no status, because they have no screen.
|
|
331
335
|
|
|
336
|
+
## Troubleshooting
|
|
337
|
+
|
|
338
|
+
**No `Context` in the footer**: type `pi list` and check that it shows `npm:pi-context-kit`. Then restart Pi. Pi shows the footer only in the interactive mode.
|
|
339
|
+
|
|
340
|
+
**`pi-context-kit settings need attention`**: a value in a settings file is not valid. pi-context-kit uses the default for that value. Type `/context-kit` to see the problem, then correct the file or select a new value in the panel.
|
|
341
|
+
|
|
342
|
+
**`pi-context-kit moved its settings to ...`**: an earlier version kept the settings in Pi's `settings.json`. pi-context-kit copied them to its own file once. You can remove the `contextKit` entry from `settings.json`.
|
|
343
|
+
|
|
344
|
+
**`pi-context-kit: handoff note failed`**: the summary request failed. pi-context-kit uses the next method or Pi's summary, so your session continues. Check the model and your provider limits.
|
|
345
|
+
|
|
346
|
+
**The panel cannot save a value**: Pi shows `pi-context-kit:` and the file error. Check that you can write the settings file, then select the value again.
|
|
347
|
+
|
|
332
348
|
## FAQ
|
|
333
349
|
|
|
334
350
|
**Does it slow down my work?**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-context-kit",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Keep long Pi coding agent sessions sharp. Clears old file reads and tool outputs from the context, writes the compaction summary in the background, and lets the agent recall the original text.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "HugoLopes45 (https://github.com/HugoLopes45)",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"files": [
|
|
31
31
|
"extensions",
|
|
32
32
|
"src",
|
|
33
|
-
"context-kit.schema.json"
|
|
33
|
+
"context-kit.schema.json",
|
|
34
|
+
"CHANGELOG.md"
|
|
34
35
|
],
|
|
35
36
|
"engines": {
|
|
36
37
|
"node": ">=22.19.0"
|
|
@@ -43,8 +44,7 @@
|
|
|
43
44
|
"scripts": {
|
|
44
45
|
"check": "tsc --noEmit && npm run lint && vitest --run",
|
|
45
46
|
"lint": "node scripts/lint.ts",
|
|
46
|
-
"
|
|
47
|
-
"prepublishOnly": "test -n \"$GITHUB_ACTIONS\" || test \"$(npm whoami)\" = hugolopes45 || { echo 'Publish only as the npm user hugolopes45.' >&2; exit 1; }; npm run check"
|
|
47
|
+
"prepublishOnly": "npm run check"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@earendil-works/pi-ai": "*",
|