@anvia/core 0.14.0 → 0.16.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/dist/agent/index.d.ts +14 -13
- package/dist/agent/index.js +6 -6
- package/dist/{agent-ib2-Ahyi.d.ts → agent-BTiQ4RZn.d.ts} +17 -8
- package/dist/audio-generation/index.d.ts +1 -1
- package/dist/{chunk-CESSRJYD.js → chunk-3PRP2DV4.js} +6 -6
- package/dist/chunk-3PRP2DV4.js.map +1 -0
- package/dist/{chunk-YQF7QOCO.js → chunk-3QG4SFH4.js} +8 -5
- package/dist/chunk-3QG4SFH4.js.map +1 -0
- package/dist/{chunk-2XD7Z7NB.js → chunk-4PMAWIGM.js} +2 -2
- package/dist/chunk-4PMAWIGM.js.map +1 -0
- package/dist/{chunk-FBHF7WZJ.js → chunk-A7AYX6BD.js} +16 -5
- package/dist/chunk-A7AYX6BD.js.map +1 -0
- package/dist/{chunk-X2Q3AXFM.js → chunk-IT426VXL.js} +2 -2
- package/dist/{chunk-HHHNMP3V.js → chunk-K72JKDZ7.js} +16 -4
- package/dist/chunk-K72JKDZ7.js.map +1 -0
- package/dist/{chunk-BOJP4ARV.js → chunk-PJCJ45RJ.js} +142 -24
- package/dist/chunk-PJCJ45RJ.js.map +1 -0
- package/dist/{chunk-HU55YP24.js → chunk-R6QERZAB.js} +33 -2
- package/dist/chunk-R6QERZAB.js.map +1 -0
- package/dist/completion/index.d.ts +6 -5
- package/dist/completion/index.js +4 -2
- package/dist/evals/index.d.ts +8 -8
- package/dist/evals/index.js +7 -7
- package/dist/extractor/index.d.ts +8 -8
- package/dist/extractor/index.js +7 -7
- package/dist/guardrails/index.d.ts +1 -1
- package/dist/hooks/index.d.ts +3 -3
- package/dist/image-generation/index.d.ts +1 -1
- package/dist/{index-AK084cvC.d.ts → index-Du1vCw6J.d.ts} +46 -6
- package/dist/index.d.ts +12 -12
- package/dist/index.js +10 -8
- package/dist/internal/agent.d.ts +8 -8
- package/dist/internal/agent.js +5 -5
- package/dist/{json-k5r34q-F.d.ts → json-D_Ijo4lJ.d.ts} +2 -2
- package/dist/loaders/index.d.ts +1 -1
- package/dist/mcp/index.d.ts +4 -4
- package/dist/memory/index.d.ts +3 -3
- package/dist/{middleware-C6ZuwXjf.d.ts → middleware-CsxdqqjJ.d.ts} +3 -3
- package/dist/observability/index.d.ts +3 -3
- package/dist/observability/index.js.map +1 -1
- package/dist/pipeline/index.d.ts +8 -8
- package/dist/request/index.d.ts +8 -8
- package/dist/request/index.js +4 -4
- package/dist/skills/index.d.ts +4 -4
- package/dist/skills/index.js +2 -2
- package/dist/{think-tool-D3_K8NJa.d.ts → think-tool-BTFFKn1m.d.ts} +1 -1
- package/dist/tool/index.d.ts +5 -5
- package/dist/tool/index.js +2 -2
- package/dist/{tool-DyC_XPPY.d.ts → tool-sKozRXMI.d.ts} +2 -1
- package/dist/transcription/index.d.ts +1 -1
- package/dist/{types-DBd1zAyo.d.ts → types-BT1n5oU4.d.ts} +1 -1
- package/dist/{types-D1iyZY9M.d.ts → types-BkTDw00d.d.ts} +1 -1
- package/dist/{types-CqlNB5VN.d.ts → types-CHFrSm-3.d.ts} +1 -1
- package/dist/{types-VadeVz_w.d.ts → types-DMQ8JEf8.d.ts} +1 -1
- package/dist/{types-BySyFZTT.d.ts → types-nybevqL9.d.ts} +43 -1
- package/dist/{types-t_DnP78R.d.ts → types-yf-Exga_.d.ts} +2 -2
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/vector-store/index.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunk-2XD7Z7NB.js.map +0 -1
- package/dist/chunk-BOJP4ARV.js.map +0 -1
- package/dist/chunk-CESSRJYD.js.map +0 -1
- package/dist/chunk-FBHF7WZJ.js.map +0 -1
- package/dist/chunk-HHHNMP3V.js.map +0 -1
- package/dist/chunk-HU55YP24.js.map +0 -1
- package/dist/chunk-YQF7QOCO.js.map +0 -1
- /package/dist/{chunk-X2Q3AXFM.js.map → chunk-IT426VXL.js.map} +0 -0
package/dist/completion/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
formatDocument,
|
|
7
7
|
isStreamingCompletionModel,
|
|
8
8
|
normalizeDocuments
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-K72JKDZ7.js";
|
|
10
10
|
import {
|
|
11
11
|
AssistantContent,
|
|
12
12
|
CompletionCapabilityError,
|
|
@@ -17,11 +17,12 @@ import {
|
|
|
17
17
|
assertCompletionRequestSupported,
|
|
18
18
|
getAssistantGenerationMetadata,
|
|
19
19
|
isJsonValue,
|
|
20
|
+
isProviderTool,
|
|
20
21
|
isToolResultContentArray,
|
|
21
22
|
reasoningDisplayText,
|
|
22
23
|
serializeToolResultOutput,
|
|
23
24
|
textFromAssistantContent
|
|
24
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-R6QERZAB.js";
|
|
25
26
|
import "../chunk-WQKHFADH.js";
|
|
26
27
|
export {
|
|
27
28
|
AssistantContent,
|
|
@@ -38,6 +39,7 @@ export {
|
|
|
38
39
|
formatDocument,
|
|
39
40
|
getAssistantGenerationMetadata,
|
|
40
41
|
isJsonValue,
|
|
42
|
+
isProviderTool,
|
|
41
43
|
isStreamingCompletionModel,
|
|
42
44
|
isToolResultContentArray,
|
|
43
45
|
normalizeDocuments,
|
package/dist/evals/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as Agent } from '../agent-
|
|
2
|
-
import {
|
|
3
|
-
import { P as PromptResponse } from '../index-
|
|
1
|
+
import { A as Agent } from '../agent-BTiQ4RZn.js';
|
|
2
|
+
import { i as JsonValue, M as Message, C as CompletionModel } from '../types-nybevqL9.js';
|
|
3
|
+
import { P as PromptResponse } from '../index-Du1vCw6J.js';
|
|
4
4
|
import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
|
|
5
5
|
import { E as EmbeddingModel } from '../types-DHHZztGO.js';
|
|
6
6
|
import '../guardrails/index.js';
|
|
7
|
-
import '../types-
|
|
8
|
-
import '../types-
|
|
9
|
-
import '../tool-
|
|
10
|
-
import '../middleware-
|
|
11
|
-
import '../types-
|
|
7
|
+
import '../types-CHFrSm-3.js';
|
|
8
|
+
import '../types-DMQ8JEf8.js';
|
|
9
|
+
import '../tool-sKozRXMI.js';
|
|
10
|
+
import '../middleware-CsxdqqjJ.js';
|
|
11
|
+
import '../types-BkTDw00d.js';
|
|
12
12
|
import 'zod';
|
|
13
13
|
|
|
14
14
|
type EvalOutcome<Score = unknown> = {
|
package/dist/evals/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ExtractorBuilder
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-3PRP2DV4.js";
|
|
4
|
+
import "../chunk-A7AYX6BD.js";
|
|
5
|
+
import "../chunk-3QG4SFH4.js";
|
|
6
|
+
import "../chunk-PJCJ45RJ.js";
|
|
7
7
|
import "../chunk-YK4WAAS4.js";
|
|
8
8
|
import "../chunk-XUUY2L2D.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-4PMAWIGM.js";
|
|
10
10
|
import "../chunk-I7TM7TKX.js";
|
|
11
11
|
import "../chunk-2ODTMRHP.js";
|
|
12
12
|
import "../chunk-M6RPFHG7.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-K72JKDZ7.js";
|
|
14
|
+
import "../chunk-R6QERZAB.js";
|
|
15
15
|
import "../chunk-WQKHFADH.js";
|
|
16
16
|
import {
|
|
17
17
|
cosineSimilarity,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as Agent } from '../agent-
|
|
1
|
+
import { A as Agent } from '../agent-BTiQ4RZn.js';
|
|
2
2
|
import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
|
|
3
|
-
import { U as Usage, M as Message, C as CompletionModel,
|
|
3
|
+
import { U as Usage, M as Message, C as CompletionModel, i as JsonValue, z as ToolChoice } from '../types-nybevqL9.js';
|
|
4
4
|
import '../guardrails/index.js';
|
|
5
|
-
import '../types-
|
|
6
|
-
import '../types-
|
|
7
|
-
import '../index-
|
|
8
|
-
import '../tool-
|
|
9
|
-
import '../middleware-
|
|
5
|
+
import '../types-CHFrSm-3.js';
|
|
6
|
+
import '../types-DMQ8JEf8.js';
|
|
7
|
+
import '../index-Du1vCw6J.js';
|
|
8
|
+
import '../tool-sKozRXMI.js';
|
|
9
|
+
import '../middleware-CsxdqqjJ.js';
|
|
10
10
|
import '../types-DHHZztGO.js';
|
|
11
|
-
import '../types-
|
|
11
|
+
import '../types-BkTDw00d.js';
|
|
12
12
|
import 'zod';
|
|
13
13
|
|
|
14
14
|
type ExtractionResponse<T> = {
|
package/dist/extractor/index.js
CHANGED
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
ExtractionError,
|
|
3
3
|
Extractor,
|
|
4
4
|
ExtractorBuilder
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-3PRP2DV4.js";
|
|
6
|
+
import "../chunk-A7AYX6BD.js";
|
|
7
|
+
import "../chunk-3QG4SFH4.js";
|
|
8
|
+
import "../chunk-PJCJ45RJ.js";
|
|
9
9
|
import "../chunk-YK4WAAS4.js";
|
|
10
10
|
import "../chunk-XUUY2L2D.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-4PMAWIGM.js";
|
|
12
12
|
import "../chunk-I7TM7TKX.js";
|
|
13
13
|
import "../chunk-2ODTMRHP.js";
|
|
14
14
|
import "../chunk-M6RPFHG7.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-K72JKDZ7.js";
|
|
16
|
+
import "../chunk-R6QERZAB.js";
|
|
17
17
|
import "../chunk-WQKHFADH.js";
|
|
18
18
|
import "../chunk-YBBD4HZ3.js";
|
|
19
19
|
import "../chunk-OIMLU4SF.js";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HookAction, P as PromptHook, T as ToolApprovalRequestOptions, a as ToolCallHookAction, R as RunControl, b as ToolCallControl } from '../types-
|
|
2
|
-
export { C as CompletionCallHookArgs, c as CompletionErrorHookArgs, d as CompletionResponseHookArgs, e as HookResult, f as RunEndHookArgs, g as RunErrorHookArgs, h as RunStartHookArgs, i as ToolCallHookArgs, j as ToolCallHookResult, k as ToolErrorHookArgs, l as ToolHookArgs, m as ToolResultHookArgs, n as TurnEndHookArgs, o as TurnStartHookArgs } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { H as HookAction, P as PromptHook, T as ToolApprovalRequestOptions, a as ToolCallHookAction, R as RunControl, b as ToolCallControl } from '../types-CHFrSm-3.js';
|
|
2
|
+
export { C as CompletionCallHookArgs, c as CompletionErrorHookArgs, d as CompletionResponseHookArgs, e as HookResult, f as RunEndHookArgs, g as RunErrorHookArgs, h as RunStartHookArgs, i as ToolCallHookArgs, j as ToolCallHookResult, k as ToolErrorHookArgs, l as ToolHookArgs, m as ToolResultHookArgs, n as TurnEndHookArgs, o as TurnStartHookArgs } from '../types-CHFrSm-3.js';
|
|
3
|
+
import '../types-nybevqL9.js';
|
|
4
4
|
|
|
5
5
|
declare function createHook<RawResponse = unknown>(hook: PromptHook<RawResponse>): PromptHook<RawResponse>;
|
|
6
6
|
declare function cancelPrompt(reason: string): HookAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ReasoningContentType, l as ToolCall, f as CompletionSource, k as ProviderToolCall, U as Usage, M as Message, q as ToolResultContent, e as CompletionResponse, O as ToolCallArgumentsMode, d as CompletionRequest, J as JsonObject, E as CompletionModelCapabilities, n as ToolDefinition, i as JsonValue } from './types-nybevqL9.js';
|
|
2
2
|
import { GuardrailDecisionRecord } from './guardrails/index.js';
|
|
3
|
-
import { g as ToolCallStreamEvent } from './tool-
|
|
3
|
+
import { g as ToolCallStreamEvent } from './tool-sKozRXMI.js';
|
|
4
4
|
|
|
5
5
|
type PromptResponse = {
|
|
6
6
|
output: string;
|
|
@@ -8,6 +8,8 @@ type PromptResponse = {
|
|
|
8
8
|
messages: Message[];
|
|
9
9
|
trace?: AgentTraceInfo | undefined;
|
|
10
10
|
guardrails?: GuardrailDecisionRecord[] | undefined;
|
|
11
|
+
sources?: CompletionSource[] | undefined;
|
|
12
|
+
providerToolCalls?: ProviderToolCall[] | undefined;
|
|
11
13
|
};
|
|
12
14
|
type AgentDeltaEvent = {
|
|
13
15
|
type: "text_delta";
|
|
@@ -21,13 +23,33 @@ type AgentDeltaEvent = {
|
|
|
21
23
|
} | {
|
|
22
24
|
type: "tool_call";
|
|
23
25
|
toolCall: ToolCall;
|
|
26
|
+
} | {
|
|
27
|
+
type: "source";
|
|
28
|
+
source: CompletionSource;
|
|
29
|
+
} | {
|
|
30
|
+
type: "provider_tool_call";
|
|
31
|
+
toolCall: ProviderToolCall;
|
|
24
32
|
};
|
|
25
33
|
type AgentErrorStreamEvent = {
|
|
26
34
|
type: "error";
|
|
27
35
|
error: unknown;
|
|
28
36
|
usage: Usage;
|
|
29
37
|
};
|
|
30
|
-
type
|
|
38
|
+
type AgentStreamOptions = {
|
|
39
|
+
/** @default true */
|
|
40
|
+
includeToolCallDeltas?: boolean;
|
|
41
|
+
};
|
|
42
|
+
type AgentToolCallDeltaEvent = {
|
|
43
|
+
type: "tool_call_delta";
|
|
44
|
+
turn: number;
|
|
45
|
+
id: string;
|
|
46
|
+
callId?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
argumentsDelta?: string;
|
|
49
|
+
argumentsMode?: ToolCallArgumentsMode;
|
|
50
|
+
signature?: string;
|
|
51
|
+
};
|
|
52
|
+
type AgentChildStreamEventBase<RawResponse = unknown> = {
|
|
31
53
|
type: "turn_start";
|
|
32
54
|
turn: number;
|
|
33
55
|
prompt: Message;
|
|
@@ -47,6 +69,14 @@ type AgentChildStreamEvent<RawResponse = unknown> = {
|
|
|
47
69
|
type: "tool_call";
|
|
48
70
|
turn: number;
|
|
49
71
|
toolCall: ToolCall;
|
|
72
|
+
} | {
|
|
73
|
+
type: "source";
|
|
74
|
+
turn: number;
|
|
75
|
+
source: CompletionSource;
|
|
76
|
+
} | {
|
|
77
|
+
type: "provider_tool_call";
|
|
78
|
+
turn: number;
|
|
79
|
+
toolCall: ProviderToolCall;
|
|
50
80
|
} | {
|
|
51
81
|
type: "tool_result";
|
|
52
82
|
turn: number;
|
|
@@ -72,8 +102,13 @@ type AgentChildStreamEvent<RawResponse = unknown> = {
|
|
|
72
102
|
messages: Message[];
|
|
73
103
|
trace?: AgentTraceInfo | undefined;
|
|
74
104
|
guardrails?: GuardrailDecisionRecord[] | undefined;
|
|
105
|
+
sources?: CompletionSource[] | undefined;
|
|
106
|
+
providerToolCalls?: ProviderToolCall[] | undefined;
|
|
75
107
|
} | AgentErrorStreamEvent;
|
|
76
|
-
type
|
|
108
|
+
type AgentChildStreamEventWithoutToolCallDeltas<RawResponse = unknown> = AgentChildStreamEventBase<RawResponse>;
|
|
109
|
+
type AgentChildStreamEvent<RawResponse = unknown> = AgentChildStreamEventBase<RawResponse> | AgentToolCallDeltaEvent;
|
|
110
|
+
type AgentChildStreamEventWithToolCallDeltas<RawResponse = unknown> = AgentChildStreamEvent<RawResponse>;
|
|
111
|
+
type AgentToolStreamEvent<ChildEvent> = {
|
|
77
112
|
type: "agent_tool_event";
|
|
78
113
|
turn: number;
|
|
79
114
|
toolName: string;
|
|
@@ -81,8 +116,11 @@ type AgentStreamEvent<RawResponse = unknown> = AgentChildStreamEvent<RawResponse
|
|
|
81
116
|
internalCallId: string;
|
|
82
117
|
agentId: string;
|
|
83
118
|
agentName?: string;
|
|
84
|
-
event:
|
|
119
|
+
event: ChildEvent;
|
|
85
120
|
};
|
|
121
|
+
type AgentStreamEventWithoutToolCallDeltas<RawResponse = unknown> = AgentChildStreamEventWithoutToolCallDeltas<RawResponse> | AgentToolStreamEvent<AgentChildStreamEventWithoutToolCallDeltas<RawResponse>>;
|
|
122
|
+
type AgentStreamEvent<RawResponse = unknown> = AgentChildStreamEvent<RawResponse> | AgentToolStreamEvent<AgentChildStreamEvent<RawResponse>>;
|
|
123
|
+
type AgentStreamEventWithToolCallDeltas<RawResponse = unknown> = AgentStreamEvent<RawResponse>;
|
|
86
124
|
|
|
87
125
|
type AgentTraceInfo = {
|
|
88
126
|
traceId?: string | undefined;
|
|
@@ -116,6 +154,8 @@ type AgentRunEndArgs = {
|
|
|
116
154
|
output: string;
|
|
117
155
|
usage: Usage;
|
|
118
156
|
messages: Message[];
|
|
157
|
+
sources?: CompletionSource[] | undefined;
|
|
158
|
+
providerToolCalls?: ProviderToolCall[] | undefined;
|
|
119
159
|
};
|
|
120
160
|
type AgentRunErrorArgs = {
|
|
121
161
|
error: unknown;
|
|
@@ -204,4 +244,4 @@ type ObserveOptions = {
|
|
|
204
244
|
};
|
|
205
245
|
declare function createObserver(observer: AgentObserver): AgentObserver;
|
|
206
246
|
|
|
207
|
-
export { type AgentChildStreamEvent as A, type ObserveOptions as O, type PromptResponse as P, type
|
|
247
|
+
export { type AgentChildStreamEvent as A, type AgentToolStartArgs as B, type AgentToolStreamEventArgs as C, type AgentTraceInfo as D, createObserver as E, type ObserveOptions as O, type PromptResponse as P, type AgentChildStreamEventWithToolCallDeltas as a, type AgentChildStreamEventWithoutToolCallDeltas as b, type AgentErrorStreamEvent as c, type AgentStreamEvent as d, type AgentStreamEventWithToolCallDeltas as e, type AgentStreamEventWithoutToolCallDeltas as f, type AgentStreamOptions as g, type AgentToolCallDeltaEvent as h, type AgentObserver as i, type AgentTraceOptions as j, type AgentObserverRegistration as k, type AgentDeltaEvent as l, type AgentGenerationEndArgs as m, type AgentGenerationErrorArgs as n, type AgentGenerationObserver as o, type AgentGenerationStartArgs as p, type AgentGenerationUpdateArgs as q, type AgentRunEndArgs as r, type AgentRunErrorArgs as s, type AgentRunEventArgs as t, type AgentRunObserver as u, type AgentRunPromptRef as v, type AgentRunStartArgs as w, type AgentToolEndArgs as x, type AgentToolErrorArgs as y, type AgentToolObserver as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export { AgentBuilder } from './agent/index.js';
|
|
2
|
-
export { C as CreateCompletionBaseOptions, a as CreateCompletionInput, b as CreateCompletionOptions, c as CreateCompletionResult, d as CreateCompletionStreamOptions, e as CreateParsedCompletionOptions, f as CreateParsedCompletionResult, g as createCompletion, h as createCompletionStream, i as createParsedCompletion, j as isJsonValue } from './json-
|
|
3
|
-
export { A as AssistantContent, a as AssistantGenerationMetadata, b as AssistantMessage, c as AssistantMessageOptions, C as CompletionModel, d as CompletionRequest, e as CompletionResponse, D as Document, I as ImageContent, J as JsonObject,
|
|
2
|
+
export { C as CreateCompletionBaseOptions, a as CreateCompletionInput, b as CreateCompletionOptions, c as CreateCompletionResult, d as CreateCompletionStreamOptions, e as CreateParsedCompletionOptions, f as CreateParsedCompletionResult, g as createCompletion, h as createCompletionStream, i as createParsedCompletion, j as isJsonValue } from './json-D_Ijo4lJ.js';
|
|
3
|
+
export { A as AssistantContent, a as AssistantGenerationMetadata, b as AssistantMessage, c as AssistantMessageOptions, C as CompletionModel, d as CompletionRequest, e as CompletionResponse, f as CompletionSource, g as CompletionTool, D as Document, I as ImageContent, J as JsonObject, h as JsonPrimitive, i as JsonValue, M as Message, j as MessageOptions, P as ProviderTool, k as ProviderToolCall, S as SystemMessage, T as Text, l as ToolCall, m as ToolContent, n as ToolDefinition, o as ToolMessage, p as ToolResult, q as ToolResultContent, r as ToolResultMessageOptions, s as ToolResultOptions, U as Usage, t as UserContent, u as UserMessage, v as getAssistantGenerationMetadata, w as isProviderTool } from './types-nybevqL9.js';
|
|
4
4
|
export { GuardrailBoundary, GuardrailDecisionRecord, GuardrailMode, GuardrailPolicy, GuardrailPolicyInput, GuardrailPolicyOptions, InputGuardrail, InputGuardrailActions, InputGuardrailContext, OutputGuardrail, OutputGuardrailActions, OutputGuardrailContext, allow, block, defineGuardrailPolicy, defineInputGuardrail, defineOutputGuardrail, guardrails } from './guardrails/index.js';
|
|
5
5
|
export { cancelPrompt, createHook, requestToolApproval, runControl, skipTool, toolCallControl } from './hooks/index.js';
|
|
6
|
-
export { M as MemoryConversation, a as MemoryConversationListOptions, b as MemoryConversationMessage, c as MemoryConversationSummary, d as MemoryInspector, e as MemoryStore } from './types-
|
|
6
|
+
export { M as MemoryConversation, a as MemoryConversationListOptions, b as MemoryConversationMessage, c as MemoryConversationSummary, d as MemoryInspector, e as MemoryStore } from './types-DMQ8JEf8.js';
|
|
7
7
|
export { MaxTurnsError, PromptCancelledError, ToolApprovalRequiredError } from './request/index.js';
|
|
8
|
-
export { C as CompletionRetryContext, a as CompletionRetryOptions } from './agent-
|
|
9
|
-
export { A as AgentChildStreamEvent, a as
|
|
8
|
+
export { C as CompletionRetryContext, a as CompletionRetryOptions } from './agent-BTiQ4RZn.js';
|
|
9
|
+
export { A as AgentChildStreamEvent, a as AgentChildStreamEventWithToolCallDeltas, b as AgentChildStreamEventWithoutToolCallDeltas, c as AgentErrorStreamEvent, d as AgentStreamEvent, e as AgentStreamEventWithToolCallDeltas, f as AgentStreamEventWithoutToolCallDeltas, g as AgentStreamOptions, h as AgentToolCallDeltaEvent, P as PromptResponse } from './index-Du1vCw6J.js';
|
|
10
10
|
export { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
11
11
|
export { loadSkills, skill } from './skills/index.js';
|
|
12
|
-
export { S as SkillValidationError } from './types-
|
|
13
|
-
export { C as CreateToolOptions, c as createThinkTool, a as createTool } from './think-tool-
|
|
14
|
-
export { A as AnyTool, T as Tool, a as ToolApprovalContext, b as ToolApprovalDecision, c as ToolApprovalPolicy, d as ToolApprovalRequest, e as ToolApprovalsOptions, f as ToolCallContext, g as ToolCallStreamEvent } from './tool-
|
|
15
|
-
export { A as AgentMiddleware, C as CompletionRequestMiddlewareArgs, a as CompletionRequestMiddlewareResult, b as CompletionResponseMiddlewareArgs, c as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, d as ToolInputMiddlewareResult, e as ToolMiddleware, f as ToolOutputMiddlewareArgs, g as ToolOutputMiddlewareResult, h as ToolResultMiddlewareArgs, i as createMiddleware, j as createToolMiddleware } from './middleware-
|
|
12
|
+
export { S as SkillValidationError } from './types-BT1n5oU4.js';
|
|
13
|
+
export { C as CreateToolOptions, c as createThinkTool, a as createTool } from './think-tool-BTFFKn1m.js';
|
|
14
|
+
export { A as AnyTool, T as Tool, a as ToolApprovalContext, b as ToolApprovalDecision, c as ToolApprovalPolicy, d as ToolApprovalRequest, e as ToolApprovalsOptions, f as ToolCallContext, g as ToolCallStreamEvent } from './tool-sKozRXMI.js';
|
|
15
|
+
export { A as AgentMiddleware, C as CompletionRequestMiddlewareArgs, a as CompletionRequestMiddlewareResult, b as CompletionResponseMiddlewareArgs, c as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, d as ToolInputMiddlewareResult, e as ToolMiddleware, f as ToolOutputMiddlewareArgs, g as ToolOutputMiddlewareResult, h as ToolResultMiddlewareArgs, i as createMiddleware, j as createToolMiddleware } from './middleware-CsxdqqjJ.js';
|
|
16
16
|
export { CreateUIAttachment, UIAttachment, UIError, UIMessage, UIMessagePart, UIMessageRole, UIStreamEvent, UIStreamRequest, coreMessagesToUIMessages, uiMessagesToCoreMessages } from './ui/index.js';
|
|
17
|
-
import './types-
|
|
18
|
-
import './types-
|
|
17
|
+
import './types-CHFrSm-3.js';
|
|
18
|
+
import './types-yf-Exga_.js';
|
|
19
19
|
import '@modelcontextprotocol/sdk/client/sse.js';
|
|
20
20
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
21
21
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
22
|
-
import './types-
|
|
22
|
+
import './types-BkTDw00d.js';
|
|
23
23
|
import './types-DHHZztGO.js';
|
|
24
24
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -6,24 +6,24 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
coreMessagesToUIMessages,
|
|
8
8
|
uiMessagesToCoreMessages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IT426VXL.js";
|
|
10
10
|
import "./chunk-CQNNSZPG.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentBuilder
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-A7AYX6BD.js";
|
|
14
|
+
import "./chunk-3QG4SFH4.js";
|
|
15
15
|
import {
|
|
16
16
|
MaxTurnsError,
|
|
17
17
|
PromptCancelledError,
|
|
18
18
|
ToolApprovalRequiredError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PJCJ45RJ.js";
|
|
20
20
|
import "./chunk-YK4WAAS4.js";
|
|
21
21
|
import "./chunk-XUUY2L2D.js";
|
|
22
22
|
import {
|
|
23
23
|
createMiddleware,
|
|
24
24
|
createThinkTool,
|
|
25
25
|
createToolMiddleware
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4PMAWIGM.js";
|
|
27
27
|
import {
|
|
28
28
|
createTool
|
|
29
29
|
} from "./chunk-I7TM7TKX.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
createCompletion,
|
|
41
41
|
createCompletionStream,
|
|
42
42
|
createParsedCompletion
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-K72JKDZ7.js";
|
|
44
44
|
import {
|
|
45
45
|
AssistantContent,
|
|
46
46
|
Message,
|
|
@@ -48,8 +48,9 @@ import {
|
|
|
48
48
|
Usage,
|
|
49
49
|
UserContent,
|
|
50
50
|
getAssistantGenerationMetadata,
|
|
51
|
-
isJsonValue
|
|
52
|
-
|
|
51
|
+
isJsonValue,
|
|
52
|
+
isProviderTool
|
|
53
|
+
} from "./chunk-R6QERZAB.js";
|
|
53
54
|
import "./chunk-WQKHFADH.js";
|
|
54
55
|
import "./chunk-YBBD4HZ3.js";
|
|
55
56
|
import "./chunk-OIMLU4SF.js";
|
|
@@ -90,6 +91,7 @@ export {
|
|
|
90
91
|
getAssistantGenerationMetadata,
|
|
91
92
|
guardrails,
|
|
92
93
|
isJsonValue,
|
|
94
|
+
isProviderTool,
|
|
93
95
|
loadSkills,
|
|
94
96
|
requestToolApproval,
|
|
95
97
|
runControl,
|
package/dist/internal/agent.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { A as Agent, e as AgentEventAppendInput, f as AgentEventRecord, c as AgentEventStore, g as AgentEventStoreInclude, d as AgentEventStoreOptions, j as AgentEventStoreRegistration, k as AgentOptions, h as AgentSession, i as AgentToolOptions, l as DEFAULT_MAX_TURNS, D as DynamicContextOptions, m as DynamicContextRegistration, b as DynamicToolOptions, n as DynamicToolRegistration } from '../agent-
|
|
2
|
-
import '../types-
|
|
1
|
+
export { A as Agent, e as AgentEventAppendInput, f as AgentEventRecord, c as AgentEventStore, g as AgentEventStoreInclude, d as AgentEventStoreOptions, j as AgentEventStoreRegistration, k as AgentOptions, h as AgentSession, i as AgentToolOptions, l as DEFAULT_MAX_TURNS, D as DynamicContextOptions, m as DynamicContextRegistration, b as DynamicToolOptions, n as DynamicToolRegistration } from '../agent-BTiQ4RZn.js';
|
|
2
|
+
import '../types-nybevqL9.js';
|
|
3
3
|
import '../guardrails/index.js';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../types-
|
|
6
|
-
import '../index-
|
|
7
|
-
import '../tool-
|
|
8
|
-
import '../middleware-
|
|
4
|
+
import '../types-CHFrSm-3.js';
|
|
5
|
+
import '../types-DMQ8JEf8.js';
|
|
6
|
+
import '../index-Du1vCw6J.js';
|
|
7
|
+
import '../tool-sKozRXMI.js';
|
|
8
|
+
import '../middleware-CsxdqqjJ.js';
|
|
9
9
|
import '../types-DHHZztGO.js';
|
|
10
|
-
import '../types-
|
|
10
|
+
import '../types-BkTDw00d.js';
|
package/dist/internal/agent.js
CHANGED
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
Agent,
|
|
3
3
|
AgentSession,
|
|
4
4
|
DEFAULT_MAX_TURNS
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-3QG4SFH4.js";
|
|
6
|
+
import "../chunk-PJCJ45RJ.js";
|
|
7
7
|
import "../chunk-YK4WAAS4.js";
|
|
8
8
|
import "../chunk-XUUY2L2D.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-4PMAWIGM.js";
|
|
10
10
|
import "../chunk-I7TM7TKX.js";
|
|
11
11
|
import "../chunk-2ODTMRHP.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-K72JKDZ7.js";
|
|
13
|
+
import "../chunk-R6QERZAB.js";
|
|
14
14
|
import "../chunk-WQKHFADH.js";
|
|
15
15
|
import "../chunk-YBBD4HZ3.js";
|
|
16
16
|
import "../chunk-OIMLU4SF.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
2
|
-
import { M as Message, D as Document,
|
|
2
|
+
import { M as Message, D as Document, g as CompletionTool, z as ToolChoice, J as JsonObject, i as JsonValue, A as AssistantContent, U as Usage, e as CompletionResponse, C as CompletionModel, N as StreamingCompletionModel, F as CompletionStreamEvent } from './types-nybevqL9.js';
|
|
3
3
|
|
|
4
4
|
type CreateCompletionInput = string | Message | Message[];
|
|
5
5
|
type CreateCompletionBaseOptions = {
|
|
@@ -7,7 +7,7 @@ type CreateCompletionBaseOptions = {
|
|
|
7
7
|
messages?: Message[] | undefined;
|
|
8
8
|
instructions?: string | undefined;
|
|
9
9
|
documents?: Document[] | undefined;
|
|
10
|
-
tools?:
|
|
10
|
+
tools?: CompletionTool[] | undefined;
|
|
11
11
|
temperature?: number | undefined;
|
|
12
12
|
maxTokens?: number | undefined;
|
|
13
13
|
toolChoice?: ToolChoice | undefined;
|
package/dist/loaders/index.d.ts
CHANGED
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { M as McpConnection, a as McpServer, b as McpStdioOptions, c as McpHttpOptions, d as McpSseOptions } from '../types-
|
|
2
|
-
export { e as McpClient, f as McpToolCallContent, g as McpToolCallResult, h as McpToolDefinition } from '../types-
|
|
1
|
+
import { M as McpConnection, a as McpServer, b as McpStdioOptions, c as McpHttpOptions, d as McpSseOptions } from '../types-yf-Exga_.js';
|
|
2
|
+
export { e as McpClient, f as McpToolCallContent, g as McpToolCallResult, h as McpToolDefinition } from '../types-yf-Exga_.js';
|
|
3
3
|
import '@modelcontextprotocol/sdk/client/sse.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
5
5
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
6
|
-
import '../types-
|
|
7
|
-
import '../tool-
|
|
6
|
+
import '../types-nybevqL9.js';
|
|
7
|
+
import '../tool-sKozRXMI.js';
|
|
8
8
|
|
|
9
9
|
declare function connectMcp(connection: McpConnection): Promise<McpServer>;
|
|
10
10
|
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as MemoryOptions, R as ResolvedMemoryOptions } from '../types-
|
|
2
|
-
export { g as MemoryAppendInput, h as MemoryContext, M as MemoryConversation, a as MemoryConversationListOptions, b as MemoryConversationMessage, c as MemoryConversationSummary, i as MemoryErrorInput, d as MemoryInspector, j as MemoryRegistration, k as MemorySavePolicy, e as MemoryStore, S as SessionOptions } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { f as MemoryOptions, R as ResolvedMemoryOptions } from '../types-DMQ8JEf8.js';
|
|
2
|
+
export { g as MemoryAppendInput, h as MemoryContext, M as MemoryConversation, a as MemoryConversationListOptions, b as MemoryConversationMessage, c as MemoryConversationSummary, i as MemoryErrorInput, d as MemoryInspector, j as MemoryRegistration, k as MemorySavePolicy, e as MemoryStore, S as SessionOptions } from '../types-DMQ8JEf8.js';
|
|
3
|
+
import '../types-nybevqL9.js';
|
|
4
4
|
|
|
5
5
|
declare function resolveMemoryOptions(options?: MemoryOptions): ResolvedMemoryOptions;
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ToolDefinition, d as CompletionRequest, e as CompletionResponse, i as JsonValue, q as ToolResultContent } from './types-nybevqL9.js';
|
|
2
2
|
import { V as VectorMetadata, E as EmbeddingModel, c as EmbeddedDocument } from './types-DHHZztGO.js';
|
|
3
|
-
import { A as AnyTool, f as ToolCallContext, N as NormalizedToolOutput } from './tool-
|
|
4
|
-
import { a as VectorSearchIndex } from './types-
|
|
3
|
+
import { A as AnyTool, f as ToolCallContext, N as NormalizedToolOutput } from './tool-sKozRXMI.js';
|
|
4
|
+
import { a as VectorSearchIndex } from './types-BkTDw00d.js';
|
|
5
5
|
|
|
6
6
|
declare class ToolSet {
|
|
7
7
|
private readonly tools;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../types-
|
|
1
|
+
export { m as AgentGenerationEndArgs, n as AgentGenerationErrorArgs, o as AgentGenerationObserver, p as AgentGenerationStartArgs, q as AgentGenerationUpdateArgs, i as AgentObserver, k as AgentObserverRegistration, r as AgentRunEndArgs, s as AgentRunErrorArgs, t as AgentRunEventArgs, u as AgentRunObserver, v as AgentRunPromptRef, w as AgentRunStartArgs, x as AgentToolEndArgs, y as AgentToolErrorArgs, z as AgentToolObserver, B as AgentToolStartArgs, C as AgentToolStreamEventArgs, D as AgentTraceInfo, j as AgentTraceOptions, O as ObserveOptions, E as createObserver } from '../index-Du1vCw6J.js';
|
|
2
|
+
import '../types-nybevqL9.js';
|
|
3
3
|
import '../guardrails/index.js';
|
|
4
|
-
import '../tool-
|
|
4
|
+
import '../tool-sKozRXMI.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/observability/types.ts"],"sourcesContent":["import type {\n CompletionModelCapabilities,\n CompletionRequest,\n CompletionResponse,\n JsonObject,\n JsonValue,\n Message,\n ToolCall,\n ToolDefinition,\n ToolResultContent,\n Usage,\n} from \"../completion\";\nimport type { AgentDeltaEvent } from \"../request/types\";\nimport type { ToolCallStreamEvent } from \"../tool\";\n\nexport type AgentTraceInfo = {\n traceId?: string | undefined;\n observationId?: string | undefined;\n};\n\nexport type AgentTraceOptions = {\n name?: string | undefined;\n userId?: string | undefined;\n sessionId?: string | undefined;\n metadata?: Record<string, unknown> | undefined;\n tags?: string[] | undefined;\n version?: string | undefined;\n traceId?: string | undefined;\n failOnObserverError?: boolean | undefined;\n};\n\nexport type AgentRunPromptRef = {\n name: string;\n version?: number | undefined;\n};\n\nexport type AgentRunStartArgs = {\n agentName?: string | undefined;\n agentDescription?: string | undefined;\n instructions?: string | undefined;\n trace?: AgentTraceOptions | undefined;\n prompt: Message;\n promptRef?: AgentRunPromptRef | undefined;\n history: Message[];\n maxTurns: number;\n};\n\nexport type AgentRunEndArgs = {\n output: string;\n usage: Usage;\n messages: Message[];\n};\n\nexport type AgentRunErrorArgs = {\n error: unknown;\n usage: Usage;\n messages: Message[];\n};\n\nexport type AgentGenerationStartArgs = {\n turn: number;\n request: CompletionRequest;\n providerRequest?: JsonObject | undefined;\n modelInfo?: {\n provider: string;\n defaultModel: string;\n capabilities?: CompletionModelCapabilities | undefined;\n };\n};\n\nexport type AgentGenerationEndArgs<RawResponse = unknown> = {\n turn: number;\n response: CompletionResponse<RawResponse>;\n firstDeltaMs?: number | undefined;\n};\n\nexport type AgentGenerationErrorArgs = {\n turn: number;\n error: unknown;\n};\n\nexport type AgentGenerationUpdateArgs = {\n turn: number;\n delta: AgentDeltaEvent;\n};\n\nexport type AgentRunEventArgs = {\n name: string;\n attributes?: Record<string, JsonValue | undefined> | undefined;\n level?: \"DEFAULT\" | \"WARNING\" | \"ERROR\" | undefined;\n timestamp?: Date | string | undefined;\n};\n\nexport type AgentToolStartArgs = {\n turn: number;\n toolCall: ToolCall;\n toolName: string;\n args: string;\n internalCallId: string;\n toolCallId?: string | undefined;\n toolDefinition?: ToolDefinition | undefined;\n toolMetadata?: JsonObject | undefined;\n};\n\nexport type AgentToolEndArgs = AgentToolStartArgs & {\n result: string;\n structuredResult?: ToolResultContent[] | undefined;\n skipped: boolean;\n};\n\nexport type AgentToolErrorArgs = AgentToolStartArgs & {\n error: unknown;\n};\n\nexport type AgentToolStreamEventArgs = AgentToolStartArgs & {\n event: ToolCallStreamEvent;\n};\n\nexport interface AgentGenerationObserver {\n end(args: AgentGenerationEndArgs): void | Promise<void>;\n error?(args: AgentGenerationErrorArgs): void | Promise<void>;\n update?(args: AgentGenerationUpdateArgs): void | Promise<void>;\n}\n\nexport interface AgentToolObserver {\n streamEvent?(args: AgentToolStreamEventArgs): void | Promise<void>;\n end(args: AgentToolEndArgs): void | Promise<void>;\n error?(args: AgentToolErrorArgs): void | Promise<void>;\n}\n\nexport interface AgentRunObserver {\n readonly trace?: AgentTraceInfo | undefined;\n startGeneration?(\n args: AgentGenerationStartArgs,\n ): AgentGenerationObserver | undefined | Promise<AgentGenerationObserver | undefined>;\n startTool?(\n args: AgentToolStartArgs,\n ): AgentToolObserver | undefined | Promise<AgentToolObserver | undefined>;\n end(args: AgentRunEndArgs): void | Promise<void>;\n error?(args: AgentRunErrorArgs): void | Promise<void>;\n event?(args: AgentRunEventArgs): void | Promise<void>;\n}\n\nexport interface AgentObserver {\n startRun(\n args: AgentRunStartArgs,\n ): AgentRunObserver | undefined | Promise<AgentRunObserver | undefined>;\n flush?(): void | Promise<void>;\n shutdown?(): void | Promise<void>;\n}\n\nexport type AgentObserverRegistration = {\n observer: AgentObserver;\n failOnObserverError?: boolean | undefined;\n};\n\nexport type ObserveOptions = {\n failOnObserverError?: boolean | undefined;\n};\n\nexport function createObserver(observer: AgentObserver): AgentObserver {\n return observer;\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../src/observability/types.ts"],"sourcesContent":["import type {\n CompletionModelCapabilities,\n CompletionRequest,\n CompletionResponse,\n CompletionSource,\n JsonObject,\n JsonValue,\n Message,\n ProviderToolCall,\n ToolCall,\n ToolDefinition,\n ToolResultContent,\n Usage,\n} from \"../completion\";\nimport type { AgentDeltaEvent } from \"../request/types\";\nimport type { ToolCallStreamEvent } from \"../tool\";\n\nexport type AgentTraceInfo = {\n traceId?: string | undefined;\n observationId?: string | undefined;\n};\n\nexport type AgentTraceOptions = {\n name?: string | undefined;\n userId?: string | undefined;\n sessionId?: string | undefined;\n metadata?: Record<string, unknown> | undefined;\n tags?: string[] | undefined;\n version?: string | undefined;\n traceId?: string | undefined;\n failOnObserverError?: boolean | undefined;\n};\n\nexport type AgentRunPromptRef = {\n name: string;\n version?: number | undefined;\n};\n\nexport type AgentRunStartArgs = {\n agentName?: string | undefined;\n agentDescription?: string | undefined;\n instructions?: string | undefined;\n trace?: AgentTraceOptions | undefined;\n prompt: Message;\n promptRef?: AgentRunPromptRef | undefined;\n history: Message[];\n maxTurns: number;\n};\n\nexport type AgentRunEndArgs = {\n output: string;\n usage: Usage;\n messages: Message[];\n sources?: CompletionSource[] | undefined;\n providerToolCalls?: ProviderToolCall[] | undefined;\n};\n\nexport type AgentRunErrorArgs = {\n error: unknown;\n usage: Usage;\n messages: Message[];\n};\n\nexport type AgentGenerationStartArgs = {\n turn: number;\n request: CompletionRequest;\n providerRequest?: JsonObject | undefined;\n modelInfo?: {\n provider: string;\n defaultModel: string;\n capabilities?: CompletionModelCapabilities | undefined;\n };\n};\n\nexport type AgentGenerationEndArgs<RawResponse = unknown> = {\n turn: number;\n response: CompletionResponse<RawResponse>;\n firstDeltaMs?: number | undefined;\n};\n\nexport type AgentGenerationErrorArgs = {\n turn: number;\n error: unknown;\n};\n\nexport type AgentGenerationUpdateArgs = {\n turn: number;\n delta: AgentDeltaEvent;\n};\n\nexport type AgentRunEventArgs = {\n name: string;\n attributes?: Record<string, JsonValue | undefined> | undefined;\n level?: \"DEFAULT\" | \"WARNING\" | \"ERROR\" | undefined;\n timestamp?: Date | string | undefined;\n};\n\nexport type AgentToolStartArgs = {\n turn: number;\n toolCall: ToolCall;\n toolName: string;\n args: string;\n internalCallId: string;\n toolCallId?: string | undefined;\n toolDefinition?: ToolDefinition | undefined;\n toolMetadata?: JsonObject | undefined;\n};\n\nexport type AgentToolEndArgs = AgentToolStartArgs & {\n result: string;\n structuredResult?: ToolResultContent[] | undefined;\n skipped: boolean;\n};\n\nexport type AgentToolErrorArgs = AgentToolStartArgs & {\n error: unknown;\n};\n\nexport type AgentToolStreamEventArgs = AgentToolStartArgs & {\n event: ToolCallStreamEvent;\n};\n\nexport interface AgentGenerationObserver {\n end(args: AgentGenerationEndArgs): void | Promise<void>;\n error?(args: AgentGenerationErrorArgs): void | Promise<void>;\n update?(args: AgentGenerationUpdateArgs): void | Promise<void>;\n}\n\nexport interface AgentToolObserver {\n streamEvent?(args: AgentToolStreamEventArgs): void | Promise<void>;\n end(args: AgentToolEndArgs): void | Promise<void>;\n error?(args: AgentToolErrorArgs): void | Promise<void>;\n}\n\nexport interface AgentRunObserver {\n readonly trace?: AgentTraceInfo | undefined;\n startGeneration?(\n args: AgentGenerationStartArgs,\n ): AgentGenerationObserver | undefined | Promise<AgentGenerationObserver | undefined>;\n startTool?(\n args: AgentToolStartArgs,\n ): AgentToolObserver | undefined | Promise<AgentToolObserver | undefined>;\n end(args: AgentRunEndArgs): void | Promise<void>;\n error?(args: AgentRunErrorArgs): void | Promise<void>;\n event?(args: AgentRunEventArgs): void | Promise<void>;\n}\n\nexport interface AgentObserver {\n startRun(\n args: AgentRunStartArgs,\n ): AgentRunObserver | undefined | Promise<AgentRunObserver | undefined>;\n flush?(): void | Promise<void>;\n shutdown?(): void | Promise<void>;\n}\n\nexport type AgentObserverRegistration = {\n observer: AgentObserver;\n failOnObserverError?: boolean | undefined;\n};\n\nexport type ObserveOptions = {\n failOnObserverError?: boolean | undefined;\n};\n\nexport function createObserver(observer: AgentObserver): AgentObserver {\n return observer;\n}\n"],"mappings":";AAoKO,SAAS,eAAe,UAAwC;AACrE,SAAO;AACT;","names":[]}
|
package/dist/pipeline/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Agent } from '../agent-
|
|
3
|
-
import { J as JsonObject, C as CompletionModel } from '../types-
|
|
2
|
+
import { A as Agent } from '../agent-BTiQ4RZn.js';
|
|
3
|
+
import { J as JsonObject, C as CompletionModel } from '../types-nybevqL9.js';
|
|
4
4
|
import { Extractor } from '../extractor/index.js';
|
|
5
5
|
import '../guardrails/index.js';
|
|
6
|
-
import '../types-
|
|
7
|
-
import '../types-
|
|
8
|
-
import '../index-
|
|
9
|
-
import '../tool-
|
|
10
|
-
import '../middleware-
|
|
6
|
+
import '../types-CHFrSm-3.js';
|
|
7
|
+
import '../types-DMQ8JEf8.js';
|
|
8
|
+
import '../index-Du1vCw6J.js';
|
|
9
|
+
import '../tool-sKozRXMI.js';
|
|
10
|
+
import '../middleware-CsxdqqjJ.js';
|
|
11
11
|
import '../types-DHHZztGO.js';
|
|
12
|
-
import '../types-
|
|
12
|
+
import '../types-BkTDw00d.js';
|
|
13
13
|
import '../zod-schema-C7F4clpm.js';
|
|
14
14
|
|
|
15
15
|
/** Minimal interface for anything that can run as a pipeline stage. */
|
package/dist/request/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { M as Message } from '../types-
|
|
2
|
-
import { d as ToolApprovalRequest } from '../tool-
|
|
3
|
-
export { C as CompletionRetryContext, a as CompletionRetryOptions, P as PromptRequest } from '../agent-
|
|
4
|
-
export { A as AgentChildStreamEvent,
|
|
1
|
+
import { M as Message } from '../types-nybevqL9.js';
|
|
2
|
+
import { d as ToolApprovalRequest } from '../tool-sKozRXMI.js';
|
|
3
|
+
export { C as CompletionRetryContext, a as CompletionRetryOptions, P as PromptRequest } from '../agent-BTiQ4RZn.js';
|
|
4
|
+
export { A as AgentChildStreamEvent, a as AgentChildStreamEventWithToolCallDeltas, b as AgentChildStreamEventWithoutToolCallDeltas, l as AgentDeltaEvent, c as AgentErrorStreamEvent, d as AgentStreamEvent, e as AgentStreamEventWithToolCallDeltas, f as AgentStreamEventWithoutToolCallDeltas, g as AgentStreamOptions, h as AgentToolCallDeltaEvent, P as PromptResponse } from '../index-Du1vCw6J.js';
|
|
5
5
|
import '../guardrails/index.js';
|
|
6
|
-
import '../types-
|
|
7
|
-
import '../types-
|
|
8
|
-
import '../middleware-
|
|
6
|
+
import '../types-CHFrSm-3.js';
|
|
7
|
+
import '../types-DMQ8JEf8.js';
|
|
8
|
+
import '../middleware-CsxdqqjJ.js';
|
|
9
9
|
import '../types-DHHZztGO.js';
|
|
10
|
-
import '../types-
|
|
10
|
+
import '../types-BkTDw00d.js';
|
|
11
11
|
|
|
12
12
|
declare class MaxTurnsError extends Error {
|
|
13
13
|
readonly maxTurns: number;
|
package/dist/request/index.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
PromptCancelledError,
|
|
4
4
|
PromptRequest,
|
|
5
5
|
ToolApprovalRequiredError
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-PJCJ45RJ.js";
|
|
7
7
|
import "../chunk-XUUY2L2D.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-4PMAWIGM.js";
|
|
9
9
|
import "../chunk-I7TM7TKX.js";
|
|
10
10
|
import "../chunk-2ODTMRHP.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-K72JKDZ7.js";
|
|
12
|
+
import "../chunk-R6QERZAB.js";
|
|
13
13
|
import "../chunk-WQKHFADH.js";
|
|
14
14
|
import "../chunk-YBBD4HZ3.js";
|
|
15
15
|
import "../chunk-OIMLU4SF.js";
|
package/dist/skills/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as SkillLoader, a as SkillSet } from '../types-
|
|
2
|
-
export { c as Skill, S as SkillValidationError, d as SkillValidationIssue } from '../types-
|
|
3
|
-
import '../tool-
|
|
4
|
-
import '../types-
|
|
1
|
+
import { b as SkillLoader, a as SkillSet } from '../types-BT1n5oU4.js';
|
|
2
|
+
export { c as Skill, S as SkillValidationError, d as SkillValidationIssue } from '../types-BT1n5oU4.js';
|
|
3
|
+
import '../tool-sKozRXMI.js';
|
|
4
|
+
import '../types-nybevqL9.js';
|
|
5
5
|
|
|
6
6
|
declare function loadSkills(loaders: SkillLoader | SkillLoader[]): Promise<SkillSet>;
|
|
7
7
|
|
package/dist/skills/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
} from "../chunk-DC2GJDPR.js";
|
|
6
6
|
import "../chunk-CQNNSZPG.js";
|
|
7
7
|
import "../chunk-YK4WAAS4.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-4PMAWIGM.js";
|
|
9
9
|
import "../chunk-I7TM7TKX.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-R6QERZAB.js";
|
|
11
11
|
import "../chunk-WQKHFADH.js";
|
|
12
12
|
import "../chunk-YBBD4HZ3.js";
|
|
13
13
|
import "../chunk-OIMLU4SF.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
3
|
-
import { c as ToolApprovalPolicy, f as ToolCallContext, T as Tool } from './tool-
|
|
3
|
+
import { c as ToolApprovalPolicy, f as ToolCallContext, T as Tool } from './tool-sKozRXMI.js';
|
|
4
4
|
|
|
5
5
|
type CreateToolOptions<InputSchema extends ZodSchema, OutputSchema extends ZodSchema | undefined = undefined, Output = unknown> = {
|
|
6
6
|
name: string;
|