@arnilo/prism 0.1.4 → 0.1.6
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 +10 -0
- package/dist/agent-run-lifecycle.d.ts +2 -0
- package/dist/agent-run-lifecycle.js +7 -0
- package/dist/agent-run-state.d.ts +2 -0
- package/dist/agent-run-state.js +10 -0
- package/dist/agent-session.d.ts +7 -0
- package/dist/agent-session.js +33 -5
- package/dist/cli-init.d.ts +0 -2
- package/dist/cli-init.js +0 -2
- package/dist/cli-runner.js +1 -1
- package/dist/contracts-core.d.ts +0 -6
- package/dist/contracts-protocol.d.ts +0 -2
- package/dist/contracts-run-state.d.ts +13 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/rpc.js +2 -1
- package/dist/skill-load.d.ts +23 -0
- package/dist/skill-load.js +74 -0
- package/docs/acp.md +2 -2
- package/docs/agent-loops.md +1 -1
- package/docs/agent-session-runtime.md +3 -3
- package/docs/coding-agent-tools.md +13 -9
- package/docs/coding-security.md +3 -0
- package/docs/compaction-observational-memory.md +5 -6
- package/docs/context-and-skills.md +2 -2
- package/docs/document-reader.md +85 -0
- package/docs/index.md +7 -7
- package/docs/migration.md +111 -0
- package/docs/provider-conformance.md +2 -2
- package/docs/provider-layer.md +1 -1
- package/docs/provider-packages.md +1 -1
- package/docs/provider-primitives.md +1 -1
- package/docs/public-contracts.md +2 -2
- package/docs/release-and-install.md +62 -4
- package/docs/tool-execution-primitives.md +3 -3
- package/docs/tools.md +2 -2
- package/docs/use-case-model-selection.md +12 -11
- package/package.json +3 -2
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## What it does
|
|
4
4
|
|
|
5
|
-
Prism is published as **
|
|
5
|
+
Prism is published as **50 publishable manifests**: the root `@arnilo/prism` core package plus **49 workspace packages** — 14 provider adapters, 9 `prism-*` family/profile packages, and 26 capability packages. (Regenerate the counts: `ls packages/*/package.json | wc -l` = 49 workspace; `ls -d packages/provider-*/ | wc -l` = 14; `ls -d packages/prism-*/ | wc -l` = 9; capability = 49 − 14 − 9 = 26; publishable = root + 49 = 50.) The 50th manifest is the 0.1.6 plan 018 optional `@arnilo/prism-document-reader` package (bounded PDF/Office literal-text extraction for the coding read tool; ships only because its `doc-reader` closeout is demanded — a deferred closeout keeps the graph at 49). 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 `@arnilo/prism` ships runtime, CLI, templates, and docs. Every code package has a required `@arnilo/prism@0.1.0` peer; profiles are pure manifests. Installation activates no provider, listener, database, browser, credential, or tool capability.
|
|
8
8
|
|
|
9
|
-
Current **
|
|
9
|
+
Current **50** publishable manifests (root + 49 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 **49** publishable manifests (root + 48 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-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`
|
|
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`
|
|
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 eleven `@arnilo/prism-provider-*` packages.
|
|
21
21
|
|
|
@@ -178,7 +178,7 @@ PRISM_LIVE_PROVIDER_TESTS=1 npm run test --workspaces --if-present
|
|
|
178
178
|
|
|
179
179
|
### 0.1.0 publish handoff (plan 012 Task 7)
|
|
180
180
|
|
|
181
|
-
**Decision: GO when the operator prerequisites below are recorded.** Release **0.1.0** (Phase 12, plan 012) is the release-candidate hardening cut of the **0.0.28** graph: no new packages, public exports, schema migrations, or runtime dependencies (freeze manifest `scripts/phase12-freeze-manifest.json`). Publishable graph stays **49** publishable manifests (root + 48 workspace packages) at exact **0.1.0**. Store compatibility with 0.0.28: **compatible, no migration** ([migration](migration.md) `0.0.28 → 0.1.0`); the full `0.0.17 → 0.1.0` upgrade matrix is in the same page. All evidence for the tree under publication is recorded in [0.1.0 readiness](0.1.0-readiness.md) (capacity envelopes, restart-recovery, e2e journeys, threat-suites leg, audit at moderate).
|
|
181
|
+
**Decision: GO when the operator prerequisites below are recorded.** Release **0.1.0** (Phase 12, plan 012) is the release-candidate hardening cut of the **0.0.28** graph: no new packages, public exports, schema migrations, or runtime dependencies (freeze manifest `scripts/phase12-freeze-manifest.json`). At this line the canonical statement read **49 publishable manifests**: the root `@arnilo/prism` core package plus **48 workspace packages** — 14 provider adapters, 9 `prism-*` family/profile packages, and 25 capability packages. Publishable graph stays **49** publishable manifests (root + 48 workspace packages) at exact **0.1.0**. Store compatibility with 0.0.28: **compatible, no migration** ([migration](migration.md) `0.0.28 → 0.1.0`); the full `0.0.17 → 0.1.0` upgrade matrix is in the same page. All evidence for the tree under publication is recorded in [0.1.0 readiness](0.1.0-readiness.md) (capacity envelopes, restart-recovery, e2e journeys, threat-suites leg, audit at moderate).
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
184
|
# Operator prerequisites (each a named blocked gate — none may be skipped):
|
|
@@ -274,6 +274,64 @@ git push origin v0.1.2 # tag push triggers release.yml publish job (prove
|
|
|
274
274
|
|
|
275
275
|
**Rollback notes.** `release:publish --version 0.1.2 --resume --report release-artifacts/publish-report.json` resumes an interrupted publication and skips only registry versions whose internal dependency fingerprint matches the local manifest. A failed package aborts the run with its status written to the report; re-run after fixing the cause. npm cannot unpublish the `0.1.2` line after 72 hours — a post-publication defect ships as a `0.1.x` patch (additive-only compat promise, `release:gate` enforced), or as a documented break in the next line with a `docs/migration.md` entry. `0.1.2` is store-compatible with `0.1.1` in **both directions** (no migration ran — same checksum-protected contract), so an operator may defer or roll back the patch without a database rollback.
|
|
276
276
|
|
|
277
|
+
### 0.1.6 publish handoff (plan 018 Task 7)
|
|
278
|
+
|
|
279
|
+
**Decision: GO when the operator prerequisites below are recorded.** Release **0.1.6** (plan 018) is the coding-agent capability-closeouts patch on the frozen 0.1.x line — **additive-only** vs 0.1.5 (plain compat gate at 0.1.6 passed with 0 breaking declaration deltas; the baseline text was regenerated with `--update-baseline` for the version literal only, no `--allow-break` anywhere). Five demand-gated closeouts shipped, each flipped to `demanded` by named demand evidence (operator `arn` for native-sandbox/doc-reader/delete-glob/checkpoint-bodies, user `Clay` for acp-session-store) before its task landed; the demand-gate registry (`scripts/phase18-freeze-manifest.json`) machine-checks demanded ⇒ implemented, deferred ⇒ untouched. Shipped: (1) **durable ACP session store** — `@arnilo/prism-ag-ui` `AcpSessionStore` host seam (`save`/`loadAll`/`evict`), persisted `{sessionId, ownership, modeId, configValues, cwd, additionalDirectories, updatedAt}`, lazy ownership-scoped restore, fail-closed drops, absent seam = 0.1.5 behavior; (2) **network-free native sandbox** — `createNativeSandbox` in `@arnilo/prism-coding-security` (fresh netns per command via the OS `unshare` binary, chained ulimits with `|| exit 126`, argv-only exec, cwd containment, process-group kill, env allow-list, Linux-only fail-closed); (3) **bounded PDF/Office document reader** — new optional package `@arnilo/prism-document-reader` (the 50th manifest, graph 49 → 50) with optional `pdf-parse`/`mammoth` peers fail-closed at creation, magic-byte gating, null fall-through, caps + redaction at the adapter boundary; (4) **recursive delete + brace-expanding glob** — per-call `recursive: true` with fan-out cap and symlink-unlink-not-follow, host-selected/per-call `braceExpansion` bounded to 128 alternatives / 4096 expanded bytes, fail-closed on overflow/malformed braces; (5) **checkpoint persistence for loaded-skill bodies** — opt-in `includeSkillBodies` on run + resume options (names-only stays default, 0.1.3 shapes byte-identical), ≤64 bodies / ≤256-char names / ≤262144-byte bodies / ≤1 MiB total, `maxStateBytes` refusal, redacted at rest, registry-independent resume render. Store compatibility with 0.1.5: **compatible, no migration** (additive-only; no persisted-shape change; `docs/migration.md` gains no entries). Exit gate green: npm test core 1,433/1,433 + 190 script gates (incl. phase18-freeze done-phase), `sdk:ready` exit 0, audit 0 moderate, pack dry-run 50/50 twice byte-identical, budget/benchmark gates green; evidence in `scripts/phase18-baseline.json` `exitGate`. Rollback = restore the 0.1.5 manifests/tag.
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Operator prerequisites recorded: clean tree at the v0.1.6 tag candidate, GPG key, npm OIDC publisher.
|
|
283
|
+
npm test # core + workspace suites + all script gates
|
|
284
|
+
npm run sdk:ready # typecheck, lint, format, test, pack, release:gate
|
|
285
|
+
node scripts/release.mjs gate --version 0.1.6 # plain additive gate, 0 breaking deltas
|
|
286
|
+
npm run pack:dry-run # twice; diff reports — deterministic
|
|
287
|
+
npm audit --audit-level=moderate
|
|
288
|
+
npm run release:check -- --version 0.1.6 --report /tmp/prism-0.1.6-preflight.json
|
|
289
|
+
npm run release:publish -- --version 0.1.6 --dry-run --allow-dirty --allow-untagged --report /tmp/prism-0.1.6-dry-run.json
|
|
290
|
+
# run the dry-run twice and diff the reports: deterministic, byte-identical
|
|
291
|
+
|
|
292
|
+
# Sign the release on the clean tagged tree (operator GPG key):
|
|
293
|
+
git tag -s v0.1.6 -m "Prism 0.1.6 — coding-agent capability closeouts (additive)"
|
|
294
|
+
git verify-tag v0.1.6
|
|
295
|
+
git push origin v0.1.6 # tag push triggers release.yml publish job (provenance, attestations)
|
|
296
|
+
|
|
297
|
+
# Real publication never bypasses the gates: release.mjs refuses
|
|
298
|
+
# --allow-dirty/--allow-untagged without --dry-run.
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Rollback notes.** `release:publish --version 0.1.6 --resume --report release-artifacts/publish-report.json` resumes an interrupted publication and skips only registry versions whose internal dependency fingerprint matches the local manifest. A failed package aborts the run with its status written to the report; re-run after fixing the cause. npm cannot unpublish the `0.1.6` line after 72 hours — a post-publication defect ships as a `0.1.x` patch (additive-only compat promise, `release:gate` enforced), or as a documented break in the next line with a `docs/migration.md` entry. `0.1.6` is store-compatible with `0.1.5` in **both directions** (no migration ran — same checksum-protected contract), so an operator may defer or roll back the patch without a database rollback. The next line **0.1.7** continues the frozen 0.1.x additive promise; the 0.2.0 module line (delegated agents, agent-owned persistence, host-owned seam expansions) is the next documented cut.
|
|
302
|
+
|
|
303
|
+
### 0.1.5 publish handoff (plan 017 Task 4)
|
|
304
|
+
|
|
305
|
+
**Decision: GO when the operator prerequisites below are recorded.** Release **0.1.5** (plan 017) is the **documented breaking cut** on the frozen 0.1.x line — deprecated-option removal, with the removed-symbols list, replacements, before/after examples, dynamic-config refusal behavior, store compatibility, and rollback in the top `docs/migration.md` `0.1.4 → 0.1.5` section. Removed: `ProviderRequestOptions.timeoutMs`/`maxRetries`/`maxRetryDelayMs` (inert in first-party providers; abort/retry lives at the host layer — replacements `RunOptions.signal`/`AgentConfig.retry`/`RunOptions.retry`), `RunOptions.maxToolRounds` (→ `limits.maxToolRounds`; CLI `--max-tool-rounds` unchanged), `ObservationalMemorySettingsInput` pre-0.0.19 flat keys and top-level `workerProvider`/`workerModel` aliases (→ nested `observation`/`reflection`/`dropper` configs; `sessionModel` fallback unchanged), `ReadToolOptions.autoResizeImages` (→ `transformImage`), and `INIT_PROVIDERS` (→ `listInitProviders()`). Every removal **fails closed** for untyped callers with a `TypeError` naming the replacement before any provider call, tool call, filesystem access, compaction, or session append. Compat baselines were regenerated only after the reviewed `--allow-break` break report: `arnilo__prism.txt` (removed `INIT_PROVIDERS` const + `maxToolRounds`/provider-knob member lines — interface members are not baseline text, so the delta is the `INIT_PROVIDERS` line), `arnilo__prism-coding-agent.txt` (`autoResizeImages` is an interface member — baseline delta limited to statement/re-export text if any), `arnilo__prism-compaction-observational-memory.txt` (flat keys and worker aliases are interface members — no baseline line delta expected). Publishable graph stays **49** manifests (root + 48 workspace) at exact **0.1.5**. Store compatibility with 0.1.4: **compatible, no migration** (removed options were inert aliases; nested replacements resolve to the same active values; `DEFAULT_RUN_LIMITS.maxToolRounds` 8 / hard cap 64 unchanged); zero new dependencies (lockfile name-set unchanged).
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Operator prerequisites (each a named blocked gate — none may be skipped):
|
|
309
|
+
# 1. protected live-canary matrix green (live-canaries.yml, canary-report.json retained)
|
|
310
|
+
# 2. PostgreSQL + keychain protected suites green (test:postgres, keychain suite)
|
|
311
|
+
# 3. CodeQL SAST green on the release commit (security.yml / release.yml codeql-release)
|
|
312
|
+
# 4. npm OIDC trusted publishing identity authenticated (NPM_TOKEN with id-token, provenance)
|
|
313
|
+
|
|
314
|
+
git diff --check
|
|
315
|
+
npm ci
|
|
316
|
+
npm run sdk:ready # includes typecheck, lint, format, full test, coverage, pack, release:gate
|
|
317
|
+
npm run security:threat-suites
|
|
318
|
+
PRISM_TEST_POSTGRES_URL="$DATABASE_URL" npm run test:postgres # Phase 7 + Phase 12 restart-recovery
|
|
319
|
+
npm audit --audit-level=moderate
|
|
320
|
+
npm run release:check -- --version 0.1.5 --report /tmp/prism-0.1.5-preflight.json
|
|
321
|
+
npm run release:publish -- --version 0.1.5 --dry-run --allow-dirty --allow-untagged --report /tmp/prism-0.1.5-dry-run.json
|
|
322
|
+
# run the dry-run twice and diff the reports: deterministic, byte-identical
|
|
323
|
+
|
|
324
|
+
# Sign the release on the clean tagged tree (operator GPG key):
|
|
325
|
+
git tag -s v0.1.5 -m "Prism 0.1.5 — documented breaking cut: deprecated-option removal"
|
|
326
|
+
git verify-tag v0.1.5
|
|
327
|
+
git push origin v0.1.5 # tag push triggers release.yml publish job (provenance, attestations)
|
|
328
|
+
|
|
329
|
+
# Real publication never bypasses the gates: release.mjs refuses
|
|
330
|
+
# --allow-dirty/--allow-untagged without --dry-run.
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Rollback notes.** `release:publish --version 0.1.5 --resume --report release-artifacts/publish-report.json` resumes an interrupted publication and skips only registry versions whose internal dependency fingerprint matches the local manifest. A failed package aborts the run with its status written to the report; re-run after fixing the cause. npm cannot unpublish the `0.1.5` line after 72 hours — a post-publication defect ships as a `0.1.x` patch (additive-only compat promise, `release:gate` enforced), or as a documented break in the next line with a `docs/migration.md` entry. `0.1.5` is store-compatible with `0.1.4` in **both directions** (no migration ran — same checksum-protected contract), so an operator may defer or roll back the cut without a database rollback; code/config using removed keys must be migrated first (removed keys fail closed on 0.1.5).
|
|
334
|
+
|
|
277
335
|
### 0.1.4 publish handoff (plan 016 Task 6)
|
|
278
336
|
|
|
279
337
|
**Decision: GO when the operator prerequisites below are recorded.** Release **0.1.4** (plan 016) is the internal god-module split, compat-preserving on the frozen 0.1.x line: `src/agents.ts` and `src/contracts.ts` reorganized by concern behind barrel re-exports (`contracts-core`/`contracts-run-state`/`contracts-protocol`; `agent-session`/`agent-run-lifecycle`/`agent-approval`/`agent-tool-dispatch` reusing `agent-run-state`/`agent-loops`/`compaction`) with a **byte-identical public entry surface** (0 added/0 removed/0 changed vs the 0.1.3 baseline; the 14 additive union-surface helpers are internal cross-module exports, not consumer-importable — deviation #1), measured tree-shaking improvement (111,049 → 982 B `dist/agents.js`, 9,420 → 418 B `dist/contracts.js`, module count 64 → 70; evidence in `scripts/phase16-baseline.json`), and additive **`@arnilo/prism-browser` Chrome DevTools Protocol capabilities** (Tasks 4-5): `browser_evaluate`, `browser_observe`, `block_urls`/`unblock_urls`/`throttle`/`emulate` act actions, and `{ css }`/`{ xpath }` targets on Chromium hosts — 41 added / 0 removed / 18 changed declaration texts (15 re-export-statement artifacts + 3 optional-member/signature widenings), the documented deviation #2 carve-out; root `arnilo__prism.txt` regenerated with zero breaking deltas. Publishable graph stays **49** manifests (root + 48 workspace) at exact **0.1.4**. Store compatibility with 0.1.3: **compatible, no migration**; zero new dependencies (lockfile name-set unchanged).
|
|
@@ -91,7 +91,7 @@ Blocked reasons today: `unknown_tool`, `tool_denied`, `invalid_arguments`, `perm
|
|
|
91
91
|
| Surface | Location | Behavior today |
|
|
92
92
|
| --- | --- | --- |
|
|
93
93
|
| `singleShotLoop` | `src/agent-loops.ts` | Sequential `for (const call of calls) await dispatchToolCall(call)` per provider turn |
|
|
94
|
-
| `maxToolRounds` | `AgentConfig` / `RunOptions` → `LoopContext` | Default `1` in `RuntimeAgentSession.run()` |
|
|
94
|
+
| `maxToolRounds` | `AgentConfig.limits` / `RunOptions.limits` → `LoopContext` | Default `1` in `RuntimeAgentSession.run()` |
|
|
95
95
|
| Transcript ordering | `src/agent-loops.ts` | Tool results appended in call order (Plan 053 R-002 fix shipped) |
|
|
96
96
|
| Parallelism | — | **None** — models may emit multiple calls; runtime executes one at a time |
|
|
97
97
|
|
|
@@ -290,11 +290,11 @@ export type TransformImage = (input: TransformImageInput) => Promise<Buffer>;
|
|
|
290
290
|
export interface ReadToolOptions {
|
|
291
291
|
readonly maxImageBytes?: number; // default DEFAULT_MAX_IMAGE_BYTES
|
|
292
292
|
readonly transformImage?: TransformImage;
|
|
293
|
-
/** @deprecated Use transformImage instead; ignored when transformImage is absent. */
|
|
294
|
-
readonly autoResizeImages?: boolean;
|
|
295
293
|
}
|
|
296
294
|
```
|
|
297
295
|
|
|
296
|
+
`autoResizeImages` was removed in 0.1.5; the supported `transformImage` callback is the only resize path. Untyped callers passing the old key fail closed before any filesystem access.
|
|
297
|
+
|
|
298
298
|
Reject oversize images by `stat` before full read where possible; re-check `buffer.length` after read and after `transformImage`. MIME from magic bytes only (existing behavior). `transformImage` is host-owned; base package stays free of image-processing deps. Implemented in `packages/coding-agent/src/read.ts`.
|
|
299
299
|
|
|
300
300
|
## Conformance and threat-model matrix
|
package/docs/tools.md
CHANGED
|
@@ -161,7 +161,7 @@ Need different tools for one request? Build a short-lived agent/session with a n
|
|
|
161
161
|
|
|
162
162
|
### Artifact-loop tools
|
|
163
163
|
|
|
164
|
-
`generate-validate-revise` treats provider tools as inert by default. Set `loop.toolCalls: "bounded"` and `RunOptions.maxToolRounds` only when an artifact needs a host-owned lookup before its next candidate. Each response with one-or-more calls consumes one shared round, dispatches calls sequentially through this exact `dispatchToolCall()` path, persists assistant-call then result transcript rows, and skips artifact parsing/validation for that response. A post-limit call executes nothing; the loop emits `artifact_failed` with `metadata.reason: "tool_round_limit"`. Tools do not consume `maxRevisions`, and tool schemas/context never grant authority.
|
|
164
|
+
`generate-validate-revise` treats provider tools as inert by default. Set `loop.toolCalls: "bounded"` and `RunOptions.limits.maxToolRounds` only when an artifact needs a host-owned lookup before its next candidate. Each response with one-or-more calls consumes one shared round, dispatches calls sequentially through this exact `dispatchToolCall()` path, persists assistant-call then result transcript rows, and skips artifact parsing/validation for that response. A post-limit call executes nothing; the loop emits `artifact_failed` with `metadata.reason: "tool_round_limit"`. Tools do not consume `maxRevisions`, and tool schemas/context never grant authority.
|
|
165
165
|
|
|
166
166
|
### Runtime-supplied validators
|
|
167
167
|
|
|
@@ -220,7 +220,7 @@ Opt in through `loop.toolConcurrency` on `AgentConfig` / `RunOptions` (single-sh
|
|
|
220
220
|
|
|
221
221
|
```ts
|
|
222
222
|
await session.run(input, {
|
|
223
|
-
maxToolRounds: 3,
|
|
223
|
+
limits: { maxToolRounds: 3 },
|
|
224
224
|
loop: { strategy: "single-shot", toolConcurrency: 4 },
|
|
225
225
|
});
|
|
226
226
|
```
|
|
@@ -24,11 +24,11 @@ Prism separates the **session chat model** (`AgentConfig.model` / `RunOptions.mo
|
|
|
24
24
|
```ts
|
|
25
25
|
import { resolveUseCaseModel, applyThinkingLevel, thinkingFamilyForModel } from "@arnilo/prism";
|
|
26
26
|
|
|
27
|
-
// Prefer an explicit worker; otherwise inherit the session/agent model.
|
|
27
|
+
// Prefer an explicit worker model; otherwise inherit the session/agent model.
|
|
28
28
|
const resolved = resolveUseCaseModel({
|
|
29
|
-
configured: settings.
|
|
30
|
-
sessionModel: agent.config.model,
|
|
31
|
-
thinkingLevel: settings.thinkingLevel,
|
|
29
|
+
configured: settings.observation?.model, // optional per-worker ModelConfig
|
|
30
|
+
sessionModel: agent.config.model, // host-supplied; AgentSession does not expose agent
|
|
31
|
+
thinkingLevel: settings.observation?.thinkingLevel,
|
|
32
32
|
});
|
|
33
33
|
if (!resolved) {
|
|
34
34
|
// skip — neither configured nor session model (or requireExplicitModel)
|
|
@@ -52,7 +52,7 @@ Resolution is O(1) and network-free. It does not mutate session history.
|
|
|
52
52
|
|
|
53
53
|
| Site | How hosts bind | Session fallback |
|
|
54
54
|
| --- | --- | --- |
|
|
55
|
-
| Observational memory | `
|
|
55
|
+
| Observational memory | `observation.model` / `reflection.model` / `dropper.model` + runtime `sessionModel` | Yes — pass `sessionModel: agent.config.model`; `requireExplicitModel` restores skip |
|
|
56
56
|
| LLM compaction | `summaryModel` with `model` as fallback slot | Yes — `resolveUseCaseModel({ configured: summaryModel, sessionModel: model })` |
|
|
57
57
|
| `RunOptions.model` | Per-run override on the **session** | N/A — this *is* the session/run model (writes `model_change`) |
|
|
58
58
|
| Declarative `AgentDefinition` | Definition `model` / registry resolve | Definition-scoped (independent agent) |
|
|
@@ -67,17 +67,18 @@ Resolution is O(1) and network-free. It does not mutate session history.
|
|
|
67
67
|
createObservationalMemoryRuntime({
|
|
68
68
|
session,
|
|
69
69
|
appendEntry: (entry) => store.append(entry),
|
|
70
|
-
workerProvider,
|
|
71
|
-
sessionModel: agent.config.model, // enables fallback when
|
|
72
|
-
//
|
|
73
|
-
overrides: { thinkingLevel: "low",
|
|
70
|
+
observation: { provider: workerProvider }, // optional per-worker model override below
|
|
71
|
+
sessionModel: agent.config.model, // enables fallback when no worker model is configured
|
|
72
|
+
// observation: { provider: workerProvider, model: { provider: "neuralwatt", model: "glm-5.2-fast" } },
|
|
73
|
+
overrides: { observation: { thinkingLevel: "low", messageTokens: 1 } },
|
|
74
74
|
});
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
- Default: no `
|
|
78
|
-
- Explicit `
|
|
77
|
+
- Default: no worker `model` + `sessionModel` set → workers use the session model.
|
|
78
|
+
- Explicit per-worker `model` (or settings `observation.model` / `reflection.model` / `dropper.model`) always wins.
|
|
79
79
|
- `requireExplicitModel: true` (runtime or settings) → `skipped: "missing_model"` when no worker model, even if `sessionModel` is set.
|
|
80
80
|
- Neither worker nor session model → `skipped: "missing_model"`.
|
|
81
|
+
- Top-level `workerProvider` / `workerModel` aliases were removed in 0.1.5; workers resolve only from the nested `observation` / `reflection` / `dropper` configs.
|
|
81
82
|
- Default credential request uses the **resolved** model's `provider` id.
|
|
82
83
|
|
|
83
84
|
## LLM compaction
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnilo/prism",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Agent harness for AI providers, agents, sessions, and tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
"packages/enterprise-postgres",
|
|
135
135
|
"packages/browser",
|
|
136
136
|
"packages/ag-ui",
|
|
137
|
+
"packages/document-reader",
|
|
137
138
|
"packages/prism-*"
|
|
138
139
|
],
|
|
139
140
|
"scripts": {
|
|
@@ -142,7 +143,7 @@
|
|
|
142
143
|
"build": "npm run build:core && npm run build --workspaces --if-present",
|
|
143
144
|
"typecheck": "npm run build && npm run typecheck --workspaces --if-present && tsc -p examples --noEmit",
|
|
144
145
|
"sweep:unused": "node scripts/sweep-unused.mjs",
|
|
145
|
-
"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 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/benchmark-0.1.0.test.mjs scripts/sweep-unused.test.mjs scripts/e2e-enterprise-journey.test.mjs scripts/e2e-coding-journey.test.mjs && npm run test --workspaces --if-present",
|
|
146
|
+
"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 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/benchmark-0.1.0.test.mjs scripts/sweep-unused.test.mjs scripts/e2e-enterprise-journey.test.mjs scripts/e2e-coding-journey.test.mjs && npm run test --workspaces --if-present",
|
|
146
147
|
"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/**' --test-coverage-exclude='**/packages/**' --test-coverage-exclude='**/examples/**' dist/__tests__/*.test.js && node scripts/coverage-summary.mjs",
|
|
147
148
|
"coverage:summary": "node scripts/coverage-summary.mjs",
|
|
148
149
|
"lint": "biome lint .",
|