@arnilo/prism 0.3.2 → 0.5.0
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 +50 -1
- package/README.md +42 -62
- package/dist/agent-run-lifecycle.js +4 -0
- package/dist/agent-run-state.d.ts +5 -2
- package/dist/agent-run-state.js +18 -8
- package/dist/agent-session/session/assemble.d.ts +6 -0
- package/dist/agent-session/session/assemble.js +391 -0
- package/dist/agent-session/session/persist.d.ts +28 -0
- package/dist/agent-session/session/persist.js +166 -0
- package/dist/agent-session/session/provider-round.d.ts +6 -0
- package/dist/agent-session/session/provider-round.js +231 -0
- package/dist/agent-session/session/tool-round.d.ts +31 -0
- package/dist/agent-session/session/tool-round.js +473 -0
- package/dist/agent-session/session/types.d.ts +115 -0
- package/dist/agent-session/session/types.js +5 -0
- package/dist/agent-session/session.d.ts +54 -41
- package/dist/agent-session/session.js +23 -1132
- package/dist/capture.d.ts +63 -0
- package/dist/capture.js +67 -0
- package/dist/cli-dev.d.ts +29 -0
- package/dist/cli-dev.js +52 -0
- package/dist/cli-init.d.ts +34 -3
- package/dist/cli-init.js +192 -24
- package/dist/cli-runner.d.ts +6 -2
- package/dist/cli-runner.js +57 -10
- package/dist/content.d.ts +3 -3
- package/dist/content.js +3 -1
- package/dist/contracts-core/agent.d.ts +8 -0
- package/dist/contracts-core/batch.d.ts +97 -0
- package/dist/contracts-core/batch.js +65 -0
- package/dist/contracts-core/content.d.ts +72 -1
- package/dist/contracts-core/embeddings.d.ts +30 -0
- package/dist/contracts-core/embeddings.js +17 -0
- package/dist/contracts-core/images.d.ts +60 -0
- package/dist/contracts-core/images.js +17 -0
- package/dist/contracts-core/moderation.d.ts +46 -0
- package/dist/contracts-core/moderation.js +34 -0
- package/dist/contracts-core/speech.d.ts +39 -0
- package/dist/contracts-core/speech.js +17 -0
- package/dist/contracts-core/transcription.d.ts +48 -0
- package/dist/contracts-core/transcription.js +17 -0
- package/dist/contracts-core/video.d.ts +61 -0
- package/dist/contracts-core/video.js +17 -0
- package/dist/contracts-core.d.ts +7 -0
- package/dist/contracts-core.js +7 -0
- package/dist/contracts-protocol.d.ts +18 -0
- package/dist/contracts-run-state.d.ts +1 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +5 -3
- package/dist/input.d.ts +8 -0
- package/dist/input.js +4 -0
- package/dist/node/agent-definitions.d.ts +1 -8
- package/dist/node/agent-definitions.js +0 -34
- package/dist/node/settings.d.ts +0 -1
- package/dist/node/settings.js +0 -5
- package/dist/pinned-fetch.js +29 -3
- package/dist/provider-events.js +3 -4
- package/dist/providers/media.d.ts +1 -2
- package/dist/providers/media.js +1 -4
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +4 -4
- package/dist/testing/persistence-schema.d.ts +1 -1
- package/dist/testing/persistence-schema.js +32 -28
- package/dist/testing/provider-conformance.d.ts +114 -5
- package/dist/testing/provider-conformance.js +342 -0
- package/dist/testing/tool-conformance.d.ts +25 -0
- package/dist/testing/tool-conformance.js +128 -1
- package/dist/testing/tool-effect-store-conformance.d.ts +0 -1
- package/dist/testing/tool-effect-store-conformance.js +0 -3
- package/dist/thinking.d.ts +48 -9
- package/dist/thinking.js +134 -8
- package/dist/tool-search.d.ts +76 -0
- package/dist/tool-search.js +199 -0
- package/docs/0.1.0-readiness.md +3 -3
- package/docs/a2a.md +2 -2
- package/docs/acp-agent.md +1 -1
- package/docs/acp.md +3 -3
- package/docs/ag-ui-adoption.md +1 -1
- package/docs/ag-ui.md +1 -2
- package/docs/agent-definitions.md +1 -1
- package/docs/agent-events.md +5 -5
- package/docs/agent-identity.md +13 -2
- package/docs/audit-export.md +3 -3
- package/docs/batch-jobs.md +120 -0
- package/docs/browser-automation.md +5 -5
- package/docs/caveman.md +2 -2
- package/docs/cli-rpc.md +43 -9
- package/docs/coding-agent-tools.md +19 -19
- package/docs/coding-review-and-diagnostics.md +2 -2
- package/docs/coding-security.md +5 -5
- package/docs/coding-tools.md +82 -0
- package/docs/coding-workspaces.md +2 -2
- package/docs/compaction-and-retry.md +2 -2
- package/docs/compaction-llm.md +4 -4
- package/docs/compaction-observational-memory.md +3 -3
- package/docs/computer-use-linux.md +13 -2
- package/docs/context-and-skills.md +3 -1
- package/docs/conversations.md +4 -4
- package/docs/core.md +85 -0
- package/docs/credential-storage.md +12 -8
- package/docs/credentials-and-redaction.md +1 -1
- package/docs/data-classification.md +1 -1
- package/docs/database-persistence.md +7 -3
- package/docs/dev-inspector.md +103 -0
- package/docs/device-adapters.md +2 -2
- package/docs/diagrams.md +247 -0
- package/docs/document-reader.md +6 -6
- package/docs/documents.md +214 -0
- package/docs/embeddings.md +112 -0
- package/docs/enterprise-postgres-state.md +7 -7
- package/docs/evaluations.md +41 -7
- package/docs/extensions.md +3 -3
- package/docs/forge-integration.md +3 -3
- package/docs/graft.md +5 -5
- package/docs/guardrails.md +2 -2
- package/docs/host-security.md +16 -15
- package/docs/image-generation.md +129 -0
- package/docs/impeccable.md +7 -5
- package/docs/index.md +84 -46
- package/docs/indexed-code-search.md +2 -2
- package/docs/language-intelligence.md +4 -4
- package/docs/live-testing.md +126 -0
- package/docs/mcp-tools.md +44 -13
- package/docs/middleware-hooks.md +1 -1
- package/docs/migrate-to-0.4.md +312 -0
- package/docs/migrate-to-0.5.md +122 -0
- package/docs/migration.md +51 -1
- package/docs/model-registry.md +38 -0
- package/docs/model-routing.md +6 -6
- package/docs/moderation.md +117 -0
- package/docs/multi-agent-patterns.md +177 -0
- package/docs/multimodal-content.md +27 -3
- package/docs/obscura.md +12 -12
- package/docs/observability.md +32 -7
- package/docs/openapi-tools.md +14 -4
- package/docs/operations.md +11 -0
- package/docs/performance.md +30 -10
- package/docs/persistence-credentials-multimodality-primitives.md +7 -7
- package/docs/policy-and-audit.md +18 -8
- package/docs/ponytail.md +3 -3
- package/docs/postgres-persistence.md +5 -5
- package/docs/process-sessions.md +2 -2
- package/docs/prompt-registry.md +106 -0
- package/docs/provider-caching.md +36 -32
- package/docs/provider-conformance.md +24 -2
- package/docs/provider-packages.md +58 -22
- package/docs/provider-primitives.md +5 -5
- package/docs/provider-request-policies.md +1 -1
- package/docs/providers/ai-sdk.md +18 -6
- package/docs/providers/alibaba.md +10 -6
- package/docs/providers/anthropic.md +10 -6
- package/docs/providers/azure.md +20 -4
- package/docs/providers/bedrock.md +18 -3
- package/docs/providers/clinepass.md +7 -3
- package/docs/providers/commandcode.md +253 -0
- package/docs/providers/deepseek.md +7 -3
- package/docs/providers/google.md +8 -4
- package/docs/providers/hyper.md +284 -0
- package/docs/providers/kimi.md +7 -3
- package/docs/providers/neuralwatt.md +12 -8
- package/docs/providers/ollama.md +18 -3
- package/docs/providers/openai-compatible.md +5 -1
- package/docs/providers/openai.md +9 -5
- package/docs/providers/opencode-go.md +8 -4
- package/docs/providers/openrouter.md +8 -4
- package/docs/providers/vertex.md +21 -5
- package/docs/providers/xai.md +7 -3
- package/docs/providers/zai.md +7 -3
- package/docs/rag.md +31 -9
- package/docs/release-and-install.md +181 -76
- package/docs/resource-loading.md +1 -1
- package/docs/runs-and-usage.md +28 -3
- package/docs/server.md +94 -5
- package/docs/settings-auth-trust-security.md +7 -5
- package/docs/sheets.md +229 -0
- package/docs/speech.md +126 -0
- package/docs/sqlite-persistence.md +4 -4
- package/docs/supervisors.md +4 -3
- package/docs/thinking-and-reasoning.md +93 -60
- package/docs/tool-conformance.md +28 -3
- package/docs/tool-execution-primitives.md +8 -8
- package/docs/tools.md +32 -5
- package/docs/web-tools.md +3 -3
- package/docs/wiki.md +7 -7
- package/docs/work-artifacts-and-review.md +17 -6
- package/docs/work-connectors.md +4 -4
- package/docs/work-tools.md +5 -5
- package/docs/workflow-orchestration-primitives.md +35 -11
- package/docs/workflows.md +74 -13
- package/docs/working-and-semantic-memory.md +53 -5
- package/package.json +14 -31
- package/templates/README.md +23 -0
- package/templates/deep-research/README.md.tmpl +47 -0
- package/templates/deep-research/env.example.tmpl +12 -0
- package/templates/deep-research/gitignore.tmpl +7 -0
- package/templates/deep-research/manifest.json +12 -0
- package/templates/deep-research/package.json.tmpl +23 -0
- package/templates/deep-research/src/agent.ts.tmpl +81 -0
- package/templates/deep-research/src/index.ts.tmpl +53 -0
- package/templates/deep-research/src/tests/research.test.ts.tmpl +114 -0
- package/templates/deep-research/src/tools.ts.tmpl +86 -0
- package/templates/deep-research/src/types.ts.tmpl +45 -0
- package/templates/deep-research/src/workflow.ts.tmpl +156 -0
- package/templates/deep-research/tsconfig.json.tmpl +15 -0
- package/templates/init/manifest.json +5 -0
- package/templates/init/package.json.tmpl +2 -1
- package/templates/init/providers.json +40 -24
- package/docs/antigravity-agent.md +0 -207
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
+
## [0.5.0] - 2026-09-06 (plans 055-065)
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
- **Thinking/reasoning effort is now model-aware, declared, and snapped across all first-party providers (plan 065):** core gains `applyThinkingLevelForModel(base, level, model)` (family resolution + snap + merge in one call), `parseThinkingLevel` (known portable level → canonical; other non-empty string → opaque passthrough; empty/non-string → `undefined`, fail closed), `isSupportedThinkingLevel`, `thinkingLevelsForModel`, and `snapThinkingLevel` (nearest declared by ladder distance, ties break up, below-minimum snaps up; provider-documented tables remain wire authority). `ModelCapabilities` gains `thinkingLevels?: readonly string[]`; family inference is stamp-first via the new `compat.thinkingFamily` stamp set by every first-party catalog. Two new core compat families: `google` (`{ thinkingLevel }` → `generationConfig.thinkingConfig`) and `output_config_effort` (`{ output_config: { effort } }` → Anthropic Messages / DeepSeek anthropic-format). Per-provider: OpenAI catalogs declare per-family effort tables (gpt-5.1 `none/low/medium/high` default `none`; gpt-5.2 `none`–`xhigh` default `medium`) with Responses-side clamping; Google stamps per-model thinkingLevel sets (3.x) and budget ranges (2.5, `none` → range minimum); Anthropic emits generation-aware thinking (`adaptive` on 4.6+, legacy 4.5 budget default 10000) with per-model effort declarations; Azure/Vertex/Bedrock forward sanitized thinking compat through `buildBodyExtra` (previously silently dropped); Kimi K3, Z.AI GLM-5.2/5.3, and DeepSeek declare documented snap tables; xAI now sends `reasoning_effort` (grok-4.6 `low`–`xhigh`, grok-4.5 `low/medium/high`, grok-4.3 `none`–`high`) instead of dropping it; OpenRouter derives declared levels from the models API (`reasoning.supported_efforts`); Hyper snaps instead of dropping out-of-set efforts and derives levels from the live `effort_levels` list; ClinePass declares levels by inverting its slot maps; the shared Anthropic-Messages route gained `thinking`/`effort` hook slots (hyper/commandcode bind resolvers; opencode-go deleted its private serializer copy for the shared route); commandcode/opencode-go carry provenance-commented level tables; Alibaba/Qwen maps the `thinking_type` family onto `enable_thinking` with thinking-only models never disabled; Ollama/NeuralWatt declare + snap `reasoning_effort`. `@arnilo/prism-memory` workers (LLM compaction, observational memory) now use the single model-aware adapter. Conformance: a cross-catalog walk (`thinking-conformance.test.ts`) machine-checks all 133 reasoning-capable catalog models (declarations + legal wire fields + no verbatim leakage), generated evidence matrix `docs/_evidence/thinking-coverage-2026-09-05.md`, and env-gated live probes pin the riskiest wire changes (Anthropic `output_config.effort` + legacy-field outcome, Google `thinkingLevel`, xAI/Kimi/Z.AI `reasoning_effort`, GLM-5.3 `thinking.type: disabled` rejection gate, Azure `reasoning_effort`). Breaking wire moves + new exports in `docs/migrate-to-0.5.md`; contract rewrite in `docs/thinking-and-reasoning.md`; per-provider pages document declared levels, wire fields, and snapping.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **CLI real-provider support (plan 064 Task 5):** `prism --provider <id>` now runs real providers, not just the built-in mock — provider ids resolve through the init provider catalog (`templates/init/providers.json`, single source shared with `prism init` scaffolding via new `factoryModule`/`factoryExport` fields): the CLI dynamically imports the provider factory from the installed `@arnilo/prism-providers/*` package and reads the catalog's credential env var. `--mode print|json|rpc` all honor it; RPC's session factory became async-capable (`AgentSession | Promise<AgentSession>`) to support the dynamic import. Without `--provider` the CLI still fails with a usage error (unchanged contract). Covered by the new packed-install live journey `scripts/e2e-cli-live.test.mjs` (scaffold + `providers add` + print/json/rpc over the real wire + full-transcript secret scan; matrix entry `cli/journey`).
|
|
9
|
+
- **`@arnilo/prism-mcp` completes the MCP 2026-07-28 adoption (plan 063):** modular TypeScript SDK v2 (`@modelcontextprotocol/client` + `@modelcontextprotocol/server` 2.0.0 exact pins) replaces the monolithic `@modelcontextprotocol/sdk` 1.30.0; modern client negotiation (`legacy`/`auto`/`{pin}` with one bounded discovery probe), negotiated-era exposure, SDK-managed routing headers with `Mcp-Param-*` mirroring (SEP-2243), SDK subscriptions + explicit-cursor lists + `callTool({toolDefinition})`, SEP-2549 list-cache hints (private per principal by default), elicitation via SDK MRTR auto-fulfilment with `maxMrtrRounds` (roots/sampling callbacks `@deprecated` per SEP-2577), dual-era HTTP/stdio serving through `createMcpHandler`/`serveStdio` with host/origin gates in front, and 2026-07-28-conformant OAuth (issuer-keyed storage, CIMD preferred, RFC 9207 `iss` validation, explicit insufficient-scope policy). Tasks (`io.modelcontextprotocol/tasks`) intentionally not advertised; draft-era task vocabulary fails closed. Conformance: official suite (latest published spec version 2025-11-25 — no 2026-07-28 scenarios upstream yet) 20/20 expressible scenarios green against the dual-era serving fixture with the remaining 14 scenarios recorded as documented Prism boundaries in `scripts/mcp-conformance-2026-baseline.yaml`; two real defects found and fixed by the matrix (no-argument prompts rejected `undefined` args; tool inputSchema lost `$schema`/`$defs`/`$ref`/`additionalProperties` through the zod round-trip). Full migration table + legacy-session timeline in `docs/migration.md`; canonical API in `docs/mcp-tools.md`.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **pdf-parse 1.1 → 2.4 migration (plan 062, parser CVE class):** `@arnilo/prism-coding-tools` document-reader moves `pdf-parse` `^1.1.1` → `^2.4.5` (optional peer) and the two optional peers (`pdf-parse`, `mammoth`) become explicit devDependencies so the fixture suites actually run in this repo (previously they self-skipped via `PEERS_OK`). v2 replaced the v1 `pdf(buffer) → {numpages, text}` function with a `PDFParse` class: adapter now constructs `new PDFParse({ data, isEvalSupported: false })`, calls `getText({ pageJoiner: "" })`, and `destroy()`s in `finally`; page count reads `result.total` instead of `numpages`. `isEvalSupported: false` hard-disables pdf.js `eval` of PDF functions — the reader contract forbids embedded script execution (v1 did not disable it). Engine constraints for hosts: v2 parses in a worker thread (the `data` TypedArray is transferred, so the caller must not reuse the buffer — the adapter passes a fresh view per extract), requires Node ≥ 20.16 (repo already `engines.node >=20`), and ships CJS + ESM builds with a browser bundle; bundlers must resolve the `import`/`require` conditions of the new exports map. Golden deltas: extracted text for the committed fixtures is byte-identical to v1 modulo trailing `\n` (page-boundary markers suppressed via `pageJoiner: ""`); the 1000-page budget fixture parses in ~223ms (ceiling 2000ms, v1 baseline ~162ms — no regression). New fuzz smoke: a `%PDF-`-magic 256KiB garbage buffer rejects within the budget ceiling instead of hanging. Full coding-tools suite 646 pass / 0 fail; workspace typecheck green; root suite green.
|
|
14
|
+
- **better-sqlite3 12 → 13 migration (plan 062):** `@arnilo/prism-core` moves `better-sqlite3` `^12.11.1` → `^13.0.3` (optional peer) with `@types/better-sqlite3` `^7.6.13` → `^9.6.0`. Upstream 13 is an N-API rewrite (`node-addon-api`): no removed or changed APIs — only additions (`db.explain()`, `statement.toString()`) and a `SqliteError` cross-realm fix. Packaging change for hosts: 13 removes the deprecated `prebuild-install` and bundles prebuilt N-API binaries for supported platforms directly in the package (one binary across Node versions — no per-Node rebuild); unsupported platform/arch compiles from source during install as before (`npm rebuild better-sqlite3` after a toolchain change). No SQL construction or prepared-statement layout changed in the adapter (statements remain hoisted `db.prepare` consts); all sqlite session/enterprise/prompt suites green (34 pass / 1 env-gated skip), packed-tarball fresh-install native-load + round-trip smoke green, benchmark gate medians green.
|
|
15
|
+
- **Keyring 2 migration (plan 062, credential-storage boundary):** `@arnilo/prism-core` moves `@napi-rs/keyring` `^1.3.0` → `^2.0.0`. Upstream 2.0 changes error reporting, not success paths: reads (`getPassword`/`getSecret`) and deletes (`deleteCredential`) now reject on locked/inaccessible stores instead of silently resolving `undefined`/`false`; a missing credential still resolves `undefined`, and `false` from a delete now guarantees absence. The keychain adapter (`packages/prism-core/src/credentials/node/keychain-store.ts`) already routes every native call through `runKeychainOperation` → typed-error mapping (`CredentialStoreLockedError`/`CredentialStoreUnavailableError`/`CredentialStoreTimeoutError`), so host-visible behavior is unchanged in shape and strictly safer in semantics: a locked keychain now surfaces as a typed locked-store error instead of masquerading as an empty vault (which under 1.x could lead a `set()` to overwrite the real vault). Async signatures (`signal` parameters, binary `getSecret`, `AsyncEntry`) unchanged. Evidence: full credential-node suite 75/75 green; live Secret Service round-trip (`PRISM_TEST_KEYCHAIN=1`, credential + OAuth set/get/delete) green on Linux keyring 2.0.0; macOS/Windows legs are not exercisable in CI (all legs ubuntu) — the round-trip test ships gated per platform via `PRISM_TEST_KEYCHAIN=1`.
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
- **Dead-export removal wave (plan 058 task 3, breaking):** all 27 unused public exports classified `deprecate`/`remove` in `docs/_evidence/dead-export-verification-2026-09-03.md` are deleted in one coordinated 0.5.0 cut (deprecated at 0.5.0-precursor in the same cycle). Per package — `@arnilo/prism`: `statusFromState`, `isInitProvider`, `isInitTemplate`, `parseContextFile`, `parseToolFile`, `defaultUserSettingsPath`, `resolveProviderMediaBlock`, `ProviderSecretLeakConformanceOptions`, `runToolEffectStoreConformance`; `@arnilo/prism-core`: `OidcIdentityVerifierResult`, `assertDiffLines`, `ResolvedPromptLimits`, `encodeMetadata`, `parseListOffsetCursor`, `nodeKindOf`; `@arnilo/prism-memory`: `DEFAULT_MAX_PROMPT_CHARS`, `GRAFT_RESOLVE_ERROR_CODE`, `LinterOptions`, `ResolvedGraftExtension`, `WikiCategory`; `@arnilo/prism-coding-tools`: `codingSha256Hex`, `DEFAULT_MAX_REVIEW_DELTA_ENTRIES`, `HARD_MAX_REVIEW_DELTA_ENTRIES`, `indexErrorCode`, `PONYTAIL_PEER_RANGE`, `CavemanSkillName`; `@arnilo/prism-providers`: `withOpenRouterCacheMarker`. All had zero in-repo references (test-only false positives were reclassified keep by the verification sweep; security guards are keep-classified and untouched). Compat baselines regenerated at the cut; intentional breaks recorded in `docs/migration.md`; removal table + replacements in `docs/migrate-to-0.5.md`. `scripts/unused-report.json` deadExports → 0 (the scan now counts test/example/script/template usage and suppresses keep-classified zero-ref exports). All manifests bump 0.4.x → 0.5.0 lockstep; internal ranges `^0.4.0` → `^0.5.0`. Security keeper surface (ownership/checkpoint guards, `secureCompare`, `zeroBuffer`, sandbox path-escape guard, RAG scope guard, MCP content-bounds guard, secret-leak conformance assert) unchanged.
|
|
19
|
+
- Removed `@arnilo/prism-antigravity-agent` workspace, package surface, active documentation, release wiring, and host-conformance branch. Delegated CLI execution belongs to hosts and composes through generic process, tool, MCP, supervisor, or A2A contracts.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- Updated `@nanonets/graft` peer support to `^0.16.0`, AG-UI packages to `0.0.59`, `@ai-sdk/provider` to `4.0.10`, Office Open packages to `0.13.1`, Biome to `2.5.11`, and `fast-xml-parser` to `5.11.1`.
|
|
23
|
+
- Refreshed lockfile transitive dependencies; `npm audit` reports zero vulnerabilities.
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
- **Type-level deprecation wave (plan 058, task 2):** 27 unused public exports now carry `@deprecated` JSDoc naming "no replacement" and the 0.5.0 removal plan; runtime behavior is unchanged (no warnings). Per package — `@arnilo/prism`: `statusFromState`, `isInitProvider`, `isInitTemplate`, `parseContextFile`, `parseToolFile`, `defaultUserSettingsPath`, `resolveProviderMediaBlock`, `ProviderSecretLeakConformanceOptions`, `runToolEffectStoreConformance`; `@arnilo/prism-core`: `OidcIdentityVerifierResult`, `assertDiffLines`, `encodeMetadata`, `parseListOffsetCursor`, `nodeKindOf`, `ResolvedPromptLimits` (marked for removal); `@arnilo/prism-memory`: `DEFAULT_MAX_PROMPT_CHARS`, `GRAFT_RESOLVE_ERROR_CODE`, `LinterOptions`, `ResolvedGraftExtension` (marked for removal), `WikiCategory` (marked for removal); `@arnilo/prism-coding-tools`: `codingSha256Hex`, `DEFAULT_MAX_REVIEW_DELTA_ENTRIES`, `HARD_MAX_REVIEW_DELTA_ENTRIES`, `indexErrorCode`, `PONYTAIL_PEER_RANGE`, `CavemanSkillName` (marked for removal); `@arnilo/prism-providers`: `withOpenRouterCacheMarker`. All are removed in the 0.5.0 cut above (plan 058 task 3, `docs/migrate-to-0.5.md`).
|
|
27
|
+
|
|
28
|
+
## [0.4.1] - 2026-09-02 (plan 055)
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- **Two new first-class provider adapters (plan 055):** `@arnilo/prism-providers` (0.4.0 → 0.4.1, Decision B changed-package cut) gains `./hyper` (Charm Hyper — dual-route `/v1/chat/completions` + `/v1/messages` adapter with cache_control on Anthropic-shaped models and Hypercredit cost telemetry) and `./commandcode` (Command Code Provider API — dual-route `/provider/v1/chat/completions` + `/provider/v1/messages` adapter with cache_control on Claude tiers and optional ZDR). Both keep zero network at setup, caller-gated model discovery, provider-owned header enforcement, secret redaction, and offline conformance suites; live probes are operator-gated behind `PRISM_LIVE_PROVIDER_TESTS=1` + provider key. Public symbols and trust boundaries unchanged except the two new subpaths; peer `@arnilo/prism@^0.4.0` unchanged; no root package change (docs only).
|
|
32
|
+
|
|
33
|
+
## [0.4.0] - 2026-09-01 (plan 054)
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
- **Package consolidation (breaking import/package cut):** 11 active packages replace the 0.3.x graph. Families: `@arnilo/prism-core`, `@arnilo/prism-coding-tools`, `@arnilo/prism-web-tools`, `@arnilo/prism-memory`, `@arnilo/prism-providers` (17 adapter subpaths), `@arnilo/prism-office` (`/documents`, `/sheets`, `/diagrams`). Retired 54 published names stay installable at exact 0.3 pins; npm `legacy` dist-tag + `<0.4.0` deprecation warnings point at `docs/migrate-to-0.4.md`. Profile packages `prism-base`/`prism-code`/`prism-sdk`/`prism-all`/`prism-compaction` are gone — install the families. Peers and internal ranges are `^0.4.0`. No persisted-shape change; rollback = exact 0.3 pins.
|
|
37
|
+
|
|
38
|
+
## [0.3.3] - 2026-08-31 (plans 041-044, 051, 052, 053)
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
- **Documents engine (`@arnilo/prism-documents@0.3.0`, plan 051)**: Initial release of `@arnilo/prism-documents` with peer `@arnilo/prism@^0.3.0` (independent Decision B publication, omitted from `@arnilo/prism-all` and profile packages) — pure in-memory OpenXML generation, parsing, patching, and bounded preview rendering for Word (`.docx`), Excel (`.xlsx`), and PowerPoint (`.pptx`) artifacts; exact-pinned sub-packages `@office-open/{docx,xlsx,pptx}@0.12.3`; Draft-07 JSON Schema validation with on-demand slicing (`getDocumentModelSchema`) and transitive closures; typed AST patch engine with immutable undo/redo history (`createPatchHistory`); framework-neutral preview blocks and sanitize-by-construction HTML snippets; `SecretRedactor` boundary sanitization hook; dependency-free `DocumentsTelemetry` seam; and documented decimal fidelity ceiling (`{ type: "decimal", value: string }` representation with IEEE-754 round-trip limits in Excel cells).
|
|
42
|
+
- **Spreadsheet & CSV parsing engine (`@arnilo/prism-sheets@0.3.0`, plan 052)**: Initial release of `@arnilo/prism-sheets` with peer `@arnilo/prism@^0.3.0` (independent Decision B publication, omitted from `@arnilo/prism-all` and profile packages) — XLSX (`@office-open/xlsx@0.12.3` exact pin) and zero-dependency RFC 4180 CSV parsing with dialect sniffing (delimiter scoring across `,`, `;`, `\t`, `|`, quoted-region isolation, UTF-8 BOM stripping, UTF-16 rejection); decimal-safe typed schema inference (`inferAndTransformRows`, `normalizeDecimal`) with headline financial precision guarantees (monetary figures and currency patterns inferred as decimal strings `{ type: "decimal", value: string }` with zero floating-point coercion on decimal value paths; ambiguous numerics flagged `numeric-ambiguous`); bounded sampling window with full-parse validation; fail-closed caps (`DEFAULT_SHEETS_CAPS`: 100 MB file, 5M rows, 16k columns, 256 sheets, 500-row sample window, 20 max warnings); structured `InferenceWarning` and `SheetsDialectMismatchWarning` diagnostics; formula cell representation (`{ type: "formula", formula: string, value?: CellValue }`); dependency-free `SheetsTelemetry` seam.
|
|
43
|
+
- **Diagrams & draw.io embed client (`@arnilo/prism-diagrams@0.3.0`, plan 053)**: Initial release of `@arnilo/prism-diagrams` with peer `@arnilo/prism@^0.3.0` (independent Decision B publication, omitted from `@arnilo/prism-all` and profile packages) — origin-enforced iframe embed client (`createDrawioEmbed`) implementing diagrams.net `proto=json` protocol with dual inbound origin/source verification, strict outbound targetOrigin enforcement, and no public SaaS defaults (self-hosting as the documented deployment); typed lifecycle events (`init`, `load`, `save`, `autosave`, `exit`, `configure`, `export`, `error`); save-with-preview workflows generating SVG (`xmlsvg`) or PNG visual snapshots; XXE-safe mxGraph XML validation (`validateDrawioXml`) rejecting DOCTYPE/ENTITY declarations and billion-laughs payloads under strict element/attribute/byte caps; byte-stable deterministic XML canonicalization (`canonicalizeDrawioXml`) for content hashing; Visio binary (`.vsd`) and OpenXML (`.vsdx`) exclusion guard (`assertNotVisio`, P12); and dependency-free telemetry seam (`DiagramsTelemetry`, P15).
|
|
44
|
+
- **Progressive tool loading (plan 041)**: `search_tools({ query, k? })` — bounded inert name+description results (lexical disclosure, never wider than the eligible list, never zero via deterministic prefix), session-scoped activation persisted as names-only, dispatch re-checks allow/deny on every call (disclosure is not an authorization boundary). Benchmark: 86.4% provider-request tool-byte reduction at 128 tools / topK 16.
|
|
45
|
+
- **Prompt provenance (plan 042)**: `RunRecord.promptVersion` refs carried from `RunOptions` to durable run rows; session-store packages add the additive nullable `prompt_version` column + checked migrations (`@arnilo/prism-session-store-{codecs,sqlite,postgres}@0.3.1`); `PERSISTENCE_SCHEMA_VERSION` 8 → 9. `@arnilo/prism-prompts@0.0.1` initial cut ships the versioned immutable prompt store (independent host opt-in).
|
|
46
|
+
- **Docs**: `docs/documents.md` (documents, spreadsheets, and presentations hub guide), `docs/sheets.md` (spreadsheet and CSV parsing guide with decimal-safety invariant), `docs/diagrams.md` (diagramming and draw.io embed guide with origin-enforcement security), `docs/prompt-registry.md` (prompt registry contract), and composite memory recall scoring in `docs/working-and-semantic-memory.md`.
|
|
47
|
+
- **Package consolidation (plan 054, completed in 0.4.0)**: `@arnilo/prism-core` (Task 2) absorbs 16 runtime/session/governance/credentials/enterprise/work/validation packages behind explicit subpaths; `@arnilo/prism-coding-tools` (Task 3) absorbs nine coding/persona packages with the retained `prism-dev` bin; `@arnilo/prism-web-tools` (Task 4) absorbs `@arnilo/prism-browser` and `@arnilo/prism-obscura` as peer-gated `/browser` and `/obscura` subpaths; `@arnilo/prism-memory` (Task 5) absorbs `@arnilo/prism-rag`, both compaction strategies, `@arnilo/prism-graft`, and `@arnilo/prism-wiki` as `/rag`, `/compaction/{llm,observational-memory}`, `/graft`, and `/wiki` subpaths (deleting the `@arnilo/prism-compaction` profile; `prism-wiki` bin and skills ship from the memory tarball); `@arnilo/prism-providers` (Task 6) absorbs all 17 `@arnilo/prism-provider-*` packages as `/<adapter>` subpaths (deleting the standalone provider manifests, the 14-of-17 umbrella dependency set, and the Azure/Bedrock/Vertex all-only special case; the `/ai-sdk` adapter resolves its `@ai-sdk/provider` optional peer lazily at factory time) — public symbols and trust boundaries unchanged except import specifiers. A generated legacy-registry plan (`scripts/phase54-legacy-registry.mjs`) freezes each of the 54 retired names' final published version behind a `legacy` dist-tag and a `<0.4.0` install-time deprecation warning naming its exact 0.4 successor and migration-guide anchor; `--dry-run` verifies versions/anchors without mutating the registry and `--apply --confirm` is the idempotent, fail-closed cutover (Task 9). `@arnilo/prism-office` (Task 8) absorbs the unpublished documents/sheets/diagrams drafts as `/documents`, `/sheets`, `/diagrams` subpaths and deletes the `prism-base`/`prism-code`/`prism-sdk`/`prism-all` profile manifests; the 0.4 migration guide maps every retired name plus the office drafts.
|
|
48
|
+
- Package-level detail: `@arnilo/prism-memory@0.3.2` (composite recall scoring + importance at write), `@arnilo/prism-evals@0.3.1` (trace-to-dataset curation), `@arnilo/prism-documents@0.3.0` (initial cut), `@arnilo/prism-sheets@0.3.0` (initial cut), and `@arnilo/prism-diagrams@0.3.0` (initial cut).
|
|
49
|
+
|
|
1
50
|
## [0.3.2] - 2026-08-29 (plan 050)
|
|
2
51
|
|
|
3
52
|
### Added
|
|
@@ -45,7 +94,7 @@
|
|
|
45
94
|
|
|
46
95
|
### Added
|
|
47
96
|
- `@arnilo/prism-obscura` (new workspace package, 0.3.0): optional Obscura headless-browser engine over a **host-installed** binary — fail-closed `spawnObscuraProcess` lifecycle (absolute shell-free command, Docker argv, bounded readiness, group close), `createObscuraMcpTools` bridging the complete advertised MCP surface (reads effect-free; mutations and unknown future tools exclusive/serialized; `obscura_` prefix; loopback-default HTTP), `connectObscuraCdp` managed/external CDP + Playwright `connectOverCDP` composition, and `createObscuraWebTools` (standard `web_search`/`web_fetch` through one replaceable HTML search profile plus native `obscura_fetch`/`obscura_scrape`; public-HTTP(S)-only URL validation, byte/count/timeout caps, `allowEval`-gated custom expressions, untrusted-content labeling). Deliberately omitted from `prism-all`/`prism-base`/`prism-sdk` umbrella profiles — installation does not supply the binary/image; consumers install it explicitly.
|
|
48
|
-
- Cross-host conformance (`scripts/obscura-host-conformance.test.mjs`, wired into `npm test`): the same Obscura `ToolDefinition[]` executes through core agent sessions, the Prism MCP server, the server handler, AG-UI, ACP, workflow nodes
|
|
97
|
+
- Cross-host conformance (`scripts/obscura-host-conformance.test.mjs`, wired into `npm test`): the same Obscura `ToolDefinition[]` executes through core agent sessions, the Prism MCP server, the server handler, AG-UI, ACP, workflow nodes and supervisor children — no host branch; host authorization/selection deny before execution; abort kills owned children.
|
|
49
98
|
- New required peers: `@arnilo/prism-obscura` peers `@arnilo/prism` and `@arnilo/prism-web-tools` (reused citation/normalized shapes; `WebProvider` widened with `"obscura"`); `@arnilo/prism-obscura` also peers `@arnilo/prism-mcp`, `@arnilo/prism-browser`, and optional `playwright-core@1.61.0`.
|
|
50
99
|
|
|
51
100
|
## [0.3.1] - 2026-08-26
|
package/README.md
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
bring their tools, providers, credentials, storage, and UI; Prism supplies the
|
|
5
5
|
common contracts, registries, agent/session runtime, replaceable input/prompt
|
|
6
6
|
and compaction strategies, CLI/RPC adapters, and first-party provider/compaction
|
|
7
|
-
packages. The current 0.
|
|
8
|
-
|
|
9
|
-
lockstep cut. Prism defines contracts, not apps.
|
|
7
|
+
packages. The current 0.4 line publishes the generated package inventory (see
|
|
8
|
+
[Packages](#packages)) with explicit family subpaths and independent package versioning. Prism defines contracts, not apps.
|
|
10
9
|
|
|
11
10
|
## Current scope
|
|
12
11
|
|
|
@@ -20,7 +19,7 @@ lockstep cut. Prism defines contracts, not apps.
|
|
|
20
19
|
OpenAI/OpenRouter use best-effort explicit cache hints, NeuralWatt uses
|
|
21
20
|
best-effort implicit prefix caching, and other providers have route/model-specific
|
|
22
21
|
or no cache-control support; see [docs/provider-caching.md](docs/provider-caching.md).
|
|
23
|
-
- **First-party packages**:
|
|
22
|
+
- **First-party packages**: nineteen provider adapter subpaths, two compaction strategies,
|
|
24
23
|
coding tools/security, JSON Schema validation, MCP, workflows, OpenTelemetry,
|
|
25
24
|
encrypted credentials, SQLite/PostgreSQL persistence, Linux desktop control,
|
|
26
25
|
and manifest-only install profiles.
|
|
@@ -31,8 +30,8 @@ lockstep cut. Prism defines contracts, not apps.
|
|
|
31
30
|
layering, and provider-input assembly — every stage replaceable.
|
|
32
31
|
- **Sessions and memory**: in-memory and JSONL session stores, branching/fork/
|
|
33
32
|
clone, default and LLM compaction strategies, retry policy,
|
|
34
|
-
observational-memory recall/status/view,
|
|
35
|
-
(
|
|
33
|
+
observational-memory recall/status/view, and the `@arnilo/prism-memory` family
|
|
34
|
+
(working/semantic memory plus `/rag`, `/compaction/*`, `/graft`, `/wiki` subpaths).
|
|
36
35
|
- **Extensions and manifests**: extension kernel + event bus, contribution
|
|
37
36
|
registries, middleware hooks, and data-only package manifests.
|
|
38
37
|
- **Config, settings, security**: layered config merge, settings providers,
|
|
@@ -55,14 +54,14 @@ a non-optional peer. Install atomic packages directly or choose a manifest-only
|
|
|
55
54
|
family/profile; profiles install packages but expose no alias exports and activate nothing:
|
|
56
55
|
|
|
57
56
|
```bash
|
|
58
|
-
npm install @arnilo/prism @arnilo/prism-
|
|
59
|
-
npm install @arnilo/prism-
|
|
60
|
-
npm install @arnilo/prism-
|
|
61
|
-
npm install @arnilo/prism-
|
|
62
|
-
npm install @arnilo/prism-
|
|
63
|
-
npm install @arnilo/prism-server @arnilo/prism-workflows # optional Web API boundary
|
|
64
|
-
npm install @arnilo/prism-supervisor # optional local delegation + A2A 1.0
|
|
65
|
-
npm install @arnilo/prism-web-tools #
|
|
57
|
+
npm install @arnilo/prism @arnilo/prism-providers # core + all provider adapters
|
|
58
|
+
npm install @arnilo/prism @arnilo/prism-core @arnilo/prism-memory # replaces prism-base
|
|
59
|
+
npm install @arnilo/prism @arnilo/prism-coding-tools @arnilo/prism-mcp @arnilo/prism-providers # replaces prism-code
|
|
60
|
+
npm install @arnilo/prism @arnilo/prism-core @arnilo/prism-mcp @arnilo/prism-providers # replaces prism-sdk
|
|
61
|
+
npm install @arnilo/prism @arnilo/prism-core @arnilo/prism-providers # pick families explicitly (no umbrella)
|
|
62
|
+
npm install @arnilo/prism-core/runtime/server @arnilo/prism-core/runtime/workflows # optional Web API boundary
|
|
63
|
+
npm install @arnilo/prism-core/runtime/supervisor # optional local delegation + A2A 1.0
|
|
64
|
+
npm install @arnilo/prism-web-tools # unified web tools family (root search + /browser + /obscura subpaths)
|
|
66
65
|
```
|
|
67
66
|
|
|
68
67
|
See [docs/release-and-install.md](docs/release-and-install.md) for install
|
|
@@ -70,15 +69,23 @@ specifiers, tarball contents, and the offline test budget.
|
|
|
70
69
|
|
|
71
70
|
## Quick start
|
|
72
71
|
|
|
73
|
-
Scaffold a
|
|
72
|
+
Scaffold a project (offline mock test included):
|
|
74
73
|
|
|
75
74
|
```bash
|
|
76
75
|
npx --package @arnilo/prism prism init my-agent
|
|
77
|
-
# or, with a real provider package selected:
|
|
76
|
+
# or, scaffold with a real provider package selected:
|
|
78
77
|
npx --package @arnilo/prism prism init my-agent --provider openai
|
|
78
|
+
# or, scaffold a full deep research agent from the template gallery:
|
|
79
|
+
npx --package @arnilo/prism prism init my-research --template deep-research
|
|
79
80
|
cd my-agent && npm install && npm test
|
|
80
81
|
```
|
|
81
82
|
|
|
83
|
+
List available template gallery starters:
|
|
84
|
+
```bash
|
|
85
|
+
prism init --list-templates
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
|
|
82
89
|
Or embed Prism directly:
|
|
83
90
|
|
|
84
91
|
```ts
|
|
@@ -118,7 +125,7 @@ Register a first-party provider package through the extension kernel:
|
|
|
118
125
|
|
|
119
126
|
```ts
|
|
120
127
|
import { createExtensionKernel, createEnvCredentialResolver } from "@arnilo/prism";
|
|
121
|
-
import { createOpenAIProviderPackage } from "@arnilo/prism-
|
|
128
|
+
import { createOpenAIProviderPackage } from "@arnilo/prism-providers/openai";
|
|
122
129
|
|
|
123
130
|
const kernel = createExtensionKernel();
|
|
124
131
|
await kernel.load([
|
|
@@ -150,50 +157,22 @@ printf '{"id":"1","command":"prompt","params":{"input":"Hi"}}\n' \
|
|
|
150
157
|
|
|
151
158
|
## Packages
|
|
152
159
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
| `@arnilo/prism
|
|
159
|
-
| `@arnilo/prism-
|
|
160
|
-
| `@arnilo/prism-
|
|
161
|
-
| `@arnilo/prism-
|
|
162
|
-
| `@arnilo/prism-
|
|
163
|
-
| `@arnilo/prism-
|
|
164
|
-
| `@arnilo/prism-
|
|
165
|
-
| `@arnilo/prism-
|
|
166
|
-
| `@arnilo/prism-
|
|
167
|
-
| `@arnilo/prism-
|
|
168
|
-
|
|
169
|
-
| `@arnilo/prism-provider-azure` | Azure OpenAI provider |
|
|
170
|
-
| `@arnilo/prism-provider-bedrock` | AWS Bedrock provider |
|
|
171
|
-
| `@arnilo/prism-provider-vertex` | Google Vertex provider |
|
|
172
|
-
| `@arnilo/prism-provider-ai-sdk` | AI SDK interoperability adapter |
|
|
173
|
-
| `@arnilo/prism-browser` | optional host-wired Playwright browser automation (not core; not auto-activated) |
|
|
174
|
-
| `@arnilo/prism-obscura` | optional Obscura headless-browser engine over a host-installed binary: MCP surface, CDP + Playwright, bounded CLI web tools (not in umbrellas; install explicitly) |
|
|
175
|
-
| `@arnilo/prism-computer-use-linux` | optional Linux desktop-control tools over a host-owned `computer-use-linux` MCP binary |
|
|
176
|
-
| `@arnilo/prism-antigravity-agent` | optional Antigravity CLI delegated agent adapter with per-run Prism MCP capability exposure |
|
|
177
|
-
| `@arnilo/prism-wiki` | optional Karpathy LLM Wiki knowledge compiler with local `qmd` hybrid search and Context7 line navigation |
|
|
178
|
-
| `@arnilo/prism-compaction-llm` | provider-backed compaction strategy |
|
|
179
|
-
| `@arnilo/prism-compaction-observational-memory` | source-backed memory + recall tool |
|
|
180
|
-
| `@arnilo/prism-coding-agent` | bounded shell/read/write/edit tools |
|
|
181
|
-
| `@arnilo/prism-coding-security` | coding approval, containment, and sandbox adapters |
|
|
182
|
-
| `@arnilo/prism-tool-validator-json-schema` | bounded JSON Schema tool validation |
|
|
183
|
-
| `@arnilo/prism-mcp` | MCP client/tool bridge |
|
|
184
|
-
| `@arnilo/prism-workflows` | bounded DAG workflows, durable suspend/resume, schedules/background runs, composition/state/replay, and multi-process coordination |
|
|
185
|
-
| `@arnilo/prism-supervisor` | bounded local child delegation and A2A 1.0 interoperability |
|
|
186
|
-
| `@arnilo/prism-web-tools` | host-selected bounded Brave/Exa search and Firecrawl Markdown/schema extraction |
|
|
187
|
-
| `@arnilo/prism-observability-opentelemetry` | optional OpenTelemetry adapter |
|
|
188
|
-
| `@arnilo/prism-credentials-node` | encrypted-file and keychain credentials |
|
|
189
|
-
| `@arnilo/prism-session-store-sqlite` | SQLite persistence/checkpoints/leases/owned run feedback |
|
|
190
|
-
| `@arnilo/prism-session-store-postgres` | PostgreSQL persistence/checkpoints/leases/owned run feedback |
|
|
191
|
-
| `@arnilo/prism-providers` | family: 14 of 17 first-party provider adapters (omits Azure, Bedrock, Vertex, which `prism-all` adds separately), including AI SDK interoperability |
|
|
192
|
-
| `@arnilo/prism-compaction` | family: both compaction strategies |
|
|
193
|
-
| `@arnilo/prism-base` | profile: core + compaction + JSON Schema validation |
|
|
194
|
-
| `@arnilo/prism-code` | profile: base + coding tools/security + MCP |
|
|
195
|
-
| `@arnilo/prism-sdk` | profile: base + workflows + MCP + credentials + OpenTelemetry |
|
|
196
|
-
| `@arnilo/prism-all` | broad umbrella: 21 first-party packages (47 transitive) across a 47-package workspace closure — omits document-reader, OpenAPI tools, NATS, Caveman, Ponytail, Impeccable, computer-use-linux, antigravity-agent, Graft, Obscura, and wiki |
|
|
160
|
+
<!-- generated:package-truth:inventory begin -->
|
|
161
|
+
**10 publishable manifests** — root `@arnilo/prism` plus 9 workspace packages (3 `prism-*` family packages, 6 capability packages). Generated by `node scripts/package-truth.mjs --emit-docs` — do not hand-edit.
|
|
162
|
+
|
|
163
|
+
| package | version | notes |
|
|
164
|
+
| --- | --- | --- |
|
|
165
|
+
| `@arnilo/prism` | 0.5.0 | core — runtime, CLI/RPC, templates, docs |
|
|
166
|
+
| `@arnilo/prism-coding-tools` | 0.5.0 | family — /agent, /security, /document-reader, /openapi, /computer-use-linux, /dev, /caveman, /ponytail, /impeccable subpaths |
|
|
167
|
+
| `@arnilo/prism-core` | 0.5.0 | family — /runtime, /sessions, /governance, /credentials, /enterprise, /work, /validation subpaths |
|
|
168
|
+
| `@arnilo/prism-providers` | 0.5.0 | family — all provider adapters as `/<adapter>` subpaths |
|
|
169
|
+
| `@arnilo/prism-acp-agent` | 0.5.0 | capability — ACP adapter |
|
|
170
|
+
| `@arnilo/prism-ag-ui` | 0.5.0 | capability — AG-UI/A2A/A2UI adapter |
|
|
171
|
+
| `@arnilo/prism-mcp` | 0.5.0 | capability — MCP client/server/OAuth interop |
|
|
172
|
+
| `@arnilo/prism-memory` | 0.5.0 | capability — memory plus /rag, /compaction/*, /graft, /wiki subpaths |
|
|
173
|
+
| `@arnilo/prism-office` | 0.5.0 | capability — /documents, /sheets, /diagrams subpaths |
|
|
174
|
+
| `@arnilo/prism-web-tools` | 0.5.0 | capability — Brave/Exa/Firecrawl plus peer-gated /browser and /obscura subpaths |
|
|
175
|
+
<!-- generated:package-truth:inventory end -->
|
|
197
176
|
|
|
198
177
|
## Scripts
|
|
199
178
|
|
|
@@ -202,11 +181,12 @@ printf '{"id":"1","command":"prompt","params":{"input":"Hi"}}\n' \
|
|
|
202
181
|
| `npm run build` | Compile TypeScript to `dist/` (core + workspaces) |
|
|
203
182
|
| `npm run typecheck` | Type-check without emitting |
|
|
204
183
|
| `npm test` | Build + run network-free tests |
|
|
184
|
+
| `npm run test:live` | Run live suites whose credentials are present (skip the rest) |
|
|
205
185
|
| `prism --help` | CLI help |
|
|
206
186
|
|
|
207
187
|
## Non-goals (v1)
|
|
208
188
|
|
|
209
189
|
- Privileged tools, MCP servers, telemetry, credentials, or databases activated by install — hosts explicitly configure and register every capability.
|
|
210
|
-
- Browser automation or interactive terminal UI in core — hosts may opt into `@arnilo/prism-browser` with their own Playwright lifecycle; Prism does not auto-start browsers or ship a TUI.
|
|
190
|
+
- Browser automation or interactive terminal UI in core — hosts may opt into the `@arnilo/prism-web-tools/browser` subpath with their own Playwright lifecycle; Prism does not auto-start browsers or ship a TUI.
|
|
211
191
|
- Provider, credential, extension, or package auto-discovery.
|
|
212
192
|
- Core-owned database drivers, secret persistence, sandbox, or application policy — optional packages implement adapters over host-owned boundaries.
|
|
@@ -101,6 +101,10 @@ async function prepareAgentRunResume(agent, ref, resume, options, signal) {
|
|
|
101
101
|
if (options.persistSessionState && state.sessionState?.loadedSkillNames) {
|
|
102
102
|
session.restoreLoadedSkills(state.sessionState.loadedSkillNames);
|
|
103
103
|
}
|
|
104
|
+
// Plan 041: re-add search-activated tool names (names only; absent tools stay inert until re-searched).
|
|
105
|
+
if (options.persistSessionState && state.sessionState?.activatedToolNames) {
|
|
106
|
+
session.restoreActivatedTools(state.sessionState.activatedToolNames);
|
|
107
|
+
}
|
|
104
108
|
// Plan 018 Task 6 (closeout `checkpoint-bodies`): restore exact instructions so the
|
|
105
109
|
// resumed session renders them registry-independently (no load_skill round-trip).
|
|
106
110
|
if (options.persistSessionState && options.includeSkillBodies && state.sessionState?.loadedSkillBodies) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Agent, AgentRunInterruption, AgentRunRef, AgentRunState, AgentRunStateOptions,
|
|
1
|
+
import type { Agent, AgentRunInterruption, AgentRunRef, AgentRunState, AgentRunStateOptions, CheckpointRecord, CheckpointStore, JsonValue, Message, ModelConfig, NestedRunRef, OwnershipScope, RunDecision, RunLimitCounters, StickyDecision, ToolCallContent } from "./contracts.js";
|
|
2
2
|
import type { SecretRedactor } from "./redaction.js";
|
|
3
3
|
import { type LoadedSkillBodiesEntry } from "./skill-load.js";
|
|
4
4
|
export declare const AGENT_RUN_STATE_NAMESPACE = "prism.agent-run";
|
|
@@ -43,11 +43,15 @@ export interface StoredAgentRunState extends AgentRunState {
|
|
|
43
43
|
readonly sessionState?: {
|
|
44
44
|
readonly loadedSkillNames?: readonly string[];
|
|
45
45
|
readonly loadedSkillBodies?: readonly LoadedSkillBodiesEntry[];
|
|
46
|
+
/** Plan 041: tools activated via `search_tools` (names only; inert for absent tools on restore). */
|
|
47
|
+
readonly activatedToolNames?: readonly string[];
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
/** Session-state caps (plan 015 Task 4): bounded names charged against the run-state byte budget. */
|
|
49
51
|
export declare const MAX_PERSISTED_SKILL_NAMES = 64;
|
|
50
52
|
export declare const MAX_PERSISTED_SKILL_NAME_CHARS = 256;
|
|
53
|
+
/** Plan 041: activated-tool names ride the same budget discipline (cap 128; multiple searches accumulate). */
|
|
54
|
+
export declare const MAX_PERSISTED_ACTIVATED_TOOL_NAMES = 128;
|
|
51
55
|
/** Revision stamps of the built-in loops; custom strategies declare their own `revision`. */
|
|
52
56
|
export declare const BUILT_IN_LOOP_REVISIONS: Readonly<Record<string, string>>;
|
|
53
57
|
/** Validate a strategy snapshot as JSON-compatible and package it for the durable envelope. */
|
|
@@ -71,7 +75,6 @@ export declare function saveAgentRunState(input: {
|
|
|
71
75
|
readonly record: CheckpointRecord;
|
|
72
76
|
readonly state: StoredAgentRunState;
|
|
73
77
|
}>;
|
|
74
|
-
export declare function statusFromState(state: StoredAgentRunState, version: number): AgentRunStatusResult;
|
|
75
78
|
export declare function publicState(state: StoredAgentRunState): AgentRunState;
|
|
76
79
|
export declare function initialAgentRunState(input: {
|
|
77
80
|
readonly agent: Agent;
|
package/dist/agent-run-state.js
CHANGED
|
@@ -10,6 +10,8 @@ const MAX_PROPERTIES = 256;
|
|
|
10
10
|
/** Session-state caps (plan 015 Task 4): bounded names charged against the run-state byte budget. */
|
|
11
11
|
export const MAX_PERSISTED_SKILL_NAMES = 64;
|
|
12
12
|
export const MAX_PERSISTED_SKILL_NAME_CHARS = 256;
|
|
13
|
+
/** Plan 041: activated-tool names ride the same budget discipline (cap 128; multiple searches accumulate). */
|
|
14
|
+
export const MAX_PERSISTED_ACTIVATED_TOOL_NAMES = 128;
|
|
13
15
|
/** Revision stamps of the built-in loops; custom strategies declare their own `revision`. */
|
|
14
16
|
export const BUILT_IN_LOOP_REVISIONS = {
|
|
15
17
|
"single-shot": "1",
|
|
@@ -125,9 +127,6 @@ export async function saveAgentRunState(input) {
|
|
|
125
127
|
});
|
|
126
128
|
return { record, state: { ...bounded, version: record.version } };
|
|
127
129
|
}
|
|
128
|
-
export function statusFromState(state, version) {
|
|
129
|
-
return { state: publicState({ ...state, version }), version };
|
|
130
|
-
}
|
|
131
130
|
export function publicState(state) {
|
|
132
131
|
const { input: _input, pending: _pending, pendingCalls: _pendingCalls, nestedRuns: _nestedRuns, interruptBeforeTool: _interruptBeforeTool, counters: _counters, deadlineAt: _deadlineAt, ...publicValue } = state;
|
|
133
132
|
return publicValue;
|
|
@@ -252,14 +251,25 @@ function validateSessionState(sessionState) {
|
|
|
252
251
|
}
|
|
253
252
|
}
|
|
254
253
|
const names = sessionState.loadedSkillNames;
|
|
255
|
-
if (names
|
|
254
|
+
if (names !== undefined) {
|
|
255
|
+
if (!Array.isArray(names) || names.length > MAX_PERSISTED_SKILL_NAMES) {
|
|
256
|
+
throw new AgentRunStateError(`Loaded-skill names exceed ${MAX_PERSISTED_SKILL_NAMES} entries`);
|
|
257
|
+
}
|
|
258
|
+
for (const name of names) {
|
|
259
|
+
if (typeof name !== "string" || name.length > MAX_PERSISTED_SKILL_NAME_CHARS) {
|
|
260
|
+
throw new AgentRunStateError(`Loaded-skill name exceeds ${MAX_PERSISTED_SKILL_NAME_CHARS} chars`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const activated = sessionState.activatedToolNames;
|
|
265
|
+
if (activated === undefined)
|
|
256
266
|
return;
|
|
257
|
-
if (!Array.isArray(
|
|
258
|
-
throw new AgentRunStateError(`
|
|
267
|
+
if (!Array.isArray(activated) || activated.length > MAX_PERSISTED_ACTIVATED_TOOL_NAMES) {
|
|
268
|
+
throw new AgentRunStateError(`Activated-tool names exceed ${MAX_PERSISTED_ACTIVATED_TOOL_NAMES} entries`);
|
|
259
269
|
}
|
|
260
|
-
for (const name of
|
|
270
|
+
for (const name of activated) {
|
|
261
271
|
if (typeof name !== "string" || name.length > MAX_PERSISTED_SKILL_NAME_CHARS) {
|
|
262
|
-
throw new AgentRunStateError(`
|
|
272
|
+
throw new AgentRunStateError(`Activated-tool name exceeds ${MAX_PERSISTED_SKILL_NAME_CHARS} chars`);
|
|
263
273
|
}
|
|
264
274
|
}
|
|
265
275
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Context-assembly + runInternal orchestrator (plan 059). */
|
|
2
|
+
import type { ActiveDurableRun } from "../../agent-approval.js";
|
|
3
|
+
import type { AgentRunResult, RunOptions } from "../../contracts.js";
|
|
4
|
+
import type { AgentInput } from "../../input.js";
|
|
5
|
+
import type { SessionHost } from "./types.js";
|
|
6
|
+
export declare function executeRun(session: SessionHost, input: AgentInput, options: RunOptions, runId: string, resumed?: ActiveDurableRun): Promise<AgentRunResult>;
|