@arnilo/prism 0.1.4 → 0.1.5
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 +5 -0
- package/dist/agent-session.js +8 -3
- 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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/rpc.js +2 -1
- package/docs/agent-loops.md +1 -1
- package/docs/agent-session-runtime.md +2 -2
- package/docs/coding-agent-tools.md +1 -2
- package/docs/compaction-observational-memory.md +5 -6
- package/docs/index.md +3 -3
- 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 +32 -0
- 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 +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.5] - 2026-08-11
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- **Release 0.1.5 (plan 017)** is the **documented breaking cut** on the frozen 0.1.x line — deprecated-option removal with the full 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 (three stale roadmap labels corrected there: `RunOptions.maxToolRounds` not `AgentConfig.maxToolRounds`, `autoResizeImages` removed with `transformImage` retained, `INIT_PROVIDERS` removed with `listInitProviders()` retained). (1) **Provider run-option aliases** (Task 1): `ProviderRequestOptions.timeoutMs`/`maxRetries`/`maxRetryDelayMs` (inert in first-party providers; host-side abort/retry is the replacement — `RunOptions.signal`, `AgentConfig.retry`/`RunOptions.retry`) and `RunOptions.maxToolRounds` (→ `limits.maxToolRounds`, defaults/caps unchanged) removed; untyped legacy run input is refused at the `runInternal` choke point before the agent starts; CLI `--max-tool-rounds` maps to the nested limit. (2) **Observational-memory compatibility surface** (Task 2): the 10 pre-0.0.19 flat settings keys and top-level `workerProvider`/`workerModel` aliases removed — settings resolution is nested-only with `assertNoRemovedFlatKeys` failing closed (settings-provider JSON or untyped overrides throw naming the key + nested replacement before any worker/provider call, compaction, or session append); `fallbackWorker`/`assertWorkerModelCompatibility`/`conflict()` deleted; workers resolve only from `observation`/`reflection`/`dropper` configs plus `sessionModel` fallback. (3) **Read alias + CLI constant** (Task 3): `ReadToolOptions.autoResizeImages` removed (`transformImage` is the only resize path; untyped callers fail closed at `createReadTool` before filesystem access) and `INIT_PROVIDERS` removed (`listInitProviders()` is the single provider-list API). Compat baselines regenerated after the reviewed `--allow-break` break report (root `arnilo__prism.txt` drops the `INIT_PROVIDERS` line; interface-member removals are verified by the phase-17 direct declaration scanner, not baseline text). Exit gate green (core tests + script gates incl. phase17-freeze 20/20, `sdk:ready`, audit 0, pack dry-run 49/49 twice byte-identical, evidence in `scripts/phase17-baseline.json`). Store compatibility with 0.1.4: **compatible, no migration** (removed options were inert aliases; rollback = restore the 0.1.4 manifests/tag). **Publication remains the operator handoff** (`docs/release-and-install.md` `0.1.5 publish handoff` — signed `v0.1.5` tag + npm OIDC).
|
|
7
|
+
|
|
3
8
|
## [0.1.4] - 2026-08-10
|
|
4
9
|
|
|
5
10
|
### Changed
|
package/dist/agent-session.js
CHANGED
|
@@ -156,6 +156,13 @@ export class RuntimeAgentSession {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
async runInternal(input, options, runId, resumed) {
|
|
159
|
+
// 0.1.5 breaking cut: the deprecated RunOptions.maxToolRounds alias was removed. Reject
|
|
160
|
+
// untyped/legacy input fail-closed before any session mutation, provider call, or tool
|
|
161
|
+
// execution; silently honoring it would widen or mis-apply the intended tool-round cap.
|
|
162
|
+
const legacyMaxToolRounds = options.maxToolRounds;
|
|
163
|
+
if (legacyMaxToolRounds !== undefined) {
|
|
164
|
+
throw new TypeError("RunOptions.maxToolRounds was removed in 0.1.5; use RunOptions.limits.maxToolRounds instead");
|
|
165
|
+
}
|
|
159
166
|
if (this.agent.config.secure &&
|
|
160
167
|
(options.redactor !== undefined ||
|
|
161
168
|
options.ownership !== undefined ||
|
|
@@ -164,9 +171,7 @@ export class RuntimeAgentSession {
|
|
|
164
171
|
options.runState !== undefined)) {
|
|
165
172
|
throw new AgentRunStateError("Secure agent defaults cannot be replaced per run");
|
|
166
173
|
}
|
|
167
|
-
const requestedLimits = options.
|
|
168
|
-
? options.limits
|
|
169
|
-
: { ...options.limits, maxToolRounds: Math.min(options.maxToolRounds, options.limits?.maxToolRounds ?? options.maxToolRounds) };
|
|
174
|
+
const requestedLimits = options.limits;
|
|
170
175
|
const resolvedLimits = resolveRunLimits(this.agent.config.limits, requestedLimits);
|
|
171
176
|
const durableOptions = options.runState ?? this.agent.config.runState;
|
|
172
177
|
if (this.agent.config.runState && options.runState && this.agent.config.runState !== options.runState) {
|
package/dist/cli-init.d.ts
CHANGED
|
@@ -30,8 +30,6 @@ export interface InitResult {
|
|
|
30
30
|
}
|
|
31
31
|
/** Provider ids supported by `prism init --provider`. Loaded from templates data. */
|
|
32
32
|
export declare function listInitProviders(templatesRoot?: string): readonly string[];
|
|
33
|
-
/** @deprecated Prefer listInitProviders(); retained for tests that import the name. */
|
|
34
|
-
export declare const INIT_PROVIDERS: readonly string[];
|
|
35
33
|
export declare function getInitUsage(templatesRoot?: string): string;
|
|
36
34
|
export declare const initUsage: string;
|
|
37
35
|
export declare function parseInitArgs(argv: readonly string[], templatesRoot?: string): InitOptions;
|
package/dist/cli-init.js
CHANGED
|
@@ -34,8 +34,6 @@ export function listInitProviders(templatesRoot) {
|
|
|
34
34
|
return cachedProviderIds;
|
|
35
35
|
return Object.freeze([...loadProvidersCatalog(templatesRoot).keys()]);
|
|
36
36
|
}
|
|
37
|
-
/** @deprecated Prefer listInitProviders(); retained for tests that import the name. */
|
|
38
|
-
export const INIT_PROVIDERS = listInitProviders();
|
|
39
37
|
export function getInitUsage(templatesRoot) {
|
|
40
38
|
const providers = listInitProviders(templatesRoot).join("|");
|
|
41
39
|
return `Usage: prism init <dir> [options]
|
package/dist/cli-runner.js
CHANGED
|
@@ -340,7 +340,7 @@ function defaultCreateSession(options) {
|
|
|
340
340
|
}
|
|
341
341
|
function runOptions(options) {
|
|
342
342
|
return {
|
|
343
|
-
maxToolRounds: options.maxToolRounds,
|
|
343
|
+
...(options.maxToolRounds !== undefined ? { limits: { maxToolRounds: options.maxToolRounds } } : {}),
|
|
344
344
|
compaction: options.compact ? { thresholdEntries: options.compact } : undefined,
|
|
345
345
|
// ponytail: --discover is the explicit opt-in that activates discovered skills.
|
|
346
346
|
...(options.discover && !options.noDiscovery && options.discoveredSkills.length > 0
|
package/dist/contracts-core.d.ts
CHANGED
|
@@ -234,12 +234,6 @@ export interface ProviderRequestOptions {
|
|
|
234
234
|
readonly cacheKey?: string;
|
|
235
235
|
readonly cache?: PromptCacheHints;
|
|
236
236
|
readonly headers?: Readonly<Record<string, string>>;
|
|
237
|
-
/** @deprecated Provider-level timeout is inert in first-party providers; pass an AbortSignal/RunOptions.signal instead. */
|
|
238
|
-
readonly timeoutMs?: number;
|
|
239
|
-
/** @deprecated Provider-level retry is inert in first-party providers; use AgentConfig.retry/RunOptions.retry instead. */
|
|
240
|
-
readonly maxRetries?: number;
|
|
241
|
-
/** @deprecated Provider-level retry is inert in first-party providers; use AgentConfig.retry/RunOptions.retry instead. */
|
|
242
|
-
readonly maxRetryDelayMs?: number;
|
|
243
237
|
readonly compat?: JsonObject;
|
|
244
238
|
readonly extra?: JsonObject;
|
|
245
239
|
/** Provider-neutral JSON-schema structured output request. Requires model `capabilities.structuredOutput`. */
|
|
@@ -62,8 +62,6 @@ export interface RunOptions {
|
|
|
62
62
|
readonly signal?: AbortSignal;
|
|
63
63
|
readonly model?: ModelConfig;
|
|
64
64
|
readonly providerSource?: ProviderResolver;
|
|
65
|
-
/** @deprecated Use `limits.maxToolRounds`. */
|
|
66
|
-
readonly maxToolRounds?: number;
|
|
67
65
|
/** Run-scoped ceilings. When an agent config also sets limits, these can only narrow it. */
|
|
68
66
|
readonly limits?: RunLimits;
|
|
69
67
|
readonly providerOptions?: ProviderRequestOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -105,5 +105,5 @@ export { createToolParameterValidator, createToolRegistry, dispatchToolCall, fil
|
|
|
105
105
|
export type { ResolvedUseCaseModel, ResolveUseCaseModelInput, UseCaseModelBinding, } from "./use-case-model.js";
|
|
106
106
|
export { resolveUseCaseModel, resolveUseCaseModelBinding, useCaseCredentialProviderId, } from "./use-case-model.js";
|
|
107
107
|
export declare const name = "prism";
|
|
108
|
-
export declare const version = "0.1.
|
|
108
|
+
export declare const version = "0.1.5";
|
|
109
109
|
export declare const description = "Agent harness for AI providers, agents, sessions, and tools.";
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,6 @@ export { DEFAULT_TOOL_RESULT_FOLD_MAX_SUMMARY_BYTES, DEFAULT_TOOL_RESULT_FOLD_MI
|
|
|
57
57
|
export { createToolParameterValidator, createToolRegistry, dispatchToolCall, filterTools } from "./tools.js";
|
|
58
58
|
export { resolveUseCaseModel, resolveUseCaseModelBinding, useCaseCredentialProviderId, } from "./use-case-model.js";
|
|
59
59
|
export const name = "prism";
|
|
60
|
-
export const version = "0.1.
|
|
60
|
+
export const version = "0.1.5";
|
|
61
61
|
export const description = "Agent harness for AI providers, agents, sessions, and tools.";
|
|
62
62
|
//# sourceMappingURL=index.js.map
|
package/dist/rpc.js
CHANGED
|
@@ -225,9 +225,10 @@ function runOptions(state, params) {
|
|
|
225
225
|
const names = stringArrayParam(params, "instructionInjectors");
|
|
226
226
|
// ponytail: fail-closed — unknown name throws (caller surfaces as RPC error), matching CLI.
|
|
227
227
|
const injectors = names.length ? resolveInstructionInjectors({ registry: state.instructionInjectors, names }) : undefined;
|
|
228
|
+
const maxToolRounds = numberParam(params, "maxToolRounds");
|
|
228
229
|
return {
|
|
229
230
|
model: modelParam(params) ?? state.model,
|
|
230
|
-
maxToolRounds:
|
|
231
|
+
...(maxToolRounds !== undefined ? { limits: { maxToolRounds } } : {}),
|
|
231
232
|
...(injectors ? { instructionInjectors: injectors } : {}),
|
|
232
233
|
};
|
|
233
234
|
}
|
package/docs/agent-loops.md
CHANGED
|
@@ -221,7 +221,7 @@ await session.run(input, { loop: twoShotLoop });
|
|
|
221
221
|
- `{ strategy: "single-shot" }` resolves to the exported `singleShotLoop`; `{ strategy: "generate-validate-revise", ... }` is mapped by `resolveLoop()` to `generateValidateReviseLoop(opts)`. An unknown `strategy` throws before the first turn. Passing an `AgentLoopStrategy` instance bypasses the options form entirely (custom-loop escape hatch).
|
|
222
222
|
- The loop is resolved once per run inside `RuntimeAgentSession.run()`, after the usual setup (provider/skills/tools resolution, history rebuild, model-change entry, input append, auto-compaction). The runtime's outer try/catch/finally, run-exclusivity, abort bridging, and subscriber close remain in place around `loop.run(ctx)`.
|
|
223
223
|
- `LoopContext.assemble(nextInput, toolResults?)` accepts an optional tool-result accumulator so `singleShotLoop` can pass its loop-local results. Bounded artifact tools append results directly to shared history, then assemble the next turn with empty new input; no second transcript path exists.
|
|
224
|
-
- `limits.maxToolRounds` bounds both `singleShotLoop` and opt-in bounded artifact tool rounds across the whole run. Artifact mode always dispatches sequentially, regardless of `toolConcurrency`; all dispatches still use existing registry/filter/permission/validator/middleware/redactor/ledger guards.
|
|
224
|
+
- `limits.maxToolRounds` bounds both `singleShotLoop` and opt-in bounded artifact tool rounds across the whole run. Artifact mode always dispatches sequentially, regardless of `toolConcurrency`; all dispatches still use existing registry/filter/permission/validator/middleware/redactor/ledger guards.
|
|
225
225
|
- `maxRevisions` (default 3) counts only failed call-free artifact candidates. Bounded artifact runs make at most `1 + maxRevisions + maxToolRounds` provider turns. A tool-round limit is terminal and returns last usage after `artifact_failed`; it does not throw.
|
|
226
226
|
- A revision cycle appends one assistant draft and one repair user message per revision to the session store, so store entries reflect every attempted draft. The original user input is stored once by the runtime and pushed into loop history once on the first turn. Repair messages are assembled as the next provider `nextInput` and only pushed into live history after that revision request has been generated, so the model never receives a duplicated repair instruction.
|
|
227
227
|
|
|
@@ -49,7 +49,7 @@ string | Message | readonly Message[]
|
|
|
49
49
|
|
|
50
50
|
`AgentConfig.limits` sets run ceilings; `RunOptions.limits` may only narrow configured agent values. Limits cover turns, provider attempts, tool rounds/calls, wall time, request/response bytes, tokens, and optional single-currency cost. A breach emits one `run_limit_exceeded` event and throws `AgentRunError` with `result.limit`; see [Runs and usage ledger](runs-and-usage.md#run-limits).
|
|
51
51
|
|
|
52
|
-
`RunOptions.model` can override the request model for a run. Model overrides append a `model_change` entry. `AgentConfig.inputLayout` selects the default input assembly layout (`"cache_aware"` by default, or opt-in `"legacy"`); `RunOptions.inputLayout` wins for one run. `AgentConfig.providerOptions`/`RunOptions.providerOptions` supply generic provider request options
|
|
52
|
+
`RunOptions.model` can override the request model for a run. Model overrides append a `model_change` entry. `AgentConfig.inputLayout` selects the default input assembly layout (`"cache_aware"` by default, or opt-in `"legacy"`); `RunOptions.inputLayout` wins for one run. `AgentConfig.providerOptions`/`RunOptions.providerOptions` supply generic provider request options (session/cache/header/compat/extra hints only — provider-level timeout/retry hints were removed in 0.1.5). Use `RunOptions.signal`/host abort controllers for timeouts and `AgentConfig.retry`/`RunOptions.retry` for retry. `AgentConfig.providerRequestPolicies`/`RunOptions.providerRequestPolicies` run before `AIProvider.generate()` and before `provider_request` middleware. `AgentConfig.systemPrompt` and `RunOptions.systemPrompt` add explicit layered system prompt contributions; `RunOptions.systemPrompt: false` disables configured prompt layers for that run while keeping `AgentConfig.instructions` as the base path. `RunOptions.compaction` can enable auto-compaction for that run or use `false` to disable configured auto-compaction. `RunOptions.retry` can enable provider-turn retry for that run or use `false` to disable configured retry. `RunOptions.metadata` is merged with agent/session metadata for assembly, provider requests, and tool contexts. Run tool-round limits via `RunOptions.limits.maxToolRounds`. `RunOptions.signal` is bridged into the per-run abort signal passed to assembly, providers, tools, auto-compaction, and retry backoff.
|
|
53
53
|
|
|
54
54
|
`RunOptions.activeSkills` selects named skills from a configured `SkillRegistry`; `RunOptions.skills` replaces a plain `Skill[]` config for one run. When `AgentConfig.skills` is a registry and neither is set, **no skills activate** unless `activateAllSkills: true` (run or agent). `skillsDisclosure` (`"progressive"` default, `"eager"` opt-in; run wins) controls catalog vs full instruction bodies; the session-owned `LoadedSkillSet` is populated by `load_skill` when the host registers `createLoadSkillTool`. `toolResultFold` (off unless the host supplies `summarize`) optionally folds aged large tool results in provider input only. See [Context and skills](context-and-skills.md).
|
|
55
55
|
|
|
@@ -120,7 +120,7 @@ const agent = createAgent({
|
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
const session = agent.createSession({ id: "s1" });
|
|
123
|
-
const result = await session.run("Hi", { maxToolRounds: 1, compaction: { thresholdEntries: 20, keepRecentEntries: 6 }, retry: { maxAttempts: 3, baseDelayMs: 50 } });
|
|
123
|
+
const result = await session.run("Hi", { limits: { maxToolRounds: 1 }, compaction: { thresholdEntries: 20, keepRecentEntries: 6 }, retry: { maxAttempts: 3, baseDelayMs: 50 } });
|
|
124
124
|
console.log(result.text, result.usage?.totalTokens);
|
|
125
125
|
|
|
126
126
|
for await (const event of session.stream("Follow up")) console.log(event.type);
|
|
@@ -151,7 +151,6 @@ Read a text or image file.
|
|
|
151
151
|
| --- | --- | --- |
|
|
152
152
|
| `maxImageBytes` | `DEFAULT_MAX_IMAGE_BYTES` (10 MB) | Reject image reads larger than this many bytes. |
|
|
153
153
|
| `transformImage` | — | Host callback `( { buffer, mimeType } ) => Promise<Buffer>` run after read, before base64. |
|
|
154
|
-
| `autoResizeImages` | — | **Deprecated.** Ignored unless `transformImage` is also set (use `transformImage` instead). |
|
|
155
154
|
| `maxLines` / `maxBytes` | 2000 / 50 KiB | Text page display limits (hard: 100,000 / 1 MiB). |
|
|
156
155
|
| `maxScanBytes` | 64 MiB | Raw bytes scanned to reach one page (hard: 1 GiB). |
|
|
157
156
|
| `operations` | local fs | Pluggable bounded `ReadOperations` backend. |
|
|
@@ -173,7 +172,7 @@ const read = createReadTool(cwd, {
|
|
|
173
172
|
| `truncation` | text reads | `TruncationResult`. |
|
|
174
173
|
| `image` | image reads | `{ mimeType, resized, bytes }`. `resized` is `true` when `transformImage` ran. |
|
|
175
174
|
|
|
176
|
-
> `autoResizeImages`
|
|
175
|
+
> `autoResizeImages` was removed in 0.1.5; untyped callers now fail closed with a `TypeError` naming `transformImage` before any filesystem access.
|
|
177
176
|
|
|
178
177
|
### `write`
|
|
179
178
|
|
|
@@ -129,9 +129,8 @@ const evidence = recallObservationalMemory(entries, "aaaaaaaaaaaa");
|
|
|
129
129
|
const memory = createObservationalMemoryRuntime({
|
|
130
130
|
session,
|
|
131
131
|
appendEntry: (entry) => store.append(entry),
|
|
132
|
-
workerProvider,
|
|
133
|
-
sessionModel: agent.config.model, // fallback when
|
|
134
|
-
// workerModel: { provider: "mock", model: "memory" }, // optional override
|
|
132
|
+
observation: { provider: workerProvider, model: workerModel },
|
|
133
|
+
sessionModel: agent.config.model, // fallback when no worker model is configured
|
|
135
134
|
maxWorkerTurns: 8,
|
|
136
135
|
maxWorkerToolCalls: 64,
|
|
137
136
|
maxWorkerResultBytes: 64 * 1024,
|
|
@@ -151,13 +150,13 @@ await kernel.load([createObservationalMemoryExtension({ recallTool: { getEntries
|
|
|
151
150
|
|
|
152
151
|
Settings resolve to nested `observation` / `reflection` / `dropper` / `context` / `retrieval` groups via `resolveObservationalMemorySettings()`. Defaults: `observation.messageTokens: 10000`, `reflection.observationTokens: 20000`, `context.compactAfterTokens: 81000`, `context.recentMessages: 8`, `context.observationsPoolMaxTokens: 20000`, `dropper.targetTokens: 10000` (from `context.observationsPoolTargetTokens`), `retrieval.pageLimit: 20`, `agentMaxTurns: 16`, `passive: false`, `debugLog: false`. Optional `context.recentMessageMaxTokens` trims the recent-message context window (oldest first) after the count limit.
|
|
153
152
|
|
|
154
|
-
|
|
153
|
+
Pre-0.0.19 flat settings keys (`observeAfterTokens`, `reflectAfterTokens`, `compactAfterTokens`, `keepRecentEntries`, `recentMessageMaxTokens`, `observationsPoolMaxTokens`, `observationsPoolTargetTokens`, `workerModel`, `thinkingLevel`, `requireExplicitModel`) were removed in 0.1.5 — pass the nested replacements instead (see [migration](migration.md) for the key-by-key table). Settings-provider JSON or untyped option objects that still carry a removed key fail closed before any worker/provider call, compaction, or session append with a `TypeError` naming the key and its replacement.
|
|
155
154
|
|
|
156
|
-
Observer/reflector/dropper may use separate providers, models, instructions, thinking levels, credentials, and `requireExplicitModel`. `dropper.policy: "lowest-relevance"` drops deterministically without a model call; default is `"model"`.
|
|
155
|
+
Observer/reflector/dropper may use separate providers, models, instructions, thinking levels, credentials, and `requireExplicitModel`. `dropper.policy: "lowest-relevance"` drops deterministically without a model call; default is `"model"`. Workers resolve only from the nested `observation` / `reflection` / `dropper` configs plus `sessionModel` fallback — the top-level `workerProvider` / `workerModel` aliases were removed in 0.1.5.
|
|
157
156
|
|
|
158
157
|
Token counting uses `estimateEntryTokens()` / `estimateMessageTokens()`.
|
|
159
158
|
|
|
160
|
-
The runtime requires host-supplied `session`, an `appendEntry` callback bound to that session's owning store/branch, and at least one worker provider (`observation.provider`
|
|
159
|
+
The runtime requires host-supplied `session`, an `appendEntry` callback bound to that session's owning store/branch, and at least one worker provider (`observation.provider` / `reflection.provider` / `dropper.provider`). Model selection uses [use-case model selection](use-case-model-selection.md): pass per-worker `model` (or settings `observation.model` / `reflection.model` / `dropper.model`) to override, and `sessionModel: agent.config.model` so workers fall back to the session model when no worker model is configured. `requireExplicitModel: true` restores the historical `missing_model` skip when no explicit worker model is set. It no longer accepts a separate `store` option because mismatched session/store pairs can append memory entries outside the active branch. After each memory append, the runtime checks the appended entry is visible at the session leaf and fails closed/restores the previous checkout if the callback points elsewhere. Optional credential resolution is explicit; missing requested credentials skip worker execution. Default credential requests use the **resolved** model's provider id.
|
|
161
160
|
|
|
162
161
|
`createObservationalMemoryCompactionStrategy()` keeps recent message entries like the default compaction strategy, renders existing observations/reflections as the summary, and returns a standard Prism compaction entry. Its `data` includes `throughEntryId`, `keepEntryIds`, `strategy`, `trigger`, and `memory: { type: "om.folded", version: 1, fullFold, observations, reflections, droppedObservationIds }`. When active observations exceed `context.observationsPoolMaxTokens`, it performs a full fold and synchronously trims lowest-relevance observations until the folded payload fits hard byte/token caps (or throws a typed error).
|
|
163
162
|
|
package/docs/index.md
CHANGED
|
@@ -25,7 +25,7 @@ Prism is a TypeScript/Node.js agent harness. Host apps and extension packages ow
|
|
|
25
25
|
## Compaction/session memory
|
|
26
26
|
- [Compaction and retry policies](compaction-and-retry.md): summarize branch history and retry transient provider failures with host-replaceable policies.
|
|
27
27
|
- [LLM compaction package](compaction-llm.md): optional provider-backed strategy with finite summary/reserve/error caps, bounded redacted streaming retention, mandatory finite post-policy `model.parameters.maxTokens`, and `createCodingCompactionStrategy()` for coding handoff focus.
|
|
28
|
-
- [Observational memory compaction package](compaction-observational-memory.md): optional source-backed memory with explicit `attach()` lifecycle — **Recent exact messages**, **Observation log**, **Reflections**, **Raw-source retrieval** (exact-id recall + cursor paging); dual coverage, nested settings
|
|
28
|
+
- [Observational memory compaction package](compaction-observational-memory.md): optional source-backed memory with explicit `attach()` lifecycle — **Recent exact messages**, **Observation log**, **Reflections**, **Raw-source retrieval** (exact-id recall + cursor paging); dual coverage, **nested-only settings** (pre-0.0.19 flat keys and top-level `workerProvider`/`workerModel` aliases removed in 0.1.5; removed keys fail closed naming the nested replacement), branch-isolated `appendEntry`, secrets redaction, and inert import/extension.
|
|
29
29
|
- [Working and semantic memory](working-and-semantic-memory.md): optional `@arnilo/prism-memory` working-memory store, semantic recall, finite Embedder/VectorStore contracts, PostgreSQL/pgvector path, consent lifecycle, identity-bound redacted export, and resumable bounded rebuild.
|
|
30
30
|
- [Session stores](session-stores.md): `SessionStore` contract, `SessionAppendOptions`, `SessionAppendConflictError`, branch handles, `readBranchPath`, optional bounded `searchSessions` / `SessionIndex` (memory linear|unsupported), and dev-vs-production branch reads — start here for session persistence.
|
|
31
31
|
- [Conversations](conversations.md): durable user-scoped conversation threads (create/list/continue/branch/archive/export/delete) on session + event-ledger seams, thread-bound reconnectable replay, frozen caps, and legal-hold-aware deletion.
|
|
@@ -35,7 +35,7 @@ Prism is a TypeScript/Node.js agent harness. Host apps and extension packages ow
|
|
|
35
35
|
- [SQLite persistence](sqlite-persistence.md): optional `better-sqlite3` adapter with session/run storage, checkpoints/leases, feedback, FTS `searchSessions` (migration-v4), and transactionally verified/backfilled migration metadata.
|
|
36
36
|
- [PostgreSQL persistence](postgres-persistence.md): optional pooled `pg` adapter with session/run/checkpoint/lease/feedback storage, FTS `searchSessions` (migration-v4), advisory-locked checksummed/full-shape migrations, and opt-in live conformance.
|
|
37
37
|
- [Enterprise PostgreSQL state](enterprise-postgres-state.md): optional `@arnilo/prism-enterprise-postgres` composition for durable policy/evaluation/work-idempotency/model-router/`toolEffects` state, exact ownership, checksummed migrations, and explicit cleanup.
|
|
38
|
-
- [Migration guide](migration.md): **0.0.28 → 0.1.0** release-candidate hardening (no migration); **0.0.17 → 0.1.0 upgrade matrix** (store compatibility per release line: compatible / tested migration / tested refusal, plus breaking-default callouts); **0.0.27** ACP coding-host interop (capability advertise-when, session modes/config, MCP select, lifecycle events, elicitation); **0.0.26** coding intelligence, managed processes, forge, and safe egress; **0.0.25** durable custom loops and shared human-in-the-loop decisions; **0.0.24** distributed events and recoverable tool effects; **0.0.23** enterprise PostgreSQL state adapters (async router and work reconciliation); **0.0.22** third-party behavior integrations (Caveman, Ponytail); **0.0.21** coding-tool capability gaps (`outputMode`, glob, read-before-write, delete/move, aggregator 9/4); **0.0.20** progressive skill disclosure, empty registry default, `load_skill`, priority budget demotion, optional tool-result fold; **0.0.19** observational memory lifecycle; **0.0.15** OpenAI hosted tools/continuation/Realtime, exact AI SDK v4 matrix, RAG lifecycle/reranking/trust/status, and memory export/rebuild; **0.0.14** conversations, memory consent/lifecycle, artifact co-work review, AG-UI co-work events, scoped M365/GWS OAuth connectors, browser checkpoints, device contracts, and Alibaba/Ollama providers; plus prior release migrations.
|
|
38
|
+
- [Migration guide](migration.md): **0.1.4 → 0.1.5** documented breaking cut — deprecated-option removal (the inert provider request knobs, `maxToolRounds` alias, observational-memory flat keys/worker aliases, `autoResizeImages`, `INIT_PROVIDERS`) with exact replacement table, before/after examples, and fail-closed refusal behavior; **0.0.28 → 0.1.0** release-candidate hardening (no migration); **0.0.17 → 0.1.0 upgrade matrix** (store compatibility per release line: compatible / tested migration / tested refusal, plus breaking-default callouts); **0.0.27** ACP coding-host interop (capability advertise-when, session modes/config, MCP select, lifecycle events, elicitation); **0.0.26** coding intelligence, managed processes, forge, and safe egress; **0.0.25** durable custom loops and shared human-in-the-loop decisions; **0.0.24** distributed events and recoverable tool effects; **0.0.23** enterprise PostgreSQL state adapters (async router and work reconciliation); **0.0.22** third-party behavior integrations (Caveman, Ponytail); **0.0.21** coding-tool capability gaps (`outputMode`, glob, read-before-write, delete/move, aggregator 9/4); **0.0.20** progressive skill disclosure, empty registry default, `load_skill`, priority budget demotion, optional tool-result fold; **0.0.19** observational memory lifecycle; **0.0.15** OpenAI hosted tools/continuation/Realtime, exact AI SDK v4 matrix, RAG lifecycle/reranking/trust/status, and memory export/rebuild; **0.0.14** conversations, memory consent/lifecycle, artifact co-work review, AG-UI co-work events, scoped M365/GWS OAuth connectors, browser checkpoints, device contracts, and Alibaba/Ollama providers; plus prior release migrations.
|
|
39
39
|
- [Node JSONL session store](node-jsonl-session-store.md): development-only JSONL file adapter for single-process Node hosts; no cross-process safety; `searchSessions` throws `SessionSearchUnsupportedError`.
|
|
40
40
|
- [Persistence, credentials, and multimodality primitives](persistence-credentials-multimodality-primitives.md): Plan 056 inventory — session/run-ledger/persistence contracts, credential/OAuth seams, content/resource/model capabilities, package dependency matrix, conformance matrix, and threat model for production adapters.
|
|
41
41
|
|
|
@@ -129,7 +129,7 @@ Prism is a TypeScript/Node.js agent harness. Host apps and extension packages ow
|
|
|
129
129
|
- [Ponytail behavior integration](ponytail.md): optional `@arnilo/prism-ponytail` — upstream Ponytail skills/commands, `ponytail-mode` injector, session `ponytail-mode` persistence; resolves peer `@dietrichgebert/ponytail` or `upstreamPath`; opt-in (not in code/sdk profiles).
|
|
130
130
|
|
|
131
131
|
## Release and install
|
|
132
|
-
- [Release and install](release-and-install.md): current **0.1.
|
|
132
|
+
- [Release and install](release-and-install.md): current **0.1.5** 49-package graph (root + 48 workspace packages; plan 017 the documented breaking cut — deprecated-option removal with `docs/migration.md` `0.1.4 → 0.1.5` section and reviewed compat-baseline regeneration via `--allow-break` then `--update-baseline`: the inert provider request knobs, `RunOptions.maxToolRounds`, observational-memory flat settings keys + top-level worker aliases, `ReadToolOptions.autoResizeImages`, `INIT_PROVIDERS`; all removals fail closed naming their replacement; plan 016 internal god-module split — `agents.ts`/`contracts.ts` reorganized behind barrel re-exports with a byte-identical public entry surface, measured tree-shaking improvement in `scripts/phase16-baseline.json`, and additive `@arnilo/prism-browser` Chrome DevTools Protocol capabilities — `browser_evaluate`/`browser_observe` and `block_urls`/`unblock_urls`/`throttle`/`emulate` act actions; plan 015 dead-code and deprecation hygiene on the frozen 0.1.x line — parameterized benchmark runner `scripts/benchmark.mjs` absorbing the per-version runners, archived review-coverage evidence in `docs/_evidence/`, non-blocking unused-code sweep `npm run sweep:unused`, opt-in checkpoint persistence for loaded-skill names and read-path sets; plan 014 Alibaba provider enrichment — embeddings, video input, verified compatible-mode surface decision table; plan 013 post-release hardening — build single-flight, MCP SSE relay test, combined coverage summary, canonical manifest-count narrative, ACP modes/config persistence guidance; Phase 12 release-candidate hardening; plan 012 — freeze manifest, compatibility matrix, upgrade matrix, packed-install e2e journeys, restart-recovery evidence, capacity envelopes, security policy), exact-peer/install/tarball rules, deterministic resumable publication and publish dry-run, frozen 0.1.x compatibility and support matrix (Node/PostgreSQL/platform/provider/protocol pins and unsupported combinations, machine-checked against `scripts/phase12-freeze-manifest.json`), protected PostgreSQL gate, pinned supply-chain gates, offline tests, the 0.0.15 provider/AI-SDK/RAG/memory protected live-canary matrix, and sandbox-browser Docker/Playwright gates.
|
|
133
133
|
- [0.1.0 / 1.0 readiness gates](0.1.0-readiness.md): command-per-gate 1.0 readiness table — frozen API surface + compat gate, migration/docs tripwires, budget table, live-suite matrix, security matrix, current-line status (**0.0.23** published target), signed-publication/live-canary prerequisites for 1.0, and Phase 12 demand-evidence entry criteria.
|
|
134
134
|
- [Review coverage archive](_evidence/): per-phase evidence freezes (plans 067–079, releases 0.0.4–0.0.16) — traceability matrices, provider validation, capability/primitive/limit matrices, benchmark budgets, and artifact-diet findings; tarball-excluded, kept in-repo for audit.
|
|
135
135
|
|
package/docs/migration.md
CHANGED
|
@@ -1,5 +1,116 @@
|
|
|
1
1
|
# Migration guide
|
|
2
2
|
|
|
3
|
+
## 0.1.4 → 0.1.5 deprecated-option removal (documented breaking cut)
|
|
4
|
+
|
|
5
|
+
Release **0.1.5** (plan 017) removes the deprecated compatibility surface that 0.1.x kept after 0.0.19: the inert provider timeout/retry knobs, the `maxToolRounds` run-option alias, the pre-0.0.19 observational-memory flat keys and worker aliases, the read-tool `autoResizeImages` flag, and the `INIT_PROVIDERS` constant. This is the **documented breaking cut** announced in the 0.1.4 migration section; every other 0.1.x release keeps the compat baseline green. Three roadmap labels from the original 0.1.5 task were corrected during planning and are honored here:
|
|
6
|
+
|
|
7
|
+
1. **`RunOptions.maxToolRounds`** (not `AgentConfig.maxToolRounds`) is the removed alias → use `RunOptions.limits.maxToolRounds`. `AgentConfig.limits.maxToolRounds` and `RunLimits.maxToolRounds` stay supported.
|
|
8
|
+
2. **`ReadToolOptions.autoResizeImages`** is the removed flag; `transformImage` is the supported replacement (the roadmap text had the direction reversed).
|
|
9
|
+
3. **`INIT_PROVIDERS`** is the removed constant; `listInitProviders()` is the supported replacement that remains (the roadmap said to remove `listInitProviders`).
|
|
10
|
+
|
|
11
|
+
### Removed symbols and replacements
|
|
12
|
+
|
|
13
|
+
| Removed | Replaced by | Fail-closed behavior |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `ProviderRequestOptions.timeoutMs` | `ProviderRequest.signal` / `RunOptions.signal` (host-side abort) | removed from the type; untyped callers are refused with a `TypeError` naming the replacement before any provider call |
|
|
16
|
+
| `ProviderRequestOptions.maxRetries` | `AgentConfig.retry` / `RunOptions.retry` | same |
|
|
17
|
+
| `ProviderRequestOptions.maxRetryDelayMs` | `AgentConfig.retry` / `RunOptions.retry` | same |
|
|
18
|
+
| `RunOptions.maxToolRounds` | `RunOptions.limits.maxToolRounds` | removed from the type; untyped `{ maxToolRounds }` run input is refused before the agent starts |
|
|
19
|
+
| `ObservationalMemorySettingsInput.observeAfterTokens` | `observation.messageTokens` | flat key removed from the type; settings-provider JSON or untyped overrides carrying it throw a `TypeError` naming the nested replacement before any worker/provider call, compaction, or session append |
|
|
20
|
+
| `ObservationalMemorySettingsInput.reflectAfterTokens` | `reflection.observationTokens` | same |
|
|
21
|
+
| `ObservationalMemorySettingsInput.compactAfterTokens` | `context.compactAfterTokens` | same |
|
|
22
|
+
| `ObservationalMemorySettingsInput.keepRecentEntries` | `context.recentMessages` | same |
|
|
23
|
+
| `ObservationalMemorySettingsInput.recentMessageMaxTokens` | `context.recentMessageMaxTokens` | same |
|
|
24
|
+
| `ObservationalMemorySettingsInput.observationsPoolMaxTokens` | `context.observationsPoolMaxTokens` | same |
|
|
25
|
+
| `ObservationalMemorySettingsInput.observationsPoolTargetTokens` | `context.observationsPoolTargetTokens` | same |
|
|
26
|
+
| `ObservationalMemorySettingsInput.workerModel` | `observation.model` / `reflection.model` / `dropper.model` | same |
|
|
27
|
+
| `ObservationalMemorySettingsInput.thinkingLevel` | `observation.thinkingLevel` / `reflection.thinkingLevel` / `dropper.thinkingLevel` | same |
|
|
28
|
+
| `ObservationalMemorySettingsInput.requireExplicitModel` | `observation.requireExplicitModel` / `reflection.requireExplicitModel` / `dropper.requireExplicitModel` | same |
|
|
29
|
+
| `CreateObservationalMemoryOptions.workerProvider` / `workerModel` | `observation.provider` / `observation.model` (and the `reflection` / `dropper` equivalents) | removed from the type; the factories throw synchronously naming the replacement |
|
|
30
|
+
| `ObservationalMemoryRuntimeOptions.workerProvider` / `workerModel` | `observation` / `reflection` / `dropper` worker configs | same |
|
|
31
|
+
| `ReadToolOptions.autoResizeImages` | `transformImage` | removed from the type; `createReadTool` throws naming `transformImage` before any path resolution or filesystem access |
|
|
32
|
+
| `INIT_PROVIDERS` (root export) | `listInitProviders()` | removed; init parsing, usage text, validation, and tests all use the function |
|
|
33
|
+
|
|
34
|
+
### Before / after
|
|
35
|
+
|
|
36
|
+
Provider knobs were inert in first-party providers (hosts were always expected to abort/retry at their own layer):
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// 0.1.4
|
|
40
|
+
const session = await agent.createSession();
|
|
41
|
+
await session.run("Hi", {
|
|
42
|
+
provider: { timeoutMs: 30_000, maxRetries: 3, maxRetryDelayMs: 250 },
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// 0.1.5
|
|
46
|
+
const session = await agent.createSession();
|
|
47
|
+
await session.run("Hi", {
|
|
48
|
+
retry: { maxAttempts: 3, baseDelayMs: 250 },
|
|
49
|
+
signal: AbortSignal.timeout(30_000),
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`maxToolRounds` moves into the limits group (the CLI flag `--max-tool-rounds` is unchanged and maps to the nested limit):
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
// 0.1.4
|
|
57
|
+
await session.run("Hi", { maxToolRounds: 2 });
|
|
58
|
+
|
|
59
|
+
// 0.1.5
|
|
60
|
+
await session.run("Hi", { limits: { maxToolRounds: 2 } });
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Observational-memory settings and workers become nested-only (0.0.19 already introduced the nested groups; the flat keys were kept for pre-1.0 hosts):
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
// 0.1.4
|
|
67
|
+
createObservationalMemoryRuntime({
|
|
68
|
+
session,
|
|
69
|
+
appendEntry: (entry) => store.append(entry),
|
|
70
|
+
workerProvider,
|
|
71
|
+
sessionModel: agent.config.model,
|
|
72
|
+
overrides: { observeAfterTokens: 1, thinkingLevel: "low" },
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// 0.1.5
|
|
76
|
+
createObservationalMemoryRuntime({
|
|
77
|
+
session,
|
|
78
|
+
appendEntry: (entry) => store.append(entry),
|
|
79
|
+
observation: { provider: workerProvider, model: { provider: "neuralwatt", model: "glm-5.2-fast" } },
|
|
80
|
+
sessionModel: agent.config.model,
|
|
81
|
+
overrides: { observation: { messageTokens: 1, thinkingLevel: "low" } },
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The read tool keeps only the host-owned resize callback:
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
// 0.1.4
|
|
89
|
+
createReadTool(cwd, { autoResizeImages: true });
|
|
90
|
+
|
|
91
|
+
// 0.1.5
|
|
92
|
+
createReadTool(cwd, {
|
|
93
|
+
transformImage: async ({ buffer, mimeType }) => resize(buffer, mimeType),
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Dynamic-config refusal behavior
|
|
98
|
+
|
|
99
|
+
Removed members are also removed from the runtime resolver paths, so **untyped** callers (plain JS, `as any`, settings-provider JSON, persisted run input) are caught before any side effect:
|
|
100
|
+
|
|
101
|
+
- Provider request knobs and `maxToolRounds`: refused at the top of the run entry point (`runInternal`) with a `TypeError` naming `RunOptions.limits.maxToolRounds` (or the abort/retry replacement) — before the agent starts, no tool/provider call happens.
|
|
102
|
+
- Observational-memory flat keys: `assertNoRemovedFlatKeys` runs before any worker/provider call, compaction, or session append; it names the first offending key and its nested replacement. The worker aliases are refused synchronously at both factory boundaries.
|
|
103
|
+
- `autoResizeImages`: refused at `createReadTool` construction, before path resolution or `access`/`statFile`/`readFile`.
|
|
104
|
+
- `INIT_PROVIDERS`: reads of the removed constant yield `undefined`; use `listInitProviders()`.
|
|
105
|
+
|
|
106
|
+
### Store compatibility
|
|
107
|
+
|
|
108
|
+
**Compatible — no persisted shape change.** None of the removals touch the session-store schema, run-state checkpoint shape, event schema, or default behavior: the removed options were inert aliases, and the nested replacements resolve to the same active values (e.g. `maxToolRounds` default 8 / hard cap 64 in `DEFAULT_RUN_LIMITS` / `HARD_RUN_LIMITS` are unchanged).
|
|
109
|
+
|
|
110
|
+
### Rollback
|
|
111
|
+
|
|
112
|
+
Restore the 0.1.4 manifests/tag (or revert this commit) — no data migration. Configs and code written against 0.1.5 nested forms also work on 0.1.4 (the nested members are not new in 0.1.5), but `@ts-expect-error`-free code must drop any removed-key usage first. Stores never change.
|
|
113
|
+
|
|
3
114
|
## 0.1.3 → 0.1.4 internal reorganization behind barrel re-exports (no migration)
|
|
4
115
|
|
|
5
116
|
Release **0.1.4** (plan 016) is an **internal file reorganization behind barrel re-exports**: the root `src/agents.ts` and `src/contracts.ts` god-modules were split by concern into sibling modules (`contracts-core` / `contracts-run-state` / `contracts-protocol` behind the `contracts.ts` barrel; `agent-session` / `agent-run-lifecycle` / `agent-approval` / `agent-tool-dispatch` / `agent-run-state` / `agent-loops` / `compaction` behind the `agents.ts` barrel). **Public declaration surface unchanged** — the root entry surface is byte-identical to 0.1.3 (zero added/removed/changed on the public entry; the only union-surface additions are 14 internal cross-module helper exports that are not consumer-importable, see `scripts/compat-baseline/arnilo__prism.txt`). The optional `@arnilo/prism-browser` package extends additively with Chrome DevTools Protocol capabilities (0.1.4): `browser_evaluate`, `browser_observe`, and the `block_urls`/`unblock_urls`/`throttle`/`emulate` act actions on Chromium hosts, plus raw `{ css }`/`{ xpath }` targets — new exports and two optional structural interface members only, zero removals. **Store compatibility: compatible** — no persisted shape, event schema, or default behavior changed (no runtime path changed; the split is declaration-level). no migration step; rollback = restore the 0.1.3 manifests/tag (stores never change). The next line, **0.1.5**, is the documented **breaking cut** (deprecated-option removal); its migration section will list the removed symbols (the public-but-unused export candidates from `scripts/dead-exports.mjs`).
|
|
@@ -17,7 +17,7 @@ Exported from `@arnilo/prism/testing/provider-conformance`:
|
|
|
17
17
|
|
|
18
18
|
## When to use it
|
|
19
19
|
|
|
20
|
-
Use these helpers in provider package tests to check event order, terminal events, abort propagation via `ProviderRequest.signal`, streamed tool-call deltas, usage/cache accounting, request body content preservation, protected header ownership, and secret redaction.
|
|
20
|
+
Use these helpers in provider package tests to check event order, terminal events, abort propagation via `ProviderRequest.signal`, streamed tool-call deltas, usage/cache accounting, request body content preservation, protected header ownership, and secret redaction. Provider-level timeout/retry hints were removed in 0.1.5; first-party providers use runtime abort signals and `AgentConfig.retry`/`RunOptions.retry` instead.
|
|
21
21
|
|
|
22
22
|
Do not use them as a live integration runner, provider simulator, retry framework, credential loader, or test framework replacement.
|
|
23
23
|
|
|
@@ -65,7 +65,7 @@ Helpers accept normal `AIProvider`, `ProviderRequest`, `ProviderEvent`, `Usage`,
|
|
|
65
65
|
|
|
66
66
|
- `collectProviderEvents()` returns provider events in stream order.
|
|
67
67
|
- `assertProviderStreamConforms()` returns collected events after verifying the stream ends with `done` or `error`, terminal events are last, and optional text/usage expectations match.
|
|
68
|
-
- `assertAbortIsObserved()` passes an already-aborted signal and expects provider generation to reject. This is the supported timeout primitive; use a host abort controller or `RunOptions.signal
|
|
68
|
+
- `assertAbortIsObserved()` passes an already-aborted signal and expects provider generation to reject. This is the supported timeout primitive; use a host abort controller or `RunOptions.signal`.
|
|
69
69
|
- `assertToolCallDeltasReconstruct()` rebuilds streamed `tool_call_delta` fragments into tool calls and validates expected id/name/arguments. Malformed JSON with id+name present yields `argumentsError` (no throw); missing id/name throws typed `incomplete_delta`. The runtime uses the same reconstruction before tool execution when a provider streams deltas.
|
|
70
70
|
- `assertUsageAccounting()` finds `usage` or `done.usage` and checks selected token fields including `cacheReadTokens` and `cacheWriteTokens`. This is the provider-neutral check for normalized cache read/write token extraction; every first-party provider package exercises it against server-specific fields (`cached_tokens`, `cache_read_input_tokens`, etc.).
|
|
71
71
|
- `assertSerializedRequestCoversContent()` scans a serialized provider request body for primitive canaries from each Prism content block and fails if any supported block type is silently dropped. Provider-valid transcripts place assistant `tool_call` messages before matching role `tool` `tool_result` messages; runtime, cache-aware input layout, and observational-memory worker loops preserve that order before serialization.
|
package/docs/provider-layer.md
CHANGED
|
@@ -129,7 +129,7 @@ const agent = createAgent({ model: { provider: own.id, model: "demo" }, provider
|
|
|
129
129
|
- Provider event helpers return plain `ProviderEvent` objects.
|
|
130
130
|
- `providerError()` converts unknown errors to redacted `ErrorInfo` through `errorToErrorInfo()` and preserves safe string/number `code` fields for retry classification.
|
|
131
131
|
- `createMockProvider()` returns an `AIProvider` whose `generate()` yields the scripted events in order and checks `request.signal?.aborted` before each event.
|
|
132
|
-
- The agent/session runtime passes its per-run abort signal as `ProviderRequest.signal`. `ProviderRequestOptions.structuredOutput` requests provider-native JSON-schema output when the model declares `capabilities.structuredOutput`; unsupported models fail before fetch.
|
|
132
|
+
- The agent/session runtime passes its per-run abort signal as `ProviderRequest.signal`. `ProviderRequestOptions.structuredOutput` requests provider-native JSON-schema output when the model declares `capabilities.structuredOutput`; unsupported models fail before fetch. Timeouts are host-owned: pass `RunOptions.signal`/host abort controllers; retries are runtime-owned via `AgentConfig.retry`/`RunOptions.retry`. Provider-level timeout/retry hints were removed in 0.1.5.
|
|
133
133
|
|
|
134
134
|
## Request/response example
|
|
135
135
|
|
|
@@ -68,7 +68,7 @@ api.registerSystemPromptContribution({ id: "demo-prompt", source: "package", mod
|
|
|
68
68
|
|
|
69
69
|
Hosts decide which credential resolvers, env objects, OAuth stores, request policies, and prompt contributions become active. Request policies can set generic `ProviderRequest.options` such as `sessionId`, `cacheRetention`, `headers`, `compat`, and opaque `extra`; provider adapters decide how to map those options to provider payloads. Caller headers are extension headers only: provider adapters must apply provider-owned headers (auth, content type, session/cache/security, attribution) after caller headers so requests cannot override credentials or provider policy.
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Provider request options: `ProviderRequestOptions` carries session/cache/header/compat/extra hints only. Timeouts are host-owned (`RunOptions.signal`/host abort controllers); retries are runtime-owned (`AgentConfig.retry`/`RunOptions.retry`). Provider-level timeout/retry hints were removed in 0.1.5. Provider packages should not add provider-specific retry loops unless the vendor protocol requires it and runtime retry cannot cover the failure mode.
|
|
72
72
|
|
|
73
73
|
First-party providers map generic `ModelConfig.parameters.maxTokens` to real output-token request fields instead of sending `maxTokens` on the wire: OpenAI Responses uses `max_output_tokens`; OpenRouter, OpenCode Go OpenAI-compatible, OpenCode Go Anthropic-style, Z.AI, Kimi, and NeuralWatt use `max_tokens`. Other `model.parameters` values pass through unchanged unless the provider docs say otherwise.
|
|
74
74
|
|
|
@@ -33,7 +33,7 @@ Static scan of root `src/providers/` and `packages/provider-*/src/` before Plan
|
|
|
33
33
|
| Surface | Owner | Behavior today |
|
|
34
34
|
| --- | --- | --- |
|
|
35
35
|
| Runtime retry | `@arnilo/prism` `AgentConfig.retry` / `RunOptions.retry` | Classifies `ErrorInfo.code`; provider packages set numeric HTTP `code` on errors |
|
|
36
|
-
| `ProviderRequestOptions.maxRetries` / `timeoutMs` | Contracts | **
|
|
36
|
+
| `ProviderRequestOptions.maxRetries` / `timeoutMs` | Contracts | **Removed in 0.1.5**; use `RunOptions.signal` / `AgentConfig.retry` / `RunOptions.retry` |
|
|
37
37
|
| NeuralWatt `classifyNeuralWattError` | `packages/provider-neuralwatt` | Parses `Retry-After`, `error.retry_after`, `retry_strategy`; no extra network calls |
|
|
38
38
|
| Quota endpoint throttling | `packages/provider-neuralwatt/quota.ts` | Documents 1 rps limit; caller-owned cache |
|
|
39
39
|
|
package/docs/public-contracts.md
CHANGED
|
@@ -117,7 +117,7 @@ Important request shapes:
|
|
|
117
117
|
| `PromptCacheHints` / `PromptCacheBreakpoint` | Structured provider cache intent and reusable prompt anchors. See [Provider caching](provider-caching.md). |
|
|
118
118
|
| `ProviderPackage` | Inert provider package definition with docs metadata and explicit `setup(api)` registration. |
|
|
119
119
|
| `ProviderRequest` | Normalized provider input: `model`, `messages`, optional `tools`, `context`, generic `options`, `metadata`, and `signal`. |
|
|
120
|
-
| `ProviderRequestOptions` | Generic provider adapter hints: session id, legacy `cacheKey`/`cacheRetention`, structured `cache?: PromptCacheHints`, headers, compat, and opaque `extra
|
|
120
|
+
| `ProviderRequestOptions` | Generic provider adapter hints: session id, legacy `cacheKey`/`cacheRetention`, structured `cache?: PromptCacheHints`, headers, compat, and opaque `extra`. Provider-level timeout/retry hints were removed in 0.1.5; timeouts are host-owned (`RunOptions.signal`) and retries are runtime-owned (`AgentConfig.retry`/`RunOptions.retry`). |
|
|
121
121
|
| `ProviderRequestPolicy` | Ordered pre-provider hook that can patch the request and return exact secrets for provider-error redaction. |
|
|
122
122
|
| `ToolRegistry` | Host active tool registry shape: `register()`, `get()`, `resolve()`, and `list()`. |
|
|
123
123
|
| `ToolExecutionContext` | Host tool execution context: session/run ids, tool call id, optional abort signal, metadata, and progress callback. |
|
|
@@ -131,7 +131,7 @@ Important request shapes:
|
|
|
131
131
|
| `CredentialRequest` | Credential lookup request: credential `name`, optional provider id, and metadata. |
|
|
132
132
|
| `OAuthProvider` | Host/package OAuth callbacks for login, optional refresh, and conversion to a `Credential`. |
|
|
133
133
|
| `AgentSessionConfig` | Session creation input: optional id, agent, store, leaf id, and metadata. |
|
|
134
|
-
| `RunOptions` | Per-run overrides: optional abort signal, model, input layout,
|
|
134
|
+
| `RunOptions` | Per-run overrides: optional abort signal, model, input layout, run limits (incl. `limits.maxToolRounds`), provider options/request policies, system prompt layers, compaction, retry, metadata, skill selection, validate, redactor, and loop. |
|
|
135
135
|
| `SubscribeOptions` / `SubscriberOverflowPolicy` | Live `AgentEvent` subscriber queue limit and overflow policy: `maxQueuedEvents`, `overflow: "close" \| "drop_oldest" \| "drop_newest"`. |
|
|
136
136
|
| `resumeAgentRunStream` / `AgentRunResumeStreamOptions` | One durable-run event stream: existing checkpoint/resume options plus `signal` and bounded subscriber options. `AgentRunLifecycle.resumeStream()` adds host capability resolution; no protocol types enter core. |
|
|
137
137
|
| `AgentConfig.loop` / `RunOptions.loop` | Replaceable per-run control loop: `singleShotLoop` default, `generate-validate-revise` options, or a custom `AgentLoopStrategy`. `RunOptions.loop` wins. See [Agent loops](agent-loops.md). |
|
|
@@ -274,6 +274,38 @@ 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.5 publish handoff (plan 017 Task 4)
|
|
278
|
+
|
|
279
|
+
**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).
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Operator prerequisites (each a named blocked gate — none may be skipped):
|
|
283
|
+
# 1. protected live-canary matrix green (live-canaries.yml, canary-report.json retained)
|
|
284
|
+
# 2. PostgreSQL + keychain protected suites green (test:postgres, keychain suite)
|
|
285
|
+
# 3. CodeQL SAST green on the release commit (security.yml / release.yml codeql-release)
|
|
286
|
+
# 4. npm OIDC trusted publishing identity authenticated (NPM_TOKEN with id-token, provenance)
|
|
287
|
+
|
|
288
|
+
git diff --check
|
|
289
|
+
npm ci
|
|
290
|
+
npm run sdk:ready # includes typecheck, lint, format, full test, coverage, pack, release:gate
|
|
291
|
+
npm run security:threat-suites
|
|
292
|
+
PRISM_TEST_POSTGRES_URL="$DATABASE_URL" npm run test:postgres # Phase 7 + Phase 12 restart-recovery
|
|
293
|
+
npm audit --audit-level=moderate
|
|
294
|
+
npm run release:check -- --version 0.1.5 --report /tmp/prism-0.1.5-preflight.json
|
|
295
|
+
npm run release:publish -- --version 0.1.5 --dry-run --allow-dirty --allow-untagged --report /tmp/prism-0.1.5-dry-run.json
|
|
296
|
+
# run the dry-run twice and diff the reports: deterministic, byte-identical
|
|
297
|
+
|
|
298
|
+
# Sign the release on the clean tagged tree (operator GPG key):
|
|
299
|
+
git tag -s v0.1.5 -m "Prism 0.1.5 — documented breaking cut: deprecated-option removal"
|
|
300
|
+
git verify-tag v0.1.5
|
|
301
|
+
git push origin v0.1.5 # tag push triggers release.yml publish job (provenance, attestations)
|
|
302
|
+
|
|
303
|
+
# Real publication never bypasses the gates: release.mjs refuses
|
|
304
|
+
# --allow-dirty/--allow-untagged without --dry-run.
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**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).
|
|
308
|
+
|
|
277
309
|
### 0.1.4 publish handoff (plan 016 Task 6)
|
|
278
310
|
|
|
279
311
|
**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.5",
|
|
4
4
|
"description": "Agent harness for AI providers, agents, sessions, and tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"build": "npm run build:core && npm run build --workspaces --if-present",
|
|
143
143
|
"typecheck": "npm run build && npm run typecheck --workspaces --if-present && tsc -p examples --noEmit",
|
|
144
144
|
"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",
|
|
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/phase17-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
146
|
"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
147
|
"coverage:summary": "node scripts/coverage-summary.mjs",
|
|
148
148
|
"lint": "biome lint .",
|