@henryqw/pi-auto-compact 2.0.3 → 3.0.0

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 +11 -5
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,19 +1,23 @@
1
1
  # `@henryqw/pi-auto-compact`
2
2
 
3
- Compact context before it reaches the configured threshold. Then resume the current task.
3
+ Compact Pi context at your chosen threshold, then continue the interrupted task automatically.
4
4
 
5
5
  ## Why
6
6
 
7
- - **Created for**: Compact session context automatically before it reaches the configured threshold.
8
- - **Advantage**: Trigger early, use a dedicated model, and resume the interrupted task without manual work.
7
+ - **Created for**: Long Pi sessions that need predictable context headroom.
8
+ - **Advantage**: Compact early through a shared model route, without making users restart the task.
9
9
 
10
10
  ## Install
11
11
 
12
+ Install the required Task Models extension first:
13
+
12
14
  ```bash
13
15
  pi install npm:@henryqw/pi-task-models
14
16
  pi install npm:@henryqw/pi-auto-compact
15
17
  ```
16
18
 
19
+ Run `/task-models` and configure the `fast` profile. Open `/task-models` again to verify that `fast` no longer says `not configured`.
20
+
17
21
  Disable Pi's built-in auto-compaction in `~/.pi/agent/settings.json`:
18
22
 
19
23
  ```json
@@ -24,11 +28,13 @@ Disable Pi's built-in auto-compaction in `~/.pi/agent/settings.json`:
24
28
  }
25
29
  ```
26
30
 
27
- Restart Pi after install or settings changes. Trusted project settings in `.pi/settings.json` must not set `compaction.enabled` back to `true`.
31
+ Restart Pi after install or settings changes. Trusted `.pi/settings.json` files must not set `compaction.enabled` back to `true`.
32
+
33
+ Run `/auto-compact`, enter a threshold, and expect `Auto-compact threshold set to <value>%.`
28
34
 
29
35
  ## With
30
36
 
31
- This package requires `@henryqw/pi-task-models` for shared compaction routes.
37
+ This package requires [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) for shared compaction routes.
32
38
 
33
39
  `~/.pi/agent/config/pi-task-models/config.json` is shared and owned by `@henryqw/pi-task-models`. The local `pi-auto-compact/autoCompact` declaration defaults to `fast`. A task entry is an explicit user override.
34
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-auto-compact",
3
- "version": "2.0.3",
3
+ "version": "3.0.0",
4
4
  "description": "Proactively compact Pi context at a configurable threshold and resume the current task.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -25,7 +25,7 @@
25
25
  "pack:check": "npm pack --dry-run"
26
26
  },
27
27
  "peerDependencies": {
28
- "@earendil-works/pi-coding-agent": "^0.84.4"
28
+ "@earendil-works/pi-coding-agent": "^0.85.0"
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
@@ -44,7 +44,7 @@
44
44
  ]
45
45
  },
46
46
  "dependencies": {
47
- "@henryqw/pi-config-store": "^0.1.0",
48
- "@henryqw/pi-task-models": "^4.0.0"
47
+ "@henryqw/pi-config-store": "^1.0.0",
48
+ "@henryqw/pi-task-models": "^5.0.0"
49
49
  }
50
50
  }