pi-blackhole 0.5.10 → 0.5.12
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 +34 -0
- package/README.md +6 -7
- package/dist/index.js +230 -229
- package/package.json +14 -14
- package/src/core/build-sections.ts +24 -3
- package/src/core/unified-config.ts +17 -0
- package/src/om/agents/completion.ts +83 -0
- package/src/om/agents/dropper/agent.ts +141 -134
- package/src/om/agents/dropper/selection.ts +110 -0
- package/src/om/agents/dropper/tool-schema.ts +15 -0
- package/src/om/agents/observer/agent.ts +82 -70
- package/src/om/agents/observer/tool-schema.ts +56 -0
- package/src/om/agents/reflector/agent.ts +74 -44
- package/src/om/agents/reflector/tool-schema.ts +31 -0
- package/src/om/consolidation.ts +1327 -306
- package/src/om/cooldown.ts +12 -3
- package/src/om/inline-compaction.ts +49 -0
- package/src/om/prompt-budget.ts +125 -0
- package/src/om/provider-stream.ts +142 -29
- package/src/om/retryable-error.ts +8 -0
- package/src/om/runtime.ts +58 -0
- package/src/om/status-bar.ts +40 -11
- package/src/pi-base/config-manager.ts +3 -0
- package/src/pi-base/settings/config-flow.ts +53 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## [0.5.12] - 2026-10-08
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **Pi 1.x is supported.** The declared peer range for all four `@earendil-works/pi-*` packages widens from `>=0.85.1 <1.0.0` to `>=0.85.1 <2.0.0`, and the dev toolchain moves to `1.1.0`, so Pi 1.0/1.1 installs no longer report an out-of-range peer ([#151](https://github.com/k0valik/pi-blackhole/issues/151)). The extension-API test double picks up the required members Pi 1.1 added (`registerToolRenderer`, `getSettings`, the MCP registrations, and the virtual-model registrations).
|
|
10
|
+
- **Toolchain: pnpm 12.10.0.** `packageManager` moves from 11.27.1 to 12.10.0; the lockfile now records pnpm's self-managed package-manager dependencies.
|
|
11
|
+
- **Dev-dependency refresh.** The dev-dependencies group is bumped (lint-staged `17.6.0`, oxfmt `0.71.0`, oxlint `1.86.0`, vitest `5.0.3`) ([#145](https://github.com/k0valik/pi-blackhole/pull/145)).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **CI installs accept the freshly published Pi 1.1.0 set.** The `@earendil-works/pi-*` bump to `1.1.0` crossed pnpm's minimum-release-age gate, so `pnpm install --frozen-lockfile` failed in CI and the publish job; the 1.1.0 packages are now listed in `minimumReleaseAgeExclude`, matching the earlier `0.87.0` exemption ([#151](https://github.com/k0valik/pi-blackhole/issues/151)).
|
|
16
|
+
- **Mid-run inline compaction no longer looks like a manual `/compact` to RPC/SDK clients.** Pi's `AgentSession.compact()` hardcodes `reason: "manual"` on `compaction_start`/`compaction_end` (and on compaction-source summarization retries), which RPC frontends read as "the user compacted between runs" — so during an inline compaction they closed the still-open turn and dropped every later event of the run. The adapter now rewrites the label to `"threshold"` for the duration of the inline attempt (a run is always open at an awaited `turn_end`), while a genuine `/compact`/`/blackhole` between runs stays `"manual"` ([#150](https://github.com/k0valik/pi-blackhole/issues/150)).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## [0.5.11] - 2026-10-05
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **Oversized work shrinks to fit instead of stalling.** When no configured model can hold the sized input, the stage re-plans against the largest resolved window and runs that: the observer caps its chunk and drains the remainder in-run, the reflector splits new items into batches that all complete before the single cursor advance, and the dropper evaluates batches under pool-wide pressure and applies the ranker + cap once. A failed batch still voids its run with the cursor unmoved.
|
|
25
|
+
- **A warning when `observeAfterTokens` exceeds `observerChunkMaxTokens`.** Every pass then necessarily runs as multiple capped + drained batches. The loader warns (never clamps); skipped when `memory` is off.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **Observer coverage can no longer skip entries the model never saw.** The cap keeps the oldest contiguous prefix, coverage derives from the ids the serializer actually emitted, and after a recorded or clean-empty close the stage drains the remaining backlog in the same run — a delay, never a loss.
|
|
30
|
+
- **Cut-off worker runs no longer count as finished.** `length`, `aborted`, an unexempt terminal `toolUse` — or any other non-`stop` reason — now fail instead of advancing coverage over work that never happened. A run that stopped on its own stays success even if the signal aborted in the settle window, a length cut on a capped turn still reports as the turn cap, and a throwing stream function surfaces as an ordinary worker error instead of hanging the run.
|
|
31
|
+
- **Small-context models run instead of silently never running.** The fit check prices the measured prompt (content + summaries + static overhead + turn headroom, all CJK-aware) against window minus output allowance minus margin; the output allowance is capped at a quarter of the window, and a too-small window skips without an hour-long cooldown. The stage dispatches that same allowance as the workers' generation cap, so a fitting prompt cannot overflow at generation time.
|
|
32
|
+
- **Compaction no longer freezes on long encoded tool output.** Searching tool results for file paths could spend minutes in a regular expression when output contained a large encoded value, leaving both automatic compaction and `/blackhole` unresponsive. Path scanning now avoids repeated scans and overlapping repetitions while preserving file matching for error retries, and is additionally bounded (head+tail window with a token cap) so multi-megabyte results stay cheap ([#142](https://github.com/k0valik/pi-blackhole/pull/142)).
|
|
33
|
+
|
|
34
|
+
- **The footer stops promising an observer pass that cannot run.** With `memory: false` the O gauge still filled past `observeAfterTokens` and turned warning/error colored, while `consolidation.ts` hard-returns before launching an observer — in a ~300k-token session it read as "observer full but never fired". `status-bar.ts` now gates rendering on `memory` as well as `statusBar`: O and P are omitted whenever memory is off, so nothing can render as if a note-taking pass were due. The gate is read on every render, so `/blackhole om-off`, `/blackhole om-on`, and settings saves take effect within the bar's 1-second poll (gauges return as soon as memory is re-enabled), the X compaction gauge and worker events are unchanged, and `statusBar: false` / `ctx.hasUI === false` still suppress the whole bar.
|
|
35
|
+
- **"Display all settings" no longer credits a tab's value to the layer that overrides it.** A non-winning tab printed `(from <winner>)` next to its own value, so the Global row `on (from Project Local)` claimed Project Local supplied `on` while it actually set `off` — the opposite of the precedence that applied. A higher-precedence winner is now labelled `overridden by <layer>`, and `(from <layer>)` survives only where a lower layer genuinely supplies the value on show; the winning tab still reads `▸ effective`, and layer order, tab order, and the Global-first opening tab are untouched. Edit mode uses the same rule (shared helper), so the scope-locked view no longer prints the old `(from …)` claim for the same key.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
5
39
|
## [0.5.10] - 2026-09-29
|
|
6
40
|
|
|
7
41
|
### Fixed
|
package/README.md
CHANGED
|
@@ -46,12 +46,11 @@ Then `/reload` or restart Pi. The config file at `~/.pi/agent/pi-blackhole/pi-bl
|
|
|
46
46
|
|
|
47
47
|
## ✨ What's new
|
|
48
48
|
|
|
49
|
-
> **Latest release: [0.5.
|
|
49
|
+
> **Latest release: [0.5.12](CHANGELOG.md)**
|
|
50
50
|
>
|
|
51
|
-
> - **
|
|
52
|
-
> - **
|
|
53
|
-
> -
|
|
54
|
-
> - **A cancelled `/blackhole` stays quiet, and the command loads the config first** — no second vaguer toast on cancel, and a `manual`-mode session flushes pending memory instead of reading defaults.
|
|
51
|
+
> - **Pi 1.x is supported** — the declared peer range widens to `<2.0.0`, so Pi 1.0/1.1 installs no longer report an out-of-range peer.
|
|
52
|
+
> - **Mid-run inline compaction keeps the turn open for RPC/SDK clients** — the compaction event no longer advertises itself as a user-initiated `/compact`, so `pi --mode rpc` frontends stop ending the run mid-turn ([#150](https://github.com/k0valik/pi-blackhole/issues/150)).
|
|
53
|
+
> - **Toolchain refresh** — pnpm 12.10.0 and the dev-dependency group are current; runtime behavior is unchanged.
|
|
55
54
|
>
|
|
56
55
|
> See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
|
|
57
56
|
|
|
@@ -168,7 +167,7 @@ Defaults target ~128k context models and work out of the box — no tuning requi
|
|
|
168
167
|
}
|
|
169
168
|
```
|
|
170
169
|
|
|
171
|
-
Fallbacks (optional): each worker tries `stageModel → stageFallbacks → base model → session model` (skipping cooled-down models). By default the
|
|
170
|
+
Fallbacks (optional): each worker tries `stageModel → stageFallbacks → base model → session model` (skipping cooled-down models). By default the session model **is** the last-resort fallback (`sessionFallback: true`), so workers keep running even with no worker models configured. If you don't want worker runs to touch your session model (extra cost and prompt-cache busting), configure cheap worker models (above) and set `sessionFallback: false` — or set `model` as a shared fallback so the session model is never reached. See [`docs/CONFIG.md` → Model Configuration](docs/CONFIG.md#model-configuration).
|
|
172
171
|
|
|
173
172
|
Config file: **`~/.pi/agent/pi-blackhole/pi-blackhole-config.json`**
|
|
174
173
|
|
|
@@ -190,7 +189,7 @@ https://github.com/user-attachments/assets/a7dd804d-6aca-4bdb-8b6e-0dd779363a43
|
|
|
190
189
|
|
|
191
190
|
Three background workers (separate LLM calls) run automatically during the session when `memory: true` (the default):
|
|
192
191
|
|
|
193
|
-
- **Observer** — reads conversation since the last observation marker and extracts timestamped facts: events, decisions, preferences. Input is capped to `observerChunkMaxTokens`
|
|
192
|
+
- **Observer** — reads conversation since the last observation marker and extracts timestamped facts: events, decisions, preferences. Input is capped to `observerChunkMaxTokens` as an oldest-first prefix (overflow drains in bounded follow-up batches) to prevent context blowup on long sessions — the coverage cursor never advances past entries the model was not shown. Runs most frequently.
|
|
194
193
|
- **Reflector** — distills new observations into durable reflections: stable facts, patterns, and constraints that survive future compactions. Runs less often.
|
|
195
194
|
- **Dropper** — prunes low-value observations from active memory when the pool exceeds `observationsPoolMaxTokens`, while keeping reflections and other long-term elements safely in the session ledger.
|
|
196
195
|
|