pi-blackhole 0.4.6 → 0.4.8
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 +22 -0
- package/dist/index.js +660 -103
- package/dist/index.js.map +1 -1
- package/example-config.json +5 -2
- package/index.ts +2 -0
- package/package.json +2 -2
- package/src/core/compaction-chain.ts +472 -0
- package/src/core/config-env.ts +9 -0
- package/src/core/summarize.ts +29 -7
- package/src/core/unified-config.ts +17 -0
- package/src/details.ts +123 -5
- package/src/hooks/before-compact.ts +127 -17
- package/src/hooks/compaction-context.ts +28 -0
- package/src/om/compaction-trigger.ts +108 -16
- package/src/om/configure-overlay.ts +9 -0
- package/src/om/inline-compaction.ts +41 -15
- package/src/om/ledger/progress.ts +49 -1
- package/src/om/runtime.ts +17 -4
- package/src/om/tokens.ts +42 -2
- package/src/pi-base/blackhole-settings.ts +23 -0
- package/src/pi-base/settings/body.ts +2 -0
- package/src/pi-base/settings/render.ts +7 -5
package/README.md
CHANGED
|
@@ -17,6 +17,18 @@ Blackhole merges the best ideas from [pi-vcc](https://github.com/sting8k/pi-vcc)
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
### ✨ New in 0.4.8
|
|
21
|
+
|
|
22
|
+
> **Mid-run auto-compaction (`midRunCompaction`)** — opt into transparent compaction during long tool loops without interrupting the agent. Set `midRunCompaction: "resume"` to compact and continue in the same run; `"pause"` to compact and stop; `"off"` (default) only checks when the run ends.
|
|
23
|
+
>
|
|
24
|
+
> **Append summary mode (`compactionSummaryMode`)** — keep every auto-compaction summary as an immutable segment visible to the model (`S1 | S2 | …`) instead of rewriting a single summary. `/blackhole` rebases the chain. Opt-in via `compactionSummaryMode: "append"`.
|
|
25
|
+
|
|
26
|
+
### ⚠️ Upcoming config change
|
|
27
|
+
|
|
28
|
+
> **Default compaction thresholds will become model-context-window-aware in an upcoming release.** Instead of static absolute tokens (`compactAfterTokens: 81000`), default thresholds will derive from your model's effective context window — keeping the same approximate cadence regardless of model size. Existing explicitly-set values (anything you typed into the config) will continue to be respected verbatim. If you're using the defaults, no action is needed — the migration is automatic. If you've set custom thresholds, they'll keep working exactly as before.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
20
32
|
## Quick start
|
|
21
33
|
|
|
22
34
|
```bash
|
|
@@ -546,3 +558,13 @@ What blackhole adds and reworks on top:
|
|
|
546
558
|
## License
|
|
547
559
|
|
|
548
560
|
MIT
|
|
561
|
+
|
|
562
|
+
## Append-only compaction
|
|
563
|
+
|
|
564
|
+
Set `compactionSummaryMode` to `"append"` to keep automatic Blackhole
|
|
565
|
+
compaction summaries as immutable provider-visible segments. Explicit
|
|
566
|
+
`/blackhole` folds the active chain into one clean segment and starts a new
|
|
567
|
+
chain. The default value is `"default"`.
|
|
568
|
+
|
|
569
|
+
See [`docs/APPEND_COMPACTION.md`](docs/APPEND_COMPACTION.md) for
|
|
570
|
+
the fallback, branch, observational-memory, and cache-measurement rules.
|