@arnilo/prism 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -1
- package/README.md +23 -20
- package/dist/agent-run-state.d.ts +1 -2
- package/dist/agent-run-state.js +0 -3
- package/dist/agent-session/session/assemble.d.ts +6 -0
- package/dist/agent-session/session/assemble.js +391 -0
- package/dist/agent-session/session/persist.d.ts +28 -0
- package/dist/agent-session/session/persist.js +166 -0
- package/dist/agent-session/session/provider-round.d.ts +6 -0
- package/dist/agent-session/session/provider-round.js +231 -0
- package/dist/agent-session/session/tool-round.d.ts +31 -0
- package/dist/agent-session/session/tool-round.js +473 -0
- package/dist/agent-session/session/types.d.ts +115 -0
- package/dist/agent-session/session/types.js +5 -0
- package/dist/agent-session/session.d.ts +49 -43
- package/dist/agent-session/session.js +11 -1177
- package/dist/capture.d.ts +63 -0
- package/dist/capture.js +67 -0
- package/dist/cli-init.d.ts +18 -2
- package/dist/cli-init.js +2 -7
- package/dist/cli-runner.d.ts +2 -2
- package/dist/cli-runner.js +45 -9
- package/dist/content.d.ts +3 -3
- package/dist/content.js +3 -1
- package/dist/contracts-core/agent.d.ts +2 -0
- package/dist/contracts-core/batch.d.ts +97 -0
- package/dist/contracts-core/batch.js +65 -0
- package/dist/contracts-core/content.d.ts +72 -1
- package/dist/contracts-core/embeddings.d.ts +30 -0
- package/dist/contracts-core/embeddings.js +17 -0
- package/dist/contracts-core/images.d.ts +60 -0
- package/dist/contracts-core/images.js +17 -0
- package/dist/contracts-core/moderation.d.ts +46 -0
- package/dist/contracts-core/moderation.js +34 -0
- package/dist/contracts-core/speech.d.ts +39 -0
- package/dist/contracts-core/speech.js +17 -0
- package/dist/contracts-core/transcription.d.ts +48 -0
- package/dist/contracts-core/transcription.js +17 -0
- package/dist/contracts-core/video.d.ts +61 -0
- package/dist/contracts-core/video.js +17 -0
- package/dist/contracts-core.d.ts +7 -0
- package/dist/contracts-core.js +7 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +4 -3
- package/dist/node/agent-definitions.d.ts +1 -8
- package/dist/node/agent-definitions.js +0 -34
- package/dist/node/settings.d.ts +0 -1
- package/dist/node/settings.js +0 -5
- package/dist/pinned-fetch.js +29 -3
- package/dist/provider-events.js +3 -4
- package/dist/providers/media.d.ts +1 -2
- package/dist/providers/media.js +1 -4
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +4 -4
- package/dist/testing/provider-conformance.d.ts +114 -5
- package/dist/testing/provider-conformance.js +342 -0
- package/dist/testing/tool-effect-store-conformance.d.ts +0 -1
- package/dist/testing/tool-effect-store-conformance.js +0 -3
- package/dist/thinking.d.ts +48 -9
- package/dist/thinking.js +134 -8
- package/docs/0.1.0-readiness.md +3 -3
- package/docs/a2a.md +2 -2
- package/docs/acp.md +3 -3
- package/docs/ag-ui-adoption.md +1 -1
- package/docs/ag-ui.md +1 -2
- package/docs/agent-definitions.md +1 -1
- package/docs/agent-events.md +5 -5
- package/docs/agent-identity.md +13 -2
- package/docs/audit-export.md +3 -3
- package/docs/batch-jobs.md +120 -0
- package/docs/cli-rpc.md +20 -9
- package/docs/coding-agent-tools.md +19 -19
- package/docs/coding-review-and-diagnostics.md +2 -2
- package/docs/coding-security.md +4 -4
- package/docs/coding-workspaces.md +2 -2
- package/docs/computer-use-linux.md +13 -2
- package/docs/context-and-skills.md +1 -1
- package/docs/conversations.md +4 -4
- package/docs/credential-storage.md +11 -7
- package/docs/credentials-and-redaction.md +1 -1
- package/docs/data-classification.md +1 -1
- package/docs/database-persistence.md +4 -4
- package/docs/dev-inspector.md +6 -6
- package/docs/device-adapters.md +2 -2
- package/docs/diagrams.md +1 -1
- package/docs/document-reader.md +6 -6
- package/docs/documents.md +5 -4
- package/docs/embeddings.md +112 -0
- package/docs/enterprise-postgres-state.md +7 -7
- package/docs/evaluations.md +8 -8
- package/docs/extensions.md +3 -3
- package/docs/forge-integration.md +3 -3
- package/docs/graft.md +2 -2
- package/docs/guardrails.md +1 -1
- package/docs/host-security.md +15 -15
- package/docs/image-generation.md +129 -0
- package/docs/impeccable.md +5 -3
- package/docs/index.md +60 -33
- package/docs/indexed-code-search.md +2 -2
- package/docs/language-intelligence.md +4 -4
- package/docs/live-testing.md +126 -0
- package/docs/mcp-tools.md +43 -12
- package/docs/middleware-hooks.md +1 -1
- package/docs/migrate-to-0.4.md +3 -3
- package/docs/migrate-to-0.5.md +122 -0
- package/docs/migration.md +29 -1
- package/docs/model-registry.md +38 -0
- package/docs/model-routing.md +5 -5
- package/docs/moderation.md +117 -0
- package/docs/multi-agent-patterns.md +4 -4
- package/docs/multimodal-content.md +26 -2
- package/docs/obscura.md +2 -2
- package/docs/observability.md +32 -7
- package/docs/openapi-tools.md +13 -3
- package/docs/operations.md +11 -0
- package/docs/performance.md +7 -7
- package/docs/persistence-credentials-multimodality-primitives.md +6 -6
- package/docs/policy-and-audit.md +17 -7
- package/docs/ponytail.md +1 -1
- package/docs/postgres-persistence.md +5 -5
- package/docs/process-sessions.md +2 -2
- package/docs/prompt-registry.md +7 -7
- package/docs/provider-caching.md +4 -0
- package/docs/provider-conformance.md +23 -1
- package/docs/provider-packages.md +39 -3
- package/docs/provider-primitives.md +1 -1
- package/docs/provider-request-policies.md +1 -1
- package/docs/providers/ai-sdk.md +15 -3
- package/docs/providers/alibaba.md +5 -1
- package/docs/providers/anthropic.md +4 -0
- package/docs/providers/azure.md +17 -1
- package/docs/providers/bedrock.md +15 -0
- package/docs/providers/clinepass.md +4 -0
- package/docs/providers/commandcode.md +253 -0
- package/docs/providers/deepseek.md +4 -0
- package/docs/providers/google.md +4 -0
- package/docs/providers/hyper.md +284 -0
- package/docs/providers/kimi.md +4 -0
- package/docs/providers/neuralwatt.md +4 -0
- package/docs/providers/ollama.md +15 -0
- package/docs/providers/openai-compatible.md +4 -0
- package/docs/providers/openai.md +4 -0
- package/docs/providers/opencode-go.md +4 -0
- package/docs/providers/openrouter.md +5 -1
- package/docs/providers/vertex.md +16 -0
- package/docs/providers/xai.md +4 -0
- package/docs/providers/zai.md +4 -0
- package/docs/rag.md +26 -4
- package/docs/release-and-install.md +103 -46
- package/docs/resource-loading.md +1 -1
- package/docs/runs-and-usage.md +14 -2
- package/docs/server.md +5 -5
- package/docs/settings-auth-trust-security.md +7 -5
- package/docs/sheets.md +2 -2
- package/docs/speech.md +126 -0
- package/docs/sqlite-persistence.md +4 -4
- package/docs/supervisors.md +3 -3
- package/docs/thinking-and-reasoning.md +93 -60
- package/docs/tool-conformance.md +1 -1
- package/docs/tool-execution-primitives.md +8 -8
- package/docs/tools.md +4 -4
- package/docs/web-tools.md +1 -1
- package/docs/wiki.md +1 -1
- package/docs/work-artifacts-and-review.md +17 -6
- package/docs/work-connectors.md +4 -4
- package/docs/work-tools.md +5 -5
- package/docs/workflow-orchestration-primitives.md +11 -11
- package/docs/workflows.md +5 -5
- package/package.json +11 -8
- package/templates/init/providers.json +24 -8
- package/docs/antigravity-agent.md +0 -207
|
@@ -1,7 +1,11 @@
|
|
|
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
|
|
3
|
-
import type {
|
|
2
|
+
import { ActiveDurableRun } from "../agent-approval.js";
|
|
3
|
+
import type { PendingToolCall, StoredAgentRunState } from "../agent-run-state.js";
|
|
4
|
+
import type { Agent, AgentEvent, AgentRunResult, AgentRunState, AgentRunStateOptions, AgentSession, AgentSessionConfig, AIProvider, CompactionOptions, CompactionResult, ErrorInfo, Message, OwnershipScope, PendingDecision, PromptVersionRef, ProviderRequest, RunDecision, RunOptions, SessionEntry, Skill, SteerOptions, SubscribeOptions, ToolDefinition, ToolEffectStore, Usage } from "../contracts.js";
|
|
5
|
+
import type { AgentIdentity } from "../identity.js";
|
|
4
6
|
import type { AgentInput } from "../input.js";
|
|
7
|
+
import type { RunLimitTracker } from "../run-limits.js";
|
|
8
|
+
import type { SessionContextSnapshot } from "../session-stores.js";
|
|
5
9
|
import type { LoadedSkillBodiesEntry } from "../skill-load.js";
|
|
6
10
|
export declare class RuntimeAgentSession implements AgentSession {
|
|
7
11
|
readonly id: string;
|
|
@@ -14,33 +18,36 @@ export declare class RuntimeAgentSession implements AgentSession {
|
|
|
14
18
|
private activeRun?;
|
|
15
19
|
private activeRunId?;
|
|
16
20
|
private activeProviderTurnAbort?;
|
|
17
|
-
|
|
21
|
+
pendingSoftInterrupt: boolean;
|
|
18
22
|
private pendingSteers;
|
|
19
23
|
private pendingSteerBytes;
|
|
20
24
|
private activeRedactor?;
|
|
21
|
-
|
|
25
|
+
activeProvider?: AIProvider;
|
|
22
26
|
private activeLedger?;
|
|
23
|
-
|
|
27
|
+
activeEffectStore?: ToolEffectStore;
|
|
24
28
|
private activeOwnership?;
|
|
25
|
-
|
|
29
|
+
activeIdentity?: AgentIdentity;
|
|
26
30
|
private activeIdempotencyKey?;
|
|
27
31
|
private activeGuardrails?;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
activeMetadata?: Readonly<Record<string, unknown>>;
|
|
33
|
+
activePromptVersion?: PromptVersionRef;
|
|
34
|
+
activeLimits?: RunLimitTracker;
|
|
35
|
+
activeLimitOutputBuffer: boolean;
|
|
36
|
+
activeDurable?: ActiveDurableRun;
|
|
37
|
+
activeLoop?: import("../contracts.js").AgentLoopStrategy;
|
|
34
38
|
/** Gated calls of the current tool round awaiting one collected suspension. */
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
activeGatedRound?: Map<string, {
|
|
40
|
+
entry: PendingToolCall;
|
|
41
|
+
decision: PendingDecision;
|
|
42
|
+
}>;
|
|
43
|
+
activeLoopTurn: number;
|
|
37
44
|
private readonly loadedSkills;
|
|
38
45
|
/** Tools activated via `search_tools` this session (plan 041); names-only in persistence. */
|
|
39
|
-
|
|
46
|
+
readonly activatedTools: import("../tool-search.js").ActiveToolSet;
|
|
40
47
|
/** Plan 018 Task 6 (closeout `checkpoint-bodies`): persisted exact instructions, registry-independent. */
|
|
41
|
-
|
|
48
|
+
restoredSkillBodies: readonly LoadedSkillBodiesEntry[];
|
|
42
49
|
/** Skills of the current run (for the bodies snapshot); replaced at each run start. */
|
|
43
|
-
|
|
50
|
+
activeRunSkills: readonly import("../contracts.js").Skill[];
|
|
44
51
|
/** Plan 015 Task 4: re-add persisted loaded-skill names (names only; bodies re-resolve on demand). */
|
|
45
52
|
restoreLoadedSkills(names: readonly string[]): void;
|
|
46
53
|
/** Plan 041: re-add persisted activated-tool names (names only; inert for absent tools). */
|
|
@@ -66,15 +73,16 @@ export declare class RuntimeAgentSession implements AgentSession {
|
|
|
66
73
|
private runInternal;
|
|
67
74
|
prompt(input: string, options?: RunOptions): Promise<AgentRunResult>;
|
|
68
75
|
stream(input: AgentInput, options?: RunOptions & SubscribeOptions): AsyncGenerator<AgentEvent>;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
buildRunResult(input: {
|
|
77
|
+
readonly runId: string;
|
|
78
|
+
readonly status: AgentRunResult["status"];
|
|
79
|
+
readonly usage?: Usage;
|
|
80
|
+
readonly limit?: import("../contracts.js").RunLimitBreach;
|
|
81
|
+
readonly error?: ErrorInfo;
|
|
82
|
+
readonly abortReason?: string;
|
|
83
|
+
readonly runState?: AgentRunState;
|
|
84
|
+
readonly interruption?: import("../contracts.js").AgentRunInterruption;
|
|
85
|
+
}): AgentRunResult;
|
|
78
86
|
compact(options?: CompactionOptions): Promise<CompactionResult>;
|
|
79
87
|
abort(reason?: unknown): void;
|
|
80
88
|
entries(): Promise<readonly SessionEntry[]>;
|
|
@@ -87,22 +95,20 @@ export declare class RuntimeAgentSession implements AgentSession {
|
|
|
87
95
|
readonly leafId?: string;
|
|
88
96
|
}): Promise<AgentSession>;
|
|
89
97
|
private branchReader;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
private appendMessage;
|
|
100
|
-
private autoCompact;
|
|
98
|
+
resolveRunProvider(options: RunOptions): void;
|
|
99
|
+
resolveRunSkills(options: RunOptions, tools: readonly ToolDefinition[]): readonly Skill[];
|
|
100
|
+
emit(event: AgentEvent): void;
|
|
101
|
+
closeSubscribers(): void;
|
|
102
|
+
drainLedger(): Promise<void>;
|
|
103
|
+
applyPendingSteers(runId: string, metadata: Readonly<Record<string, unknown>>, signal: AbortSignal): Promise<boolean>;
|
|
104
|
+
applyProviderRequestPolicies(request: ProviderRequest, runId: string, options: RunOptions, metadata: Readonly<Record<string, unknown>>, signal: AbortSignal): Promise<import("../contracts.js").ProviderRequestPolicyResult>;
|
|
105
|
+
appendMessage(message: Message, runId: string): Promise<void>;
|
|
106
|
+
autoCompact(runId: string, options: RunOptions, signal: AbortSignal, inputMessages: readonly Message[]): Promise<void>;
|
|
101
107
|
private compactBranch;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
appendEntry(entry: SessionEntry): Promise<void>;
|
|
109
|
+
invalidateSnapshot(): void;
|
|
110
|
+
redact<T>(value: T): T;
|
|
111
|
+
redactProviderRequest(request: ProviderRequest): ProviderRequest;
|
|
112
|
+
rebuildHistory(): Promise<void>;
|
|
113
|
+
snapshot(): Promise<SessionContextSnapshot>;
|
|
108
114
|
}
|