@perstack/core 0.0.34 → 0.0.35
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/src/index.d.ts +955 -970
- package/dist/src/index.js +2 -56
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,664 +1,381 @@
|
|
|
1
|
-
import { ChildProcess } from 'node:child_process';
|
|
2
1
|
import { z, ZodError, ZodSchema } from 'zod';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type: z.ZodLiteral<"builtin">;
|
|
12
|
-
skillId: z.ZodEnum<{
|
|
13
|
-
pdf: "pdf";
|
|
14
|
-
docx: "docx";
|
|
15
|
-
pptx: "pptx";
|
|
16
|
-
xlsx: "xlsx";
|
|
17
|
-
}>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
type BuiltinAnthropicSkill = z.infer<typeof builtinAnthropicSkillSchema>;
|
|
20
|
-
declare const customAnthropicSkillSchema: z.ZodObject<{
|
|
21
|
-
type: z.ZodLiteral<"custom">;
|
|
22
|
-
name: z.ZodString;
|
|
23
|
-
definition: z.ZodString;
|
|
3
|
+
/** Base properties shared by all message parts */
|
|
4
|
+
interface BasePart {
|
|
5
|
+
/** Unique identifier for this part */
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
declare const basePartSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
24
10
|
}, z.core.$strip>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
type:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
type: z.ZodLiteral<"custom">;
|
|
36
|
-
name: z.ZodString;
|
|
37
|
-
definition: z.ZodString;
|
|
38
|
-
}, z.core.$strip>], "type">;
|
|
39
|
-
type AnthropicProviderSkill = z.infer<typeof anthropicProviderSkillSchema>;
|
|
40
|
-
declare const openaiProviderToolNameSchema: z.ZodEnum<{
|
|
41
|
-
webSearch: "webSearch";
|
|
42
|
-
fileSearch: "fileSearch";
|
|
43
|
-
codeInterpreter: "codeInterpreter";
|
|
44
|
-
imageGeneration: "imageGeneration";
|
|
45
|
-
}>;
|
|
46
|
-
type OpenAIProviderToolName = z.infer<typeof openaiProviderToolNameSchema>;
|
|
47
|
-
declare const googleProviderToolNameSchema: z.ZodEnum<{
|
|
48
|
-
codeExecution: "codeExecution";
|
|
49
|
-
fileSearch: "fileSearch";
|
|
50
|
-
googleSearch: "googleSearch";
|
|
51
|
-
urlContext: "urlContext";
|
|
52
|
-
googleMaps: "googleMaps";
|
|
53
|
-
}>;
|
|
54
|
-
type GoogleProviderToolName = z.infer<typeof googleProviderToolNameSchema>;
|
|
55
|
-
declare const azureOpenAIProviderToolNameSchema: z.ZodEnum<{
|
|
56
|
-
fileSearch: "fileSearch";
|
|
57
|
-
codeInterpreter: "codeInterpreter";
|
|
58
|
-
imageGeneration: "imageGeneration";
|
|
59
|
-
webSearchPreview: "webSearchPreview";
|
|
60
|
-
}>;
|
|
61
|
-
type AzureOpenAIProviderToolName = z.infer<typeof azureOpenAIProviderToolNameSchema>;
|
|
62
|
-
declare const vertexProviderToolNameSchema: z.ZodEnum<{
|
|
63
|
-
codeExecution: "codeExecution";
|
|
64
|
-
googleSearch: "googleSearch";
|
|
65
|
-
urlContext: "urlContext";
|
|
66
|
-
googleMaps: "googleMaps";
|
|
67
|
-
enterpriseWebSearch: "enterpriseWebSearch";
|
|
68
|
-
}>;
|
|
69
|
-
type VertexProviderToolName = z.infer<typeof vertexProviderToolNameSchema>;
|
|
70
|
-
declare const webSearchOptionsSchema: z.ZodObject<{
|
|
71
|
-
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
72
|
-
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
|
+
/** Plain text content */
|
|
12
|
+
interface TextPart extends BasePart {
|
|
13
|
+
type: "textPart";
|
|
14
|
+
/** The text content */
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
declare const textPartSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
type: z.ZodLiteral<"textPart">;
|
|
20
|
+
text: z.ZodString;
|
|
73
21
|
}, z.core.$strip>;
|
|
74
|
-
|
|
75
|
-
|
|
22
|
+
/** Image referenced by URL */
|
|
23
|
+
interface ImageUrlPart extends BasePart {
|
|
24
|
+
type: "imageUrlPart";
|
|
25
|
+
/** URL to the image */
|
|
26
|
+
url: string;
|
|
27
|
+
/** MIME type of the image */
|
|
28
|
+
mimeType: string;
|
|
29
|
+
}
|
|
30
|
+
declare const imageUrlPartSchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
33
|
+
url: z.ZodURL;
|
|
34
|
+
mimeType: z.ZodString;
|
|
76
35
|
}, z.core.$strip>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
36
|
+
/** Image with base64-encoded inline data */
|
|
37
|
+
interface ImageInlinePart extends BasePart {
|
|
38
|
+
type: "imageInlinePart";
|
|
39
|
+
/** Base64-encoded image data */
|
|
40
|
+
encodedData: string;
|
|
41
|
+
/** MIME type of the image */
|
|
42
|
+
mimeType: string;
|
|
43
|
+
}
|
|
44
|
+
declare const imageInlinePartSchema: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
47
|
+
encodedData: z.ZodString;
|
|
48
|
+
mimeType: z.ZodString;
|
|
80
49
|
}, z.core.$strip>;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, z.core.$strip>>;
|
|
89
|
-
fileSearch: z.ZodOptional<z.ZodObject<{
|
|
90
|
-
vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
|
-
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
92
|
-
}, z.core.$strip>>;
|
|
93
|
-
}, z.core.$strip>>;
|
|
94
|
-
type ProviderToolOptions = z.infer<typeof providerToolOptionsSchema>;
|
|
95
|
-
declare function hasCustomProviderSkills(skills?: AnthropicProviderSkill[]): boolean;
|
|
96
|
-
|
|
97
|
-
/** MCP skill using stdio transport */
|
|
98
|
-
interface McpStdioSkill {
|
|
99
|
-
type: "mcpStdioSkill";
|
|
100
|
-
/** Skill name (derived from key) */
|
|
101
|
-
name: string;
|
|
102
|
-
/** Human-readable description */
|
|
103
|
-
description?: string;
|
|
104
|
-
/** Usage rules for the LLM */
|
|
105
|
-
rule?: string;
|
|
106
|
-
/** Tool names to include (whitelist) */
|
|
107
|
-
pick: string[];
|
|
108
|
-
/** Tool names to exclude (blacklist) */
|
|
109
|
-
omit: string[];
|
|
110
|
-
/** Command to execute (e.g., "npx") */
|
|
111
|
-
command: string;
|
|
112
|
-
/** Package name for npx/uvx */
|
|
113
|
-
packageName?: string;
|
|
114
|
-
/** Additional arguments */
|
|
115
|
-
args: string[];
|
|
116
|
-
/** Environment variables required by this skill */
|
|
117
|
-
requiredEnv: string[];
|
|
118
|
-
/** Whether to delay initialization until first use */
|
|
119
|
-
lazyInit: boolean;
|
|
50
|
+
/** Image with binary data (internal use) */
|
|
51
|
+
interface ImageBinaryPart extends BasePart {
|
|
52
|
+
type: "imageBinaryPart";
|
|
53
|
+
/** Binary data as string */
|
|
54
|
+
data: string;
|
|
55
|
+
/** MIME type of the image */
|
|
56
|
+
mimeType: string;
|
|
120
57
|
}
|
|
121
|
-
declare const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
127
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
128
|
-
command: z.ZodString;
|
|
129
|
-
packageName: z.ZodOptional<z.ZodString>;
|
|
130
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
131
|
-
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
132
|
-
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
|
+
declare const imageBinaryPartSchema: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
61
|
+
data: z.ZodString;
|
|
62
|
+
mimeType: z.ZodString;
|
|
133
63
|
}, z.core.$strip>;
|
|
134
|
-
/**
|
|
135
|
-
interface
|
|
136
|
-
type: "
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
|
|
141
|
-
/** Usage rules for the LLM */
|
|
142
|
-
rule?: string;
|
|
143
|
-
/** Tool names to include (whitelist) */
|
|
144
|
-
pick: string[];
|
|
145
|
-
/** Tool names to exclude (blacklist) */
|
|
146
|
-
omit: string[];
|
|
147
|
-
/** SSE endpoint URL */
|
|
148
|
-
endpoint: string;
|
|
64
|
+
/** File referenced by URL */
|
|
65
|
+
interface FileUrlPart extends BasePart {
|
|
66
|
+
type: "fileUrlPart";
|
|
67
|
+
/** URL to the file */
|
|
68
|
+
url: string;
|
|
69
|
+
/** MIME type of the file */
|
|
70
|
+
mimeType: string;
|
|
149
71
|
}
|
|
150
|
-
declare const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
156
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
157
|
-
endpoint: z.ZodString;
|
|
72
|
+
declare const fileUrlPartSchema: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
75
|
+
url: z.ZodString;
|
|
76
|
+
mimeType: z.ZodString;
|
|
158
77
|
}, z.core.$strip>;
|
|
159
|
-
/**
|
|
160
|
-
interface
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
inputJsonSchema: string;
|
|
78
|
+
/** File with base64-encoded inline data */
|
|
79
|
+
interface FileInlinePart extends BasePart {
|
|
80
|
+
type: "fileInlinePart";
|
|
81
|
+
/** Base64-encoded file data */
|
|
82
|
+
encodedData: string;
|
|
83
|
+
/** MIME type of the file */
|
|
84
|
+
mimeType: string;
|
|
167
85
|
}
|
|
168
|
-
declare const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
86
|
+
declare const fileInlinePartSchema: z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
89
|
+
encodedData: z.ZodString;
|
|
90
|
+
mimeType: z.ZodString;
|
|
172
91
|
}, z.core.$strip>;
|
|
173
|
-
/**
|
|
174
|
-
interface
|
|
175
|
-
type: "
|
|
176
|
-
/**
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
|
|
180
|
-
/** Usage rules for the LLM */
|
|
181
|
-
rule?: string;
|
|
182
|
-
/** Map of tool name to tool definition */
|
|
183
|
-
tools: Record<string, InteractiveTool>;
|
|
92
|
+
/** File with binary data (internal use) */
|
|
93
|
+
interface FileBinaryPart extends BasePart {
|
|
94
|
+
type: "fileBinaryPart";
|
|
95
|
+
/** Binary data as string */
|
|
96
|
+
data: string;
|
|
97
|
+
/** MIME type of the file */
|
|
98
|
+
mimeType: string;
|
|
184
99
|
}
|
|
185
|
-
declare const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
191
|
-
description: z.ZodOptional<z.ZodString>;
|
|
192
|
-
inputJsonSchema: z.ZodString;
|
|
193
|
-
}, z.core.$strip>>, z.ZodTransform<{
|
|
194
|
-
[k: string]: {
|
|
195
|
-
name: string;
|
|
196
|
-
inputJsonSchema: string;
|
|
197
|
-
description?: string | undefined;
|
|
198
|
-
};
|
|
199
|
-
}, Record<string, {
|
|
200
|
-
inputJsonSchema: string;
|
|
201
|
-
description?: string | undefined;
|
|
202
|
-
}>>>;
|
|
100
|
+
declare const fileBinaryPartSchema: z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
103
|
+
data: z.ZodString;
|
|
104
|
+
mimeType: z.ZodString;
|
|
203
105
|
}, z.core.$strip>;
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
106
|
+
/** A tool call request from the Expert */
|
|
107
|
+
interface ToolCallPart extends BasePart {
|
|
108
|
+
type: "toolCallPart";
|
|
109
|
+
/** Unique identifier for this tool call */
|
|
110
|
+
toolCallId: string;
|
|
111
|
+
/** Name of the tool to call */
|
|
112
|
+
toolName: string;
|
|
113
|
+
/** Arguments to pass to the tool */
|
|
114
|
+
args: unknown;
|
|
115
|
+
}
|
|
116
|
+
declare const toolCallPartSchema: z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
119
|
+
toolCallId: z.ZodString;
|
|
120
|
+
toolName: z.ZodString;
|
|
121
|
+
args: z.ZodUnknown;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
/** Thinking block from extended thinking / reasoning models */
|
|
124
|
+
interface ThinkingPart extends BasePart {
|
|
125
|
+
type: "thinkingPart";
|
|
126
|
+
/** The thinking content */
|
|
127
|
+
thinking: string;
|
|
128
|
+
/** Signature for redacted thinking blocks (Anthropic) */
|
|
129
|
+
signature?: string;
|
|
130
|
+
}
|
|
131
|
+
declare const thinkingPartSchema: z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
type: z.ZodLiteral<"thinkingPart">;
|
|
134
|
+
thinking: z.ZodString;
|
|
135
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
/** Result of a tool call */
|
|
138
|
+
interface ToolResultPart extends BasePart {
|
|
139
|
+
type: "toolResultPart";
|
|
140
|
+
/** ID of the tool call this result corresponds to */
|
|
141
|
+
toolCallId: string;
|
|
142
|
+
/** Name of the tool that was called */
|
|
143
|
+
toolName: string;
|
|
144
|
+
/** Content of the tool result */
|
|
145
|
+
contents: (TextPart | ImageInlinePart | FileInlinePart)[];
|
|
146
|
+
/** Whether the tool call resulted in an error */
|
|
147
|
+
isError?: boolean;
|
|
148
|
+
}
|
|
149
|
+
declare const toolResultPartSchema: z.ZodObject<{
|
|
150
|
+
id: z.ZodString;
|
|
151
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
152
|
+
toolCallId: z.ZodString;
|
|
153
|
+
toolName: z.ZodString;
|
|
154
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
155
|
+
id: z.ZodString;
|
|
156
|
+
type: z.ZodLiteral<"textPart">;
|
|
157
|
+
text: z.ZodString;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
id: z.ZodString;
|
|
160
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
161
|
+
encodedData: z.ZodString;
|
|
162
|
+
mimeType: z.ZodString;
|
|
163
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
166
|
+
encodedData: z.ZodString;
|
|
167
|
+
mimeType: z.ZodString;
|
|
168
|
+
}, z.core.$strip>]>>;
|
|
169
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
/** All possible message part types */
|
|
172
|
+
type MessagePart = TextPart | ImageUrlPart | ImageInlinePart | ImageBinaryPart | FileUrlPart | FileInlinePart | FileBinaryPart | ToolCallPart | ToolResultPart | ThinkingPart;
|
|
173
|
+
declare const messagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
type: z.ZodLiteral<"textPart">;
|
|
176
|
+
text: z.ZodString;
|
|
218
177
|
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
224
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
225
|
-
endpoint: z.ZodString;
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
180
|
+
url: z.ZodURL;
|
|
181
|
+
mimeType: z.ZodString;
|
|
226
182
|
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
185
|
+
encodedData: z.ZodString;
|
|
186
|
+
mimeType: z.ZodString;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
190
|
+
data: z.ZodString;
|
|
191
|
+
mimeType: z.ZodString;
|
|
192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
195
|
+
url: z.ZodString;
|
|
196
|
+
mimeType: z.ZodString;
|
|
197
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
198
|
+
id: z.ZodString;
|
|
199
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
200
|
+
encodedData: z.ZodString;
|
|
201
|
+
mimeType: z.ZodString;
|
|
202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
+
id: z.ZodString;
|
|
204
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
205
|
+
data: z.ZodString;
|
|
206
|
+
mimeType: z.ZodString;
|
|
207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
210
|
+
toolCallId: z.ZodString;
|
|
211
|
+
toolName: z.ZodString;
|
|
212
|
+
args: z.ZodUnknown;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
id: z.ZodString;
|
|
215
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
216
|
+
toolCallId: z.ZodString;
|
|
217
|
+
toolName: z.ZodString;
|
|
218
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
219
|
+
id: z.ZodString;
|
|
220
|
+
type: z.ZodLiteral<"textPart">;
|
|
221
|
+
text: z.ZodString;
|
|
222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
+
id: z.ZodString;
|
|
224
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
225
|
+
encodedData: z.ZodString;
|
|
226
|
+
mimeType: z.ZodString;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
230
|
+
encodedData: z.ZodString;
|
|
231
|
+
mimeType: z.ZodString;
|
|
232
|
+
}, z.core.$strip>]>>;
|
|
233
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
id: z.ZodString;
|
|
236
|
+
type: z.ZodLiteral<"thinkingPart">;
|
|
237
|
+
thinking: z.ZodString;
|
|
238
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
244
239
|
}, z.core.$strip>], "type">;
|
|
245
240
|
|
|
246
|
-
/**
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
interface Expert {
|
|
251
|
-
/** Unique key identifying this Expert (e.g., "my-expert" or "my-expert@1.0.0") */
|
|
252
|
-
key: string;
|
|
253
|
-
/** Display name for the Expert */
|
|
254
|
-
name: string;
|
|
255
|
-
/** Semantic version string */
|
|
256
|
-
version: string;
|
|
257
|
-
/** Human-readable description of what this Expert does */
|
|
258
|
-
description?: string;
|
|
259
|
-
/** System instruction defining the Expert's behavior */
|
|
260
|
-
instruction: string;
|
|
261
|
-
/** Map of skill name to skill configuration */
|
|
262
|
-
skills: Record<string, Skill>;
|
|
263
|
-
/** List of Expert keys this Expert can delegate to */
|
|
264
|
-
delegates: string[];
|
|
265
|
-
/** Tags for categorization and discovery */
|
|
266
|
-
tags: string[];
|
|
267
|
-
/** Provider-specific tool names to enable (e.g., "webSearch", "codeExecution") */
|
|
268
|
-
providerTools?: string[];
|
|
269
|
-
/** Anthropic Agent Skills configuration */
|
|
270
|
-
providerSkills?: AnthropicProviderSkill[];
|
|
271
|
-
/** Provider tool options (e.g., webSearch maxUses, allowedDomains) */
|
|
272
|
-
providerToolOptions?: ProviderToolOptions;
|
|
241
|
+
/** Base properties shared by all messages */
|
|
242
|
+
interface BaseMessage {
|
|
243
|
+
/** Unique identifier for this message */
|
|
244
|
+
id: string;
|
|
273
245
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
282
|
-
description: z.ZodOptional<z.ZodString>;
|
|
283
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
284
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
285
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
286
|
-
command: z.ZodString;
|
|
287
|
-
packageName: z.ZodOptional<z.ZodString>;
|
|
288
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
289
|
-
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
290
|
-
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
291
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
-
type: z.ZodLiteral<"mcpSseSkill">;
|
|
293
|
-
description: z.ZodOptional<z.ZodString>;
|
|
294
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
295
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
296
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
297
|
-
endpoint: z.ZodString;
|
|
298
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
299
|
-
type: z.ZodLiteral<"interactiveSkill">;
|
|
300
|
-
description: z.ZodOptional<z.ZodString>;
|
|
301
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
302
|
-
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
303
|
-
description: z.ZodOptional<z.ZodString>;
|
|
304
|
-
inputJsonSchema: z.ZodString;
|
|
305
|
-
}, z.core.$strip>>, z.ZodTransform<{
|
|
306
|
-
[k: string]: {
|
|
307
|
-
name: string;
|
|
308
|
-
inputJsonSchema: string;
|
|
309
|
-
description?: string | undefined;
|
|
310
|
-
};
|
|
311
|
-
}, Record<string, {
|
|
312
|
-
inputJsonSchema: string;
|
|
313
|
-
description?: string | undefined;
|
|
314
|
-
}>>>;
|
|
315
|
-
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
316
|
-
[k: string]: {
|
|
317
|
-
type: "mcpStdioSkill";
|
|
318
|
-
name: string;
|
|
319
|
-
pick: string[];
|
|
320
|
-
omit: string[];
|
|
321
|
-
command: string;
|
|
322
|
-
args: string[];
|
|
323
|
-
requiredEnv: string[];
|
|
324
|
-
lazyInit: boolean;
|
|
325
|
-
description?: string | undefined;
|
|
326
|
-
rule?: string | undefined;
|
|
327
|
-
packageName?: string | undefined;
|
|
328
|
-
} | {
|
|
329
|
-
type: "mcpSseSkill";
|
|
330
|
-
name: string;
|
|
331
|
-
pick: string[];
|
|
332
|
-
omit: string[];
|
|
333
|
-
endpoint: string;
|
|
334
|
-
description?: string | undefined;
|
|
335
|
-
rule?: string | undefined;
|
|
336
|
-
} | {
|
|
337
|
-
type: "interactiveSkill";
|
|
338
|
-
name: string;
|
|
339
|
-
tools: {
|
|
340
|
-
[k: string]: {
|
|
341
|
-
name: string;
|
|
342
|
-
inputJsonSchema: string;
|
|
343
|
-
description?: string | undefined;
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
description?: string | undefined;
|
|
347
|
-
rule?: string | undefined;
|
|
348
|
-
};
|
|
349
|
-
}, Record<string, {
|
|
350
|
-
type: "mcpStdioSkill";
|
|
351
|
-
pick: string[];
|
|
352
|
-
omit: string[];
|
|
353
|
-
command: string;
|
|
354
|
-
args: string[];
|
|
355
|
-
requiredEnv: string[];
|
|
356
|
-
lazyInit: boolean;
|
|
357
|
-
description?: string | undefined;
|
|
358
|
-
rule?: string | undefined;
|
|
359
|
-
packageName?: string | undefined;
|
|
360
|
-
} | {
|
|
361
|
-
type: "mcpSseSkill";
|
|
362
|
-
pick: string[];
|
|
363
|
-
omit: string[];
|
|
364
|
-
endpoint: string;
|
|
365
|
-
description?: string | undefined;
|
|
366
|
-
rule?: string | undefined;
|
|
367
|
-
} | {
|
|
368
|
-
type: "interactiveSkill";
|
|
369
|
-
tools: {
|
|
370
|
-
[k: string]: {
|
|
371
|
-
name: string;
|
|
372
|
-
inputJsonSchema: string;
|
|
373
|
-
description?: string | undefined;
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
description?: string | undefined;
|
|
377
|
-
rule?: string | undefined;
|
|
378
|
-
}>>>;
|
|
379
|
-
delegates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
380
|
-
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
381
|
-
providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
382
|
-
providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
383
|
-
type: z.ZodLiteral<"builtin">;
|
|
384
|
-
skillId: z.ZodEnum<{
|
|
385
|
-
pdf: "pdf";
|
|
386
|
-
docx: "docx";
|
|
387
|
-
pptx: "pptx";
|
|
388
|
-
xlsx: "xlsx";
|
|
389
|
-
}>;
|
|
390
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
391
|
-
type: z.ZodLiteral<"custom">;
|
|
392
|
-
name: z.ZodString;
|
|
393
|
-
definition: z.ZodString;
|
|
394
|
-
}, z.core.$strip>], "type">>>;
|
|
395
|
-
providerToolOptions: z.ZodOptional<z.ZodObject<{
|
|
396
|
-
webSearch: z.ZodOptional<z.ZodObject<{
|
|
397
|
-
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
398
|
-
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
399
|
-
}, z.core.$strip>>;
|
|
400
|
-
webFetch: z.ZodOptional<z.ZodObject<{
|
|
401
|
-
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
402
|
-
}, z.core.$strip>>;
|
|
403
|
-
fileSearch: z.ZodOptional<z.ZodObject<{
|
|
404
|
-
vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
405
|
-
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
406
|
-
}, z.core.$strip>>;
|
|
407
|
-
}, z.core.$strip>>;
|
|
408
|
-
}, z.core.$strip>;
|
|
409
|
-
|
|
410
|
-
/** Base properties shared by all message parts */
|
|
411
|
-
interface BasePart {
|
|
412
|
-
/** Unique identifier for this part */
|
|
413
|
-
id: string;
|
|
246
|
+
/** System instruction message sent at the start of a conversation */
|
|
247
|
+
interface InstructionMessage extends BaseMessage {
|
|
248
|
+
type: "instructionMessage";
|
|
249
|
+
/** Text content of the instruction */
|
|
250
|
+
contents: TextPart[];
|
|
251
|
+
/** Whether to cache this message for prompt caching */
|
|
252
|
+
cache?: boolean;
|
|
414
253
|
}
|
|
415
|
-
declare const
|
|
254
|
+
declare const instructionMessageSchema: z.ZodObject<{
|
|
416
255
|
id: z.ZodString;
|
|
256
|
+
type: z.ZodLiteral<"instructionMessage">;
|
|
257
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
type: z.ZodLiteral<"textPart">;
|
|
260
|
+
text: z.ZodString;
|
|
261
|
+
}, z.core.$strip>>;
|
|
262
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
417
263
|
}, z.core.$strip>;
|
|
418
|
-
/**
|
|
419
|
-
interface
|
|
420
|
-
type: "
|
|
421
|
-
/**
|
|
422
|
-
|
|
264
|
+
/** Message from the user (human or system providing input) */
|
|
265
|
+
interface UserMessage extends BaseMessage {
|
|
266
|
+
type: "userMessage";
|
|
267
|
+
/** Content of the user message (text, images, or files) */
|
|
268
|
+
contents: (TextPart | ImageUrlPart | ImageInlinePart | ImageBinaryPart | FileUrlPart | FileInlinePart | FileBinaryPart)[];
|
|
269
|
+
/** Whether to cache this message for prompt caching */
|
|
270
|
+
cache?: boolean;
|
|
423
271
|
}
|
|
424
|
-
declare const
|
|
272
|
+
declare const userMessageSchema: z.ZodObject<{
|
|
425
273
|
id: z.ZodString;
|
|
426
|
-
type: z.ZodLiteral<"
|
|
427
|
-
|
|
274
|
+
type: z.ZodLiteral<"userMessage">;
|
|
275
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
276
|
+
id: z.ZodString;
|
|
277
|
+
type: z.ZodLiteral<"textPart">;
|
|
278
|
+
text: z.ZodString;
|
|
279
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
282
|
+
url: z.ZodURL;
|
|
283
|
+
mimeType: z.ZodString;
|
|
284
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
285
|
+
id: z.ZodString;
|
|
286
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
287
|
+
encodedData: z.ZodString;
|
|
288
|
+
mimeType: z.ZodString;
|
|
289
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
290
|
+
id: z.ZodString;
|
|
291
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
292
|
+
data: z.ZodString;
|
|
293
|
+
mimeType: z.ZodString;
|
|
294
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
297
|
+
url: z.ZodString;
|
|
298
|
+
mimeType: z.ZodString;
|
|
299
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
302
|
+
encodedData: z.ZodString;
|
|
303
|
+
mimeType: z.ZodString;
|
|
304
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
305
|
+
id: z.ZodString;
|
|
306
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
307
|
+
data: z.ZodString;
|
|
308
|
+
mimeType: z.ZodString;
|
|
309
|
+
}, z.core.$strip>]>>;
|
|
310
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
428
311
|
}, z.core.$strip>;
|
|
429
|
-
/**
|
|
430
|
-
interface
|
|
431
|
-
type: "
|
|
432
|
-
/**
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
|
|
312
|
+
/** Message generated by the Expert (LLM response) */
|
|
313
|
+
interface ExpertMessage extends BaseMessage {
|
|
314
|
+
type: "expertMessage";
|
|
315
|
+
/** Content generated by the Expert (text, tool calls, or thinking) */
|
|
316
|
+
contents: (TextPart | ToolCallPart | ThinkingPart)[];
|
|
317
|
+
/** Whether to cache this message for prompt caching */
|
|
318
|
+
cache?: boolean;
|
|
436
319
|
}
|
|
437
|
-
declare const
|
|
320
|
+
declare const expertMessageSchema: z.ZodObject<{
|
|
438
321
|
id: z.ZodString;
|
|
439
|
-
type: z.ZodLiteral<"
|
|
440
|
-
|
|
441
|
-
|
|
322
|
+
type: z.ZodLiteral<"expertMessage">;
|
|
323
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
324
|
+
id: z.ZodString;
|
|
325
|
+
type: z.ZodLiteral<"textPart">;
|
|
326
|
+
text: z.ZodString;
|
|
327
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
328
|
+
id: z.ZodString;
|
|
329
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
330
|
+
toolCallId: z.ZodString;
|
|
331
|
+
toolName: z.ZodString;
|
|
332
|
+
args: z.ZodUnknown;
|
|
333
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
334
|
+
id: z.ZodString;
|
|
335
|
+
type: z.ZodLiteral<"thinkingPart">;
|
|
336
|
+
thinking: z.ZodString;
|
|
337
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>]>>;
|
|
339
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
442
340
|
}, z.core.$strip>;
|
|
443
|
-
/**
|
|
444
|
-
interface
|
|
445
|
-
type: "
|
|
446
|
-
/**
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
|
|
341
|
+
/** Message containing tool execution results */
|
|
342
|
+
interface ToolMessage extends BaseMessage {
|
|
343
|
+
type: "toolMessage";
|
|
344
|
+
/** Tool result contents */
|
|
345
|
+
contents: ToolResultPart[];
|
|
346
|
+
/** Whether to cache this message for prompt caching */
|
|
347
|
+
cache?: boolean;
|
|
450
348
|
}
|
|
451
|
-
declare const
|
|
349
|
+
declare const toolMessageSchema: z.ZodObject<{
|
|
452
350
|
id: z.ZodString;
|
|
453
|
-
type: z.ZodLiteral<"
|
|
454
|
-
|
|
455
|
-
|
|
351
|
+
type: z.ZodLiteral<"toolMessage">;
|
|
352
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
353
|
+
id: z.ZodString;
|
|
354
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
355
|
+
toolCallId: z.ZodString;
|
|
356
|
+
toolName: z.ZodString;
|
|
357
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
358
|
+
id: z.ZodString;
|
|
359
|
+
type: z.ZodLiteral<"textPart">;
|
|
360
|
+
text: z.ZodString;
|
|
361
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
362
|
+
id: z.ZodString;
|
|
363
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
364
|
+
encodedData: z.ZodString;
|
|
365
|
+
mimeType: z.ZodString;
|
|
366
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
367
|
+
id: z.ZodString;
|
|
368
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
369
|
+
encodedData: z.ZodString;
|
|
370
|
+
mimeType: z.ZodString;
|
|
371
|
+
}, z.core.$strip>]>>;
|
|
372
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
373
|
+
}, z.core.$strip>>;
|
|
374
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
456
375
|
}, z.core.$strip>;
|
|
457
|
-
/**
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
/** Binary data as string */
|
|
461
|
-
data: string;
|
|
462
|
-
/** MIME type of the image */
|
|
463
|
-
mimeType: string;
|
|
464
|
-
}
|
|
465
|
-
declare const imageBinaryPartSchema: z.ZodObject<{
|
|
466
|
-
id: z.ZodString;
|
|
467
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
468
|
-
data: z.ZodString;
|
|
469
|
-
mimeType: z.ZodString;
|
|
470
|
-
}, z.core.$strip>;
|
|
471
|
-
/** File referenced by URL */
|
|
472
|
-
interface FileUrlPart extends BasePart {
|
|
473
|
-
type: "fileUrlPart";
|
|
474
|
-
/** URL to the file */
|
|
475
|
-
url: string;
|
|
476
|
-
/** MIME type of the file */
|
|
477
|
-
mimeType: string;
|
|
478
|
-
}
|
|
479
|
-
declare const fileUrlPartSchema: z.ZodObject<{
|
|
480
|
-
id: z.ZodString;
|
|
481
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
482
|
-
url: z.ZodString;
|
|
483
|
-
mimeType: z.ZodString;
|
|
484
|
-
}, z.core.$strip>;
|
|
485
|
-
/** File with base64-encoded inline data */
|
|
486
|
-
interface FileInlinePart extends BasePart {
|
|
487
|
-
type: "fileInlinePart";
|
|
488
|
-
/** Base64-encoded file data */
|
|
489
|
-
encodedData: string;
|
|
490
|
-
/** MIME type of the file */
|
|
491
|
-
mimeType: string;
|
|
492
|
-
}
|
|
493
|
-
declare const fileInlinePartSchema: z.ZodObject<{
|
|
494
|
-
id: z.ZodString;
|
|
495
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
496
|
-
encodedData: z.ZodString;
|
|
497
|
-
mimeType: z.ZodString;
|
|
498
|
-
}, z.core.$strip>;
|
|
499
|
-
/** File with binary data (internal use) */
|
|
500
|
-
interface FileBinaryPart extends BasePart {
|
|
501
|
-
type: "fileBinaryPart";
|
|
502
|
-
/** Binary data as string */
|
|
503
|
-
data: string;
|
|
504
|
-
/** MIME type of the file */
|
|
505
|
-
mimeType: string;
|
|
506
|
-
}
|
|
507
|
-
declare const fileBinaryPartSchema: z.ZodObject<{
|
|
508
|
-
id: z.ZodString;
|
|
509
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
510
|
-
data: z.ZodString;
|
|
511
|
-
mimeType: z.ZodString;
|
|
512
|
-
}, z.core.$strip>;
|
|
513
|
-
/** A tool call request from the Expert */
|
|
514
|
-
interface ToolCallPart extends BasePart {
|
|
515
|
-
type: "toolCallPart";
|
|
516
|
-
/** Unique identifier for this tool call */
|
|
517
|
-
toolCallId: string;
|
|
518
|
-
/** Name of the tool to call */
|
|
519
|
-
toolName: string;
|
|
520
|
-
/** Arguments to pass to the tool */
|
|
521
|
-
args: unknown;
|
|
522
|
-
}
|
|
523
|
-
declare const toolCallPartSchema: z.ZodObject<{
|
|
524
|
-
id: z.ZodString;
|
|
525
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
526
|
-
toolCallId: z.ZodString;
|
|
527
|
-
toolName: z.ZodString;
|
|
528
|
-
args: z.ZodUnknown;
|
|
529
|
-
}, z.core.$strip>;
|
|
530
|
-
/** Thinking block from extended thinking / reasoning models */
|
|
531
|
-
interface ThinkingPart extends BasePart {
|
|
532
|
-
type: "thinkingPart";
|
|
533
|
-
/** The thinking content */
|
|
534
|
-
thinking: string;
|
|
535
|
-
/** Signature for redacted thinking blocks (Anthropic) */
|
|
536
|
-
signature?: string;
|
|
537
|
-
}
|
|
538
|
-
declare const thinkingPartSchema: z.ZodObject<{
|
|
539
|
-
id: z.ZodString;
|
|
540
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
541
|
-
thinking: z.ZodString;
|
|
542
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
543
|
-
}, z.core.$strip>;
|
|
544
|
-
/** Result of a tool call */
|
|
545
|
-
interface ToolResultPart extends BasePart {
|
|
546
|
-
type: "toolResultPart";
|
|
547
|
-
/** ID of the tool call this result corresponds to */
|
|
548
|
-
toolCallId: string;
|
|
549
|
-
/** Name of the tool that was called */
|
|
550
|
-
toolName: string;
|
|
551
|
-
/** Content of the tool result */
|
|
552
|
-
contents: (TextPart | ImageInlinePart | FileInlinePart)[];
|
|
553
|
-
/** Whether the tool call resulted in an error */
|
|
554
|
-
isError?: boolean;
|
|
555
|
-
}
|
|
556
|
-
declare const toolResultPartSchema: z.ZodObject<{
|
|
557
|
-
id: z.ZodString;
|
|
558
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
559
|
-
toolCallId: z.ZodString;
|
|
560
|
-
toolName: z.ZodString;
|
|
561
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
562
|
-
id: z.ZodString;
|
|
563
|
-
type: z.ZodLiteral<"textPart">;
|
|
564
|
-
text: z.ZodString;
|
|
565
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
566
|
-
id: z.ZodString;
|
|
567
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
568
|
-
encodedData: z.ZodString;
|
|
569
|
-
mimeType: z.ZodString;
|
|
570
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
-
id: z.ZodString;
|
|
572
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
573
|
-
encodedData: z.ZodString;
|
|
574
|
-
mimeType: z.ZodString;
|
|
575
|
-
}, z.core.$strip>]>>;
|
|
576
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
577
|
-
}, z.core.$strip>;
|
|
578
|
-
/** All possible message part types */
|
|
579
|
-
type MessagePart = TextPart | ImageUrlPart | ImageInlinePart | ImageBinaryPart | FileUrlPart | FileInlinePart | FileBinaryPart | ToolCallPart | ToolResultPart | ThinkingPart;
|
|
580
|
-
declare const messagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
581
|
-
id: z.ZodString;
|
|
582
|
-
type: z.ZodLiteral<"textPart">;
|
|
583
|
-
text: z.ZodString;
|
|
584
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
585
|
-
id: z.ZodString;
|
|
586
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
587
|
-
url: z.ZodURL;
|
|
588
|
-
mimeType: z.ZodString;
|
|
589
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
590
|
-
id: z.ZodString;
|
|
591
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
592
|
-
encodedData: z.ZodString;
|
|
593
|
-
mimeType: z.ZodString;
|
|
594
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
595
|
-
id: z.ZodString;
|
|
596
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
597
|
-
data: z.ZodString;
|
|
598
|
-
mimeType: z.ZodString;
|
|
599
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
600
|
-
id: z.ZodString;
|
|
601
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
602
|
-
url: z.ZodString;
|
|
603
|
-
mimeType: z.ZodString;
|
|
604
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
605
|
-
id: z.ZodString;
|
|
606
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
607
|
-
encodedData: z.ZodString;
|
|
608
|
-
mimeType: z.ZodString;
|
|
609
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
610
|
-
id: z.ZodString;
|
|
611
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
612
|
-
data: z.ZodString;
|
|
613
|
-
mimeType: z.ZodString;
|
|
614
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
615
|
-
id: z.ZodString;
|
|
616
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
617
|
-
toolCallId: z.ZodString;
|
|
618
|
-
toolName: z.ZodString;
|
|
619
|
-
args: z.ZodUnknown;
|
|
620
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
621
|
-
id: z.ZodString;
|
|
622
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
623
|
-
toolCallId: z.ZodString;
|
|
624
|
-
toolName: z.ZodString;
|
|
625
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
626
|
-
id: z.ZodString;
|
|
627
|
-
type: z.ZodLiteral<"textPart">;
|
|
628
|
-
text: z.ZodString;
|
|
629
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
630
|
-
id: z.ZodString;
|
|
631
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
632
|
-
encodedData: z.ZodString;
|
|
633
|
-
mimeType: z.ZodString;
|
|
634
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
635
|
-
id: z.ZodString;
|
|
636
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
637
|
-
encodedData: z.ZodString;
|
|
638
|
-
mimeType: z.ZodString;
|
|
639
|
-
}, z.core.$strip>]>>;
|
|
640
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
641
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
642
|
-
id: z.ZodString;
|
|
643
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
644
|
-
thinking: z.ZodString;
|
|
645
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
646
|
-
}, z.core.$strip>], "type">;
|
|
647
|
-
|
|
648
|
-
/** Base properties shared by all messages */
|
|
649
|
-
interface BaseMessage {
|
|
650
|
-
/** Unique identifier for this message */
|
|
651
|
-
id: string;
|
|
652
|
-
}
|
|
653
|
-
/** System instruction message sent at the start of a conversation */
|
|
654
|
-
interface InstructionMessage extends BaseMessage {
|
|
655
|
-
type: "instructionMessage";
|
|
656
|
-
/** Text content of the instruction */
|
|
657
|
-
contents: TextPart[];
|
|
658
|
-
/** Whether to cache this message for prompt caching */
|
|
659
|
-
cache?: boolean;
|
|
660
|
-
}
|
|
661
|
-
declare const instructionMessageSchema: z.ZodObject<{
|
|
376
|
+
/** All possible message types */
|
|
377
|
+
type Message = InstructionMessage | UserMessage | ExpertMessage | ToolMessage;
|
|
378
|
+
declare const messageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
662
379
|
id: z.ZodString;
|
|
663
380
|
type: z.ZodLiteral<"instructionMessage">;
|
|
664
381
|
contents: z.ZodArray<z.ZodObject<{
|
|
@@ -667,16 +384,7 @@ declare const instructionMessageSchema: z.ZodObject<{
|
|
|
667
384
|
text: z.ZodString;
|
|
668
385
|
}, z.core.$strip>>;
|
|
669
386
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
670
|
-
}, z.core.$strip
|
|
671
|
-
/** Message from the user (human or system providing input) */
|
|
672
|
-
interface UserMessage extends BaseMessage {
|
|
673
|
-
type: "userMessage";
|
|
674
|
-
/** Content of the user message (text, images, or files) */
|
|
675
|
-
contents: (TextPart | ImageUrlPart | ImageInlinePart | ImageBinaryPart | FileUrlPart | FileInlinePart | FileBinaryPart)[];
|
|
676
|
-
/** Whether to cache this message for prompt caching */
|
|
677
|
-
cache?: boolean;
|
|
678
|
-
}
|
|
679
|
-
declare const userMessageSchema: z.ZodObject<{
|
|
387
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
680
388
|
id: z.ZodString;
|
|
681
389
|
type: z.ZodLiteral<"userMessage">;
|
|
682
390
|
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -715,16 +423,7 @@ declare const userMessageSchema: z.ZodObject<{
|
|
|
715
423
|
mimeType: z.ZodString;
|
|
716
424
|
}, z.core.$strip>]>>;
|
|
717
425
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
718
|
-
}, z.core.$strip
|
|
719
|
-
/** Message generated by the Expert (LLM response) */
|
|
720
|
-
interface ExpertMessage extends BaseMessage {
|
|
721
|
-
type: "expertMessage";
|
|
722
|
-
/** Content generated by the Expert (text, tool calls, or thinking) */
|
|
723
|
-
contents: (TextPart | ToolCallPart | ThinkingPart)[];
|
|
724
|
-
/** Whether to cache this message for prompt caching */
|
|
725
|
-
cache?: boolean;
|
|
726
|
-
}
|
|
727
|
-
declare const expertMessageSchema: z.ZodObject<{
|
|
426
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
728
427
|
id: z.ZodString;
|
|
729
428
|
type: z.ZodLiteral<"expertMessage">;
|
|
730
429
|
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -744,113 +443,7 @@ declare const expertMessageSchema: z.ZodObject<{
|
|
|
744
443
|
signature: z.ZodOptional<z.ZodString>;
|
|
745
444
|
}, z.core.$strip>]>>;
|
|
746
445
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
747
|
-
}, z.core.$strip
|
|
748
|
-
/** Message containing tool execution results */
|
|
749
|
-
interface ToolMessage extends BaseMessage {
|
|
750
|
-
type: "toolMessage";
|
|
751
|
-
/** Tool result contents */
|
|
752
|
-
contents: ToolResultPart[];
|
|
753
|
-
/** Whether to cache this message for prompt caching */
|
|
754
|
-
cache?: boolean;
|
|
755
|
-
}
|
|
756
|
-
declare const toolMessageSchema: z.ZodObject<{
|
|
757
|
-
id: z.ZodString;
|
|
758
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
759
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
760
|
-
id: z.ZodString;
|
|
761
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
762
|
-
toolCallId: z.ZodString;
|
|
763
|
-
toolName: z.ZodString;
|
|
764
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
765
|
-
id: z.ZodString;
|
|
766
|
-
type: z.ZodLiteral<"textPart">;
|
|
767
|
-
text: z.ZodString;
|
|
768
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
769
|
-
id: z.ZodString;
|
|
770
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
771
|
-
encodedData: z.ZodString;
|
|
772
|
-
mimeType: z.ZodString;
|
|
773
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
774
|
-
id: z.ZodString;
|
|
775
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
776
|
-
encodedData: z.ZodString;
|
|
777
|
-
mimeType: z.ZodString;
|
|
778
|
-
}, z.core.$strip>]>>;
|
|
779
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
780
|
-
}, z.core.$strip>>;
|
|
781
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
782
|
-
}, z.core.$strip>;
|
|
783
|
-
/** All possible message types */
|
|
784
|
-
type Message = InstructionMessage | UserMessage | ExpertMessage | ToolMessage;
|
|
785
|
-
declare const messageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
786
|
-
id: z.ZodString;
|
|
787
|
-
type: z.ZodLiteral<"instructionMessage">;
|
|
788
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
789
|
-
id: z.ZodString;
|
|
790
|
-
type: z.ZodLiteral<"textPart">;
|
|
791
|
-
text: z.ZodString;
|
|
792
|
-
}, z.core.$strip>>;
|
|
793
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
794
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
795
|
-
id: z.ZodString;
|
|
796
|
-
type: z.ZodLiteral<"userMessage">;
|
|
797
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
798
|
-
id: z.ZodString;
|
|
799
|
-
type: z.ZodLiteral<"textPart">;
|
|
800
|
-
text: z.ZodString;
|
|
801
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
802
|
-
id: z.ZodString;
|
|
803
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
804
|
-
url: z.ZodURL;
|
|
805
|
-
mimeType: z.ZodString;
|
|
806
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
807
|
-
id: z.ZodString;
|
|
808
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
809
|
-
encodedData: z.ZodString;
|
|
810
|
-
mimeType: z.ZodString;
|
|
811
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
812
|
-
id: z.ZodString;
|
|
813
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
814
|
-
data: z.ZodString;
|
|
815
|
-
mimeType: z.ZodString;
|
|
816
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
817
|
-
id: z.ZodString;
|
|
818
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
819
|
-
url: z.ZodString;
|
|
820
|
-
mimeType: z.ZodString;
|
|
821
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
822
|
-
id: z.ZodString;
|
|
823
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
824
|
-
encodedData: z.ZodString;
|
|
825
|
-
mimeType: z.ZodString;
|
|
826
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
827
|
-
id: z.ZodString;
|
|
828
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
829
|
-
data: z.ZodString;
|
|
830
|
-
mimeType: z.ZodString;
|
|
831
|
-
}, z.core.$strip>]>>;
|
|
832
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
833
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
834
|
-
id: z.ZodString;
|
|
835
|
-
type: z.ZodLiteral<"expertMessage">;
|
|
836
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
837
|
-
id: z.ZodString;
|
|
838
|
-
type: z.ZodLiteral<"textPart">;
|
|
839
|
-
text: z.ZodString;
|
|
840
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
841
|
-
id: z.ZodString;
|
|
842
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
843
|
-
toolCallId: z.ZodString;
|
|
844
|
-
toolName: z.ZodString;
|
|
845
|
-
args: z.ZodUnknown;
|
|
846
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
847
|
-
id: z.ZodString;
|
|
848
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
849
|
-
thinking: z.ZodString;
|
|
850
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
851
|
-
}, z.core.$strip>]>>;
|
|
852
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
853
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
854
447
|
id: z.ZodString;
|
|
855
448
|
type: z.ZodLiteral<"toolMessage">;
|
|
856
449
|
contents: z.ZodArray<z.ZodObject<{
|
|
@@ -1197,161 +790,567 @@ declare const checkpointSchema: z.ZodObject<{
|
|
|
1197
790
|
}, z.core.$strip>]>>;
|
|
1198
791
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1199
792
|
}, z.core.$strip>, z.ZodObject<{
|
|
1200
|
-
id: z.ZodString;
|
|
1201
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
1202
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
1203
|
-
id: z.ZodString;
|
|
1204
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
1205
|
-
toolCallId: z.ZodString;
|
|
1206
|
-
toolName: z.ZodString;
|
|
1207
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1208
|
-
id: z.ZodString;
|
|
1209
|
-
type: z.ZodLiteral<"textPart">;
|
|
1210
|
-
text: z.ZodString;
|
|
1211
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1212
|
-
id: z.ZodString;
|
|
1213
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
1214
|
-
encodedData: z.ZodString;
|
|
1215
|
-
mimeType: z.ZodString;
|
|
1216
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1217
|
-
id: z.ZodString;
|
|
1218
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
1219
|
-
encodedData: z.ZodString;
|
|
1220
|
-
mimeType: z.ZodString;
|
|
1221
|
-
}, z.core.$strip>]>>;
|
|
1222
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
1223
|
-
}, z.core.$strip>>;
|
|
1224
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1225
|
-
}, z.core.$strip>]>>;
|
|
1226
|
-
expert: z.ZodObject<{
|
|
1227
|
-
key: z.ZodString;
|
|
1228
|
-
name: z.ZodString;
|
|
1229
|
-
version: z.ZodString;
|
|
1230
|
-
}, z.core.$strip>;
|
|
1231
|
-
delegateTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1232
|
-
expert: z.ZodObject<{
|
|
1233
|
-
key: z.ZodString;
|
|
1234
|
-
name: z.ZodString;
|
|
1235
|
-
version: z.ZodString;
|
|
1236
|
-
}, z.core.$strip>;
|
|
1237
|
-
toolCallId: z.ZodString;
|
|
1238
|
-
toolName: z.ZodString;
|
|
1239
|
-
query: z.ZodString;
|
|
1240
|
-
}, z.core.$strip>>>;
|
|
1241
|
-
delegatedBy: z.ZodOptional<z.ZodObject<{
|
|
1242
|
-
expert: z.ZodObject<{
|
|
1243
|
-
key: z.ZodString;
|
|
1244
|
-
name: z.ZodString;
|
|
1245
|
-
version: z.ZodString;
|
|
1246
|
-
}, z.core.$strip>;
|
|
1247
|
-
toolCallId: z.ZodString;
|
|
1248
|
-
toolName: z.ZodString;
|
|
1249
|
-
checkpointId: z.ZodString;
|
|
1250
|
-
runId: z.ZodString;
|
|
1251
|
-
}, z.core.$strip>>;
|
|
1252
|
-
usage: z.ZodObject<{
|
|
1253
|
-
inputTokens: z.ZodNumber;
|
|
1254
|
-
outputTokens: z.ZodNumber;
|
|
1255
|
-
reasoningTokens: z.ZodNumber;
|
|
1256
|
-
totalTokens: z.ZodNumber;
|
|
1257
|
-
cachedInputTokens: z.ZodNumber;
|
|
1258
|
-
}, z.core.$strip>;
|
|
1259
|
-
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
1260
|
-
contextWindowUsage: z.ZodOptional<z.ZodNumber>;
|
|
1261
|
-
pendingToolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1262
|
-
id: z.ZodString;
|
|
1263
|
-
skillName: z.ZodString;
|
|
1264
|
-
toolName: z.ZodString;
|
|
1265
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1266
|
-
}, z.core.$strip>>>;
|
|
1267
|
-
partialToolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1268
|
-
id: z.ZodString;
|
|
1269
|
-
skillName: z.ZodString;
|
|
1270
|
-
toolName: z.ZodString;
|
|
1271
|
-
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1272
|
-
id: z.ZodString;
|
|
1273
|
-
type: z.ZodLiteral<"textPart">;
|
|
1274
|
-
text: z.ZodString;
|
|
1275
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1276
|
-
id: z.ZodString;
|
|
1277
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
1278
|
-
url: z.ZodURL;
|
|
1279
|
-
mimeType: z.ZodString;
|
|
1280
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1281
|
-
id: z.ZodString;
|
|
1282
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
1283
|
-
encodedData: z.ZodString;
|
|
1284
|
-
mimeType: z.ZodString;
|
|
1285
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1286
|
-
id: z.ZodString;
|
|
1287
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
1288
|
-
data: z.ZodString;
|
|
1289
|
-
mimeType: z.ZodString;
|
|
1290
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1291
|
-
id: z.ZodString;
|
|
1292
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
1293
|
-
url: z.ZodString;
|
|
1294
|
-
mimeType: z.ZodString;
|
|
1295
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1296
|
-
id: z.ZodString;
|
|
1297
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
1298
|
-
encodedData: z.ZodString;
|
|
1299
|
-
mimeType: z.ZodString;
|
|
1300
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1301
|
-
id: z.ZodString;
|
|
1302
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
1303
|
-
data: z.ZodString;
|
|
1304
|
-
mimeType: z.ZodString;
|
|
1305
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1306
|
-
id: z.ZodString;
|
|
1307
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
1308
|
-
toolCallId: z.ZodString;
|
|
1309
|
-
toolName: z.ZodString;
|
|
1310
|
-
args: z.ZodUnknown;
|
|
1311
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1312
|
-
id: z.ZodString;
|
|
1313
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
1314
|
-
toolCallId: z.ZodString;
|
|
1315
|
-
toolName: z.ZodString;
|
|
1316
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1317
|
-
id: z.ZodString;
|
|
1318
|
-
type: z.ZodLiteral<"textPart">;
|
|
1319
|
-
text: z.ZodString;
|
|
1320
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1321
|
-
id: z.ZodString;
|
|
1322
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
1323
|
-
encodedData: z.ZodString;
|
|
1324
|
-
mimeType: z.ZodString;
|
|
1325
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1326
|
-
id: z.ZodString;
|
|
1327
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
1328
|
-
encodedData: z.ZodString;
|
|
1329
|
-
mimeType: z.ZodString;
|
|
1330
|
-
}, z.core.$strip>]>>;
|
|
1331
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
1332
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1333
|
-
id: z.ZodString;
|
|
1334
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
1335
|
-
thinking: z.ZodString;
|
|
1336
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
1337
|
-
}, z.core.$strip>], "type">>;
|
|
1338
|
-
}, z.core.$strip>>>;
|
|
1339
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
1340
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
1341
|
-
local: "local";
|
|
1342
|
-
cursor: "cursor";
|
|
1343
|
-
"claude-code": "claude-code";
|
|
1344
|
-
gemini: "gemini";
|
|
1345
|
-
docker: "docker";
|
|
1346
|
-
}>>;
|
|
1347
|
-
}, z.core.$loose>>;
|
|
1348
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
793
|
+
id: z.ZodString;
|
|
794
|
+
type: z.ZodLiteral<"toolMessage">;
|
|
795
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
796
|
+
id: z.ZodString;
|
|
797
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
798
|
+
toolCallId: z.ZodString;
|
|
799
|
+
toolName: z.ZodString;
|
|
800
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
801
|
+
id: z.ZodString;
|
|
802
|
+
type: z.ZodLiteral<"textPart">;
|
|
803
|
+
text: z.ZodString;
|
|
804
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
805
|
+
id: z.ZodString;
|
|
806
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
807
|
+
encodedData: z.ZodString;
|
|
808
|
+
mimeType: z.ZodString;
|
|
809
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
810
|
+
id: z.ZodString;
|
|
811
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
812
|
+
encodedData: z.ZodString;
|
|
813
|
+
mimeType: z.ZodString;
|
|
814
|
+
}, z.core.$strip>]>>;
|
|
815
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
816
|
+
}, z.core.$strip>>;
|
|
817
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
818
|
+
}, z.core.$strip>]>>;
|
|
819
|
+
expert: z.ZodObject<{
|
|
820
|
+
key: z.ZodString;
|
|
821
|
+
name: z.ZodString;
|
|
822
|
+
version: z.ZodString;
|
|
823
|
+
}, z.core.$strip>;
|
|
824
|
+
delegateTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
825
|
+
expert: z.ZodObject<{
|
|
826
|
+
key: z.ZodString;
|
|
827
|
+
name: z.ZodString;
|
|
828
|
+
version: z.ZodString;
|
|
829
|
+
}, z.core.$strip>;
|
|
830
|
+
toolCallId: z.ZodString;
|
|
831
|
+
toolName: z.ZodString;
|
|
832
|
+
query: z.ZodString;
|
|
833
|
+
}, z.core.$strip>>>;
|
|
834
|
+
delegatedBy: z.ZodOptional<z.ZodObject<{
|
|
835
|
+
expert: z.ZodObject<{
|
|
836
|
+
key: z.ZodString;
|
|
837
|
+
name: z.ZodString;
|
|
838
|
+
version: z.ZodString;
|
|
839
|
+
}, z.core.$strip>;
|
|
840
|
+
toolCallId: z.ZodString;
|
|
841
|
+
toolName: z.ZodString;
|
|
842
|
+
checkpointId: z.ZodString;
|
|
843
|
+
runId: z.ZodString;
|
|
844
|
+
}, z.core.$strip>>;
|
|
845
|
+
usage: z.ZodObject<{
|
|
846
|
+
inputTokens: z.ZodNumber;
|
|
847
|
+
outputTokens: z.ZodNumber;
|
|
848
|
+
reasoningTokens: z.ZodNumber;
|
|
849
|
+
totalTokens: z.ZodNumber;
|
|
850
|
+
cachedInputTokens: z.ZodNumber;
|
|
851
|
+
}, z.core.$strip>;
|
|
852
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
853
|
+
contextWindowUsage: z.ZodOptional<z.ZodNumber>;
|
|
854
|
+
pendingToolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
855
|
+
id: z.ZodString;
|
|
856
|
+
skillName: z.ZodString;
|
|
857
|
+
toolName: z.ZodString;
|
|
858
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
859
|
+
}, z.core.$strip>>>;
|
|
860
|
+
partialToolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
861
|
+
id: z.ZodString;
|
|
862
|
+
skillName: z.ZodString;
|
|
863
|
+
toolName: z.ZodString;
|
|
864
|
+
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
865
|
+
id: z.ZodString;
|
|
866
|
+
type: z.ZodLiteral<"textPart">;
|
|
867
|
+
text: z.ZodString;
|
|
868
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
869
|
+
id: z.ZodString;
|
|
870
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
871
|
+
url: z.ZodURL;
|
|
872
|
+
mimeType: z.ZodString;
|
|
873
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
874
|
+
id: z.ZodString;
|
|
875
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
876
|
+
encodedData: z.ZodString;
|
|
877
|
+
mimeType: z.ZodString;
|
|
878
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
879
|
+
id: z.ZodString;
|
|
880
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
881
|
+
data: z.ZodString;
|
|
882
|
+
mimeType: z.ZodString;
|
|
883
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
884
|
+
id: z.ZodString;
|
|
885
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
886
|
+
url: z.ZodString;
|
|
887
|
+
mimeType: z.ZodString;
|
|
888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
889
|
+
id: z.ZodString;
|
|
890
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
891
|
+
encodedData: z.ZodString;
|
|
892
|
+
mimeType: z.ZodString;
|
|
893
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
894
|
+
id: z.ZodString;
|
|
895
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
896
|
+
data: z.ZodString;
|
|
897
|
+
mimeType: z.ZodString;
|
|
898
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
899
|
+
id: z.ZodString;
|
|
900
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
901
|
+
toolCallId: z.ZodString;
|
|
902
|
+
toolName: z.ZodString;
|
|
903
|
+
args: z.ZodUnknown;
|
|
904
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
905
|
+
id: z.ZodString;
|
|
906
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
907
|
+
toolCallId: z.ZodString;
|
|
908
|
+
toolName: z.ZodString;
|
|
909
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
910
|
+
id: z.ZodString;
|
|
911
|
+
type: z.ZodLiteral<"textPart">;
|
|
912
|
+
text: z.ZodString;
|
|
913
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
914
|
+
id: z.ZodString;
|
|
915
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
916
|
+
encodedData: z.ZodString;
|
|
917
|
+
mimeType: z.ZodString;
|
|
918
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
919
|
+
id: z.ZodString;
|
|
920
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
921
|
+
encodedData: z.ZodString;
|
|
922
|
+
mimeType: z.ZodString;
|
|
923
|
+
}, z.core.$strip>]>>;
|
|
924
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
925
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
926
|
+
id: z.ZodString;
|
|
927
|
+
type: z.ZodLiteral<"thinkingPart">;
|
|
928
|
+
thinking: z.ZodString;
|
|
929
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
930
|
+
}, z.core.$strip>], "type">>;
|
|
931
|
+
}, z.core.$strip>>>;
|
|
932
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
933
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
934
|
+
local: "local";
|
|
935
|
+
cursor: "cursor";
|
|
936
|
+
"claude-code": "claude-code";
|
|
937
|
+
gemini: "gemini";
|
|
938
|
+
docker: "docker";
|
|
939
|
+
}>>;
|
|
940
|
+
}, z.core.$loose>>;
|
|
941
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
942
|
+
name: z.ZodString;
|
|
943
|
+
message: z.ZodString;
|
|
944
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
945
|
+
isRetryable: z.ZodBoolean;
|
|
946
|
+
}, z.core.$strip>>;
|
|
947
|
+
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
948
|
+
}, z.core.$strip>;
|
|
949
|
+
|
|
950
|
+
declare const anthropicProviderToolNameSchema: z.ZodEnum<{
|
|
951
|
+
webSearch: "webSearch";
|
|
952
|
+
webFetch: "webFetch";
|
|
953
|
+
codeExecution: "codeExecution";
|
|
954
|
+
}>;
|
|
955
|
+
type AnthropicProviderToolName = z.infer<typeof anthropicProviderToolNameSchema>;
|
|
956
|
+
declare const builtinAnthropicSkillSchema: z.ZodObject<{
|
|
957
|
+
type: z.ZodLiteral<"builtin">;
|
|
958
|
+
skillId: z.ZodEnum<{
|
|
959
|
+
pdf: "pdf";
|
|
960
|
+
docx: "docx";
|
|
961
|
+
pptx: "pptx";
|
|
962
|
+
xlsx: "xlsx";
|
|
963
|
+
}>;
|
|
964
|
+
}, z.core.$strip>;
|
|
965
|
+
type BuiltinAnthropicSkill = z.infer<typeof builtinAnthropicSkillSchema>;
|
|
966
|
+
declare const customAnthropicSkillSchema: z.ZodObject<{
|
|
967
|
+
type: z.ZodLiteral<"custom">;
|
|
968
|
+
name: z.ZodString;
|
|
969
|
+
definition: z.ZodString;
|
|
970
|
+
}, z.core.$strip>;
|
|
971
|
+
type CustomAnthropicSkill = z.infer<typeof customAnthropicSkillSchema>;
|
|
972
|
+
declare const anthropicProviderSkillSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
973
|
+
type: z.ZodLiteral<"builtin">;
|
|
974
|
+
skillId: z.ZodEnum<{
|
|
975
|
+
pdf: "pdf";
|
|
976
|
+
docx: "docx";
|
|
977
|
+
pptx: "pptx";
|
|
978
|
+
xlsx: "xlsx";
|
|
979
|
+
}>;
|
|
980
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
981
|
+
type: z.ZodLiteral<"custom">;
|
|
982
|
+
name: z.ZodString;
|
|
983
|
+
definition: z.ZodString;
|
|
984
|
+
}, z.core.$strip>], "type">;
|
|
985
|
+
type AnthropicProviderSkill = z.infer<typeof anthropicProviderSkillSchema>;
|
|
986
|
+
declare const openaiProviderToolNameSchema: z.ZodEnum<{
|
|
987
|
+
webSearch: "webSearch";
|
|
988
|
+
fileSearch: "fileSearch";
|
|
989
|
+
codeInterpreter: "codeInterpreter";
|
|
990
|
+
imageGeneration: "imageGeneration";
|
|
991
|
+
}>;
|
|
992
|
+
type OpenAIProviderToolName = z.infer<typeof openaiProviderToolNameSchema>;
|
|
993
|
+
declare const googleProviderToolNameSchema: z.ZodEnum<{
|
|
994
|
+
codeExecution: "codeExecution";
|
|
995
|
+
fileSearch: "fileSearch";
|
|
996
|
+
googleSearch: "googleSearch";
|
|
997
|
+
urlContext: "urlContext";
|
|
998
|
+
googleMaps: "googleMaps";
|
|
999
|
+
}>;
|
|
1000
|
+
type GoogleProviderToolName = z.infer<typeof googleProviderToolNameSchema>;
|
|
1001
|
+
declare const azureOpenAIProviderToolNameSchema: z.ZodEnum<{
|
|
1002
|
+
fileSearch: "fileSearch";
|
|
1003
|
+
codeInterpreter: "codeInterpreter";
|
|
1004
|
+
imageGeneration: "imageGeneration";
|
|
1005
|
+
webSearchPreview: "webSearchPreview";
|
|
1006
|
+
}>;
|
|
1007
|
+
type AzureOpenAIProviderToolName = z.infer<typeof azureOpenAIProviderToolNameSchema>;
|
|
1008
|
+
declare const vertexProviderToolNameSchema: z.ZodEnum<{
|
|
1009
|
+
codeExecution: "codeExecution";
|
|
1010
|
+
googleSearch: "googleSearch";
|
|
1011
|
+
urlContext: "urlContext";
|
|
1012
|
+
googleMaps: "googleMaps";
|
|
1013
|
+
enterpriseWebSearch: "enterpriseWebSearch";
|
|
1014
|
+
}>;
|
|
1015
|
+
type VertexProviderToolName = z.infer<typeof vertexProviderToolNameSchema>;
|
|
1016
|
+
declare const webSearchOptionsSchema: z.ZodObject<{
|
|
1017
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1018
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1019
|
+
}, z.core.$strip>;
|
|
1020
|
+
declare const webFetchOptionsSchema: z.ZodObject<{
|
|
1021
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1022
|
+
}, z.core.$strip>;
|
|
1023
|
+
declare const fileSearchOptionsSchema: z.ZodObject<{
|
|
1024
|
+
vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1025
|
+
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
1026
|
+
}, z.core.$strip>;
|
|
1027
|
+
declare const providerToolOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
1028
|
+
webSearch: z.ZodOptional<z.ZodObject<{
|
|
1029
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1030
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1031
|
+
}, z.core.$strip>>;
|
|
1032
|
+
webFetch: z.ZodOptional<z.ZodObject<{
|
|
1033
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1034
|
+
}, z.core.$strip>>;
|
|
1035
|
+
fileSearch: z.ZodOptional<z.ZodObject<{
|
|
1036
|
+
vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1037
|
+
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
1038
|
+
}, z.core.$strip>>;
|
|
1039
|
+
}, z.core.$strip>>;
|
|
1040
|
+
type ProviderToolOptions = z.infer<typeof providerToolOptionsSchema>;
|
|
1041
|
+
declare function hasCustomProviderSkills(skills?: AnthropicProviderSkill[]): boolean;
|
|
1042
|
+
|
|
1043
|
+
/** MCP skill using stdio transport */
|
|
1044
|
+
interface McpStdioSkill {
|
|
1045
|
+
type: "mcpStdioSkill";
|
|
1046
|
+
/** Skill name (derived from key) */
|
|
1047
|
+
name: string;
|
|
1048
|
+
/** Human-readable description */
|
|
1049
|
+
description?: string;
|
|
1050
|
+
/** Usage rules for the LLM */
|
|
1051
|
+
rule?: string;
|
|
1052
|
+
/** Tool names to include (whitelist) */
|
|
1053
|
+
pick: string[];
|
|
1054
|
+
/** Tool names to exclude (blacklist) */
|
|
1055
|
+
omit: string[];
|
|
1056
|
+
/** Command to execute (e.g., "npx") */
|
|
1057
|
+
command: string;
|
|
1058
|
+
/** Package name for npx/uvx */
|
|
1059
|
+
packageName?: string;
|
|
1060
|
+
/** Additional arguments */
|
|
1061
|
+
args: string[];
|
|
1062
|
+
/** Environment variables required by this skill */
|
|
1063
|
+
requiredEnv: string[];
|
|
1064
|
+
/** Whether to delay initialization until first use */
|
|
1065
|
+
lazyInit: boolean;
|
|
1066
|
+
}
|
|
1067
|
+
declare const mcpStdioSkillSchema: z.ZodObject<{
|
|
1068
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1069
|
+
name: z.ZodString;
|
|
1070
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1071
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1072
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1073
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1074
|
+
command: z.ZodString;
|
|
1075
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1077
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1078
|
+
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1079
|
+
}, z.core.$strip>;
|
|
1080
|
+
/** MCP skill using SSE transport */
|
|
1081
|
+
interface McpSseSkill {
|
|
1082
|
+
type: "mcpSseSkill";
|
|
1083
|
+
/** Skill name (derived from key) */
|
|
1084
|
+
name: string;
|
|
1085
|
+
/** Human-readable description */
|
|
1086
|
+
description?: string;
|
|
1087
|
+
/** Usage rules for the LLM */
|
|
1088
|
+
rule?: string;
|
|
1089
|
+
/** Tool names to include (whitelist) */
|
|
1090
|
+
pick: string[];
|
|
1091
|
+
/** Tool names to exclude (blacklist) */
|
|
1092
|
+
omit: string[];
|
|
1093
|
+
/** SSE endpoint URL */
|
|
1094
|
+
endpoint: string;
|
|
1095
|
+
}
|
|
1096
|
+
declare const mcpSseSkillSchema: z.ZodObject<{
|
|
1097
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1098
|
+
name: z.ZodString;
|
|
1099
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1102
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1103
|
+
endpoint: z.ZodString;
|
|
1104
|
+
}, z.core.$strip>;
|
|
1105
|
+
/** Definition of an interactive tool within an interactive skill */
|
|
1106
|
+
interface InteractiveTool {
|
|
1107
|
+
/** Tool name */
|
|
1108
|
+
name: string;
|
|
1109
|
+
/** Human-readable description */
|
|
1110
|
+
description?: string;
|
|
1111
|
+
/** JSON Schema for tool input as a string */
|
|
1112
|
+
inputJsonSchema: string;
|
|
1113
|
+
}
|
|
1114
|
+
declare const interactiveToolSchema: z.ZodObject<{
|
|
1115
|
+
name: z.ZodString;
|
|
1116
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
inputJsonSchema: z.ZodString;
|
|
1118
|
+
}, z.core.$strip>;
|
|
1119
|
+
/** Skill that requires human interaction to complete tool calls */
|
|
1120
|
+
interface InteractiveSkill {
|
|
1121
|
+
type: "interactiveSkill";
|
|
1122
|
+
/** Skill name (derived from key) */
|
|
1123
|
+
name: string;
|
|
1124
|
+
/** Human-readable description */
|
|
1125
|
+
description?: string;
|
|
1126
|
+
/** Usage rules for the LLM */
|
|
1127
|
+
rule?: string;
|
|
1128
|
+
/** Map of tool name to tool definition */
|
|
1129
|
+
tools: Record<string, InteractiveTool>;
|
|
1130
|
+
}
|
|
1131
|
+
declare const interactiveSkillSchema: z.ZodObject<{
|
|
1132
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
1133
|
+
name: z.ZodString;
|
|
1134
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1135
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1136
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1137
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1138
|
+
inputJsonSchema: z.ZodString;
|
|
1139
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
1140
|
+
[k: string]: {
|
|
1141
|
+
name: string;
|
|
1142
|
+
inputJsonSchema: string;
|
|
1143
|
+
description?: string | undefined;
|
|
1144
|
+
};
|
|
1145
|
+
}, Record<string, {
|
|
1146
|
+
inputJsonSchema: string;
|
|
1147
|
+
description?: string | undefined;
|
|
1148
|
+
}>>>;
|
|
1149
|
+
}, z.core.$strip>;
|
|
1150
|
+
/** All possible skill types */
|
|
1151
|
+
type Skill = McpStdioSkill | McpSseSkill | InteractiveSkill;
|
|
1152
|
+
declare const skillSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1153
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1154
|
+
name: z.ZodString;
|
|
1155
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1157
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1158
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1159
|
+
command: z.ZodString;
|
|
1160
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
1161
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1162
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1163
|
+
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1164
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1165
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1166
|
+
name: z.ZodString;
|
|
1167
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1168
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1170
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1171
|
+
endpoint: z.ZodString;
|
|
1172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1173
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
1174
|
+
name: z.ZodString;
|
|
1175
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1176
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1177
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1178
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1179
|
+
inputJsonSchema: z.ZodString;
|
|
1180
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
1181
|
+
[k: string]: {
|
|
1182
|
+
name: string;
|
|
1183
|
+
inputJsonSchema: string;
|
|
1184
|
+
description?: string | undefined;
|
|
1185
|
+
};
|
|
1186
|
+
}, Record<string, {
|
|
1187
|
+
inputJsonSchema: string;
|
|
1188
|
+
description?: string | undefined;
|
|
1189
|
+
}>>>;
|
|
1190
|
+
}, z.core.$strip>], "type">;
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* An Expert definition - an AI agent with specific skills and instructions.
|
|
1194
|
+
* Experts can delegate to other Experts and use MCP tools.
|
|
1195
|
+
*/
|
|
1196
|
+
interface Expert {
|
|
1197
|
+
/** Unique key identifying this Expert (e.g., "my-expert" or "my-expert@1.0.0") */
|
|
1198
|
+
key: string;
|
|
1199
|
+
/** Display name for the Expert */
|
|
1200
|
+
name: string;
|
|
1201
|
+
/** Semantic version string */
|
|
1202
|
+
version: string;
|
|
1203
|
+
/** Human-readable description of what this Expert does */
|
|
1204
|
+
description?: string;
|
|
1205
|
+
/** System instruction defining the Expert's behavior */
|
|
1206
|
+
instruction: string;
|
|
1207
|
+
/** Map of skill name to skill configuration */
|
|
1208
|
+
skills: Record<string, Skill>;
|
|
1209
|
+
/** List of Expert keys this Expert can delegate to */
|
|
1210
|
+
delegates: string[];
|
|
1211
|
+
/** Tags for categorization and discovery */
|
|
1212
|
+
tags: string[];
|
|
1213
|
+
/** Provider-specific tool names to enable (e.g., "webSearch", "codeExecution") */
|
|
1214
|
+
providerTools?: string[];
|
|
1215
|
+
/** Anthropic Agent Skills configuration */
|
|
1216
|
+
providerSkills?: AnthropicProviderSkill[];
|
|
1217
|
+
/** Provider tool options (e.g., webSearch maxUses, allowedDomains) */
|
|
1218
|
+
providerToolOptions?: ProviderToolOptions;
|
|
1219
|
+
}
|
|
1220
|
+
declare const expertSchema: z.ZodObject<{
|
|
1221
|
+
key: z.ZodString;
|
|
1222
|
+
name: z.ZodString;
|
|
1223
|
+
version: z.ZodString;
|
|
1224
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
instruction: z.ZodString;
|
|
1226
|
+
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1227
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1228
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1229
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1230
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1231
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1232
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1233
|
+
command: z.ZodString;
|
|
1234
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
1235
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1236
|
+
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1238
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1239
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1240
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1241
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1242
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1243
|
+
endpoint: z.ZodString;
|
|
1244
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1245
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
1246
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1249
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1250
|
+
inputJsonSchema: z.ZodString;
|
|
1251
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
1252
|
+
[k: string]: {
|
|
1253
|
+
name: string;
|
|
1254
|
+
inputJsonSchema: string;
|
|
1255
|
+
description?: string | undefined;
|
|
1256
|
+
};
|
|
1257
|
+
}, Record<string, {
|
|
1258
|
+
inputJsonSchema: string;
|
|
1259
|
+
description?: string | undefined;
|
|
1260
|
+
}>>>;
|
|
1261
|
+
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
1262
|
+
[k: string]: {
|
|
1263
|
+
type: "mcpStdioSkill";
|
|
1264
|
+
name: string;
|
|
1265
|
+
pick: string[];
|
|
1266
|
+
omit: string[];
|
|
1267
|
+
command: string;
|
|
1268
|
+
args: string[];
|
|
1269
|
+
requiredEnv: string[];
|
|
1270
|
+
lazyInit: boolean;
|
|
1271
|
+
description?: string | undefined;
|
|
1272
|
+
rule?: string | undefined;
|
|
1273
|
+
packageName?: string | undefined;
|
|
1274
|
+
} | {
|
|
1275
|
+
type: "mcpSseSkill";
|
|
1276
|
+
name: string;
|
|
1277
|
+
pick: string[];
|
|
1278
|
+
omit: string[];
|
|
1279
|
+
endpoint: string;
|
|
1280
|
+
description?: string | undefined;
|
|
1281
|
+
rule?: string | undefined;
|
|
1282
|
+
} | {
|
|
1283
|
+
type: "interactiveSkill";
|
|
1284
|
+
name: string;
|
|
1285
|
+
tools: {
|
|
1286
|
+
[k: string]: {
|
|
1287
|
+
name: string;
|
|
1288
|
+
inputJsonSchema: string;
|
|
1289
|
+
description?: string | undefined;
|
|
1290
|
+
};
|
|
1291
|
+
};
|
|
1292
|
+
description?: string | undefined;
|
|
1293
|
+
rule?: string | undefined;
|
|
1294
|
+
};
|
|
1295
|
+
}, Record<string, {
|
|
1296
|
+
type: "mcpStdioSkill";
|
|
1297
|
+
args: string[];
|
|
1298
|
+
pick: string[];
|
|
1299
|
+
omit: string[];
|
|
1300
|
+
command: string;
|
|
1301
|
+
requiredEnv: string[];
|
|
1302
|
+
lazyInit: boolean;
|
|
1303
|
+
description?: string | undefined;
|
|
1304
|
+
rule?: string | undefined;
|
|
1305
|
+
packageName?: string | undefined;
|
|
1306
|
+
} | {
|
|
1307
|
+
type: "mcpSseSkill";
|
|
1308
|
+
pick: string[];
|
|
1309
|
+
omit: string[];
|
|
1310
|
+
endpoint: string;
|
|
1311
|
+
description?: string | undefined;
|
|
1312
|
+
rule?: string | undefined;
|
|
1313
|
+
} | {
|
|
1314
|
+
type: "interactiveSkill";
|
|
1315
|
+
tools: {
|
|
1316
|
+
[k: string]: {
|
|
1317
|
+
name: string;
|
|
1318
|
+
inputJsonSchema: string;
|
|
1319
|
+
description?: string | undefined;
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1322
|
+
description?: string | undefined;
|
|
1323
|
+
rule?: string | undefined;
|
|
1324
|
+
}>>>;
|
|
1325
|
+
delegates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1326
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1327
|
+
providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1328
|
+
providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1329
|
+
type: z.ZodLiteral<"builtin">;
|
|
1330
|
+
skillId: z.ZodEnum<{
|
|
1331
|
+
pdf: "pdf";
|
|
1332
|
+
docx: "docx";
|
|
1333
|
+
pptx: "pptx";
|
|
1334
|
+
xlsx: "xlsx";
|
|
1335
|
+
}>;
|
|
1336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1337
|
+
type: z.ZodLiteral<"custom">;
|
|
1349
1338
|
name: z.ZodString;
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1339
|
+
definition: z.ZodString;
|
|
1340
|
+
}, z.core.$strip>], "type">>>;
|
|
1341
|
+
providerToolOptions: z.ZodOptional<z.ZodObject<{
|
|
1342
|
+
webSearch: z.ZodOptional<z.ZodObject<{
|
|
1343
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1344
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1345
|
+
}, z.core.$strip>>;
|
|
1346
|
+
webFetch: z.ZodOptional<z.ZodObject<{
|
|
1347
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1348
|
+
}, z.core.$strip>>;
|
|
1349
|
+
fileSearch: z.ZodOptional<z.ZodObject<{
|
|
1350
|
+
vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1351
|
+
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
1352
|
+
}, z.core.$strip>>;
|
|
1353
1353
|
}, z.core.$strip>>;
|
|
1354
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
1355
1354
|
}, z.core.$strip>;
|
|
1356
1355
|
|
|
1357
1356
|
/** Reasoning budget for native LLM reasoning (extended thinking / test-time scaling) */
|
|
@@ -2484,12 +2483,12 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2484
2483
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2485
2484
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
2486
2485
|
description: z.ZodOptional<z.ZodString>;
|
|
2486
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2487
2487
|
rule: z.ZodOptional<z.ZodString>;
|
|
2488
2488
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2489
2489
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2490
2490
|
command: z.ZodString;
|
|
2491
2491
|
packageName: z.ZodOptional<z.ZodString>;
|
|
2492
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2493
2492
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2494
2493
|
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2495
2494
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2552,10 +2551,10 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2552
2551
|
};
|
|
2553
2552
|
}, Record<string, {
|
|
2554
2553
|
type: "mcpStdioSkill";
|
|
2554
|
+
args: string[];
|
|
2555
2555
|
pick: string[];
|
|
2556
2556
|
omit: string[];
|
|
2557
2557
|
command: string;
|
|
2558
|
-
args: string[];
|
|
2559
2558
|
requiredEnv: string[];
|
|
2560
2559
|
lazyInit: boolean;
|
|
2561
2560
|
description?: string | undefined;
|
|
@@ -2693,8 +2692,9 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2693
2692
|
}, z.core.$strip>>;
|
|
2694
2693
|
}, z.core.$strip>;
|
|
2695
2694
|
experts: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2696
|
-
name: z.ZodString;
|
|
2697
2695
|
description: z.ZodOptional<z.ZodString>;
|
|
2696
|
+
name: z.ZodString;
|
|
2697
|
+
version: z.ZodString;
|
|
2698
2698
|
providerToolOptions: z.ZodOptional<z.ZodObject<{
|
|
2699
2699
|
webSearch: z.ZodOptional<z.ZodObject<{
|
|
2700
2700
|
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2708,17 +2708,16 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2708
2708
|
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
2709
2709
|
}, z.core.$strip>>;
|
|
2710
2710
|
}, z.core.$strip>>;
|
|
2711
|
-
version: z.ZodString;
|
|
2712
2711
|
instruction: z.ZodString;
|
|
2713
2712
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2714
2713
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
2715
2714
|
description: z.ZodOptional<z.ZodString>;
|
|
2715
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2716
2716
|
rule: z.ZodOptional<z.ZodString>;
|
|
2717
2717
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2718
2718
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2719
2719
|
command: z.ZodString;
|
|
2720
2720
|
packageName: z.ZodOptional<z.ZodString>;
|
|
2721
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2722
2721
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2723
2722
|
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2724
2723
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2781,10 +2780,10 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2781
2780
|
};
|
|
2782
2781
|
}, Record<string, {
|
|
2783
2782
|
type: "mcpStdioSkill";
|
|
2783
|
+
args: string[];
|
|
2784
2784
|
pick: string[];
|
|
2785
2785
|
omit: string[];
|
|
2786
2786
|
command: string;
|
|
2787
|
-
args: string[];
|
|
2788
2787
|
requiredEnv: string[];
|
|
2789
2788
|
lazyInit: boolean;
|
|
2790
2789
|
description?: string | undefined;
|
|
@@ -3385,7 +3384,7 @@ declare const startRun: (setting: RunSetting, checkpoint: Checkpoint, data: Omit
|
|
|
3385
3384
|
} & {
|
|
3386
3385
|
initialCheckpoint: Checkpoint;
|
|
3387
3386
|
inputMessages: (InstructionMessage | UserMessage | ToolMessage)[];
|
|
3388
|
-
}, "
|
|
3387
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3389
3388
|
type: "startRun";
|
|
3390
3389
|
} & {
|
|
3391
3390
|
initialCheckpoint: Checkpoint;
|
|
@@ -3395,7 +3394,7 @@ declare const resumeFromStop: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3395
3394
|
type: "resumeFromStop";
|
|
3396
3395
|
} & {
|
|
3397
3396
|
checkpoint: Checkpoint;
|
|
3398
|
-
}, "
|
|
3397
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3399
3398
|
type: "resumeFromStop";
|
|
3400
3399
|
} & {
|
|
3401
3400
|
checkpoint: Checkpoint;
|
|
@@ -3405,7 +3404,7 @@ declare const proceedToInteractiveTools: (setting: RunSetting, checkpoint: Check
|
|
|
3405
3404
|
} & {
|
|
3406
3405
|
pendingToolCalls: ToolCall[];
|
|
3407
3406
|
partialToolResults: ToolResult[];
|
|
3408
|
-
}, "
|
|
3407
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3409
3408
|
type: "proceedToInteractiveTools";
|
|
3410
3409
|
} & {
|
|
3411
3410
|
pendingToolCalls: ToolCall[];
|
|
@@ -3415,7 +3414,7 @@ declare const startGeneration: (setting: RunSetting, checkpoint: Checkpoint, dat
|
|
|
3415
3414
|
type: "startGeneration";
|
|
3416
3415
|
} & {
|
|
3417
3416
|
messages: Message[];
|
|
3418
|
-
}, "
|
|
3417
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3419
3418
|
type: "startGeneration";
|
|
3420
3419
|
} & {
|
|
3421
3420
|
messages: Message[];
|
|
@@ -3428,7 +3427,7 @@ declare const retry: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<Ba
|
|
|
3428
3427
|
toolCalls?: ToolCall[];
|
|
3429
3428
|
toolResults?: ToolResult[];
|
|
3430
3429
|
usage: Usage;
|
|
3431
|
-
}, "
|
|
3430
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3432
3431
|
type: "retry";
|
|
3433
3432
|
} & {
|
|
3434
3433
|
reason: string;
|
|
@@ -3443,7 +3442,7 @@ declare const callTools: (setting: RunSetting, checkpoint: Checkpoint, data: Omi
|
|
|
3443
3442
|
newMessage: ExpertMessage;
|
|
3444
3443
|
toolCalls: ToolCall[];
|
|
3445
3444
|
usage: Usage;
|
|
3446
|
-
}, "
|
|
3445
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3447
3446
|
type: "callTools";
|
|
3448
3447
|
} & {
|
|
3449
3448
|
newMessage: ExpertMessage;
|
|
@@ -3455,7 +3454,7 @@ declare const finishMcpTools: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3455
3454
|
} & {
|
|
3456
3455
|
partialToolResults: ToolResult[];
|
|
3457
3456
|
pendingToolCalls: ToolCall[];
|
|
3458
|
-
}, "
|
|
3457
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3459
3458
|
type: "finishMcpTools";
|
|
3460
3459
|
} & {
|
|
3461
3460
|
partialToolResults: ToolResult[];
|
|
@@ -3463,14 +3462,14 @@ declare const finishMcpTools: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3463
3462
|
};
|
|
3464
3463
|
declare const skipDelegates: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<BaseEvent & {
|
|
3465
3464
|
type: "skipDelegates";
|
|
3466
|
-
} & object, "
|
|
3465
|
+
} & object, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3467
3466
|
type: "skipDelegates";
|
|
3468
3467
|
} & object;
|
|
3469
3468
|
declare const resolveToolResults: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<BaseEvent & {
|
|
3470
3469
|
type: "resolveToolResults";
|
|
3471
3470
|
} & {
|
|
3472
3471
|
toolResults: ToolResult[];
|
|
3473
|
-
}, "
|
|
3472
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3474
3473
|
type: "resolveToolResults";
|
|
3475
3474
|
} & {
|
|
3476
3475
|
toolResults: ToolResult[];
|
|
@@ -3479,7 +3478,7 @@ declare const attemptCompletion: (setting: RunSetting, checkpoint: Checkpoint, d
|
|
|
3479
3478
|
type: "attemptCompletion";
|
|
3480
3479
|
} & {
|
|
3481
3480
|
toolResult: ToolResult;
|
|
3482
|
-
}, "
|
|
3481
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3483
3482
|
type: "attemptCompletion";
|
|
3484
3483
|
} & {
|
|
3485
3484
|
toolResult: ToolResult;
|
|
@@ -3488,7 +3487,7 @@ declare const finishToolCall: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3488
3487
|
type: "finishToolCall";
|
|
3489
3488
|
} & {
|
|
3490
3489
|
newMessages: (UserMessage | ToolMessage)[];
|
|
3491
|
-
}, "
|
|
3490
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3492
3491
|
type: "finishToolCall";
|
|
3493
3492
|
} & {
|
|
3494
3493
|
newMessages: (UserMessage | ToolMessage)[];
|
|
@@ -3498,7 +3497,7 @@ declare const resumeToolCalls: (setting: RunSetting, checkpoint: Checkpoint, dat
|
|
|
3498
3497
|
} & {
|
|
3499
3498
|
pendingToolCalls: ToolCall[];
|
|
3500
3499
|
partialToolResults: ToolResult[];
|
|
3501
|
-
}, "
|
|
3500
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3502
3501
|
type: "resumeToolCalls";
|
|
3503
3502
|
} & {
|
|
3504
3503
|
pendingToolCalls: ToolCall[];
|
|
@@ -3511,7 +3510,7 @@ declare const completeRun: (setting: RunSetting, checkpoint: Checkpoint, data: O
|
|
|
3511
3510
|
step: Step;
|
|
3512
3511
|
text: string;
|
|
3513
3512
|
usage: Usage;
|
|
3514
|
-
}, "
|
|
3513
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3515
3514
|
type: "completeRun";
|
|
3516
3515
|
} & {
|
|
3517
3516
|
checkpoint: Checkpoint;
|
|
@@ -3524,7 +3523,7 @@ declare const stopRunByInteractiveTool: (setting: RunSetting, checkpoint: Checkp
|
|
|
3524
3523
|
} & {
|
|
3525
3524
|
checkpoint: Checkpoint;
|
|
3526
3525
|
step: Step;
|
|
3527
|
-
}, "
|
|
3526
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3528
3527
|
type: "stopRunByInteractiveTool";
|
|
3529
3528
|
} & {
|
|
3530
3529
|
checkpoint: Checkpoint;
|
|
@@ -3535,7 +3534,7 @@ declare const stopRunByDelegate: (setting: RunSetting, checkpoint: Checkpoint, d
|
|
|
3535
3534
|
} & {
|
|
3536
3535
|
checkpoint: Checkpoint;
|
|
3537
3536
|
step: Step;
|
|
3538
|
-
}, "
|
|
3537
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3539
3538
|
type: "stopRunByDelegate";
|
|
3540
3539
|
} & {
|
|
3541
3540
|
checkpoint: Checkpoint;
|
|
@@ -3546,7 +3545,7 @@ declare const stopRunByExceededMaxSteps: (setting: RunSetting, checkpoint: Check
|
|
|
3546
3545
|
} & {
|
|
3547
3546
|
checkpoint: Checkpoint;
|
|
3548
3547
|
step: Step;
|
|
3549
|
-
}, "
|
|
3548
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3550
3549
|
type: "stopRunByExceededMaxSteps";
|
|
3551
3550
|
} & {
|
|
3552
3551
|
checkpoint: Checkpoint;
|
|
@@ -3563,7 +3562,7 @@ declare const stopRunByError: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3563
3562
|
statusCode?: number;
|
|
3564
3563
|
isRetryable: boolean;
|
|
3565
3564
|
};
|
|
3566
|
-
}, "
|
|
3565
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3567
3566
|
type: "stopRunByError";
|
|
3568
3567
|
} & {
|
|
3569
3568
|
checkpoint: Checkpoint;
|
|
@@ -3581,7 +3580,7 @@ declare const continueToNextStep: (setting: RunSetting, checkpoint: Checkpoint,
|
|
|
3581
3580
|
checkpoint: Checkpoint;
|
|
3582
3581
|
step: Step;
|
|
3583
3582
|
nextCheckpoint: Checkpoint;
|
|
3584
|
-
}, "
|
|
3583
|
+
}, "id" | "type" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3585
3584
|
type: "continueToNextStep";
|
|
3586
3585
|
} & {
|
|
3587
3586
|
checkpoint: Checkpoint;
|
|
@@ -3683,6 +3682,27 @@ declare function isValidEventType(type: string): type is EventType;
|
|
|
3683
3682
|
/** Validate if a string is a valid RuntimeEvent type */
|
|
3684
3683
|
declare function isValidRuntimeEventType(type: string): type is RuntimeEventType;
|
|
3685
3684
|
|
|
3685
|
+
declare function createEmptyUsage(): Usage;
|
|
3686
|
+
type CreateCheckpointParams = {
|
|
3687
|
+
jobId: string;
|
|
3688
|
+
runId: string;
|
|
3689
|
+
expertKey: string;
|
|
3690
|
+
expert: {
|
|
3691
|
+
key: string;
|
|
3692
|
+
name: string;
|
|
3693
|
+
version: string;
|
|
3694
|
+
};
|
|
3695
|
+
output: string;
|
|
3696
|
+
runtime: RuntimeName;
|
|
3697
|
+
};
|
|
3698
|
+
declare function createNormalizedCheckpoint(params: CreateCheckpointParams): Checkpoint;
|
|
3699
|
+
declare function createStartRunEvent(jobId: string, runId: string, expertKey: string, checkpoint: Checkpoint): RunEvent;
|
|
3700
|
+
declare function createRuntimeInitEvent(jobId: string, runId: string, expertName: string, runtime: RuntimeName, version: string, query?: string): RuntimeEvent;
|
|
3701
|
+
declare function createCompleteRunEvent(jobId: string, runId: string, expertKey: string, checkpoint: Checkpoint, output: string, startedAt?: number): RunEvent;
|
|
3702
|
+
declare function createCallToolsEvent(jobId: string, runId: string, expertKey: string, stepNumber: number, toolCalls: ToolCall[], _checkpoint: Checkpoint): RunEvent;
|
|
3703
|
+
declare function createResolveToolResultsEvent(jobId: string, runId: string, expertKey: string, stepNumber: number, toolResults: ToolResult[]): RunEvent;
|
|
3704
|
+
declare function createToolMessage(toolCallId: string, toolName: string, resultText: string): ToolMessage;
|
|
3705
|
+
|
|
3686
3706
|
/** Setting type for adapter run - external input with required jobId and runId added by dispatcher */
|
|
3687
3707
|
type AdapterRunSetting = RunParamsInput["setting"] & {
|
|
3688
3708
|
jobId: string;
|
|
@@ -3727,41 +3747,6 @@ type RuntimeExpertConfig = {
|
|
|
3727
3747
|
instruction: string;
|
|
3728
3748
|
};
|
|
3729
3749
|
|
|
3730
|
-
type ExecResult = {
|
|
3731
|
-
stdout: string;
|
|
3732
|
-
stderr: string;
|
|
3733
|
-
exitCode: number;
|
|
3734
|
-
};
|
|
3735
|
-
declare abstract class BaseAdapter implements RuntimeAdapter {
|
|
3736
|
-
abstract readonly name: string;
|
|
3737
|
-
abstract checkPrerequisites(): Promise<PrerequisiteResult>;
|
|
3738
|
-
abstract run(params: AdapterRunParams): Promise<AdapterRunResult>;
|
|
3739
|
-
convertExpert(expert: Expert): RuntimeExpertConfig;
|
|
3740
|
-
protected execCommand(args: string[]): Promise<ExecResult>;
|
|
3741
|
-
protected executeWithTimeout(proc: ChildProcess, timeout: number): Promise<ExecResult>;
|
|
3742
|
-
}
|
|
3743
|
-
|
|
3744
|
-
declare function createEmptyUsage(): Usage;
|
|
3745
|
-
type CreateCheckpointParams = {
|
|
3746
|
-
jobId: string;
|
|
3747
|
-
runId: string;
|
|
3748
|
-
expertKey: string;
|
|
3749
|
-
expert: {
|
|
3750
|
-
key: string;
|
|
3751
|
-
name: string;
|
|
3752
|
-
version: string;
|
|
3753
|
-
};
|
|
3754
|
-
output: string;
|
|
3755
|
-
runtime: RuntimeName;
|
|
3756
|
-
};
|
|
3757
|
-
declare function createNormalizedCheckpoint(params: CreateCheckpointParams): Checkpoint;
|
|
3758
|
-
declare function createStartRunEvent(jobId: string, runId: string, expertKey: string, checkpoint: Checkpoint): RunEvent;
|
|
3759
|
-
declare function createRuntimeInitEvent(jobId: string, runId: string, expertName: string, runtime: RuntimeName, version: string, query?: string): RuntimeEvent;
|
|
3760
|
-
declare function createCompleteRunEvent(jobId: string, runId: string, expertKey: string, checkpoint: Checkpoint, output: string, startedAt?: number): RunEvent;
|
|
3761
|
-
declare function createCallToolsEvent(jobId: string, runId: string, expertKey: string, stepNumber: number, toolCalls: ToolCall[], _checkpoint: Checkpoint): RunEvent;
|
|
3762
|
-
declare function createResolveToolResultsEvent(jobId: string, runId: string, expertKey: string, stepNumber: number, toolResults: ToolResult[]): RunEvent;
|
|
3763
|
-
declare function createToolMessage(toolCallId: string, toolName: string, resultText: string): ToolMessage;
|
|
3764
|
-
|
|
3765
3750
|
declare function registerAdapter(runtime: RuntimeName, factory: () => RuntimeAdapter): void;
|
|
3766
3751
|
declare function getAdapter(runtime: RuntimeName): RuntimeAdapter;
|
|
3767
3752
|
declare function isAdapterAvailable(runtime: RuntimeName): boolean;
|
|
@@ -6753,4 +6738,4 @@ declare function createFilteredEventListener(listener: (event: PerstackEvent) =>
|
|
|
6753
6738
|
declare function formatZodError(error: ZodError): string;
|
|
6754
6739
|
declare function parseWithFriendlyError<T>(schema: ZodSchema<T>, data: unknown, context?: string): T;
|
|
6755
6740
|
|
|
6756
|
-
export { type Activity, type ActivityOrGroup, type ActivityType, type AdapterRunParams, type AdapterRunResult, type AmazonBedrockProviderConfig, type AnthropicProviderConfig, type AnthropicProviderSkill, type AnthropicProviderToolName, type AppendTextFileActivity, type AttemptCompletionActivity, type AzureOpenAIProviderToolName, type AzureOpenAiProviderConfig, BASE_SKILL_PREFIX,
|
|
6741
|
+
export { type Activity, type ActivityOrGroup, type ActivityType, type AdapterRunParams, type AdapterRunResult, type AmazonBedrockProviderConfig, type AnthropicProviderConfig, type AnthropicProviderSkill, type AnthropicProviderToolName, type AppendTextFileActivity, type AttemptCompletionActivity, type AzureOpenAIProviderToolName, type AzureOpenAiProviderConfig, BASE_SKILL_PREFIX, type BaseEvent, type BasePart, type BuiltinAnthropicSkill, type CallToolResultContent, type Checkpoint, type CheckpointStatus, type ClearTodoActivity, type CommandOptions, type CompleteActivity, type CreateCheckpointParams, type CreateDirectoryActivity, type CustomAnthropicSkill, type DeepseekProviderConfig, type DelegateActivity, type DelegateSkillManagerParams, type DelegationCompleteActivity, type DelegationTarget, type DeleteDirectoryActivity, type DeleteFileActivity, type EditTextFileActivity, type ErrorActivity, type EventForType, type EventMeta, type EventType, type ExecActivity, type Expert, type ExpertMessage, type ExpertStateEvent, type ExpertStateEventType, type FileBinaryPart, type FileInlinePart, type FileUrlPart, type GeneralToolActivity, type GetActivitiesParams, type GetFileInfoActivity, type GoogleGenerativeAiProviderConfig, type GoogleProviderToolName, type GoogleVertexProviderConfig, type Headers, type ImageBinaryPart, type ImageInlinePart, type ImageUrlPart, type InstructionMessage, type InteractiveSkill, type InteractiveSkillManagerParams, type InteractiveTool, type InteractiveToolActivity, type Job, type JobStatus, type ListDirectoryActivity, type Lockfile, type LockfileExpert, type LockfileToolDefinition, type McpSkillManagerParams, type McpSseSkill, type McpStdioSkill, type Message, type MessagePart, type MoveFileActivity, type OllamaProviderConfig, type OpenAIProviderToolName, type OpenAiProviderConfig, type ParallelActivitiesGroup, type PerstackConfig, type PerstackConfigExpert, type PerstackConfigSkill, type PerstackEvent, type PrerequisiteError, type PrerequisiteResult, type ProviderConfig, type ProviderName, type ProviderTable, type ProviderToolOptions, type QueryActivity, type ReadImageFileActivity, type ReadPdfFileActivity, type ReadTextFileActivity, type ReasoningBudget, type Resource, type RetryActivity, type RunCommandInput, type RunEvent, type RunInput, type RunParams, type RunParamsInput, type RunSetting, type RuntimeAdapter, type RuntimeEvent, type RuntimeEventForType, type RuntimeEventType, type RuntimeExpertConfig, type RuntimeName, SAFE_ENV_VARS, type Skill, type SkillManagerParams, type SkillType, type StartCommandInput, type Step, type Storage, type StreamingEvent, type StreamingEventType, type TextPart, type ThinkingPart, type TodoActivity, type ToolCall, type ToolCallPart, type ToolDefinition, type ToolMessage, type ToolResult, type ToolResultPart, type Usage, type UserMessage, type VertexProviderToolName, type WriteTextFileActivity, activityOrGroupSchema, activitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, appendTextFileActivitySchema, attemptCompletion, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createDirectoryActivitySchema, createEmptyUsage, createEvent, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries, defaultMaxSteps, defaultPerstackApiBaseUrl, defaultReasoningBudget, defaultTimeout, delegateActivitySchema, delegationCompleteActivitySchema, delegationTargetSchema, deleteDirectoryActivitySchema, deleteFileActivitySchema, domainPatternSchema, editTextFileActivitySchema, envNameRegex, errorActivitySchema, execActivitySchema, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileSearchOptionsSchema, fileUrlPartSchema, finishMcpTools, finishToolCall, formatZodError, generalToolActivitySchema, getActivities, getAdapter, getFileInfoActivitySchema, getFilteredEnv, getRegisteredRuntimes, googleGenerativeAiProviderConfigSchema, googleProviderToolNameSchema, googleVertexProviderConfigSchema, hasCustomProviderSkills, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolActivitySchema, interactiveToolSchema, isAdapterAvailable, isValidEventType, isValidRuntimeEventType, jobSchema, jobStatusSchema, knownModels, listDirectoryActivitySchema, lockfileExpertSchema, lockfileSchema, lockfileToolDefinitionSchema, maxApplicationNameLength, maxCheckpointToolCallIdLength, maxEnvNameLength, maxExpertDelegateItems, maxExpertDescriptionLength, maxExpertInstructionLength, maxExpertJobFileNameLength, maxExpertJobQueryLength, maxExpertKeyLength, maxExpertNameLength, maxExpertSkillItems, maxExpertTagItems, maxExpertVersionTagLength, maxOrganizationNameLength, maxSkillDescriptionLength, maxSkillEndpointLength, maxSkillInputJsonSchemaLength, maxSkillNameLength, maxSkillPickOmitItems, maxSkillRequiredEnvItems, maxSkillRuleLength, maxSkillToolItems, maxSkillToolNameLength, mcpSseSkillSchema, mcpStdioSkillSchema, messagePartSchema, messageSchema, moveFileActivitySchema, ollamaProviderConfigSchema, openAiProviderConfigSchema, openaiProviderToolNameSchema, organizationNameRegex, packageWithVersionRegex, parallelActivitiesGroupSchema, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, proceedToInteractiveTools, providerConfigSchema, providerNameSchema, providerTableSchema, providerToolOptionsSchema, queryActivitySchema, readImageFileActivitySchema, readPdfFileActivitySchema, readTextFileActivitySchema, reasoningBudgetSchema, registerAdapter, resolveToolResults, resumeFromStop, resumeToolCalls, retry, retryActivitySchema, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeNameSchema, skillSchema, skipDelegates, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByError, stopRunByExceededMaxSteps, stopRunByInteractiveTool, tagNameRegex, textPartSchema, thinkingPartSchema, todoActivitySchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, urlSafeRegex, usageSchema, userMessageSchema, validateEventFilter, vertexProviderToolNameSchema, webFetchOptionsSchema, webSearchOptionsSchema, writeTextFileActivitySchema };
|