@arnilo/prism 0.0.15 β 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 +11 -0
- package/dist/agent-definitions.js +2 -3
- package/dist/agent-loops.js +12 -7
- 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 +3 -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 +82 -83
- 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.js +3 -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/index.md +3 -1
- package/docs/migration.md +29 -0
- package/docs/performance.md +33 -0
- package/docs/public-contracts.md +1 -1
- package/docs/release-and-install.md +106 -17
- 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
- package/docs/review-coverage-2026-07-26-phase-10.md +0 -132
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# 0.1.0 / 1.0 Readiness Gates
|
|
2
|
+
|
|
3
|
+
Status: **0.0.16 is a 1.0 readiness review, not an automatic 1.0 release.**
|
|
4
|
+
This page distills the Phase 11 (0.0.16) gates into one command-per-gate table
|
|
5
|
+
so readiness is checkable, not prose. Every gate below is a runnable command
|
|
6
|
+
with last evidence captured on 2026-07-26 (release 0.0.16, Node v24.18.0,
|
|
7
|
+
Linux x86_64). The decision to cut 1.0 stays with the operator after the
|
|
8
|
+
operator-gated legs run in a protected environment and the Phase 12 demand
|
|
9
|
+
evidence exists.
|
|
10
|
+
|
|
11
|
+
Evidence trail: [`docs/review-coverage-2026-07-26-phase-11.md`](./review-coverage-2026-07-26-phase-11.md)
|
|
12
|
+
(addenda 0β9), [`docs/release-and-install.md`](./release-and-install.md),
|
|
13
|
+
[`docs/migration.md`](./migration.md), [`docs/performance.md`](./performance.md).
|
|
14
|
+
|
|
15
|
+
## Gate table
|
|
16
|
+
|
|
17
|
+
| Gate | Command | Last evidence (2026-07-26) | Owner |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| Full quality gate | `npm run sdk:ready` | RC=0: typecheck (+examples), lint 0, format clean, full test, coverage, pack, release:gate | CI |
|
|
20
|
+
| Exact version graph | `node scripts/release.mjs check --version <v>` | 0.0.16 pass: exact versions/ranges/lockfile/access + registry-collision check, 44 manifests | CI + operator |
|
|
21
|
+
| Frozen public API surface + compat gate | `node scripts/release.mjs gate` | 0 breaks / 0 errors vs 44 checked-in baselines (`scripts/compat-baseline/`); only additive delta is `resolveRedactor` | CI |
|
|
22
|
+
| Migration coverage 0.0.5β0.0.16 | `node --test dist/__tests__/docs.test.js` | 112/112; `docs/migration.md` has one section per release 0.0.5β0.0.16, each tripwired | Maintainer |
|
|
23
|
+
| Deterministic artifact budget | `node --test dist/__tests__/budget-gate.test.mjs` | root 579.2 kB / 2.1 MB / 270 files within +5% of baseline; startup 38 ms < 250 ms ceiling | CI (in `npm test`) |
|
|
24
|
+
| Performance benchmark medians | `node scripts/benchmark-0.0.16.mjs` | 6 network-free scenarios within Β±25%; 0 backpressure / 0 resource-limit signals | On-demand release evidence |
|
|
25
|
+
| Secret scan | `node scripts/scan-secrets.mjs` | 3095 files / 0 findings | CI |
|
|
26
|
+
| License / SBOM | `node scripts/verify-sbom.mjs` | 188 packages / 8 licenses, all allow-listed | CI |
|
|
27
|
+
| Dependency audit | `npm audit --audit-level=high` | rc=0 (2 moderate, 0 high) | CI |
|
|
28
|
+
| Whitespace hygiene | `git diff --check` | clean | CI |
|
|
29
|
+
| Publish order + tarball validation | `node scripts/release.mjs publish --version <v> --dry-run --allow-dirty --allow-untagged` | 44/44 packages `dry-run`, deterministic dependency order, no failures | Operator (dry-run), CI |
|
|
30
|
+
| Node 20 compatibility | CI `node20-compat` (build + public-import smoke) | all 21 root exports import cleanly on Node 20.20.2 | CI |
|
|
31
|
+
| PostgreSQL suite | `npm run test:postgres` | **operator-gated** (requires live PostgreSQL) | Operator |
|
|
32
|
+
| Keychain / live-provider suites | `npm run test:live` (protected) | **operator-gated** (requires credentials) | Operator |
|
|
33
|
+
| SAST | GitHub CodeQL | **operator-gated** (runs in CI workflow) | CI |
|
|
34
|
+
| Signed, provenance publication | `npm run release:publish` (clean tagged tree, OIDC) | **operator-gated** (see "Remaining for 1.0") | Operator |
|
|
35
|
+
|
|
36
|
+
## Frozen public API surface
|
|
37
|
+
|
|
38
|
+
The compat gate diffs every package's generated `.d.ts` export surface against
|
|
39
|
+
checked-in baselines in `scripts/compat-baseline/` (one file per package,
|
|
40
|
+
regenerated at 0.0.16). It fails on any **removed** export or changed
|
|
41
|
+
declaration; additive exports are allowed. `scripts/release-gates.mjs` also
|
|
42
|
+
enforces a tarball deny list (no `docs/review-coverage-*` in published
|
|
43
|
+
artifacts) and exact version-range drift. A genuine break requires
|
|
44
|
+
`--allow-break` **and** a `docs/migration.md` entry mentioning the version.
|
|
45
|
+
|
|
46
|
+
**Baseline maintenance:** `scripts/compat-baseline/` must stay committed.
|
|
47
|
+
Regenerate only after review with `node scripts/release.mjs gate --update-baseline`,
|
|
48
|
+
having first confirmed zero removed exports (the gate's order-sensitive
|
|
49
|
+
signatures can drift on a TypeScript bump without any real API change).
|
|
50
|
+
|
|
51
|
+
## Migration coverage 0.0.5 β 0.0.16
|
|
52
|
+
|
|
53
|
+
`docs/migration.md` carries one section per release from 0.0.5 through 0.0.16;
|
|
54
|
+
`docs.test.ts` tripwires each section heading and key phrase, so a missing or
|
|
55
|
+
gutted migration section fails the suite. 0.0.16's only user-facing change is
|
|
56
|
+
the additive `resolveRedactor` export (no breaking changes).
|
|
57
|
+
|
|
58
|
+
## Budget table
|
|
59
|
+
|
|
60
|
+
Deterministic budgets (CI gate, `scripts/budget-gate.test.mjs`):
|
|
61
|
+
|
|
62
|
+
| Metric | Baseline | Tolerance | 0.0.16 measured |
|
|
63
|
+
|---|---|---|---|
|
|
64
|
+
| Root packed bytes | 575,680 | +5% | 579.2 kB (within) |
|
|
65
|
+
| Root unpacked bytes | 2,043,402 | +5% | 2.1 MB (within) |
|
|
66
|
+
| Root file count | 270 | +5% | 270 |
|
|
67
|
+
| Cold-startup import | 38 ms | ceiling 250 ms | ~38 ms |
|
|
68
|
+
| Aggregate packed (44 manifests, reference only) | 1,217,694 | +10% | not gated in fast test |
|
|
69
|
+
|
|
70
|
+
Benchmark medians (on-demand evidence, `scripts/benchmark-0.0.16.mjs`, Β±25%):
|
|
71
|
+
|
|
72
|
+
| Scenario | throughput/s | p50 ms | p95 ms |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| openai-hosted-continuation | 5,386.0 | 0.1317 | 0.2907 |
|
|
75
|
+
| openai-realtime-envelope | 880.3 | 1.1293 | 1.2399 |
|
|
76
|
+
| ai-sdk-v4-stream-mapping | 22,403.0 | 0.0230 | 0.0734 |
|
|
77
|
+
| provider-package-metadata | 55,829.2 | 0.0065 | 0.0394 |
|
|
78
|
+
| rag-parse-replace-rerank-retrieve | 4,800.3 | 0.1432 | 0.4064 |
|
|
79
|
+
| memory-retention-export-rebuild | 8,763.2 | 0.0686 | 0.1892 |
|
|
80
|
+
|
|
81
|
+
Baselines are a 2026-07-26 snapshot (`scripts/budgets.json`); raise them only
|
|
82
|
+
after a deliberate reviewed performance change.
|
|
83
|
+
|
|
84
|
+
## Live-suite matrix (operator-gated)
|
|
85
|
+
|
|
86
|
+
| Suite | Command | Environment |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| PostgreSQL persistence | `npm run test:postgres` | live PostgreSQL |
|
|
89
|
+
| Keychain credentials | protected live suite | OS keychain |
|
|
90
|
+
| Provider live-canary (OpenAI/Anthropic/Google/Kimi/Ollama/β¦) | protected live-canary matrix | vendor credentials |
|
|
91
|
+
| RAG / memory / workflows live journeys | protected live-canary matrix | vendor + DB credentials |
|
|
92
|
+
|
|
93
|
+
These do not run on a contributor machine; their evidence is recorded in the
|
|
94
|
+
protected environment, never faked.
|
|
95
|
+
|
|
96
|
+
## Security matrix
|
|
97
|
+
|
|
98
|
+
| Control | Command / source | 0.0.16 status |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| Secret scan | `node scripts/scan-secrets.mjs` | 3095 files / 0 findings |
|
|
101
|
+
| License / SBOM | `node scripts/verify-sbom.mjs` | 188 packages / 8 licenses, allow-listed |
|
|
102
|
+
| Dependency audit | `npm audit --audit-level=high` | 0 high (2 moderate) |
|
|
103
|
+
| SAST | GitHub CodeQL workflow | CI-gated |
|
|
104
|
+
| Sandbox / protocol / tenant threat suites | `npm test` (coding-security, MCP, policy, guardrail suites) | green |
|
|
105
|
+
| Signed deterministic publication | `release.mjs publish` on clean tagged tree | operator-gated |
|
|
106
|
+
|
|
107
|
+
## Remaining for 1.0 (operator / protected environment)
|
|
108
|
+
|
|
109
|
+
Exact prerequisites that must be satisfied before cutting 1.0:
|
|
110
|
+
|
|
111
|
+
1. **Signed tag + commits:** create and sign `v0.1.0` (or `v1.0.0`) on a clean
|
|
112
|
+
tree; `release.mjs publish` refuses real publication with `--allow-dirty`
|
|
113
|
+
or `--allow-untagged`.
|
|
114
|
+
2. **npm authentication + OIDC provenance/attestation:** publish with
|
|
115
|
+
`--provenance` and `--access public` from the protected registry identity.
|
|
116
|
+
3. **Protected live-canary matrix green:** provider/RAG/memory/workflows live
|
|
117
|
+
journeys pass with real credentials.
|
|
118
|
+
4. **PostgreSQL + keychain protected suites green.**
|
|
119
|
+
5. **CodeQL SAST green** on the release commit.
|
|
120
|
+
6. **`scripts/compat-baseline/` committed** so CI's compat gate has a
|
|
121
|
+
checked-in baseline.
|
|
122
|
+
7. **Phase 12 demand evidence** (below) recorded for any capability that 1.0
|
|
123
|
+
is expected to anchor.
|
|
124
|
+
|
|
125
|
+
## Phase 12 demand-evidence entry criteria
|
|
126
|
+
|
|
127
|
+
Phase 12 (demand-gated 0.1.x) promotes no capability on comparison-table parity
|
|
128
|
+
alone. Each candidate must present, before it becomes a numbered plan:
|
|
129
|
+
|
|
130
|
+
- **Named user** (a concrete person/team who will use it),
|
|
131
|
+
- **Concrete integration** (the real system it connects to),
|
|
132
|
+
- **Operational owner** (who runs and pages for it),
|
|
133
|
+
- **Measurable acceptance criteria** (scale/cost/latency/storage budgets that
|
|
134
|
+
do not expand default core/install/runtime cost),
|
|
135
|
+
- then the pipeline: demand evidence β primitive review β threat model β
|
|
136
|
+
optional package/service β conformance β release gate.
|
|
137
|
+
|
|
138
|
+
The 0.0.16 readiness gates above are the stable API/compat/budget/security
|
|
139
|
+
floor that Phase 12 capabilities must consume and must not regress.
|
package/docs/index.md
CHANGED
|
@@ -117,7 +117,9 @@ Prism is a TypeScript/Node.js agent harness. Host apps and extension packages ow
|
|
|
117
117
|
- `examples/`: compile-checked typed examples and runnable mock demos (SDK basics, provider registration, auth, tools, [`examples/ag-ui-server.ts`](../examples/ag-ui-server.ts), [`examples/enterprise-identity.ts`](../examples/enterprise-identity.ts), [`examples/enterprise-policy-audit.ts`](../examples/enterprise-policy-audit.ts), [`examples/enterprise-work-connectors.ts`](../examples/enterprise-work-connectors.ts), [`examples/conversation-durable-replay.ts`](../examples/conversation-durable-replay.ts), [`examples/artifact-review-delivery.ts`](../examples/artifact-review-delivery.ts), [`examples/server-deployment-seams.ts`](../examples/server-deployment-seams.ts), cache-aware prompt assembly, NeuralWatt agent run ([`examples/neuralwatt-agent-run.ts`](../examples/neuralwatt-agent-run.ts)), [`examples/coding-compaction.ts`](../examples/coding-compaction.ts), stores/branching, structured-output/artifact-loop, CLI, RPC, workflow orchestration).
|
|
118
118
|
|
|
119
119
|
## Release and install
|
|
120
|
-
- [Release and install](release-and-install.md): current **0.0.
|
|
120
|
+
- [Release and install](release-and-install.md): current **0.0.16** 44-package graph (Phase 11 simplification/readiness; one internal codec package, no retirement), exact-peer/install/tarball rules, deterministic resumable publication and publish dry-run, pinned supply-chain gates, offline tests, the 0.0.15 provider/AI-SDK/RAG/memory protected live-canary matrix (still standing for 0.0.16), and sandbox-browser Docker/Playwright gates.
|
|
121
|
+
- [0.1.0 / 1.0 readiness gates](0.1.0-readiness.md): command-per-gate 1.0 readiness table β frozen API surface + compat gate, migration coverage 0.0.5β0.0.16, budget table, live-suite matrix, security matrix, the signed-publication/live-canary prerequisites remaining for 1.0, and the Phase 12 demand-evidence entry criteria.
|
|
122
|
+
- [Review coverage (2026-07-26 Phase 11)](review-coverage-2026-07-26-phase-11.md): Plan 079 evidence freeze β baseline size/startup/benchmark budgets, hotspot domain extraction table, confirmed duplication survivors (redactor/cleanJson/row-codecs/checkpoints/exec-runner/approval/ownership), profile adoption recommendations, and tarball artifact-diet findings for 0.0.16.
|
|
121
123
|
- [Review coverage (2026-07-26 Phase 10)](review-coverage-2026-07-26-phase-10.md): Plan 078 evidence freeze β OpenAI hosted tools/continuation/realtime, AI SDK version matrix, remaining provider metadata parity, RAG replaceSource/loaders/parsers/reranker/provenance/ingestion-status, memory export/rebuild/conformance, and 0.0.15 (43 β 43 manifests; no new package) release gates.
|
|
122
124
|
- [Review coverage (2026-07-25 Phase 9)](review-coverage-2026-07-25-phase-9.md): Plan 077 evidence freeze β conversation service, memory consent/lifecycle, artifact co-work review, AG-UI co-work events, scoped M365/GWS OAuth, browser checkpoint composition, and deny-by-default device contracts for 0.0.14 (41 β 43 manifests; only the two provider packages are new).
|
|
123
125
|
- [Review coverage (2026-07-23 Phase 8)](review-coverage-2026-07-23-phase-8.md): Plan 076 evidence freeze β enterprise identity/policy/router packages, Azure/Bedrock/Vertex adapters, server deployment seams, persistence lifecycle hooks, and M365/GWS work-connector bounds for 0.0.13.
|
package/docs/migration.md
CHANGED
|
@@ -7,6 +7,35 @@ Prism 0.0.6 preserves documented 0.0.3 agent construction except for two intenti
|
|
|
7
7
|
1. **`session.run()` / `session.prompt()` return `AgentRunResult`** and `session.stream()` starts one owned run after subscribing. Callers that ignored the previous `Promise<void>` keep working; failed/aborted runs reject with `AgentRunError` (`.result` attached).
|
|
8
8
|
2. **`AgentConfig.extensions` / `settings` / `credentials` are removed.** Wire extensions through `createExtensionKernel()`, read settings in the host, and pass credential resolvers to the provider edge.
|
|
9
9
|
|
|
10
|
+
## 0.0.15 β 0.0.16 simplification, shared survivors, and release gates (additive, pre-release)
|
|
11
|
+
|
|
12
|
+
Release **0.0.16** is a simplification/readiness release: no runtime behavior changes, no package retired, and the only public-surface change is one additive export plus one internal package. The published root tarball is smaller and the release now runs offline pre-publish gates. See [Phase 11 evidence](review-coverage-2026-07-26-phase-11.md).
|
|
13
|
+
|
|
14
|
+
### New shared export: `resolveRedactor` (additive)
|
|
15
|
+
|
|
16
|
+
`@arnilo/prism` now exports `resolveRedactor(redactor?, secrets?)` from `src/redaction.ts` β the single survivor of four private copies previously duplicated across `evals`, `memory`, `rag`, and `workflows`. Those packages now source it from core; no package previously exported it, so this is purely additive (added to the frozen value-export surface deliberately). Hosts that resolved a redactor by hand can use it directly:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { resolveRedactor } from "@arnilo/prism";
|
|
20
|
+
const redactor = resolveRedactor(undefined, [apiKey, process.env.SECRET]);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Provider JSON cleanup (`cleanJson`) was deliberately **not** consolidated: the nine provider copies are private one-liners with real wire-shape variants (neuralwatt/openrouter also strip `null`), so they remain per-package. Checkpoint codecs were already consolidated in `workflows/src/checkpoint-core.ts`, and the executable `spawn` sites stay per-domain because each encodes distinct security invariants.
|
|
24
|
+
|
|
25
|
+
### New internal package: `@arnilo/prism-session-store-codecs`
|
|
26
|
+
|
|
27
|
+
The two 409-line SQLite/Postgres row-mapper files (which differed only in the `redacted` boolean representation) were replaced by a shared `createSessionRowMappers<R>(codec)` factory in the new `@arnilo/prism-session-store-codecs` package (44th manifest). It is an internal implementation detail of the two session stores β not enrolled in `prism-all` or any profile family β so no install recipe or import changes for consumers.
|
|
28
|
+
|
|
29
|
+
Surface note: `@arnilo/prism-session-store-sqlite` and `@arnilo/prism-session-store-postgres` no longer re-export the individual row-mapper functions (`rowToSessionRecord`, `sessionEntryToRow`, `encodeEntryCursor`, `decodeEntryCursor`, `parentKey`, and the other `*ToRow`/`rowTo*` helpers). These were persistence internals; the supported entry points remain `createSqlitePersistence` / `createPostgresPersistence` and friends. If you imported a mapper directly, build the equivalent with `createSessionRowMappers(codec)` from `@arnilo/prism-session-store-codecs` (pass the SQLite INTEGER or Postgres BOOLEAN `redacted` codec).
|
|
30
|
+
|
|
31
|
+
### Profiles: all six retained (no migration)
|
|
32
|
+
|
|
33
|
+
Adoption evidence (manifest dependents + docs/examples) froze all six profiles β `prism-all`, `prism-base`, `prism-code`, `prism-compaction`, `prism-providers`, `prism-sdk` β as **retain**; zero retirements. Task 0's "compaction/base zero dependents" was a measurement error (profiles are manifest-only and never imported in `src`). The profiles form a layered DAG (`all β {code, sdk, providers}`, `code/sdk β base β compaction`). Install recipes are unchanged except a new standalone `prism-compaction` recipe in [release-and-install.md](release-and-install.md). No profile migration is needed.
|
|
34
|
+
|
|
35
|
+
### Smaller root tarball + offline release gates (no runtime impact)
|
|
36
|
+
|
|
37
|
+
The root package no longer ships the historical `docs/review-coverage-*.md` evidence (11 files, ~283 KB): the packed tarball dropped from 659,478 to β575,680 bytes (281 β 270 files). `npm run release:gate` now runs offline pre-publish gates (API-surface `.d.ts` diff vs `scripts/compat-baseline/`, tarball deny-list, exact version ranges) and is part of `npm run sdk:ready`. Performance budgets are recorded in `scripts/budgets.json` and enforced by `scripts/budget-gate.test.mjs` (in `npm test`) and `scripts/benchmark-0.0.16.mjs`; see [performance.md](performance.md). None of this changes SDK runtime behavior.
|
|
38
|
+
|
|
10
39
|
## 0.0.14 β 0.0.15 OpenAI hosted tools, continuation, and realtime (additive, pre-release)
|
|
11
40
|
|
|
12
41
|
`@arnilo/prism-provider-openai` now distinguishes server-executed calls with `authority: "provider-hosted"`; host dispatchers must not execute or reply to them. Incomplete Responses streams self-resume with an opaque `previous_response_id` cursor (at most 4 KiB, at most eight hops) and surface `continuation_required`; cap or duplicate-cursor failure now ends with a provider error instead of a silent partial response.
|
package/docs/performance.md
CHANGED
|
@@ -6,6 +6,39 @@ Evaluation defaults are finite: 100 trace rows Γ 20 pages and 4 MiB aggregate t
|
|
|
6
6
|
|
|
7
7
|
This page states Prism runtime limits that keep slow consumers and long sessions from becoming unbounded memory or latency problems.
|
|
8
8
|
|
|
9
|
+
## Release 0.0.16 performance budgets and artifact diet
|
|
10
|
+
|
|
11
|
+
Release 0.0.16 is a simplification/readiness release: it added no performance-affecting code, so the six network-free scenario medians are held at the 0.0.15 baseline and the win is a smaller published artifact. Budgets live in `scripts/budgets.json` (measured baselines + tolerance) and are enforced two ways:
|
|
12
|
+
|
|
13
|
+
- **Fast gate (every `npm test`)** β `scripts/budget-gate.test.mjs` re-packs the root tarball (`npm pack --dry-run --json`) and fails if packed bytes, unpacked bytes, or file count exceed baseline + 5%, and fails if cold-process `import('./dist/index.js')` exceeds the 250 ms sanity ceiling. Negative fixtures prove an inflated/regressed value fails.
|
|
14
|
+
- **Release evidence runner** β `node scripts/benchmark-0.0.16.mjs` re-measures root pack + startup, spawns `benchmark-0.0.15.mjs` for the six scenario medians (reused unchanged), compares every value to `budgets.json` (throughput floor / latency ceiling at Β±25%), prints the evidence report below, and exits non-zero on any regression.
|
|
15
|
+
|
|
16
|
+
**Artifact diet (the 0.0.16 finding).** The Task 1 tarball deny list dropped the historical `docs/review-coverage-*.md` (11 files, 283,022 bytes) from the root package: the root tarball went from **659,478 packed / 2,310,686 unpacked / 281 files** (0.0.15) to a budgeted **β575,680 packed / 2,043,402 unpacked / 270 files**. The per-release `scripts/benchmark-0.0.*.mjs` history never shipped in artifacts (root `files` is `dist`/`docs`/`templates`/`CHANGELOG.md` only β zero `scripts/` entries packed), so no archive move was needed; `benchmark-0.0.16.mjs` consolidates the current evidence behind one budget-gating runner.
|
|
17
|
+
|
|
18
|
+
**Recorded budgets (`scripts/budgets.json`, measured 2026-07-26, Node v24.18.0, Linux x86_64):**
|
|
19
|
+
|
|
20
|
+
| Budget | Baseline | Tolerance |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| Root packed bytes | 575,680 | +5% |
|
|
23
|
+
| Root unpacked bytes | 2,043,402 | +5% |
|
|
24
|
+
| Root file count | 270 | +5% |
|
|
25
|
+
| Aggregate packed bytes (44 manifests, reference only) | 1,217,694 | +10% |
|
|
26
|
+
| Startup `import('./dist/index.js')` | ~38 ms | ceiling 250 ms |
|
|
27
|
+
| Six scenario medians (below) | 0.0.15 baseline | Β±25% |
|
|
28
|
+
|
|
29
|
+
**0.0.16 measured evidence** (`node scripts/benchmark-0.0.16.mjs`, 100 iterations each, network-free, 0 backpressure / 0 resource-limit signals; all 22 budget checks passed):
|
|
30
|
+
|
|
31
|
+
| Scenario | throughput/s | p50 ms | p95 ms |
|
|
32
|
+
| --- | --- | --- | --- |
|
|
33
|
+
| openai-hosted-continuation | 5,514.9 | 0.1305 | 0.2735 |
|
|
34
|
+
| openai-realtime-envelope | 900.5 | 1.1277 | 1.2002 |
|
|
35
|
+
| ai-sdk-v4-stream-mapping | 23,850.4 | 0.0225 | 0.0795 |
|
|
36
|
+
| provider-package-metadata | 54,097.0 | 0.0066 | 0.0386 |
|
|
37
|
+
| rag-parse-replace-rerank-retrieve | 5,176.6 | 0.1428 | 0.3671 |
|
|
38
|
+
| memory-retention-export-rebuild | 13,952.1 | 0.0470 | 0.1339 |
|
|
39
|
+
|
|
40
|
+
Root startup measured β37.7 ms (ceiling 250 ms). Timing is machine-dependent, so medians carry a wide Β±25% band and are release evidence rather than tight cross-machine guarantees; the deterministic artifact-size gate is the hard CI tripwire. Raise the baselines in `scripts/budgets.json` after a deliberate, reviewed performance change.
|
|
41
|
+
|
|
9
42
|
## Release 0.0.15 provider, RAG, and memory evidence
|
|
10
43
|
|
|
11
44
|
Run `node scripts/benchmark-0.0.15.mjs`; `PRISM_BENCH_ITERATIONS` accepts 10β100,000 (default 100). Schema/bounds test: `node --test scripts/benchmark-0.0.15.test.mjs`. Default mode is network-free: fake Responses SSE/WebSocket transports, a fake AI SDK v4 model, zero-fetch provider-package registration, hash embeddings, in-memory RAG replacement/reranking/retrieval/status, and in-memory memory retention/export/rebuild.
|
package/docs/public-contracts.md
CHANGED
|
@@ -463,4 +463,4 @@ void credentials;
|
|
|
463
463
|
- `@arnilo/prism/providers/transport`: bounded SSE/event parsing, bounded HTTP error-body reads, and JSON-object tool-argument parsing for provider packages.
|
|
464
464
|
- `@arnilo/prism/providers/openai`: OpenAI Chat Completions message/tool serialization, usage mapping, and indexed message validation helpers.
|
|
465
465
|
|
|
466
|
-
Phase 10 public helpers include `createStaticSettingsProvider`, `createChainedSettingsProvider`, `createMemoryCredentialStore`, `createChainedCredentialResolver`, `createStaticTrustPolicy`, `assertTrusted`, `createStaticPermissionPolicy`, `assertPermission`, and `createSecretRedactor`. Phase 11 auth/request/prompt helpers include `createExplicitCredentialResolver`, `createEnvCredentialResolver`, `refreshOAuthCredential`, `createProviderRequestPolicyChain`, `createSessionCachePolicy`, `mergeProviderRequestOptions`, `composeSystemPrompt`, and `mergeSystemPromptConfig`;
|
|
466
|
+
Phase 10 public helpers include `createStaticSettingsProvider`, `createChainedSettingsProvider`, `createMemoryCredentialStore`, `createChainedCredentialResolver`, `createStaticTrustPolicy`, `assertTrusted`, `createStaticPermissionPolicy`, `assertPermission`, and `createSecretRedactor`. Phase 11 auth/request/prompt helpers include `createExplicitCredentialResolver`, `createEnvCredentialResolver`, `refreshOAuthCredential`, `createProviderRequestPolicyChain`, `createSessionCachePolicy`, `mergeProviderRequestOptions`, `composeSystemPrompt`, and `mergeSystemPromptConfig`; 0.0.16 adds `resolveRedactor(redactor?, secrets?)`, which resolves the active redactor from an explicit redactor plus known secret values (the single survivor of the former per-package copies). They do not read env vars, persist OAuth tokens, create cache stores, discover prompt files, or load packages unless the host supplies that behavior. `@arnilo/prism/testing/provider-conformance` exports network-free provider assertion helpers. Node subpaths `@arnilo/prism/node/settings` and `@arnilo/prism/node/trust` are explicit filesystem/path helpers.
|
|
@@ -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.15` 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,34 @@ 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
|
+
|
|
198
227
|
### 0.0.15 protected live-canary matrix
|
|
199
228
|
|
|
200
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.
|
|
@@ -219,7 +248,7 @@ The scheduled/manual `live-canaries` workflow uses protected environment `live-c
|
|
|
219
248
|
|
|
220
249
|
### 0.0.15 publish handoff
|
|
221
250
|
|
|
222
|
-
**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. Protected CI, signed tag, npm authentication, OIDC attestation, and protected live-canary evidence remain operator/workflow prerequisites; no package is published by this handoff.
|
|
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.
|
|
223
252
|
|
|
224
253
|
```bash
|
|
225
254
|
git diff --check
|
|
@@ -304,6 +333,7 @@ Package set (43):
|
|
|
304
333
|
@arnilo/prism-provider-zai
|
|
305
334
|
@arnilo/prism-rag
|
|
306
335
|
@arnilo/prism-server
|
|
336
|
+
@arnilo/prism-session-store-codecs
|
|
307
337
|
@arnilo/prism-session-store-postgres
|
|
308
338
|
@arnilo/prism-session-store-sqlite
|
|
309
339
|
@arnilo/prism-supervisor
|
|
@@ -721,7 +751,7 @@ npm publication is not transactional and published versions are immutable. Parti
|
|
|
721
751
|
|
|
722
752
|
## Extension and configuration notes
|
|
723
753
|
|
|
724
|
-
- **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.
|
|
725
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.
|
|
726
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).
|
|
727
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`.
|
|
@@ -782,9 +812,56 @@ A deleted tracked feature-request markdown was intentionally not restored by rel
|
|
|
782
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. |
|
|
783
813
|
|
|
784
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
|
+
|
|
785
862
|
## Release checklist
|
|
786
863
|
|
|
787
|
-
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.
|
|
788
865
|
|
|
789
866
|
| Gate | Enforcement |
|
|
790
867
|
| --- | --- |
|
|
@@ -797,12 +874,24 @@ Every release gate maps to an exact enforcement test or command, so the checklis
|
|
|
797
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. |
|
|
798
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. |
|
|
799
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`. |
|
|
800
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. |
|
|
801
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). |
|
|
802
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). |
|
|
803
882
|
|
|
804
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.
|
|
805
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
|
+
|
|
806
895
|
## Related APIs
|
|
807
896
|
|
|
808
897
|
- [`docs/provider-packages.md`](provider-packages.md): first-party provider package layout and setup.
|
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"
|