diff --git a/.changeset/gc-soft-guards.md b/.changeset/gc-soft-guards.md deleted file mode 100644 index 7f44023..0000000 --- a/.changeset/gc-soft-guards.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"opencode-lossless": patch ---- - -Harden `lossless-gc` against deleting sidecars that are live in another process. Sweeps skip stores active within the last 60 minutes and name them. Bare `--older-than 0` without `--session` is refused. `--session` on a store active within 60 minutes needs `--force`. Candidates younger than 24 hours carry a warning. diff --git a/.changeset/import-hash-check.md b/.changeset/import-hash-check.md deleted file mode 100644 index 62a1648..0000000 --- a/.changeset/import-hash-check.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"lossless-core": patch -"pi-lossless": patch -"opencode-lossless": patch ---- - -Verify file bytes and sha256 against the linked message text before inserting file rows on import. A repeated entry id with different text, or a file row whose text differs from the stored message, also refuses the import without writing. Existing rows stay untouched. diff --git a/.changeset/ingest-watermark-signal.md b/.changeset/ingest-watermark-signal.md deleted file mode 100644 index bc993b4..0000000 --- a/.changeset/ingest-watermark-signal.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"pi-lossless": patch -"lossless-core": patch ---- - -Signal a watermark miss on the ingest path. A full rescan now writes one `ingest-rescan` metric row and, in interactive sessions, one UI warning. Empty entries stay silent and ingest behavior is unchanged. diff --git a/.changeset/mechanical-noisy-tier.md b/.changeset/mechanical-noisy-tier.md deleted file mode 100644 index 54e1469..0000000 --- a/.changeset/mechanical-noisy-tier.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"lossless-core": patch -"pi-lossless": patch -"opencode-lossless": patch ---- - -Add a mechanical tier for noisy tools. Name tools in `mechanicalTools` in summarizer-config, `/lcm` config, or the OpenCode plugin options. Their spans compact into deterministic `mechanical` leaves with zero summarizer spend at compaction time. Every message stays stored verbatim and covered, so the integrity coverage check passes, and heal re-derives a skipped leaf from provenance on demand. There is no ingest filtering. diff --git a/.changeset/opencode-sidecar-global-default.md b/.changeset/opencode-sidecar-global-default.md deleted file mode 100644 index 726012c..0000000 --- a/.changeset/opencode-sidecar-global-default.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"opencode-lossless": patch ---- - -Change the default `sidecarDir` to the auto-detected global path. The plugin uses `XDG_DATA_HOME` with a `~/.local/share` fallback, uses `LOCALAPPDATA` with an `APPDATA` fallback and then a `/AppData/Local` fallback on Windows, and uses `./.lossless` when no home resolves. To keep per-project storage, set `"sidecarDir": "./.lossless"`. After upgrading a project that used `./.lossless`, keep that setting to keep its history: `/lossless-migrate` upgrades in place in the configured directory only (dry run by default) and moves nothing, so it cannot recover history left in `./.lossless`. To carry history across, export per session under the old config and import into an empty store under the new one, or stop the server first and copy the `.sqlite`, `-wal`, and `-shm` files across and then migrate. The plugin never moves sidecars. diff --git a/.changeset/orphan-sidecar-report.md b/.changeset/orphan-sidecar-report.md deleted file mode 100644 index 83bdf4d..0000000 --- a/.changeset/orphan-sidecar-report.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"lossless-core": patch -"pi-lossless": patch -"opencode-lossless": patch ---- - -Report orphan sidecars in doctor. `integritySnapshot` now lists sidecar files and stale `wal` and `shm` files with no live session (`.sqlite` by default, `.db` for Pi). `checkIntegrity` reports them as a read-only `orphan-sidecar` finding through `lcm doctor` and the diagnose bundle. Report only. Deletion stays manual. diff --git a/.changeset/recall-search-upgrades.md b/.changeset/recall-search-upgrades.md deleted file mode 100644 index 89af75f..0000000 --- a/.changeset/recall-search-upgrades.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"lossless-core": patch -"pi-lossless": patch -"opencode-lossless": patch ---- - -Upgrade recall search. `lcm_grep` takes `role`, `date_start`/`date_end`, and `tool_name` filters. Role and time are SQL predicates on the stored columns with a covering index. Tool scope is an FTS rewrite against `[tool:Name]` markers with no new table or index. `lcm_expand` takes an `anchor` entry id that centers the listing window with edge clamping. The recall manifest and the retrieval brief order by stop-word stripped query-word overlap over summary headers. A read-only files view lists each linked file once with an incomplete-coverage flag and a `large-inline` mark. No migration and no new writer. diff --git a/.changeset/static-sidecar-dump.md b/.changeset/static-sidecar-dump.md deleted file mode 100644 index cca4ac1..0000000 --- a/.changeset/static-sidecar-dump.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"pi-lossless": patch -"opencode-lossless": patch ---- - -Add a read-only static sidecar dump. `/lcm dump` and `/lossless-dump` open the session sidecar `queryOnly` and reuse the recall views and metric rows. The dump redacts displayed seams, labels removed rows, and reports old generations as named skips. Output is capped at 16 KB. diff --git a/.changeset/whole-token-budgets.md b/.changeset/whole-token-budgets.md deleted file mode 100644 index 4496385..0000000 --- a/.changeset/whole-token-budgets.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"lossless-core": patch -"pi-lossless": patch -"opencode-lossless": patch ---- - -Ask providers for a whole number of tokens. A leaf target was half of the calibrated chunk budget, so it was fractional whenever that budget was odd, and a provider that validates `max_tokens` as an unsigned integer rejected the call with a 422. The ladder then stored the deterministic truncate: in one week of Pi sessions that was 1,315 of 5,358 summaries, with 540 rejected calls naming values such as `max_tokens: 5543.5`. The request builder now rounds to nearest, never below one, and treats a non-finite budget as that floor, before the reasoning headroom is added. Integer budgets produce the same request as before. No config key, migration or metric row changes. diff --git a/bun.lock b/bun.lock index f59a5d9..218eab3 100644 --- a/bun.lock +++ b/bun.lock @@ -23,14 +23,14 @@ }, "packages/core": { "name": "lossless-core", - "version": "0.1.2", + "version": "0.1.3", "dependencies": { "typebox": ">=1.4.3 <2", }, }, "packages/opencode": { "name": "opencode-lossless", - "version": "0.1.2", + "version": "0.1.3", "devDependencies": { "@opencode/ai": "2.1.4", "@opencode/plugin": "2.1.4", @@ -39,7 +39,7 @@ }, "packages/pi": { "name": "pi-lossless", - "version": "0.1.2", + "version": "0.1.3", "devDependencies": { "@earendil-works/pi-agent-core": "1.4.0", "@earendil-works/pi-ai": "1.4.0", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 329295e..8889ef4 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,16 @@ # lossless-core +## 0.1.3 + +### Patch Changes + +- 470a7b7: Verify file bytes and sha256 against the linked message text before inserting file rows on import. A repeated entry id with different text, or a file row whose text differs from the stored message, also refuses the import without writing. Existing rows stay untouched. +- 470a7b7: Signal a watermark miss on the ingest path. A full rescan now writes one `ingest-rescan` metric row and, in interactive sessions, one UI warning. Empty entries stay silent and ingest behavior is unchanged. +- 470a7b7: Add a mechanical tier for noisy tools. Name tools in `mechanicalTools` in summarizer-config, `/lcm` config, or the OpenCode plugin options. Their spans compact into deterministic `mechanical` leaves with zero summarizer spend at compaction time. Every message stays stored verbatim and covered, so the integrity coverage check passes, and heal re-derives a skipped leaf from provenance on demand. There is no ingest filtering. +- 470a7b7: Report orphan sidecars in doctor. `integritySnapshot` now lists sidecar files and stale `wal` and `shm` files with no live session (`.sqlite` by default, `.db` for Pi). `checkIntegrity` reports them as a read-only `orphan-sidecar` finding through `lcm doctor` and the diagnose bundle. Report only. Deletion stays manual. +- 470a7b7: Upgrade recall search. `lcm_grep` takes `role`, `date_start`/`date_end`, and `tool_name` filters. Role and time are SQL predicates on the stored columns with a covering index. Tool scope is an FTS rewrite against `[tool:Name]` markers with no new table or index. `lcm_expand` takes an `anchor` entry id that centers the listing window with edge clamping. The recall manifest and the retrieval brief order by stop-word stripped query-word overlap over summary headers. A read-only files view lists each linked file once with an incomplete-coverage flag and a `large-inline` mark. No migration and no new writer. +- 0c70748: Ask providers for a whole number of tokens. A leaf target was half of the calibrated chunk budget, so it was fractional whenever that budget was odd, and a provider that validates `max_tokens` as an unsigned integer rejected the call with a 422. The ladder then stored the deterministic truncate: in one week of Pi sessions that was 1,315 of 5,358 summaries, with 540 rejected calls naming values such as `max_tokens: 5543.5`. The request builder now rounds to nearest, never below one, and treats a non-finite budget as that floor, before the reasoning headroom is added. Integer budgets produce the same request as before. No config key, migration or metric row changes. + ## 0.1.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index d0044fc..6425ff8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "lossless-core", - "version": "0.1.2", + "version": "0.1.3", "description": "The Lossless Context Management engine: stores every message verbatim, swaps aged context for searchable pointers, and takes a host for the model calls it cannot make itself.", "keywords": [ "compaction", diff --git a/packages/core/skills/lossless-core/SKILL.md b/packages/core/skills/lossless-core/SKILL.md index ac69c22..b5d5d8c 100644 --- a/packages/core/skills/lossless-core/SKILL.md +++ b/packages/core/skills/lossless-core/SKILL.md @@ -5,7 +5,7 @@ license: MIT metadata: type: core library: "lossless-core" - library_version: "0.1.2" + library_version: "0.1.3" sources: - stainless-code/lossless:packages/core/src/host.ts - stainless-code/lossless:packages/core/src/index.ts diff --git a/packages/opencode/CHANGELOG.md b/packages/opencode/CHANGELOG.md index 4f910d4..c81d468 100644 --- a/packages/opencode/CHANGELOG.md +++ b/packages/opencode/CHANGELOG.md @@ -1,5 +1,18 @@ # opencode-lossless +## 0.1.3 + +### Patch Changes + +- 9c0fdc5: Harden `lossless-gc` against deleting sidecars that are live in another process. Sweeps skip stores active within the last 60 minutes and name them. Bare `--older-than 0` without `--session` is refused. `--session` on a store active within 60 minutes needs `--force`. Candidates younger than 24 hours carry a warning. +- 470a7b7: Verify file bytes and sha256 against the linked message text before inserting file rows on import. A repeated entry id with different text, or a file row whose text differs from the stored message, also refuses the import without writing. Existing rows stay untouched. +- 470a7b7: Add a mechanical tier for noisy tools. Name tools in `mechanicalTools` in summarizer-config, `/lcm` config, or the OpenCode plugin options. Their spans compact into deterministic `mechanical` leaves with zero summarizer spend at compaction time. Every message stays stored verbatim and covered, so the integrity coverage check passes, and heal re-derives a skipped leaf from provenance on demand. There is no ingest filtering. +- 9c0fdc5: Change the default `sidecarDir` to the auto-detected global path. The plugin uses `XDG_DATA_HOME` with a `~/.local/share` fallback, uses `LOCALAPPDATA` with an `APPDATA` fallback and then a `/AppData/Local` fallback on Windows, and uses `./.lossless` when no home resolves. To keep per-project storage, set `"sidecarDir": "./.lossless"`. After upgrading a project that used `./.lossless`, keep that setting to keep its history: `/lossless-migrate` upgrades in place in the configured directory only (dry run by default) and moves nothing, so it cannot recover history left in `./.lossless`. To carry history across, export per session under the old config and import into an empty store under the new one, or stop the server first and copy the `.sqlite`, `-wal`, and `-shm` files across and then migrate. The plugin never moves sidecars. +- 470a7b7: Report orphan sidecars in doctor. `integritySnapshot` now lists sidecar files and stale `wal` and `shm` files with no live session (`.sqlite` by default, `.db` for Pi). `checkIntegrity` reports them as a read-only `orphan-sidecar` finding through `lcm doctor` and the diagnose bundle. Report only. Deletion stays manual. +- 470a7b7: Upgrade recall search. `lcm_grep` takes `role`, `date_start`/`date_end`, and `tool_name` filters. Role and time are SQL predicates on the stored columns with a covering index. Tool scope is an FTS rewrite against `[tool:Name]` markers with no new table or index. `lcm_expand` takes an `anchor` entry id that centers the listing window with edge clamping. The recall manifest and the retrieval brief order by stop-word stripped query-word overlap over summary headers. A read-only files view lists each linked file once with an incomplete-coverage flag and a `large-inline` mark. No migration and no new writer. +- 470a7b7: Add a read-only static sidecar dump. `/lcm dump` and `/lossless-dump` open the session sidecar `queryOnly` and reuse the recall views and metric rows. The dump redacts displayed seams, labels removed rows, and reports old generations as named skips. Output is capped at 16 KB. +- 0c70748: Ask providers for a whole number of tokens. A leaf target was half of the calibrated chunk budget, so it was fractional whenever that budget was odd, and a provider that validates `max_tokens` as an unsigned integer rejected the call with a 422. The ladder then stored the deterministic truncate: in one week of Pi sessions that was 1,315 of 5,358 summaries, with 540 rejected calls naming values such as `max_tokens: 5543.5`. The request builder now rounds to nearest, never below one, and treats a non-finite budget as that floor, before the reasoning headroom is added. Integer budgets produce the same request as before. No config key, migration or metric row changes. + ## 0.1.2 ### Patch Changes diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 2ded67c..b44c77c 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "name": "opencode-lossless", - "version": "0.1.2", + "version": "0.1.3", "description": "Lossless Context Management for OpenCode v2: long sessions keep working past the point where the model would forget, and every verbatim message stays searchable and readable.", "keywords": [ "coding-agent", diff --git a/packages/opencode/skills/opencode-lossless/SKILL.md b/packages/opencode/skills/opencode-lossless/SKILL.md index eee407e..1ebb9dd 100644 --- a/packages/opencode/skills/opencode-lossless/SKILL.md +++ b/packages/opencode/skills/opencode-lossless/SKILL.md @@ -5,7 +5,7 @@ license: MIT metadata: type: composition library: "opencode-lossless" - library_version: "0.1.2" + library_version: "0.1.3" requires: - lossless sources: diff --git a/packages/pi/CHANGELOG.md b/packages/pi/CHANGELOG.md index c72cba8..9214e9d 100644 --- a/packages/pi/CHANGELOG.md +++ b/packages/pi/CHANGELOG.md @@ -1,5 +1,17 @@ # pi-lossless +## 0.1.3 + +### Patch Changes + +- 470a7b7: Verify file bytes and sha256 against the linked message text before inserting file rows on import. A repeated entry id with different text, or a file row whose text differs from the stored message, also refuses the import without writing. Existing rows stay untouched. +- 470a7b7: Signal a watermark miss on the ingest path. A full rescan now writes one `ingest-rescan` metric row and, in interactive sessions, one UI warning. Empty entries stay silent and ingest behavior is unchanged. +- 470a7b7: Add a mechanical tier for noisy tools. Name tools in `mechanicalTools` in summarizer-config, `/lcm` config, or the OpenCode plugin options. Their spans compact into deterministic `mechanical` leaves with zero summarizer spend at compaction time. Every message stays stored verbatim and covered, so the integrity coverage check passes, and heal re-derives a skipped leaf from provenance on demand. There is no ingest filtering. +- 470a7b7: Report orphan sidecars in doctor. `integritySnapshot` now lists sidecar files and stale `wal` and `shm` files with no live session (`.sqlite` by default, `.db` for Pi). `checkIntegrity` reports them as a read-only `orphan-sidecar` finding through `lcm doctor` and the diagnose bundle. Report only. Deletion stays manual. +- 470a7b7: Upgrade recall search. `lcm_grep` takes `role`, `date_start`/`date_end`, and `tool_name` filters. Role and time are SQL predicates on the stored columns with a covering index. Tool scope is an FTS rewrite against `[tool:Name]` markers with no new table or index. `lcm_expand` takes an `anchor` entry id that centers the listing window with edge clamping. The recall manifest and the retrieval brief order by stop-word stripped query-word overlap over summary headers. A read-only files view lists each linked file once with an incomplete-coverage flag and a `large-inline` mark. No migration and no new writer. +- 470a7b7: Add a read-only static sidecar dump. `/lcm dump` and `/lossless-dump` open the session sidecar `queryOnly` and reuse the recall views and metric rows. The dump redacts displayed seams, labels removed rows, and reports old generations as named skips. Output is capped at 16 KB. +- 0c70748: Ask providers for a whole number of tokens. A leaf target was half of the calibrated chunk budget, so it was fractional whenever that budget was odd, and a provider that validates `max_tokens` as an unsigned integer rejected the call with a 422. The ladder then stored the deterministic truncate: in one week of Pi sessions that was 1,315 of 5,358 summaries, with 540 rejected calls naming values such as `max_tokens: 5543.5`. The request builder now rounds to nearest, never below one, and treats a non-finite budget as that floor, before the reasoning headroom is added. Integer budgets produce the same request as before. No config key, migration or metric row changes. + ## 0.1.2 ### Patch Changes diff --git a/packages/pi/package.json b/packages/pi/package.json index 709a997..c034d5c 100644 --- a/packages/pi/package.json +++ b/packages/pi/package.json @@ -1,6 +1,6 @@ { "name": "pi-lossless", - "version": "0.1.2", + "version": "0.1.3", "description": "Lossless Context Management for the Pi coding agent: long sessions keep working past the point where the model would forget, and every verbatim message stays searchable and readable (lcm_grep / lcm_describe / lcm_expand_query).", "keywords": [ "coding-agent", diff --git a/packages/pi/skills/pi-lossless/SKILL.md b/packages/pi/skills/pi-lossless/SKILL.md index 86c69e2..3b3c31f 100644 --- a/packages/pi/skills/pi-lossless/SKILL.md +++ b/packages/pi/skills/pi-lossless/SKILL.md @@ -5,7 +5,7 @@ license: MIT metadata: type: composition library: "pi-lossless" - library_version: "0.1.2" + library_version: "0.1.3" requires: [] sources: - stainless-code/lossless:packages/pi/src