@arnilo/prism 0.0.10 → 0.0.11
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/dist/agent-loops.d.ts +1 -0
- package/dist/agent-loops.js +37 -2
- package/dist/agents.js +125 -6
- package/dist/context-budget.d.ts +63 -0
- package/dist/context-budget.js +235 -0
- package/dist/contracts.d.ts +105 -0
- package/dist/contracts.js +77 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +4 -3
- package/dist/input.d.ts +3 -0
- package/dist/input.js +71 -28
- package/dist/node/session-store-jsonl.js +4 -1
- package/dist/rpc.js +13 -2
- package/dist/session-stores.d.ts +7 -2
- package/dist/session-stores.js +174 -4
- package/dist/structured-output.d.ts +5 -1
- package/dist/structured-output.js +18 -0
- package/dist/testing/persistence-schema.d.ts +1 -1
- package/dist/testing/persistence-schema.js +8 -2
- package/dist/testing/session-store-conformance.d.ts +6 -0
- package/dist/testing/session-store-conformance.js +36 -1
- package/docs/agent-loops.md +8 -1
- package/docs/agent-session-runtime.md +5 -1
- package/docs/cli-rpc.md +2 -1
- package/docs/coding-agent-tools.md +68 -1
- package/docs/evaluations.md +1 -1
- package/docs/index.md +12 -11
- package/docs/input-and-prompt-assembly.md +4 -1
- package/docs/migration.md +16 -0
- package/docs/node-jsonl-session-store.md +1 -1
- package/docs/performance.md +17 -0
- package/docs/postgres-persistence.md +3 -3
- package/docs/provider-packages.md +1 -1
- package/docs/providers/anthropic.md +92 -0
- package/docs/providers/google.md +87 -0
- package/docs/public-contracts.md +4 -0
- package/docs/release-and-install.md +159 -70
- package/docs/review-coverage-2026-07-22-phase-6.md +209 -0
- package/docs/session-store-conformance.md +2 -0
- package/docs/session-stores.md +40 -1
- package/docs/sqlite-persistence.md +3 -3
- package/docs/structured-output.md +7 -1
- package/docs/workflows.md +2 -0
- package/package.json +2 -2
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## What it does
|
|
4
4
|
|
|
5
|
-
Prism is published as one core package, twenty-
|
|
5
|
+
Prism is published as one core package, twenty-seven first-party capability packages, and six pure-manifest family/profile packages. This page describes how they are packed, what each tarball contains, how to install them, the required `@arnilo/prism` peer dependency, the release workflow, and the offline test budget.
|
|
6
6
|
|
|
7
7
|
Core package:
|
|
8
8
|
|
|
9
9
|
- `@arnilo/prism` — the runtime, contracts, registries, streaming events, CLI (including `prism init`), and the `/docs` hub. `files`: `dist` (with `!dist/__tests__` and `!dist/**/*.map` negations), `docs`, `templates`, `CHANGELOG.md`. `bin`: `prism` -> `dist/cli.js`. `sideEffects`: `["dist/cli.js"]`.
|
|
10
10
|
|
|
11
|
-
First-party workspace packages (each has non-optional `@arnilo/prism@0.0.
|
|
11
|
+
First-party workspace packages (each has non-optional `@arnilo/prism@0.0.11` peer and `sideEffects: false`; RAG also peers on memory, and server also peers on workflows):
|
|
12
12
|
|
|
13
|
-
- `@arnilo/prism-provider-openai`, `@arnilo/prism-provider-openrouter`, `@arnilo/prism-provider-kimi`, `@arnilo/prism-provider-zai`, `@arnilo/prism-provider-opencode-go`, `@arnilo/prism-provider-neuralwatt` — provider adapters.
|
|
13
|
+
- `@arnilo/prism-provider-anthropic`, `@arnilo/prism-provider-google`, `@arnilo/prism-provider-openai`, `@arnilo/prism-provider-openrouter`, `@arnilo/prism-provider-kimi`, `@arnilo/prism-provider-zai`, `@arnilo/prism-provider-opencode-go`, `@arnilo/prism-provider-neuralwatt` — provider adapters.
|
|
14
14
|
- `@arnilo/prism-provider-ai-sdk` — optional AI SDK `LanguageModelV4` adapter; included by the provider and all umbrellas.
|
|
15
15
|
- `@arnilo/prism-compaction-llm` — optional LLM-backed compaction strategy.
|
|
16
16
|
- `@arnilo/prism-compaction-observational-memory` — optional source-backed observational memory.
|
|
@@ -31,7 +31,7 @@ First-party workspace packages (each has non-optional `@arnilo/prism@0.0.10` pee
|
|
|
31
31
|
|
|
32
32
|
Family/profile packages (pure manifests, no code or `dist`; ship `README.md` and `CHANGELOG.md`; use exact hard `dependencies`):
|
|
33
33
|
|
|
34
|
-
- `@arnilo/prism-providers` — all
|
|
34
|
+
- `@arnilo/prism-providers` — all nine `@arnilo/prism-provider-*` packages: eight HTTP adapters plus AI SDK interoperability.
|
|
35
35
|
- `@arnilo/prism-compaction` — both `@arnilo/prism-compaction-*` packages.
|
|
36
36
|
- `@arnilo/prism-base` — core + compaction family + JSON Schema validator; excludes providers, MCP, native credentials/storage, and coding tools.
|
|
37
37
|
- `@arnilo/prism-code` — base + coding-agent + coding-security + MCP; providers and persistence remain explicit choices.
|
|
@@ -39,7 +39,7 @@ Family/profile packages (pure manifests, no code or `dist`; ship `README.md` and
|
|
|
39
39
|
- `@arnilo/prism-evals` remains optional and network-free by default; model judges are host callbacks and live credentialed gates run separately. `examples/evaluation-gate.ts` demonstrates non-zero threshold gating.
|
|
40
40
|
- `@arnilo/prism-all` — every first-party package: code + SDK + providers + persistence + evals + memory/RAG + server + supervisor + web tools + browser. Installation alone activates no network/listener, telemetry, database, memory, evaluation, delegation, MCP, shell, filesystem, or browser capability.
|
|
41
41
|
|
|
42
|
-
Profile footprint snapshot (Node 24/npm 11, lockfile graph, 2026-07-19): `base` reaches 6 first-party packages and one external dependency root (Ajv); `code` reaches 10 and three (Ajv, MCP SDK, diff); `sdk` reaches 11 and three (Ajv, MCP SDK, keyring); `all` reaches all
|
|
42
|
+
Profile footprint snapshot (Node 24/npm 11, lockfile graph, 2026-07-19): `base` reaches 6 first-party packages and one external dependency root (Ajv); `code` reaches 10 and three (Ajv, MCP SDK, diff); `sdk` reaches 11 and three (Ajv, MCP SDK, keyring); `all` reaches all 34 first-party manifests and seven external roots (those plus better-sqlite3, pg, and AI SDK provider types). Native database drivers stay out of base/code/sdk; both appear only in all.
|
|
43
43
|
|
|
44
44
|
Each code package's `files` array is `["dist", "!dist/__tests__", "!dist/**/*.map", "README.md", "CHANGELOG.md"]`; `README.md`, `LICENSE`, and `CHANGELOG.md` ship in every code-package tarball, the core tarball also ships the `docs/` directory, and family/profile tarballs ship `README.md` + `CHANGELOG.md` + `package.json`.
|
|
45
45
|
|
|
@@ -67,9 +67,9 @@ Consumers install the core package for the runtime and add first-party packages
|
|
|
67
67
|
| Run the default (network-free) test suite | `npm test` |
|
|
68
68
|
| Dry-run pack core + every package | `npm run pack:dry-run` |
|
|
69
69
|
| Local mirror of the release verify gate | `npm run release:dry-run` |
|
|
70
|
-
| Validate clean tag/version/ranges and reject registry collisions | `npm run release:check -- --version 0.0.
|
|
71
|
-
| Preview deterministic publish order | `npm run release:publish -- --version 0.0.
|
|
72
|
-
| Resume interrupted tagged publication | `npm run release:publish -- --version 0.0.
|
|
70
|
+
| Validate clean tag/version/ranges and reject registry collisions | `npm run release:check -- --version 0.0.11` |
|
|
71
|
+
| Preview deterministic publish order | `npm run release:publish -- --version 0.0.11 --dry-run --allow-dirty --allow-untagged` |
|
|
72
|
+
| Resume interrupted tagged publication | `npm run release:publish -- --version 0.0.11 --resume --report release-artifacts/publish-report.json` |
|
|
73
73
|
| Full SDK readiness gate (typecheck + offline tests + pack) | `npm run sdk:ready` |
|
|
74
74
|
|
|
75
75
|
Public core import specifiers (from the root `exports` map):
|
|
@@ -106,7 +106,7 @@ A packed tarball contains only public compiled output and release files:
|
|
|
106
106
|
- Code packages ship `README.md`, `LICENSE`, and `CHANGELOG.md`; family/profile packages ship `README.md` and `CHANGELOG.md`.
|
|
107
107
|
- The core tarball additionally ships the full `docs/` directory (the docs hub) and `templates/init/` used by `prism init`.
|
|
108
108
|
- `dist/cli.js` and the `bin` link in core.
|
|
109
|
-
- **Tarball filenames.** npm strips the `@scope/` prefix, so the core package `@arnilo/prism` produces a tarball named `arnilo-prism-0.0.
|
|
109
|
+
- **Tarball filenames.** npm strips the `@scope/` prefix, so the core package `@arnilo/prism` produces a tarball named `arnilo-prism-0.0.11.tgz`; first-party packages produce `arnilo-prism-provider-<name>-0.0.11.tgz` / `arnilo-prism-compaction-<name>-0.0.11.tgz` / `arnilo-prism-coding-agent-0.0.11.tgz`; family/profile packages produce `arnilo-prism-{providers,compaction,base,code,sdk,all}-0.0.11.tgz`. The CLI bin name `prism` is unaffected by the package name (`npx prism` still works; npm allows the bin field to differ from the package name).
|
|
110
110
|
|
|
111
111
|
Excluded from every tarball by `files` negation:
|
|
112
112
|
|
|
@@ -125,9 +125,9 @@ Excluded from every tarball by `files` negation:
|
|
|
125
125
|
"name": "host-app",
|
|
126
126
|
"type": "module",
|
|
127
127
|
"dependencies": {
|
|
128
|
-
"@arnilo/prism": "0.0.
|
|
129
|
-
"@arnilo/prism-provider-openai": "0.0.
|
|
130
|
-
"@arnilo/prism-compaction-observational-memory": "0.0.
|
|
128
|
+
"@arnilo/prism": "0.0.11",
|
|
129
|
+
"@arnilo/prism-provider-openai": "0.0.11",
|
|
130
|
+
"@arnilo/prism-compaction-observational-memory": "0.0.11"
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
```
|
|
@@ -137,7 +137,7 @@ Installing the provider/compaction packages without `@arnilo/prism` present prod
|
|
|
137
137
|
```text
|
|
138
138
|
npm error code ERESOLVE
|
|
139
139
|
npm error Could not resolve dependency:
|
|
140
|
-
npm error peer @arnilo/prism@"0.0.
|
|
140
|
+
npm error peer @arnilo/prism@"0.0.11" from @arnilo/prism-provider-openai@0.0.11
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
## Implementation example
|
|
@@ -170,11 +170,11 @@ For SDK readiness, run the same one-command gate directly. It composes existing
|
|
|
170
170
|
npm run sdk:ready
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
Release publication derives all
|
|
173
|
+
Release publication derives all 34 packages from the workspace once, validates exact `0.0.11` manifest/lockfile/internal ranges, then uses deterministic dependency order. `release:check` requires a clean commit tagged `v0.0.11` and rejects any existing registry version. `release:publish --resume` skips only registry versions whose internal dependency fingerprint matches the local manifest; conflicting versions fail closed. Each attempted package is written immediately to the JSON report, so a failed job can rerun safely. `--dry-run` still performs registry availability checks and invokes `npm publish --dry-run` with explicit public access, provenance, and `latest` tag.
|
|
174
174
|
|
|
175
175
|
```bash
|
|
176
|
-
npm run release:check -- --version 0.0.
|
|
177
|
-
npm run release:publish -- --version 0.0.
|
|
176
|
+
npm run release:check -- --version 0.0.11
|
|
177
|
+
npm run release:publish -- --version 0.0.11 --dry-run --allow-dirty --allow-untagged
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
`--allow-dirty` and `--allow-untagged` exist only for local preview; real publication and CI never pass them. npm registry calls occur only in these release preflight/publication commands, never build/test/package discovery.
|
|
@@ -185,7 +185,138 @@ Optional live smoke tests stay separate from SDK readiness because they require
|
|
|
185
185
|
PRISM_LIVE_PROVIDER_TESTS=1 npm run test --workspaces --if-present
|
|
186
186
|
```
|
|
187
187
|
|
|
188
|
-
### 0.0.
|
|
188
|
+
### 0.0.11 publish handoff
|
|
189
|
+
|
|
190
|
+
**Decision: GO after operator prerequisites below.** Phase 6 coding-harness fundamentals: `SessionIndex`/`searchSessions`, assembler `contextBudget`, `@arnilo/prism-provider-anthropic` + `@arnilo/prism-provider-google`, mid-run `steer`, coding-agent `runCodingGoalVerify` + opt-in `ask_user_decision`, and `scripts/benchmark-0.0.11.mjs` search/budget evidence. Code, tests, exact `0.0.11` package graph (34 manifests), packed artifacts, security gates, and dependency-ordered publication dry-run passed from the Phase 6 release-candidate tree. Clean protected-branch CI, signed commit/tag, npm authentication, OIDC attestation, protected Anthropic/Google live canaries + Docker/Playwright/PostgreSQL gates (when host-provisioned), and actual publication remain operator/workflow prerequisites. No package was published during readiness work. Scope is coding-harness P1 only; **no Office** package, binary, SDK, wrapper, docs page, test, or release gate exists. Host mode never claims disposable containment. `@arnilo/prism-browser` remains optional via `@arnilo/prism-all` only.
|
|
191
|
+
|
|
192
|
+
#### npm authentication prerequisite
|
|
193
|
+
|
|
194
|
+
The existing GitHub Actions secret `NPM_TOKEN` is used only by the publish step as `NODE_AUTH_TOKEN`, matching previous Prism releases. Confirm that token remains valid and can publish existing and new public packages under `@arnilo`; no additional secret or manual npm publish is required. The workflow also requests OIDC and always passes `--provenance`.
|
|
195
|
+
|
|
196
|
+
#### Release commit and tag
|
|
197
|
+
|
|
198
|
+
Merge through the protected release branch, then run these commands from a clean checkout of the protected merge commit. `git push origin v0.0.11` is the workflow dispatch; there is no manual publish command.
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Prepare and push the release commit.
|
|
202
|
+
git diff --check
|
|
203
|
+
npm ci
|
|
204
|
+
npm run sdk:ready
|
|
205
|
+
git add -A
|
|
206
|
+
git diff --cached --check
|
|
207
|
+
git commit -S -m "Release 0.0.11"
|
|
208
|
+
git push origin HEAD
|
|
209
|
+
|
|
210
|
+
# Merge/confirm protected branch CI, then check out that exact clean merge commit.
|
|
211
|
+
test -z "$(git status --porcelain)"
|
|
212
|
+
npm ci
|
|
213
|
+
npm run release:check -- --version 0.0.11 --allow-untagged --report /tmp/prism-0.0.11-preflight.json
|
|
214
|
+
|
|
215
|
+
git tag -s v0.0.11 -m "Prism 0.0.11"
|
|
216
|
+
git verify-tag v0.0.11
|
|
217
|
+
test "$(git rev-parse HEAD)" = "$(git rev-list -n 1 v0.0.11)"
|
|
218
|
+
npm run release:check -- --version 0.0.11 --report /tmp/prism-0.0.11-tagged-preflight.json
|
|
219
|
+
git push origin v0.0.11
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The tag workflow's only publication command is `npm run release:publish -- --version "${GITHUB_REF_NAME#v}" --resume --report release-artifacts/publish-report.json`. Latest registry preflight returned `available` for all 34 `0.0.11` versions at handoff. Publisher order is stable and dependency-safe (run `node -e` via `release:check` for the live order). Package set:
|
|
223
|
+
|
|
224
|
+
```text
|
|
225
|
+
@arnilo/prism
|
|
226
|
+
@arnilo/prism-coding-agent
|
|
227
|
+
@arnilo/prism-coding-security
|
|
228
|
+
@arnilo/prism-compaction-llm
|
|
229
|
+
@arnilo/prism-compaction-observational-memory
|
|
230
|
+
@arnilo/prism-credentials-node
|
|
231
|
+
@arnilo/prism-evals
|
|
232
|
+
@arnilo/prism-mcp
|
|
233
|
+
@arnilo/prism-memory
|
|
234
|
+
@arnilo/prism-observability-opentelemetry
|
|
235
|
+
@arnilo/prism-provider-ai-sdk
|
|
236
|
+
@arnilo/prism-provider-anthropic
|
|
237
|
+
@arnilo/prism-provider-google
|
|
238
|
+
@arnilo/prism-provider-kimi
|
|
239
|
+
@arnilo/prism-provider-neuralwatt
|
|
240
|
+
@arnilo/prism-provider-openai
|
|
241
|
+
@arnilo/prism-provider-opencode-go
|
|
242
|
+
@arnilo/prism-provider-openrouter
|
|
243
|
+
@arnilo/prism-provider-zai
|
|
244
|
+
@arnilo/prism-session-store-postgres
|
|
245
|
+
@arnilo/prism-session-store-sqlite
|
|
246
|
+
@arnilo/prism-supervisor
|
|
247
|
+
@arnilo/prism-tool-validator-json-schema
|
|
248
|
+
@arnilo/prism-web-tools
|
|
249
|
+
@arnilo/prism-browser
|
|
250
|
+
@arnilo/prism-workflows
|
|
251
|
+
@arnilo/prism-compaction
|
|
252
|
+
@arnilo/prism-providers
|
|
253
|
+
@arnilo/prism-rag
|
|
254
|
+
@arnilo/prism-server
|
|
255
|
+
@arnilo/prism-base
|
|
256
|
+
@arnilo/prism-code
|
|
257
|
+
@arnilo/prism-sdk
|
|
258
|
+
@arnilo/prism-all
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### Interruption and resume
|
|
262
|
+
|
|
263
|
+
Do not create another tag or rerun packages manually. Re-run failed jobs for the same tag in GitHub Actions. The workflow invokes `release:publish --resume`: registry versions with matching names, versions, and internal dependency fingerprints are skipped; any mismatch stops the job. Retain `release-artifacts-v0.0.11` and `publish-report-v0.0.11` for audit.
|
|
264
|
+
|
|
265
|
+
#### Bounded post-publish smoke
|
|
266
|
+
|
|
267
|
+
Download the workflow artifact and run `sha256sum -c SHA256SUMS`. Then verify all registry versions/tags/integrity and install the complete profile in a fresh directory:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
while read -r package; do
|
|
271
|
+
test "$(npm view "$package@0.0.11" version)" = "0.0.11"
|
|
272
|
+
test "$(npm view "$package" dist-tags.latest)" = "0.0.11"
|
|
273
|
+
npm view "$package@0.0.11" dist.integrity >/dev/null
|
|
274
|
+
done <<'PACKAGES'
|
|
275
|
+
@arnilo/prism
|
|
276
|
+
@arnilo/prism-coding-agent
|
|
277
|
+
@arnilo/prism-coding-security
|
|
278
|
+
@arnilo/prism-compaction-llm
|
|
279
|
+
@arnilo/prism-compaction-observational-memory
|
|
280
|
+
@arnilo/prism-credentials-node
|
|
281
|
+
@arnilo/prism-evals
|
|
282
|
+
@arnilo/prism-mcp
|
|
283
|
+
@arnilo/prism-memory
|
|
284
|
+
@arnilo/prism-observability-opentelemetry
|
|
285
|
+
@arnilo/prism-provider-ai-sdk
|
|
286
|
+
@arnilo/prism-provider-anthropic
|
|
287
|
+
@arnilo/prism-provider-google
|
|
288
|
+
@arnilo/prism-provider-kimi
|
|
289
|
+
@arnilo/prism-provider-neuralwatt
|
|
290
|
+
@arnilo/prism-provider-openai
|
|
291
|
+
@arnilo/prism-provider-opencode-go
|
|
292
|
+
@arnilo/prism-provider-openrouter
|
|
293
|
+
@arnilo/prism-provider-zai
|
|
294
|
+
@arnilo/prism-session-store-postgres
|
|
295
|
+
@arnilo/prism-session-store-sqlite
|
|
296
|
+
@arnilo/prism-supervisor
|
|
297
|
+
@arnilo/prism-tool-validator-json-schema
|
|
298
|
+
@arnilo/prism-web-tools
|
|
299
|
+
@arnilo/prism-browser
|
|
300
|
+
@arnilo/prism-workflows
|
|
301
|
+
@arnilo/prism-compaction
|
|
302
|
+
@arnilo/prism-providers
|
|
303
|
+
@arnilo/prism-rag
|
|
304
|
+
@arnilo/prism-server
|
|
305
|
+
@arnilo/prism-base
|
|
306
|
+
@arnilo/prism-code
|
|
307
|
+
@arnilo/prism-sdk
|
|
308
|
+
@arnilo/prism-all
|
|
309
|
+
PACKAGES
|
|
310
|
+
|
|
311
|
+
npm audit signatures --json --include-attestations
|
|
312
|
+
npm install --no-audit --no-fund @arnilo/prism-all@0.0.11
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
#### Rollback limitations
|
|
316
|
+
|
|
317
|
+
npm publication is not transactional and published versions are immutable. Partial publication is a resume case, not rollback. For a confirmed systemic defect after completion, deprecate every affected `@0.0.11`; restore `latest` to the previous good release only where that tag already existed. Exact `0.0.11` installs remain possible, so publish a fixed version promptly. Do not unpublish except for a security/legal emergency under npm policy.
|
|
318
|
+
|
|
319
|
+
### 0.0.10 publish handoff (historical)
|
|
189
320
|
|
|
190
321
|
**Decision: GO after operator prerequisites below.** Phase 5 coding-harness unified workspace: required `workspaceMode`, fail-closed mixed wiring, sandbox FS auto-wire, tree identity, adversarial consistency tests, and `scripts/benchmark-0.0.10.mjs` evidence. Code, tests, exact `0.0.10` package graph (retargeted from post-ship `0.0.96`), packed artifacts, security gates, and dependency-ordered publication dry-run passed from the Phase 5 release-candidate tree. Clean protected-branch CI, signed commit/tag, npm authentication, OIDC attestation, protected Docker/Playwright live gates (when host-provisioned), and actual publication remain operator/workflow prerequisites. No package was published during readiness work. Scope is coding-harness P0 only; **no Office** package, binary, SDK, wrapper, docs page, test, or release gate exists. Host mode never claims disposable containment.
|
|
191
322
|
|
|
@@ -334,8 +465,8 @@ npm publication is not transactional and published versions are immutable. Parti
|
|
|
334
465
|
|
|
335
466
|
## Extension and configuration notes
|
|
336
467
|
|
|
337
|
-
- **Required `@arnilo/prism` peer.** Every first-party package declares a non-optional `@arnilo/prism@0.0.
|
|
338
|
-
- **Public access.** All
|
|
468
|
+
- **Required `@arnilo/prism` peer.** Every first-party package declares a non-optional `@arnilo/prism@0.0.11` peer (`peerDependenciesMeta` must not mark `@arnilo/prism` optional; other peers such as `playwright-core` may be optional). The range stays pinned to `0.0.11` for the 0.x series and will widen to `^1.0.0` at the 1.x stable release. Inside the workspace each package also declares `"@arnilo/prism": "file:../.."` in `devDependencies` so `npm install` resolves the peer locally; that devDependency is stripped from consumer installs and is not a runtime dependency.
|
|
469
|
+
- **Public access.** All 34 manifests (28 code packages + 6 family/profile packages) declare `"publishConfig": { "access": "public" }`; the publisher also passes `--access public` explicitly because scoped packages otherwise default to restricted on first publish.
|
|
339
470
|
- **Map retention knob.** Source maps are emitted locally but stripped from tarballs by `!dist/**/*.map`. Removing that `files` negation ships maps in releases (larger tarballs, better consumer stack traces).
|
|
340
471
|
- **Release workflow.** `.github/workflows/release.yml` has six jobs. `verify` runs network-free SDK readiness on Node 24; `node20-compat` builds/imports every public root `exports` default target on Node 20 for declared `engines.node >=20` (docs examples need Node >=22.6 native TypeScript stripping); `postgres-integration` uses `pgvector/pgvector:pg16`; `supply-chain` runs high-severity audit, SPDX/license policy, and tracked-source secret scanning; and tag-only `codeql-release` runs SAST. Tag-only `publish` needs all five gates, preserves clean exact-tag/version/topological publication, and alone receives `NPM_TOKEN`, `id-token: write`, and `attestations: write`. Before npm publish it packs all current tarballs, generates checksums plus SPDX, scans unpacked public artifacts, creates GitHub attestations for tarballs and SBOM, then retains artifacts for 30 days. Registry state remains the resumable journal. Local `npm run release:dry-run` remains network-free SDK readiness; local PostgreSQL coverage is `PRISM_TEST_POSTGRES_URL=... npm run test:postgres`.
|
|
341
472
|
- **Adding a package.** New workspace packages are picked up automatically by `npm run build --workspaces`, `npm test --workspaces`, `npm run pack:dry-run`, the packaging guard (`src/__tests__/packaging.test.ts`), and the install-smoke test (`src/__tests__/install-smoke.test.ts`) via the workspace glob; add the package to both tests' config arrays for explicit per-package assertions.
|
|
@@ -344,7 +475,7 @@ npm publication is not transactional and published versions are immutable. Parti
|
|
|
344
475
|
|
|
345
476
|
- **No secrets or fixtures in tarballs.** Tests, fixtures, `src/`, `plans/`, `.agents/`, `roadmap.md`, and `tsconfig` files are excluded. The `docs avoid real-looking secret examples` docs check and the packaging guard's deny list prevent secret-bearing fixtures from shipping.
|
|
346
477
|
- **Live tests stay opt-in.** The default `npm test` is network-free by construction and never sets these vars. Provider/compaction live gates stay credential-gated and are not set by default or during `sdk:ready`. The PostgreSQL adapter live matrix is the exception that runs in CI via the dedicated `postgres-integration` job (still skipped in the default suite).
|
|
347
|
-
- `PRISM_LIVE_PROVIDER_TESTS=1` — gates the
|
|
478
|
+
- `PRISM_LIVE_PROVIDER_TESTS=1` — gates the eight provider packages' `src/__tests__/live.test.ts` (`@arnilo/prism-provider-anthropic`, `provider-google`, `provider-openai`, `provider-opencode-go`, `provider-openrouter`, `provider-zai`, `provider-kimi`, `provider-neuralwatt`). Each provider live test also requires its own API key env var and skips safely when it is missing:
|
|
348
479
|
- `OPENAI_API_KEY` for `@arnilo/prism-provider-openai`
|
|
349
480
|
- `OPENROUTER_API_KEY` for `@arnilo/prism-provider-openrouter`
|
|
350
481
|
- `KIMI_API_KEY` for `@arnilo/prism-provider-kimi`
|
|
@@ -367,63 +498,21 @@ npm publication is not transactional and published versions are immutable. Parti
|
|
|
367
498
|
- **Install smoke is offline.** The install-smoke test packs core + every package into a temp dir and installs tarballs with `--offline --no-audit --no-fund` into a fresh project. External dependencies are satisfied from the lockfile-backed npm cache prepared by `npm ci`; any attempted uncached registry fetch fails the gate.
|
|
368
499
|
- **Offline test budget.** The default `npm test` (no `PRISM_LIVE_PROVIDER_TESTS`) is pinned at **< 60s on Node 20** with a measured local baseline of ~45s (build ~18s + network-free tests/workspace tests/packaging smoke ~27s). The full CI `sdk:ready` gate runs on Node 24 because docs tests execute `examples/*.ts` via native TypeScript stripping. `npm run sdk:ready` also runs typecheck and pack dry-run, so it is allowed to exceed the `npm test` budget while remaining network-free. The CI `sdk:ready` step has `timeout-minutes: 5` as a hang backstop; the separate Node 20 compatibility step has `timeout-minutes: 3`. The budget was raised from 30s after the default suite grew to include every first-party package, offline install smoke, packaging guards, docs examples, and workspace tests; optimize before raising it again.
|
|
369
500
|
|
|
370
|
-
### 0.0.
|
|
501
|
+
### 0.0.11 dependency audit decision (2026-07-22)
|
|
371
502
|
|
|
372
|
-
`npm audit --audit-level=high` reports 0 vulnerabilities and `npm ls --all --depth=0` resolves the exact
|
|
373
|
-
|
|
374
|
-
### 0.0.10 release-candidate verification — 2026-07-21
|
|
375
|
-
|
|
376
|
-
| Gate | Result |
|
|
377
|
-
| --- | --- |
|
|
378
|
-
| Package graph | Root + 31 workspaces = 32 publishable manifests at exact `0.0.10` with exact internal peer/dependency ranges (retargeted from post-ship `0.0.96`); `@arnilo/prism-browser` in `@arnilo/prism-all` only (not `@arnilo/prism-code`). |
|
|
379
|
-
| Deterministic suites | `npm run sdk:ready` passed: 1,963 tests (1,934 pass, 29 explicit live skips, 0 fail), full typecheck/build/examples, docs/export/package/install smoke, and 32 dry-run packs. |
|
|
380
|
-
| Workspace modes | Required `workspaceMode`; sandbox FS auto-wire; fail-closed mixed wiring; host non-containment; tree identity; adversarial consistency + `benchmark-0.0.10` schema green. |
|
|
381
|
-
| Coding/browser | Network-free coding-agent + browser adversarial fixtures retained; `scripts/benchmark-0.0.10.mjs` host/sandbox-fake evidence (10-iter schema run green); protected Docker/Playwright remain operator P0 gates. |
|
|
382
|
-
| Supply chain | `npm audit --audit-level=high` = 0 vulnerabilities; SPDX SBOM 186 packages / 8 approved licenses; working-tree secret scan 2,418 files / 0 findings; `git diff --check` clean. |
|
|
383
|
-
| Artifacts | Packed review: 988,020 bytes compressed / 3,820,326 unpacked / 850 files across 32 tarballs; core 527,333 / 1,848,113 / 248 files; no Playwright binary/image and no Office package/binary. |
|
|
384
|
-
| Registry/order | Public `release:check` found all 32 `@arnilo/*@0.0.10` versions available. Dependency-ordered `release:publish --dry-run --allow-dirty --allow-untagged` completed 32/32 dry-run with explicit public/latest/provenance; no commit, tag, or publication created. |
|
|
385
|
-
| Office exclusion | No Office package, binary, SDK, wrapper, docs page, test, or release gate. |
|
|
386
|
-
| Containment claims | Host mode and mixed-wiring escape hatch never claim disposable containment in docs/release notes. |
|
|
503
|
+
`npm audit --audit-level=high` reports 0 vulnerabilities and `npm ls --all --depth=0` resolves the exact 34-package `0.0.11` graph (including `@arnilo/prism-provider-anthropic`, `@arnilo/prism-provider-google`, and `@arnilo/prism-browser`). Locked-install SPDX and `scripts/verify-sbom.mjs` pass. Browser keeps `playwright-core@1.61.0` as an optional peer and ships no browser binary/image; no Office package/binary enters the graph. Host mode never claims disposable containment.
|
|
387
504
|
|
|
388
|
-
### 0.0.9 dependency audit decision (2026-07-21)
|
|
389
505
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
### 0.0.8 dependency audit decision (2026-07-20)
|
|
393
|
-
|
|
394
|
-
`npm audit --audit-level=high` reports 0 vulnerabilities and `npm ls --all --depth=0` resolves the exact 31-package `0.0.8` graph. Locked-install SPDX contains 183 packages and eight approved license expressions; `scripts/verify-sbom.mjs` passed. New runtime dependencies remain isolated to optional packages: MCP stays pinned to SDK 1.29.0 and web tools add no vendor SDK. Native `better-sqlite3` remains the sole install-script dependency and stays in opt-in SQLite.
|
|
395
|
-
|
|
396
|
-
### 0.0.9 release-candidate verification — 2026-07-21
|
|
506
|
+
### 0.0.11 release-candidate verification — 2026-07-22
|
|
397
507
|
|
|
398
508
|
| Gate | Result |
|
|
399
509
|
| --- | --- |
|
|
400
|
-
| Package graph | Root +
|
|
401
|
-
|
|
|
402
|
-
|
|
|
403
|
-
|
|
|
404
|
-
|
|
|
405
|
-
| Artifacts | Packed review: 972,339 bytes compressed / 3,755,038 unpacked / 847 files across 32 tarballs; core 519,366 / 1,819,939; browser 29,171 / 132,669 with no Playwright binary/image and no Office package/binary. |
|
|
406
|
-
| Registry/order | Public `release:check` found all 32 `@arnilo/*@0.0.96` versions available. Dependency-ordered `release:publish --dry-run --allow-dirty --allow-untagged` completed 32/32 dry-run with explicit public/latest/provenance; no commit, tag, or publication created. |
|
|
407
|
-
| Office exclusion | No Office package, binary, SDK, wrapper, docs page, test, or release gate. |
|
|
408
|
-
|
|
409
|
-
### 0.0.8 release-candidate verification — 2026-07-20
|
|
510
|
+
| Package graph | Root + 33 workspaces = 34 publishable manifests at exact `0.0.11` with exact internal peer/dependency ranges; Anthropic/Google in `@arnilo/prism-providers` and transitively `@arnilo/prism-all`. |
|
|
511
|
+
| Coding harness P1 | SessionIndex/search, contextBudget, steer, ask_user_decision, runCodingGoalVerify; schema v4 FTS migration; `benchmark-0.0.11` search/budget schema green. |
|
|
512
|
+
| Providers | Native Anthropic + Google packages offline-conformant; live gates remain `PRISM_LIVE_PROVIDER_TESTS=1` + host keys. |
|
|
513
|
+
| SDK readiness | `npm run sdk:ready`: 2,047 tests (2,014 pass / 33 skip / 0 fail); pack 1,041,760 / 4,041,551 / 889 files; core 549,565 / 1,938,287 / 253. |
|
|
514
|
+
| Registry/order | Public `release:check` found all 34 `@arnilo/*@0.0.11` versions available. Dependency-ordered `release:publish --dry-run --allow-dirty --allow-untagged` completed 34/34 dry-run with explicit public/latest/provenance; no commit, tag, or publication created. |
|
|
410
515
|
|
|
411
|
-
Phase 3 validation ran from this working tree without creating a release commit/tag or publishing. Clean protected-branch/tag, GitHub CodeQL/dependency-review, environment approval, OIDC, and actual canary/publication checks remain mandatory in the handoff above.
|
|
412
|
-
|
|
413
|
-
| Gate | Result |
|
|
414
|
-
| --- | --- |
|
|
415
|
-
| Node 24 full matrix | `npm run sdk:ready` passed in 87 seconds inside its five-minute backstop: 1,814 tests (1,789 pass, 25 explicit live skips, 0 fail), full typecheck/build/examples, docs/export/package/install smoke, workspace conformance, and 31 dry-run packs. |
|
|
416
|
-
| Node 20 compatibility | Docker Node 20.20.1 performed a clean locked install, built all workspaces, and imported all 21 public root export targets. |
|
|
417
|
-
| PostgreSQL | Fresh `pgvector/pgvector:pg16`: 17 session-store/persistence plus 14 memory/pgvector checks passed with 0 skips/failures. |
|
|
418
|
-
| Packed consumer | Offline install smoke packed all 31 exact `0.0.8` tarballs into a fresh consumer, imported every public code package/core subpath, ran integration/composition journeys, and ran generated `prism init`. |
|
|
419
|
-
| Artifact contents | 31 tarballs contain 783 files, about 860 kB packed and 3.28 MB unpacked. Core is 245 files, about 490 kB packed and 1.74 MB unpacked. Packaging deny-list and unpacked-artifact secret scan found no tests/maps/source/plans/secrets. |
|
|
420
|
-
| Registry and order | Public preflight found all 31 `@arnilo/*@0.0.8` versions available. Dependency-ordered `release:publish --dry-run` completed 31/31 with explicit public/latest/provenance arguments; no publish occurred. |
|
|
421
|
-
| Supply chain | High-severity audit: 0 vulnerabilities; dependency tree clean; SPDX/license policy passed (183 packages/eight expressions); tracked source (2,229 files) and unpacked artifacts (783 files) returned zero secret findings. Immutable-action/permission/attestation policy tests passed. Actual CodeQL/dependency-review and artifact attestations run only in protected GitHub workflows. |
|
|
422
|
-
| Benchmarks | Dated 1,000-operation Node 24/Linux x64 results cover actual batched-ledger and in-memory OTel paths, snapshot-cache lookup, and provider/PostgreSQL/MCP/A2A/web local envelope shapes; table and non-live caveats are in `docs/performance.md`. |
|
|
423
|
-
| Live prerequisites | Disposable PostgreSQL passed and `PRISM_TEST_KEYCHAIN=1` passed 27/27. Three web-provider live tests and provider/MCP/A2A protected canaries stayed explicitly skipped because this host has no release credentials/endpoints; disabled gate performed no network. |
|
|
424
|
-
| Provenance/publication | GitHub OIDC attestations and npm provenance are generated only by authorized execution from clean signed `v0.0.8`; no commit, tag, attestation, or publication was created here. |
|
|
425
|
-
|
|
426
|
-
Temporary containers, benchmark JSON, SBOM, packed tarballs, and dry-run reports were deleted or kept only under `/tmp`; protected CI recreates retained release artifacts.
|
|
427
516
|
|
|
428
517
|
## Release checklist
|
|
429
518
|
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Review coverage — 2026-07-22 Phase 6
|
|
2
|
+
|
|
3
|
+
Working evidence for Plan 074 Task 0. Freezes Phase 6 / Release **0.0.11** scope, primitive ownership, finite limits, threats, tests, docs, and release gates before implementation.
|
|
4
|
+
|
|
5
|
+
**Evidence frozen:** 2026-07-22. **Prism source:** `a677113a409b1b60a3361a76c980e7411013916a` (post-0.0.10 / Task 0 freeze). **Release target:** 0.0.11. **Default test rule:** network-free fakes/fixtures; provider live canaries remain gated (`PRISM_LIVE_PROVIDER_TESTS=1` + host keys).
|
|
6
|
+
|
|
7
|
+
## Status legend
|
|
8
|
+
|
|
9
|
+
| Status | Meaning |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `existing` | Current public contract covers the requirement. |
|
|
12
|
+
| `extend` | Owning task extends an existing core/package contract. |
|
|
13
|
+
| `new-package` | New optional workspace package behind existing provider-package seams. |
|
|
14
|
+
| `compose` | Existing public primitives suffice; package-local glue / docs / examples only. |
|
|
15
|
+
| `out-of-scope` | Coding-harness P2+ or later release; must not land in 0.0.11 tasks. |
|
|
16
|
+
|
|
17
|
+
## Frozen product decision
|
|
18
|
+
|
|
19
|
+
0.0.11 closes **coding-harness P1 fundamentals** only: bounded session search/index, assembler-time context budgets with omission reports, native Anthropic then Google provider packages, and a thin goal→verify coding helper/example.
|
|
20
|
+
|
|
21
|
+
**Not in 0.0.11** (owned by later phases — do not implement here):
|
|
22
|
+
|
|
23
|
+
| Deferred item | Owner phase |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| Additional subscription OAuth adapters | 0.0.12 Phase 7 |
|
|
26
|
+
| AG-UI/ACP-facing event adapter | 0.0.12 Phase 7 |
|
|
27
|
+
| Coding-aware compaction preset | 0.0.12 Phase 7 |
|
|
28
|
+
| Enterprise identity / Azure·Bedrock·Vertex / work connectors | 0.0.13+ |
|
|
29
|
+
| Always-on FTS reindex workers / indexer daemons | never in 0.0.11 |
|
|
30
|
+
| Goal database / second agent or workflow runtime | never in 0.0.11 |
|
|
31
|
+
| Shared core Anthropic Messages serializer extraction | defer until ≥2 byte-identical non-test consumers |
|
|
32
|
+
| Soft-raising hard caps; unbounded full-store scans as default search | never in 0.0.11 |
|
|
33
|
+
|
|
34
|
+
## Frozen external revisions
|
|
35
|
+
|
|
36
|
+
| Surface | Frozen reference | Compatibility decision |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| Prism | [`a677113a409b1b60a3361a76c980e7411013916a`](../plans/074-release-0-0-11-coding-harness-fundamentals.md) | Caller/limit claims checked against shipped 0.0.10 tree. |
|
|
39
|
+
| Node.js | Local reference `v24.18.0`; release support remains Node 20 and current | Providers use `fetch` + existing `@arnilo/prism/providers/transport` SSE helpers; no vendor SDKs. |
|
|
40
|
+
| Anthropic Messages | ctx7 `/anthropics/anthropic-sdk-typescript` + official Messages docs at impl time | Stream SSE, tools, `cache_control` ephemeral `5m`/`1h`, thinking blocks, usage; package-local wire (OpenCode Go route is pattern only). |
|
|
41
|
+
| Google Gemini | ctx7 `/websites/ai_google_dev_gemini-api` + Gemini `generateContent` / stream docs at impl time | Tools/function calling, multimodal `inlineData`, usage metadata; Vertex enterprise identity stays 0.0.13. |
|
|
42
|
+
| SQLite FTS5 / PostgreSQL FTS | Adapter docs at impl time | Dialect-local FTS; metadata filters shared shape. |
|
|
43
|
+
|
|
44
|
+
## Frozen API and mode contract
|
|
45
|
+
|
|
46
|
+
| Decision | Frozen choice |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| Search interface | `SessionIndex` with `search(query: SessionSearchQuery): Promise<PersistencePage<SessionSearchHit>>`. Optional on stores via `searchSessions?` **or** returned companion index — adapters implement one authoritative path; hosts must not need both. |
|
|
49
|
+
| Query / hit types | `SessionSearchQuery`, `SessionSearchHit` in core (next to session/persistence contracts). |
|
|
50
|
+
| Hit fields | Required: `sessionId`. Optional: `leafId` (branch tip for `checkout`), `updatedAt`, `label`, `summary`, `snippet`, safe display metadata. **Never** credentials, raw message bodies wholesale, or secret-looking payloads. |
|
|
51
|
+
| Workspace filter | Host-written `metadata.workspaceRoot` (string path/key). No first-class `prism_sessions.workspace` column in 0.0.11. Query field name: `workspaceRoot`. |
|
|
52
|
+
| Text / filters | Optional `query` (FTS/message+summary); `provider` / `model`; `label`/`summary` substring or FTS per adapter; `fromUpdatedAt`/`toUpdatedAt`; `OwnershipScope` (`tenantId`/`accountId`/`userId`). |
|
|
53
|
+
| Pagination | Reuse `PersistencePage` + `limit`/`cursor`/`order`. |
|
|
54
|
+
| Memory search | `createMemorySessionStore(entries?, options?)` with `sessionSearchMode: "linear" \| "unsupported"`; **default `"linear"`**. `"unsupported"` throws typed error (not empty success). JSONL: document unsupported unless a thin linear path is trivial — prefer explicit unsupported. |
|
|
55
|
+
| Context budget | `contextBudget` on `AssembleProviderInputOptions` (and forward from `AgentConfig`/`RunOptions` only if needed). Shape: `{ maxInputTokens?: number; maxInputBytes?: number; reportOmissions?: boolean }`. At least one max required when budget object present. |
|
|
56
|
+
| Eviction priority | Keep first: **system/AGENTS instructions → skills → context blocks → history/tool results** (drop from the end of that priority stack). Current user `input` and mandatory system prefix fail closed if they cannot fit. |
|
|
57
|
+
| Omission report | Prefer non-breaking: `ProviderRequest.metadata.contextBudgetReport` + typed helper `getContextBudgetReport(request)`. Report ids/kinds/sizes/tokenEstimates — not secret values. Raw session store entries untouched. |
|
|
58
|
+
| Token estimate | Finite heuristic: **UTF-16 code units / 4** (chars÷4) unless model supplies a cheaper local estimator later. Document as estimate, not billing. |
|
|
59
|
+
| Anthropic package | `@arnilo/prism-provider-anthropic`; exports `createAnthropicProviderPackage`, `createAnthropicMessagesProvider`, `listAnthropicModels` (caller-gated). |
|
|
60
|
+
| Google package | `@arnilo/prism-provider-google`; exports `createGoogleProviderPackage`, Gemini provider factory, `listGoogleModels` (caller-gated). |
|
|
61
|
+
| Goal/verify | `runCodingGoalVerify` exported from `@arnilo/prism-coding-agent`; example `examples/coding-goal-verify.ts`. No Goal table. |
|
|
62
|
+
| Package count | 0.0.10 graph **32** publishable packages → **34** after anthropic + google (**confirmed** at Task 13). |
|
|
63
|
+
|
|
64
|
+
## Capability traceability matrix
|
|
65
|
+
|
|
66
|
+
| Phase 6 roadmap criterion | Current 0.0.10 surface | Minimum 0.0.11 gap | Status / owner | Required proof | Docs | Release gate |
|
|
67
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
68
|
+
| Bounded `SessionIndex` lists/filters by workspace, time, model/provider, label/summary, optional message FTS; hits return `sessionId` + optional `leafId` | `ProductionPersistenceStore.querySessions` metadata-only (`SessionQuery`); no text/FTS/workspace filters; `SessionStore` has no search | Core `SessionIndex` + query/hit types + optional store seam | `extend` / Task 1 | type/export smoke; invalid limit/query rejected; conformance empty/pagination/ownership | `public-contracts.md`, `session-stores.md` | offline + conformance |
|
|
69
|
+
| SQLite + PostgreSQL implement search with finite pages | DDL has `metadata`, entry `label`/`summary`; no FTS objects | Migrations + adapter `search`; metadata filters + optional FTS | `extend` / Task 2 | pagination, label/summary/FTS hits, ownership isolation, resume via `leafId`, migration drift | `sqlite-persistence.md`, `postgres-persistence.md` | offline adapter tests |
|
|
70
|
+
| Memory: linear fallback **or** explicit unsupported | `createMemorySessionStore(entries)` only; no options | Both modes; default linear; unsupported throws typed | `extend` / Task 3 | hit/miss/cap; unsupported ≠ empty | `session-stores.md` | offline |
|
|
71
|
+
| Token/context budget + omission report; no raw history delete | `assembleProviderInput` / message groups; no budget | `contextBudget` + deterministic eviction + report | `extend` / Task 4 | eviction order; omission completeness; zero-budget fail; cache-aware prefix when under budget | `input-and-prompt-assembly.md` | offline |
|
|
72
|
+
| Native Anthropic Messages package | OpenCode Go Anthropic **route** only; AI SDK escape hatch | New `@arnilo/prism-provider-anthropic` | `new-package` / Task 5 | offline conformance matrix + gated live | `providers/anthropic.md` | offline + opt-in live |
|
|
73
|
+
| Native Google Gemini package | No first-party Google package | New `@arnilo/prism-provider-google` after Anthropic | `new-package` / Task 6 | same conformance bar; Vertex out of scope | `providers/google.md` | offline + opt-in live |
|
|
74
|
+
| Thin goal→verify helper + example; no Goal DB / second runtime | `createCodingPlanMarkdown`, checks, `git_pr_handoff`, `suspend`/`resumeWorkflow`, `examples/durable-coding-workflow.ts` | `runCodingGoalVerify` + `examples/coding-goal-verify.ts` | `compose` / Task 7 | fail→suspend→approve→resume; bounded handoff; no secrets in plan state | `coding-agent-tools.md`, `agent-loops.md`, `workflows.md` | offline + example |
|
|
75
|
+
| Performance: finite search/budget; network-free benches | `querySessions` default `limit ?? 100`; no search/budget benches | Caps below; `scripts/benchmark-0.0.11.mjs` | `extend` / Tasks 1–4, 9 | schema/bounds; search+budget benches | `performance.md` | benchmark + `sdk:ready` |
|
|
76
|
+
| Code quality: optional seams; optional provider pkgs; helper composition | Provider package pattern; optional `readBranchPath` | Same pattern for search/budget; no core Anthropic extract | `compose` / Tasks 1–7 | ≥2-consumer rule for shared extract; package-local first | provider/session docs | pack/install |
|
|
77
|
+
| Security: ownership on search; no creds in hits/omissions; late-bound provider creds | `OwnershipScope` on persistence queries; provider redaction | Enforce on search; redact snippets/reports | `extend` / Tasks 1–6 | ownership empty/forbidden; secret scan fixtures | session + provider docs | offline + audit |
|
|
78
|
+
| Docs/migration 0.0.10 → 0.0.11 | Phase 5 docs | Update functional pages + two provider pages | `extend` / Task 8 | docs.test assertions | `migration.md`, index | docs tests |
|
|
79
|
+
| Version/release 0.0.11 | Graph at `0.0.10` | Bump to `0.0.11`; umbrella deps; dry-run | `extend` / Task 9 (renumbered Task 13) **done** | `sdk:ready` + release dry-run | `release-and-install.md` | Task 9/13 gates |
|
|
80
|
+
|
|
81
|
+
## Primitive and caller inventory
|
|
82
|
+
|
|
83
|
+
Frozen at `a677113a409b1b60a3361a76c980e7411013916a` (+ this evidence page).
|
|
84
|
+
|
|
85
|
+
| Primitive / symbol | Existing contract / callers | Phase 6 disposition |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| `SessionStore` / `readBranchPath?` | Core; memory/JSONL omit path; sqlite/postgres implement | **Extend optional** with search seam (`searchSessions?` or companion `SessionIndex`). Do not require FTS on memory/JSONL. |
|
|
88
|
+
| `ProductionPersistenceStore.querySessions` | Metadata listing; sqlite/postgres | **Keep** for admin listing. Search is separate (`SessionIndex.search`); do not overload `SessionQuery` as sole FTS surface. |
|
|
89
|
+
| `SessionQuery` / `SessionRecord` / `OwnershipScope` / `PersistencePage` | Core contracts | Reuse ownership + page shape; add parallel search types. |
|
|
90
|
+
| `prism_sessions.metadata`, entry `label`/`summary` | sqlite/postgres DDL | Reuse for workspace/label/summary filters; FTS tables adapter-local. |
|
|
91
|
+
| `assembleProviderInput` / `createDefaultInputBuilder` / groups / `legacy`\|`cache_aware` | `src/input.ts` | **Extend** with `contextBudget` after groups built / before final request; no parallel assembler. |
|
|
92
|
+
| `ProviderRequest.metadata` | Core | Host omission report via frozen metadata key + helper. |
|
|
93
|
+
| Provider package setup (`defineProviderPackage`, conformance, transport SSE, media SSRF) | openai/kimi/opencode-go/… | Reuse. New anthropic/google packages follow same layout. |
|
|
94
|
+
| `packages/provider-opencode-go/src/anthropic-messages.ts` | Vendor OpenCode route | **Pattern only.** No shared core extract in 0.0.11. |
|
|
95
|
+
| Kimi Anthropic-compatible route | package-local | Unchanged; not a consumer of new anthropic package serializer. |
|
|
96
|
+
| `createCodingPlanMarkdown` / checks / `git_pr_handoff` / coding-checkpoint limits | coding-agent | Reuse inside `runCodingGoalVerify`. |
|
|
97
|
+
| `suspend` / `resumeWorkflow` | `@arnilo/prism-workflows` | Reuse; helper does not fork workflow engine. |
|
|
98
|
+
| `examples/durable-coding-workflow.ts` | Example pattern | Pattern for `examples/coding-goal-verify.ts`. |
|
|
99
|
+
| AI SDK provider package | Escape hatch | Remains escape hatch; not primary Anthropic/Google path. |
|
|
100
|
+
|
|
101
|
+
### Primitive decision
|
|
102
|
+
|
|
103
|
+
**Authorized new/extended core seams (minimal):**
|
|
104
|
+
|
|
105
|
+
1. `SessionIndex` / `SessionSearchQuery` / `SessionSearchHit` + finite search-cap constants.
|
|
106
|
+
2. Optional `SessionStore` search hook (or documented companion index from adapter factories).
|
|
107
|
+
3. `contextBudget` on assemble options + `getContextBudgetReport` (+ estimate/apply helpers; may live in `src/context-budget.ts` re-exported).
|
|
108
|
+
4. Memory store options: `sessionSearchMode`.
|
|
109
|
+
|
|
110
|
+
**Authorized new packages:** `@arnilo/prism-provider-anthropic`, `@arnilo/prism-provider-google`.
|
|
111
|
+
|
|
112
|
+
**Authorized package-local compose:** `runCodingGoalVerify` in coding-agent + example.
|
|
113
|
+
|
|
114
|
+
**Rejected for 0.0.11:** Goal DB; second runtime; always-on indexer; `ToolDefinition.metadata`; core Anthropic shared serializer; Vertex/Bedrock/Azure enterprise adapters; raising hard caps; default unbounded full-store scan.
|
|
115
|
+
|
|
116
|
+
Promote additional shared helpers to core only with ≥2 non-test consumers **and** migration/conformance evidence.
|
|
117
|
+
|
|
118
|
+
## Frozen capability boundary
|
|
119
|
+
|
|
120
|
+
| Surface | Supported in 0.0.11 | Explicitly unsupported |
|
|
121
|
+
| --- | --- | --- |
|
|
122
|
+
| Session search | Metadata filters + optional FTS; finite pages; memory linear (capped) or unsupported throw | Daemon indexer; silent empty on unsupported; credential fields on hits; first-class workspace column |
|
|
123
|
+
| Context budget | Assembler eviction + omission report; heuristic estimate | Compaction/summarization as budget (0.0.12 preset); deleting store history; provider round-trip for count |
|
|
124
|
+
| Anthropic | Native Messages HTTP package; tools/cache/thinking/media/usage/discovery | Subscription OAuth (0.0.12); official SDK dependency; env scan at import |
|
|
125
|
+
| Google | Native Gemini HTTP package for coding-host semantics | Vertex enterprise identity (0.0.13); `@google/genai` runtime dep unless fetch proven impossible at impl (prefer fetch) |
|
|
126
|
+
| Goal/verify | Thin coding-agent helper + network-free example | Goal table; second workflow/agent engine; auto-push/PR network |
|
|
127
|
+
|
|
128
|
+
## Frozen finite limits and charging points
|
|
129
|
+
|
|
130
|
+
**Rule:** Search and budget paths must validate caps in O(1) before scan/query. No always-on watchers. Do not raise hard caps in Tasks 1–9 without updating this page + tests + docs.
|
|
131
|
+
|
|
132
|
+
### Session search (new — freeze defaults)
|
|
133
|
+
|
|
134
|
+
| Resource | Default / hard cap | Charge/check point | Failure/cleanup owner |
|
|
135
|
+
| --- | --- | --- | --- |
|
|
136
|
+
| Page `limit` | 20 / 100 | Before query/scan | Task 1 validation; Task 2–3 adapters |
|
|
137
|
+
| Query string bytes | 4 KiB / 16 KiB | Before parse/FTS | Task 1 |
|
|
138
|
+
| Snippet bytes per hit | 512 / 4 KiB | Before hit assembly | Task 2–3 |
|
|
139
|
+
| Cursor bytes | 1 KiB / 4 KiB | Before decode | Task 1–2 |
|
|
140
|
+
| Memory linear: sessions scanned | 1,000 / 5,000 | During scan; abort on signal | Task 3 |
|
|
141
|
+
| Memory linear: entries scanned | 10,000 / 50,000 | During scan | Task 3 |
|
|
142
|
+
| Memory linear: bytes scanned | 8 MiB / 64 MiB | During scan (serialized entry text) | Task 3 |
|
|
143
|
+
| DB FTS match candidates before page trim | adapter-local ≤ 1,000 / 5,000 | Before materializing snippets | Task 2 |
|
|
144
|
+
|
|
145
|
+
**Forbidden:** default path that scans entire store with no limit; background reindex workers; retaining unbounded snippet corpora.
|
|
146
|
+
|
|
147
|
+
Existing `querySessions` default `limit ?? 100` stays for admin listing; search defaults are tighter (20).
|
|
148
|
+
|
|
149
|
+
### Context budget (new — freeze defaults)
|
|
150
|
+
|
|
151
|
+
| Resource | Default / hard cap | Charge/check point | Owner |
|
|
152
|
+
| --- | --- | --- | --- |
|
|
153
|
+
| `maxInputTokens` when set | caller-required; hard max 2_000_000 | Before eviction | Task 4 |
|
|
154
|
+
| `maxInputBytes` when set | caller-required; hard max 32 MiB | Before eviction | Task 4 |
|
|
155
|
+
| Estimate cost | O(assembled messages); no network | During estimate | Task 4 |
|
|
156
|
+
| Omission report entries | 256 / 1,024 | When `reportOmissions` | Task 4 |
|
|
157
|
+
|
|
158
|
+
**Forbidden:** provider call for budgeting; mutating/deleting `SessionStore` entries from budget path.
|
|
159
|
+
|
|
160
|
+
### Providers / coding helper (reuse existing)
|
|
161
|
+
|
|
162
|
+
| Resource | Disposition |
|
|
163
|
+
| --- | --- |
|
|
164
|
+
| Stream/SSE/media/run limits | Reuse existing provider transport + run-limit ceilings (Tasks 5–6) |
|
|
165
|
+
| Coding checkpoint / check / PR handoff bytes | Reuse `packages/coding-agent` `DEFAULT_*` / `HARD_*` (Task 7) |
|
|
166
|
+
| Workflow suspend/resume | Existing workflow limits unchanged |
|
|
167
|
+
|
|
168
|
+
## Threat and authority matrix
|
|
169
|
+
|
|
170
|
+
| Boundary | Trusted authority | Untrusted input | Mandatory control | Default / unsupported |
|
|
171
|
+
| --- | --- | --- | --- | --- |
|
|
172
|
+
| Search ownership | Host passes `OwnershipScope` | Model-supplied tenant ids | Adapters filter tenant/account/user when present; mismatch → empty or typed forbidden per existing persistence norms | Cross-tenant search unsupported |
|
|
173
|
+
| Search snippets | Adapter redaction-safe projection | Message/tool payloads | Snippet caps; never copy credential fields; prefer label/summary/FTS fragment | Raw full transcript as hit unsupported |
|
|
174
|
+
| Budget omissions | Assembler metadata helper | Dropped block contents | Report kinds/ids/sizes only; redactor still applies to provider messages | Secret values in omission report unsupported |
|
|
175
|
+
| Provider credentials | Host `CredentialValueSource` late-bound | Env/process ambient keys | No import/setup network or keychain scan; redact errors | Env auto-discovery unsupported |
|
|
176
|
+
| Goal/verify approval | Host approval policy | Model “approved” claims | Fail closed without approval; suspend/resume via workflows | Implicit approve unsupported |
|
|
177
|
+
| Provider headers | Provider-owned required headers win | Host override attempts on reserved names | Existing header-ownership rules | Host overwrite of provider auth headers unsupported |
|
|
178
|
+
|
|
179
|
+
## Validation matrix for Task 0
|
|
180
|
+
|
|
181
|
+
| Check | Frozen assertion |
|
|
182
|
+
| --- | --- |
|
|
183
|
+
| Traceability | Every Phase 6 roadmap criterion maps to exactly one primary owner among Tasks 1–9; 0.0.12+ items listed only under out-of-scope. |
|
|
184
|
+
| Primitive reuse | Only authorized core seams above; Anthropic/Google are new optional packages; goal/verify is compose-only. Shared Anthropic extract deferred (≥2-consumer rule). |
|
|
185
|
+
| Finite resources | Search/budget caps table enforced; no indexer daemons; no unbounded default scans. |
|
|
186
|
+
| Security claims | Ownership on search; hits/omissions credential-free; provider creds late-bound/redacted. |
|
|
187
|
+
| API names | `SessionIndex` / `SessionSearchQuery` / `SessionSearchHit`; `contextBudget` + `getContextBudgetReport`; `sessionSearchMode`; `createAnthropicProviderPackage` / `createGoogleProviderPackage`; `runCodingGoalVerify`; workspace key `metadata.workspaceRoot`. |
|
|
188
|
+
| Eviction order | system/AGENTS → skills → context → history/tool results. |
|
|
189
|
+
|
|
190
|
+
## Post-freeze extensions (Tasks 8–11)
|
|
191
|
+
|
|
192
|
+
Plan 074 inserted mid-run steer + ask_user_decision multi/free-text/suspend before docs/release (renumbered Tasks 12–13). Still inside 0.0.11; no Goal DB / no new `AgentRunInterruption` kinds.
|
|
193
|
+
|
|
194
|
+
| Extension | Frozen choice | Docs | Proof |
|
|
195
|
+
| --- | --- | --- | --- |
|
|
196
|
+
| Mid-run `steer` | Queue ≤8 / ≤64 KiB; softInterrupt aborts provider stream only; same `runId`; fail closed with no active run | `agent-session-runtime.md`, `cli-rpc.md`, `agent-loops.md` | agent + RPC tests |
|
|
197
|
+
| ask_user multi | `selectionMode: "multiple"` → `selectedIds` | `coding-agent-tools.md` | coding-agent tests |
|
|
198
|
+
| ask_user free-text | `allowCustom` + XOR `customText` | `coding-agent-tools.md` | coding-agent tests |
|
|
199
|
+
| ask_user suspend glue | `suspendAskUserDecision` + resume validators; agent adapter only | `coding-agent-tools.md`, `workflows.md` | workflow suspend→approve test |
|
|
200
|
+
|
|
201
|
+
## Documentation and release ownership
|
|
202
|
+
|
|
203
|
+
- Task 0 (this page): scope freeze, index link, docs.test evidence assertions.
|
|
204
|
+
- Tasks 1–7: original Phase 6 implementation owners (search/budget/providers/goal-verify).
|
|
205
|
+
- Tasks 8–11: steer + ask_user_decision multi/free-text/suspend glue.
|
|
206
|
+
- Task 12: session/input/provider/coding/workflows/migration/performance docs, READMEs/CHANGELOGs, index summaries.
|
|
207
|
+
- Task 13: version `0.0.11`, benchmarks, `sdk:ready`, pack/install/supply-chain, release dry-run — **done** (2,047 tests / 2,014 pass / 33 skip; 34/34 dry-run; no tag/publish).
|
|
208
|
+
|
|
209
|
+
No public implementation API changes in Task 0. This page, `roadmap.md` Phase 6, and Plan 074 are the authoritative pre-implementation boundary; later tasks may tighten defaults but cannot raise hard caps, add daemons/Goal DB/second runtime, or pull 0.0.12+ items without updating tests, docs, and this evidence.
|
|
@@ -25,6 +25,8 @@ Use this helper when implementing a DB-backed `SessionStore` (for example, the r
|
|
|
25
25
|
- session ids remain isolated (`assertSessionStoreConforms` always probes a secondary session)
|
|
26
26
|
- optional concurrent fork children of the same parent succeed when `exerciseConcurrentParentAppend: true`
|
|
27
27
|
- optional durable reopen/idempotency survival when `runSessionStoreConformance(..., { exerciseReopen: true })`
|
|
28
|
+
- optional `searchSessions` bounds/ownership/empty-page checks when `exerciseSearchSessions: true` (`assertSessionStoreSearchSessions`)
|
|
29
|
+
- optional `searchSessions` bounds/ownership/empty-page checks when `exerciseSearchSessions: true` (`assertSessionStoreSearchSessions`)
|
|
28
30
|
|
|
29
31
|
## Inputs / request
|
|
30
32
|
|