@arnilo/prism 0.2.7 → 0.2.8
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 +6 -1
- package/README.md +2 -2
- package/dist/agent-loops.js +4 -0
- package/dist/agent-run-lifecycle.js +2 -2
- package/dist/agent-session/helpers.d.ts +1 -1
- package/dist/agent-session/helpers.js +2 -1
- package/dist/agent-session/session.d.ts +1 -1
- package/dist/agent-session/session.js +28 -20
- package/dist/agent-session.d.ts +1 -1
- package/dist/agent-session.js +1 -1
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/contracts-core/agent.d.ts +5 -5
- package/dist/contracts-core/agent.js +2 -0
- package/dist/contracts-core/extensions.d.ts +3 -3
- package/dist/contracts-core/extensions.js +2 -0
- package/dist/contracts-core/loop.d.ts +6 -1
- package/dist/contracts-core/session.d.ts +1 -1
- package/dist/contracts-core.d.ts +6 -6
- package/dist/contracts-core.js +6 -6
- package/dist/contracts-protocol.d.ts +8 -2
- package/dist/contracts.d.ts +1 -1
- package/dist/contracts.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/input.js +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/docs/0.1.0-readiness.md +7 -7
- package/docs/acp-agent.md +78 -0
- package/docs/acp.md +21 -10
- package/docs/ag-ui.md +1 -1
- package/docs/agent-definitions.md +1 -1
- package/docs/agent-events.md +2 -2
- package/docs/agent-loops.md +2 -2
- package/docs/coding-agent-tools.md +3 -1
- package/docs/coding-security.md +6 -0
- package/docs/index.md +3 -2
- package/docs/migration.md +14 -0
- package/docs/release-and-install.md +29 -8
- package/docs/structured-output.md +10 -10
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [0.2.8] - 2026-08-18
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
- **Release 0.2.8 (plan 028)** is the ACP adoption-fixes cut on the 0.2.x review-remediation line. API surface **additive-only** (plain reviewed compat gate at 0.2.8: expected deltas are the version literal plus the plan 028 additive exports — `ToolKind`/`ToolDefinition.kind`, `AgentFinishReason`/`agent_finished.finishReason`, `AgUiProjectedImage`/`AgUiProjectedToolResult`/`createCodingToolProjection`, `AcpCommand`/`AcpCommandsSeam`, `ERR_PRISM_ACP_RUN`, `acpImageBytes`/`acpCommandsPerUpdate`, and the new `@arnilo/prism-acp-agent` package; zero removals; baselines regenerated with `--update-baseline`, no `--allow-break`). Client names are scrubbed from the tree and `scripts/check-client-neutrality.mjs` is wired into `npm run release:gate`. ACP bugs B1–B5: truthful `usage_update` via a host `contextWindow` seam (omit when unknown); run-level `error` rejects `session/prompt` with `ERR_PRISM_ACP_RUN` (no fake transcript chunks); only boolean config options are advertised/`set_config_option` (select fails `ERR_PRISM_ACP_CAPABILITY`); `tool_call.kind` prefers registry `ToolDefinition.kind`; permission docs match SDK wire kinds (`allow_always`/`reject_always`). Features F1–F10: thinking → `agent_thought_chunk`; bounded redacted transcript replay on `session/load`/`resume`; spawnable `@arnilo/prism-acp-agent` over stdio; `session/prompt` `StopReason` fidelity; UNSTABLE-gated `plan_update`/`plan_removed` from coding plan lifecycle; host-owned `session_info_update` titles; opt-in `createCodingToolProjection()` for first-party edit/write diffs+locations; projected `toolResult` images as ACP content/image blocks (`acpImageBytes`); host slash commands as `available_commands_update` (`acpCommandsPerUpdate`); Windows sandbox policy documented (native backend stays Linux-only, fail-closed). Release graph is **51** publishable manifests at exact **0.2.8** (root + 50 workspace; `+1` `@arnilo/prism-acp-agent`). Store compatibility with 0.2.7: **compatible, no migration**. Exit gate green (`sdk:ready`, `release:check` including the client-neutrality guard, audit 0 moderate, scan-secrets 0, SBOM regenerated). **Publication remains the operator handoff** (`docs/release-and-install.md` `0.2.8 publish handoff` — signed `v0.2.8` tag + npm OIDC).
|
|
5
|
+
|
|
1
6
|
## [0.2.7] - 2026-08-17
|
|
2
7
|
|
|
3
8
|
### Changed
|
|
@@ -112,7 +117,7 @@
|
|
|
112
117
|
### Changed
|
|
113
118
|
- `@arnilo/prism-ag-ui` depends on `@arnilo/prism-coding-agent` (workspace) for Phase 9 output-chunk caps and lifecycle types; publishable graph stays **48** manifests.
|
|
114
119
|
- SBOM license policy allows `Unlicense` (tweetnacl via `@nats-io/nkeys`); readiness SBOM evidence refreshed (227 packages / 12 licenses).
|
|
115
|
-
- `@arnilo/prism-ag-ui/renderer` now exports the DOM-free A2UI core values (`A2UiSurfaceState`, `reduceA2UiOps`, `readA2UiBatch`, `resolvePointer`, `A2UI_VERSION`) —
|
|
120
|
+
- `@arnilo/prism-ag-ui/renderer` now exports the DOM-free A2UI core values (`A2UiSurfaceState`, `reduceA2UiOps`, `readA2UiBatch`, `resolvePointer`, `A2UI_VERSION`) — host FR, hosts can drive the surface state machine without mounting; `createA2UiRenderer` behavior and frozen A2UI caps unchanged.
|
|
116
121
|
|
|
117
122
|
### Breaking (advertise/surface for ACP hosts only)
|
|
118
123
|
- `initialize` advertisement now reflects wired seams (previously minimal close-session); new session methods are registered only with their seams; `session/resume` of a live session rejects; `agentInfo.version` now comes from the package.json. Core, AG-UI, and coding-agent behavior unchanged. See [migration guide](docs/migration.md) `0.0.26 → 0.0.27`.
|
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ npm install @arnilo/prism @arnilo/prism-provider-openai # core + one provider
|
|
|
56
56
|
npm install @arnilo/prism-base # core + compaction + validation
|
|
57
57
|
npm install @arnilo/prism-code @arnilo/prism-provider-openai # coding-agent profile
|
|
58
58
|
npm install @arnilo/prism-sdk @arnilo/prism-provider-openai # application profile
|
|
59
|
-
npm install @arnilo/prism-all # broad umbrella (
|
|
59
|
+
npm install @arnilo/prism-all # broad umbrella (21 direct / 44 transitive packages)
|
|
60
60
|
npm install @arnilo/prism-server @arnilo/prism-workflows # optional Web API boundary
|
|
61
61
|
npm install @arnilo/prism-supervisor # optional local delegation + A2A 1.0
|
|
62
62
|
npm install @arnilo/prism-web-tools # optional bounded Brave/Exa/Firecrawl research
|
|
@@ -183,7 +183,7 @@ printf '{"id":"1","command":"prompt","params":{"input":"Hi"}}\n' \
|
|
|
183
183
|
| `@arnilo/prism-base` | profile: core + compaction + JSON Schema validation |
|
|
184
184
|
| `@arnilo/prism-code` | profile: base + coding tools/security + MCP |
|
|
185
185
|
| `@arnilo/prism-sdk` | profile: base + workflows + MCP + credentials + OpenTelemetry |
|
|
186
|
-
| `@arnilo/prism-all` | broad umbrella:
|
|
186
|
+
| `@arnilo/prism-all` | broad umbrella: 21 first-party packages (44 transitive) across runtime, capability, provider, and persistence — omits document-reader, OpenAPI tools, NATS, Caveman, and Ponytail |
|
|
187
187
|
|
|
188
188
|
## Scripts
|
|
189
189
|
|
package/dist/agent-loops.js
CHANGED
|
@@ -47,6 +47,9 @@ export const singleShotLoop = {
|
|
|
47
47
|
ctx.emit({ type: "turn_finished", sessionId: ctx.sessionId, runId: ctx.runId, turn });
|
|
48
48
|
const dispatchable = dispatchableToolCalls(calls);
|
|
49
49
|
if (dispatchable.length === 0 || toolRounds >= ctx.maxToolRounds) {
|
|
50
|
+
// F4: the tool-round ceiling ended the run cleanly (not a natural end).
|
|
51
|
+
if (dispatchable.length > 0 && toolRounds >= ctx.maxToolRounds)
|
|
52
|
+
ctx.finishReason = "turn_limit";
|
|
50
53
|
// Soft-interrupt / late steer: keep same run going when queue still has text.
|
|
51
54
|
if (await ctx.applyPendingSteers?.()) {
|
|
52
55
|
nextInput = [];
|
|
@@ -155,6 +158,7 @@ export function generateValidateReviseLoop(opts) {
|
|
|
155
158
|
errors: [{ message: "maximum tool rounds exceeded" }],
|
|
156
159
|
metadata: { reason: "tool_round_limit" },
|
|
157
160
|
};
|
|
161
|
+
ctx.finishReason = "turn_limit";
|
|
158
162
|
ctx.emit({ type: "artifact_failed", sessionId: ctx.sessionId, runId: ctx.runId, turn, attempt: attempts + 1, result });
|
|
159
163
|
return usage;
|
|
160
164
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { agentFingerprint, loadAgentRunState, publicState, saveAgentRunState } from "./agent-run-state.js";
|
|
2
|
-
import { AgentRunStateError } from "./contracts.js";
|
|
3
1
|
import { assertValidAgentRunResume, pendingDecisionsOf, resolveRunDecisions } from "./agent-approval.js";
|
|
2
|
+
import { agentFingerprint, loadAgentRunState, publicState, saveAgentRunState } from "./agent-run-state.js";
|
|
4
3
|
import { RuntimeAgentSession, throwIfAbortedSignal } from "./agent-session.js";
|
|
4
|
+
import { AgentRunStateError } from "./contracts.js";
|
|
5
5
|
function assertAgentId(actual, expected) {
|
|
6
6
|
if (expected !== undefined && actual !== expected)
|
|
7
7
|
throw new AgentRunStateError("Agent run capability mismatch");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** helpers (0.2.5 plan 025 Task 1 split). Moved verbatim from agent-session.ts; public surface unchanged behind the barrel. */
|
|
2
2
|
import type { CompactionOptions, ContentBlock, ErrorInfo, Guardrails, Message, ProviderEvent, RetryOptions, ToolCallContent, Usage } from "../contracts.js";
|
|
3
|
-
import type { AgentInput } from "../input.js";
|
|
4
3
|
import { createId } from "../ids.js";
|
|
4
|
+
import type { AgentInput } from "../input.js";
|
|
5
5
|
export declare function providerContent(event: Extract<ProviderEvent, {
|
|
6
6
|
type: "content_delta" | "tool_call";
|
|
7
7
|
}>): ContentBlock;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/** helpers (0.2.5 plan 025 Task 1 split). Moved verbatim from agent-session.ts; public surface unchanged behind the barrel. */
|
|
2
|
+
import { singleShotLoop } from "../agent-loops.js";
|
|
1
3
|
import { createId } from "../ids.js";
|
|
2
4
|
import { reconstructToolCallDeltas } from "../provider-events.js";
|
|
3
|
-
import { singleShotLoop } from "../agent-loops.js";
|
|
4
5
|
export function providerContent(event) {
|
|
5
6
|
return event.type === "content_delta" ? event.content : event.call;
|
|
6
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** session (0.2.5 plan 025 Task 1 split). Moved verbatim from agent-session.ts; public surface unchanged behind the barrel. */
|
|
2
|
+
import type { StoredAgentRunState } from "../agent-run-state.js";
|
|
2
3
|
import type { Agent, AgentEvent, AgentRunResult, AgentRunStateOptions, AgentSession, AgentSessionConfig, CompactionOptions, CompactionResult, OwnershipScope, RunDecision, RunOptions, SessionEntry, SteerOptions, SubscribeOptions } from "../contracts.js";
|
|
3
4
|
import type { AgentInput } from "../input.js";
|
|
4
5
|
import type { LoadedSkillBodiesEntry } from "../skill-load.js";
|
|
5
|
-
import type { StoredAgentRunState } from "../agent-run-state.js";
|
|
6
6
|
export declare class RuntimeAgentSession implements AgentSession {
|
|
7
7
|
readonly id: string;
|
|
8
8
|
private readonly agent;
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
/** session (0.2.5 plan 025 Task 1 split). Moved verbatim from agent-session.ts; public surface unchanged behind the barrel. */
|
|
2
2
|
import { AgentRunSuspended, decisionIdentityRef, decisionScopesEqual, nestedApprovalId, nestedOutcomeToolResult, pathsEqual, } from "../agent-approval.js";
|
|
3
|
-
import {
|
|
4
|
-
import { assembleProviderInput } from "../input.js";
|
|
5
|
-
import { GuardrailError, assertGuardrailsAllowed, runGuardrails } from "../guardrails.js";
|
|
6
|
-
import { applyRestoredSkillBodies, snapshotLoadedSkillBodies, validateLoadedSkillBodies } from "../skill-load.js";
|
|
3
|
+
import { resolveLoop, resolveToolConcurrency } from "../agent-loops.js";
|
|
7
4
|
import { boundedLoopSnapshot, initialAgentRunState, publicState, saveAgentRunState, validateRunStateOptions } from "../agent-run-state.js";
|
|
8
|
-
import { RunLimitError, RunLimitTracker, resolveRunLimits } from "../run-limits.js";
|
|
9
|
-
import { errorToErrorInfo, redactAgentEvent, redactProviderRequest, redactRunLedgerRecord, redactSecrets, redactSessionEntry, } from "../redaction.js";
|
|
10
|
-
import { createMemorySessionStore, createSessionEntry, getSessionBranchEntries, rebuildSessionContext } from "../session-stores.js";
|
|
11
5
|
import { activeTools, policyList, toolElicitationRequest } from "../agent-tool-dispatch.js";
|
|
12
|
-
import { assertStructuredOutputRequestSupported, resolveRunProviderOptions } from "../structured-output.js";
|
|
13
|
-
import { canonicalToolEffectJson, toolEffectArgumentsHash } from "../tool-effects.js";
|
|
14
|
-
import { composeSystemPrompt, mergeSystemPromptConfig } from "../system-prompts.js";
|
|
15
6
|
import { createDefaultCompactionStrategy, isCompactionEntryData } from "../compaction.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
7
|
+
import { AgentDecisionError, AgentDelegationSuspendedError, AgentLoopStateError, AgentRunError, AgentRunStateError, DEFAULT_MAX_PENDING_DECISIONS, DEFAULT_MAX_PENDING_STEER_BYTES, DEFAULT_MAX_PENDING_STEERS, HARD_MAX_PENDING_DECISIONS, MAX_ATTRIBUTION_DEPTH, } from "../contracts.js";
|
|
8
|
+
import { assertGuardrailsAllowed, GuardrailError, runGuardrails } from "../guardrails.js";
|
|
9
|
+
import { identityTelemetryAttributes, ownershipFromIdentity, resolveRunIdentity } from "../identity.js";
|
|
10
|
+
import { assembleProviderInput } from "../input.js";
|
|
19
11
|
import { createProviderTurnMetadata, readProviderHttpStatus } from "../observability.js";
|
|
20
|
-
import { dispatchToolCall, resolveToolEffectDeclaration } from "../tools.js";
|
|
21
|
-
import { isFlushableRunLedger } from "../run-ledger.js";
|
|
22
12
|
import { providerToolCallDeltaContent } from "../provider-events.js";
|
|
13
|
+
import { createProviderRequestPolicyChain, normalizeProviderRequestPolicyResult } from "../provider-request-policy.js";
|
|
14
|
+
import { errorToErrorInfo, redactAgentEvent, redactProviderRequest, redactRunLedgerRecord, redactSecrets, redactSessionEntry, } from "../redaction.js";
|
|
15
|
+
import { createDefaultRetryPolicy, waitForRetry } from "../retry.js";
|
|
16
|
+
import { isFlushableRunLedger } from "../run-ledger.js";
|
|
17
|
+
import { RunLimitError, RunLimitTracker, resolveRunLimits } from "../run-limits.js";
|
|
18
|
+
import { createMemorySessionStore, createSessionEntry, getSessionBranchEntries, rebuildSessionContext } from "../session-stores.js";
|
|
19
|
+
import { createLoadedSkillSet, resolveSkillsDisclosure } from "../skill-disclosure.js";
|
|
20
|
+
import { applyRestoredSkillBodies, snapshotLoadedSkillBodies, validateLoadedSkillBodies } from "../skill-load.js";
|
|
23
21
|
import { resolveActiveSkills } from "../skills.js";
|
|
24
|
-
import {
|
|
22
|
+
import { assertStructuredOutputRequestSupported, resolveRunProviderOptions } from "../structured-output.js";
|
|
23
|
+
import { composeSystemPrompt, mergeSystemPromptConfig } from "../system-prompts.js";
|
|
24
|
+
import { canonicalToolEffectJson, toolEffectArgumentsHash } from "../tool-effects.js";
|
|
25
25
|
import { resolveToolResultFold } from "../tool-result-fold.js";
|
|
26
|
-
import {
|
|
27
|
-
import { ProviderTurnFailure, SteerSoftInterrupt, bridgeAbort, createUsageAccumulator, errorFromInfo, finalAssistantMessage, inputToMessages, isDurableLoop, isSteerSoftInterrupt, jsonBytes, mergeCompaction, mergeGuardrails, mergeRetry, messageTextBytes, providerContent, randomId, reconstructMissingToolCalls, throwIfAborted, throwIfAbortedSignal, withoutTrailingInput, } from "./helpers.js";
|
|
26
|
+
import { dispatchToolCall, resolveToolEffectDeclaration } from "../tools.js";
|
|
28
27
|
import { createAgentSession } from "./create-agent.js";
|
|
28
|
+
import { EventSubscriber } from "./event-subscriber.js";
|
|
29
|
+
import { bridgeAbort, createUsageAccumulator, errorFromInfo, finalAssistantMessage, inputToMessages, isDurableLoop, isSteerSoftInterrupt, jsonBytes, mergeCompaction, mergeGuardrails, mergeRetry, messageTextBytes, ProviderTurnFailure, providerContent, randomId, reconstructMissingToolCalls, SteerSoftInterrupt, throwIfAborted, throwIfAbortedSignal, withoutTrailingInput, } from "./helpers.js";
|
|
29
30
|
export class RuntimeAgentSession {
|
|
30
31
|
id;
|
|
31
32
|
agent;
|
|
@@ -850,7 +851,14 @@ export class RuntimeAgentSession {
|
|
|
850
851
|
loopState: undefined,
|
|
851
852
|
})
|
|
852
853
|
: undefined;
|
|
853
|
-
this.emit({
|
|
854
|
+
this.emit({
|
|
855
|
+
type: "agent_finished",
|
|
856
|
+
sessionId: this.id,
|
|
857
|
+
runId,
|
|
858
|
+
usage,
|
|
859
|
+
// F4: loop strategies record why a ceiling ended the run cleanly (e.g. turn_limit).
|
|
860
|
+
...(ctx.finishReason ? { finishReason: ctx.finishReason } : {}),
|
|
861
|
+
});
|
|
854
862
|
return this.buildRunResult({ runId, status: "succeeded", usage, runState });
|
|
855
863
|
}
|
|
856
864
|
catch (error) {
|
package/dist/agent-session.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** agent-session.ts barrel (0.2.5 plan 025 Task 1 god-module split): re-exports the
|
|
2
2
|
* public surface from cohesive family modules (0.1.4 barrel precedent). */
|
|
3
3
|
export * from "./agent-session/create-agent.js";
|
|
4
|
-
export * from "./agent-session/session.js";
|
|
5
4
|
export * from "./agent-session/event-subscriber.js";
|
|
6
5
|
export * from "./agent-session/helpers.js";
|
|
6
|
+
export * from "./agent-session/session.js";
|
package/dist/agent-session.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** agent-session.ts barrel (0.2.5 plan 025 Task 1 god-module split): re-exports the
|
|
2
2
|
* public surface from cohesive family modules (0.1.4 barrel precedent). */
|
|
3
3
|
export * from "./agent-session/create-agent.js";
|
|
4
|
-
export * from "./agent-session/session.js";
|
|
5
4
|
export * from "./agent-session/event-subscriber.js";
|
|
6
5
|
export * from "./agent-session/helpers.js";
|
|
6
|
+
export * from "./agent-session/session.js";
|
|
7
7
|
//# sourceMappingURL=agent-session.js.map
|
package/dist/agents.d.ts
CHANGED
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
* agents.d.ts and change the declared surface — the 0.1.4 promise is an
|
|
13
13
|
* identical surface.
|
|
14
14
|
*/
|
|
15
|
-
export { createAgent, createAgentSession } from "./agent-session.js";
|
|
16
15
|
export { resumeAgentRun, resumeAgentRunStream } from "./agent-run-lifecycle.js";
|
|
16
|
+
export { createAgent, createAgentSession } from "./agent-session.js";
|
package/dist/agents.js
CHANGED
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* agents.d.ts and change the declared surface — the 0.1.4 promise is an
|
|
13
13
|
* identical surface.
|
|
14
14
|
*/
|
|
15
|
-
export { createAgent, createAgentSession } from "./agent-session.js";
|
|
16
15
|
export { resumeAgentRun, resumeAgentRunStream } from "./agent-run-lifecycle.js";
|
|
16
|
+
export { createAgent, createAgentSession } from "./agent-session.js";
|
|
17
17
|
//# sourceMappingURL=agents.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/** Contracts-core agent family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from contracts-core.ts; public surface unchanged behind the barrel. */
|
|
3
|
+
import type { InputAssemblyLayout, RunLedger, ToolDefinition, ToolEffectStore, ToolRegistry } from "../contracts-protocol.js";
|
|
3
4
|
import type { AgentRunStateOptions, AgentSession } from "../contracts-run-state.js";
|
|
4
5
|
import type { ContributionRegistries } from "../contributions.js";
|
|
5
|
-
import type { InputAssemblyLayout, RunLedger, ToolDefinition, ToolEffectStore, ToolRegistry } from "../contracts-protocol.js";
|
|
6
6
|
import type { MiddlewareRegistry } from "../middleware.js";
|
|
7
|
-
import type { PermissionPolicy, TrustPolicy } from "../security.js";
|
|
8
7
|
import type { SecretRedactor } from "../redaction.js";
|
|
8
|
+
import type { PermissionPolicy, TrustPolicy } from "../security.js";
|
|
9
9
|
import type { ToolValidator } from "../tools.js";
|
|
10
|
-
import type { AIProvider, ProviderRequestOptions, ProviderResolver } from "./provider.js";
|
|
11
|
-
import type { AgentLoopOptions, AgentLoopStrategy } from "./loop.js";
|
|
12
10
|
import type { CompactionOptions, RetryOptions } from "./compaction.js";
|
|
13
11
|
import type { ContentBlock, ErrorInfo, JsonObject, Message, ModelConfig } from "./content.js";
|
|
14
12
|
import type { ProviderRequestPolicy, SystemPromptConfig } from "./extensions.js";
|
|
15
|
-
import type {
|
|
13
|
+
import type { AgentLoopOptions, AgentLoopStrategy } from "./loop.js";
|
|
16
14
|
import type { OwnershipScope } from "./persistence.js";
|
|
15
|
+
import type { AIProvider, ProviderRequestOptions, ProviderResolver } from "./provider.js";
|
|
17
16
|
import type { ResourceLoader } from "./resources.js";
|
|
17
|
+
import type { Guardrails, RunLimits } from "./run-limits.js";
|
|
18
18
|
import type { SessionStore } from "./session.js";
|
|
19
19
|
export interface AgentDefinition {
|
|
20
20
|
readonly name: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Contracts-core agent family (0.2.5 plan 025 Task 1 split).
|
|
2
|
+
* Moved verbatim from contracts-core.ts; public surface unchanged behind the barrel. */
|
|
1
3
|
export {};
|
|
2
4
|
/** Directory-name spelling for discovered contribution kinds. Maps to a
|
|
3
5
|
* {@link ManifestContributionDeclaration} kind for non-skill kinds:
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** Contracts-core extensions family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from contracts-core.ts; public surface unchanged behind the barrel. */
|
|
3
|
+
import type { ToolDefinition } from "../contracts-protocol.js";
|
|
3
4
|
import type { ContributionRegistries } from "../contributions.js";
|
|
4
5
|
import type { ManifestContributionDeclaration } from "../manifests.js";
|
|
5
6
|
import type { Middleware, MiddlewareHookName, MiddlewareRegistry } from "../middleware.js";
|
|
6
|
-
import type { ToolDefinition } from "../contracts-protocol.js";
|
|
7
|
-
import type { AIProvider, ProviderRequest } from "./provider.js";
|
|
8
7
|
import type { AgentDefinition, CommandDefinition, ContextProvider, InputBuilder, InstructionInjector, PromptBuilder, Skill } from "./agent.js";
|
|
9
8
|
import type { CompactionStrategy, RetryPolicy } from "./compaction.js";
|
|
10
|
-
import type { Credential, CredentialResolver, ResourceLoader, SettingsProvider } from "./resources.js";
|
|
11
9
|
import type { ErrorInfo, ModelConfig } from "./content.js";
|
|
12
10
|
import type { StoreFactory } from "./persistence.js";
|
|
11
|
+
import type { AIProvider, ProviderRequest } from "./provider.js";
|
|
12
|
+
import type { Credential, CredentialResolver, ResourceLoader, SettingsProvider } from "./resources.js";
|
|
13
13
|
export type ContributionFileKind = "skill" | "tool" | "context" | "instructions";
|
|
14
14
|
/** Inert envelope emitted by the host/CLI discovery scanner. Carries the
|
|
15
15
|
* realized {@link Skill} for skill kinds and a manifest-referenced
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Contracts-core loop family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from contracts-core.ts; public surface unchanged behind the barrel. */
|
|
3
|
-
import type { AgentEvent, ProviderTurnResult, ToolResult } from "../contracts-protocol.js";
|
|
3
|
+
import type { AgentEvent, AgentFinishReason, ProviderTurnResult, ToolResult } from "../contracts-protocol.js";
|
|
4
4
|
import type { AgentInput } from "../input.js";
|
|
5
5
|
import type { JsonValue, Message, ToolCallContent, Usage } from "./content.js";
|
|
6
6
|
import type { ProviderRequest, StructuredOutputOptions } from "./provider.js";
|
|
@@ -13,6 +13,11 @@ export interface LoopContext {
|
|
|
13
13
|
readonly input: AgentInput;
|
|
14
14
|
readonly inputMessages: readonly Message[];
|
|
15
15
|
readonly maxToolRounds: number;
|
|
16
|
+
/**
|
|
17
|
+
* Why the loop stopped, when a limit/ceiling ends the run cleanly (F4). Strategies set
|
|
18
|
+
* this at ceiling exits (e.g. `turn_limit`); the runtime copies it onto `agent_finished`.
|
|
19
|
+
*/
|
|
20
|
+
finishReason?: AgentFinishReason;
|
|
16
21
|
/** Maximum independent tool calls dispatched concurrently per provider turn. Default `1`. */
|
|
17
22
|
readonly toolConcurrency: number;
|
|
18
23
|
assemble(nextInput: AgentInput, toolResults?: readonly ToolResult[], turn?: number): Promise<ProviderRequest>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Contracts-core session family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from contracts-core.ts; public surface unchanged behind the barrel. */
|
|
3
3
|
import type { AgentEvent } from "../contracts-protocol.js";
|
|
4
|
-
import type { OwnershipScope, PersistencePage, PersistenceQuery } from "./persistence.js";
|
|
5
4
|
import type { Message, ModelConfig } from "./content.js";
|
|
5
|
+
import type { OwnershipScope, PersistencePage, PersistenceQuery } from "./persistence.js";
|
|
6
6
|
export type SessionEntryKind = "message" | "event" | "summary" | "metadata" | "model_change" | "label" | "custom" | "compaction";
|
|
7
7
|
export declare const SESSION_ENTRY_KINDS: readonly SessionEntryKind[];
|
|
8
8
|
export declare const SESSION_ENTRY_SCHEMA_VERSION = 1;
|
package/dist/contracts-core.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* public contracts surface from cohesive family modules so the import surface
|
|
3
3
|
* of `./contracts-core.js` is unchanged (0.1.4 barrel precedent). */
|
|
4
4
|
export type { AudioContent, DocumentContent, FileContent } from "./content.js";
|
|
5
|
-
export * from "./contracts-core/content.js";
|
|
6
|
-
export * from "./contracts-core/run-limits.js";
|
|
7
|
-
export * from "./contracts-core/provider.js";
|
|
8
5
|
export * from "./contracts-core/agent.js";
|
|
6
|
+
export * from "./contracts-core/compaction.js";
|
|
7
|
+
export * from "./contracts-core/content.js";
|
|
9
8
|
export * from "./contracts-core/extensions.js";
|
|
10
|
-
export * from "./contracts-core/
|
|
9
|
+
export * from "./contracts-core/loop.js";
|
|
11
10
|
export * from "./contracts-core/persistence.js";
|
|
12
|
-
export * from "./contracts-core/
|
|
11
|
+
export * from "./contracts-core/provider.js";
|
|
13
12
|
export * from "./contracts-core/resources.js";
|
|
14
|
-
export * from "./contracts-core/
|
|
13
|
+
export * from "./contracts-core/run-limits.js";
|
|
14
|
+
export * from "./contracts-core/session.js";
|
package/dist/contracts-core.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./contracts-core/content.js";
|
|
2
|
-
export * from "./contracts-core/run-limits.js";
|
|
3
|
-
export * from "./contracts-core/provider.js";
|
|
4
1
|
export * from "./contracts-core/agent.js";
|
|
2
|
+
export * from "./contracts-core/compaction.js";
|
|
3
|
+
export * from "./contracts-core/content.js";
|
|
5
4
|
export * from "./contracts-core/extensions.js";
|
|
6
|
-
export * from "./contracts-core/
|
|
5
|
+
export * from "./contracts-core/loop.js";
|
|
7
6
|
export * from "./contracts-core/persistence.js";
|
|
8
|
-
export * from "./contracts-core/
|
|
7
|
+
export * from "./contracts-core/provider.js";
|
|
9
8
|
export * from "./contracts-core/resources.js";
|
|
10
|
-
export * from "./contracts-core/
|
|
9
|
+
export * from "./contracts-core/run-limits.js";
|
|
10
|
+
export * from "./contracts-core/session.js";
|
|
11
11
|
//# sourceMappingURL=contracts-core.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { AgentLoopOptions, AgentLoopStrategy, ArtifactValidation, CompactionOptions, ContentBlock, ErrorInfo, GuardrailRecord, Guardrails, InstructionInjector, JsonObject, Message, ModelConfig, OwnershipScope, ProviderRequestPolicy, ProviderResolver, RetryOptions, RunLimitBreach, RunLimits, Skill, SubscriberOverflowPolicy, SystemPromptConfig, ToolCallAuthority, ToolCallContent, Usage } from "./contracts-core.js";
|
|
1
|
+
import type { AgentLoopOptions, AgentLoopStrategy, ArtifactValidation, CompactionOptions, ContentBlock, ErrorInfo, GuardrailRecord, Guardrails, InstructionInjector, JsonObject, Message, ModelConfig, OwnershipScope, ProviderRequestOptions, ProviderRequestPolicy, ProviderResolver, RetryOptions, RunLimitBreach, RunLimits, Skill, SubscriberOverflowPolicy, SystemPromptConfig, ToolCallAuthority, ToolCallContent, Usage } from "./contracts-core.js";
|
|
2
2
|
import type { AgentRunInterruption, AgentRunStateOptions } from "./contracts-run-state.js";
|
|
3
|
-
import type { ProviderRequestOptions } from "./contracts-core.js";
|
|
4
3
|
import type { SecretRedactor } from "./redaction.js";
|
|
5
4
|
import type { ToolValidator } from "./tools.js";
|
|
6
5
|
export type ProviderEvent = {
|
|
@@ -109,6 +108,7 @@ export interface ToolExecutionMetadata {
|
|
|
109
108
|
readonly durationMs: number;
|
|
110
109
|
readonly status: ToolCallStatus;
|
|
111
110
|
}
|
|
111
|
+
export type AgentFinishReason = "turn_limit" | "token_limit" | "refusal";
|
|
112
112
|
export type AgentEvent = {
|
|
113
113
|
readonly type: "agent_started";
|
|
114
114
|
readonly sessionId: string;
|
|
@@ -118,6 +118,8 @@ export type AgentEvent = {
|
|
|
118
118
|
readonly sessionId: string;
|
|
119
119
|
readonly runId: string;
|
|
120
120
|
readonly usage?: Usage;
|
|
121
|
+
/** Why the loop stopped, when a limit/ceiling ended the run cleanly (F4). Absent = natural end. */
|
|
122
|
+
readonly finishReason?: AgentFinishReason;
|
|
121
123
|
} | {
|
|
122
124
|
readonly type: "agent_suspended";
|
|
123
125
|
readonly sessionId: string;
|
|
@@ -318,8 +320,12 @@ export interface ToolElicitationRequest {
|
|
|
318
320
|
/** Answer-shape validation beyond structural schema checks; throw to reject the payload. */
|
|
319
321
|
readonly validate?: (payload: JsonObject) => void;
|
|
320
322
|
}
|
|
323
|
+
/** Neutral tool-kind union mirroring the ACP `ToolKind` set (B4); never an ACP import in `src/`. */
|
|
324
|
+
export type ToolKind = "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other";
|
|
321
325
|
export interface ToolDefinition {
|
|
322
326
|
readonly name: string;
|
|
327
|
+
/** Optional explicit kind; consumers (e.g. the ACP mapper) use it instead of name heuristics. */
|
|
328
|
+
readonly kind?: ToolKind;
|
|
323
329
|
readonly description?: string;
|
|
324
330
|
readonly parameters?: JsonObject;
|
|
325
331
|
/** Force any provider turn containing this tool to dispatch sequentially. */
|
package/dist/contracts.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* import surface of `./contracts.js` is unchanged.
|
|
6
6
|
*/
|
|
7
7
|
export * from "./contracts-core.js";
|
|
8
|
-
export * from "./contracts-run-state.js";
|
|
9
8
|
export * from "./contracts-protocol.js";
|
|
9
|
+
export * from "./contracts-run-state.js";
|
|
10
10
|
/** Alias re-exports so `dist/contracts.d.ts` exposes implementer contract names. */
|
|
11
11
|
export type AgentIdentity = import("./identity.js").AgentIdentity;
|
|
12
12
|
export type Principal = import("./identity.js").Principal;
|
package/dist/contracts.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { resolveAgentDefinition } from "./agent-definitions.js";
|
|
2
|
-
export { abortableSleep, pollDeviceCodeToken, redactOAuthError, throwIfAborted, type OAuthTokenSuccessPayload, type PollDeviceCodeTokenOptions, } from "./oauth-device-code.js";
|
|
3
|
-
export { boundResponse, defaultResolver, isLoopbackAddress, isLoopbackHostname, normalizeHostname, pinnedFetch, raceAbort, requestPinned, resolvePinnedAddress, type PinnedFetchOptions, } from "./pinned-fetch.js";
|
|
4
2
|
export type { AgentEventSourceErrorCode } from "./agent-event-source.js";
|
|
5
3
|
export { AgentEventSourceError, createMemoryAgentEventSource } from "./agent-event-source.js";
|
|
6
4
|
export { dispatchToolCallsInOrder, generateValidateReviseLoop, isAgentLoopOptions, resolveLoop, resolveToolConcurrency, singleShotLoop, } from "./agent-loops.js";
|
|
@@ -14,7 +12,7 @@ export { ARTIFACT_BODY_ERROR_CODES, ARTIFACT_CHECKPOINT_NAMESPACE, ArtifactBodyS
|
|
|
14
12
|
export type { ApplyCacheControlOptions, CacheControlledContentBlock, CacheControlledMessage, CacheControlValue, CacheUsageReport, } from "./cache-helpers.js";
|
|
15
13
|
export { applyCacheControl, cacheHitRate, cacheSavings, cacheUsageReport, mapCacheRetention, sanitizeCacheKey } from "./cache-helpers.js";
|
|
16
14
|
export type { CacheTelemetry, CacheTelemetryOptions, CacheTelemetryReport, CacheTelemetrySample, } from "./cache-telemetry.js";
|
|
17
|
-
export { CACHE_TELEMETRY_OVERFLOW_KEY, CacheTelemetryError,
|
|
15
|
+
export { CACHE_TELEMETRY_OVERFLOW_KEY, CacheTelemetryError, createCacheTelemetry, DEFAULT_CACHE_TELEMETRY_CAP, } from "./cache-telemetry.js";
|
|
18
16
|
export type { MemoryCheckpointStoreOptions } from "./checkpoints.js";
|
|
19
17
|
export { CHECKPOINT_CONFLICT_CODE, CheckpointConflictError, createMemoryCheckpointStore } from "./checkpoints.js";
|
|
20
18
|
export type { DefaultCompactionStrategyOptions } from "./compaction.js";
|
|
@@ -45,6 +43,8 @@ export type { ExtensionErrorPolicy, ExtensionEventBus, ExtensionEventHandler, Ex
|
|
|
45
43
|
export { createExtensionEventBus, createExtensionKernel } from "./extensions.js";
|
|
46
44
|
export type { MemoryRunFeedbackStoreOptions, PrepareRunFeedbackOptions, RunFeedbackLimits, RunFeedbackRun, RunFeedbackRunResolver, } from "./feedback.js";
|
|
47
45
|
export { createMemoryRunFeedbackStore, prepareRunFeedback, RunFeedbackError, requireRunFeedbackOwnership, runFeedbackPageLimit, } from "./feedback.js";
|
|
46
|
+
export type { ApplyFieldPolicyOptions, AuditFieldRedaction, AuditFieldRedactorLike, AuditFieldRedactorOptions, FieldPolicy, FieldPolicyAction, FieldPolicyDecision, FieldPolicyInput, ProtectedFieldPolicyOptions, } from "./field-policy.js";
|
|
47
|
+
export { ALLOW_FIELD_POLICY, applyFieldPolicy, createAuditFieldRedactor, createProtectedFieldPolicy, FIELD_POLICY_LIMITS, FieldPolicyError, } from "./field-policy.js";
|
|
48
48
|
export type { GuardrailRunResult, RunGuardrailsOptions, } from "./guardrails.js";
|
|
49
49
|
export { assertGuardrailsAllowed, GuardrailError, MAX_GUARDRAIL_CONCURRENCY, runGuardrails } from "./guardrails.js";
|
|
50
50
|
export type { AgentIdentity, AssertIdentityActiveOptions, IdentityLimits, IdentityVerifier, NarrowIdentityOptions, Principal, ResolvedIdentityLimits, } from "./identity.js";
|
|
@@ -62,9 +62,11 @@ export type { MockProviderOptions } from "./mock-provider.js";
|
|
|
62
62
|
export { createMockProvider } from "./mock-provider.js";
|
|
63
63
|
export type { ModelRegistry, ModelRegistryOptions } from "./models.js";
|
|
64
64
|
export { createModelRegistry } from "./models.js";
|
|
65
|
+
export { abortableSleep, type OAuthTokenSuccessPayload, type PollDeviceCodeTokenOptions, pollDeviceCodeToken, redactOAuthError, throwIfAborted, } from "./oauth-device-code.js";
|
|
65
66
|
export { createProviderTurnMetadata, readProviderHttpStatus } from "./observability.js";
|
|
66
67
|
export type { ApplyRetentionInput, ApplyRetentionResult, ConsumeTenantQuotaInput, ExportUnderHoldInput, LegalHoldExportItem, LegalHoldQuery, LegalHoldRecord, PersistenceLifecycleStore, PersistenceResourceKind, PutLegalHoldInput, ReleaseLegalHoldInput, SetTenantQuotaInput, TenantQuota, } from "./persistence-lifecycle.js";
|
|
67
68
|
export { createMemoryPersistenceLifecycle, DEFAULT_LIFECYCLE_PAGE_SIZE, DEFAULT_MAX_HOLD_REASON_BYTES, HARD_LIFECYCLE_PAGE_SIZE, HARD_MAX_HOLD_REASON_BYTES, isResourceHeld, PersistenceLifecycleError, } from "./persistence-lifecycle.js";
|
|
69
|
+
export { boundResponse, defaultResolver, isLoopbackAddress, isLoopbackHostname, normalizeHostname, type PinnedFetchOptions, pinnedFetch, raceAbort, requestPinned, resolvePinnedAddress, } from "./pinned-fetch.js";
|
|
68
70
|
export { providerContentDelta, providerContinuationRequired, providerDone, providerError, providerTextDelta, providerThinkingDelta, providerToolCall, providerToolCallDelta, providerUsage, toolCallContent, toolCallFromArgumentsText, } from "./provider-events.js";
|
|
69
71
|
export { authMethodKey, defineProviderPackage, systemPromptContributionKey } from "./provider-packages.js";
|
|
70
72
|
export type { SessionCachePolicyOptions } from "./provider-request-policy.js";
|
|
@@ -72,8 +74,6 @@ export { createProviderRequestPolicyChain, createSessionCachePolicy, mergeProvid
|
|
|
72
74
|
export type { ProviderRegistry, ProviderRegistryOptions } from "./providers.js";
|
|
73
75
|
export { createProviderRegistry, createProviderResolver } from "./providers.js";
|
|
74
76
|
export type { SecretRedactor } from "./redaction.js";
|
|
75
|
-
export { ALLOW_FIELD_POLICY, applyFieldPolicy, createAuditFieldRedactor, createProtectedFieldPolicy, FieldPolicyError, FIELD_POLICY_LIMITS, } from "./field-policy.js";
|
|
76
|
-
export type { ApplyFieldPolicyOptions, AuditFieldRedaction, AuditFieldRedactorLike, AuditFieldRedactorOptions, FieldPolicy, FieldPolicyAction, FieldPolicyDecision, FieldPolicyInput, ProtectedFieldPolicyOptions, } from "./field-policy.js";
|
|
77
77
|
export { createSecretRedactor, errorToErrorInfo, redactAgentEvent, redactMessage, redactProviderRequest, redactRunLedgerRecord, redactSecrets, redactSessionEntry, resolveRedactor, } from "./redaction.js";
|
|
78
78
|
export type { DuplicateRegistrationOptions, DuplicateRegistrationPolicy } from "./registry-options.js";
|
|
79
79
|
export type { LoadBinaryResourceOptions } from "./resources.js";
|
|
@@ -111,5 +111,5 @@ export { createToolParameterValidator, createToolRegistry, dispatchToolCall, fil
|
|
|
111
111
|
export type { ResolvedUseCaseModel, ResolveUseCaseModelInput, UseCaseModelBinding, } from "./use-case-model.js";
|
|
112
112
|
export { resolveUseCaseModel, resolveUseCaseModelBinding, useCaseCredentialProviderId, } from "./use-case-model.js";
|
|
113
113
|
export declare const name = "prism";
|
|
114
|
-
export declare const version = "0.2.
|
|
114
|
+
export declare const version = "0.2.8";
|
|
115
115
|
export declare const description = "Agent harness for AI providers, agents, sessions, and tools.";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { resolveAgentDefinition } from "./agent-definitions.js";
|
|
2
|
-
export { abortableSleep, pollDeviceCodeToken, redactOAuthError, throwIfAborted, } from "./oauth-device-code.js";
|
|
3
|
-
export { boundResponse, defaultResolver, isLoopbackAddress, isLoopbackHostname, normalizeHostname, pinnedFetch, raceAbort, requestPinned, resolvePinnedAddress, } from "./pinned-fetch.js";
|
|
4
2
|
export { AgentEventSourceError, createMemoryAgentEventSource } from "./agent-event-source.js";
|
|
5
3
|
export { dispatchToolCallsInOrder, generateValidateReviseLoop, isAgentLoopOptions, resolveLoop, resolveToolConcurrency, singleShotLoop, } from "./agent-loops.js";
|
|
6
4
|
export { createAgentRunLifecycle } from "./agent-run-lifecycle.js";
|
|
@@ -8,7 +6,7 @@ export { AGENT_RUN_STATE_NAMESPACE, AGENT_RUN_STATE_SCHEMA_VERSION, agentFingerp
|
|
|
8
6
|
export { createAgent, createAgentSession, resumeAgentRun, resumeAgentRunStream } from "./agents.js";
|
|
9
7
|
export { ARTIFACT_BODY_ERROR_CODES, ARTIFACT_CHECKPOINT_NAMESPACE, ArtifactBodyStoreError, ArtifactError, artifactApprovalState, artifactCheckpointKey, } from "./artifacts.js";
|
|
10
8
|
export { applyCacheControl, cacheHitRate, cacheSavings, cacheUsageReport, mapCacheRetention, sanitizeCacheKey } from "./cache-helpers.js";
|
|
11
|
-
export { CACHE_TELEMETRY_OVERFLOW_KEY, CacheTelemetryError,
|
|
9
|
+
export { CACHE_TELEMETRY_OVERFLOW_KEY, CacheTelemetryError, createCacheTelemetry, DEFAULT_CACHE_TELEMETRY_CAP, } from "./cache-telemetry.js";
|
|
12
10
|
export { CHECKPOINT_CONFLICT_CODE, CheckpointConflictError, createMemoryCheckpointStore } from "./checkpoints.js";
|
|
13
11
|
export { createDefaultCompactionStrategy, isCompactionEntryData } from "./compaction.js";
|
|
14
12
|
export { assertJsonObject, isJsonObject, loadConfigLayers, mergeConfigLayers } from "./config.js";
|
|
@@ -24,6 +22,7 @@ export { createEventMultiplexer, EVENT_MULTIPLEXER_SINGLE_CONSUMER_CODE, EventMu
|
|
|
24
22
|
export { applyExecutionDecision, assertExecutionAllowed, checkExecution, ExecutionDeniedError } from "./execution-policy.js";
|
|
25
23
|
export { createExtensionEventBus, createExtensionKernel } from "./extensions.js";
|
|
26
24
|
export { createMemoryRunFeedbackStore, prepareRunFeedback, RunFeedbackError, requireRunFeedbackOwnership, runFeedbackPageLimit, } from "./feedback.js";
|
|
25
|
+
export { ALLOW_FIELD_POLICY, applyFieldPolicy, createAuditFieldRedactor, createProtectedFieldPolicy, FIELD_POLICY_LIMITS, FieldPolicyError, } from "./field-policy.js";
|
|
27
26
|
export { assertGuardrailsAllowed, GuardrailError, MAX_GUARDRAIL_CONCURRENCY, runGuardrails } from "./guardrails.js";
|
|
28
27
|
export { assertIdentityActive, assertIdentityMatchesOwnership, assertIdentityPropagation, DEFAULT_IDENTITY_LIMITS, HARD_IDENTITY_LIMITS, IdentityError, identityTelemetryAttributes, narrowIdentity, ownershipFromIdentity, resolveIdentityLimits, resolveRunIdentity, } from "./identity.js";
|
|
29
28
|
export { assembleProviderInput, createDefaultInputBuilder, createDefaultPromptBuilder, renderPromptTemplate, resolveContextProviders, } from "./input.js";
|
|
@@ -33,13 +32,14 @@ export { definePrismManifest, parsePrismManifest } from "./manifests.js";
|
|
|
33
32
|
export { createMiddlewareRegistry } from "./middleware.js";
|
|
34
33
|
export { createMockProvider } from "./mock-provider.js";
|
|
35
34
|
export { createModelRegistry } from "./models.js";
|
|
35
|
+
export { abortableSleep, pollDeviceCodeToken, redactOAuthError, throwIfAborted, } from "./oauth-device-code.js";
|
|
36
36
|
export { createProviderTurnMetadata, readProviderHttpStatus } from "./observability.js";
|
|
37
37
|
export { createMemoryPersistenceLifecycle, DEFAULT_LIFECYCLE_PAGE_SIZE, DEFAULT_MAX_HOLD_REASON_BYTES, HARD_LIFECYCLE_PAGE_SIZE, HARD_MAX_HOLD_REASON_BYTES, isResourceHeld, PersistenceLifecycleError, } from "./persistence-lifecycle.js";
|
|
38
|
+
export { boundResponse, defaultResolver, isLoopbackAddress, isLoopbackHostname, normalizeHostname, pinnedFetch, raceAbort, requestPinned, resolvePinnedAddress, } from "./pinned-fetch.js";
|
|
38
39
|
export { providerContentDelta, providerContinuationRequired, providerDone, providerError, providerTextDelta, providerThinkingDelta, providerToolCall, providerToolCallDelta, providerUsage, toolCallContent, toolCallFromArgumentsText, } from "./provider-events.js";
|
|
39
40
|
export { authMethodKey, defineProviderPackage, systemPromptContributionKey } from "./provider-packages.js";
|
|
40
41
|
export { createProviderRequestPolicyChain, createSessionCachePolicy, mergeProviderRequestOptions } from "./provider-request-policy.js";
|
|
41
42
|
export { createProviderRegistry, createProviderResolver } from "./providers.js";
|
|
42
|
-
export { ALLOW_FIELD_POLICY, applyFieldPolicy, createAuditFieldRedactor, createProtectedFieldPolicy, FieldPolicyError, FIELD_POLICY_LIMITS, } from "./field-policy.js";
|
|
43
43
|
export { createSecretRedactor, errorToErrorInfo, redactAgentEvent, redactMessage, redactProviderRequest, redactRunLedgerRecord, redactSecrets, redactSessionEntry, resolveRedactor, } from "./redaction.js";
|
|
44
44
|
export { loadBinaryResource, loadJsonResource, loadManifestResource, loadTextResource } from "./resources.js";
|
|
45
45
|
export { createDefaultRetryPolicy, isTransientErrorInfo, waitForRetry } from "./retry.js";
|
|
@@ -61,6 +61,6 @@ export { DEFAULT_TOOL_RESULT_FOLD_MAX_SUMMARY_BYTES, DEFAULT_TOOL_RESULT_FOLD_MI
|
|
|
61
61
|
export { createToolParameterValidator, createToolRegistry, dispatchToolCall, filterTools } from "./tools.js";
|
|
62
62
|
export { resolveUseCaseModel, resolveUseCaseModelBinding, useCaseCredentialProviderId, } from "./use-case-model.js";
|
|
63
63
|
export const name = "prism";
|
|
64
|
-
export const version = "0.2.
|
|
64
|
+
export const version = "0.2.8";
|
|
65
65
|
export const description = "Agent harness for AI providers, agents, sessions, and tools.";
|
|
66
66
|
//# sourceMappingURL=index.js.map
|
package/dist/input.js
CHANGED
|
@@ -4,8 +4,8 @@ import { runInstructionInjectors } from "./instruction-injection.js";
|
|
|
4
4
|
import { redactMessage } from "./redaction.js";
|
|
5
5
|
import { loadTextResource } from "./resources.js";
|
|
6
6
|
import { skillMessages as buildSkillMessages } from "./skill-disclosure.js";
|
|
7
|
-
import { foldToolResultHistory, foldToolResults } from "./tool-result-fold.js";
|
|
8
7
|
import { composeSystemPrompt } from "./system-prompts.js";
|
|
8
|
+
import { foldToolResultHistory, foldToolResults } from "./tool-result-fold.js";
|
|
9
9
|
export function createDefaultInputBuilder() {
|
|
10
10
|
return {
|
|
11
11
|
name: "default-input",
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentEvent, ErrorInfo, Guardrails, JsonObject, OwnershipScope, RunLedger, ToolCallContent, ToolDefinition,
|
|
1
|
+
import type { AgentEvent, ErrorInfo, Guardrails, JsonObject, OwnershipScope, RunLedger, ToolCallContent, ToolDefinition, ToolEffectDeclaration, ToolEffectStore, ToolExecutionContext, ToolRegistry, ToolResult } from "./contracts.js";
|
|
2
2
|
import type { MiddlewareRegistry } from "./middleware.js";
|
|
3
3
|
import { type SecretRedactor } from "./redaction.js";
|
|
4
4
|
import { type DuplicateRegistrationOptions } from "./registry-options.js";
|
package/dist/tools.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createId } from "./ids.js";
|
|
|
5
5
|
import { errorToErrorInfo, redactRunLedgerRecord, redactSecrets } from "./redaction.js";
|
|
6
6
|
import { assertCanRegister } from "./registry-options.js";
|
|
7
7
|
import { assertPermission, assertTrusted } from "./security.js";
|
|
8
|
-
import { deriveToolEffectKey,
|
|
8
|
+
import { deriveToolEffectKey, ToolEffectError, toolEffectArgumentsHash } from "./tool-effects.js";
|
|
9
9
|
/** Wrap a schema adapter as the existing `ToolValidator` seam used by dispatch and the agent runtime. */
|
|
10
10
|
export function createToolParameterValidator(validator, options = {}) {
|
|
11
11
|
const missingSchema = options.missingSchema ?? "allow";
|
package/docs/0.1.0-readiness.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0.1.0 / 1.0 Readiness Gates
|
|
2
2
|
|
|
3
|
-
Status: **0.2.
|
|
3
|
+
Status: **0.2.8** is the current release line (the 0.2.x review-remediation line: fail-closed runtime/sandbox security, provider completion and outbound trust boundaries, concurrent-state/durability integrity, build/coverage/release-evidence integrity, package/documentation/compatibility truth, maintainability and bounded performance, fully featured coding-agent readiness, enterprise ERP production readiness, ACP adoption fixes); **0.1.7** was the terminal 0.1.x baseline; **1.0** readiness remains operator-gated, not automatic.
|
|
4
4
|
|
|
5
5
|
This page distills runnable readiness gates into one command-per-gate table.
|
|
6
6
|
The **Last evidence** column records the 0.1.0-tree snapshot (plan 012 Tasks
|
|
@@ -20,15 +20,15 @@ Historical release lines (0.0.16 floor → 0.0.27 Phase 10 ACP interop → 0.1.0
|
|
|
20
20
|
keep their per-phase evidence in the pages above; this page records the 0.2.6
|
|
21
21
|
snapshot (plan 026) with the 0.1.x tables below as the historical record.
|
|
22
22
|
|
|
23
|
-
## Current line (0.2.
|
|
23
|
+
## Current line (0.2.8)
|
|
24
24
|
|
|
25
25
|
| Item | Status |
|
|
26
26
|
|---|---|
|
|
27
|
-
| Published graph | **
|
|
28
|
-
| Current-line cut | The 0.2.x review-remediation line, additive-only vs the frozen 0.1.x contract: 0.2.0 fail-closed runtime/sandbox security
|
|
29
|
-
| Upgrade path | `docs/migration.md` `0.2.
|
|
30
|
-
| Compat promise | Additive-only vs the frozen 0.1.x contract; `scripts/compat-baseline` regenerated at 0.2.
|
|
31
|
-
| Security policy | `npm audit --audit-level=moderate` 0 at 0.2.
|
|
27
|
+
| Published graph | **51** publishable manifests at exact **0.2.8** (root + 50 workspace packages: 14 provider adapters + 9 `prism-*` family/profile + 27 capability; generated by `node scripts/package-truth.mjs` → `scripts/package-truth.json`) |
|
|
28
|
+
| Current-line cut | The 0.2.x review-remediation line, additive-only vs the frozen 0.1.x contract: 0.2.0 fail-closed runtime/sandbox security, 0.2.1 provider completion + outbound trust boundaries, 0.2.2 concurrent-state/durability integrity, 0.2.3 build/coverage/release-evidence integrity, 0.2.4 package/documentation/compatibility truth, 0.2.5 maintainability and bounded performance, 0.2.6 fully featured coding-agent readiness, 0.2.7 enterprise ERP production readiness, 0.2.8 ACP adoption fixes (client-neutrality guard, truthful ACP wire, spawnable `@arnilo/prism-acp-agent`, thought/plan/title/image/command updates) |
|
|
29
|
+
| Upgrade path | `docs/migration.md` `0.2.7 → 0.2.8` (additive; no store migration; rollback = restore 0.2.7 manifests/tag); store-compatible throughout 0.2.x |
|
|
30
|
+
| Compat promise | Additive-only vs the frozen 0.1.x contract; `scripts/compat-baseline` regenerated at 0.2.8 (version literal + additive ACP/agent exports), zero breaking deltas |
|
|
31
|
+
| Security policy | `npm audit --audit-level=moderate` 0 at 0.2.8; threat-suites legs (phase8–11 + phase20–26) green; protected Postgres recovery/workspace conformance, PTY, real coding journey, NATS/live-canary legs operator-gated |
|
|
32
32
|
| Docs freeze | tripwires green including the canonical manifest-count tripwire (50/49/14/9/26), the plan 024 package-truth tests (generator reproducibility + artifact equality + closure asserts + derived docs truth), the plan 025 bounded-accumulation near-limit probe, and the plan 026 freeze tripwires (per-task markers, threat T1–T8 test mapping, exit gate green) |
|
|
33
33
|
| 0.1.x line | **0.1.7** (plan 019) is the terminal 0.1.x baseline; the 0.1.1 table below keeps the plan 013 snapshot; the 0.1.0 table keeps the plan 012 snapshot; the **0.0.16** values remain the historical network-free floor |
|
|
34
34
|
|