ds4-context-engine 0.3.0-beta.1 → 0.3.0-beta.3

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/README.md CHANGED
@@ -16,7 +16,7 @@ bounded active context with provenance
16
16
  Pi provider
17
17
  ```
18
18
 
19
- > **Project status:** Stable `0.2.0` includes M0–M20 and frozen 0.2 contracts. Candidate prerelease `0.3.0-beta.1` adds bounded Context Manifest storage, cooperative database leases, metadata-only storage diagnostics, and explicit offline inspect/compact/recover maintenance on top of alpha.5's overflow-safe hierarchical compaction. Canonical records, SQLite schema 15, and runtime contracts remain unchanged. The beta will use npm's explicit `beta` tag while `latest` remains `0.2.0`, and the maintenance line targets Pi `0.84.3`.
19
+ > **Project status:** Stable `0.2.0` includes M0–M20 and frozen 0.2 contracts. Published prerelease `0.3.0-beta.2` carries forward beta.1's bounded Context Manifest storage, cooperative database leases, metadata-only storage diagnostics, and explicit offline inspect/compact/recover maintenance after successful live maintenance validation. Canonical records, SQLite schema 15, and runtime contracts remain unchanged. npm `beta` points to `0.3.0-beta.2`, `alpha` remains `0.3.0-alpha.5`, `latest` remains `0.2.0`, and the maintenance line targets Pi `0.84.3`.
20
20
 
21
21
  ## Why DS4
22
22
 
@@ -92,7 +92,7 @@ The stable `0.2.0` packages (`ds4-context-engine`, `ds4-context-core`, and `ds4-
92
92
  To dogfood the beta without replacing a global stable installation, pin the exact version in a disposable project:
93
93
 
94
94
  ```bash
95
- pi install -l npm:ds4-context-engine@0.3.0-beta.1
95
+ pi install -l npm:ds4-context-engine@0.3.0-beta.2
96
96
  ```
97
97
 
98
98
  Follow the [0.3 beta dogfooding runbook](docs/DOGFOODING_0.3.0_BETA.md); use synthetic data and a dedicated session directory.
@@ -425,7 +425,7 @@ npm run schema:context-persistence
425
425
  npm run latency:check -- /path/to/exact/ds4-context-core@0.1.2
426
426
  npm run pack:check
427
427
  # Post-publication, with an exact version rather than a dist-tag:
428
- npm run registry:check -- 0.3.0-beta.1
428
+ npm run registry:check -- 0.3.0-beta.2
429
429
  npm pack --dry-run
430
430
  npm pack --dry-run --workspace ds4-context-core
431
431
  npm pack --dry-run --workspace ds4-context-reference-adapter
@@ -479,6 +479,7 @@ scripts package and release-readiness checks
479
479
  - [0.2.0 release readiness](docs/RELEASE_READINESS_0.2.0.md)
480
480
  - [0.2.0 release notes](docs/releases/0.2.0.md)
481
481
  - [0.2.0-rc.1 release notes](docs/releases/0.2.0-rc.1.md)
482
+ - [0.3.0-beta.2 prerelease notes](docs/releases/0.3.0-beta.2.md)
482
483
  - [0.3.0-beta.1 prerelease notes](docs/releases/0.3.0-beta.1.md)
483
484
  - [0.3.0-alpha.5 prerelease notes](docs/releases/0.3.0-alpha.5.md)
484
485
  - [0.3.0-alpha.4 prerelease notes](docs/releases/0.3.0-alpha.4.md)
@@ -492,7 +493,7 @@ scripts package and release-readiness checks
492
493
 
493
494
  The original M0–M13 roadmap is complete. `ds4-context-core` contains the compiled runtime-neutral implementation. M14 context-quality metrics, M15 rich symbol indexing, M16 hybrid semantic retrieval, M17 cross-session project memory, M18 learned-ranking shadow evaluation, M19's runtime adapter/conformance kit, and M20 opt-in local KV eligibility/replay are implemented on `main`. Learned active ranking remains promotion-gated, Pi reports local KV as unsupported, and static ranking/native completion stay authoritative on every failure.
494
495
 
495
- The [0.2.0 roadmap](docs/ROADMAP_0.2.0.md) is complete. Candidate `0.3.0-beta.1` builds on the [context persistence tool](docs/CONTEXT_PERSISTENCE_TOOL.md) and privacy-safe [compaction](docs/COMPACTION.md) hardening with bounded persisted manifests, per-profile calibration retention, cooperative client leases, storage diagnostics, and recoverable offline maintenance. Confirmation, exact targeting, strict summary grounding, Pi fallback, and stable canonical/configuration/SQLite/runtime contracts remain unchanged. The [0.2 readiness record](docs/RELEASE_READINESS_0.2.0.md) remains the compatibility baseline. Sensitive or transport-specific behavior remains opt-in, and the 0.1 lexical planner stays available as the deterministic fallback.
496
+ The [0.2.0 roadmap](docs/ROADMAP_0.2.0.md) is complete. Published prerelease `0.3.0-beta.2` carries forward the [context persistence tool](docs/CONTEXT_PERSISTENCE_TOOL.md), privacy-safe [compaction](docs/COMPACTION.md) hardening, bounded persisted manifests, per-profile calibration retention, cooperative client leases, storage diagnostics, and recoverable offline maintenance, with successful live maintenance evidence from beta.1. Confirmation, exact targeting, strict summary grounding, Pi fallback, and stable canonical/configuration/SQLite/runtime contracts remain unchanged. The [0.2 readiness record](docs/RELEASE_READINESS_0.2.0.md) remains the compatibility baseline. Sensitive or transport-specific behavior remains opt-in, and the 0.1 lexical planner stays available as the deterministic fallback.
496
497
 
497
498
  ## Contributing
498
499
 
@@ -1,6 +1,6 @@
1
1
  # Dogfooding DS4 0.3.0 Beta
2
2
 
3
- This runbook validates the published `ds4-context-engine@0.3.0-beta.1` package through sustained real Pi use. It complements automated tests and release smoke checks; it does not replace them.
3
+ This runbook validates the published `ds4-context-engine@0.3.0-beta.2` package through sustained real Pi use. It complements automated tests and release smoke checks; it does not replace them.
4
4
 
5
5
  The primary target is the model-callable `context_persistence` surface. Pi JSONL must remain canonical and append-only, SQLite must remain rebuildable, and no model-callable write may occur without a fresh positive local UI decision.
6
6
 
@@ -29,7 +29,7 @@ mkdir -p /tmp/ds4-beta-dogfood
29
29
  cd /tmp/ds4-beta-dogfood
30
30
  git init
31
31
  mkdir -p sessions evidence
32
- pi install -l npm:ds4-context-engine@0.3.0-beta.1
32
+ pi install -l npm:ds4-context-engine@0.3.0-beta.2
33
33
  pi list
34
34
  pi --version
35
35
  ```
package/docs/RELEASING.md CHANGED
@@ -100,7 +100,7 @@ After all registry packages are available:
100
100
  npm run registry:check -- "$VERSION"
101
101
  ```
102
102
 
103
- This installs all three packages in a fresh temporary project, checks exact adapter/core dependencies, imports public core/KV exports, runs compiled reference conformance and the packaged quality corpus, and starts the published Pi extension through isolated offline RPC state.
103
+ This installs all three packages in a fresh temporary project, checks exact adapter/core dependencies, imports public core/KV exports, runs compiled reference conformance and the packaged quality corpus, probes the installed `ds4-context-storage` CLI shim, and starts the published Pi extension through isolated offline RPC state.
104
104
  2. create and push the signed or annotated `v$VERSION` tag;
105
105
  3. create the GitHub Release from that tag;
106
106
  4. update installation documentation if registry names or requirements changed.
@@ -14,7 +14,15 @@ ds4-context-storage compact --database <exact-path>
14
14
  ds4-context-storage recover --database <exact-path>
15
15
  ```
16
16
 
17
- `inspect` is metadata-only and read-only. `compact` and `recover` require an interactive local TTY; there is no V1 `--yes` option. The database path is mandatory and is normalized before use.
17
+ `inspect` is metadata-only and read-only. `compact` and `recover` require both interactive local TTY input and output; there is no V1 `--yes` option. The database path is mandatory and is normalized before use. Piping either mutating command directly through `tee` makes stdout non-TTY and therefore fails safely at `stage=confirmation` before maintenance starts. If a local transcript is required, allocate a pseudo-TTY instead of bypassing confirmation, for example:
18
+
19
+ ```bash
20
+ script --quiet --flush --return \
21
+ --command 'ds4-context-storage compact --database "$HOME/.pi/agent/ds4-context/context.db"' \
22
+ ./ds4-storage-maintenance.typescript
23
+ ```
24
+
25
+ The transcript contains the exact local database path and typed confirmation, so keep it private and remove it according to local evidence-retention policy.
18
26
 
19
27
  Typical default path:
20
28
 
@@ -1,6 +1,6 @@
1
1
  # DS4 Context Engine 0.3.0-beta.1
2
2
 
3
- Status: release candidate; publication and exact registry verification pending.
3
+ Status: published prerelease on 2026-09-03; exact registry verification passed.
4
4
 
5
5
  This coordinated beta contains SQLite growth caused by persisted Context Manifests and adds explicit, recoverable offline maintenance for already-large derived databases. It also hardens compaction provider retries while preserving strict grounding, privacy filtering, canonical Pi JSONL semantics, atomic tool exchanges, one final Pi compaction entry, and fail-open delegation to Pi.
6
6
 
@@ -67,7 +67,16 @@ Large-database validation used a temporary private copy created from a read-only
67
67
  - the final candidate passed quick check and foreign-key validation while the standalone backup remained present;
68
68
  - temporary copy, backup, and stage files were removed afterward, with no maintenance artifact created next to the live database or in the repository.
69
69
 
70
- Publication, exact registry verification, annotated tag, and GitHub prerelease are performed only after the committed candidate passes validation-only CI.
70
+ Validation-only CI run [`33752225991`](https://github.com/Alucard24/ds4-context-engine/actions/runs/33752225991) passed on Node.js `22.19.0` and `24.x` for committed candidate `4ef936f5a7e5c6afb63fd42d0b745d9201a7b87f` before publication.
71
+
72
+ ## Registry evidence
73
+
74
+ - `npm run registry:check -- 0.3.0-beta.1`: passed against all three exact published versions, including exact adapter/core dependencies, public core exports, compiled reference conformance, packaged quality corpus, packaged Pi extension startup, and the installed `ds4-context-storage` CLI shim/usage probe.
75
+ - npm `beta` resolves to `0.3.0-beta.1` for all three packages.
76
+ - npm `latest` remains `0.2.0`, `alpha` remains `0.3.0-alpha.5`, and `rc` remains `0.2.0-rc.1` for all three packages.
77
+ - Published SHA-1 values are `fc5d6aaf2304291dc147ecc639281fb947390a51` (core), `7bfe0cf61a0f1213db058d5f89c1b7feb25db54a` (reference adapter), and `6abad04e2a2c30566c042f1e0829930c6546ed54` (Pi adapter).
78
+
79
+ Exact registry verification has passed; the annotated tag and GitHub prerelease remain pending.
71
80
 
72
81
  ## Documentation
73
82
 
@@ -0,0 +1,102 @@
1
+ # DS4 Context Engine 0.3.0-beta.2
2
+
3
+ Status: published on 2026-09-03 under the npm `beta` dist-tag.
4
+
5
+ This coordinated beta carries forward beta.1 without changing canonical records, SQLite schema, runtime contracts, retention limits, privacy policy, compaction validation, or fallback semantics. It incorporates the operational evidence from a successful maintenance of the live derived SQLite projection and documents how to retain an interactive confirmation when recording a maintenance transcript.
6
+
7
+ ## Changed since beta.1
8
+
9
+ - Recorded successful offline maintenance of a live schema-15 database after all Pi holders closed and the exact local `COMPACT` confirmation was entered.
10
+ - Clarified that `compact` and `recover` require both stdin and stdout to be local TTYs. Directly piping a mutating command through `tee` fails safely before maintenance; transcript capture must allocate a pseudo-TTY and must not bypass confirmation.
11
+ - Updated the beta dogfooding target and coordinated package versions to `0.3.0-beta.2`.
12
+
13
+ There are no functional storage-format or provider-path changes relative to beta.1.
14
+
15
+ ## Live maintenance evidence
16
+
17
+ The authorized beta.1 maintenance run completed backup, working-copy transformation, candidate validation, recoverable swap, and post-swap inspection:
18
+
19
+ - database size: 2.42 GiB before, 377 MiB immediately after compaction;
20
+ - Context Manifests: 1,630 before, 128 after;
21
+ - manifest payload: 1.02 GiB before, 13.5 MiB after;
22
+ - 1,502 manifests pruned, 123 retained manifests rewritten as bounded excluded rollups, and no irreducible oversize skipped;
23
+ - schema 15, `quick_check=ok`, and zero foreign-key violations;
24
+ - no working, candidate, retired, lock, or maintenance-state artifact remained;
25
+ - after Pi reopened, the database returned to WAL mode with 128 manifests, no pending prune, and no maintenance recommendation;
26
+ - the fixed standalone backup remains retained with private file permissions during the observation period.
27
+
28
+ The first transcript-capturing launcher redirected stdout through `tee`, so the CLI rejected it with `interactive-confirmation-required` at `stage=confirmation`. The confirmation precedes `compactStorage()`, and no backup or staging artifact was created by that failed attempt. The successful retry used a pseudo-TTY and preserved the exact local confirmation requirement.
29
+
30
+ ## Safety and compatibility
31
+
32
+ Pi JSONL remains canonical and append-only. SQLite remains disposable and rebuildable. Physical maintenance remains explicit, offline, local-TTY-only, and unavailable to model-callable tools. Every `context_persistence` write still requires a fresh positive local UI decision; destructive Pin and Memory operations still require an exact target and current revision; canonical mutations still append through Pi before SQLite reconciliation.
33
+
34
+ Strict exact-value grounding, bounded repair, privacy filtering, atomic tool exchanges, overflow-safe hierarchical compaction, transport-only retries, and Pi fallback behavior are unchanged. Rejected exact values, provider payloads, SQL, bound values, and raw SQLite messages remain absent from diagnostics.
35
+
36
+ Compatibility remains unchanged:
37
+
38
+ - SQLite schema: `15`;
39
+ - configuration: `ds4-context-config-v1`;
40
+ - runtime adapter: `runtime-adapter-v1`;
41
+ - persistence tool: `ds4-context-persistence-tool-v1`;
42
+ - persistence result: `ds4-context-persistence-result-v1`;
43
+ - Pi: `0.84.3`;
44
+ - Node.js: `>=22.19.0`.
45
+
46
+ Historical excluded-inventory rendering remains unsupported after downgrade once bounded `excluded-rollup` rows have been written, because earlier readers may present sampled excluded details as complete.
47
+
48
+ ## Package/version policy
49
+
50
+ The coordinated version is `0.3.0-beta.2` for:
51
+
52
+ ```text
53
+ ds4-context-core
54
+ ds4-context-reference-adapter
55
+ ds4-context-engine
56
+ ```
57
+
58
+ Both adapters depend exactly on `ds4-context-core@0.3.0-beta.2`. Publication used the explicit npm `beta` dist-tag for all three packages. npm `latest` remains stable `0.2.0`, and GitHub Actions remains validation-only with OIDC and package-write permissions denied.
59
+
60
+ ## Candidate validation
61
+
62
+ Local candidate verification on Node.js `26.5.1`:
63
+
64
+ - `npm run check`: 69 files and 341 tests passed.
65
+ - Three consecutive focused multi-process SQLite concurrency runs passed.
66
+ - `npm run quality:compare`: candidate quality `0.9875` versus baseline `0.808156`.
67
+ - `npm run schema:context-persistence`: 1,266 bytes and 317 estimated tokens; below the 1,500 absolute and 320 relative limits.
68
+ - Three feature-disabled latency comparisons against exact `ds4-context-core@0.1.2` passed with ratios `1.075625`, `0.899241`, and `1.008488`, each at or below `1.10`, using 200 samples and 50 calls per sample.
69
+ - `npm run pack:check`: verified core (223 files), reference adapter (7 files), and Pi adapter (68 files) in a clean consumer.
70
+ - `npm pack --dry-run --json` for all three packages passed with the same inventories and no forbidden local/session/storage files.
71
+ - `git diff --check` passed; the only pre-existing untracked path is `.serena/`, which is excluded from commits and package inventories.
72
+ - Version, exact core dependencies, package-lock entries, extension constant, and reference-adapter constant are synchronized to `0.3.0-beta.2`.
73
+
74
+ Validation-only CI run [`33762010502`](https://github.com/Alucard24/ds4-context-engine/actions/runs/33762010502) passed on Node.js `22.19.0` and `24.x` for candidate commit `e1dab370ea290da601c817aa358e9c384d4b068c`.
75
+
76
+ ## Registry evidence
77
+
78
+ Exact post-publication verification passed for all three `0.3.0-beta.2` packages. The clean registry consumer verified exact adapter/core dependencies, public core exports, compiled reference-adapter conformance, packaged quality corpus, packaged Pi extension startup, and the installed `ds4-context-storage` CLI declaration, shim, and usage probe.
79
+
80
+ Published package shasums:
81
+
82
+ ```text
83
+ ds4-context-core: d9cc4d10756b984aa8a9078fcad05675b09b327e
84
+ ds4-context-reference-adapter: 6a9a829cf072ed613a5eec0756f967da81f481b4
85
+ ds4-context-engine: 965f65d8d350f712a0bcb0a416d1eebef46f82cd
86
+ ```
87
+
88
+ For all three packages, npm `beta` resolves to `0.3.0-beta.2`, `alpha` remains `0.3.0-alpha.5`, `rc` remains `0.2.0-rc.1`, and `latest` remains `0.2.0`.
89
+
90
+ npm emitted a publish-time auto-correction warning for the root `bin` entry. The exact registry smoke independently confirmed that the published manifest still declares `ds4-context-storage`, a fresh install creates its shim, and the installed command returns the expected bounded usage response. The warning did not remove the CLI from the published artifact.
91
+
92
+ Annotated tag `v0.3.0-beta.2` targets verified registry-evidence commit `8323fb74fca286c512ea04efab54aa6065c8d315`. The GitHub prerelease is published at <https://github.com/Alucard24/ds4-context-engine/releases/tag/v0.3.0-beta.2>.
93
+
94
+ ## Documentation
95
+
96
+ - [`../DOGFOODING_0.3.0_BETA.md`](../DOGFOODING_0.3.0_BETA.md)
97
+ - [`../STORAGE_MAINTENANCE.md`](../STORAGE_MAINTENANCE.md)
98
+ - [`../STORAGE.md`](../STORAGE.md)
99
+ - [`../CONTEXT_MANIFEST.md`](../CONTEXT_MANIFEST.md)
100
+ - [`../COMPACTION.md`](../COMPACTION.md)
101
+ - [`../RELEASING.md`](../RELEASING.md)
102
+ - [`0.3.0-beta.1.md`](0.3.0-beta.1.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ds4-context-engine",
3
- "version": "0.3.0-beta.1",
3
+ "version": "0.3.0-beta.3",
4
4
  "description": "Non-destructive, provider-independent context management for Pi.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "ds4-context-core": "0.3.0-beta.1"
65
+ "ds4-context-core": "0.3.0-beta.3"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@earendil-works/pi-ai": "0.84.3",
@@ -1,4 +1,4 @@
1
- export const EXTENSION_VERSION = "0.3.0-beta.1";
1
+ export const EXTENSION_VERSION = "0.3.0-beta.3";
2
2
  export const SUPPORTED_PI_VERSION = "0.84.3";
3
3
  export const OBSERVER_PLANNER_VERSION = "observer-model-aware-v1";
4
4
  export const PLANNER_VERSION = "managed-learned-ranking-v1";