pi-context-kit 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +23 -4
  2. package/package.json +10 -4
package/README.md CHANGED
@@ -1,8 +1,25 @@
1
1
  # pi-context-kit
2
2
 
3
- pi-context-kit keeps long [Pi](https://github.com/earendil-works/pi) sessions small, so the AI model can continue to work.
4
- Install it once. The defaults work without configuration.
5
- Summaries can lose details. `recall` retrieves earlier text on the current branch, but returns only MIME types for images.
3
+ Pi compaction and context management for the [Pi coding agent](https://github.com/earendil-works/pi). It keeps the context of long Pi sessions small: pi-context-kit removes old file copies and old tool outputs from the model's context, and prepares the summary before Pi needs it. The session keeps the original text, and the model can read it again with `recall`.
4
+
5
+ ```sh
6
+ pi install npm:pi-context-kit
7
+ ```
8
+
9
+ Restart Pi after the install. The defaults work without configuration. Requirements: Pi 1.0.3 or later, Node.js 22.19 or later.
10
+
11
+ ## Pi alone, and Pi with pi-context-kit
12
+
13
+ | In a long session | Pi alone | With pi-context-kit |
14
+ | --- | --- | --- |
15
+ | The model reads the same file again | Both copies stay in the context. | The old copy is replaced, above the threshold. |
16
+ | Old tool outputs fill the context | They stay until Pi summarizes. | They are replaced with a short notice. No model request. |
17
+ | The context reaches the limit | Pi writes a summary. | A handoff note can be ready, because it was written in the background. |
18
+ | The model needs a removed detail | The summary is all that remains in the context. | The model calls `recall` to read the original text. |
19
+
20
+ The original session entries never change. Only the context that Pi sends to the model becomes smaller.
21
+
22
+ This extension is for Pi users with long sessions: many file reads, long command outputs, or many compactions. In a short session, the context rarely reaches the threshold. Then the context does not change at the end of a turn. A background handoff note can still start near the threshold, and `/compact` uses a handoff note instead of Pi's summary.
6
23
 
7
24
  ## The problem
8
25
 
@@ -46,6 +63,8 @@ pi-context-kit does three things:
46
63
 
47
64
  To check the installation, type `pi list`. The list must show `npm:pi-context-kit`.
48
65
 
66
+ To update, type `pi update npm:pi-context-kit` and restart Pi.
67
+
49
68
  To remove it, type `pi remove npm:pi-context-kit` and restart Pi.
50
69
 
51
70
  ## Recommended setup
@@ -331,7 +350,7 @@ Example: try shaking first, because it does not call the model.
331
350
 
332
351
  Prepares the handoff note in the background, before the threshold.
333
352
 
334
- - `true` (default): the note starts one eighth of the threshold early, with a maximum of 32,000 tokens. At the threshold, the note is often ready, so compaction is fast.
353
+ - `true` (default): the note starts one eighth of the threshold early, with a maximum of 32,000 tokens. If the note is ready at the threshold, compaction is fast.
335
354
  - `false`: no background note. At the threshold, pi-context-kit writes a new note. Your work waits for this note.
336
355
 
337
356
  This setting has an effect only if `"handoff"` is in `methodOrder` before `"soft"`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-context-kit",
3
- "version": "0.3.0",
4
- "description": "Context maintenance for Pi: stale read replacement, pruning, handoff compaction with background notes, and recall.",
3
+ "version": "0.3.1",
4
+ "description": "Pi compaction and context management for the Pi coding agent: replace stale file reads, prune old tool outputs, prepare handoff notes in the background, and recall the original text.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "HugoLopes45 (https://github.com/HugoLopes45)",
@@ -15,11 +15,17 @@
15
15
  },
16
16
  "keywords": [
17
17
  "pi-package",
18
- "pi-extension",
19
18
  "pi",
19
+ "pi-extension",
20
+ "pi-coding-agent",
20
21
  "compaction",
21
22
  "context",
22
- "handoff"
23
+ "context-window",
24
+ "context-management",
25
+ "coding-agent",
26
+ "llm",
27
+ "handoff",
28
+ "token-optimization"
23
29
  ],
24
30
  "files": [
25
31
  "extensions",