pi-blackhole 0.5.7 → 0.5.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/CHANGELOG.md +16 -0
- package/README.md +13 -8
- package/dist/index.js +166 -166
- package/package.json +2 -2
- package/src/commands/memory.ts +17 -10
- package/src/hooks/compact-failed.ts +4 -1
- package/src/om/agents/dropper/agent.ts +7 -5
- package/src/om/agents/observer/agent.ts +3 -10
- package/src/om/agents/reflector/agent.ts +3 -5
- package/src/om/agents/turn-cap.ts +74 -0
- package/src/om/consolidation.ts +3 -16
- package/src/om/ledger/progress.ts +47 -0
- package/src/om/ledger/projection.ts +3 -0
- package/src/om/provider-stream.ts +18 -11
- package/src/om/status-bar.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## [0.5.8] - 2026-09-22
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **Observation-pool measurement is centralized.** The dropper trigger, `/blackhole-memory` pool lines, and footer P gauge each summed the active pool with their own inline copy; they now share `observationPoolTokens()` (`ledger/progress.ts`), which sums the live active pool plus — always explicitly — manual-mode pending observation batches. `/blackhole-memory` now includes those pending batches in its `Obs pool` / `Dropper:` percentages (so a manual-only user sees the same pool the trigger gates on) and labels the split (`· branch 0 + pending 1,400`); the footer P gauge deliberately stays branch-only. No trigger, threshold, or dropper-candidate behavior changes ([#120](https://github.com/k0valik/pi-blackhole/issues/120)).
|
|
10
|
+
|
|
11
|
+
- **Pi loads the prebuilt `dist/index.js`.** `pi.extensions` now points at the tsup bundle instead of `./index.ts`, removing jiti transpilation of the whole module graph on startup (measured import 500 to 570 ms down to 350 to 530 ms, factory time unchanged). Registry installs ship `dist/` in the tarball. Git installs need `npmCommand` set so devDependencies install and `prepare` builds `dist/`; when they don't, `scripts/prepare.mjs` now warns that the extension will not load instead of failing silently, documented next to the GitHub install command in `README.md`.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`agentMaxTurns` is enforced on Pi 0.87.** The observer, reflector, and dropper capped their loops with `shouldStopAfterTurn`, which 0.87 removed in favour of `finishTurn` (whose `{ action: "end" }` ends the run), so the configured turn budget was silently ignored and a worker could keep running until it stopped naturally, errored, or was aborted. Both hooks are now emitted through `createTurnCap` with independent counters, so the loaded generation picks the one it knows and a host calling both still ends at `maxTurns`; a turn that already hard-exited (`error`/`aborted`) neither decides the run nor spends budget ([upstream OM `#83`](https://github.com/elpapi42/pi-observational-memory/pull/83)).
|
|
16
|
+
- **Extension registration survives class-based `ExtensionAPI` hosts.** `registerCompactFailedHook` widened and then invoked `pi.on` detached, so a host whose `on` reads instance state (e.g. oh-my-pi's `ConcreteExtensionAPI`) threw `TypeError: undefined is not an object (evaluating 'this.extension')` during registration and took the rest of the extension's hooks down with it; the handler is now bound to `pi` before the widening cast, a no-op on pi's closure-based API ([#124](https://github.com/k0valik/pi-blackhole/pull/124)).
|
|
17
|
+
- **Custom-provider streams keep their receiver when the bridge dispatches them.** Each `streamSimple` handler was stored in the global capture map detached from its provider config, and the api-only fallback for host-aliased provider ids extracted it the same way. A class-based config that reads instance state therefore threw `Cannot read properties of undefined`: the capture-map path crashed the worker stream, while the aliased path swallowed the error and silently degraded to the compat dispatcher. Captured handlers are now bound to their config, and the api-only match is invoked on it ([upstream OM `#80`](https://github.com/elpapi42/pi-observational-memory/pull/80)).
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
5
21
|
## [0.5.7] - 2026-09-21
|
|
6
22
|
|
|
7
23
|
### Added
|
package/README.md
CHANGED
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
# From npm (recommended)
|
|
13
13
|
pi install npm:pi-blackhole
|
|
14
14
|
|
|
15
|
-
# Or directly from GitHub
|
|
15
|
+
# Or directly from GitHub.
|
|
16
|
+
# Requires npmCommand to be set in settings.json, otherwise pi runs
|
|
17
|
+
# `npm install --omit=dev`, devDependencies are skipped, and dist/ is not built.
|
|
18
|
+
# Example: "npmCommand": ["npm"] in ~/.pi/agent/settings.json
|
|
16
19
|
pi install git:github.com/k0valik/pi-blackhole
|
|
17
20
|
```
|
|
18
21
|
|
|
@@ -31,14 +34,15 @@ Then `/reload` or restart Pi. The config file at `~/.pi/agent/pi-blackhole/pi-bl
|
|
|
31
34
|
|
|
32
35
|
## ✨ What's new
|
|
33
36
|
|
|
34
|
-
> **Latest release: [0.5.
|
|
37
|
+
> **Latest release: [0.5.8](CHANGELOG.md)**
|
|
35
38
|
>
|
|
36
|
-
> - **Pi
|
|
37
|
-
> - **
|
|
38
|
-
> -
|
|
39
|
-
> - **
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
> - **Pi loads a prebuilt bundle** — `pi.extensions` points at the tsup `dist/index.js` instead of TypeScript source, cutting startup import time (500–570 ms → 350–530 ms). Registry installs ship `dist/`; git installs need `npmCommand` set, and a missing `dist/` now warns instead of failing silently.
|
|
40
|
+
> - **Every observation-pool readout agrees** — the dropper trigger, `/blackhole-memory` pool lines, and the footer P gauge each summed the pool inline; they now share one helper, and `/blackhole-memory` includes (and labels) manual-mode pending batches so the display matches what the trigger gates on. No threshold or candidate behavior changes. ([#120](https://github.com/k0valik/pi-blackhole/issues/120))
|
|
41
|
+
> - **`agentMaxTurns` is enforced on Pi 0.87** — the worker loops emitted only the removed `shouldStopAfterTurn`, so the turn budget was silently ignored; `createTurnCap` now emits both that hook and 0.87's `finishTurn`, with independent counters. ([upstream OM `#83`](https://github.com/elpapi42/pi-observational-memory/pull/83))
|
|
42
|
+
> - **Extension registration survives class-based hosts** — hooks were invoked detached from their API object, which threw on hosts like oh-my-pi; handlers are now bound before registration. ([#124](https://github.com/k0valik/pi-blackhole/pull/124))
|
|
43
|
+
> - **Custom-provider streams keep their receiver** — captured `streamSimple` handlers are bound to their config, so class-based providers no longer crash or silently fall back to the compat dispatcher. ([upstream OM `#80`](https://github.com/elpapi42/pi-observational-memory/pull/80))
|
|
44
|
+
>
|
|
45
|
+
> See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
|
|
42
46
|
|
|
43
47
|
---
|
|
44
48
|
|
|
@@ -294,6 +298,7 @@ rm -rf ~/.pi/agent/pi-blackhole
|
|
|
294
298
|
| ------------------------------------------------------------ | ----------------- | ----------------------------------------------------------------------------------------- |
|
|
295
299
|
| **[`README.md`](README.md)** | You, now | Install, commands, the pitch, the value, the demo. |
|
|
296
300
|
| **[`CHANGELOG.md`](CHANGELOG.md)** | You | Every release, what changed, who contributed. |
|
|
301
|
+
| **[`CONTRIBUTING.md`](CONTRIBUTING.md)** | You, if helping | Branch model, dev setup, PR description format, docs/changelog gates. |
|
|
297
302
|
| **[`docs/CONFIG.md`](docs/CONFIG.md)** | You, when tuning | Every config key with type, default, behavior, and env-var overrides. |
|
|
298
303
|
| **[`llms.txt`](llms.txt)** | Your agent | Step-by-step guided setup interview, anti-patterns, exact file paths, internal constants. |
|
|
299
304
|
| **[`docs/MIGRATION-GUIDE.md`](docs/MIGRATION-GUIDE.md)** | You, if upgrading | Old → new config key mapping, semantic changes, automatic migration behavior. |
|