@arnilo/prism 0.3.0 → 0.3.2
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 +68 -0
- package/README.md +3 -1
- package/dist/agent-definitions.js +4 -1
- package/dist/agent-loops.js +45 -8
- package/dist/agent-session/helpers.js +2 -2
- package/dist/cache-helpers.d.ts +11 -0
- package/dist/cache-helpers.js +29 -5
- package/dist/cli-provider-add.js +2 -1
- package/dist/context-budget.js +9 -6
- package/dist/contracts-core/agent.d.ts +25 -2
- package/dist/contracts-core/provider.d.ts +2 -0
- package/dist/event-multiplexer.js +0 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +5 -3
- package/dist/input.js +19 -11
- package/dist/node/session-store-jsonl.js +7 -3
- package/dist/providers/openai-compatible.js +2 -1
- package/dist/providers/openai-primitives.js +2 -1
- package/dist/providers/schema.d.ts +7 -0
- package/dist/providers/schema.js +25 -0
- package/dist/rpc.d.ts +4 -1
- package/dist/rpc.js +5 -1
- package/dist/testing/provider-conformance.d.ts +10 -0
- package/dist/testing/provider-conformance.js +37 -0
- package/dist/trim-trailing-slashes.d.ts +8 -0
- package/dist/trim-trailing-slashes.js +14 -0
- package/docs/0.1.0-readiness.md +1 -1
- package/docs/acp.md +1 -0
- package/docs/ag-ui.md +1 -0
- package/docs/agent-definitions.md +1 -1
- package/docs/agent-loops.md +3 -0
- package/docs/agent-session-runtime.md +1 -0
- package/docs/browser-automation.md +1 -0
- package/docs/coding-agent-tools.md +7 -1
- package/docs/compaction-and-retry.md +3 -0
- package/docs/compaction-observational-memory.md +47 -0
- package/docs/database-persistence.md +1 -1
- package/docs/extension-authoring.md +42 -0
- package/docs/graft.md +125 -0
- package/docs/host-security.md +3 -1
- package/docs/index.md +15 -13
- package/docs/input-and-prompt-assembly.md +11 -6
- package/docs/instruction-injection.md +1 -1
- package/docs/mcp-tools.md +1 -0
- package/docs/migration.md +10 -0
- package/docs/node-jsonl-session-store.md +1 -1
- package/docs/obscura.md +175 -0
- package/docs/observability.md +21 -1
- package/docs/performance.md +58 -4
- package/docs/ponytail.md +1 -1
- package/docs/provider-caching.md +13 -11
- package/docs/provider-conformance.md +6 -0
- package/docs/provider-packages.md +1 -1
- package/docs/provider-primitives.md +15 -2
- package/docs/providers/ai-sdk.md +1 -1
- package/docs/providers/anthropic.md +1 -1
- package/docs/providers/azure.md +1 -0
- package/docs/providers/bedrock.md +1 -0
- package/docs/providers/kimi.md +2 -1
- package/docs/providers/openai.md +19 -7
- package/docs/providers/opencode-go.md +3 -1
- package/docs/providers/openrouter.md +4 -3
- package/docs/providers/vertex.md +1 -0
- package/docs/public-contracts.md +3 -2
- package/docs/rag.md +55 -8
- package/docs/release-and-install.md +63 -7
- package/docs/server.md +1 -0
- package/docs/supervisors.md +10 -2
- package/docs/system-prompts.md +1 -1
- package/docs/tools.md +1 -1
- package/docs/web-tools.md +2 -0
- package/docs/wiki.md +154 -0
- package/docs/workflows.md +38 -4
- package/docs/working-and-semantic-memory.md +20 -0
- package/package.json +12 -5
- package/docs/api-page-template.md +0 -32
- package/docs/release-0.2.7-evidence.md +0 -514
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## What it does
|
|
4
4
|
|
|
5
|
-
Prism's current **0.3.
|
|
5
|
+
Prism's current **0.3.2** line has **60 publishable manifests**: the root `@arnilo/prism` core package plus **59 workspace packages** — 17 provider adapters, 10 `prism-*` family/profile packages, and 32 capability packages. (Generated by `node scripts/package-truth.mjs` → `scripts/package-truth.json` — the manifest-derived single source for counts, provider membership, umbrella closures, and profile closures.) The last lockstep cut was 0.3.0; Decision B now publishes changed packages independently inside `^0.3.0` — the plan 039 changed-package cut moved root `@arnilo/prism` and every plan-035+ changed package to **0.3.1** (obscura joined at its reviewed initial 0.3.0), and the plan 050 changed-package cut moved root plus four changed packages to **0.3.2**; independent publication continues inside `^0.3.0` ranges (which satisfy 0.3.1 and 0.3.2). This page describes how they are packed, what each tarball contains, how to install them, the required `@arnilo/prism` peer range, 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
|
-
Core `@arnilo/prism` ships runtime, CLI, templates, and docs. Every code package has a required `@arnilo/prism
|
|
7
|
+
Core `@arnilo/prism` ships runtime, CLI, templates, and docs. Every code package has a required `@arnilo/prism` peer inside the Decision B window — packages republishing in the plan 050 cut carry `^0.3.2`; the plan 039 set keeps `^0.3.1`; unchanged packages keep their `^0.3.0` peer (all satisfy `@arnilo/prism@0.3.2`); profiles are pure manifests. The plan 050 republished set declares the required `@arnilo/prism@^0.3.2` peer; unchanged packages keep their prior window. Installation activates no provider, listener, database, browser, credential, or tool capability.
|
|
8
8
|
|
|
9
|
-
Current **
|
|
9
|
+
Current **58** publishable manifests (root + 57 workspace packages):
|
|
10
10
|
|
|
11
11
|
`@arnilo/prism`, `@arnilo/prism-ag-ui`, `@arnilo/prism-browser`, `@arnilo/prism-coding-agent`, `@arnilo/prism-coding-security`, `@arnilo/prism-compaction-llm`
|
|
12
12
|
`@arnilo/prism-compaction-observational-memory`, `@arnilo/prism-credentials-node`, `@arnilo/prism-enterprise-postgres`, `@arnilo/prism-evals`, `@arnilo/prism-mcp`, `@arnilo/prism-memory`
|
|
@@ -15,7 +15,7 @@ Current **57** publishable manifests (root + 56 workspace packages):
|
|
|
15
15
|
`@arnilo/prism-provider-alibaba`, `@arnilo/prism-provider-anthropic`, `@arnilo/prism-provider-azure`, `@arnilo/prism-provider-bedrock`, `@arnilo/prism-provider-google`, `@arnilo/prism-provider-kimi`
|
|
16
16
|
`@arnilo/prism-provider-neuralwatt`, `@arnilo/prism-provider-ollama`, `@arnilo/prism-provider-openai`, `@arnilo/prism-provider-opencode-go`, `@arnilo/prism-provider-openrouter`, `@arnilo/prism-provider-vertex`
|
|
17
17
|
`@arnilo/prism-provider-clinepass`, `@arnilo/prism-provider-deepseek`, `@arnilo/prism-provider-xai`, `@arnilo/prism-provider-zai`, `@arnilo/prism-rag`, `@arnilo/prism-server`, `@arnilo/prism-session-store-codecs`, `@arnilo/prism-session-store-nats`, `@arnilo/prism-session-store-postgres`, `@arnilo/prism-session-store-sqlite`
|
|
18
|
-
`@arnilo/prism-openapi-tools`, `@arnilo/prism-supervisor`, `@arnilo/prism-tool-validator-json-schema`, `@arnilo/prism-web-tools`, `@arnilo/prism-work-tools`, `@arnilo/prism-workflows`, `@arnilo/prism-document-reader`, `@arnilo/prism-computer-use-linux`, `@arnilo/prism-antigravity-agent`
|
|
18
|
+
`@arnilo/prism-openapi-tools`, `@arnilo/prism-supervisor`, `@arnilo/prism-tool-validator-json-schema`, `@arnilo/prism-web-tools`, `@arnilo/prism-wiki`, `@arnilo/prism-work-tools`, `@arnilo/prism-workflows`, `@arnilo/prism-document-reader`, `@arnilo/prism-computer-use-linux`, `@arnilo/prism-antigravity-agent`, `@arnilo/prism-graft`, `@arnilo/prism-obscura`
|
|
19
19
|
|
|
20
20
|
Core ships `dist`, docs, templates, and `CHANGELOG.md`; code packages ship compiled output, README, license, and changelog. Family/profile packages ship manifest, README, and changelog. `@arnilo/prism-providers` includes all fourteen `@arnilo/prism-provider-*` packages in its family (Azure/Bedrock/Vertex stay on `@arnilo/prism-all`).
|
|
21
21
|
|
|
@@ -41,6 +41,7 @@ Consumers install the core package for the runtime and add first-party packages
|
|
|
41
41
|
| 0.0.12 AG-UI (after release) | `npm install @arnilo/prism@0.0.12 @arnilo/prism-ag-ui@0.0.12` |
|
|
42
42
|
| Install bounded web research tools | `npm install @arnilo/prism @arnilo/prism-web-tools @arnilo/prism-tool-validator-json-schema` |
|
|
43
43
|
| Install browser automation tools | `npm install @arnilo/prism @arnilo/prism-browser playwright-core@1.61.0` |
|
|
44
|
+
| Install Obscura browser-engine tools (host supplies the binary) | `npm install @arnilo/prism @arnilo/prism-obscura` |
|
|
44
45
|
| Build everything (core + workspaces) | `npm run build` |
|
|
45
46
|
| Delete all build output (explicit one-shot, see build notes) | `npm run clean` |
|
|
46
47
|
| Run the default (network-free) test suite | `npm test` |
|
|
@@ -63,6 +64,7 @@ Run `npm run clean` explicitly after deleting source files or switching branches
|
|
|
63
64
|
| `@arnilo/prism/providers/openai-compatible` | `dist/providers/openai-compatible.{js,d.ts}` |
|
|
64
65
|
| `@arnilo/prism/providers/transport` | `dist/providers/transport.{js,d.ts}` |
|
|
65
66
|
| `@arnilo/prism/providers/openai` | `dist/providers/openai-primitives.{js,d.ts}` |
|
|
67
|
+
| `@arnilo/prism/providers/schema` | `dist/providers/schema.{js,d.ts}` |
|
|
66
68
|
| `@arnilo/prism/providers/media` | `dist/providers/media.{js,d.ts}` |
|
|
67
69
|
| `@arnilo/prism/testing/provider-conformance` | `dist/testing/provider-conformance.{js,d.ts}` |
|
|
68
70
|
| `@arnilo/prism/testing/agent-event-source-conformance` | `dist/testing/agent-event-source-conformance.{js,d.ts}` |
|
|
@@ -92,7 +94,7 @@ A packed tarball contains only public compiled output and release files:
|
|
|
92
94
|
- Code packages ship `README.md`, `LICENSE`, and `CHANGELOG.md`; family/profile packages ship `README.md` and `CHANGELOG.md`.
|
|
93
95
|
- The core tarball additionally ships the full `docs/` directory (the docs hub) and `templates/init/` used by `prism init`.
|
|
94
96
|
- `dist/cli.js` and the `bin` link in core.
|
|
95
|
-
- **Tarball filenames.** npm strips the `@scope/` prefix, so the core package `@arnilo/prism` produces a tarball named `arnilo-prism-0.3.
|
|
97
|
+
- **Tarball filenames.** npm strips the `@scope/` prefix, so the core package `@arnilo/prism` produces a tarball named `arnilo-prism-0.3.2.tgz`; first-party packages produce `arnilo-prism-provider-<name>-0.3.1.tgz` / `arnilo-prism-compaction-<name>-0.3.1.tgz` / `arnilo-prism-coding-agent-0.3.2.tgz`; family/profile packages produce `arnilo-prism-{providers,compaction,base,code,sdk,all}-0.3.1.tgz`; independent Decision B tags (e.g. `@arnilo/prism-obscura@0.3.0`, the 0.3.1 RAG engine patch) carry their own package version. Later independent package tags carry their own package version. 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).
|
|
96
98
|
|
|
97
99
|
Excluded from every tarball by `files` negation:
|
|
98
100
|
|
|
@@ -365,6 +367,59 @@ For a later coding-agent-only patch, bump its manifest with `bump --package @arn
|
|
|
365
367
|
|
|
366
368
|
**Rollback notes.** Before publication, restore the 0.2.9 manifests/tag. After publication, roll forward with an additive 0.3.x package patch; npm unpublish is not a rollback strategy.
|
|
367
369
|
|
|
370
|
+
### 0.3.1 independent RAG engine patch (plan 034 Task 12)
|
|
371
|
+
|
|
372
|
+
**Decision: GO when the operator prerequisites below are recorded.** Release **0.3.1** is the first Decision B independent patch: only `@arnilo/prism-memory`, `@arnilo/prism-rag`, and `@arnilo/prism-observability-opentelemetry` move `0.3.0 → 0.3.1`. Internal `^0.3.0` ranges stay. Root current line remains **0.3.0**.
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
node scripts/release.mjs bump --package @arnilo/prism-memory --type patch
|
|
376
|
+
node scripts/release.mjs bump --package @arnilo/prism-rag --type patch
|
|
377
|
+
node scripts/release.mjs bump --package @arnilo/prism-observability-opentelemetry --type patch
|
|
378
|
+
node scripts/release.mjs gate --update-baseline --skip-tarball # review Embedder.id; scanner is additive-only
|
|
379
|
+
node scripts/release.mjs check --allow-dirty --allow-untagged
|
|
380
|
+
# publish tags (operator handoff; not this task):
|
|
381
|
+
# git tag @arnilo/prism-memory@0.3.1 && git tag @arnilo/prism-rag@0.3.1
|
|
382
|
+
# git tag @arnilo/prism-observability-opentelemetry@0.3.1 && git push --tags
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**Compat.** Baselines regenerated with `--update-baseline`. Expected deltas are additive exports (`createPostgresVectorStore`, `createTeiReranker`, `createRagTelemetry`, multi-scope `scopes`, `HARD_RETRIEVE_SCOPE_CAP`, fusion/hash/generation helpers). `Embedder.id` is a TypeScript implementer break documented in `docs/migration.md` `0.3.0 → 0.3.1`; the name-level scanner does not see interface members, so `--allow-break` is not required. `RagProvenance` gained `tenantId`/`resourceId`/`corpusId` (additive interface members, invisible to scanner). **Store:** additive Postgres DDL; 0.3.0 rows remain readable. **Rollback:** restore the 0.3.0 package versions. Publication remains the operator handoff — this task does not publish.
|
|
386
|
+
|
|
387
|
+
### 0.3.1 changed-package cut (plan 039 Task 8)
|
|
388
|
+
|
|
389
|
+
**Decision: GO when the operator prerequisites below are recorded.** The plan 039 cut is the first Decision B **root** patch: the baseline is the plan 035 completion parent `c600eaa`; 30 packages publish in dependency order — root `@arnilo/prism` plus 27 changed workspace packages move to **0.3.1** (`@arnilo/prism-rag` moves 0.3.1 → 0.3.2), and `@arnilo/prism-obscura` publishes new at its reviewed initial **0.3.0**. Every unchanged package stays byte-identical (peers keep the `^0.3.0` window; republished packages carry `^0.3.1` root peers — both satisfy the root). Additive-only compat (version literal + plan 036/037 additive exports + the obscura CDP/browser surface; baselines regenerated with `--update-baseline`, no `--allow-break`, no migration).
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
node scripts/release.mjs changed --baseline c600eaa18f65b56764ec2fb408ec813536eff6f7 # 30 packages
|
|
393
|
+
# per-package: node scripts/release.mjs bump --package <name> --type patch (applied by plan 039 task 8)
|
|
394
|
+
node scripts/release.mjs gate --update-baseline --skip-tarball
|
|
395
|
+
node scripts/release.mjs check --independent --baseline c600eaa18f65b56764ec2fb408ec813536eff6f7
|
|
396
|
+
node scripts/release.mjs publish --independent --baseline c600eaa18f65b56764ec2fb408ec813536eff6f7 --dry-run
|
|
397
|
+
# publish tags (operator handoff; not this task): push the 30 annotated
|
|
398
|
+
# `<name>@<version>` package tags (e.g. @arnilo/prism@0.3.1,
|
|
399
|
+
# @arnilo/prism-obscura@0.3.0, @arnilo/prism-rag@0.3.2) — release.yml's publish
|
|
400
|
+
# job runs deterministic release:publish in dependency order with OIDC provenance.
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Compat.** Baselines regenerated (`--update-baseline`): version literal, obscura `connectObscuraCdp`/`createObscuraWebTools` types, plan 036/037 additive exports. **Rollback:** restore the pre-cut manifests/tags. Publication remains the operator handoff — this task does not publish.
|
|
404
|
+
|
|
405
|
+
### 0.3.2 changed-package cut (plan 050 Task 12)
|
|
406
|
+
|
|
407
|
+
**Decision: GO when the operator prerequisites below are recorded.** The plan 050 cut covers the clay-integration-findings remediation and the OKF wiki adoption: baseline `edb4fcf` (the parent of the plan 050 implementation work); five packages publish in dependency order — root `@arnilo/prism` (FEATURE-1 agent-definition model override fallback, FEATURE-3 command driver hooks, FEATURE-2/6 docs+example, DOCS-1 contracts), `@arnilo/prism-coding-agent` (BUG-1 `allowCustom` default + optional `toolCallId`), `@arnilo/prism-supervisor` (BUG-2 child-factory `Agent` guard, FEATURE-4 opt-in child event passthrough), `@arnilo/prism-wiki` (OKF v0.2 bundle emission, 0.0.2 → 0.0.3), and `@arnilo/prism-acp-agent` (sqlite `:memory:` pass-through fix, 0.0.x-style patch 0.3.1 → 0.3.2). Every unchanged package stays byte-identical; docs-only packages (`@arnilo/prism-workflows`, `@arnilo/prism-compaction-observational-memory`) do not bump. Republished packages carry `^0.3.2` root peers; unchanged packages keep their window peers. Docs-only change on the root: none of the deltas are breaking (additive fields and fail-closed guards), compat additive-only, no migration.
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
node scripts/release.mjs changed --baseline edb4fcf # 5 packages
|
|
411
|
+
# per-package: node scripts/release.mjs bump --package <name> --type patch (regenerates the lockfile)
|
|
412
|
+
npm run sdk:ready # blocked only by the protected PRISM_TEST_POSTGRES_URL row (pre-existing)
|
|
413
|
+
node scripts/release.mjs check --independent --baseline edb4fcf --allow-dirty --allow-untagged
|
|
414
|
+
node scripts/release.mjs publish --independent --baseline edb4fcf --dry-run
|
|
415
|
+
# publish tags (operator handoff; not this task): push the 5 annotated
|
|
416
|
+
# `<name>@<version>` package tags (e.g. @arnilo/prism@0.3.2,
|
|
417
|
+
# @arnilo/prism-wiki@0.0.3) — release.yml's publish job runs deterministic
|
|
418
|
+
# release:publish in dependency order with OIDC provenance.
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Rollback:** restore the pre-cut manifests/tags. No persisted shape changed (BUG-1/BUG-2 guards and the acp-agent `:memory:` fix are fail-closed tightenings). Publication remains the operator handoff — this task does not publish.
|
|
422
|
+
|
|
368
423
|
### 0.2.9 publish handoff (plan 029 Task 10)
|
|
369
424
|
|
|
370
425
|
**Decision: GO when the operator prerequisites below are recorded.** Release **0.2.9** (plan 029) is the provider-adoption and behavior-packages cut on the 0.2.x review-remediation line. API surface **additive-only** (plain reviewed compat gate at 0.2.9: expected deltas are the version literal plus the new provider/OAuth/impeccable exports and the form-urlencoded `pollDeviceCodeToken` options; zero removals; baselines regenerated with `--update-baseline`, no `--allow-break`). Ships `@arnilo/prism-provider-deepseek`, `@arnilo/prism-provider-xai` (API key + SuperGrok RFC 8628), `@arnilo/prism-provider-clinepass`, and `@arnilo/prism-impeccable`. Ponytail peer `^4.9.0` (bare `/ponytail` reports status). Caveman registers extra `SKILL.md`. SuperGrok is host-invoked; Cline WorkOS, DeepSeek `/anthropic`, grok-cli file scan, harness/Cordis/Muse, Caveman 2 engine, and Impeccable live detector stay out. Release graph is **55** publishable manifests at exact **0.2.9** (root + 54 workspace). Store compatibility with 0.2.8: **compatible, no migration**.
|
|
@@ -876,8 +931,9 @@ Audit fixes, dependency updates, and security patches land only for the supporte
|
|
|
876
931
|
|
|
877
932
|
## Extension and configuration notes
|
|
878
933
|
|
|
879
|
-
- **Required `@arnilo/prism` peer.** Every first-party code package declares a non-optional **caret** `@arnilo/prism@^0.3.0` peer (`peerDependenciesMeta` must not mark `@arnilo/prism` optional; other peers such as `playwright-core` may be optional). **Peer-version policy (plan 030, Decision B — independent packages):** internal ranges stay inside the 0.x `^0.3.0` window, so a package may patch independently while consumers remain on a compatible 0.3.x line. A package outside that window (for example `0.4.0`) is refused by the release gate until the next coordinated peer bump. 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.
|
|
934
|
+
- **Required `@arnilo/prism` peer.** Every first-party code package declares a non-optional **caret** `@arnilo/prism@^0.3.2` peer (plan 050 republished set; the plan 039 set keeps `^0.3.1` and unchanged packages keep the prior `^0.3.0` window peer — all satisfy the root) (`peerDependenciesMeta` must not mark `@arnilo/prism` optional; other peers such as `playwright-core` may be optional). **Peer-version policy (plan 030, Decision B — independent packages):** internal ranges stay inside the 0.x `^0.3.0` window, so a package may patch independently while consumers remain on a compatible 0.3.x line. A package outside that window (for example `0.4.0`) is refused by the release gate until the next coordinated peer bump. 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.
|
|
880
935
|
- **Public access.** All 56 manifests (root + 55 workspace packages: 49 code packages + 6 pure-manifest family/profile packages — the 10 `prism-*` family/profile set is the 6 pure-manifest profiles plus the 4 code packages `prism-caveman`, `prism-impeccable`, `prism-openapi-tools`, `prism-ponytail`) declare `"publishConfig": { "access": "public" }`; the publisher also passes `--access public` explicitly because scoped packages otherwise default to restricted on first publish.
|
|
936
|
+
- **Shipped vs repository docs.** The npm tarball ships `docs/` pages linked from `docs/index.md` (public API, security, migration, providers, install). It excludes `docs/_evidence/` (per-phase evidence freezes, including `release-0.2.7-evidence.md`), `docs/release-*-evidence.md`, and `docs/api-page-template.md`. Those files remain in git for audit. `dist/__tests__` and `*.map` stay excluded.
|
|
881
937
|
- **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).
|
|
882
938
|
- **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. `publish` runs on `v0.3.0` for the one lockstep cut and on `@arnilo/*@*` package tags afterward; it needs all five gates, preserves clean tagged/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`.
|
|
883
939
|
- **Adding a package.** New workspace packages are picked up automatically by `npm run build --workspaces`, `npm test --workspaces`, `npm run pack:dry-run`, the packaging guard (`src/__tests__/packaging.test.ts`), and the install-smoke test (`src/__tests__/install-smoke.test.ts`) via the workspace glob; add the package to both tests' config arrays for explicit per-package assertions.
|
|
@@ -1051,7 +1107,7 @@ Every release gate maps to an exact enforcement test or command, so the checklis
|
|
|
1051
1107
|
| Root SDK export surface freeze | `public-export-contract.test.ts` `root export surface is frozen` snapshots every value and type export of `src/index.ts` (107 value + 69 type) so any add/remove is a deliberate test update; `every frozen value export resolves at runtime` rebuilds `dist/index.js` and asserts each value export is present (catches build drift), and `every frozen type export appears in the built type declarations` asserts each type export is in `dist/index.d.ts`. |
|
|
1052
1108
|
| Examples compile and are listed; runnable demos execute | `npm run typecheck` runs `tsc -p examples --noEmit`; `docs.test.ts` checks every `examples/*.ts` file is listed in `examples/README.md`, then runs demos offline and scans output for secrets. |
|
|
1053
1109
|
| Examples run to completion with no secret leakage | `docs.test.ts` `examples_demos_run_to_completion_and_emit_no_secret` runs each demo (Node strips TypeScript types natively) with exit-0 and real-secret scans; `external_app_example_*` pins the DB-backed adapter reference exercising the `RunLedger`, branch-handle checkout, fork, and prior-run resume. |
|
|
1054
|
-
| 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, and every export target exists. `prism-all` reaches 47 of the
|
|
1110
|
+
| 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, and every export target exists. `prism-all` reaches 47 of the 59 workspace packages (21 direct + 26 transitive); the deliberate Caveman/Ponytail/Impeccable/computer-use-linux/antigravity-agent/Graft/Obscura opt-outs and the other non-closure packages (document-reader, OpenAPI tools, NATS, wiki) are not in its install set. |
|
|
1055
1111
|
| 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. |
|
|
1056
1112
|
| Enterprise PostgreSQL package/docs/example gate | Packaging/install/public-contract tests include `@arnilo/prism-enterprise-postgres`; `docs.test.ts` pins its API page, four-store migration/ownership/unknown-outcome/async-router guidance, and `examples/enterprise-postgres-state.ts`; `npm run test:postgres` exercises migration, restart, contention, and cleanup with an explicit database URL. |
|
|
1057
1113
|
| 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. |
|
package/docs/server.md
CHANGED
|
@@ -173,6 +173,7 @@ A2A routes are not added to `createPrismHandler()`. Install `@arnilo/prism-super
|
|
|
173
173
|
- [MCP client and server exposure](mcp-tools.md): selected MCP capabilities and web-standard MCP transport.
|
|
174
174
|
- [Host security guide](host-security.md): remote-boundary checklist.
|
|
175
175
|
- [A2A interoperability](a2a.md): separately mounted A2A 1.0 handler/client.
|
|
176
|
+
- [Obscura browser engine](obscura.md): optional binary-backed generic tools for hosted agents.
|
|
176
177
|
- [Conversations](conversations.md): durable user-scoped conversation service, replay, branches, export, deletion.
|
|
177
178
|
- [Work artifacts and review](work-artifacts-and-review.md): durable artifact review service, revisions, approvals, authorized expiring delivery links.
|
|
178
179
|
- [Frontend interoperability (AG-UI and ACP)](ag-ui.md): separately installed authorized AG-UI Web handler.
|
package/docs/supervisors.md
CHANGED
|
@@ -17,11 +17,15 @@ Use a supervisor when a host or agent must choose a child dynamically. Use `@arn
|
|
|
17
17
|
| `delegate({ childId, input, threadId?, limits?, signal? })` | Invokes one allow-listed child. Input is text and byte-bounded. |
|
|
18
18
|
| `hooks.before` | May reject, modify redacted input, or narrow limits/policy. |
|
|
19
19
|
| `hooks.after` | Observes redacted terminal summary; failures cannot alter settled result. |
|
|
20
|
-
| `limits` | Depth 4/16, active children 4/32, input 64 KiB/1 MiB, steps 8/64, tools 32/256, tokens 20k/1m, timeout 60s/30m, event queue 128/4096 default/hard. |
|
|
20
|
+
| `limits` | Depth 4/16, active children 4/32, input 64 KiB/1 MiB, steps 8/64, tools 32/256, tokens 20k/1m, timeout 60s/30m, event queue 128/4096, child events/delegation 256/4096, child-event bytes 32 KiB/256 KiB default/hard. Over-cap `delegate()` throws `SupervisorLimitError` before incrementing `activeChildren`. Hook rejection and timeout decrement the count exactly once (no leaked timers). |
|
|
21
21
|
|
|
22
22
|
## Outputs / response / events
|
|
23
23
|
|
|
24
|
-
`delegate()` returns the child's `AgentRunResult` or throws its `AgentRunError`/a supervisor denial or limit error. `subscribe()` emits bounded `delegation_started`, `delegation_finished`, `delegation_rejected`, and `delegation_error` metadata events. Hosts may project those events through observability `handleDelegation()` using the parent Prism run ID; no OpenTelemetry dependency enters this package.
|
|
24
|
+
`delegate()` returns the child's `AgentRunResult` or throws its `AgentRunError`/a supervisor denial or limit error. `subscribe()` emits bounded `delegation_started`, `delegation_finished`, `delegation_rejected`, and `delegation_error` metadata events. Graceful close drains already-queued terminal events before the iterator completes (same core multiplexer contract). Hosts may project those events through observability `handleDelegation()` using the parent Prism run ID; no OpenTelemetry dependency enters this package.
|
|
25
|
+
|
|
26
|
+
### Child event passthrough (opt-in)
|
|
27
|
+
|
|
28
|
+
`createSupervisor({ childEvents: true })` projects a redacted, size-capped **milestone** subset of child `AgentEvent`s onto the same stream as `delegation_child_event` (tagged `childId`, `delegationId`, `depth`). v1 covers run start/finish/`suspended`/`denied` and tool-execution started/finished/error/blocked — not per-token `message_delta`. Default off: the stream is byte-identical to today (no subscribe, no allocation). Caps: `limits.maxChildEventsPerDelegation` (256/4096) and `limits.maxChildEventBytes` (32 KiB/256 KiB); exceeding either drops further child events and emits one `delegation_child_events_capped` marker (never throws). Events pass through the supervisor `redactor` before emission. Children never receive supervisor internals or store/subscription access. Resume-path rebuilds (`resumeNestedRun`) do not currently project child events — live passthrough is the initial `delegate()` session only.
|
|
25
29
|
|
|
26
30
|
## Request/response example
|
|
27
31
|
|
|
@@ -50,6 +54,8 @@ const supervisor = createSupervisor({
|
|
|
50
54
|
const result = await supervisor.delegate({ childId: "research", input: "Check sources" });
|
|
51
55
|
```
|
|
52
56
|
|
|
57
|
+
> **Contract — child factories return `Agent`.** `createAgent` must return an `Agent`, not an `AgentSession` (or a plain object). Wrong type throws `SupervisorError: child "<id>" factory must return an Agent, got <type>` on both initial `delegate()` and nested resume. Nested approvals also need a **stable config** plus a **durable (or rebuild-stable) store** — calling `createSession()` inside the factory and returning that session loses the child's checkpointed leaf. Live demo: [`examples/autonomous-coding-loop.ts`](../examples/autonomous-coding-loop.ts) (`childAgent` returns `createAgent(...)`).
|
|
58
|
+
|
|
53
59
|
## Durable child approvals
|
|
54
60
|
|
|
55
61
|
With `checkpoints` + `definitionRevision`, every child run is durable with `interruptBeforeTool: true`. A child that suspends on pending decisions throws `AgentDelegationSuspendedError` out of `delegate()`; when the delegation runs inside a root agent's tool, core converts it into a root suspension whose `interruption.pendingDecisions` carry hashed root-visible approval ids (`sub_<sha256(runId:childApprovalId)>`) and `attribution.path` (redacted child ids, root first, at most 8 deep). Root decisions route back through the same CAS rules: pass `supervisor.resumeNestedRun` as `resumeNestedRun` in the root run's `runState` and in every `resumeAgentRun` options object. The supervisor rebuilds the child from a bounded delegation mapping stored in the same checkpoint store (child id, delegation/thread ids, redacted input, version), re-runs the `before` hook so its narrowing applies to the resumed run (hooks must be idempotent), and re-attributes re-suspensions recursively, so grandchild decisions surface with the full path. A delegating child's own `interruptBeforeTool` also gates its delegate tool, so hosts approve delegation and the child's own side effects as separate stages. Root `*_for_run` stickies record the attribution path and only match the same delegation path; child stickies live on the child run and expire with it. A root approval never widens the child: the child's narrowed permission re-runs at dispatch. Unknown or foreign nested run ids fail closed with one non-enumerating error. Child factories must return stable configs and a durable (or rebuild-stable) session store for resume to work.
|
|
@@ -75,5 +81,7 @@ Supervisors propagate parent `identity` and `effectStore` to every child agent/r
|
|
|
75
81
|
- [Agent identity](agent-identity.md): host-verified identity and narrow delegation.
|
|
76
82
|
- [A2A interoperability](a2a.md): separate remote protocol boundary. `A2ATaskLifecycle` adapts host durable agent/workflow state directly; it does not route A2A execution through local supervisor child planning.
|
|
77
83
|
- [Workflows](workflows.md): preferred deterministic orchestration.
|
|
84
|
+
- Example: [`examples/autonomous-coding-loop.ts`](../examples/autonomous-coding-loop.ts) — per-child models, factory returns `Agent`.
|
|
78
85
|
- [Working and semantic memory](working-and-semantic-memory.md): child scope construction.
|
|
79
86
|
- [Host security](host-security.md): permission and credential boundaries.
|
|
87
|
+
- [Obscura browser engine](obscura.md): optional binary-backed generic tools for child agents.
|
package/docs/system-prompts.md
CHANGED
|
@@ -45,7 +45,7 @@ Known `source` order is deterministic: `user`, `package`, `app`, then `run`. Unk
|
|
|
45
45
|
|
|
46
46
|
## Outputs / response / events
|
|
47
47
|
|
|
48
|
-
`composeSystemPrompt()` returns the composed prompt string or `undefined` when no prompt text remains. The agent/session runtime passes that string to `assembleProviderInput()` as `systemInstructions`; it does not emit a separate event or store prompt layers.
|
|
48
|
+
`composeSystemPrompt()` returns the composed prompt string or `undefined` when no prompt text remains. The agent/session runtime passes that string to `assembleProviderInput()` as `systemInstructions`; it does not emit a separate event or store prompt layers. With the default `cache_aware` layout, this composed system message is emitted before dynamic context, skills, history, tool results, and current input; set `inputLayout: "legacy"` to retain the prior whole-prompt order.
|
|
49
49
|
|
|
50
50
|
## Request/response example
|
|
51
51
|
|
package/docs/tools.md
CHANGED
|
@@ -216,7 +216,7 @@ By default tools without `parameters` skip schema validation (`missingSchema: "a
|
|
|
216
216
|
|
|
217
217
|
### Parallel tool execution (single-shot loop)
|
|
218
218
|
|
|
219
|
-
Opt in through `loop.toolConcurrency` on `AgentConfig` / `RunOptions` (single-shot strategy only). Default is `1` (sequential). Independent calls from one provider turn run concurrently up to the limit; transcript rows and `appendMessage` stay in original call order. Each call still uses `dispatchToolCall` (permission, validation, abort signal). See [Agent loops](agent-loops.md).
|
|
219
|
+
Opt in through `loop.toolConcurrency` on `AgentConfig` / `RunOptions` (single-shot strategy only). Default is `1` (sequential). Independent calls from one provider turn run concurrently up to the limit; transcript rows and `appendMessage` stay in original call order. Each call still uses `dispatchToolCall` (permission, validation, abort signal). If a worker throws or the run aborts, workers stop claiming new calls, already-claimed calls settle, buffered tool-result rows are not appended, and the first failure is rethrown. Already-claimed side effects are not rolled back; the shared abort signal is still passed to each dispatch. The round-level `chargeToolRound` approval gate runs before any worker starts. See [Agent loops](agent-loops.md).
|
|
220
220
|
|
|
221
221
|
```ts
|
|
222
222
|
await session.run(input, {
|
package/docs/web-tools.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
Use when agent needs explicit public-web discovery or host-approved document retrieval/extraction. Keep search separate from fetch/extract so model cannot select provider, credential, API origin, extraction schema, or cost path.
|
|
10
10
|
|
|
11
|
+
**Obscura-backed alternative**: the optional [`@arnilo/prism-obscura`](obscura.md) package provides `web_search`/`web_fetch` behavior backed by a host-installed Obscura headless browser through its CLI (one replaceable HTML search profile instead of an API key), plus explicit native `obscura_fetch`/`obscura_scrape` batch tools. It reuses this package's normalized citation/untrusted shapes (`provider: "obscura"`) but does not require credentials; the API-backed Brave/Exa/Firecrawl adapters here remain the preferred path when an API key is available.
|
|
12
|
+
|
|
11
13
|
## Inputs / request
|
|
12
14
|
|
|
13
15
|
| Tool | Model-visible input | Host-only construction input |
|
package/docs/wiki.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# LLM Wiki (@arnilo/prism-wiki)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
`@arnilo/prism-wiki` implements Andrej Karpathy's **LLM Wiki Pattern** for the Prism agent ecosystem. It acts as a knowledge compiler that transforms raw, immutable sources (source code, AST symbols, notes, markdown clips, transcripts, journal entries) into a persistent, compounding, cross-linked Markdown knowledge base (`.wiki/`).
|
|
6
|
+
|
|
7
|
+
It integrates Tobias Lütke's [`qmd`](https://github.com/tobi/qmd) on-device hybrid search engine (BM25, vector search, and LLM reranking) and hydrates search results with Context7-inspired hierarchical breadcrumbs (`# Category > ## Topic`) and live clickable source line anchors (`file:///path/to/file#Lxx-Lyy` format), enabling agents and humans to navigate code and notes directly without blind regex loops (`grep`/`rg`).
|
|
8
|
+
|
|
9
|
+
## When to use it
|
|
10
|
+
|
|
11
|
+
- **Codebase Knowledge Compilation**: Ingesting modules, architecture patterns, and decision records (ADRs) with exact AST and line anchors that track code drift.
|
|
12
|
+
- **Personal Knowledge Management (PKM)**: Ingesting research papers, meeting notes, book summaries, and journal entries into an interlinked knowledge graph.
|
|
13
|
+
- **Context7-Style Navigation**: Allowing agents to query concepts and immediately jump to exact file and line locations without broad repository scans.
|
|
14
|
+
- **Compounding Q&A**: Persisting valuable answers, analyses, and architectural comparisons back into the wiki for future sessions.
|
|
15
|
+
|
|
16
|
+
## Architecture
|
|
17
|
+
|
|
18
|
+
The Karpathy LLM Wiki pattern is structured into 3 distinct tiers:
|
|
19
|
+
|
|
20
|
+
1. **Raw Sources (Immutable)**: Source code files, design docs, transcripts, journals, and Markdown notes. Raw sources are strictly read-only and never mutated.
|
|
21
|
+
2. **Compiled Wiki (`.wiki/`)**: Persistent, cross-linked Markdown documents containing synthesized architecture models, entity descriptions, decision records, and line-anchored claims.
|
|
22
|
+
3. **Schema & Protocols (`SCHEMA.md`)**: Operational guidelines governing OKF v0.2 emission, entity categorization, citation rules (`file:///path#Lxx-Lyy`), catalog indexing (`index.md`), and chronological change logging (`log.md`).
|
|
23
|
+
|
|
24
|
+
## Inputs / request
|
|
25
|
+
|
|
26
|
+
### `createWikiExtension(options)`
|
|
27
|
+
|
|
28
|
+
| Field | Type | Required | Default | Description |
|
|
29
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
30
|
+
| `wikiRoot` | `string` | No | `".wiki"` | Path to the compiled wiki directory. |
|
|
31
|
+
| `rawRoots` | `readonly string[]` | No | `["."]` | Directories containing raw source files (code, notes, docs). |
|
|
32
|
+
| `profile` | `"codebase" \| "pkm" \| "hybrid" \| "auto"` | No | `"auto"` | Operating strategy for parsing and symbol indexing. |
|
|
33
|
+
| `qmdPath` | `string` | No | `"qmd"` | Path or executable name for the `qmd` CLI binary. |
|
|
34
|
+
| `workspaceRoot` | `string` | No | `process.cwd()` | Workspace root for resolving relative paths and `.agents/skills/`. |
|
|
35
|
+
| `autoDeploySkills` | `boolean` | No | `true` | Auto-deploys `wiki-maintainer` and `wiki-searcher` skills to `.agents/skills/` on init. |
|
|
36
|
+
|
|
37
|
+
### Tools
|
|
38
|
+
|
|
39
|
+
- `wiki_search`: `{ query: string, mode?: "search" | "vsearch" | "query", maxResults?: number }`
|
|
40
|
+
- `wiki_read_page`: `{ pagePath: string }` — `pagePath` must resolve inside the wiki root (lexical + `fs.realpath` containment). Traversal (sibling-prefix, `..`, absolute paths) and symlinks pointing outside the wiki throw an access-denied error; a missing contained page returns `found: false`.
|
|
41
|
+
- `wiki_record_insight`: `{ title: string, content: string, category?: "decision" | "concept" | "entity" }` — title and content must be non-empty; titles are capped at 200 characters, content at 65,536 bytes, and control characters/newlines in titles are collapsed to spaces so titles cannot inject Markdown headings, index entries, or log entries.
|
|
42
|
+
|
|
43
|
+
### Slash Commands
|
|
44
|
+
|
|
45
|
+
- `/wiki-init`: Scaffolds `.wiki/`, instantiates `SCHEMA.md`, `index.md`, and `log.md`, deploys skills, and adds the `qmd` collection.
|
|
46
|
+
- `/wiki-refresh`: Detects modified source files via SHA-256 Merkle diffing, compiles updates to affected entity pages, reconciles contradictions in `log.md`, and runs `qmd update`.
|
|
47
|
+
- `/wiki-lint`: Checks OKF frontmatter (`type`, ISO `generated.at`), leftover `[[wikilinks]]`, unresolved relative markdown links, dead line anchors, and orphan pages.
|
|
48
|
+
|
|
49
|
+
### Standalone CLI Commands
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Initialize wiki in project
|
|
53
|
+
npx prism-wiki init --profile codebase
|
|
54
|
+
|
|
55
|
+
# Refresh wiki after code edits
|
|
56
|
+
npx prism-wiki refresh
|
|
57
|
+
|
|
58
|
+
# Check wiki health and dead anchors
|
|
59
|
+
npx prism-wiki lint
|
|
60
|
+
|
|
61
|
+
# Search wiki from terminal
|
|
62
|
+
npx prism-wiki search "How does authentication work?" --mode query
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Outputs / response / events
|
|
66
|
+
|
|
67
|
+
- `wiki_search` returns a structured markdown payload containing section breadcrumbs, conceptual summaries, and clickable source line links (`file:///path#Lxx-Lyy`).
|
|
68
|
+
- Lifecycle commands return status objects (`{ status: "initialized" | "refreshed" | "clean", ok: boolean }`).
|
|
69
|
+
|
|
70
|
+
## Request/response example
|
|
71
|
+
|
|
72
|
+
### `wiki_search` Query:
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"query": "How is authentication handled?",
|
|
76
|
+
"mode": "query",
|
|
77
|
+
"maxResults": 2
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Response Content:
|
|
82
|
+
```markdown
|
|
83
|
+
### Match 1: Authentication Architecture > Token Verification
|
|
84
|
+
- **Wiki Page:** `entities/authentication.md`
|
|
85
|
+
- **Category:** Core Module
|
|
86
|
+
- **Freshness:** Current (Source hash matches manifest)
|
|
87
|
+
|
|
88
|
+
**Synthesized Summary:**
|
|
89
|
+
The authentication layer uses asymmetric Ed25519 JWT verification in middleware, backed by a persistent token-revocation denylist stored in PostgreSQL.
|
|
90
|
+
|
|
91
|
+
**Code & Source Anchors (Clickable):**
|
|
92
|
+
- Token verification: `verifyToken()` (`file:///src/auth/jwt.ts#L45-L89`)
|
|
93
|
+
- Revocation check: `assertNotRevoked()` (`file:///src/auth/session-store.ts#L112-L138`)
|
|
94
|
+
- Architecture Decision: `decisions/ADR-004-ed25519-migration.md`
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Implementation example
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { createExtensionKernel } from "@arnilo/prism";
|
|
101
|
+
import { createWikiExtension, initWiki, refreshWiki, lintWiki } from "@arnilo/prism-wiki";
|
|
102
|
+
|
|
103
|
+
const kernel = createExtensionKernel();
|
|
104
|
+
|
|
105
|
+
const wiki = createWikiExtension({
|
|
106
|
+
wikiRoot: ".wiki",
|
|
107
|
+
profile: "codebase",
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
await kernel.load([wiki]);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Skills and Auto-Deployment
|
|
114
|
+
|
|
115
|
+
`@arnilo/prism-wiki` includes two specialized skills formatted according to `.agents/skills/skill-creator`:
|
|
116
|
+
|
|
117
|
+
1. **`wiki-maintainer`**: Ingestion, compilation, line-anchor validation, and contradiction reconciliation rules.
|
|
118
|
+
2. **`wiki-searcher`**: Context7 hierarchical breadcrumb query resolution, zero-grep instructions, and compounding insight recording.
|
|
119
|
+
|
|
120
|
+
When initialized (`wiki-init` or `createWikiExtension`), these skills are automatically deployed to the host workspace's `.agents/skills/` folder so any compatible agent can leverage them immediately.
|
|
121
|
+
|
|
122
|
+
## OKF v0.2 bundle format
|
|
123
|
+
|
|
124
|
+
Emitted `.wiki/` trees are [OKF v0.2](https://github.com/GoogleCloudPlatform/open-knowledge-format) bundles. Karpathy compilation (synthesize, don't copy; precise `file:///` anchors; contradiction reconciliation; synchronized catalog/ledger) is unchanged.
|
|
125
|
+
|
|
126
|
+
| Artifact | OKF rule |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| Root `index.md` | Only `okf_version: "0.2"` frontmatter; sectioned bullet listings per OKF §8 |
|
|
129
|
+
| `entities/index.md`, `decisions/index.md`, `concepts/index.md` | No frontmatter (progressive disclosure) |
|
|
130
|
+
| Concept pages | `type` required (Module / Concept / Decision Record / Entity / Person / Tool), plus `title`, `description`, `tags`, `sources[].resource`, `generated: { by: prism-wiki/<version>, at: <ISO 8601 UTC> }` |
|
|
131
|
+
| `log.md` | `# Directory Update Log`, `## YYYY-MM-DD` newest first, `* **Verb**: …` |
|
|
132
|
+
| Links | Standard relative markdown. `[[wikilinks]]` are lint errors |
|
|
133
|
+
|
|
134
|
+
`.manifest.json` remains the compilation ledger (`id`, `category`, `rawSources`, `lastCompiledAt`). Those keys are not copied into page frontmatter. Trust families (`verified`, `status`) are omitted in v1 (unverified). `wiki-refresh` upgrades pages it touches; leftover legacy pages can be re-scaffolded — the format is regenerable from raw sources.
|
|
135
|
+
|
|
136
|
+
## Extension and configuration notes
|
|
137
|
+
|
|
138
|
+
- `@arnilo/prism-wiki` registers tools (`wiki_search`, `wiki_read_page`, `wiki_record_insight`), commands (`wiki-init`, `wiki-refresh`, `wiki-lint`), skills (`wiki-maintainer`, `wiki-searcher`), and instruction injectors (`wiki-guidance`) into Prism registries.
|
|
139
|
+
- It operates with zero core modifications and can be used with any `@arnilo/prism` agent.
|
|
140
|
+
- `qmd` is optional but recommended. When `@tobilu/qmd` is not installed, the search engine falls back to catalog matching against `index.md`.
|
|
141
|
+
|
|
142
|
+
## Security and performance notes
|
|
143
|
+
|
|
144
|
+
- **Source Immutability**: Raw source files are read-only and never modified by wiki operations.
|
|
145
|
+
- **Subprocess Safety**: All `qmd` subprocess calls use argument arrays (`execFile`) to prevent shell injection.
|
|
146
|
+
- **Path Containment**: Wiki and raw source paths are confined to the workspace root; directory traversal (`../`) is rejected.
|
|
147
|
+
- **Bounded Token Consumption**: Incremental Merkle hashing ensures only modified files and 1-hop dependent wiki pages are processed during refresh passes.
|
|
148
|
+
|
|
149
|
+
## Related APIs
|
|
150
|
+
|
|
151
|
+
- [`@arnilo/prism-rag`](rag.md): Bounded document chunking and vector context injection.
|
|
152
|
+
- [`@arnilo/prism-memory`](working-and-semantic-memory.md): Embedder and VectorStore primitives.
|
|
153
|
+
- [`@arnilo/prism-coding-agent`](coding-agent-tools.md): Code manipulation and reading tools.
|
|
154
|
+
- [`Contribution registries`](contribution-registries.md): Extension contribution model.
|
package/docs/workflows.md
CHANGED
|
@@ -76,9 +76,19 @@ All workflow limits and runtime `concurrency` reject non-safe integers, zero, ne
|
|
|
76
76
|
|
|
77
77
|
A function node returns `suspend({ reason, data?, resumeSchema? })` to persist `status: "suspended"`. Its next invocation receives `ctx.resume` only after an approved resume. `resumeWorkflow(workflow, { runId }, options)` validates schema/version/ownership/`definitionHash`, claims the checkpoint before node execution, and continues the suspended node. Denial persists terminal `denied` status without invoking it. Existing failed/aborted checkpoint resume remains available without a human decision.
|
|
78
78
|
|
|
79
|
+
> **Contract — resume-aware nodes.** After an approved resume, the **same** node's `execute` is re-invoked with `ctx.resume`. Returning `suspend(...)` unconditionally re-suspends silently; downstream nodes never run. Branch on `ctx.resume`:
|
|
80
|
+
>
|
|
81
|
+
> ```ts
|
|
82
|
+
> execute: async (ctx) => ctx.resume
|
|
83
|
+
> ? handle(ctx.resume)
|
|
84
|
+
> : suspendAskUserDecision({ ... }),
|
|
85
|
+
> ```
|
|
86
|
+
>
|
|
87
|
+
> Live demo: [`examples/autonomous-coding-loop.ts`](../examples/autonomous-coding-loop.ts) (`gate` node).
|
|
88
|
+
|
|
79
89
|
Coding-agent ask-user glue (opt-in, no Goal DB): `suspendAskUserDecision(request)` wraps `suspend` with durable question/options/`selectionMode`/`allowCustom` data + resume schema; resume with `createAskUserDecisionResumeValidator()` or `validateAskUserDecisionResume`. Goal→verify: `runCodingGoalVerify` / `createCodingGoalVerifyWorkflow` compose plan Markdown → named checks → approve suspend → bounded handoff over the same primitives (`examples/coding-goal-verify.ts`). When a workflow node wraps a durable agent run, that run's shared pending-decision batch (Task 2) is the approval authority — workflow `suspend`/`resume` stay workflow-scoped and do not mint a parallel decision store.
|
|
80
90
|
|
|
81
|
-
Every node receives bounded `ctx.state`, `ctx.stateVersion`, and async `ctx.updateState(patch, { mode: "merge" | "replace" })`. Updates serialize, validate, redact, and snapshot before checkpoint save. `workflowNode({ workflow })` runs its child with the same ownership, agent/tool registries, execution policy, redactor, signal, checkpoints, and event bus; child state replaces parent state after success.
|
|
91
|
+
Every node receives bounded `ctx.state`, `ctx.stateVersion`, and async `ctx.updateState(patch, { mode: "merge" | "replace" })`. Updates serialize, validate, redact, and snapshot before checkpoint save. A rejected state or checkpoint write stays rejected (nothing committed) and recovers the per-run chain so a later valid write can run. `workflowNode({ workflow })` runs its child with the same ownership, agent/tool registries, execution policy, redactor, signal, checkpoints, and event bus; child state replaces parent state after success.
|
|
82
92
|
|
|
83
93
|
`replayWorkflow(workflow, { sourceRunId, fromNodeId, runId? }, options)` requires a succeeded source/node, creates a new checkpoint, copies terminal evidence outside the selected node's downstream closure, restores selected-node pre-state, and records `{ sourceRunId, fromNodeId, rootRunId, depth }`. Source evidence is untouched. Copying any prior nested/tool approval is rejected; replay from that approval node or earlier so Phase 8 approval executes again.
|
|
84
94
|
|
|
@@ -300,11 +310,34 @@ runRpcServer({
|
|
|
300
310
|
});
|
|
301
311
|
```
|
|
302
312
|
|
|
313
|
+
## Bounded iterate-until-done (host-loop pattern)
|
|
314
|
+
|
|
315
|
+
Workflows stay acyclic. "Loop until the goal passes" is a **host** `for`/`while` over `runWorkflow`, not a graph cycle. One run per iteration; iteration state in workflow **inputs**; the host owns the termination predicate and budgets. No extra runtime. Runnable proof: [`examples/autonomous-coding-loop.ts`](../examples/autonomous-coding-loop.ts) (N iterations, mid-loop human gate with simulated restart, typed budget exhaustion).
|
|
316
|
+
|
|
317
|
+
1. Keep the DAG acyclic (roadmap → execute → validate → gate → compact).
|
|
318
|
+
2. Pass `{ goal, iteration }` as `runWorkflow` input — never a back-edge.
|
|
319
|
+
3. Bound the host loop (`MAX_ITERATIONS`). Per-child tool/token caps stay on `supervisor.delegate` / `RunOptions`.
|
|
320
|
+
4. Explicit predicate (`passed(outputs)`). Exhaustion throws a typed error — fail-closed, never hang.
|
|
321
|
+
5. Human gate is ordinary `suspend` / `resumeWorkflow` (CAS `expectedVersion`). Restart = new runtime, same checkpoint store.
|
|
322
|
+
6. Audit **each iteration** with `replayWorkflow({ sourceRunId, fromNodeId })`. The host loop is N run ids — `listWorkflowRuns` lists them; `replayWorkflow` does not replay the `for`.
|
|
323
|
+
|
|
324
|
+
```ts
|
|
325
|
+
for (let i = 0; i < MAX_ITERATIONS; i++) {
|
|
326
|
+
const run = await runWorkflow(phase, { goal, iteration: i }, { checkpoints, ownership });
|
|
327
|
+
if (run.status === "suspended") break; // resumeWorkflow later with expectedVersion
|
|
328
|
+
if (run.status !== "succeeded") throw new Error(run.status);
|
|
329
|
+
if (passed(run.outputs)) break;
|
|
330
|
+
}
|
|
331
|
+
if (!passed(last.outputs)) throw new BudgetExhaustedError(MAX_ITERATIONS);
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Budgets are the host's job until [plan 045](../plans/045-Bounded-Loop-Workflow-Node.md) ships an in-graph `loop` node (`until` + hard `maxIterations`, still finite). Do not wait on that primitive for this pattern.
|
|
335
|
+
|
|
303
336
|
## Extension and configuration notes
|
|
304
337
|
|
|
305
338
|
- Workflow semantics stay in this optional package; generic checkpoint persistence and bounded event fan-in live in core.
|
|
306
339
|
- `ProductionPersistenceStore.checkpoints` and `.leases` are optional generic capabilities. First-party SQLite/PostgreSQL adapters own `prism_checkpoints` / `prism_leases`; workflows only adapt them. Sagas use the same `WorkflowCheckpointAdapter` and `LeaseStore`; they add no SQL table or scheduler.
|
|
307
|
-
- `createWorkflowEventBus()` delegates queueing, source fan-in, overflow, abort, and close behavior to core `createEventMultiplexer()`, including its single-consumer contract: a second concurrent `subscribe()` is rejected with `EventMultiplexerError` (`ERR_PRISM_EVENT_MULTIPLEXER_SINGLE_CONSUMER`) instead of silently splitting the stream.
|
|
340
|
+
- `createWorkflowEventBus()` delegates queueing, source fan-in, overflow, abort, and close behavior to core `createEventMultiplexer()`, including its single-consumer contract: a second concurrent `subscribe()` is rejected with `EventMultiplexerError` (`ERR_PRISM_EVENT_MULTIPLEXER_SINGLE_CONSUMER`) instead of silently splitting the stream. Graceful `close()` stops new emits/sources and drains already-queued events (in `(sequence, nodeId)` order) before the subscriber completes; overflow `close` still emits one `workflow_event_overflow` notice and terminates.
|
|
308
341
|
- The in-process active-run registry (`registerActiveWorkflowRun` / `getActiveWorkflowRun` / `abortActiveWorkflowRun`) is **non-durable, in-process only — it does not survive restart**; durable active-run recovery is a later milestone. It is bounded: every register sweeps aborted/leaked entries (runs whose promise never settled) and the registry fails closed at `MAX_ACTIVE_WORKFLOW_RUNS` (512) rather than evicting a live run; `sweepActiveWorkflowRuns()` is available for hosts. Cross-tenant lookups stay ownership-isolated.
|
|
309
342
|
- `createWorkflowCommands()` is optional; hosts can drive `workflow.start` / `enqueue` / `replay` / `status` / `list` / `cancel` / `resume`. The six `schedule.*` commands appear only when a scoped `schedules` service is supplied.
|
|
310
343
|
- Hosts may bridge `WorkflowEvent` into OpenTelemetry or custom sinks; there is no built-in TUI.
|
|
@@ -314,7 +347,7 @@ runRpcServer({
|
|
|
314
347
|
## Security and performance notes
|
|
315
348
|
|
|
316
349
|
- Definitions require a non-empty host-authored `revision` and fail closed on cycles, unknown edges, self-edges, invalid limits, and `maxNodes` overflow. Revision and every nested revision enter the deterministic definition hash; hosts must bump revision when function/tool behavior changes.
|
|
317
|
-
- Fan-out length is bounded by `maxFanOut
|
|
350
|
+
- Fan-out length is bounded by `maxFanOut`. Independent `map` items run in a local worker pool capped by the resolved workflow `maxConcurrency` (and `options.concurrency`); output stays in input order. Abort or the first map failure stops further items. There is no extra global admission service.
|
|
318
351
|
- Node outputs, shared state/history, schedule input/records, and checkpoints are byte/count/depth bounded. Checkpoint size remains the final aggregate ceiling.
|
|
319
352
|
- Event buses use a bounded buffer (default 2048) with `close` / `drop_oldest` / `drop_newest` overflow.
|
|
320
353
|
- Checkpoints redact suspension/resume payloads via `SecretRedactor` / `secrets` before save; resume rejects tenant, schema, definition-hash, and expected-version mismatch.
|
|
@@ -337,11 +370,12 @@ Use workflows for known, durable, replayable graphs. Use optional supervisor del
|
|
|
337
370
|
|
|
338
371
|
## Related APIs
|
|
339
372
|
|
|
340
|
-
- Examples: `examples/workflow-research-and-review.ts`, `examples/workflow-parallel-research.ts`, `examples/workflow-tool-approval.ts`, `examples/workflow-multimodal-document.ts`, `examples/workflow-sqlite-resume.ts`, `examples/workflow-postgres-resume.ts`, `examples/workflow-event-sink.ts`, `examples/workflow-rpc-cancel.ts`, `examples/workflow-distributed-coordinator.ts` — offline runnable demos; PostgreSQL safely skips unless `PRISM_TEST_POSTGRES_URL` is set.
|
|
373
|
+
- Examples: `examples/workflow-research-and-review.ts`, `examples/workflow-parallel-research.ts`, `examples/workflow-tool-approval.ts`, `examples/workflow-multimodal-document.ts`, `examples/workflow-sqlite-resume.ts`, `examples/workflow-postgres-resume.ts`, `examples/workflow-event-sink.ts`, `examples/workflow-rpc-cancel.ts`, `examples/workflow-distributed-coordinator.ts`, `examples/autonomous-coding-loop.ts` (host-loop iterate-until-done) — offline runnable demos; PostgreSQL safely skips unless `PRISM_TEST_POSTGRES_URL` is set.
|
|
341
374
|
- [Workflow orchestration primitives](workflow-orchestration-primitives.md): Task 0–1 inventory and locked adapter contracts
|
|
342
375
|
- [Agent/session runtime](agent-session-runtime.md): `AgentSession.run()`/`stream()`, abort, subscribe
|
|
343
376
|
- [Guardrails](guardrails.md): `RunWorkflowOptions.guardrails` routes tool nodes through core dispatch before policy and side effects.
|
|
344
377
|
- [Supervisor delegation](supervisors.md): bounded dynamic child selection.
|
|
378
|
+
- [Obscura browser engine](obscura.md): optional binary-backed generic tools for `toolNode`/`agentNode` composition.
|
|
345
379
|
- [A2A interoperability](a2a.md): hosts may adapt existing exact-owner workflow status/list/cancel/checkpoint/event surfaces to `A2ATaskLifecycle`; A2A package adds no workflow worker, queue, or schema.
|
|
346
380
|
- [Agent events](agent-events.md): core `AgentEvent` wrapped by `agent_event`
|
|
347
381
|
- [Session stores and branching](session-stores-and-branching.md): session `leafId` reuse on resume
|
|
@@ -155,6 +155,24 @@ const memory = createMemory({
|
|
|
155
155
|
});
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
+
Standalone durable vector store for RAG:
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
import { createPostgresVectorStore, createHashEmbedder } from "@arnilo/prism-memory";
|
|
162
|
+
|
|
163
|
+
const store = await createPostgresVectorStore({
|
|
164
|
+
connectionString: process.env.DATABASE_URL!,
|
|
165
|
+
schema: "prism_memory", // default
|
|
166
|
+
table: "semantic_memory", // default
|
|
167
|
+
dimension: 32, // optional; pins the embedding column width (HNSW + drift guard)
|
|
168
|
+
}); // PostgresVectorStoreOptions; dimension must match the embedder's dimensions
|
|
169
|
+
// store implements rag's VectorStore/TransactionalVectorStore contract: upsert,
|
|
170
|
+
// query, getBySource, transaction, lexicalQuery (fts, when available), and
|
|
171
|
+
// getCurrentGeneration/setCurrentGeneration. close() ends adapter-owned pools.
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
`createPostgresVectorStore()` is the production counterpart to `createMemoryVectorStore()` used by `@arnilo/prism-rag`; `createPostgresMemoryStores()` reuses the same vector implementation internally.
|
|
175
|
+
|
|
158
176
|
## Extension and configuration notes
|
|
159
177
|
|
|
160
178
|
- Hosts wire the context provider into `AgentConfig.context` or `resolveContextProviders()`.
|
|
@@ -162,6 +180,8 @@ const memory = createMemory({
|
|
|
162
180
|
- `createHashEmbedder()` is for tests/demos only; production hosts supply a real `Embedder`.
|
|
163
181
|
- Observational memory (`@arnilo/prism-compaction-observational-memory`) remains unchanged and composable.
|
|
164
182
|
- 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`.
|
|
183
|
+
- The PostgreSQL vector path owns its DDL in Prism (`buildMemoryDdl`/`buildVectorSearchDdl` exported): the `<table>_rag_scope_generations` per-scope generation pointer table, `text_tsv` tsvector column + GIN index for the lexical RAG leg, and an HNSW index when the embedding dimension is pinned. DDL runs against the host's **knowledge database** — the host names `schema`/`table` (defaults `prism_memory`/`semantic_memory`), owns backup/retention of that database, and can run migrations manually with `skipMigrations: true`. Identifiers are validated/quoted; values stay parameterized.
|
|
184
|
+
- `createPostgresVectorStore({ dimension })` pins the embedding column width before building indexes: pgvector can only build HNSW over `vector(N)` columns, and dimension mismatch fails closed instead of drifting.
|
|
165
185
|
- `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.
|
|
166
186
|
- Profile bundles do not include this package yet.
|
|
167
187
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnilo/prism",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Agent harness for AI providers, agents, sessions, and tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"types": "./dist/providers/openai-primitives.d.ts",
|
|
23
23
|
"default": "./dist/providers/openai-primitives.js"
|
|
24
24
|
},
|
|
25
|
+
"./providers/schema": {
|
|
26
|
+
"types": "./dist/providers/schema.d.ts",
|
|
27
|
+
"default": "./dist/providers/schema.js"
|
|
28
|
+
},
|
|
25
29
|
"./providers/media": {
|
|
26
30
|
"types": "./dist/providers/media.d.ts",
|
|
27
31
|
"default": "./dist/providers/media.js"
|
|
@@ -112,11 +116,15 @@
|
|
|
112
116
|
"!dist/**/*.map",
|
|
113
117
|
"docs",
|
|
114
118
|
"!docs/_evidence",
|
|
119
|
+
"!docs/release-*-evidence.md",
|
|
120
|
+
"!docs/api-page-template.md",
|
|
115
121
|
"templates",
|
|
116
122
|
"CHANGELOG.md"
|
|
117
123
|
],
|
|
118
124
|
"workspaces": [
|
|
119
125
|
"packages/provider-*",
|
|
126
|
+
"packages/memory",
|
|
127
|
+
"packages/rag",
|
|
120
128
|
"packages/compaction-*",
|
|
121
129
|
"packages/observability-*",
|
|
122
130
|
"packages/tool-validator-*",
|
|
@@ -127,8 +135,6 @@
|
|
|
127
135
|
"packages/workflows",
|
|
128
136
|
"packages/coding-agent",
|
|
129
137
|
"packages/coding-security",
|
|
130
|
-
"packages/memory",
|
|
131
|
-
"packages/rag",
|
|
132
138
|
"packages/server",
|
|
133
139
|
"packages/supervisor",
|
|
134
140
|
"packages/web-tools",
|
|
@@ -137,6 +143,7 @@
|
|
|
137
143
|
"packages/model-router",
|
|
138
144
|
"packages/enterprise-postgres",
|
|
139
145
|
"packages/browser",
|
|
146
|
+
"packages/obscura",
|
|
140
147
|
"packages/ag-ui",
|
|
141
148
|
"packages/acp-agent",
|
|
142
149
|
"packages/computer-use-linux",
|
|
@@ -150,7 +157,7 @@
|
|
|
150
157
|
"build": "npm run build:core && npm run build --workspaces --if-present",
|
|
151
158
|
"typecheck": "npm run build && npm run typecheck --workspaces --if-present && tsc -p examples --noEmit",
|
|
152
159
|
"sweep:unused": "node scripts/sweep-unused.mjs --json",
|
|
153
|
-
"test": "npm run build && node scripts/with-build-lock.mjs node --test dist/__tests__/*.test.js && node scripts/with-build-lock.mjs node --test scripts/release-gate.test.mjs scripts/tooling-gate.test.mjs scripts/budget-gate.test.mjs scripts/phase8-conformance.test.mjs scripts/phase9-conformance.test.mjs scripts/phase10-conformance.test.mjs scripts/phase11-conformance.test.mjs scripts/phase11-freeze.test.mjs scripts/phase12-freeze.test.mjs scripts/phase13-freeze.test.mjs scripts/phase14-freeze.test.mjs scripts/phase15-freeze.test.mjs scripts/phase16-freeze.test.mjs scripts/phase17-freeze.test.mjs scripts/phase18-freeze.test.mjs scripts/phase19-freeze.test.mjs scripts/phase20-freeze.test.mjs scripts/phase21-freeze.test.mjs scripts/benchmark-0.1.0.test.mjs scripts/sweep-unused.test.mjs scripts/e2e-enterprise-journey.test.mjs scripts/e2e-coding-journey.test.mjs scripts/phase23-quality-gates.test.mjs scripts/phase24-truth.test.mjs scripts/phase25-bounded-accumulation.test.mjs scripts/phase26-freeze.test.mjs scripts/phase27-freeze.test.mjs scripts/phase27-ha.test.mjs scripts/phase27-erp-journey.test.mjs scripts/phase27-release.test.mjs scripts/phase29-freeze.test.mjs scripts/phase30-freeze.test.mjs scripts/phase30-release.test.mjs scripts/phase26-index-benchmark.test.mjs && node --test scripts/phase23-build-race.test.mjs && npm run test --workspaces --if-present",
|
|
160
|
+
"test": "npm run build && node scripts/with-build-lock.mjs node --test dist/__tests__/*.test.js && node scripts/with-build-lock.mjs node --test scripts/release-gate.test.mjs scripts/tooling-gate.test.mjs scripts/budget-gate.test.mjs scripts/phase8-conformance.test.mjs scripts/phase9-conformance.test.mjs scripts/phase10-conformance.test.mjs scripts/phase11-conformance.test.mjs scripts/phase11-freeze.test.mjs scripts/phase12-freeze.test.mjs scripts/phase13-freeze.test.mjs scripts/phase14-freeze.test.mjs scripts/phase15-freeze.test.mjs scripts/phase16-freeze.test.mjs scripts/phase17-freeze.test.mjs scripts/phase18-freeze.test.mjs scripts/phase19-freeze.test.mjs scripts/phase20-freeze.test.mjs scripts/phase21-freeze.test.mjs scripts/benchmark-0.1.0.test.mjs scripts/benchmark-multi-agent.test.mjs scripts/sweep-unused.test.mjs scripts/e2e-enterprise-journey.test.mjs scripts/e2e-coding-journey.test.mjs scripts/phase23-quality-gates.test.mjs scripts/phase24-truth.test.mjs scripts/phase25-bounded-accumulation.test.mjs scripts/phase26-freeze.test.mjs scripts/phase27-freeze.test.mjs scripts/phase27-ha.test.mjs scripts/phase27-erp-journey.test.mjs scripts/phase27-release.test.mjs scripts/phase29-freeze.test.mjs scripts/phase30-freeze.test.mjs scripts/phase30-release.test.mjs scripts/phase34-freeze.test.mjs scripts/phase37-provider-matrix.test.mjs scripts/phase26-index-benchmark.test.mjs scripts/obscura-host-conformance.test.mjs && node --test scripts/phase23-build-race.test.mjs && npm run test --workspaces --if-present",
|
|
154
161
|
"test:coverage": "node scripts/with-build-lock.mjs 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/**' --test-coverage-exclude='**/packages/**' --test-coverage-exclude='**/examples/**' dist/__tests__/*.test.js && node scripts/with-build-lock.mjs node scripts/coverage-summary.mjs && node --test scripts/phase23-coverage.test.mjs && node --test scripts/phase23-skip-manifest.test.mjs",
|
|
155
162
|
"coverage:summary": "node scripts/with-build-lock.mjs node scripts/coverage-summary.mjs",
|
|
156
163
|
"lint": "biome lint . --reporter=sarif --reporter-file=scripts/lint-report.sarif",
|
|
@@ -164,7 +171,7 @@
|
|
|
164
171
|
"release:evidence": "node scripts/release-skip-manifest.mjs",
|
|
165
172
|
"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",
|
|
166
173
|
"release:gate": "node scripts/release-skip-manifest.mjs && node scripts/check-client-neutrality.mjs && node scripts/release.mjs gate",
|
|
167
|
-
"security:threat-suites": "node --test scripts/phase8-conformance.test.mjs scripts/phase9-conformance.test.mjs scripts/phase10-conformance.test.mjs scripts/phase11-conformance.test.mjs scripts/phase20-security.test.mjs scripts/phase21-security.test.mjs scripts/phase22-security.test.mjs scripts/phase23-security.test.mjs"
|
|
174
|
+
"security:threat-suites": "node --test scripts/phase8-conformance.test.mjs scripts/phase9-conformance.test.mjs scripts/phase10-conformance.test.mjs scripts/phase11-conformance.test.mjs scripts/phase20-security.test.mjs scripts/phase21-security.test.mjs scripts/phase22-security.test.mjs scripts/phase23-security.test.mjs scripts/phase38-codeql-regression.test.mjs"
|
|
168
175
|
},
|
|
169
176
|
"devDependencies": {
|
|
170
177
|
"@biomejs/biome": "^2.5.5",
|