# DS4 Context Engine 0.3.2

Status: published 2026-09-04 as stable, printed under the npm `latest` dist-tag.

This release adds the `/context config` local command family on top of the 0.3.1 stable candidate. It carries forward 0.3.1 without changing canonical records, SQLite schema, runtime contracts, retention limits, privacy policy, compaction validation, or fallback semantics.

## Added since 0.3.1

- **`/context config` command family** (view / set / unset):
  - `view` prints the effective DS4 configuration as a typed table: every key of `ds4-context-config-v1` with its path, active value, fallback value, kind, allowed enums, and optional marker; plus the global and project file paths, which files were loaded, and any configuration warnings;
  - `set <path> <value> [--global]` writes a typed value to the project file `.pi/ds4-context.json` by default, or to the agent directory global file with `--global`; all values are catalog-driven and converted to the correct type (boolean / integer / number / string / enum / arrays / maps / object), so invalid edits are rejected before writing with a clear message; project edits require a trusted project, untrusted projects must use `--global`;
  - `unset <path> [--global]` removes an explicit key and falls back to the default:
    - `validateConfigFile` rejects any configuration that would fail the loader; warnings are reported but never block the write;
    - boolean flags are supported in the command parser (`--global` without a value);
    - the change applies from the next Pi session; the active session keeps the previous configuration and the command says so explicitly;
  - machine-readable catalog in `packages/core/src/config/config-catalog.ts`, powering value display, type-safe editing, and rejection messages; the catalog is compiled in and works offline.
- Coordinated package versions moved to `0.3.2`.

There are no functional storage-format or provider-path changes relative to 0.3.1.

## Safety and compatibility

Unchanged from 0.3.1: 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.

Compatibility remains unchanged:

- SQLite schema: `15`;
- configuration: `ds4-context-config-v1` (no new keys; only authoring tools added);
- runtime adapter: `runtime-adapter-v1`;
- persistence tool: `ds4-context-persistence-tool-v1`;
- persistence result: `ds4-context-persistence-result-v1`;
- Pi: `0.84.3`;
- Node.js: `>=22.19.0`.

## Package/version policy

The coordinated version is `0.3.2` for:

```text
ds4-context-core
ds4-context-reference-adapter
ds4-context-engine
```

Both adapters depend exactly on `ds4-context-core@0.3.2`. Publication uses npm's default `latest` tag for all three packages: `latest` now resolves to `0.3.2` (previously `0.3.1`), `beta` remains `0.3.0-beta.3`, `alpha` remains `0.3.0-alpha.5`, and `rc` remains `0.2.0-rc.1`. GitHub Actions remains validation-only with OIDC and package-write permissions denied.

## Candidate validation

Local candidate verification on Node.js `26.5.1`:

- `npm run check`: 71 files and 364 tests passed (including the config-catalog unit tests, extended config-loader tests, and the `/context config` integration coverage).
- `npm run quality:compare`: candidate quality versus the frozen baseline passed.
- `npm run schema:context-persistence`: within the 1,500 / 320 absolute and relative limits.
- `npm run latency:check` against the frozen baseline passed.
- `npm run pack:check` and `npm pack --dry-run --json` for all three packages passed with no forbidden local/session/storage paths.
- `git diff --check` passed; the only pre-existing untracked path is `.serena/`, which is excluded from commits and package inventories.
- Version, exact core dependencies, package-lock entries, extension constant, and reference-adapter constant are synchronized to `0.3.2`.

Validation-only CI is recorded below with the release commit. Exact registry verification and the annotated tag are recorded after execution.

## Registry evidence

Exact post-publication verification passed for all three `0.3.2` packages on 2026-09-04. 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.

Published package shasums:

```text
ds4-context-core:              ff2501ffc1c12713591d97989e708733b7b8735e
ds4-context-reference-adapter: f7d6e29393e248b89417d44b4c19e8c80cb684c2
ds4-context-engine:            fd77ea3f0cc2885eff34b2702951d6dd2d4c3c14
```

For all three packages, npm `latest` now resolves to `0.3.2`, `beta` remains `0.3.0-beta.3`, `alpha` remains `0.3.0-alpha.5`, and `rc` remains `0.2.0-rc.1`.

## Documentation

- [`../COMPACTION.md`](../COMPACTION.md)
- [`../RELEASING.md`](../RELEASING.md)
- [`0.3.1.md`](0.3.1.md)
