pi-blackhole 0.5.5 → 0.5.6
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 +15 -0
- package/README.md +5 -6
- package/dist/index.js +149 -131
- package/index.ts +2 -0
- package/package.json +5 -5
- package/src/commands/pi-vcc.ts +1 -1
- package/src/core/brief.ts +4 -47
- package/src/core/build-sections.ts +152 -28
- package/src/core/config-env.ts +1 -0
- package/src/core/content.ts +25 -2
- package/src/core/sanitize.ts +4 -0
- package/src/core/search-entries.ts +44 -9
- package/src/core/segment.ts +109 -0
- package/src/core/summarize.ts +249 -35
- package/src/core/unified-config.ts +7 -0
- package/src/extract/commits.ts +298 -27
- package/src/extract/file-touch.ts +1367 -0
- package/src/extract/files.ts +203 -38
- package/src/extract/git-status.ts +102 -0
- package/src/extract/goals.ts +3 -3
- package/src/extract/preferences.ts +42 -3
- package/src/hooks/before-compact.ts +35 -1
- package/src/hooks/cosmetic-output.ts +229 -0
- package/src/om/compaction-trigger.ts +50 -12
- package/src/om/consolidation.ts +19 -34
- package/src/om/model-budget.ts +2 -2
- package/src/om/runtime.ts +13 -0
- package/src/om/tokens.ts +6 -2
- package/src/pi-base/blackhole-settings.ts +12 -0
- package/src/project-recall/corpus.ts +4 -4
- package/src/project-recall/dedup.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## [0.5.6] - 2026-09-19
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **Minimum supported Pi raised to 0.85.1; compat-floor CI retired.** The `compat-min-supported` job re-pinned the `@earendil-works/*` peers to the `peerDependencies` floor and typechecked against them, going red every time. The extension now builds against the pinned devDependencies (0.85.1) and the peer floor is set to match; `peerDependencies` remains the single source of truth for the declared minimum.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Observer chunk cap now counts every entry type** ([#110](https://github.com/k0valik/pi-blackhole/issues/110)). `capSourceEntriesToTokens` used a hand-rolled type table that had drifted from the trigger's estimator, so `custom_message` entries (text lives in `.content`, not `.summary`) counted as zero tokens and an oversized chunk could exceed `maxTokens`; it now reuses the same `estimateEntryTokens` the trigger uses (CJK-aware), and debug logging exposes the post-cap chunk size and cooldown-skipped models on the normal path.
|
|
14
|
+
- **CJK-aware token accounting, text primitives, and extractor language handling** ([#106](https://github.com/k0valik/pi-blackhole/issues/106), [#105](https://github.com/k0valik/pi-blackhole/issues/105)). Script detection is automatic — no new config keys. `estimateStringTokens` counts CJK scripts as ~1 token/char instead of `ceil(chars/4)`, so every budget built on it (OM `tokenCount`, pool caps, `retainedToolOutputMaxTokens`, worker context pre-check) no longer admits ~3× the configured tokens. Clipping recognizes CJK terminators (`。!?;`, fullwidth included) and pause punctuation instead of hard-cutting space-free text. `recall` word-segments CJK queries via `Intl.Segmenter`, restoring per-term BM25 ranking with script-aware document-length normalization. `[User Preferences]` accepts CJK correction anchors (`不要`/`回退`/`错了`…) and `[Outstanding Context]` CJK failure stems (`失败`/`报错`/`错误`…) with benign-compound guards, scanning the whole fresh window instead of the last 20 blocks.
|
|
15
|
+
- **`[Files And Changes]` and `[Commits]` now extract what actually happened** ([#105](https://github.com/k0valik/pi-blackhole/issues/105)). File attribution correlates tool calls with results (native path args, anchor-based edits, a bash parser for redirects/`sed -i`/`tee`/`cp`/`mv`/`rm`/`curl -o`), sanitizes arg strings so `src/a.ts:10-40` no longer phantoms next to `/repo/src/a.ts`, and adds git grounding tags (`staged`, `new`, `deleted`, …); the collector runs only at compaction time. `[Commits]` uses a quote-aware token parser with a message-recovery chain (segment-scoped `-m`, `-F -` heredocs, the git success line) and precision guards (`--dry-run`, failed commits, non-`git` commands produce nothing).
|
|
16
|
+
- **`[Files And Changes]` display and cross-compaction merge overhauled**. cwd-relative paths, capped counted lists that never shrink after merge, and single-token paths hard-broken by `wrapLongLines` are reassembled; `(#N)` refs on `[Scope change]` and `[Commits]` for `recall` drill-down; session-goal and outstanding-context clips raised to 200.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
5
20
|
## [0.5.5] - 2026-09-15
|
|
6
21
|
|
|
7
22
|
### Changed
|
package/README.md
CHANGED
|
@@ -31,13 +31,12 @@ 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.
|
|
34
|
+
> **Latest release: [0.5.6](CHANGELOG.md)**
|
|
35
35
|
>
|
|
36
|
-
> - **
|
|
37
|
-
> -
|
|
38
|
-
> - **
|
|
39
|
-
> -
|
|
40
|
-
> - **Minimum supported Pi is 0.84.3**, and the compat CI job now tracks the `peerDependencies` floor instead of a hardcoded version.
|
|
36
|
+
> - **Non-English (CJK) sessions are now fully script-aware** — token accounting counts CJK as ~1 token/char (no more ~3× silent overage), text clipping and `recall` queries respect CJK punctuation and word boundaries, and the extractors accept CJK correction anchors and failure stems. ([#105](https://github.com/k0valik/pi-blackhole/issues/105), [#106](https://github.com/k0valik/pi-blackhole/issues/106))
|
|
37
|
+
> - **`[Files And Changes]` and `[Commits]` extract what actually happened** — file attribution correlates tool calls with results instead of guessing from a hardcoded tool list, and commit capture understands real-world flag orders and heredocs. ([#105](https://github.com/k0valik/pi-blackhole/issues/105))
|
|
38
|
+
> - **Observer chunks always respect `maxTokens`** — `custom_message` entries (previously zero-counted) are now sized like every other entry. ([#110](https://github.com/k0valik/pi-blackhole/issues/110))
|
|
39
|
+
> - **`[Files And Changes]` display and cross-compaction merge overhauled** — cwd-relative paths, capped lists that never shrink, and `(#N)` drill-down refs.
|
|
41
40
|
|
|
42
41
|
See [`CHANGELOG.md`](CHANGELOG.md) for the full history.
|
|
43
42
|
|