ds4-context-engine 0.2.0-rc.1 → 0.2.0
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 +6 -11
- package/docs/RELEASE_READINESS_0.2.0.md +2 -2
- package/docs/RELEASING.md +3 -1
- package/docs/ROADMAP_0.2.0.md +9 -1
- package/docs/releases/0.2.0.md +43 -0
- package/package.json +2 -2
- package/src/extension/runtime.ts +4 -4
- package/src/pi-adapter/session-indexer.ts +1 -1
- package/src/pi-adapter/version.ts +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ bounded active context with provenance
|
|
|
16
16
|
Pi provider
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
> **Project status:** M0–M20 and release
|
|
19
|
+
> **Project status:** Stable `0.2.0` includes M0–M20 and release hardening: quality measurement, structural/hybrid retrieval, cross-session project memory, learned-ranking shadow evaluation, the runtime adapter kit, opt-in local KV reuse, schema-10 upgrades, long-session gates, and frozen 0.2 contracts. The maintenance line targets Pi `0.84.3`.
|
|
20
20
|
|
|
21
21
|
## Why DS4
|
|
22
22
|
|
|
@@ -86,13 +86,7 @@ Install the latest stable public npm package with:
|
|
|
86
86
|
pi install npm:ds4-context-engine
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
pi install npm:ds4-context-engine@rc
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
All prerelease packages (`ds4-context-engine`, `ds4-context-core`, and `ds4-context-reference-adapter`) use the same exact version.
|
|
89
|
+
The stable `0.2.0` packages (`ds4-context-engine`, `ds4-context-core`, and `ds4-context-reference-adapter`) use the same exact version. Both adapters require the matching core version.
|
|
96
90
|
|
|
97
91
|
### Local checkout
|
|
98
92
|
|
|
@@ -340,7 +334,7 @@ The following example shows the main configuration groups. Omitted values use th
|
|
|
340
334
|
}
|
|
341
335
|
```
|
|
342
336
|
|
|
343
|
-
Invalid or unknown values are ignored with a warning. Model overrides merge deterministically from `*` to `provider/*` to an exact `provider/model` profile. The 0.2 release line freezes this additive surface as `ds4-context-config-v1`; existing keys, validation, and defaults are pinned by the compatibility golden.
|
|
337
|
+
Invalid or unknown values are ignored with a warning. Model overrides merge deterministically from `*` to `provider/*` to an exact `provider/model` profile. Routine session open/close, database, rebuild, and project-index summaries are emitted only at `debug`, so the default `info` level keeps session changes quiet while preserving actionable warnings. The 0.2 release line freezes this additive surface as `ds4-context-config-v1`; existing keys, validation, and defaults are pinned by the compatibility golden.
|
|
344
338
|
|
|
345
339
|
## Privacy and provider storage
|
|
346
340
|
|
|
@@ -398,7 +392,7 @@ npm run check
|
|
|
398
392
|
npm run quality:compare
|
|
399
393
|
npm run pack:check
|
|
400
394
|
# Post-publication, with an exact version rather than a dist-tag:
|
|
401
|
-
npm run registry:check -- 0.2.0
|
|
395
|
+
npm run registry:check -- 0.2.0
|
|
402
396
|
npm pack --dry-run
|
|
403
397
|
npm pack --dry-run --workspace ds4-context-core
|
|
404
398
|
npm pack --dry-run --workspace ds4-context-reference-adapter
|
|
@@ -446,6 +440,7 @@ scripts package and release-readiness checks
|
|
|
446
440
|
- [Roadmap 0.2.0](docs/ROADMAP_0.2.0.md)
|
|
447
441
|
- [Release process](docs/RELEASING.md)
|
|
448
442
|
- [0.2.0 release readiness](docs/RELEASE_READINESS_0.2.0.md)
|
|
443
|
+
- [0.2.0 release notes](docs/releases/0.2.0.md)
|
|
449
444
|
- [0.2.0-rc.1 release notes](docs/releases/0.2.0-rc.1.md)
|
|
450
445
|
- [Architecture decisions](docs/ADR/README.md)
|
|
451
446
|
- [Original development plan](DS4_Context_Engine_Extension_Piano_Sviluppo.md)
|
|
@@ -454,7 +449,7 @@ scripts package and release-readiness checks
|
|
|
454
449
|
|
|
455
450
|
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.
|
|
456
451
|
|
|
457
|
-
The [0.2.0 roadmap](docs/ROADMAP_0.2.0.md) is
|
|
452
|
+
The [0.2.0 roadmap](docs/ROADMAP_0.2.0.md) is complete. The [readiness record](docs/RELEASE_READINESS_0.2.0.md) maps every release gate to tests and operator commands. Sensitive or transport-specific behavior remains opt-in, and the 0.1 lexical planner stays available as the deterministic fallback.
|
|
458
453
|
|
|
459
454
|
## Contributing
|
|
460
455
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DS4 0.2.0 Release Readiness
|
|
2
2
|
|
|
3
|
-
This document is the
|
|
3
|
+
This document is the completed hardening record for the stable 0.2 line. The `0.2.0-rc.1` candidate passed the commands below on a clean commit, and the stable release requires the same gates plus exact verification of the published `0.2.0` registry artifacts.
|
|
4
4
|
|
|
5
5
|
## Frozen compatibility surface
|
|
6
6
|
|
|
@@ -93,7 +93,7 @@ rm -rf "$BASELINE_DIR"
|
|
|
93
93
|
After publishing all three packages in dependency order, verify registry bytes rather than local tarballs:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
npm run registry:check -- 0.2.0
|
|
96
|
+
npm run registry:check -- 0.2.0
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
The registry check accepts an exact version, never a mutable dist-tag. It installs all three public packages plus the supported Pi SDK into a fresh project, validates matching exact core dependencies, imports core and local-KV exports, runs compiled reference conformance, runs the packaged quality corpus, and starts the published Pi extension through isolated offline RPC state.
|
package/docs/RELEASING.md
CHANGED
|
@@ -69,7 +69,9 @@ Review `package.json`, both workspace package manifests, and `package-lock.json`
|
|
|
69
69
|
|
|
70
70
|
## Publish
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Publishing is manual-only. GitHub Actions workflows must remain validation-only: do not add npm credentials, `NODE_AUTH_TOKEN`, `NPM_TOKEN`, `id-token: write`, `packages: write`, or an `npm publish` step. The CI workflow explicitly denies OIDC and package-write permissions.
|
|
73
|
+
|
|
74
|
+
Authenticate with npm using an interactive OTP or a granular publish token with bypass 2FA, verify the active account, and publish in dependency order:
|
|
73
75
|
|
|
74
76
|
```bash
|
|
75
77
|
npm whoami
|
package/docs/ROADMAP_0.2.0.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DS4 0.2.0 Roadmap
|
|
2
2
|
|
|
3
|
-
Status: **
|
|
3
|
+
Status: **complete**. Stable `0.2.0` is released with all compatibility and release gates satisfied.
|
|
4
4
|
|
|
5
5
|
Version 0.2.0 focuses on evidence quality, safe project-wide reuse and runtime portability. It extends the released 0.1.0 architecture without changing its canonical-state or failure guarantees.
|
|
6
6
|
|
|
@@ -248,6 +248,14 @@ Status: **implemented and released in `0.2.0-rc.1`**. See [`RELEASE_READINESS_0.
|
|
|
248
248
|
- Registry package smoke tests, documentation and release notes.
|
|
249
249
|
- Freeze config, database and adapter-contract schemas for 0.2.0.
|
|
250
250
|
|
|
251
|
+
### `0.2.0`
|
|
252
|
+
|
|
253
|
+
Status: **stable release completed**. See the [release notes](releases/0.2.0.md) and the final [`RELEASE_READINESS_0.2.0.md`](RELEASE_READINESS_0.2.0.md) evidence record.
|
|
254
|
+
|
|
255
|
+
- Promotes the validated release candidate without changing frozen 0.2 contracts or default behavior.
|
|
256
|
+
- Publishes matching stable versions of the core, reference adapter and Pi adapter.
|
|
257
|
+
- Verifies exact registry artifacts in a clean consumer after publication.
|
|
258
|
+
|
|
251
259
|
## Release gates
|
|
252
260
|
|
|
253
261
|
Version 0.2.0 is ready only when (the live evidence matrix is maintained in [`RELEASE_READINESS_0.2.0.md`](RELEASE_READINESS_0.2.0.md)):
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# DS4 Context Engine 0.2.0
|
|
2
|
+
|
|
3
|
+
Status: **stable release under the npm `latest` dist-tag**.
|
|
4
|
+
|
|
5
|
+
DS4 Context Engine 0.2.0 promotes the validated `0.2.0-rc.1` candidate without changing its frozen contracts, safe defaults, or canonical-state guarantees.
|
|
6
|
+
|
|
7
|
+
## Highlights since 0.1.2
|
|
8
|
+
|
|
9
|
+
- deterministic metadata-only context-quality metrics and comparison corpus;
|
|
10
|
+
- structural project chunks and richer symbol relations;
|
|
11
|
+
- opt-in local or explicitly consented remote hybrid semantic retrieval;
|
|
12
|
+
- opt-in cross-session project memory replay from canonical Pi JSONL;
|
|
13
|
+
- learned ranking with `off`, shadow, promotion-gated active, and static fallback modes;
|
|
14
|
+
- `runtime-adapter-v1`, a reusable conformance kit, and the callback/JSONL reference adapter;
|
|
15
|
+
- opt-in exact local prefix/KV reuse for adapters with a host-owned volatile runtime port;
|
|
16
|
+
- shared-SQLite WAL/write coordination and renewable fenced project-index leases.
|
|
17
|
+
|
|
18
|
+
## Stable-release evidence
|
|
19
|
+
|
|
20
|
+
- exact schema-v10 (0.1) to schema-v15 upgrade coverage;
|
|
21
|
+
- complete rebuild coverage from canonical session, adapter, and project sources;
|
|
22
|
+
- full configuration, migration, adapter, capability, and local-KV compatibility golden;
|
|
23
|
+
- 1,201-message repeated-planning coverage for hard limits, canonical integrity, and bounded derived retention;
|
|
24
|
+
- local/remote provider-switch, privacy, continuation, and cache-invalidation coverage;
|
|
25
|
+
- feature-disabled p95 comparison against exact `ds4-context-core@0.1.2` within the 10% release threshold;
|
|
26
|
+
- clean package-consumer validation and exact-version post-publication registry verification for all three packages.
|
|
27
|
+
|
|
28
|
+
## Compatibility and defaults
|
|
29
|
+
|
|
30
|
+
- Node.js `>=22.19.0`;
|
|
31
|
+
- Pi `0.84.3`;
|
|
32
|
+
- configuration contract `ds4-context-config-v1`;
|
|
33
|
+
- SQLite projection schema `15`;
|
|
34
|
+
- runtime adapter contract `runtime-adapter-v1`;
|
|
35
|
+
- matching `0.2.0` versions are required for adapters and `ds4-context-core`.
|
|
36
|
+
|
|
37
|
+
Existing 0.1 configuration remains valid. Semantic retrieval, cross-session memory, context-quality recording, learned ranking, and local KV reuse remain disabled by default. Pi JSONL, reference-adapter JSONL, and live project files remain canonical; SQLite, embeddings, ranking models, artifacts, and runtime KV state remain local and disposable.
|
|
38
|
+
|
|
39
|
+
## Upgrade and rollback
|
|
40
|
+
|
|
41
|
+
Opening a 0.1 database applies forward migrations 11–15 without rewriting canonical history. A 0.1 binary cannot open schema 15. To roll back, stop every process using the shared database, retain canonical JSONL and project files, and let 0.1 create a fresh derived database or use a different `storage.databasePath`. Never alter migration checksums or delete reference-adapter canonical JSONL.
|
|
42
|
+
|
|
43
|
+
See [`../RELEASE_READINESS_0.2.0.md`](../RELEASE_READINESS_0.2.0.md) for the complete gate matrix, limitations, and rollback procedure.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ds4-context-engine",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Non-destructive, provider-independent context management for Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"ds4-context-core": "0.2.0
|
|
60
|
+
"ds4-context-core": "0.2.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@earendil-works/pi-ai": "0.84.3",
|
package/src/extension/runtime.ts
CHANGED
|
@@ -567,7 +567,7 @@ export class Ds4ContextRuntime {
|
|
|
567
567
|
|
|
568
568
|
this.phase = this.config.context.mode;
|
|
569
569
|
this.setStatus(ctx, `DS4 ctx: ${this.config.context.mode}`);
|
|
570
|
-
this.logger.
|
|
570
|
+
this.logger.debug("session.opened", {
|
|
571
571
|
sessionId: this.session.sessionId,
|
|
572
572
|
persisted: Boolean(this.session.sessionFile),
|
|
573
573
|
projectPath: this.session.projectPath,
|
|
@@ -2162,7 +2162,7 @@ export class Ds4ContextRuntime {
|
|
|
2162
2162
|
projectPath: resolve(ctx.cwd),
|
|
2163
2163
|
fallbackReason: "Project indexing is skipped for filesystem roots and the user home directory",
|
|
2164
2164
|
};
|
|
2165
|
-
this.logger.
|
|
2165
|
+
this.logger.debug("project_index.skipped", {
|
|
2166
2166
|
reason: "broad-root",
|
|
2167
2167
|
projectPath: resolve(ctx.cwd),
|
|
2168
2168
|
});
|
|
@@ -2194,7 +2194,7 @@ export class Ds4ContextRuntime {
|
|
|
2194
2194
|
return;
|
|
2195
2195
|
}
|
|
2196
2196
|
this.lastProject = this.projectKnowledge.diagnostics();
|
|
2197
|
-
this.logger.
|
|
2197
|
+
this.logger.debug("project_index.opened", {
|
|
2198
2198
|
files: sync.discoveredFiles,
|
|
2199
2199
|
indexedFiles: sync.indexedFiles,
|
|
2200
2200
|
currentSnippets: sync.currentSnippets,
|
|
@@ -2587,7 +2587,7 @@ export class Ds4ContextRuntime {
|
|
|
2587
2587
|
this.closeDatabase();
|
|
2588
2588
|
if (ctx) this.setStatus(ctx, undefined);
|
|
2589
2589
|
this.phase = "closed";
|
|
2590
|
-
this.logger.
|
|
2590
|
+
this.logger.debug("runtime.closed", { sessionId: this.session?.sessionId });
|
|
2591
2591
|
}
|
|
2592
2592
|
|
|
2593
2593
|
private getCompactionDiagnostics(ctx: ExtensionContext): CompactionDiagnostics {
|
|
@@ -229,7 +229,7 @@ export class PiSessionIndexer {
|
|
|
229
229
|
read.malformedLines,
|
|
230
230
|
started,
|
|
231
231
|
);
|
|
232
|
-
this.logger.
|
|
232
|
+
this.logger.debug("session_index.rebuilt", { sessionId: session.sessionId, ...result });
|
|
233
233
|
return result;
|
|
234
234
|
}
|
|
235
235
|
|