@henryqw/pi-auto-compact 3.0.0 → 3.0.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.
- package/README.md +9 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
# `@henryqw/pi-auto-compact`
|
|
2
2
|
|
|
3
|
-
Compact Pi
|
|
4
|
-
|
|
5
|
-
## Why
|
|
6
|
-
|
|
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.
|
|
3
|
+
Compact long Pi sessions early through a shared model route, then continue the interrupted task automatically. Your chosen threshold keeps predictable context headroom without restarting the task.
|
|
9
4
|
|
|
10
5
|
## Install
|
|
11
6
|
|
|
@@ -32,24 +27,25 @@ Restart Pi after install or settings changes. Trusted `.pi/settings.json` files
|
|
|
32
27
|
|
|
33
28
|
Run `/auto-compact`, enter a threshold, and expect `Auto-compact threshold set to <value>%.`
|
|
34
29
|
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
This package requires [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) for shared compaction routes.
|
|
30
|
+
## Works with
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
**Required.** [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) provides shared compaction routes.
|
|
40
33
|
|
|
41
|
-
|
|
34
|
+
Its `~/.pi/agent/config/pi-task-models/config.json` file is shared and owned by Task Models. The local `pi-auto-compact/autoCompact` declaration defaults to `fast`. A task entry is an explicit user override.
|
|
42
35
|
|
|
43
36
|
## Use
|
|
44
37
|
|
|
45
38
|
Use `/auto-compact` to set the compaction threshold.
|
|
46
39
|
|
|
47
|
-
|
|
40
|
+
## Flow
|
|
41
|
+
|
|
42
|
+
- The extension refuses to activate unless effective `compaction.enabled` is `false`.
|
|
48
43
|
- It checks `turn_start`, tool-call `turn_end`, `agent_end`, `context`, and resumed or forked `session_start`.
|
|
49
|
-
- Its consumer-owned `pi-auto-compact/autoCompact` task defaults to `fast`.
|
|
50
44
|
- It tries the effective profile primary, then fallback. If neither route works, the current session model still compacts.
|
|
51
45
|
- After mid-task compaction, it resumes the current task automatically.
|
|
52
46
|
|
|
47
|
+
Malformed shared task-model config is reported and left unchanged. Compaction then uses the current session model.
|
|
48
|
+
|
|
53
49
|
## Config
|
|
54
50
|
|
|
55
51
|
Package-owned: `~/.pi/agent/config/pi-auto-compact/config.json`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-auto-compact",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
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.85.
|
|
28
|
+
"@earendil-works/pi-coding-agent": "^0.85.1"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|