pi-blackhole 0.5.4 → 0.5.5

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 CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ---
4
4
 
5
+ ## [0.5.5] - 2026-09-15
6
+
7
+ ### Changed
8
+
9
+ - **Minimum supported Pi raised to 0.84.3.** The `compat-min-supported` CI job now derives its pin from the `peerDependencies` floor instead of a hardcoded version, so the floor only moves when new Pi APIs are adopted. Fail-closed behavior on older hosts is unchanged.
10
+
11
+ ### Fixed
12
+
13
+ - **OM workers now send provider-required session headers (OpenCode Go `MissingSessionID`).** Observer/reflector/dropper calls bypass Pi's interactive header pipeline (`mergeProviderAttributionHeaders` + `before_provider_headers` in `sdk.ts`) by invoking `streamSimple` directly, so the OpenCode Go gateway rejected every worker request with `400 MissingSessionID` while Pi's own calls worked. Attribution now happens at a single choke point (`withProviderAttributionHeaders`, pi-core `getSessionHeaders` mirror with exact-hostname matching): the Pi session id travels through standard stream options (`sessionId`) and is materialized both as pre-merged `headers` and as a composed `transformHeaders` (honored by pi-ai `applyAuth` after the auth merge), covering builtin, custom-registered, and future providers without per-stage branching. Reworks PR #95 with the contributor's regression assertions kept verbatim. ([#93](https://github.com/k0valik/pi-blackhole/issues/93))
14
+ - **Deterministic 4xx errors now cool models down and engage fallbacks.** A 400-class failure (missing provider-required headers, bad credentials, unknown model) previously retried the same broken session model on every consolidation cycle: `recordRetryableError` is a no-op without a candidate config, and `isRetryableError` gated nothing (debug logging only) — so a deterministic 4xx like `MissingSessionID` never cooled the resolved session model at all. New `isDeterministicError` / `isCooldownWorthyError` classification; deterministic failures persist cooldown (default 1h) including for the resolved session model, so the stage falls through to `*FallbackModels` instead of burning attempts. Transient blips on the main model still only trip the 30s retry gate, never an hour-long cooldown.
15
+ - **Surface silently skipped stale-ctx auto-compactions ([#92](https://github.com/k0valik/pi-blackhole/issues/92)).** In-memory subagent/flow sessions are disposed by their parent right after `agent_end`, so the deferred auto-compaction microtask always bails on a stale extension ctx — previously invisible outside `debug.ndjson`, leaving large headless sessions unbounded with no signal. Each skipped compaction is now counted (`Skipped compactions (disposed ctx)` in `/blackhole-memory` status, process-wide so a parent surfaces nested-session skips) and warned once per session (UI notification; stderr for headless runs). Bail behavior itself is unchanged.
16
+ - **Reliable mid-run host discovery and recovery.** ([#98](https://github.com/k0valik/pi-blackhole/pull/98), thanks @sonSunnoi) On Pi's unbundled layout (`dist/cli.js` importing `dist/main.js`) a resolved bundled chunk no longer counts as host discovery on its own — each package root now falls back to its `dist/index.js` barrel, so inline (mid-run) compaction works instead of silently staying unavailable. Each discovered host also binds its own `prepareCompaction` helper, so a session never borrows another installed host's helper for eligibility checks. Plus: below-threshold observer content now accumulates instead of being dropped by the not-due cursor advance, stale cursors fall back to the coverage/compaction rule, and the startup adapter probe is carried into the runtime so `resume` mode warns once instead of silently falling back. Closes [#96](https://github.com/k0valik/pi-blackhole/issues/96).
17
+ - **Test host doubles without type escapes, and lint-staged tolerates ignored paths.** ([#99](https://github.com/k0valik/pi-blackhole/pull/99), thanks @sonSunnoi) The compaction host test double is now a complete typed `ExtensionAPI` implementation (compile-time contract test included); production code unchanged. Also fixes `lint-staged` failing docs-only commits (`oxfmt --check` on ignored `docs/` paths). Closes [#97](https://github.com/k0valik/pi-blackhole/issues/97).
18
+ - **Quitting right after startup no longer kills Pi.** ([#91](https://github.com/k0valik/pi-blackhole/pull/91), thanks @priaculun) The `session_start` migration notice runs behind a dynamic `import()`, so a quit, `/reload`, or `/new` in that window threw on the stale ctx — with no `.catch()`, the throw escaped as an unhandled rejection and terminated the process. The notice is now catch-terminated (best-effort, never fatal).
19
+
20
+ ---
21
+
5
22
  ## [0.5.4] - 2026-09-13
6
23
 
7
24
  ### Fixed
package/README.md CHANGED
@@ -31,13 +31,13 @@ Then `/reload` or restart Pi. The config file at `~/.pi/agent/pi-blackhole/pi-bl
31
31
 
32
32
  ## ✨ What's new
33
33
 
34
- > **Latest release: [0.5.4](CHANGELOG.md)**
34
+ > **Latest release: [0.5.5](CHANGELOG.md)**
35
35
  >
36
- > - **Recall responses are now budget-bounded** — one knob (`recallResponseMaxChars`, default 48k chars ≈ 12k tokens) caps search snippets, expansions, and related observations; clipped content stays reachable via the new `#N:text` drill-down and `page:N` continuation. `/blackhole-recall` itself stays uncapped (human TUI output). ([#83](https://github.com/k0valik/pi-blackhole/issues/83))
37
- > - **Compaction summaries now speak recall's index space** — `(#N)` refs are session-global, so they resolve to the right operation after compactions and branches instead of pointing at unrelated history. ([#82](https://github.com/k0valik/pi-blackhole/issues/82))
38
- > - **Memory that curates for a future session** — rebuilt observer/reflector/dropper prompts (survival test, grounding rules, noise exclusions) plus observation timestamps derived from cited evidence instead of model-typed dates.
39
- > - **Observer fires before the first compaction** — a never-compacted session (fresh start, fork, subagent) no longer stays at zero observations forever; the observer runs as soon as the token threshold is hit. ([#87](https://github.com/k0valik/pi-blackhole/issues/87))
40
- > - **Auto-compaction no longer errors on "session too small"** proactive triggers pre-check Pi's own compaction eligibility instead of notice-spamming and throwing.
36
+ > - **Custom-provider memory workers fixed** — observer/reflector/dropper requests now carry Pi's session headers, so gateways that require them (OpenCode `MissingSessionID`) stop rejecting every worker call. ([#93](https://github.com/k0valik/pi-blackhole/issues/93))
37
+ > - **Deterministic provider errors cool down into fallbacks** — bad credentials, unknown models, and other 4xx failures stop burning retries on the broken model and fall through to `*FallbackModels` instead.
38
+ > - **Skipped subagent compactions are now visible** — in-memory sessions disposed before deferred compaction now count (`Skipped compactions (disposed ctx)` in `/blackhole-memory` status) and warn once per session instead of failing silently. ([#92](https://github.com/k0valik/pi-blackhole/issues/92))
39
+ > - **Mid-run compaction works on unbundled Pi installs** — per-root host discovery plus per-host helper binding, so the inline path no longer stays silently unavailable. ([#96](https://github.com/k0valik/pi-blackhole/issues/96))
40
+ > - **Minimum supported Pi is 0.84.3**, and the compat CI job now tracks the `peerDependencies` floor instead of a hardcoded version.
41
41
 
42
42
  See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
43
43