pi-lossless 0.1.0 → 0.1.2
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 +14 -0
- package/README.md +18 -5
- package/dist/index.d.mts +0 -2
- package/dist/index.mjs +5409 -4231
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -13
- package/skills/pi-lossless/SKILL.md +83 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# pi-lossless
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- de419eb: Ship a versioned Intent skill with each package (`skills/<name>/SKILL.md` in the published tarball): install, command and recall vocabulary, config essentials, and common mistakes, stamped with the package version on release. Adds `skills` to each package's published files and validates skills on publish and in CI.
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 6748df1: Refresh every external dependency to its newest published version: Vite+ 1.4.0 and Vitest 5.0.5, TypeScript 7.0.2, `@types/node` 26.6.5, `@changesets/cli` 3.0.3, Pi 1.4.0, OpenCode 2.1.4, Typebox 1.4.3, Blume 2.2.5, and Bun 1.4.4. Pi host packages now use the `*` peer range its package guide documents for packages the host supplies.
|
|
14
|
+
- 6748df1: Derive the heal source window from the summary target instead of clipping every source message at a fixed 3,000 tokens. The window is clamped to the summarizer request budget and has an explicit `healSourceTokens` override in Pi and OpenCode. A leaf that exceeds one window is mapped through up to eight exact windows and reduced once, so a large tool result can become clean without one enormous prompt. A source beyond the bounded plan is blocked without another model call, while a mechanical node gets one improvement. Heal reports now separate clean repairs from improvements and record source-blocked nodes.
|
|
15
|
+
- 6748df1: Add per-node summary timing, session-correlated engine rows, and adapter-routed metrics. OpenCode now writes engine and summarizer rows to its sidecar log, exposes the summarizer call and pass budgets, marks character-derived usage as estimated, and reports summary latency, cap outcomes, and abandoned rows. Add persistent summary quality: clean, clipped, mechanical, and derived. Existing stores migrate to generation 2, and a failed parent stays visible as derived. Add a bounded heal command in both adapters. It finds tainted summaries and their ancestors, re-derives them from stored source bottom-up, rejects another mechanical result, and supports a dry run. A heal owns its store connection so a plugin reload cannot finalize it, and one session allows one heal at a time. Mechanical work runs before a clipped retry, so a bounded run keeps making progress.
|
|
16
|
+
|
|
3
17
|
## 0.1.0
|
|
4
18
|
|
|
5
19
|
First release.
|
package/README.md
CHANGED
|
@@ -40,6 +40,8 @@ once context crosses the soft threshold (default: 70% of the model's window).
|
|
|
40
40
|
# stores as lcm-export-gc-<timestamp>.jsonl before any deletion)
|
|
41
41
|
/lcm migrate # dry-run list of stores left at an older schema; add --apply to
|
|
42
42
|
# upgrade them in place so cross-session search can read them
|
|
43
|
+
/lcm heal # dry-run repair of tainted summaries; add --apply to spend
|
|
44
|
+
# model calls, --max-nodes <n> to bound the run
|
|
43
45
|
/lcm diagnose # one pasteable block for a bug report (see Reporting a problem);
|
|
44
46
|
# add --save <path> to write it to a file instead
|
|
45
47
|
```
|
|
@@ -134,7 +136,7 @@ stored bytes, secrets included.
|
|
|
134
136
|
entries are dropped, and an entry the registry cannot find is reported once
|
|
135
137
|
per session and recorded as a `summarizer-model` event. A chain that needed
|
|
136
138
|
more than one model records a `summarizer-fallback` event, which `/lcm
|
|
137
|
-
report` shows as `model-fallback
|
|
139
|
+
report` shows as `model-fallback`; the report also summarizes heal runs. `/lcm doctor` prints the chain that
|
|
138
140
|
actually runs, next to the config it came from, so `auto` expansion and the
|
|
139
141
|
appended session model are visible rather than implied. A substitution also
|
|
140
142
|
raises one UI warning per session.
|
|
@@ -153,6 +155,16 @@ report` shows as `model-fallback`. `/lcm doctor` prints the chain that
|
|
|
153
155
|
fraction of either cap.
|
|
154
156
|
A pass that crosses one finishes its remaining chunks with the mechanical
|
|
155
157
|
truncate and records `summarizer-capped` with `source: "budget"`.
|
|
158
|
+
- `summarizerTokensPerHeal`: what one `/lcm heal --apply` run may spend across all
|
|
159
|
+
of its calls, counted the same way. Default 120,000. A dry run spends nothing.
|
|
160
|
+
The run is bounded separately from a compaction pass because it re-derives
|
|
161
|
+
nodes a pass already paid for.
|
|
162
|
+
- `healSourceTokens`: source tokens one heal map window may read. Unset derives
|
|
163
|
+
it from `summaryTokens` at 8x, clamped to 3,000 through 24,000 and to
|
|
164
|
+
`summarizerTokensPerCall`. A leaf that fits one window is sent once; a larger
|
|
165
|
+
leaf maps up to eight windows and reduces them once. A source beyond eight
|
|
166
|
+
windows is blocked without a model call; a mechanical node gets one
|
|
167
|
+
improvement. Raising the value makes the next run attempt it.
|
|
156
168
|
|
|
157
169
|
The file must be valid strict JSON, so `//` comments and trailing commas are
|
|
158
170
|
rejected, and a corrupt file is left untouched with defaults applied. A number
|
|
@@ -265,7 +277,7 @@ refused rather than quietly printing the block.
|
|
|
265
277
|
depth cap of 8 is a structural assert, not a policy, and with 8 children per
|
|
266
278
|
node it covers 8^8 leaf chunks; a pass that cannot meet its budget records
|
|
267
279
|
`condensation-stalled`. The engine writes `[lcm:summary #id depth d span
|
|
268
|
-
a..b]` next to every summary the model sees (paper §2.4).
|
|
280
|
+
a..b]` next to every summary the model sees (paper §2.4).
|
|
269
281
|
- **Three-level escalation** (paper Fig. 3): preserve-details → bullets →
|
|
270
282
|
deterministic truncate of the source text, accepted only on strict token
|
|
271
283
|
reduction. Level 3 is stored like any other level (tagged
|
|
@@ -306,8 +318,8 @@ a..b]` next to every summary the model sees (paper §2.4).
|
|
|
306
318
|
with the first line of its summary. The exploration summary is built by rule,
|
|
307
319
|
with no model call and no parser: code names its top-level declarations
|
|
308
320
|
(`TypeScript, 240 lines; 18 top-level declaration(s): function compact, class
|
|
309
|
-
Engine, ...`), JSON names its shape and one level of nesting (`array of 412
|
|
310
|
-
objects, keys: id, name`), JSONL names its row keys, a table names its columns,
|
|
321
|
+
Engine, ...`), JSON names its shape and one level of nesting (`array of 412
|
|
322
|
+
objects, keys: id, name`), JSONL names its row keys, a table names its columns,
|
|
311
323
|
Markdown names its headings, and text names its size and first line. A family
|
|
312
324
|
with no rule reports its size rather than guessing, names are capped at 12 with
|
|
313
325
|
`(+N more)`, and the whole summary line stays under a line of the preview. A body that large with no path is
|
|
@@ -343,7 +355,8 @@ objects, keys: id, name`), JSONL names its row keys, a table names its columns,
|
|
|
343
355
|
- **Telemetry**: `~/.pi/agent/lcm/metrics.jsonl` logs every context decision,
|
|
344
356
|
per-message provider usage (fresh vs cached, cost), one row per summarizer
|
|
345
357
|
call with the model, stage, and what the provider billed, one row per recall
|
|
346
|
-
call, one per
|
|
358
|
+
call, a heal-start row, one heal-node per attempted node, a heal-complete row,
|
|
359
|
+
one per externalized file, and one per branch change.
|
|
347
360
|
`/lcm doctor` reports the thresholds, the zone, and the summarizer chain that
|
|
348
361
|
are in effect, which answers what the log recorded after the fact.
|
|
349
362
|
- **Verbatim storage**: message text is stored whole, whatever its size.
|