@arnilo/prism 0.0.14 → 0.0.16
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 +22 -2
- package/README.md +5 -4
- package/dist/agent-definitions.js +2 -3
- package/dist/agent-loops.d.ts +4 -0
- package/dist/agent-loops.js +28 -10
- package/dist/agent-run-lifecycle.d.ts +1 -2
- package/dist/agent-run-lifecycle.js +1 -1
- package/dist/agent-run-state.js +16 -3
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +121 -51
- package/dist/cache-helpers.js +18 -9
- package/dist/checkpoints.js +5 -9
- package/dist/cli-init.js +3 -7
- package/dist/cli-runner.d.ts +1 -1
- package/dist/cli-runner.js +74 -13
- package/dist/compaction.js +5 -4
- package/dist/config.js +7 -4
- package/dist/content.js +26 -24
- package/dist/context-budget.js +12 -8
- package/dist/contracts.d.ts +79 -3
- package/dist/contracts.js +4 -1
- package/dist/contribution-parsing.js +6 -2
- package/dist/conversations.js +2 -1
- package/dist/credentials.d.ts +1 -1
- package/dist/credentials.js +3 -1
- package/dist/event-multiplexer.js +1 -3
- package/dist/feedback.js +11 -9
- package/dist/guardrails.d.ts +1 -1
- package/dist/guardrails.js +17 -14
- package/dist/identity.js +10 -2
- package/dist/index.d.ts +83 -84
- package/dist/index.js +42 -42
- package/dist/input.d.ts +2 -2
- package/dist/input.js +40 -24
- package/dist/instruction-injection.d.ts +1 -1
- package/dist/node/agent-definitions.js +16 -8
- package/dist/node/contribution-discovery.d.ts +1 -2
- package/dist/node/contribution-discovery.js +3 -3
- package/dist/node/session-store-jsonl.js +10 -7
- package/dist/node/settings.d.ts +1 -1
- package/dist/node/settings.js +1 -1
- package/dist/node/system-project-prompts.js +2 -4
- package/dist/node/trust.js +1 -1
- package/dist/persistence-lifecycle.js +1 -3
- package/dist/provider-events.d.ts +1 -0
- package/dist/provider-events.js +6 -1
- package/dist/provider-request-policy.js +3 -4
- package/dist/providers/media.d.ts +1 -1
- package/dist/providers/openai-compatible.js +3 -4
- package/dist/providers/openai-primitives.js +7 -7
- package/dist/redaction.d.ts +1 -0
- package/dist/redaction.js +5 -2
- package/dist/resources.d.ts +2 -2
- package/dist/resources.js +2 -2
- package/dist/rpc.js +42 -9
- package/dist/run-ledger.js +13 -4
- package/dist/run-limits.js +49 -10
- package/dist/secure-agent.js +1 -1
- package/dist/security.js +7 -2
- package/dist/session-stores.d.ts +1 -1
- package/dist/session-stores.js +13 -13
- package/dist/structured-output.js +2 -2
- package/dist/system-prompts.js +7 -2
- package/dist/testing/compaction-conformance.js +5 -1
- package/dist/testing/extension-conformance.js +15 -3
- package/dist/testing/feedback.d.ts +1 -3
- package/dist/testing/feedback.js +1 -1
- package/dist/testing/persistence-schema.js +206 -37
- package/dist/testing/provider-conformance.js +3 -3
- package/dist/testing/run-ledger-conformance.js +1 -1
- package/dist/testing/session-store-conformance.js +1 -1
- package/dist/testing/tool-conformance.js +30 -5
- package/dist/thinking.js +4 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +24 -5
- package/docs/0.1.0-readiness.md +139 -0
- package/docs/host-security.md +4 -1
- package/docs/index.md +14 -11
- package/docs/migration.md +58 -1
- package/docs/multimodal-content.md +8 -5
- package/docs/performance.md +67 -0
- package/docs/provider-caching.md +8 -0
- package/docs/provider-conformance.md +29 -5
- package/docs/provider-packages.md +22 -1
- package/docs/providers/ai-sdk.md +23 -7
- package/docs/providers/openai.md +22 -3
- package/docs/public-contracts.md +1 -1
- package/docs/rag.md +41 -12
- package/docs/release-and-install.md +153 -16
- package/docs/resource-loading.md +3 -0
- package/docs/working-and-semantic-memory.md +22 -4
- package/package.json +14 -6
- package/docs/review-coverage-2026-07-14.md +0 -260
- package/docs/review-coverage-2026-07-15.md +0 -193
- package/docs/review-coverage-2026-07-17-provider-validation.md +0 -192
- package/docs/review-coverage-2026-07-19-phase-3.md +0 -174
- package/docs/review-coverage-2026-07-20-phase-4.md +0 -175
- package/docs/review-coverage-2026-07-21-phase-5.md +0 -172
- package/docs/review-coverage-2026-07-22-phase-6.md +0 -209
- package/docs/review-coverage-2026-07-22-phase-7.md +0 -173
- package/docs/review-coverage-2026-07-23-phase-8.md +0 -245
- package/docs/review-coverage-2026-07-25-phase-9.md +0 -256
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## What it does
|
|
4
4
|
|
|
5
|
-
Prism is published as one core package, thirty-
|
|
5
|
+
Prism is published as one core package, thirty-seven first-party capability packages, and six pure-manifest family/profile packages (**44** publishable manifests total). 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. The measurable 1.0 readiness gates (command-per-gate) live in [`0.1.0-readiness.md`](./0.1.0-readiness.md).
|
|
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.16` peer and `sideEffects: false`; RAG also peers on memory, and server also peers on workflows):
|
|
12
12
|
|
|
13
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-azure`, `@arnilo/prism-provider-bedrock`, `@arnilo/prism-provider-vertex` — optional enterprise-cloud adapters (Entra/IAM/ADC; separate from consumer Anthropic/Google).
|
|
@@ -36,7 +36,7 @@ First-party workspace packages (each has non-optional `@arnilo/prism@0.0.14` pee
|
|
|
36
36
|
|
|
37
37
|
### 0.0.12 AG-UI package boundary
|
|
38
38
|
|
|
39
|
-
`@arnilo/prism-ag-ui` is a publishable optional code package with root AG-UI exports and stable `./acp` sibling, peer `@arnilo/prism@0.0.
|
|
39
|
+
`@arnilo/prism-ag-ui` is a publishable optional code package with root AG-UI exports and stable `./acp` sibling, peer `@arnilo/prism@0.0.16`, pinned `@ag-ui/core@0.0.57` / `@agentclientprotocol/sdk@1.3.0`, and no import-time network/listener/run. It is included by `@arnilo/prism-all` only—not `@arnilo/prism-code` or `@arnilo/prism-sdk`—so coding and SDK profiles stay free of UI protocol dependencies.
|
|
40
40
|
|
|
41
41
|
Family/profile packages (pure manifests, no code or `dist`; ship `README.md` and `CHANGELOG.md`; use exact hard `dependencies`):
|
|
42
42
|
|
|
@@ -66,6 +66,7 @@ Consumers install the core package for the runtime and add first-party packages
|
|
|
66
66
|
| Scaffold a minimal project | `npx --package @arnilo/prism prism init my-agent [--provider openai] [--with-workflows] [--with-evals]` |
|
|
67
67
|
| Install core + all providers | `npm install @arnilo/prism @arnilo/prism-providers` |
|
|
68
68
|
| Install minimal safe profile | `npm install @arnilo/prism-base` |
|
|
69
|
+
| Install compaction strategies only | `npm install @arnilo/prism @arnilo/prism-compaction` |
|
|
69
70
|
| Install coding-agent profile | `npm install @arnilo/prism-code @arnilo/prism-provider-openai` |
|
|
70
71
|
| Install application SDK profile | `npm install @arnilo/prism-sdk @arnilo/prism-provider-openai @arnilo/prism-session-store-sqlite` |
|
|
71
72
|
| Install everything | `npm install @arnilo/prism-all` |
|
|
@@ -77,9 +78,9 @@ Consumers install the core package for the runtime and add first-party packages
|
|
|
77
78
|
| Run the default (network-free) test suite | `npm test` |
|
|
78
79
|
| Dry-run pack core + every package | `npm run pack:dry-run` |
|
|
79
80
|
| Local mirror of the release verify gate | `npm run release:dry-run` |
|
|
80
|
-
| Validate clean tag/version/ranges and reject registry collisions | `npm run release:check -- --version 0.0.
|
|
81
|
-
| Preview deterministic publish order | `npm run release:publish -- --version 0.0.
|
|
82
|
-
| Resume interrupted tagged publication | `npm run release:publish -- --version 0.0.
|
|
81
|
+
| Validate clean tag/version/ranges and reject registry collisions | `npm run release:check -- --version 0.0.16` |
|
|
82
|
+
| Preview deterministic publish order | `npm run release:publish -- --version 0.0.16 --dry-run --allow-dirty --allow-untagged` |
|
|
83
|
+
| Resume interrupted tagged publication | `npm run release:publish -- --version 0.0.16 --resume --report release-artifacts/publish-report.json` |
|
|
83
84
|
| Full SDK readiness gate (typecheck + offline tests + pack) | `npm run sdk:ready` |
|
|
84
85
|
|
|
85
86
|
Public core import specifiers (from the root `exports` map):
|
|
@@ -116,7 +117,7 @@ A packed tarball contains only public compiled output and release files:
|
|
|
116
117
|
- Code packages ship `README.md`, `LICENSE`, and `CHANGELOG.md`; family/profile packages ship `README.md` and `CHANGELOG.md`.
|
|
117
118
|
- The core tarball additionally ships the full `docs/` directory (the docs hub) and `templates/init/` used by `prism init`.
|
|
118
119
|
- `dist/cli.js` and the `bin` link in core.
|
|
119
|
-
- **Tarball filenames.** npm strips the `@scope/` prefix, so the core package `@arnilo/prism` produces a tarball named `arnilo-prism-0.0.
|
|
120
|
+
- **Tarball filenames.** npm strips the `@scope/` prefix, so the core package `@arnilo/prism` produces a tarball named `arnilo-prism-0.0.16.tgz`; first-party packages produce `arnilo-prism-provider-<name>-0.0.16.tgz` / `arnilo-prism-compaction-<name>-0.0.16.tgz` / `arnilo-prism-coding-agent-0.0.16.tgz`; family/profile packages produce `arnilo-prism-{providers,compaction,base,code,sdk,all}-0.0.16.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).
|
|
120
121
|
|
|
121
122
|
Excluded from every tarball by `files` negation:
|
|
122
123
|
|
|
@@ -135,9 +136,9 @@ Excluded from every tarball by `files` negation:
|
|
|
135
136
|
"name": "host-app",
|
|
136
137
|
"type": "module",
|
|
137
138
|
"dependencies": {
|
|
138
|
-
"@arnilo/prism": "0.0.
|
|
139
|
-
"@arnilo/prism-provider-openai": "0.0.
|
|
140
|
-
"@arnilo/prism-compaction-observational-memory": "0.0.
|
|
139
|
+
"@arnilo/prism": "0.0.16",
|
|
140
|
+
"@arnilo/prism-provider-openai": "0.0.16",
|
|
141
|
+
"@arnilo/prism-compaction-observational-memory": "0.0.16"
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
```
|
|
@@ -147,7 +148,7 @@ Installing the provider/compaction packages without `@arnilo/prism` present prod
|
|
|
147
148
|
```text
|
|
148
149
|
npm error code ERESOLVE
|
|
149
150
|
npm error Could not resolve dependency:
|
|
150
|
-
npm error peer @arnilo/prism@"0.0.
|
|
151
|
+
npm error peer @arnilo/prism@"0.0.16" from @arnilo/prism-provider-openai@0.0.16
|
|
151
152
|
```
|
|
152
153
|
|
|
153
154
|
## Implementation example
|
|
@@ -180,11 +181,11 @@ For SDK readiness, run the same one-command gate directly. It composes existing
|
|
|
180
181
|
npm run sdk:ready
|
|
181
182
|
```
|
|
182
183
|
|
|
183
|
-
Release publication derives all
|
|
184
|
+
Release publication derives all **44** manifests from the workspace once, validates exact `0.0.16` manifest/lockfile/internal ranges, then uses deterministic dependency order. `release:check` requires a clean commit tagged `v0.0.16` 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` performs registry availability checks and invokes `npm publish --dry-run` with explicit public access, provenance, and `latest` tag, but does not publish.
|
|
184
185
|
|
|
185
186
|
```bash
|
|
186
|
-
npm run release:check -- --version 0.0.
|
|
187
|
-
npm run release:publish -- --version 0.0.
|
|
187
|
+
npm run release:check -- --version 0.0.16
|
|
188
|
+
npm run release:publish -- --version 0.0.16 --dry-run --allow-dirty --allow-untagged
|
|
188
189
|
```
|
|
189
190
|
|
|
190
191
|
`--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.
|
|
@@ -195,6 +196,82 @@ Optional live smoke tests stay separate from SDK readiness because they require
|
|
|
195
196
|
PRISM_LIVE_PROVIDER_TESTS=1 npm run test --workspaces --if-present
|
|
196
197
|
```
|
|
197
198
|
|
|
199
|
+
### 0.0.16 publish handoff
|
|
200
|
+
|
|
201
|
+
**Decision: GO after protected operator prerequisites below.** Phase 11 (plan 079) is a simplification/readiness release: no runtime behavior changes and no package retired. The exact graph is **44 publishable manifests** — Phase 11 Task 3 added one internal implementation package, `@arnilo/prism-session-store-codecs` (shared SQLite/Postgres row codecs, not enrolled in any profile family). The only public-surface change is the additive `resolveRedactor` export from `@arnilo/prism`; provider `cleanJson` was deliberately left per-package (wire-shape variants). All six profiles (`prism-all`, `prism-base`, `prism-code`, `prism-compaction`, `prism-providers`, `prism-sdk`) are retained on adoption evidence (zero retirements). The root tarball dropped the historical `docs/review-coverage-*.md` (659,478 → ≈575,680 packed bytes, 281 → 270 files). New offline release gates (`npm run release:gate`: API-surface `.d.ts` diff, tarball deny-list, exact ranges) run inside `sdk:ready`, and performance budgets (`scripts/budgets.json`) are enforced by `scripts/budget-gate.test.mjs` + `scripts/benchmark-0.0.16.mjs`. No Studio, Office, remote-browser vendor, additional vector-store, Slack/Teams, voice/desktop-control, internal-auth, or queue package ships. Protected CI, signed tag, npm authentication, OIDC attestation, and protected live-canary evidence remain operator/workflow prerequisites; no package is published by this handoff.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
git diff --check
|
|
205
|
+
npm ci
|
|
206
|
+
npm run sdk:ready
|
|
207
|
+
node scripts/benchmark-0.0.16.mjs
|
|
208
|
+
node --test scripts/budget-gate.test.mjs
|
|
209
|
+
node scripts/scan-secrets.mjs && node scripts/verify-sbom.mjs
|
|
210
|
+
npm audit --audit-level=high
|
|
211
|
+
npm run release:gate
|
|
212
|
+
npm run release:check -- --version 0.0.16 --allow-dirty --allow-untagged --report /tmp/prism-0.0.16-preflight.json
|
|
213
|
+
npm run release:publish -- --version 0.0.16 --dry-run --allow-dirty --allow-untagged --report /tmp/prism-0.0.16-dry-run.json
|
|
214
|
+
git tag -s v0.0.16 -m "Prism 0.0.16"
|
|
215
|
+
git verify-tag v0.0.16
|
|
216
|
+
git push origin v0.0.16
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The dry-run checks every registry collision and executes npm's non-publishing tarball validation for each dependency-ordered manifest. The protected tag workflow alone publishes through `npm run release:publish -- --version "${GITHUB_REF_NAME#v}" --resume --report release-artifacts/publish-report.json`; re-run a failed job for the same tag. `npm audit signatures --json --include-attestations` and artifact checksums remain post-publish checks. The 0.0.15 protected live-canary matrix below still applies; 0.0.16 changes no provider/protocol/tenant surface, so no new live row is introduced.
|
|
220
|
+
|
|
221
|
+
#### Rollback limitations
|
|
222
|
+
|
|
223
|
+
npm publication is immutable: partial publication is a resume case, and a confirmed defect requires deprecation plus a fixed version rather than rollback.
|
|
224
|
+
|
|
225
|
+
The 0.0.16 package set is the canonical **44-package** list below (the 0.0.15 set plus `@arnilo/prism-session-store-codecs`); `release:check` derives it from the workspace and rejects missing, private, version-skewed, or internally mismatched manifests.
|
|
226
|
+
|
|
227
|
+
### 0.0.15 protected live-canary matrix
|
|
228
|
+
|
|
229
|
+
Default `npm test`, `npm run sdk:ready`, and `benchmark-0.0.15` are network-free. Run live rows only from a protected scheduled/release environment (or an explicitly authorized operator workstation); never place credentials in fixtures, benchmark JSON, pull-request jobs, or package scripts. Use least-privilege keys, one bounded request, and retain only redacted aggregate status. A blank **checked-in gate** means Prism deliberately has no generic credential fixture: host owns that provider/account compatibility probe.
|
|
230
|
+
|
|
231
|
+
| Surface | Gate and credential | Checked-in/protected command | Canary scope |
|
|
232
|
+
| --- | --- | --- | --- |
|
|
233
|
+
| OpenAI Responses baseline | `PRISM_LIVE_PROVIDER_TESTS=1` + `OPENAI_API_KEY` | `npm test -w @arnilo/prism-provider-openai` | Bounded text/tool/abort smoke; key never enters events. |
|
|
234
|
+
| OpenAI hosted tools + Realtime | `OPENAI_API_KEY`; protected release harness additionally supplies host-owned safety identifier and hosted-tool entitlement | No generic fixture; record result with the release evidence | Provider-hosted `web_search`/similar execution and Realtime audio/interruption need account-specific availability, so fake transport coverage remains default gate. |
|
|
235
|
+
| AI SDK adapter | Host-selected AI SDK v4 model factory plus its provider credential | No generic fixture; run host integration in protected release environment | Exact `@ai-sdk/provider@4.0.3` mapping/version check; Prism does not own upstream model credentials. |
|
|
236
|
+
| Kimi / Moonshot | `PRISM_LIVE_PROVIDER_TESTS=1` + `KIMI_API_KEY` | `npm test -w @arnilo/prism-provider-kimi` | Coding route; Moonshot entitlement is account-specific. |
|
|
237
|
+
| Z.AI | `PRISM_LIVE_PROVIDER_TESTS=1` + `ZAI_API_KEY` | `npm test -w @arnilo/prism-provider-zai` | GLM stream/tool/reasoning smoke. |
|
|
238
|
+
| OpenRouter | `PRISM_LIVE_PROVIDER_TESTS=1` + `OPENROUTER_API_KEY` | `npm test -w @arnilo/prism-provider-openrouter` | Routed stream/model metadata smoke; host chooses permitted route. |
|
|
239
|
+
| OpenCode Go | `PRISM_LIVE_PROVIDER_TESTS=1` + `OPENCODE_API_KEY` | `npm test -w @arnilo/prism-provider-opencode-go` | OpenAI/Anthropic route selection smoke. |
|
|
240
|
+
| Alibaba DashScope | Alibaba least-privilege API key | No generic fixture; host compatibility probe in protected release environment | Region/preset/catalog entitlement varies; offline serializer and catalog tests remain default gate. |
|
|
241
|
+
| Ollama Cloud/local | Cloud API key or host-local authenticated endpoint | No generic fixture; host compatibility probe in protected release environment | Cloud account and local daemon/model availability are host-owned; no daemon starts during Prism tests. |
|
|
242
|
+
| NeuralWatt | `PRISM_LIVE_PROVIDER_TESTS=1` + `NEURALWATT_API_KEY` | `npm test -w @arnilo/prism-provider-neuralwatt` | Stream/retry/quota telemetry smoke. |
|
|
243
|
+
| Anthropic | `PRISM_LIVE_PROVIDER_TESTS=1` + `ANTHROPIC_API_KEY` | `npm test -w @arnilo/prism-provider-anthropic` | Restricted one-turn provider smoke. |
|
|
244
|
+
| Google | `PRISM_LIVE_PROVIDER_TESTS=1` + `GOOGLE_API_KEY` or `GEMINI_API_KEY` | `npm test -w @arnilo/prism-provider-google` | Restricted one-turn provider smoke. |
|
|
245
|
+
| Memory PostgreSQL/pgvector | `PRISM_TEST_POSTGRES_URL` with `vector` extension | `npm run test:postgres -w @arnilo/prism-memory` | Shared memory conformance, export/rebuild pagination, and finite-vector boundary. |
|
|
246
|
+
|
|
247
|
+
The scheduled/manual `live-canaries` workflow uses protected environment `live-canaries`; release validation uses its protected release environment. Neither workflow receives a broad workspace key. A successful offline benchmark is never evidence that a live row ran; each protected invocation must record its enabled matrix rows and skipped/missing prerequisites.
|
|
248
|
+
|
|
249
|
+
### 0.0.15 publish handoff
|
|
250
|
+
|
|
251
|
+
**Decision: GO after protected operator prerequisites below.** Phase 10 closes provider, memory, and RAG ecosystem parity without changing the Task 0 package freeze: the exact graph remains **43 publishable manifests**. It adds OpenAI hosted-tool attribution, bounded Responses continuation and Realtime; exact AI SDK V4 mapping; bounded RAG source lifecycle/document adapters/reranking/provenance/trust/status; and memory export/rebuild production conformance. No Studio, Office, remote-browser vendor, additional vector-store, Slack/Teams, voice/desktop-control, internal-auth, or queue package ships. Phase 11 (plan 079, Task 3) adds one internal implementation package, `@arnilo/prism-session-store-codecs` (shared session-store row codecs, not enrolled in any family), bringing the exact graph to **44 publishable manifests**. Protected CI, signed tag, npm authentication, OIDC attestation, and protected live-canary evidence remain operator/workflow prerequisites; no package is published by this handoff.
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
git diff --check
|
|
255
|
+
npm ci
|
|
256
|
+
npm run sdk:ready
|
|
257
|
+
node scripts/benchmark-0.0.15.mjs
|
|
258
|
+
node --test scripts/benchmark-0.0.15.test.mjs
|
|
259
|
+
npm audit --audit-level=high
|
|
260
|
+
npm run release:check -- --version 0.0.15 --allow-dirty --allow-untagged --report /tmp/prism-0.0.15-preflight.json
|
|
261
|
+
npm run release:publish -- --version 0.0.15 --dry-run --allow-dirty --allow-untagged --report /tmp/prism-0.0.15-dry-run.json
|
|
262
|
+
git tag -s v0.0.15 -m "Prism 0.0.15"
|
|
263
|
+
git verify-tag v0.0.15
|
|
264
|
+
git push origin v0.0.15
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
The dry-run checks every registry collision and executes npm's non-publishing tarball validation for each dependency-ordered manifest. The protected tag workflow alone publishes through `npm run release:publish -- --version "${GITHUB_REF_NAME#v}" --resume --report release-artifacts/publish-report.json`; re-run a failed job for the same tag. `npm audit signatures --json --include-attestations` and artifact checksums remain post-publish checks.
|
|
268
|
+
|
|
269
|
+
#### Rollback limitations
|
|
270
|
+
|
|
271
|
+
npm publication is immutable: partial publication is a resume case, and a confirmed defect requires deprecation plus a fixed version rather than rollback.
|
|
272
|
+
|
|
273
|
+
The 0.0.15 package set is unchanged from the canonical **43-package** list below; `release:check` derives it from the workspace and rejects missing, private, version-skewed, or internally mismatched manifests.
|
|
274
|
+
|
|
198
275
|
### 0.0.14 publish handoff
|
|
199
276
|
|
|
200
277
|
**Decision: GO after operator prerequisites below.** Phase 9 personal/work-agent conversations, memory consent/lifecycle, durable artifact review + authorized delivery, AG-UI co-work events, scoped M365/GWS OAuth connectors, browser verified-state checkpoints, a deny-by-default device adapter contract, and two new optional provider packages (`@arnilo/prism-provider-alibaba`, `@arnilo/prism-provider-ollama`). The exact 0.0.14 graph has **43 manifests** (41 → 43; only the two provider packages are new, enrolled via `@arnilo/prism-providers`). `@arnilo/prism-code` and `@arnilo/prism-sdk` stay lean; browser/ag-ui/work-tools remain optional. no Office package, Slack/Teams channel package, voice/desktop-control vendor package, internal auth DB, or Redis/SQS queue adapter ships. Clean protected-branch CI, signed commit/tag, npm authentication, OIDC attestation, protected live canaries, and actual publication remain operator/workflow prerequisites.
|
|
@@ -256,6 +333,7 @@ Package set (43):
|
|
|
256
333
|
@arnilo/prism-provider-zai
|
|
257
334
|
@arnilo/prism-rag
|
|
258
335
|
@arnilo/prism-server
|
|
336
|
+
@arnilo/prism-session-store-codecs
|
|
259
337
|
@arnilo/prism-session-store-postgres
|
|
260
338
|
@arnilo/prism-session-store-sqlite
|
|
261
339
|
@arnilo/prism-supervisor
|
|
@@ -673,7 +751,7 @@ npm publication is not transactional and published versions are immutable. Parti
|
|
|
673
751
|
|
|
674
752
|
## Extension and configuration notes
|
|
675
753
|
|
|
676
|
-
- **Required `@arnilo/prism` peer.** Every first-party code package declares a non-optional `@arnilo/prism@0.0.
|
|
754
|
+
- **Required `@arnilo/prism` peer.** Every first-party code package declares a non-optional `@arnilo/prism@0.0.16` peer (`peerDependenciesMeta` must not mark `@arnilo/prism` optional; other peers such as `playwright-core` may be optional). The range stays pinned to `0.0.16` for the current 0.x release 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.
|
|
677
755
|
- **Public access.** All 43 manifests (37 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.
|
|
678
756
|
- **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).
|
|
679
757
|
- **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`.
|
|
@@ -734,9 +812,56 @@ A deleted tracked feature-request markdown was intentionally not restored by rel
|
|
|
734
812
|
| 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. |
|
|
735
813
|
|
|
736
814
|
|
|
815
|
+
## Formatting, linting, and coverage
|
|
816
|
+
|
|
817
|
+
Prism uses one tool for formatting and linting — [Biome](https://biomejs.dev) — configured once at the repo root (`biome.json`) and inherited by every workspace. Coverage uses Node's built-in test coverage; there is no third-party coverage service.
|
|
818
|
+
|
|
819
|
+
| Command | What it does |
|
|
820
|
+
| --- | --- |
|
|
821
|
+
| `npm run lint` | `biome lint .` — fails on any lint error (warnings are non-fatal). |
|
|
822
|
+
| `npm run format:check` | `biome format .` — fails if any file is unformatted. |
|
|
823
|
+
| `npm run format` | `biome format --write .` — normalizes formatting in place. |
|
|
824
|
+
| `npm run test:coverage` | `node --test --experimental-test-coverage` over the core suite with enforced minimums: **lines 60%**, **functions 70%**, **branches 75%** (current baseline ≈ 64 / 72 / 79). Excludes `__tests__/`, `node_modules/`, and `scripts/` from the report. |
|
|
825
|
+
|
|
826
|
+
All four gates run inside `npm run sdk:ready` (after `typecheck`, before `pack:dry-run`). A few rules are disabled in `biome.json` because they are false positives for this codebase: `noControlCharactersInRegex` and `noAssignInExpressions` (security/redaction code intentionally matches control characters and uses `while ((m = re.exec(…)))` loops), `noShadowRestrictedNames`, `noThenProperty` (the workflow DSL has a legitimate `then` branch field), `noExplicitAny`, `noVoidTypeReturn`, and `useYield`. Raise the coverage thresholds in `package.json` `test:coverage` as the baseline climbs.
|
|
827
|
+
|
|
828
|
+
## Dependency major-upgrade isolation
|
|
829
|
+
|
|
830
|
+
Major dependency upgrades are **isolated, compatibility-tested changes — never bundled into a feature release.** A major bump (TypeScript, `@types/node`, `diff`, or any third-party runtime dependency and its successors) ships as its own commit/PR that runs `npm run sdk:ready` plus packed-install evidence, and is reviewed separately from feature work. Release commits contain no unreviewed major bumps.
|
|
831
|
+
|
|
832
|
+
**Current third-party upgrade surface** (internal `@arnilo/prism-*` ranges are version-managed by the release tooling, not dependency upgrades; the core `@arnilo/prism` package has **zero** runtime dependencies, asserted by `core-boundaries.test.ts`):
|
|
833
|
+
|
|
834
|
+
| Dependency | Range | Resolved (lockfile) | Used by |
|
|
835
|
+
| --- | --- | --- | --- |
|
|
836
|
+
| `typescript` (dev) | `^7.0.2` | 7.0.2 | root build |
|
|
837
|
+
| `@types/node` (dev) | `^26.1.1` | 26.1.1 | root build |
|
|
838
|
+
| `@biomejs/biome` (dev) | `^2.5.5` | 2.5.5 | lint/format (Task 6) |
|
|
839
|
+
| `diff` | `^9.0.0` | 9.0.0 | `@arnilo/prism-coding-agent` |
|
|
840
|
+
| `pg` | `^8.22.0` | 8.22.0 | `@arnilo/prism-memory`, `@arnilo/prism-session-store-postgres` |
|
|
841
|
+
| `better-sqlite3` | `^12.11.1` | 12.11.1 | `@arnilo/prism-session-store-sqlite` |
|
|
842
|
+
| `ajv` | `^8.17.1` | 8.20.0 | `@arnilo/prism-tool-validator-json-schema` |
|
|
843
|
+
| `zod` | `^4.4.3` | 4.4.3 | `@arnilo/prism-mcp` |
|
|
844
|
+
| `@napi-rs/keyring` | `^1.3.0` | 1.3.0 | `@arnilo/prism-credentials-node` |
|
|
845
|
+
| `@modelcontextprotocol/sdk` | `1.29.0` | 1.29.0 | `@arnilo/prism-mcp` |
|
|
846
|
+
| `@ag-ui/core` | `0.0.57` | 0.0.57 | `@arnilo/prism-ag-ui` |
|
|
847
|
+
| `@agentclientprotocol/sdk` | `1.3.0` | 1.3.0 | `@arnilo/prism-ag-ui` |
|
|
848
|
+
|
|
849
|
+
**Recorded compatibility matrix (2026-07-26, release 0.0.16):**
|
|
850
|
+
|
|
851
|
+
| Leg | Node | Result |
|
|
852
|
+
| --- | --- | --- |
|
|
853
|
+
| Full SDK readiness (`npm run sdk:ready`: typecheck, lint, format, test, coverage, pack, release:gate) | 24.18.0 (current) | ✅ green — 1312/1312 tests, lint 0 errors, format clean, coverage 64/72/79 vs 60/70/75 thresholds. |
|
|
854
|
+
| Build toolchain (`tsc` 7.0.2, `biome` 2.5.5) | 20.20.2 (LTS iron) | ✅ both run under Node 20. |
|
|
855
|
+
| Public surface import smoke (all 21 root `exports` default targets) | 20.20.2 | ✅ all import cleanly. |
|
|
856
|
+
| Full core test suite | 20.20.2 | 1311/1312 — the single failure is `examples_demos_run_to_completion_and_emit_no_secret`, which executes `examples/*.ts` via Node's native TypeScript stripping (Node 22.6+). This is a test-harness capability, not an SDK runtime incompatibility, and is exactly why CI scopes Node 20 to build + import smoke. |
|
|
857
|
+
|
|
858
|
+
**CI enforcement** (`.github/workflows/release.yml`): the `verify` job runs `npm run sdk:ready` on Node 24; `node20-compat` runs `npm ci`, `npm run build`, and the public-import smoke on Node 20; `supply-chain` runs audit, SPDX/license checks, SBOM, and source-secret scans; `publish` `needs:` all of `verify`, `node20-compat`, `postgres-integration`, `codeql-release`, and `supply-chain`, so nothing publishes unless every leg — including the audit/SBOM gates — passes.
|
|
859
|
+
|
|
860
|
+
**Process for a major-upgrade PR:** (1) bump exactly one dependency major in its own branch; (2) `npm run sdk:ready` green; (3) packed-install evidence (`npm run pack:dry-run`, or a scratch `npm install <tarball>` import smoke for native deps like `better-sqlite3`); (4) review lockfile churn line-by-line; (5) the `supply-chain` job supplies audit/SBOM; (6) confirm no build-time regression beyond measured noise on the matrix above; (7) merge separately from any feature work.
|
|
861
|
+
|
|
737
862
|
## Release checklist
|
|
738
863
|
|
|
739
|
-
Every release gate maps to an exact enforcement test or command, so the checklist is executable rather than manual. Run `npm run sdk:ready` for the full local SDK readiness gate: `npm run typecheck`, network-free `npm test`,
|
|
864
|
+
Every release gate maps to an exact enforcement test or command, so the checklist is executable rather than manual. Run `npm run sdk:ready` for the full local SDK readiness gate: `npm run typecheck`, `npm run lint`, `npm run format:check`, network-free `npm test`, `npm run test:coverage`, `npm run pack:dry-run`, and `npm run release:gate`. `npm run release:dry-run` is an alias for the same gate. The GitHub Actions `verify` job runs `npm ci` and `npm run sdk:ready` on Node 24; `node20-compat` runs `npm ci`, `npm run build`, and public export imports on Node 20; `postgres-integration` runs the opt-in PostgreSQL adapter suite against a CI Postgres service.
|
|
740
865
|
|
|
741
866
|
| Gate | Enforcement |
|
|
742
867
|
| --- | --- |
|
|
@@ -749,12 +874,24 @@ Every release gate maps to an exact enforcement test or command, so the checklis
|
|
|
749
874
|
| Tarball excludes built tests, source maps, and source | `packaging.test.ts` rejects `dist/__tests__/`, `*.map`, `src/`, `plans/`, and internal files; confirms every package ships README/changelog (and code packages ship LICENSE), core ships docs + CLI, exported targets exist (`dist/index.js` + `dist/index.d.ts` for NeuralWatt), and `prism-all` transitively reaches all 32 published first-party manifests. |
|
|
750
875
|
| NeuralWatt package/docs/examples release gate | `packaging.test.ts` pins `@arnilo/prism-provider-neuralwatt` package exports/type declarations and `@arnilo/prism-providers`/`@arnilo/prism-all` membership; `docs.test.ts` asserts `docs/index.md` links `providers/neuralwatt.md` and `provider-caching.md`, and that `examples/cache-aware-prompt-assembly.ts` plus `examples/neuralwatt-agent-run.ts` exist and are listed. |
|
|
751
876
|
| Version graph and resumable publication | `release.test.ts` covers exact package/lock/range validation, topological order, registry collisions, dry-run, interrupted reports/resume, clean tagged git state, provenance/public/tag arguments, and token-safe errors. `release:check` and `release:publish` derive the workspace graph without a manual package list. |
|
|
877
|
+
| Pre-publish compatibility gates | `release:gate` (in `sdk:ready`) fails on removed/changed `.d.ts` exports vs `scripts/compat-baseline/` (unless `--allow-break` + migration note), version-range/lockfile drift, and tarball deny-list violations (`plans/`, `code-reviews/`, `docs/review-coverage-*`, `*.map`, `__tests__/`); unit-tested in `scripts/release-gate.test.mjs`. |
|
|
878
|
+
| Formatting, linting, and coverage thresholds | `npm run lint` and `npm run format:check` run Biome (single root `biome.json`, workspaces inherit) and fail on any lint error or unformatted file; `npm run test:coverage` uses Node's built-in `--experimental-test-coverage` with enforced minimums (lines 60 / functions 70 / branches 75) and no third-party service. All three run inside `sdk:ready`. |
|
|
752
879
|
| Supply-chain and live-canary policy | `supply-chain-security.test.ts` verifies SPDX allow/deny behavior, bounded source/artifact secret detection, credential-free canary reports, timeout/redacted failures, immutable action revisions, no `pull_request_target`, protected live environment, attestation paths, and publish dependency on `supply-chain`; CI adds CodeQL and PR dependency review. |
|
|
753
880
|
| Network-free + offline test budget | `network-free-guard.test.ts` keeps the default suite network-free; budget pinned `< 60s` (measured baseline above). Install-smoke is offline (`--offline --no-audit --no-fund`, zero registry fetches). |
|
|
754
881
|
| Core security invariants reaffirmed | Runtime/docs tests hold the trust boundary: **no built-in app tools** (hosts register tools; the core ships only the mock provider and contract helpers), **no hidden provider/credential globals** (providers/credentials are host-owned `AgentConfig` fields, resolved via explicit `providerSource`/`CredentialResolver`), **no auto package discovery** (provider/tool/skill packages are opt-in and individually installed; contribution discovery is realpath-contained and emits inert envelopes the host registers), and **no secret persistence in core** (redaction applies before any `RunLedger`/`SessionStore` append; the ledger gate asserts each message event is written exactly once and redacted). |
|
|
755
882
|
|
|
756
883
|
A change that adds a public persistence/runtime surface, a new package, or a new example must extend the matching row's enforcement (add the page to `apiPages`, the package to the `packages` array, or the example to the demos list) so the checklist stays self-maintaining.
|
|
757
884
|
|
|
885
|
+
## Pre-publish compatibility gates (`release:gate`)
|
|
886
|
+
|
|
887
|
+
`npm run release:gate` (also run inside `npm run sdk:ready`) is the offline gate that must pass before `release:check`/`release:publish`. It runs three stages over the exact version graph (version defaults to the root manifest; no git or registry access):
|
|
888
|
+
|
|
889
|
+
- **ranges**: reuses `validateRelease` — exact internal version ranges and lockfile entries.
|
|
890
|
+
- **compat**: diffs every package's packed `.d.ts` surface (exported names + normalized declaration signatures, `export *` resolved within the package) against `scripts/compat-baseline/<pkg>.txt`. Removed or changed exports fail unless `--allow-break` is passed **and** `docs/migration.md` mentions the target version. Manifest-only profiles (no `main`/`types`/`exports`) are skipped. Regenerate baselines after a deliberate reviewed change with `node scripts/release.mjs gate --update-baseline`.
|
|
891
|
+
- **tarball**: `npm pack --dry-run --json` file lists must not match the deny list (`code-reviews/`, `bug-reports/`, `plans/`, `scripts/benchmark-*`, `docs/review-coverage-*`, `__tests__/`, `*.map`). Root `files` excludes `docs/review-coverage-*` historical reviews.
|
|
892
|
+
|
|
893
|
+
Gate behavior is unit-tested in `scripts/release-gate.test.mjs`. Signature diff is name + normalized first-declaration-line level; full structural `.d.ts` diffing (api-extractor or equivalent) is the recorded upgrade path if line-level proves insufficient.
|
|
894
|
+
|
|
758
895
|
## Related APIs
|
|
759
896
|
|
|
760
897
|
- [`docs/provider-packages.md`](provider-packages.md): first-party provider package layout and setup.
|
package/docs/resource-loading.md
CHANGED
|
@@ -87,6 +87,8 @@ console.log(bytes.byteLength, manifest.name, prompt);
|
|
|
87
87
|
- Helpers do not choose a loader by URI scheme. Hosts can use contribution registries or their own routing when they need that.
|
|
88
88
|
- Helpers do not execute loaded text or imported modules. Package activation remains a host decision.
|
|
89
89
|
- `loadManifestResource()` only validates manifest data; it does not register manifest contributions.
|
|
90
|
+
- `@arnilo/prism-rag` `createResourceDocumentLoader({ loader, context? })` is the RAG bridge for an already-authorized artifact. It calls the supplied `ResourceLoader` once for a caller-selected URI, preserves text/binary media type, and adds no URI routing, local-file discovery, or network fallback. Pair it with a bounded RAG `Parser`; `replaceDocument()` then chunks and atomically replaces one exact RAG source.
|
|
91
|
+
- For public web documents, use `createWebFetchDocumentLoader({ fetcher })` with a host-configured `@arnilo/prism-web-tools` fetch adapter instead of adding web I/O to a `ResourceLoader`. It reuses normalized citation/trust data; the web adapter retains DNS/SSRF policy ownership.
|
|
90
92
|
|
|
91
93
|
## Security and performance notes
|
|
92
94
|
|
|
@@ -96,6 +98,7 @@ console.log(bytes.byteLength, manifest.name, prompt);
|
|
|
96
98
|
- Helpers call `loader.load()` once per helper call and do not cache, scan, list, watch, poll, or discover packages.
|
|
97
99
|
- JSON parsing fails closed for invalid JSON or non-object JSON.
|
|
98
100
|
- Do not put resolved credential values, tokens, headers, or executable code in loaded config, manifests, prompts, skills, or metadata.
|
|
101
|
+
- A RAG resource loader is not permission escalation: pass the same host-owned trust/permission context used for any resource load. HTML/PDF parser output and web content are untrusted inert text; compressed/scanned PDFs require a host parser rather than partial fallback.
|
|
99
102
|
|
|
100
103
|
## MCP resources
|
|
101
104
|
|
|
@@ -23,11 +23,18 @@ Ordinary Prism sessions do not require this package or any vector backend.
|
|
|
23
23
|
| `vectorStore` / `workingStore` | no | Defaults to in-memory adapters |
|
|
24
24
|
| `schema` / `validateWorkingMemory` | no | Working-memory shape checks (JSON Schema subset or host hook) |
|
|
25
25
|
| `workingMemoryTemplate` | no | `{{path}}` template for context injection |
|
|
26
|
-
| `limits` | no | top-K, adjacent range, batch, payload, injected-token caps |
|
|
26
|
+
| `limits` | no | top-K, adjacent range, batch, payload, injected-token, export, and rebuild caps |
|
|
27
27
|
| `redactor` / `secrets` | no | Redact text/metadata before persist/inject |
|
|
28
28
|
| `requireConsent` | no | Strict mode: recall/injection excludes entries lacking explicit consent |
|
|
29
29
|
|
|
30
|
-
Semantic indexing (entries carry
|
|
30
|
+
Semantic indexing (entries carry `MemoryConsent` source/visibility; unset defaults to `{ source: "user", scope: "thread", visible: true }`):
|
|
31
|
+
|
|
32
|
+
| `MemoryConsent` field | Meaning |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `source` | `"user"`, `"agent"`, or `"system"` provenance. |
|
|
35
|
+
| `scope` | `"thread"`, `"profile"`, or `"user"` control scope. |
|
|
36
|
+
| `visible` | `false` immediately excludes the record from recall, injection, export, and telemetry. |
|
|
37
|
+
| `grantedAt` / `revokedAt` | Optional host/audit timestamps; a revocation excludes the record. |
|
|
31
38
|
|
|
32
39
|
```ts
|
|
33
40
|
await memory.remember({ entries: [{ id, text, metadata?, consent?, sequence? }] }, { wait?: boolean })
|
|
@@ -46,6 +53,14 @@ await memory.setConsent(entryId, { visible?: boolean, source?, scope? }) // gran
|
|
|
46
53
|
await memory.correct(entryId, text) // re-embeds, preserves consent
|
|
47
54
|
await memory.forget({ ids? }) // real delete (whole thread if no ids)
|
|
48
55
|
await memory.applyRetention({ maxAgeDays?, maxEntries?, batchSize? }) // bounded real-delete sweep
|
|
56
|
+
|
|
57
|
+
const page = await memory.exportMemory({
|
|
58
|
+
identity: { tenantId, resourceId, threadId }, // exact host-verified owner
|
|
59
|
+
cursor?, limit?, maxBytes?, maxMs?, signal?,
|
|
60
|
+
}); // visible, explicitly consented, redacted records only
|
|
61
|
+
|
|
62
|
+
const rebuilt = await memory.rebuildIndex({ cursor?, batchSize?, maxMs?, signal? });
|
|
63
|
+
// re-embeds one page; save rebuilt.nextCursor and call again to resume
|
|
49
64
|
```
|
|
50
65
|
|
|
51
66
|
## Outputs / response / events
|
|
@@ -58,6 +73,8 @@ await memory.applyRetention({ maxAgeDays?, maxEntries?, batchSize? }) // bou
|
|
|
58
73
|
| `setConsent` / `correct` | Updated `MemoryVectorRecord` with stamped grant/revoke times |
|
|
59
74
|
| `forget` | Removed count (real delete) |
|
|
60
75
|
| `applyRetention` | `{ deleted, scanned }` bounded real-delete sweep |
|
|
76
|
+
| `exportMemory` | `{ entries, bytes, nextCursor? }` redacted, explicitly consented, identity-bound page |
|
|
77
|
+
| `rebuildIndex` | `{ rebuilt, nextCursor? }` re-embedded bounded page; caller owns resume scheduling |
|
|
61
78
|
| `createContextProvider()` | Inert `ContextProvider` blocks for working and/or semantic text |
|
|
62
79
|
| `createWorkingMemoryProcessor({ extract })` | Explicit host-invoked updater; never auto-runs |
|
|
63
80
|
|
|
@@ -144,7 +161,8 @@ const memory = createMemory({
|
|
|
144
161
|
- The working-memory processor is opt-in and host-invoked; middleware is not required.
|
|
145
162
|
- `createHashEmbedder()` is for tests/demos only; production hosts supply a real `Embedder`.
|
|
146
163
|
- Observational memory (`@arnilo/prism-compaction-observational-memory`) remains unchanged and composable.
|
|
147
|
-
- Consent is enforced at the single `recall()` gate, so both direct recall and `createContextProvider()` injection honor it; `visible: false` (or a revoked grant) keeps an entry out of prompts, events, exports, and telemetry. `setConsent`/`correct` re-upsert in place (consent change does not re-embed); `forget`/`applyRetention` are real deletes, not tombstones. Retention
|
|
164
|
+
- Consent is enforced at the single `recall()` gate, so both direct recall and `createContextProvider()` injection honor it; `visible: false` (or a revoked grant) keeps an entry out of prompts, events, exports, and telemetry. `setConsent`/`correct` re-upsert in place (consent change does not re-embed); `forget`/`applyRetention` are real deletes, not tombstones. Retention uses indexed oldest-first pages plus a scoped count, deleting one default-500/hard-5000 batch without reading a corpus into memory. The PostgreSQL adapter persists consent in a `consent JSONB` column added by `buildMemoryDdl`.
|
|
165
|
+
- `exportMemory()` requires an exact `{ tenantId, resourceId, threadId }` identity equal to its `createMemory()` scope. It excludes legacy consent-less, invisible, and revoked records even when normal recall allows legacy entries. It returns a stable sequence cursor page, redacted before response, with defaults/hard caps of 100/200 entries, 4/32 MiB, and 10/60 seconds. `rebuildIndex()` uses the same stable cursor shape to re-embed one 32/128-record page under a 10/60-second cap; save the cursor durably to resume. Both APIs require a store implementing bounded `listByThread()`; retention also requires `countByThread()`. PostgreSQL/pgvector and the in-memory reference adapter conform; SQLite persistence stores sessions, not semantic vectors.
|
|
148
166
|
- Profile bundles do not include this package yet.
|
|
149
167
|
|
|
150
168
|
Shared conformance:
|
|
@@ -167,7 +185,7 @@ await runMemoryConformance(() => ({
|
|
|
167
185
|
- Configure `secrets` / `redactor` so memory text and metadata cannot persist or inject raw canaries.
|
|
168
186
|
- Injected context is inert text — it cannot grant tools or permissions.
|
|
169
187
|
- Hard caps: top-K ≤ 32, messageRange ≤ 4, embed batch ≤ 128, injected tokens ≤ 8000, payload/working-memory byte limits enforced.
|
|
170
|
-
- Every embedding is a non-empty finite number vector. `embedBatched()`, in-memory `VectorStore` upserts/queries,
|
|
188
|
+
- Every embedding is a non-empty finite number vector. `embedBatched()`, in-memory `VectorStore` upserts/queries, PostgreSQL/pgvector parameters, and export/rebuild page boundaries reject NaN, ±Infinity, non-numbers, and wrong configured dimensions before similarity scoring, SQL, response, or re-indexing. Custom adapters can call `assertFiniteVector(vector, label, expectedLength?)` at their trust boundary.
|
|
171
189
|
- Default `remember()` does not block agent completion; pass `{ wait: true }` when indexing must finish first.
|
|
172
190
|
- PostgreSQL live suite is gated by `PRISM_TEST_POSTGRES_URL` and requires the `vector` extension.
|
|
173
191
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnilo/prism",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Agent harness for AI providers, agents, sessions, and tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"!dist/__tests__",
|
|
100
100
|
"!dist/**/*.map",
|
|
101
101
|
"docs",
|
|
102
|
+
"!docs/review-coverage-*",
|
|
102
103
|
"templates",
|
|
103
104
|
"CHANGELOG.md"
|
|
104
105
|
],
|
|
@@ -128,19 +129,26 @@
|
|
|
128
129
|
],
|
|
129
130
|
"scripts": {
|
|
130
131
|
"build:core": "tsc",
|
|
131
|
-
"
|
|
132
|
+
"clean": "rm -rf dist packages/*/dist",
|
|
133
|
+
"build": "npm run clean && npm run build:core && npm run build --workspaces --if-present",
|
|
132
134
|
"typecheck": "npm run build && npm run typecheck --workspaces --if-present && tsc -p examples --noEmit",
|
|
133
|
-
"test": "npm run build && node --test dist/__tests__/*.test.js && npm run test --workspaces --if-present",
|
|
135
|
+
"test": "npm run build && node --test dist/__tests__/*.test.js && node --test scripts/release-gate.test.mjs scripts/tooling-gate.test.mjs scripts/budget-gate.test.mjs && npm run test --workspaces --if-present",
|
|
136
|
+
"test:coverage": "node --test --experimental-test-coverage --test-coverage-lines=60 --test-coverage-functions=70 --test-coverage-branches=75 --test-coverage-exclude='**/__tests__/**' --test-coverage-exclude='**/node_modules/**' --test-coverage-exclude='**/scripts/**' dist/__tests__/*.test.js",
|
|
137
|
+
"lint": "biome lint .",
|
|
138
|
+
"format": "biome format --write .",
|
|
139
|
+
"format:check": "biome format .",
|
|
134
140
|
"pack:dry-run": "npm pack --dry-run && npm run pack:dry-run --workspaces --if-present",
|
|
135
141
|
"test:postgres": "npm run test:postgres --workspace @arnilo/prism-session-store-postgres && npm run test:postgres --workspace @arnilo/prism-memory",
|
|
136
142
|
"release:dry-run": "npm run sdk:ready",
|
|
137
143
|
"release:check": "node scripts/release.mjs check",
|
|
138
144
|
"release:publish": "node scripts/release.mjs publish",
|
|
139
|
-
"sdk:ready": "npm run typecheck && npm test && npm run pack:dry-run"
|
|
145
|
+
"sdk:ready": "npm run typecheck && npm run lint && npm run format:check && npm test && npm run test:coverage && npm run pack:dry-run && npm run release:gate",
|
|
146
|
+
"release:gate": "node scripts/release.mjs gate"
|
|
140
147
|
},
|
|
141
148
|
"devDependencies": {
|
|
142
|
-
"
|
|
143
|
-
"@types/node": "^26.1.1"
|
|
149
|
+
"@biomejs/biome": "^2.5.5",
|
|
150
|
+
"@types/node": "^26.1.1",
|
|
151
|
+
"typescript": "^7.0.2"
|
|
144
152
|
},
|
|
145
153
|
"engines": {
|
|
146
154
|
"node": ">=20"
|