@perstack/core 0.0.22 → 0.0.23
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/README.md +6 -0
- package/dist/src/index.d.ts +1075 -928
- package/dist/src/index.js +226 -11
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,108 +1,343 @@
|
|
|
1
|
+
import { ChildProcess } from 'node:child_process';
|
|
1
2
|
import { z, ZodError, ZodSchema } from 'zod';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
declare const urlSafeRegex: RegExp;
|
|
27
|
-
declare const maxSkillNameLength = 255;
|
|
28
|
-
declare const maxSkillDescriptionLength: number;
|
|
29
|
-
declare const maxSkillRuleLength: number;
|
|
30
|
-
declare const maxSkillPickOmitItems = 255;
|
|
31
|
-
declare const maxSkillRequiredEnvItems = 255;
|
|
32
|
-
declare const maxSkillToolNameLength = 255;
|
|
33
|
-
declare const maxSkillEndpointLength: number;
|
|
34
|
-
declare const maxSkillInputJsonSchemaLength: number;
|
|
35
|
-
declare const maxSkillToolItems = 255;
|
|
36
|
-
declare const maxCheckpointToolCallIdLength = 255;
|
|
37
|
-
declare const envNameRegex: RegExp;
|
|
38
|
-
declare const maxEnvNameLength = 255;
|
|
39
|
-
|
|
40
|
-
declare const knownModels: {
|
|
41
|
-
provider: string;
|
|
42
|
-
models: {
|
|
43
|
-
name: string;
|
|
44
|
-
contextWindow: number;
|
|
45
|
-
maxOutputTokens: number;
|
|
46
|
-
}[];
|
|
47
|
-
}[];
|
|
48
|
-
|
|
49
|
-
/** Base properties shared by all message parts */
|
|
50
|
-
interface BasePart {
|
|
51
|
-
/** Unique identifier for this part */
|
|
52
|
-
id: string;
|
|
4
|
+
/** MCP skill using stdio transport */
|
|
5
|
+
interface McpStdioSkill {
|
|
6
|
+
type: "mcpStdioSkill";
|
|
7
|
+
/** Skill name (derived from key) */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Human-readable description */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Usage rules for the LLM */
|
|
12
|
+
rule?: string;
|
|
13
|
+
/** Tool names to include (whitelist) */
|
|
14
|
+
pick: string[];
|
|
15
|
+
/** Tool names to exclude (blacklist) */
|
|
16
|
+
omit: string[];
|
|
17
|
+
/** Command to execute (e.g., "npx") */
|
|
18
|
+
command: string;
|
|
19
|
+
/** Package name for npx/uvx */
|
|
20
|
+
packageName?: string;
|
|
21
|
+
/** Additional arguments */
|
|
22
|
+
args: string[];
|
|
23
|
+
/** Environment variables required by this skill */
|
|
24
|
+
requiredEnv: string[];
|
|
25
|
+
/** Whether to delay initialization until first use */
|
|
26
|
+
lazyInit: boolean;
|
|
53
27
|
}
|
|
54
|
-
declare const
|
|
55
|
-
|
|
28
|
+
declare const mcpStdioSkillSchema: z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
description: z.ZodOptional<z.ZodString>;
|
|
32
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
33
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
34
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
35
|
+
command: z.ZodString;
|
|
36
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
37
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
38
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
39
|
+
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
56
40
|
}, z.core.$strip>;
|
|
57
|
-
/**
|
|
58
|
-
interface
|
|
59
|
-
type: "
|
|
60
|
-
/**
|
|
61
|
-
|
|
41
|
+
/** MCP skill using SSE transport */
|
|
42
|
+
interface McpSseSkill {
|
|
43
|
+
type: "mcpSseSkill";
|
|
44
|
+
/** Skill name (derived from key) */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Human-readable description */
|
|
47
|
+
description?: string;
|
|
48
|
+
/** Usage rules for the LLM */
|
|
49
|
+
rule?: string;
|
|
50
|
+
/** Tool names to include (whitelist) */
|
|
51
|
+
pick: string[];
|
|
52
|
+
/** Tool names to exclude (blacklist) */
|
|
53
|
+
omit: string[];
|
|
54
|
+
/** SSE endpoint URL */
|
|
55
|
+
endpoint: string;
|
|
62
56
|
}
|
|
63
|
-
declare const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
declare const mcpSseSkillSchema: z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
description: z.ZodOptional<z.ZodString>;
|
|
61
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
62
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
63
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
64
|
+
endpoint: z.ZodString;
|
|
67
65
|
}, z.core.$strip>;
|
|
68
|
-
/**
|
|
69
|
-
interface
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
/** Definition of an interactive tool within an interactive skill */
|
|
67
|
+
interface InteractiveTool {
|
|
68
|
+
/** Tool name */
|
|
69
|
+
name: string;
|
|
70
|
+
/** Human-readable description */
|
|
71
|
+
description?: string;
|
|
72
|
+
/** JSON Schema for tool input as a string */
|
|
73
|
+
inputJsonSchema: string;
|
|
75
74
|
}
|
|
76
|
-
declare const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
mimeType: z.ZodString;
|
|
75
|
+
declare const interactiveToolSchema: z.ZodObject<{
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
description: z.ZodOptional<z.ZodString>;
|
|
78
|
+
inputJsonSchema: z.ZodString;
|
|
81
79
|
}, z.core.$strip>;
|
|
82
|
-
/**
|
|
83
|
-
interface
|
|
84
|
-
type: "
|
|
85
|
-
/**
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
|
|
80
|
+
/** Skill that requires human interaction to complete tool calls */
|
|
81
|
+
interface InteractiveSkill {
|
|
82
|
+
type: "interactiveSkill";
|
|
83
|
+
/** Skill name (derived from key) */
|
|
84
|
+
name: string;
|
|
85
|
+
/** Human-readable description */
|
|
86
|
+
description?: string;
|
|
87
|
+
/** Usage rules for the LLM */
|
|
88
|
+
rule?: string;
|
|
89
|
+
/** Map of tool name to tool definition */
|
|
90
|
+
tools: Record<string, InteractiveTool>;
|
|
89
91
|
}
|
|
90
|
-
declare const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
declare const interactiveSkillSchema: z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
description: z.ZodOptional<z.ZodString>;
|
|
96
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
97
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
98
|
+
description: z.ZodOptional<z.ZodString>;
|
|
99
|
+
inputJsonSchema: z.ZodString;
|
|
100
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
101
|
+
[k: string]: {
|
|
102
|
+
name: string;
|
|
103
|
+
inputJsonSchema: string;
|
|
104
|
+
description?: string | undefined;
|
|
105
|
+
};
|
|
106
|
+
}, Record<string, {
|
|
107
|
+
inputJsonSchema: string;
|
|
108
|
+
description?: string | undefined;
|
|
109
|
+
}>>>;
|
|
95
110
|
}, z.core.$strip>;
|
|
96
|
-
/**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
111
|
+
/** All possible skill types */
|
|
112
|
+
type Skill = McpStdioSkill | McpSseSkill | InteractiveSkill;
|
|
113
|
+
declare const skillSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
description: z.ZodOptional<z.ZodString>;
|
|
117
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
118
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
119
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
120
|
+
command: z.ZodString;
|
|
121
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
122
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
123
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
124
|
+
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
125
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
description: z.ZodOptional<z.ZodString>;
|
|
129
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
130
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
131
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
132
|
+
endpoint: z.ZodString;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
135
|
+
name: z.ZodString;
|
|
136
|
+
description: z.ZodOptional<z.ZodString>;
|
|
137
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
138
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
139
|
+
description: z.ZodOptional<z.ZodString>;
|
|
140
|
+
inputJsonSchema: z.ZodString;
|
|
141
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
142
|
+
[k: string]: {
|
|
143
|
+
name: string;
|
|
144
|
+
inputJsonSchema: string;
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
};
|
|
147
|
+
}, Record<string, {
|
|
148
|
+
inputJsonSchema: string;
|
|
149
|
+
description?: string | undefined;
|
|
150
|
+
}>>>;
|
|
151
|
+
}, z.core.$strip>], "type">;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* An Expert definition - an AI agent with specific skills and instructions.
|
|
155
|
+
* Experts can delegate to other Experts and use MCP tools.
|
|
156
|
+
*/
|
|
157
|
+
interface Expert {
|
|
158
|
+
/** Unique key identifying this Expert (e.g., "my-expert" or "my-expert@1.0.0") */
|
|
159
|
+
key: string;
|
|
160
|
+
/** Display name for the Expert */
|
|
161
|
+
name: string;
|
|
162
|
+
/** Semantic version string */
|
|
163
|
+
version: string;
|
|
164
|
+
/** Human-readable description of what this Expert does */
|
|
165
|
+
description?: string;
|
|
166
|
+
/** System instruction defining the Expert's behavior */
|
|
167
|
+
instruction: string;
|
|
168
|
+
/** Map of skill name to skill configuration */
|
|
169
|
+
skills: Record<string, Skill>;
|
|
170
|
+
/** List of Expert keys this Expert can delegate to */
|
|
171
|
+
delegates: string[];
|
|
172
|
+
/** Tags for categorization and discovery */
|
|
173
|
+
tags: string[];
|
|
103
174
|
}
|
|
104
|
-
declare const
|
|
105
|
-
|
|
175
|
+
declare const expertSchema: z.ZodObject<{
|
|
176
|
+
key: z.ZodString;
|
|
177
|
+
name: z.ZodString;
|
|
178
|
+
version: z.ZodString;
|
|
179
|
+
description: z.ZodOptional<z.ZodString>;
|
|
180
|
+
instruction: z.ZodString;
|
|
181
|
+
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
183
|
+
description: z.ZodOptional<z.ZodString>;
|
|
184
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
185
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
186
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
187
|
+
command: z.ZodString;
|
|
188
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
189
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
190
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
191
|
+
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
193
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
194
|
+
description: z.ZodOptional<z.ZodString>;
|
|
195
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
196
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
197
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
198
|
+
endpoint: z.ZodString;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
201
|
+
description: z.ZodOptional<z.ZodString>;
|
|
202
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
203
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
204
|
+
description: z.ZodOptional<z.ZodString>;
|
|
205
|
+
inputJsonSchema: z.ZodString;
|
|
206
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
207
|
+
[k: string]: {
|
|
208
|
+
name: string;
|
|
209
|
+
inputJsonSchema: string;
|
|
210
|
+
description?: string | undefined;
|
|
211
|
+
};
|
|
212
|
+
}, Record<string, {
|
|
213
|
+
inputJsonSchema: string;
|
|
214
|
+
description?: string | undefined;
|
|
215
|
+
}>>>;
|
|
216
|
+
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
217
|
+
[k: string]: {
|
|
218
|
+
type: "mcpStdioSkill";
|
|
219
|
+
name: string;
|
|
220
|
+
pick: string[];
|
|
221
|
+
omit: string[];
|
|
222
|
+
command: string;
|
|
223
|
+
args: string[];
|
|
224
|
+
requiredEnv: string[];
|
|
225
|
+
lazyInit: boolean;
|
|
226
|
+
description?: string | undefined;
|
|
227
|
+
rule?: string | undefined;
|
|
228
|
+
packageName?: string | undefined;
|
|
229
|
+
} | {
|
|
230
|
+
type: "mcpSseSkill";
|
|
231
|
+
name: string;
|
|
232
|
+
pick: string[];
|
|
233
|
+
omit: string[];
|
|
234
|
+
endpoint: string;
|
|
235
|
+
description?: string | undefined;
|
|
236
|
+
rule?: string | undefined;
|
|
237
|
+
} | {
|
|
238
|
+
type: "interactiveSkill";
|
|
239
|
+
name: string;
|
|
240
|
+
tools: {
|
|
241
|
+
[k: string]: {
|
|
242
|
+
name: string;
|
|
243
|
+
inputJsonSchema: string;
|
|
244
|
+
description?: string | undefined;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
description?: string | undefined;
|
|
248
|
+
rule?: string | undefined;
|
|
249
|
+
};
|
|
250
|
+
}, Record<string, {
|
|
251
|
+
type: "mcpStdioSkill";
|
|
252
|
+
pick: string[];
|
|
253
|
+
omit: string[];
|
|
254
|
+
command: string;
|
|
255
|
+
args: string[];
|
|
256
|
+
requiredEnv: string[];
|
|
257
|
+
lazyInit: boolean;
|
|
258
|
+
description?: string | undefined;
|
|
259
|
+
rule?: string | undefined;
|
|
260
|
+
packageName?: string | undefined;
|
|
261
|
+
} | {
|
|
262
|
+
type: "mcpSseSkill";
|
|
263
|
+
pick: string[];
|
|
264
|
+
omit: string[];
|
|
265
|
+
endpoint: string;
|
|
266
|
+
description?: string | undefined;
|
|
267
|
+
rule?: string | undefined;
|
|
268
|
+
} | {
|
|
269
|
+
type: "interactiveSkill";
|
|
270
|
+
tools: {
|
|
271
|
+
[k: string]: {
|
|
272
|
+
name: string;
|
|
273
|
+
inputJsonSchema: string;
|
|
274
|
+
description?: string | undefined;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
description?: string | undefined;
|
|
278
|
+
rule?: string | undefined;
|
|
279
|
+
}>>>;
|
|
280
|
+
delegates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
281
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
|
|
284
|
+
/** Base properties shared by all message parts */
|
|
285
|
+
interface BasePart {
|
|
286
|
+
/** Unique identifier for this part */
|
|
287
|
+
id: string;
|
|
288
|
+
}
|
|
289
|
+
declare const basePartSchema: z.ZodObject<{
|
|
290
|
+
id: z.ZodString;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
/** Plain text content */
|
|
293
|
+
interface TextPart extends BasePart {
|
|
294
|
+
type: "textPart";
|
|
295
|
+
/** The text content */
|
|
296
|
+
text: string;
|
|
297
|
+
}
|
|
298
|
+
declare const textPartSchema: z.ZodObject<{
|
|
299
|
+
id: z.ZodString;
|
|
300
|
+
type: z.ZodLiteral<"textPart">;
|
|
301
|
+
text: z.ZodString;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
/** Image referenced by URL */
|
|
304
|
+
interface ImageUrlPart extends BasePart {
|
|
305
|
+
type: "imageUrlPart";
|
|
306
|
+
/** URL to the image */
|
|
307
|
+
url: string;
|
|
308
|
+
/** MIME type of the image */
|
|
309
|
+
mimeType: string;
|
|
310
|
+
}
|
|
311
|
+
declare const imageUrlPartSchema: z.ZodObject<{
|
|
312
|
+
id: z.ZodString;
|
|
313
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
314
|
+
url: z.ZodURL;
|
|
315
|
+
mimeType: z.ZodString;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
/** Image with base64-encoded inline data */
|
|
318
|
+
interface ImageInlinePart extends BasePart {
|
|
319
|
+
type: "imageInlinePart";
|
|
320
|
+
/** Base64-encoded image data */
|
|
321
|
+
encodedData: string;
|
|
322
|
+
/** MIME type of the image */
|
|
323
|
+
mimeType: string;
|
|
324
|
+
}
|
|
325
|
+
declare const imageInlinePartSchema: z.ZodObject<{
|
|
326
|
+
id: z.ZodString;
|
|
327
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
328
|
+
encodedData: z.ZodString;
|
|
329
|
+
mimeType: z.ZodString;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
/** Image with binary data (internal use) */
|
|
332
|
+
interface ImageBinaryPart extends BasePart {
|
|
333
|
+
type: "imageBinaryPart";
|
|
334
|
+
/** Binary data as string */
|
|
335
|
+
data: string;
|
|
336
|
+
/** MIME type of the image */
|
|
337
|
+
mimeType: string;
|
|
338
|
+
}
|
|
339
|
+
declare const imageBinaryPartSchema: z.ZodObject<{
|
|
340
|
+
id: z.ZodString;
|
|
106
341
|
type: z.ZodLiteral<"imageBinaryPart">;
|
|
107
342
|
data: z.ZodString;
|
|
108
343
|
mimeType: z.ZodString;
|
|
@@ -488,6 +723,15 @@ declare const messageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
488
723
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
489
724
|
}, z.core.$strip>]>;
|
|
490
725
|
|
|
726
|
+
type RuntimeName = "perstack" | "cursor" | "claude-code" | "gemini" | "docker";
|
|
727
|
+
declare const runtimeNameSchema: z.ZodEnum<{
|
|
728
|
+
perstack: "perstack";
|
|
729
|
+
cursor: "cursor";
|
|
730
|
+
"claude-code": "claude-code";
|
|
731
|
+
gemini: "gemini";
|
|
732
|
+
docker: "docker";
|
|
733
|
+
}>;
|
|
734
|
+
|
|
491
735
|
/** A tool call made by an Expert during execution */
|
|
492
736
|
interface ToolCall {
|
|
493
737
|
/** Unique identifier for this tool call */
|
|
@@ -522,699 +766,312 @@ declare const toolResultSchema: z.ZodObject<{
|
|
|
522
766
|
skillName: z.ZodString;
|
|
523
767
|
toolName: z.ZodString;
|
|
524
768
|
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
525
|
-
id: z.ZodString;
|
|
526
|
-
type: z.ZodLiteral<"textPart">;
|
|
527
|
-
text: z.ZodString;
|
|
528
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
529
|
-
id: z.ZodString;
|
|
530
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
531
|
-
url: z.ZodURL;
|
|
532
|
-
mimeType: z.ZodString;
|
|
533
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
534
|
-
id: z.ZodString;
|
|
535
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
536
|
-
encodedData: z.ZodString;
|
|
537
|
-
mimeType: z.ZodString;
|
|
538
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
539
|
-
id: z.ZodString;
|
|
540
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
541
|
-
data: z.ZodString;
|
|
542
|
-
mimeType: z.ZodString;
|
|
543
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
544
|
-
id: z.ZodString;
|
|
545
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
546
|
-
url: z.ZodString;
|
|
547
|
-
mimeType: z.ZodString;
|
|
548
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
549
|
-
id: z.ZodString;
|
|
550
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
551
|
-
encodedData: z.ZodString;
|
|
552
|
-
mimeType: z.ZodString;
|
|
553
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
554
|
-
id: z.ZodString;
|
|
555
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
556
|
-
data: z.ZodString;
|
|
557
|
-
mimeType: z.ZodString;
|
|
558
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
559
|
-
id: z.ZodString;
|
|
560
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
561
|
-
toolCallId: z.ZodString;
|
|
562
|
-
toolName: z.ZodString;
|
|
563
|
-
args: z.ZodUnknown;
|
|
564
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
565
|
-
id: z.ZodString;
|
|
566
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
567
|
-
toolCallId: z.ZodString;
|
|
568
|
-
toolName: z.ZodString;
|
|
569
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
570
|
-
id: z.ZodString;
|
|
571
|
-
type: z.ZodLiteral<"textPart">;
|
|
572
|
-
text: z.ZodString;
|
|
573
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
574
|
-
id: z.ZodString;
|
|
575
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
576
|
-
encodedData: z.ZodString;
|
|
577
|
-
mimeType: z.ZodString;
|
|
578
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
579
|
-
id: z.ZodString;
|
|
580
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
581
|
-
encodedData: z.ZodString;
|
|
582
|
-
mimeType: z.ZodString;
|
|
583
|
-
}, z.core.$strip>]>>;
|
|
584
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
585
|
-
}, z.core.$strip>], "type">>;
|
|
586
|
-
}, z.core.$strip>;
|
|
587
|
-
|
|
588
|
-
/** Token usage statistics for a single step or run */
|
|
589
|
-
interface Usage {
|
|
590
|
-
/** Number of tokens in the input prompt */
|
|
591
|
-
inputTokens: number;
|
|
592
|
-
/** Number of tokens generated in the response */
|
|
593
|
-
outputTokens: number;
|
|
594
|
-
/** Number of tokens used for reasoning (extended thinking) */
|
|
595
|
-
reasoningTokens: number;
|
|
596
|
-
/** Total tokens (input + output) */
|
|
597
|
-
totalTokens: number;
|
|
598
|
-
/** Number of input tokens served from cache */
|
|
599
|
-
cachedInputTokens: number;
|
|
600
|
-
}
|
|
601
|
-
declare const usageSchema: z.ZodObject<{
|
|
602
|
-
inputTokens: z.ZodNumber;
|
|
603
|
-
outputTokens: z.ZodNumber;
|
|
604
|
-
reasoningTokens: z.ZodNumber;
|
|
605
|
-
totalTokens: z.ZodNumber;
|
|
606
|
-
cachedInputTokens: z.ZodNumber;
|
|
607
|
-
}, z.core.$strip>;
|
|
608
|
-
|
|
609
|
-
/** Status of a checkpoint in the execution lifecycle */
|
|
610
|
-
type CheckpointStatus = "init" | "proceeding" | "completed" | "stoppedByInteractiveTool" | "stoppedByDelegate" | "stoppedByExceededMaxSteps" | "stoppedByError";
|
|
611
|
-
declare const checkpointStatusSchema: z.ZodEnum<{
|
|
612
|
-
init: "init";
|
|
613
|
-
proceeding: "proceeding";
|
|
614
|
-
completed: "completed";
|
|
615
|
-
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
616
|
-
stoppedByDelegate: "stoppedByDelegate";
|
|
617
|
-
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
618
|
-
stoppedByError: "stoppedByError";
|
|
619
|
-
}>;
|
|
620
|
-
/** Information about a delegation target */
|
|
621
|
-
interface DelegationTarget {
|
|
622
|
-
expert: {
|
|
623
|
-
key: string;
|
|
624
|
-
name: string;
|
|
625
|
-
version: string;
|
|
626
|
-
};
|
|
627
|
-
toolCallId: string;
|
|
628
|
-
toolName: string;
|
|
629
|
-
query: string;
|
|
630
|
-
}
|
|
631
|
-
/**
|
|
632
|
-
* A checkpoint represents a point-in-time snapshot of an Expert's execution state.
|
|
633
|
-
* Used for resuming, debugging, and observability.
|
|
634
|
-
*/
|
|
635
|
-
interface Checkpoint {
|
|
636
|
-
/** Unique identifier for this checkpoint */
|
|
637
|
-
id: string;
|
|
638
|
-
/** Job ID this checkpoint belongs to */
|
|
639
|
-
jobId: string;
|
|
640
|
-
/** Run ID this checkpoint belongs to */
|
|
641
|
-
runId: string;
|
|
642
|
-
/** Current execution status */
|
|
643
|
-
status: CheckpointStatus;
|
|
644
|
-
/** Current step number within this Run */
|
|
645
|
-
stepNumber: number;
|
|
646
|
-
/** All messages in the conversation so far */
|
|
647
|
-
messages: Message[];
|
|
648
|
-
/** Expert executing this checkpoint */
|
|
649
|
-
expert: {
|
|
650
|
-
/** Expert key (e.g., "my-expert@1.0.0") */
|
|
651
|
-
key: string;
|
|
652
|
-
/** Expert name */
|
|
653
|
-
name: string;
|
|
654
|
-
/** Expert version */
|
|
655
|
-
version: string;
|
|
656
|
-
};
|
|
657
|
-
/** If delegating, information about the target Expert(s) - supports parallel delegation */
|
|
658
|
-
delegateTo?: DelegationTarget[];
|
|
659
|
-
/** If delegated, information about the parent Expert */
|
|
660
|
-
delegatedBy?: {
|
|
661
|
-
/** The parent Expert that delegated */
|
|
662
|
-
expert: {
|
|
663
|
-
key: string;
|
|
664
|
-
name: string;
|
|
665
|
-
version: string;
|
|
666
|
-
};
|
|
667
|
-
/** Tool call ID from the parent */
|
|
668
|
-
toolCallId: string;
|
|
669
|
-
/** Name of the delegation tool */
|
|
670
|
-
toolName: string;
|
|
671
|
-
/** Checkpoint ID of the parent */
|
|
672
|
-
checkpointId: string;
|
|
673
|
-
};
|
|
674
|
-
/** Accumulated token usage */
|
|
675
|
-
usage: Usage;
|
|
676
|
-
/** Model's context window size in tokens */
|
|
677
|
-
contextWindow?: number;
|
|
678
|
-
/** Context window usage ratio (0-1) */
|
|
679
|
-
contextWindowUsage?: number;
|
|
680
|
-
/** Tool calls waiting to be processed (for resume after delegate/interactive) */
|
|
681
|
-
pendingToolCalls?: ToolCall[];
|
|
682
|
-
/** Partial tool results collected before stopping (for resume) */
|
|
683
|
-
partialToolResults?: ToolResult[];
|
|
684
|
-
}
|
|
685
|
-
declare const delegationTargetSchema: z.ZodObject<{
|
|
686
|
-
expert: z.ZodObject<{
|
|
687
|
-
key: z.ZodString;
|
|
688
|
-
name: z.ZodString;
|
|
689
|
-
version: z.ZodString;
|
|
690
|
-
}, z.core.$strip>;
|
|
691
|
-
toolCallId: z.ZodString;
|
|
692
|
-
toolName: z.ZodString;
|
|
693
|
-
query: z.ZodString;
|
|
694
|
-
}, z.core.$strip>;
|
|
695
|
-
declare const checkpointSchema: z.ZodObject<{
|
|
696
|
-
id: z.ZodString;
|
|
697
|
-
jobId: z.ZodString;
|
|
698
|
-
runId: z.ZodString;
|
|
699
|
-
status: z.ZodEnum<{
|
|
700
|
-
init: "init";
|
|
701
|
-
proceeding: "proceeding";
|
|
702
|
-
completed: "completed";
|
|
703
|
-
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
704
|
-
stoppedByDelegate: "stoppedByDelegate";
|
|
705
|
-
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
706
|
-
stoppedByError: "stoppedByError";
|
|
707
|
-
}>;
|
|
708
|
-
stepNumber: z.ZodNumber;
|
|
709
|
-
messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
710
|
-
id: z.ZodString;
|
|
711
|
-
type: z.ZodLiteral<"instructionMessage">;
|
|
712
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
713
|
-
id: z.ZodString;
|
|
714
|
-
type: z.ZodLiteral<"textPart">;
|
|
715
|
-
text: z.ZodString;
|
|
716
|
-
}, z.core.$strip>>;
|
|
717
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
718
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
719
|
-
id: z.ZodString;
|
|
720
|
-
type: z.ZodLiteral<"userMessage">;
|
|
721
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
722
|
-
id: z.ZodString;
|
|
723
|
-
type: z.ZodLiteral<"textPart">;
|
|
724
|
-
text: z.ZodString;
|
|
725
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
726
|
-
id: z.ZodString;
|
|
727
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
728
|
-
url: z.ZodURL;
|
|
729
|
-
mimeType: z.ZodString;
|
|
730
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
731
|
-
id: z.ZodString;
|
|
732
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
733
|
-
encodedData: z.ZodString;
|
|
734
|
-
mimeType: z.ZodString;
|
|
735
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
736
|
-
id: z.ZodString;
|
|
737
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
738
|
-
data: z.ZodString;
|
|
739
|
-
mimeType: z.ZodString;
|
|
740
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
741
|
-
id: z.ZodString;
|
|
742
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
743
|
-
url: z.ZodString;
|
|
744
|
-
mimeType: z.ZodString;
|
|
745
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
746
|
-
id: z.ZodString;
|
|
747
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
748
|
-
encodedData: z.ZodString;
|
|
749
|
-
mimeType: z.ZodString;
|
|
750
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
751
|
-
id: z.ZodString;
|
|
752
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
753
|
-
data: z.ZodString;
|
|
754
|
-
mimeType: z.ZodString;
|
|
755
|
-
}, z.core.$strip>]>>;
|
|
756
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
757
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
758
|
-
id: z.ZodString;
|
|
759
|
-
type: z.ZodLiteral<"expertMessage">;
|
|
760
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
761
|
-
id: z.ZodString;
|
|
762
|
-
type: z.ZodLiteral<"textPart">;
|
|
763
|
-
text: z.ZodString;
|
|
764
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
765
|
-
id: z.ZodString;
|
|
766
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
767
|
-
toolCallId: z.ZodString;
|
|
768
|
-
toolName: z.ZodString;
|
|
769
|
-
args: z.ZodUnknown;
|
|
770
|
-
}, z.core.$strip>]>>;
|
|
771
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
772
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
773
|
-
id: z.ZodString;
|
|
774
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
775
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
776
|
-
id: z.ZodString;
|
|
777
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
778
|
-
toolCallId: z.ZodString;
|
|
779
|
-
toolName: z.ZodString;
|
|
780
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
781
|
-
id: z.ZodString;
|
|
782
|
-
type: z.ZodLiteral<"textPart">;
|
|
783
|
-
text: z.ZodString;
|
|
784
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
785
|
-
id: z.ZodString;
|
|
786
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
787
|
-
encodedData: z.ZodString;
|
|
788
|
-
mimeType: z.ZodString;
|
|
789
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
790
|
-
id: z.ZodString;
|
|
791
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
792
|
-
encodedData: z.ZodString;
|
|
793
|
-
mimeType: z.ZodString;
|
|
794
|
-
}, z.core.$strip>]>>;
|
|
795
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
796
|
-
}, z.core.$strip>>;
|
|
797
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
798
|
-
}, z.core.$strip>]>>;
|
|
799
|
-
expert: z.ZodObject<{
|
|
800
|
-
key: z.ZodString;
|
|
801
|
-
name: z.ZodString;
|
|
802
|
-
version: z.ZodString;
|
|
803
|
-
}, z.core.$strip>;
|
|
804
|
-
delegateTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
805
|
-
expert: z.ZodObject<{
|
|
806
|
-
key: z.ZodString;
|
|
807
|
-
name: z.ZodString;
|
|
808
|
-
version: z.ZodString;
|
|
809
|
-
}, z.core.$strip>;
|
|
810
|
-
toolCallId: z.ZodString;
|
|
811
|
-
toolName: z.ZodString;
|
|
812
|
-
query: z.ZodString;
|
|
813
|
-
}, z.core.$strip>>>;
|
|
814
|
-
delegatedBy: z.ZodOptional<z.ZodObject<{
|
|
815
|
-
expert: z.ZodObject<{
|
|
816
|
-
key: z.ZodString;
|
|
817
|
-
name: z.ZodString;
|
|
818
|
-
version: z.ZodString;
|
|
819
|
-
}, z.core.$strip>;
|
|
820
|
-
toolCallId: z.ZodString;
|
|
821
|
-
toolName: z.ZodString;
|
|
822
|
-
checkpointId: z.ZodString;
|
|
823
|
-
}, z.core.$strip>>;
|
|
824
|
-
usage: z.ZodObject<{
|
|
825
|
-
inputTokens: z.ZodNumber;
|
|
826
|
-
outputTokens: z.ZodNumber;
|
|
827
|
-
reasoningTokens: z.ZodNumber;
|
|
828
|
-
totalTokens: z.ZodNumber;
|
|
829
|
-
cachedInputTokens: z.ZodNumber;
|
|
830
|
-
}, z.core.$strip>;
|
|
831
|
-
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
832
|
-
contextWindowUsage: z.ZodOptional<z.ZodNumber>;
|
|
833
|
-
pendingToolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
834
|
-
id: z.ZodString;
|
|
835
|
-
skillName: z.ZodString;
|
|
836
|
-
toolName: z.ZodString;
|
|
837
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
838
|
-
}, z.core.$strip>>>;
|
|
839
|
-
partialToolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
840
|
-
id: z.ZodString;
|
|
841
|
-
skillName: z.ZodString;
|
|
842
|
-
toolName: z.ZodString;
|
|
843
|
-
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
844
|
-
id: z.ZodString;
|
|
845
|
-
type: z.ZodLiteral<"textPart">;
|
|
846
|
-
text: z.ZodString;
|
|
847
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
848
|
-
id: z.ZodString;
|
|
849
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
850
|
-
url: z.ZodURL;
|
|
851
|
-
mimeType: z.ZodString;
|
|
852
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
853
|
-
id: z.ZodString;
|
|
854
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
855
|
-
encodedData: z.ZodString;
|
|
856
|
-
mimeType: z.ZodString;
|
|
857
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
858
|
-
id: z.ZodString;
|
|
859
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
860
|
-
data: z.ZodString;
|
|
861
|
-
mimeType: z.ZodString;
|
|
862
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
863
|
-
id: z.ZodString;
|
|
864
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
865
|
-
url: z.ZodString;
|
|
866
|
-
mimeType: z.ZodString;
|
|
867
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
868
|
-
id: z.ZodString;
|
|
869
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
870
|
-
encodedData: z.ZodString;
|
|
871
|
-
mimeType: z.ZodString;
|
|
872
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
873
|
-
id: z.ZodString;
|
|
874
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
875
|
-
data: z.ZodString;
|
|
876
|
-
mimeType: z.ZodString;
|
|
877
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
878
|
-
id: z.ZodString;
|
|
879
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
880
|
-
toolCallId: z.ZodString;
|
|
881
|
-
toolName: z.ZodString;
|
|
882
|
-
args: z.ZodUnknown;
|
|
883
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
884
|
-
id: z.ZodString;
|
|
885
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
886
|
-
toolCallId: z.ZodString;
|
|
887
|
-
toolName: z.ZodString;
|
|
888
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
889
|
-
id: z.ZodString;
|
|
890
|
-
type: z.ZodLiteral<"textPart">;
|
|
891
|
-
text: z.ZodString;
|
|
892
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
893
|
-
id: z.ZodString;
|
|
894
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
895
|
-
encodedData: z.ZodString;
|
|
896
|
-
mimeType: z.ZodString;
|
|
897
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
898
|
-
id: z.ZodString;
|
|
899
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
900
|
-
encodedData: z.ZodString;
|
|
901
|
-
mimeType: z.ZodString;
|
|
902
|
-
}, z.core.$strip>]>>;
|
|
903
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
904
|
-
}, z.core.$strip>], "type">>;
|
|
905
|
-
}, z.core.$strip>>>;
|
|
906
|
-
}, z.core.$strip>;
|
|
907
|
-
|
|
908
|
-
/** MCP skill using stdio transport */
|
|
909
|
-
interface McpStdioSkill {
|
|
910
|
-
type: "mcpStdioSkill";
|
|
911
|
-
/** Skill name (derived from key) */
|
|
912
|
-
name: string;
|
|
913
|
-
/** Human-readable description */
|
|
914
|
-
description?: string;
|
|
915
|
-
/** Usage rules for the LLM */
|
|
916
|
-
rule?: string;
|
|
917
|
-
/** Tool names to include (whitelist) */
|
|
918
|
-
pick: string[];
|
|
919
|
-
/** Tool names to exclude (blacklist) */
|
|
920
|
-
omit: string[];
|
|
921
|
-
/** Command to execute (e.g., "npx") */
|
|
922
|
-
command: string;
|
|
923
|
-
/** Package name for npx/uvx */
|
|
924
|
-
packageName?: string;
|
|
925
|
-
/** Additional arguments */
|
|
926
|
-
args: string[];
|
|
927
|
-
/** Environment variables required by this skill */
|
|
928
|
-
requiredEnv: string[];
|
|
929
|
-
/** Whether to delay initialization until first use */
|
|
930
|
-
lazyInit: boolean;
|
|
931
|
-
}
|
|
932
|
-
declare const mcpStdioSkillSchema: z.ZodObject<{
|
|
933
|
-
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
934
|
-
name: z.ZodString;
|
|
935
|
-
description: z.ZodOptional<z.ZodString>;
|
|
936
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
937
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
938
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
939
|
-
command: z.ZodString;
|
|
940
|
-
packageName: z.ZodOptional<z.ZodString>;
|
|
941
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
942
|
-
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
943
|
-
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
944
|
-
}, z.core.$strip>;
|
|
945
|
-
/** MCP skill using SSE transport */
|
|
946
|
-
interface McpSseSkill {
|
|
947
|
-
type: "mcpSseSkill";
|
|
948
|
-
/** Skill name (derived from key) */
|
|
949
|
-
name: string;
|
|
950
|
-
/** Human-readable description */
|
|
951
|
-
description?: string;
|
|
952
|
-
/** Usage rules for the LLM */
|
|
953
|
-
rule?: string;
|
|
954
|
-
/** Tool names to include (whitelist) */
|
|
955
|
-
pick: string[];
|
|
956
|
-
/** Tool names to exclude (blacklist) */
|
|
957
|
-
omit: string[];
|
|
958
|
-
/** SSE endpoint URL */
|
|
959
|
-
endpoint: string;
|
|
960
|
-
}
|
|
961
|
-
declare const mcpSseSkillSchema: z.ZodObject<{
|
|
962
|
-
type: z.ZodLiteral<"mcpSseSkill">;
|
|
963
|
-
name: z.ZodString;
|
|
964
|
-
description: z.ZodOptional<z.ZodString>;
|
|
965
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
966
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
967
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
968
|
-
endpoint: z.ZodString;
|
|
969
|
-
}, z.core.$strip>;
|
|
970
|
-
/** Definition of an interactive tool within an interactive skill */
|
|
971
|
-
interface InteractiveTool {
|
|
972
|
-
/** Tool name */
|
|
973
|
-
name: string;
|
|
974
|
-
/** Human-readable description */
|
|
975
|
-
description?: string;
|
|
976
|
-
/** JSON Schema for tool input as a string */
|
|
977
|
-
inputJsonSchema: string;
|
|
978
|
-
}
|
|
979
|
-
declare const interactiveToolSchema: z.ZodObject<{
|
|
980
|
-
name: z.ZodString;
|
|
981
|
-
description: z.ZodOptional<z.ZodString>;
|
|
982
|
-
inputJsonSchema: z.ZodString;
|
|
983
|
-
}, z.core.$strip>;
|
|
984
|
-
/** Skill that requires human interaction to complete tool calls */
|
|
985
|
-
interface InteractiveSkill {
|
|
986
|
-
type: "interactiveSkill";
|
|
987
|
-
/** Skill name (derived from key) */
|
|
988
|
-
name: string;
|
|
989
|
-
/** Human-readable description */
|
|
990
|
-
description?: string;
|
|
991
|
-
/** Usage rules for the LLM */
|
|
992
|
-
rule?: string;
|
|
993
|
-
/** Map of tool name to tool definition */
|
|
994
|
-
tools: Record<string, InteractiveTool>;
|
|
995
|
-
}
|
|
996
|
-
declare const interactiveSkillSchema: z.ZodObject<{
|
|
997
|
-
type: z.ZodLiteral<"interactiveSkill">;
|
|
998
|
-
name: z.ZodString;
|
|
999
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1000
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1001
|
-
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1002
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1003
|
-
inputJsonSchema: z.ZodString;
|
|
1004
|
-
}, z.core.$strip>>, z.ZodTransform<{
|
|
1005
|
-
[k: string]: {
|
|
1006
|
-
name: string;
|
|
1007
|
-
inputJsonSchema: string;
|
|
1008
|
-
description?: string | undefined;
|
|
1009
|
-
};
|
|
1010
|
-
}, Record<string, {
|
|
1011
|
-
inputJsonSchema: string;
|
|
1012
|
-
description?: string | undefined;
|
|
1013
|
-
}>>>;
|
|
1014
|
-
}, z.core.$strip>;
|
|
1015
|
-
/** All possible skill types */
|
|
1016
|
-
type Skill = McpStdioSkill | McpSseSkill | InteractiveSkill;
|
|
1017
|
-
declare const skillSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1018
|
-
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1019
|
-
name: z.ZodString;
|
|
1020
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1021
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1022
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1023
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1024
|
-
command: z.ZodString;
|
|
1025
|
-
packageName: z.ZodOptional<z.ZodString>;
|
|
1026
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1027
|
-
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1028
|
-
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1029
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1030
|
-
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1031
|
-
name: z.ZodString;
|
|
1032
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1033
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1034
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1035
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1036
|
-
endpoint: z.ZodString;
|
|
1037
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1038
|
-
type: z.ZodLiteral<"interactiveSkill">;
|
|
1039
|
-
name: z.ZodString;
|
|
1040
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1041
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1042
|
-
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1043
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1044
|
-
inputJsonSchema: z.ZodString;
|
|
1045
|
-
}, z.core.$strip>>, z.ZodTransform<{
|
|
1046
|
-
[k: string]: {
|
|
1047
|
-
name: string;
|
|
1048
|
-
inputJsonSchema: string;
|
|
1049
|
-
description?: string | undefined;
|
|
1050
|
-
};
|
|
1051
|
-
}, Record<string, {
|
|
1052
|
-
inputJsonSchema: string;
|
|
1053
|
-
description?: string | undefined;
|
|
1054
|
-
}>>>;
|
|
1055
|
-
}, z.core.$strip>], "type">;
|
|
1056
|
-
|
|
1057
|
-
/**
|
|
1058
|
-
* An Expert definition - an AI agent with specific skills and instructions.
|
|
1059
|
-
* Experts can delegate to other Experts and use MCP tools.
|
|
1060
|
-
*/
|
|
1061
|
-
interface Expert {
|
|
1062
|
-
/** Unique key identifying this Expert (e.g., "my-expert" or "my-expert@1.0.0") */
|
|
1063
|
-
key: string;
|
|
1064
|
-
/** Display name for the Expert */
|
|
1065
|
-
name: string;
|
|
1066
|
-
/** Semantic version string */
|
|
1067
|
-
version: string;
|
|
1068
|
-
/** Human-readable description of what this Expert does */
|
|
1069
|
-
description?: string;
|
|
1070
|
-
/** System instruction defining the Expert's behavior */
|
|
1071
|
-
instruction: string;
|
|
1072
|
-
/** Map of skill name to skill configuration */
|
|
1073
|
-
skills: Record<string, Skill>;
|
|
1074
|
-
/** List of Expert keys this Expert can delegate to */
|
|
1075
|
-
delegates: string[];
|
|
1076
|
-
/** Tags for categorization and discovery */
|
|
1077
|
-
tags: string[];
|
|
1078
|
-
}
|
|
1079
|
-
declare const expertSchema: z.ZodObject<{
|
|
1080
|
-
key: z.ZodString;
|
|
1081
|
-
name: z.ZodString;
|
|
1082
|
-
version: z.ZodString;
|
|
1083
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1084
|
-
instruction: z.ZodString;
|
|
1085
|
-
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1086
|
-
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1087
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1088
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1089
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1090
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1091
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1092
|
-
command: z.ZodString;
|
|
1093
|
-
packageName: z.ZodOptional<z.ZodString>;
|
|
1094
|
-
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1095
|
-
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1096
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1097
|
-
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1098
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1099
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1100
|
-
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1101
|
-
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1102
|
-
endpoint: z.ZodString;
|
|
1103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1104
|
-
type: z.ZodLiteral<"interactiveSkill">;
|
|
1105
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1106
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1107
|
-
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1108
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1109
|
-
inputJsonSchema: z.ZodString;
|
|
1110
|
-
}, z.core.$strip>>, z.ZodTransform<{
|
|
1111
|
-
[k: string]: {
|
|
1112
|
-
name: string;
|
|
1113
|
-
inputJsonSchema: string;
|
|
1114
|
-
description?: string | undefined;
|
|
1115
|
-
};
|
|
1116
|
-
}, Record<string, {
|
|
1117
|
-
inputJsonSchema: string;
|
|
1118
|
-
description?: string | undefined;
|
|
1119
|
-
}>>>;
|
|
1120
|
-
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
1121
|
-
[k: string]: {
|
|
1122
|
-
type: "mcpStdioSkill";
|
|
1123
|
-
name: string;
|
|
1124
|
-
pick: string[];
|
|
1125
|
-
omit: string[];
|
|
1126
|
-
command: string;
|
|
1127
|
-
args: string[];
|
|
1128
|
-
requiredEnv: string[];
|
|
1129
|
-
lazyInit: boolean;
|
|
1130
|
-
description?: string | undefined;
|
|
1131
|
-
rule?: string | undefined;
|
|
1132
|
-
packageName?: string | undefined;
|
|
1133
|
-
} | {
|
|
1134
|
-
type: "mcpSseSkill";
|
|
1135
|
-
name: string;
|
|
1136
|
-
pick: string[];
|
|
1137
|
-
omit: string[];
|
|
1138
|
-
endpoint: string;
|
|
1139
|
-
description?: string | undefined;
|
|
1140
|
-
rule?: string | undefined;
|
|
1141
|
-
} | {
|
|
1142
|
-
type: "interactiveSkill";
|
|
1143
|
-
name: string;
|
|
1144
|
-
tools: {
|
|
1145
|
-
[k: string]: {
|
|
1146
|
-
name: string;
|
|
1147
|
-
inputJsonSchema: string;
|
|
1148
|
-
description?: string | undefined;
|
|
1149
|
-
};
|
|
1150
|
-
};
|
|
1151
|
-
description?: string | undefined;
|
|
1152
|
-
rule?: string | undefined;
|
|
1153
|
-
};
|
|
1154
|
-
}, Record<string, {
|
|
1155
|
-
type: "mcpStdioSkill";
|
|
1156
|
-
args: string[];
|
|
1157
|
-
pick: string[];
|
|
1158
|
-
omit: string[];
|
|
1159
|
-
command: string;
|
|
1160
|
-
requiredEnv: string[];
|
|
1161
|
-
lazyInit: boolean;
|
|
1162
|
-
description?: string | undefined;
|
|
1163
|
-
rule?: string | undefined;
|
|
1164
|
-
packageName?: string | undefined;
|
|
1165
|
-
} | {
|
|
1166
|
-
type: "mcpSseSkill";
|
|
1167
|
-
pick: string[];
|
|
1168
|
-
omit: string[];
|
|
1169
|
-
endpoint: string;
|
|
1170
|
-
description?: string | undefined;
|
|
1171
|
-
rule?: string | undefined;
|
|
1172
|
-
} | {
|
|
1173
|
-
type: "interactiveSkill";
|
|
1174
|
-
tools: {
|
|
1175
|
-
[k: string]: {
|
|
1176
|
-
name: string;
|
|
1177
|
-
inputJsonSchema: string;
|
|
1178
|
-
description?: string | undefined;
|
|
1179
|
-
};
|
|
1180
|
-
};
|
|
1181
|
-
description?: string | undefined;
|
|
1182
|
-
rule?: string | undefined;
|
|
1183
|
-
}>>>;
|
|
1184
|
-
delegates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1185
|
-
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
769
|
+
id: z.ZodString;
|
|
770
|
+
type: z.ZodLiteral<"textPart">;
|
|
771
|
+
text: z.ZodString;
|
|
772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
773
|
+
id: z.ZodString;
|
|
774
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
775
|
+
url: z.ZodURL;
|
|
776
|
+
mimeType: z.ZodString;
|
|
777
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
778
|
+
id: z.ZodString;
|
|
779
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
780
|
+
encodedData: z.ZodString;
|
|
781
|
+
mimeType: z.ZodString;
|
|
782
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
783
|
+
id: z.ZodString;
|
|
784
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
785
|
+
data: z.ZodString;
|
|
786
|
+
mimeType: z.ZodString;
|
|
787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
788
|
+
id: z.ZodString;
|
|
789
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
790
|
+
url: z.ZodString;
|
|
791
|
+
mimeType: z.ZodString;
|
|
792
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
793
|
+
id: z.ZodString;
|
|
794
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
795
|
+
encodedData: z.ZodString;
|
|
796
|
+
mimeType: z.ZodString;
|
|
797
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
798
|
+
id: z.ZodString;
|
|
799
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
800
|
+
data: z.ZodString;
|
|
801
|
+
mimeType: z.ZodString;
|
|
802
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
803
|
+
id: z.ZodString;
|
|
804
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
805
|
+
toolCallId: z.ZodString;
|
|
806
|
+
toolName: z.ZodString;
|
|
807
|
+
args: z.ZodUnknown;
|
|
808
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
809
|
+
id: z.ZodString;
|
|
810
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
811
|
+
toolCallId: z.ZodString;
|
|
812
|
+
toolName: z.ZodString;
|
|
813
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
814
|
+
id: z.ZodString;
|
|
815
|
+
type: z.ZodLiteral<"textPart">;
|
|
816
|
+
text: z.ZodString;
|
|
817
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
818
|
+
id: z.ZodString;
|
|
819
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
820
|
+
encodedData: z.ZodString;
|
|
821
|
+
mimeType: z.ZodString;
|
|
822
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
823
|
+
id: z.ZodString;
|
|
824
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
825
|
+
encodedData: z.ZodString;
|
|
826
|
+
mimeType: z.ZodString;
|
|
827
|
+
}, z.core.$strip>]>>;
|
|
828
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
829
|
+
}, z.core.$strip>], "type">>;
|
|
1186
830
|
}, z.core.$strip>;
|
|
1187
831
|
|
|
1188
|
-
|
|
1189
|
-
|
|
832
|
+
/** Token usage statistics for a single step or run */
|
|
833
|
+
interface Usage {
|
|
834
|
+
/** Number of tokens in the input prompt */
|
|
835
|
+
inputTokens: number;
|
|
836
|
+
/** Number of tokens generated in the response */
|
|
837
|
+
outputTokens: number;
|
|
838
|
+
/** Number of tokens used for reasoning (extended thinking) */
|
|
839
|
+
reasoningTokens: number;
|
|
840
|
+
/** Total tokens (input + output) */
|
|
841
|
+
totalTokens: number;
|
|
842
|
+
/** Number of input tokens served from cache */
|
|
843
|
+
cachedInputTokens: number;
|
|
844
|
+
}
|
|
845
|
+
declare const usageSchema: 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
|
+
|
|
853
|
+
/** Status of a checkpoint in the execution lifecycle */
|
|
854
|
+
type CheckpointStatus = "init" | "proceeding" | "completed" | "stoppedByInteractiveTool" | "stoppedByDelegate" | "stoppedByExceededMaxSteps" | "stoppedByError";
|
|
855
|
+
declare const checkpointStatusSchema: z.ZodEnum<{
|
|
856
|
+
init: "init";
|
|
857
|
+
proceeding: "proceeding";
|
|
1190
858
|
completed: "completed";
|
|
1191
859
|
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
860
|
+
stoppedByDelegate: "stoppedByDelegate";
|
|
861
|
+
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
1192
862
|
stoppedByError: "stoppedByError";
|
|
1193
|
-
running: "running";
|
|
1194
|
-
stoppedByMaxSteps: "stoppedByMaxSteps";
|
|
1195
863
|
}>;
|
|
1196
|
-
|
|
864
|
+
/** Information about a delegation target */
|
|
865
|
+
interface DelegationTarget {
|
|
866
|
+
expert: {
|
|
867
|
+
key: string;
|
|
868
|
+
name: string;
|
|
869
|
+
version: string;
|
|
870
|
+
};
|
|
871
|
+
toolCallId: string;
|
|
872
|
+
toolName: string;
|
|
873
|
+
query: string;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* A checkpoint represents a point-in-time snapshot of an Expert's execution state.
|
|
877
|
+
* Used for resuming, debugging, and observability.
|
|
878
|
+
*/
|
|
879
|
+
interface Checkpoint {
|
|
880
|
+
/** Unique identifier for this checkpoint */
|
|
1197
881
|
id: string;
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
882
|
+
/** Job ID this checkpoint belongs to */
|
|
883
|
+
jobId: string;
|
|
884
|
+
/** Run ID this checkpoint belongs to */
|
|
885
|
+
runId: string;
|
|
886
|
+
/** Current execution status */
|
|
887
|
+
status: CheckpointStatus;
|
|
888
|
+
/** Current step number within this Run */
|
|
889
|
+
stepNumber: number;
|
|
890
|
+
/** All messages in the conversation so far */
|
|
891
|
+
messages: Message[];
|
|
892
|
+
/** Expert executing this checkpoint */
|
|
893
|
+
expert: {
|
|
894
|
+
/** Expert key (e.g., "my-expert@1.0.0") */
|
|
895
|
+
key: string;
|
|
896
|
+
/** Expert name */
|
|
897
|
+
name: string;
|
|
898
|
+
/** Expert version */
|
|
899
|
+
version: string;
|
|
900
|
+
};
|
|
901
|
+
/** If delegating, information about the target Expert(s) - supports parallel delegation */
|
|
902
|
+
delegateTo?: DelegationTarget[];
|
|
903
|
+
/** If delegated, information about the parent Expert */
|
|
904
|
+
delegatedBy?: {
|
|
905
|
+
/** The parent Expert that delegated */
|
|
906
|
+
expert: {
|
|
907
|
+
key: string;
|
|
908
|
+
name: string;
|
|
909
|
+
version: string;
|
|
910
|
+
};
|
|
911
|
+
/** Tool call ID from the parent */
|
|
912
|
+
toolCallId: string;
|
|
913
|
+
/** Name of the delegation tool */
|
|
914
|
+
toolName: string;
|
|
915
|
+
/** Checkpoint ID of the parent */
|
|
916
|
+
checkpointId: string;
|
|
917
|
+
};
|
|
918
|
+
/** Accumulated token usage */
|
|
1202
919
|
usage: Usage;
|
|
1203
|
-
|
|
1204
|
-
|
|
920
|
+
/** Model's context window size in tokens */
|
|
921
|
+
contextWindow?: number;
|
|
922
|
+
/** Context window usage ratio (0-1) */
|
|
923
|
+
contextWindowUsage?: number;
|
|
924
|
+
/** Tool calls waiting to be processed (for resume after delegate/interactive) */
|
|
925
|
+
pendingToolCalls?: ToolCall[];
|
|
926
|
+
/** Partial tool results collected before stopping (for resume) */
|
|
927
|
+
partialToolResults?: ToolResult[];
|
|
928
|
+
/** Optional metadata for runtime-specific information */
|
|
929
|
+
metadata?: {
|
|
930
|
+
/** Runtime that executed this checkpoint */
|
|
931
|
+
runtime?: RuntimeName;
|
|
932
|
+
/** Additional runtime-specific data */
|
|
933
|
+
[key: string]: unknown;
|
|
934
|
+
};
|
|
1205
935
|
}
|
|
1206
|
-
declare const
|
|
936
|
+
declare const delegationTargetSchema: z.ZodObject<{
|
|
937
|
+
expert: z.ZodObject<{
|
|
938
|
+
key: z.ZodString;
|
|
939
|
+
name: z.ZodString;
|
|
940
|
+
version: z.ZodString;
|
|
941
|
+
}, z.core.$strip>;
|
|
942
|
+
toolCallId: z.ZodString;
|
|
943
|
+
toolName: z.ZodString;
|
|
944
|
+
query: z.ZodString;
|
|
945
|
+
}, z.core.$strip>;
|
|
946
|
+
declare const checkpointSchema: z.ZodObject<{
|
|
1207
947
|
id: z.ZodString;
|
|
948
|
+
jobId: z.ZodString;
|
|
949
|
+
runId: z.ZodString;
|
|
1208
950
|
status: z.ZodEnum<{
|
|
951
|
+
init: "init";
|
|
952
|
+
proceeding: "proceeding";
|
|
1209
953
|
completed: "completed";
|
|
1210
954
|
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
955
|
+
stoppedByDelegate: "stoppedByDelegate";
|
|
956
|
+
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
1211
957
|
stoppedByError: "stoppedByError";
|
|
1212
|
-
running: "running";
|
|
1213
|
-
stoppedByMaxSteps: "stoppedByMaxSteps";
|
|
1214
958
|
}>;
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
959
|
+
stepNumber: z.ZodNumber;
|
|
960
|
+
messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
961
|
+
id: z.ZodString;
|
|
962
|
+
type: z.ZodLiteral<"instructionMessage">;
|
|
963
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
964
|
+
id: z.ZodString;
|
|
965
|
+
type: z.ZodLiteral<"textPart">;
|
|
966
|
+
text: z.ZodString;
|
|
967
|
+
}, z.core.$strip>>;
|
|
968
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
969
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
970
|
+
id: z.ZodString;
|
|
971
|
+
type: z.ZodLiteral<"userMessage">;
|
|
972
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
973
|
+
id: z.ZodString;
|
|
974
|
+
type: z.ZodLiteral<"textPart">;
|
|
975
|
+
text: z.ZodString;
|
|
976
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
977
|
+
id: z.ZodString;
|
|
978
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
979
|
+
url: z.ZodURL;
|
|
980
|
+
mimeType: z.ZodString;
|
|
981
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
982
|
+
id: z.ZodString;
|
|
983
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
984
|
+
encodedData: z.ZodString;
|
|
985
|
+
mimeType: z.ZodString;
|
|
986
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
987
|
+
id: z.ZodString;
|
|
988
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
989
|
+
data: z.ZodString;
|
|
990
|
+
mimeType: z.ZodString;
|
|
991
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
992
|
+
id: z.ZodString;
|
|
993
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
994
|
+
url: z.ZodString;
|
|
995
|
+
mimeType: z.ZodString;
|
|
996
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
997
|
+
id: z.ZodString;
|
|
998
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
999
|
+
encodedData: z.ZodString;
|
|
1000
|
+
mimeType: z.ZodString;
|
|
1001
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1002
|
+
id: z.ZodString;
|
|
1003
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
1004
|
+
data: z.ZodString;
|
|
1005
|
+
mimeType: z.ZodString;
|
|
1006
|
+
}, z.core.$strip>]>>;
|
|
1007
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1008
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1009
|
+
id: z.ZodString;
|
|
1010
|
+
type: z.ZodLiteral<"expertMessage">;
|
|
1011
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1012
|
+
id: z.ZodString;
|
|
1013
|
+
type: z.ZodLiteral<"textPart">;
|
|
1014
|
+
text: z.ZodString;
|
|
1015
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1016
|
+
id: z.ZodString;
|
|
1017
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
1018
|
+
toolCallId: z.ZodString;
|
|
1019
|
+
toolName: z.ZodString;
|
|
1020
|
+
args: z.ZodUnknown;
|
|
1021
|
+
}, z.core.$strip>]>>;
|
|
1022
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1023
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1024
|
+
id: z.ZodString;
|
|
1025
|
+
type: z.ZodLiteral<"toolMessage">;
|
|
1026
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
1027
|
+
id: z.ZodString;
|
|
1028
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
1029
|
+
toolCallId: z.ZodString;
|
|
1030
|
+
toolName: z.ZodString;
|
|
1031
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1032
|
+
id: z.ZodString;
|
|
1033
|
+
type: z.ZodLiteral<"textPart">;
|
|
1034
|
+
text: z.ZodString;
|
|
1035
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1036
|
+
id: z.ZodString;
|
|
1037
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
1038
|
+
encodedData: z.ZodString;
|
|
1039
|
+
mimeType: z.ZodString;
|
|
1040
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1041
|
+
id: z.ZodString;
|
|
1042
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
1043
|
+
encodedData: z.ZodString;
|
|
1044
|
+
mimeType: z.ZodString;
|
|
1045
|
+
}, z.core.$strip>]>>;
|
|
1046
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
1048
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1049
|
+
}, z.core.$strip>]>>;
|
|
1050
|
+
expert: z.ZodObject<{
|
|
1051
|
+
key: z.ZodString;
|
|
1052
|
+
name: z.ZodString;
|
|
1053
|
+
version: z.ZodString;
|
|
1054
|
+
}, z.core.$strip>;
|
|
1055
|
+
delegateTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1056
|
+
expert: z.ZodObject<{
|
|
1057
|
+
key: z.ZodString;
|
|
1058
|
+
name: z.ZodString;
|
|
1059
|
+
version: z.ZodString;
|
|
1060
|
+
}, z.core.$strip>;
|
|
1061
|
+
toolCallId: z.ZodString;
|
|
1062
|
+
toolName: z.ZodString;
|
|
1063
|
+
query: z.ZodString;
|
|
1064
|
+
}, z.core.$strip>>>;
|
|
1065
|
+
delegatedBy: z.ZodOptional<z.ZodObject<{
|
|
1066
|
+
expert: z.ZodObject<{
|
|
1067
|
+
key: z.ZodString;
|
|
1068
|
+
name: z.ZodString;
|
|
1069
|
+
version: z.ZodString;
|
|
1070
|
+
}, z.core.$strip>;
|
|
1071
|
+
toolCallId: z.ZodString;
|
|
1072
|
+
toolName: z.ZodString;
|
|
1073
|
+
checkpointId: z.ZodString;
|
|
1074
|
+
}, z.core.$strip>>;
|
|
1218
1075
|
usage: z.ZodObject<{
|
|
1219
1076
|
inputTokens: z.ZodNumber;
|
|
1220
1077
|
outputTokens: z.ZodNumber;
|
|
@@ -1222,10 +1079,93 @@ declare const jobSchema: z.ZodObject<{
|
|
|
1222
1079
|
totalTokens: z.ZodNumber;
|
|
1223
1080
|
cachedInputTokens: z.ZodNumber;
|
|
1224
1081
|
}, z.core.$strip>;
|
|
1225
|
-
|
|
1226
|
-
|
|
1082
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
1083
|
+
contextWindowUsage: z.ZodOptional<z.ZodNumber>;
|
|
1084
|
+
pendingToolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1085
|
+
id: z.ZodString;
|
|
1086
|
+
skillName: z.ZodString;
|
|
1087
|
+
toolName: z.ZodString;
|
|
1088
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1089
|
+
}, z.core.$strip>>>;
|
|
1090
|
+
partialToolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1091
|
+
id: z.ZodString;
|
|
1092
|
+
skillName: z.ZodString;
|
|
1093
|
+
toolName: z.ZodString;
|
|
1094
|
+
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1095
|
+
id: z.ZodString;
|
|
1096
|
+
type: z.ZodLiteral<"textPart">;
|
|
1097
|
+
text: z.ZodString;
|
|
1098
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1099
|
+
id: z.ZodString;
|
|
1100
|
+
type: z.ZodLiteral<"imageUrlPart">;
|
|
1101
|
+
url: z.ZodURL;
|
|
1102
|
+
mimeType: z.ZodString;
|
|
1103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1104
|
+
id: z.ZodString;
|
|
1105
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
1106
|
+
encodedData: z.ZodString;
|
|
1107
|
+
mimeType: z.ZodString;
|
|
1108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1109
|
+
id: z.ZodString;
|
|
1110
|
+
type: z.ZodLiteral<"imageBinaryPart">;
|
|
1111
|
+
data: z.ZodString;
|
|
1112
|
+
mimeType: z.ZodString;
|
|
1113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1114
|
+
id: z.ZodString;
|
|
1115
|
+
type: z.ZodLiteral<"fileUrlPart">;
|
|
1116
|
+
url: z.ZodString;
|
|
1117
|
+
mimeType: z.ZodString;
|
|
1118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1119
|
+
id: z.ZodString;
|
|
1120
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
1121
|
+
encodedData: z.ZodString;
|
|
1122
|
+
mimeType: z.ZodString;
|
|
1123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1124
|
+
id: z.ZodString;
|
|
1125
|
+
type: z.ZodLiteral<"fileBinaryPart">;
|
|
1126
|
+
data: z.ZodString;
|
|
1127
|
+
mimeType: z.ZodString;
|
|
1128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1129
|
+
id: z.ZodString;
|
|
1130
|
+
type: z.ZodLiteral<"toolCallPart">;
|
|
1131
|
+
toolCallId: z.ZodString;
|
|
1132
|
+
toolName: z.ZodString;
|
|
1133
|
+
args: z.ZodUnknown;
|
|
1134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1135
|
+
id: z.ZodString;
|
|
1136
|
+
type: z.ZodLiteral<"toolResultPart">;
|
|
1137
|
+
toolCallId: z.ZodString;
|
|
1138
|
+
toolName: z.ZodString;
|
|
1139
|
+
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1140
|
+
id: z.ZodString;
|
|
1141
|
+
type: z.ZodLiteral<"textPart">;
|
|
1142
|
+
text: z.ZodString;
|
|
1143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1144
|
+
id: z.ZodString;
|
|
1145
|
+
type: z.ZodLiteral<"imageInlinePart">;
|
|
1146
|
+
encodedData: z.ZodString;
|
|
1147
|
+
mimeType: z.ZodString;
|
|
1148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1149
|
+
id: z.ZodString;
|
|
1150
|
+
type: z.ZodLiteral<"fileInlinePart">;
|
|
1151
|
+
encodedData: z.ZodString;
|
|
1152
|
+
mimeType: z.ZodString;
|
|
1153
|
+
}, z.core.$strip>]>>;
|
|
1154
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
1155
|
+
}, z.core.$strip>], "type">>;
|
|
1156
|
+
}, z.core.$strip>>>;
|
|
1157
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
1158
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
1159
|
+
perstack: "perstack";
|
|
1160
|
+
cursor: "cursor";
|
|
1161
|
+
"claude-code": "claude-code";
|
|
1162
|
+
gemini: "gemini";
|
|
1163
|
+
docker: "docker";
|
|
1164
|
+
}>>;
|
|
1165
|
+
}, z.core.$loose>>;
|
|
1227
1166
|
}, z.core.$strip>;
|
|
1228
1167
|
|
|
1168
|
+
declare const domainPatternSchema: z.ZodString;
|
|
1229
1169
|
declare const anthropicSettingSchema: z.ZodObject<{
|
|
1230
1170
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1231
1171
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1358,6 +1298,7 @@ type PerstackConfigSkill = {
|
|
|
1358
1298
|
packageName?: string;
|
|
1359
1299
|
args?: string[];
|
|
1360
1300
|
requiredEnv?: string[];
|
|
1301
|
+
allowedDomains?: string[];
|
|
1361
1302
|
} | {
|
|
1362
1303
|
type: "mcpSseSkill";
|
|
1363
1304
|
description?: string;
|
|
@@ -1365,6 +1306,7 @@ type PerstackConfigSkill = {
|
|
|
1365
1306
|
pick?: string[];
|
|
1366
1307
|
omit?: string[];
|
|
1367
1308
|
endpoint: string;
|
|
1309
|
+
allowedDomains?: string[];
|
|
1368
1310
|
} | {
|
|
1369
1311
|
type: "interactiveSkill";
|
|
1370
1312
|
description?: string;
|
|
@@ -1402,6 +1344,8 @@ interface PerstackConfig {
|
|
|
1402
1344
|
model?: string;
|
|
1403
1345
|
/** Default temperature (0-1) */
|
|
1404
1346
|
temperature?: number;
|
|
1347
|
+
/** Default execution runtime */
|
|
1348
|
+
runtime?: RuntimeName;
|
|
1405
1349
|
/** Maximum steps per run */
|
|
1406
1350
|
maxSteps?: number;
|
|
1407
1351
|
/** Maximum retries on generation failure */
|
|
@@ -1476,6 +1420,13 @@ declare const perstackConfigSchema: z.ZodObject<{
|
|
|
1476
1420
|
}, z.core.$strip>], "providerName">>;
|
|
1477
1421
|
model: z.ZodOptional<z.ZodString>;
|
|
1478
1422
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
1423
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
1424
|
+
perstack: "perstack";
|
|
1425
|
+
cursor: "cursor";
|
|
1426
|
+
"claude-code": "claude-code";
|
|
1427
|
+
gemini: "gemini";
|
|
1428
|
+
docker: "docker";
|
|
1429
|
+
}>>;
|
|
1479
1430
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
1480
1431
|
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
1481
1432
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1494,6 +1445,7 @@ declare const perstackConfigSchema: z.ZodObject<{
|
|
|
1494
1445
|
packageName: z.ZodOptional<z.ZodString>;
|
|
1495
1446
|
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1496
1447
|
requiredEnv: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1448
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1497
1449
|
}, z.core.$strip>, z.ZodObject<{
|
|
1498
1450
|
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1499
1451
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1501,6 +1453,7 @@ declare const perstackConfigSchema: z.ZodObject<{
|
|
|
1501
1453
|
pick: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1502
1454
|
omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1503
1455
|
endpoint: z.ZodString;
|
|
1456
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1504
1457
|
}, z.core.$strip>, z.ZodObject<{
|
|
1505
1458
|
type: z.ZodLiteral<"interactiveSkill">;
|
|
1506
1459
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1527,11 +1480,11 @@ declare const providerNameSchema: z.ZodEnum<{
|
|
|
1527
1480
|
anthropic: "anthropic";
|
|
1528
1481
|
google: "google";
|
|
1529
1482
|
openai: "openai";
|
|
1530
|
-
deepseek: "deepseek";
|
|
1531
1483
|
ollama: "ollama";
|
|
1532
1484
|
"azure-openai": "azure-openai";
|
|
1533
1485
|
"amazon-bedrock": "amazon-bedrock";
|
|
1534
1486
|
"google-vertex": "google-vertex";
|
|
1487
|
+
deepseek: "deepseek";
|
|
1535
1488
|
}>;
|
|
1536
1489
|
/** Anthropic provider configuration */
|
|
1537
1490
|
interface AnthropicProviderConfig {
|
|
@@ -1714,136 +1667,24 @@ declare const providerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1714
1667
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1715
1668
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1716
1669
|
useDeploymentBasedUrls: z.ZodOptional<z.ZodBoolean>;
|
|
1717
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1718
|
-
providerName: z.ZodLiteral<"amazon-bedrock">;
|
|
1719
|
-
accessKeyId: z.ZodString;
|
|
1720
|
-
secretAccessKey: z.ZodString;
|
|
1721
|
-
region: z.ZodString;
|
|
1722
|
-
sessionToken: z.ZodOptional<z.ZodString>;
|
|
1723
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1724
|
-
providerName: z.ZodLiteral<"google-vertex">;
|
|
1725
|
-
project: z.ZodOptional<z.ZodString>;
|
|
1726
|
-
location: z.ZodOptional<z.ZodString>;
|
|
1727
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1728
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1729
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1730
|
-
providerName: z.ZodLiteral<"deepseek">;
|
|
1731
|
-
apiKey: z.ZodString;
|
|
1732
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1733
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1734
|
-
}, z.core.$strip>], "providerName">;
|
|
1735
|
-
|
|
1736
|
-
/** Parsed command options after transformation */
|
|
1737
|
-
interface CommandOptions {
|
|
1738
|
-
/** Path to perstack.toml config file */
|
|
1739
|
-
config?: string;
|
|
1740
|
-
/** LLM provider to use */
|
|
1741
|
-
provider?: ProviderName;
|
|
1742
|
-
/** Model name */
|
|
1743
|
-
model?: string;
|
|
1744
|
-
/** Temperature (0-1) */
|
|
1745
|
-
temperature?: number;
|
|
1746
|
-
/** Maximum steps */
|
|
1747
|
-
maxSteps?: number;
|
|
1748
|
-
/** Maximum retries */
|
|
1749
|
-
maxRetries?: number;
|
|
1750
|
-
/** Timeout in milliseconds */
|
|
1751
|
-
timeout?: number;
|
|
1752
|
-
/** Custom job ID */
|
|
1753
|
-
jobId?: string;
|
|
1754
|
-
/** Custom run ID */
|
|
1755
|
-
runId?: string;
|
|
1756
|
-
/** Paths to .env files */
|
|
1757
|
-
envPath?: string[];
|
|
1758
|
-
/** Enable verbose logging */
|
|
1759
|
-
verbose?: boolean;
|
|
1760
|
-
/** Continue most recent job */
|
|
1761
|
-
continue?: boolean;
|
|
1762
|
-
/** Continue specific job by ID */
|
|
1763
|
-
continueJob?: string;
|
|
1764
|
-
/** Resume from specific checkpoint (requires --continue or --continue-job) */
|
|
1765
|
-
resumeFrom?: string;
|
|
1766
|
-
/** Query is interactive tool call result */
|
|
1767
|
-
interactiveToolCallResult?: boolean;
|
|
1768
|
-
}
|
|
1769
|
-
/** Input for the `perstack run` command */
|
|
1770
|
-
interface RunCommandInput {
|
|
1771
|
-
/** Expert key to run */
|
|
1772
|
-
expertKey: string;
|
|
1773
|
-
/** Query or prompt */
|
|
1774
|
-
query: string;
|
|
1775
|
-
/** Command options */
|
|
1776
|
-
options: CommandOptions;
|
|
1777
|
-
}
|
|
1778
|
-
declare const runCommandInputSchema: z.ZodObject<{
|
|
1779
|
-
expertKey: z.ZodString;
|
|
1780
|
-
query: z.ZodString;
|
|
1781
|
-
options: z.ZodObject<{
|
|
1782
|
-
config: z.ZodOptional<z.ZodString>;
|
|
1783
|
-
provider: z.ZodOptional<z.ZodEnum<{
|
|
1784
|
-
anthropic: "anthropic";
|
|
1785
|
-
google: "google";
|
|
1786
|
-
openai: "openai";
|
|
1787
|
-
deepseek: "deepseek";
|
|
1788
|
-
ollama: "ollama";
|
|
1789
|
-
"azure-openai": "azure-openai";
|
|
1790
|
-
"amazon-bedrock": "amazon-bedrock";
|
|
1791
|
-
"google-vertex": "google-vertex";
|
|
1792
|
-
}>>;
|
|
1793
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1794
|
-
temperature: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1795
|
-
maxSteps: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1796
|
-
maxRetries: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1797
|
-
timeout: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1798
|
-
jobId: z.ZodOptional<z.ZodString>;
|
|
1799
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
1800
|
-
envPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1801
|
-
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
1802
|
-
continue: z.ZodOptional<z.ZodBoolean>;
|
|
1803
|
-
continueJob: z.ZodOptional<z.ZodString>;
|
|
1804
|
-
resumeFrom: z.ZodOptional<z.ZodString>;
|
|
1805
|
-
interactiveToolCallResult: z.ZodOptional<z.ZodBoolean>;
|
|
1806
|
-
}, z.core.$strip>;
|
|
1807
|
-
}, z.core.$strip>;
|
|
1808
|
-
/** Input for the `perstack start` command */
|
|
1809
|
-
interface StartCommandInput {
|
|
1810
|
-
/** Expert key to run (optional, prompts if not provided) */
|
|
1811
|
-
expertKey?: string;
|
|
1812
|
-
/** Query or prompt (optional, prompts if not provided) */
|
|
1813
|
-
query?: string;
|
|
1814
|
-
/** Command options */
|
|
1815
|
-
options: CommandOptions;
|
|
1816
|
-
}
|
|
1817
|
-
declare const startCommandInputSchema: z.ZodObject<{
|
|
1818
|
-
expertKey: z.ZodOptional<z.ZodString>;
|
|
1819
|
-
query: z.ZodOptional<z.ZodString>;
|
|
1820
|
-
options: z.ZodObject<{
|
|
1821
|
-
config: z.ZodOptional<z.ZodString>;
|
|
1822
|
-
provider: z.ZodOptional<z.ZodEnum<{
|
|
1823
|
-
anthropic: "anthropic";
|
|
1824
|
-
google: "google";
|
|
1825
|
-
openai: "openai";
|
|
1826
|
-
deepseek: "deepseek";
|
|
1827
|
-
ollama: "ollama";
|
|
1828
|
-
"azure-openai": "azure-openai";
|
|
1829
|
-
"amazon-bedrock": "amazon-bedrock";
|
|
1830
|
-
"google-vertex": "google-vertex";
|
|
1831
|
-
}>>;
|
|
1832
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1833
|
-
temperature: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1834
|
-
maxSteps: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1835
|
-
maxRetries: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1836
|
-
timeout: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
1837
|
-
jobId: z.ZodOptional<z.ZodString>;
|
|
1838
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
1839
|
-
envPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1840
|
-
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
1841
|
-
continue: z.ZodOptional<z.ZodBoolean>;
|
|
1842
|
-
continueJob: z.ZodOptional<z.ZodString>;
|
|
1843
|
-
resumeFrom: z.ZodOptional<z.ZodString>;
|
|
1844
|
-
interactiveToolCallResult: z.ZodOptional<z.ZodBoolean>;
|
|
1845
|
-
}, z.core.$strip>;
|
|
1846
|
-
}, z.core.$strip>;
|
|
1670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1671
|
+
providerName: z.ZodLiteral<"amazon-bedrock">;
|
|
1672
|
+
accessKeyId: z.ZodString;
|
|
1673
|
+
secretAccessKey: z.ZodString;
|
|
1674
|
+
region: z.ZodString;
|
|
1675
|
+
sessionToken: z.ZodOptional<z.ZodString>;
|
|
1676
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1677
|
+
providerName: z.ZodLiteral<"google-vertex">;
|
|
1678
|
+
project: z.ZodOptional<z.ZodString>;
|
|
1679
|
+
location: z.ZodOptional<z.ZodString>;
|
|
1680
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1681
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1682
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1683
|
+
providerName: z.ZodLiteral<"deepseek">;
|
|
1684
|
+
apiKey: z.ZodString;
|
|
1685
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1686
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1687
|
+
}, z.core.$strip>], "providerName">;
|
|
1847
1688
|
|
|
1848
1689
|
/**
|
|
1849
1690
|
* A single execution step in an Expert run.
|
|
@@ -2250,6 +2091,8 @@ interface RunSetting {
|
|
|
2250
2091
|
perstackBaseSkillCommand?: string[];
|
|
2251
2092
|
/** Environment variables to pass to skills */
|
|
2252
2093
|
env: Record<string, string>;
|
|
2094
|
+
/** HTTP proxy URL for API requests */
|
|
2095
|
+
proxyUrl?: string;
|
|
2253
2096
|
}
|
|
2254
2097
|
/** Parameters for starting a run */
|
|
2255
2098
|
interface RunParams {
|
|
@@ -2288,6 +2131,7 @@ type RunParamsInput = {
|
|
|
2288
2131
|
perstackApiKey?: string;
|
|
2289
2132
|
perstackBaseSkillCommand?: string[];
|
|
2290
2133
|
env?: Record<string, string>;
|
|
2134
|
+
proxyUrl?: string;
|
|
2291
2135
|
};
|
|
2292
2136
|
checkpoint?: Checkpoint;
|
|
2293
2137
|
};
|
|
@@ -2362,12 +2206,12 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2362
2206
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2363
2207
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
2364
2208
|
description: z.ZodOptional<z.ZodString>;
|
|
2365
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2366
2209
|
rule: z.ZodOptional<z.ZodString>;
|
|
2367
2210
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2368
2211
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2369
2212
|
command: z.ZodString;
|
|
2370
2213
|
packageName: z.ZodOptional<z.ZodString>;
|
|
2214
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2371
2215
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2372
2216
|
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2373
2217
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2430,10 +2274,10 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2430
2274
|
};
|
|
2431
2275
|
}, Record<string, {
|
|
2432
2276
|
type: "mcpStdioSkill";
|
|
2433
|
-
args: string[];
|
|
2434
2277
|
pick: string[];
|
|
2435
2278
|
omit: string[];
|
|
2436
2279
|
command: string;
|
|
2280
|
+
args: string[];
|
|
2437
2281
|
requiredEnv: string[];
|
|
2438
2282
|
lazyInit: boolean;
|
|
2439
2283
|
description?: string | undefined;
|
|
@@ -2471,6 +2315,7 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2471
2315
|
perstackApiKey: z.ZodOptional<z.ZodString>;
|
|
2472
2316
|
perstackBaseSkillCommand: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2473
2317
|
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2318
|
+
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
2474
2319
|
}, z.core.$strip>;
|
|
2475
2320
|
declare const runParamsSchema: z.ZodObject<{
|
|
2476
2321
|
setting: z.ZodObject<{
|
|
@@ -2536,19 +2381,19 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2536
2381
|
}, z.core.$strip>>;
|
|
2537
2382
|
}, z.core.$strip>;
|
|
2538
2383
|
experts: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2539
|
-
description: z.ZodOptional<z.ZodString>;
|
|
2540
2384
|
name: z.ZodString;
|
|
2385
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2541
2386
|
version: z.ZodString;
|
|
2542
2387
|
instruction: z.ZodString;
|
|
2543
2388
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2544
2389
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
2545
2390
|
description: z.ZodOptional<z.ZodString>;
|
|
2546
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2547
2391
|
rule: z.ZodOptional<z.ZodString>;
|
|
2548
2392
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2549
2393
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2550
2394
|
command: z.ZodString;
|
|
2551
2395
|
packageName: z.ZodOptional<z.ZodString>;
|
|
2396
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2552
2397
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2553
2398
|
lazyInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2554
2399
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2611,10 +2456,10 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2611
2456
|
};
|
|
2612
2457
|
}, Record<string, {
|
|
2613
2458
|
type: "mcpStdioSkill";
|
|
2614
|
-
args: string[];
|
|
2615
2459
|
pick: string[];
|
|
2616
2460
|
omit: string[];
|
|
2617
2461
|
command: string;
|
|
2462
|
+
args: string[];
|
|
2618
2463
|
requiredEnv: string[];
|
|
2619
2464
|
lazyInit: boolean;
|
|
2620
2465
|
description?: string | undefined;
|
|
@@ -2739,6 +2584,7 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2739
2584
|
perstackApiKey: z.ZodOptional<z.ZodString>;
|
|
2740
2585
|
perstackBaseSkillCommand: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2741
2586
|
env: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
2587
|
+
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
2742
2588
|
}, z.core.$strip>;
|
|
2743
2589
|
checkpoint: z.ZodOptional<z.ZodObject<{
|
|
2744
2590
|
id: z.ZodString;
|
|
@@ -2951,6 +2797,15 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2951
2797
|
isError: z.ZodOptional<z.ZodBoolean>;
|
|
2952
2798
|
}, z.core.$strip>], "type">>;
|
|
2953
2799
|
}, z.core.$strip>>>;
|
|
2800
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
2801
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
2802
|
+
perstack: "perstack";
|
|
2803
|
+
cursor: "cursor";
|
|
2804
|
+
"claude-code": "claude-code";
|
|
2805
|
+
gemini: "gemini";
|
|
2806
|
+
docker: "docker";
|
|
2807
|
+
}>>;
|
|
2808
|
+
}, z.core.$loose>>;
|
|
2954
2809
|
}, z.core.$strip>>;
|
|
2955
2810
|
}, z.core.$strip>;
|
|
2956
2811
|
/**
|
|
@@ -3064,7 +2919,7 @@ declare const startRun: (setting: RunSetting, checkpoint: Checkpoint, data: Omit
|
|
|
3064
2919
|
} & {
|
|
3065
2920
|
initialCheckpoint: Checkpoint;
|
|
3066
2921
|
inputMessages: (InstructionMessage | UserMessage | ToolMessage)[];
|
|
3067
|
-
}, "
|
|
2922
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3068
2923
|
type: "startRun";
|
|
3069
2924
|
} & {
|
|
3070
2925
|
initialCheckpoint: Checkpoint;
|
|
@@ -3074,7 +2929,7 @@ declare const startGeneration: (setting: RunSetting, checkpoint: Checkpoint, dat
|
|
|
3074
2929
|
type: "startGeneration";
|
|
3075
2930
|
} & {
|
|
3076
2931
|
messages: Message[];
|
|
3077
|
-
}, "
|
|
2932
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3078
2933
|
type: "startGeneration";
|
|
3079
2934
|
} & {
|
|
3080
2935
|
messages: Message[];
|
|
@@ -3087,7 +2942,7 @@ declare const retry: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<Ba
|
|
|
3087
2942
|
toolCalls?: ToolCall[];
|
|
3088
2943
|
toolResults?: ToolResult[];
|
|
3089
2944
|
usage: Usage;
|
|
3090
|
-
}, "
|
|
2945
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3091
2946
|
type: "retry";
|
|
3092
2947
|
} & {
|
|
3093
2948
|
reason: string;
|
|
@@ -3102,7 +2957,7 @@ declare const callTools: (setting: RunSetting, checkpoint: Checkpoint, data: Omi
|
|
|
3102
2957
|
newMessage: ExpertMessage;
|
|
3103
2958
|
toolCalls: ToolCall[];
|
|
3104
2959
|
usage: Usage;
|
|
3105
|
-
}, "
|
|
2960
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3106
2961
|
type: "callTools";
|
|
3107
2962
|
} & {
|
|
3108
2963
|
newMessage: ExpertMessage;
|
|
@@ -3115,7 +2970,7 @@ declare const callInteractiveTool: (setting: RunSetting, checkpoint: Checkpoint,
|
|
|
3115
2970
|
newMessage: ExpertMessage;
|
|
3116
2971
|
toolCall: ToolCall;
|
|
3117
2972
|
usage: Usage;
|
|
3118
|
-
}, "
|
|
2973
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3119
2974
|
type: "callInteractiveTool";
|
|
3120
2975
|
} & {
|
|
3121
2976
|
newMessage: ExpertMessage;
|
|
@@ -3128,7 +2983,7 @@ declare const callDelegate: (setting: RunSetting, checkpoint: Checkpoint, data:
|
|
|
3128
2983
|
newMessage: ExpertMessage;
|
|
3129
2984
|
toolCalls: ToolCall[];
|
|
3130
2985
|
usage: Usage;
|
|
3131
|
-
}, "
|
|
2986
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3132
2987
|
type: "callDelegate";
|
|
3133
2988
|
} & {
|
|
3134
2989
|
newMessage: ExpertMessage;
|
|
@@ -3139,7 +2994,7 @@ declare const resolveToolResults: (setting: RunSetting, checkpoint: Checkpoint,
|
|
|
3139
2994
|
type: "resolveToolResults";
|
|
3140
2995
|
} & {
|
|
3141
2996
|
toolResults: ToolResult[];
|
|
3142
|
-
}, "
|
|
2997
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3143
2998
|
type: "resolveToolResults";
|
|
3144
2999
|
} & {
|
|
3145
3000
|
toolResults: ToolResult[];
|
|
@@ -3148,7 +3003,7 @@ declare const resolveThought: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3148
3003
|
type: "resolveThought";
|
|
3149
3004
|
} & {
|
|
3150
3005
|
toolResult: ToolResult;
|
|
3151
|
-
}, "
|
|
3006
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3152
3007
|
type: "resolveThought";
|
|
3153
3008
|
} & {
|
|
3154
3009
|
toolResult: ToolResult;
|
|
@@ -3157,7 +3012,7 @@ declare const attemptCompletion: (setting: RunSetting, checkpoint: Checkpoint, d
|
|
|
3157
3012
|
type: "attemptCompletion";
|
|
3158
3013
|
} & {
|
|
3159
3014
|
toolResult: ToolResult;
|
|
3160
|
-
}, "
|
|
3015
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3161
3016
|
type: "attemptCompletion";
|
|
3162
3017
|
} & {
|
|
3163
3018
|
toolResult: ToolResult;
|
|
@@ -3166,7 +3021,7 @@ declare const finishToolCall: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3166
3021
|
type: "finishToolCall";
|
|
3167
3022
|
} & {
|
|
3168
3023
|
newMessages: (UserMessage | ToolMessage)[];
|
|
3169
|
-
}, "
|
|
3024
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3170
3025
|
type: "finishToolCall";
|
|
3171
3026
|
} & {
|
|
3172
3027
|
newMessages: (UserMessage | ToolMessage)[];
|
|
@@ -3176,7 +3031,7 @@ declare const resumeToolCalls: (setting: RunSetting, checkpoint: Checkpoint, dat
|
|
|
3176
3031
|
} & {
|
|
3177
3032
|
pendingToolCalls: ToolCall[];
|
|
3178
3033
|
partialToolResults: ToolResult[];
|
|
3179
|
-
}, "
|
|
3034
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3180
3035
|
type: "resumeToolCalls";
|
|
3181
3036
|
} & {
|
|
3182
3037
|
pendingToolCalls: ToolCall[];
|
|
@@ -3186,7 +3041,7 @@ declare const finishAllToolCalls: (setting: RunSetting, checkpoint: Checkpoint,
|
|
|
3186
3041
|
type: "finishAllToolCalls";
|
|
3187
3042
|
} & {
|
|
3188
3043
|
newMessages: (UserMessage | ToolMessage)[];
|
|
3189
|
-
}, "
|
|
3044
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3190
3045
|
type: "finishAllToolCalls";
|
|
3191
3046
|
} & {
|
|
3192
3047
|
newMessages: (UserMessage | ToolMessage)[];
|
|
@@ -3198,7 +3053,7 @@ declare const completeRun: (setting: RunSetting, checkpoint: Checkpoint, data: O
|
|
|
3198
3053
|
step: Step;
|
|
3199
3054
|
text: string;
|
|
3200
3055
|
usage: Usage;
|
|
3201
|
-
}, "
|
|
3056
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3202
3057
|
type: "completeRun";
|
|
3203
3058
|
} & {
|
|
3204
3059
|
checkpoint: Checkpoint;
|
|
@@ -3211,7 +3066,7 @@ declare const stopRunByInteractiveTool: (setting: RunSetting, checkpoint: Checkp
|
|
|
3211
3066
|
} & {
|
|
3212
3067
|
checkpoint: Checkpoint;
|
|
3213
3068
|
step: Step;
|
|
3214
|
-
}, "
|
|
3069
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3215
3070
|
type: "stopRunByInteractiveTool";
|
|
3216
3071
|
} & {
|
|
3217
3072
|
checkpoint: Checkpoint;
|
|
@@ -3222,7 +3077,7 @@ declare const stopRunByDelegate: (setting: RunSetting, checkpoint: Checkpoint, d
|
|
|
3222
3077
|
} & {
|
|
3223
3078
|
checkpoint: Checkpoint;
|
|
3224
3079
|
step: Step;
|
|
3225
|
-
}, "
|
|
3080
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3226
3081
|
type: "stopRunByDelegate";
|
|
3227
3082
|
} & {
|
|
3228
3083
|
checkpoint: Checkpoint;
|
|
@@ -3233,7 +3088,7 @@ declare const stopRunByExceededMaxSteps: (setting: RunSetting, checkpoint: Check
|
|
|
3233
3088
|
} & {
|
|
3234
3089
|
checkpoint: Checkpoint;
|
|
3235
3090
|
step: Step;
|
|
3236
|
-
}, "
|
|
3091
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3237
3092
|
type: "stopRunByExceededMaxSteps";
|
|
3238
3093
|
} & {
|
|
3239
3094
|
checkpoint: Checkpoint;
|
|
@@ -3245,7 +3100,7 @@ declare const continueToNextStep: (setting: RunSetting, checkpoint: Checkpoint,
|
|
|
3245
3100
|
checkpoint: Checkpoint;
|
|
3246
3101
|
step: Step;
|
|
3247
3102
|
nextCheckpoint: Checkpoint;
|
|
3248
|
-
}, "
|
|
3103
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3249
3104
|
type: "continueToNextStep";
|
|
3250
3105
|
} & {
|
|
3251
3106
|
checkpoint: Checkpoint;
|
|
@@ -3267,6 +3122,7 @@ interface BaseRuntimeEvent {
|
|
|
3267
3122
|
type RuntimeEventPayloads = {
|
|
3268
3123
|
initializeRuntime: {
|
|
3269
3124
|
runtimeVersion: string;
|
|
3125
|
+
runtime?: string;
|
|
3270
3126
|
expertName: string;
|
|
3271
3127
|
experts: string[];
|
|
3272
3128
|
model: string;
|
|
@@ -3302,6 +3158,9 @@ type RuntimeEventPayloads = {
|
|
|
3302
3158
|
skillDisconnected: {
|
|
3303
3159
|
skillName: string;
|
|
3304
3160
|
};
|
|
3161
|
+
streamingText: {
|
|
3162
|
+
text: string;
|
|
3163
|
+
};
|
|
3305
3164
|
};
|
|
3306
3165
|
/** All runtime event types */
|
|
3307
3166
|
type RuntimeEventType = keyof RuntimeEventPayloads;
|
|
@@ -3318,6 +3177,294 @@ type RuntimeEventForType<T extends RuntimeEventType> = Extract<RuntimeEvent, {
|
|
|
3318
3177
|
/** Factory function to create runtime events */
|
|
3319
3178
|
declare function createRuntimeEvent<T extends RuntimeEventType>(type: T, jobId: string, runId: string, data: Omit<RuntimeEventForType<T>, "type" | "id" | "timestamp" | "jobId" | "runId">): RuntimeEventForType<T>;
|
|
3320
3179
|
|
|
3180
|
+
type AdapterRunParams = {
|
|
3181
|
+
setting: RunParamsInput["setting"];
|
|
3182
|
+
config?: PerstackConfig;
|
|
3183
|
+
checkpoint?: Checkpoint;
|
|
3184
|
+
eventListener?: (event: RunEvent | RuntimeEvent) => void;
|
|
3185
|
+
storeCheckpoint?: (checkpoint: Checkpoint) => Promise<void>;
|
|
3186
|
+
retrieveCheckpoint?: (jobId: string, checkpointId: string) => Promise<Checkpoint>;
|
|
3187
|
+
};
|
|
3188
|
+
type AdapterRunResult = {
|
|
3189
|
+
checkpoint: Checkpoint;
|
|
3190
|
+
events: (RunEvent | RuntimeEvent)[];
|
|
3191
|
+
};
|
|
3192
|
+
interface RuntimeAdapter {
|
|
3193
|
+
readonly name: string;
|
|
3194
|
+
checkPrerequisites(): Promise<PrerequisiteResult>;
|
|
3195
|
+
convertExpert(expert: Expert): RuntimeExpertConfig;
|
|
3196
|
+
run(params: AdapterRunParams): Promise<AdapterRunResult>;
|
|
3197
|
+
}
|
|
3198
|
+
type PrerequisiteResult = {
|
|
3199
|
+
ok: true;
|
|
3200
|
+
} | {
|
|
3201
|
+
ok: false;
|
|
3202
|
+
error: PrerequisiteError;
|
|
3203
|
+
};
|
|
3204
|
+
type PrerequisiteError = {
|
|
3205
|
+
type: "cli-not-found" | "auth-missing" | "version-mismatch";
|
|
3206
|
+
message: string;
|
|
3207
|
+
helpUrl?: string;
|
|
3208
|
+
};
|
|
3209
|
+
type RuntimeExpertConfig = {
|
|
3210
|
+
instruction: string;
|
|
3211
|
+
};
|
|
3212
|
+
|
|
3213
|
+
type ExecResult = {
|
|
3214
|
+
stdout: string;
|
|
3215
|
+
stderr: string;
|
|
3216
|
+
exitCode: number;
|
|
3217
|
+
};
|
|
3218
|
+
declare abstract class BaseAdapter implements RuntimeAdapter {
|
|
3219
|
+
abstract readonly name: string;
|
|
3220
|
+
abstract checkPrerequisites(): Promise<PrerequisiteResult>;
|
|
3221
|
+
abstract run(params: AdapterRunParams): Promise<AdapterRunResult>;
|
|
3222
|
+
convertExpert(expert: Expert): RuntimeExpertConfig;
|
|
3223
|
+
protected execCommand(args: string[]): Promise<ExecResult>;
|
|
3224
|
+
protected executeWithTimeout(proc: ChildProcess, timeout: number): Promise<ExecResult>;
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
declare function createEmptyUsage(): Usage;
|
|
3228
|
+
type CreateCheckpointParams = {
|
|
3229
|
+
jobId: string;
|
|
3230
|
+
runId: string;
|
|
3231
|
+
expertKey: string;
|
|
3232
|
+
expert: {
|
|
3233
|
+
key: string;
|
|
3234
|
+
name: string;
|
|
3235
|
+
version: string;
|
|
3236
|
+
};
|
|
3237
|
+
output: string;
|
|
3238
|
+
runtime: RuntimeName;
|
|
3239
|
+
};
|
|
3240
|
+
declare function createNormalizedCheckpoint(params: CreateCheckpointParams): Checkpoint;
|
|
3241
|
+
declare function createRuntimeInitEvent(jobId: string, runId: string, expertName: string, runtime: RuntimeName, version: string, query?: string): RuntimeEvent;
|
|
3242
|
+
declare function createCompleteRunEvent(jobId: string, runId: string, expertKey: string, checkpoint: Checkpoint, output: string, startedAt?: number): RunEvent;
|
|
3243
|
+
declare function createStreamingTextEvent(jobId: string, runId: string, text: string): RuntimeEvent;
|
|
3244
|
+
declare function createCallToolsEvent(jobId: string, runId: string, expertKey: string, stepNumber: number, toolCalls: ToolCall[], _checkpoint: Checkpoint): RunEvent;
|
|
3245
|
+
declare function createResolveToolResultsEvent(jobId: string, runId: string, expertKey: string, stepNumber: number, toolResults: ToolResult[]): RunEvent;
|
|
3246
|
+
declare function createToolMessage(toolCallId: string, toolName: string, resultText: string): ToolMessage;
|
|
3247
|
+
|
|
3248
|
+
declare function registerAdapter(runtime: RuntimeName, factory: () => RuntimeAdapter): void;
|
|
3249
|
+
declare function getAdapter(runtime: RuntimeName): RuntimeAdapter;
|
|
3250
|
+
declare function isAdapterAvailable(runtime: RuntimeName): boolean;
|
|
3251
|
+
declare function getRegisteredRuntimes(): RuntimeName[];
|
|
3252
|
+
|
|
3253
|
+
declare const defaultPerstackApiBaseUrl = "https://api.perstack.ai";
|
|
3254
|
+
declare const organizationNameRegex: RegExp;
|
|
3255
|
+
declare const maxOrganizationNameLength = 128;
|
|
3256
|
+
declare const maxApplicationNameLength = 255;
|
|
3257
|
+
declare const expertKeyRegex: RegExp;
|
|
3258
|
+
declare const expertNameRegex: RegExp;
|
|
3259
|
+
declare const expertVersionRegex: RegExp;
|
|
3260
|
+
declare const tagNameRegex: RegExp;
|
|
3261
|
+
declare const maxExpertNameLength = 255;
|
|
3262
|
+
declare const maxExpertVersionTagLength = 255;
|
|
3263
|
+
declare const maxExpertKeyLength = 511;
|
|
3264
|
+
declare const maxExpertDescriptionLength: number;
|
|
3265
|
+
declare const maxExpertInstructionLength: number;
|
|
3266
|
+
declare const maxExpertSkillItems = 255;
|
|
3267
|
+
declare const maxExpertDelegateItems = 255;
|
|
3268
|
+
declare const maxExpertTagItems = 8;
|
|
3269
|
+
declare const defaultTemperature = 0;
|
|
3270
|
+
declare const defaultMaxSteps: undefined;
|
|
3271
|
+
declare const defaultMaxRetries = 5;
|
|
3272
|
+
declare const defaultTimeout: number;
|
|
3273
|
+
declare const maxExpertJobQueryLength: number;
|
|
3274
|
+
declare const maxExpertJobFileNameLength: number;
|
|
3275
|
+
declare const packageWithVersionRegex: RegExp;
|
|
3276
|
+
declare const urlSafeRegex: RegExp;
|
|
3277
|
+
declare const maxSkillNameLength = 255;
|
|
3278
|
+
declare const maxSkillDescriptionLength: number;
|
|
3279
|
+
declare const maxSkillRuleLength: number;
|
|
3280
|
+
declare const maxSkillPickOmitItems = 255;
|
|
3281
|
+
declare const maxSkillRequiredEnvItems = 255;
|
|
3282
|
+
declare const maxSkillToolNameLength = 255;
|
|
3283
|
+
declare const maxSkillEndpointLength: number;
|
|
3284
|
+
declare const maxSkillInputJsonSchemaLength: number;
|
|
3285
|
+
declare const maxSkillToolItems = 255;
|
|
3286
|
+
declare const maxCheckpointToolCallIdLength = 255;
|
|
3287
|
+
declare const envNameRegex: RegExp;
|
|
3288
|
+
declare const maxEnvNameLength = 255;
|
|
3289
|
+
|
|
3290
|
+
declare const knownModels: {
|
|
3291
|
+
provider: string;
|
|
3292
|
+
models: {
|
|
3293
|
+
name: string;
|
|
3294
|
+
contextWindow: number;
|
|
3295
|
+
maxOutputTokens: number;
|
|
3296
|
+
}[];
|
|
3297
|
+
}[];
|
|
3298
|
+
|
|
3299
|
+
type JobStatus = "running" | "completed" | "stoppedByMaxSteps" | "stoppedByInteractiveTool" | "stoppedByError";
|
|
3300
|
+
declare const jobStatusSchema: z.ZodEnum<{
|
|
3301
|
+
completed: "completed";
|
|
3302
|
+
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
3303
|
+
stoppedByError: "stoppedByError";
|
|
3304
|
+
running: "running";
|
|
3305
|
+
stoppedByMaxSteps: "stoppedByMaxSteps";
|
|
3306
|
+
}>;
|
|
3307
|
+
interface Job {
|
|
3308
|
+
id: string;
|
|
3309
|
+
status: JobStatus;
|
|
3310
|
+
coordinatorExpertKey: string;
|
|
3311
|
+
totalSteps: number;
|
|
3312
|
+
maxSteps?: number;
|
|
3313
|
+
usage: Usage;
|
|
3314
|
+
startedAt: number;
|
|
3315
|
+
finishedAt?: number;
|
|
3316
|
+
}
|
|
3317
|
+
declare const jobSchema: z.ZodObject<{
|
|
3318
|
+
id: z.ZodString;
|
|
3319
|
+
status: z.ZodEnum<{
|
|
3320
|
+
completed: "completed";
|
|
3321
|
+
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
3322
|
+
stoppedByError: "stoppedByError";
|
|
3323
|
+
running: "running";
|
|
3324
|
+
stoppedByMaxSteps: "stoppedByMaxSteps";
|
|
3325
|
+
}>;
|
|
3326
|
+
coordinatorExpertKey: z.ZodString;
|
|
3327
|
+
totalSteps: z.ZodNumber;
|
|
3328
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
3329
|
+
usage: z.ZodObject<{
|
|
3330
|
+
inputTokens: z.ZodNumber;
|
|
3331
|
+
outputTokens: z.ZodNumber;
|
|
3332
|
+
reasoningTokens: z.ZodNumber;
|
|
3333
|
+
totalTokens: z.ZodNumber;
|
|
3334
|
+
cachedInputTokens: z.ZodNumber;
|
|
3335
|
+
}, z.core.$strip>;
|
|
3336
|
+
startedAt: z.ZodNumber;
|
|
3337
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
3338
|
+
}, z.core.$strip>;
|
|
3339
|
+
|
|
3340
|
+
/** Parsed command options after transformation */
|
|
3341
|
+
interface CommandOptions {
|
|
3342
|
+
/** Path to perstack.toml config file */
|
|
3343
|
+
config?: string;
|
|
3344
|
+
/** LLM provider to use */
|
|
3345
|
+
provider?: ProviderName;
|
|
3346
|
+
/** Model name */
|
|
3347
|
+
model?: string;
|
|
3348
|
+
/** Temperature (0-1) */
|
|
3349
|
+
temperature?: number;
|
|
3350
|
+
/** Maximum steps */
|
|
3351
|
+
maxSteps?: number;
|
|
3352
|
+
/** Maximum retries */
|
|
3353
|
+
maxRetries?: number;
|
|
3354
|
+
/** Timeout in milliseconds */
|
|
3355
|
+
timeout?: number;
|
|
3356
|
+
/** Custom job ID */
|
|
3357
|
+
jobId?: string;
|
|
3358
|
+
/** Custom run ID */
|
|
3359
|
+
runId?: string;
|
|
3360
|
+
/** Paths to .env files */
|
|
3361
|
+
envPath?: string[];
|
|
3362
|
+
/** Enable verbose logging */
|
|
3363
|
+
verbose?: boolean;
|
|
3364
|
+
/** Continue most recent job */
|
|
3365
|
+
continue?: boolean;
|
|
3366
|
+
/** Continue specific job by ID */
|
|
3367
|
+
continueJob?: string;
|
|
3368
|
+
/** Resume from specific checkpoint (requires --continue or --continue-job) */
|
|
3369
|
+
resumeFrom?: string;
|
|
3370
|
+
/** Query is interactive tool call result */
|
|
3371
|
+
interactiveToolCallResult?: boolean;
|
|
3372
|
+
/** Execution runtime */
|
|
3373
|
+
runtime?: RuntimeName;
|
|
3374
|
+
}
|
|
3375
|
+
/** Input for the `perstack run` command */
|
|
3376
|
+
interface RunCommandInput {
|
|
3377
|
+
/** Expert key to run */
|
|
3378
|
+
expertKey: string;
|
|
3379
|
+
/** Query or prompt */
|
|
3380
|
+
query: string;
|
|
3381
|
+
/** Command options */
|
|
3382
|
+
options: CommandOptions;
|
|
3383
|
+
}
|
|
3384
|
+
declare const runCommandInputSchema: z.ZodObject<{
|
|
3385
|
+
expertKey: z.ZodString;
|
|
3386
|
+
query: z.ZodString;
|
|
3387
|
+
options: z.ZodObject<{
|
|
3388
|
+
config: z.ZodOptional<z.ZodString>;
|
|
3389
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
3390
|
+
anthropic: "anthropic";
|
|
3391
|
+
google: "google";
|
|
3392
|
+
openai: "openai";
|
|
3393
|
+
ollama: "ollama";
|
|
3394
|
+
"azure-openai": "azure-openai";
|
|
3395
|
+
"amazon-bedrock": "amazon-bedrock";
|
|
3396
|
+
"google-vertex": "google-vertex";
|
|
3397
|
+
deepseek: "deepseek";
|
|
3398
|
+
}>>;
|
|
3399
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3400
|
+
temperature: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3401
|
+
maxSteps: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3402
|
+
maxRetries: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3403
|
+
timeout: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3404
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
3405
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
3406
|
+
envPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3407
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
3408
|
+
continue: z.ZodOptional<z.ZodBoolean>;
|
|
3409
|
+
continueJob: z.ZodOptional<z.ZodString>;
|
|
3410
|
+
resumeFrom: z.ZodOptional<z.ZodString>;
|
|
3411
|
+
interactiveToolCallResult: z.ZodOptional<z.ZodBoolean>;
|
|
3412
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
3413
|
+
perstack: "perstack";
|
|
3414
|
+
cursor: "cursor";
|
|
3415
|
+
"claude-code": "claude-code";
|
|
3416
|
+
gemini: "gemini";
|
|
3417
|
+
docker: "docker";
|
|
3418
|
+
}>>;
|
|
3419
|
+
}, z.core.$strip>;
|
|
3420
|
+
}, z.core.$strip>;
|
|
3421
|
+
/** Input for the `perstack start` command */
|
|
3422
|
+
interface StartCommandInput {
|
|
3423
|
+
/** Expert key to run (optional, prompts if not provided) */
|
|
3424
|
+
expertKey?: string;
|
|
3425
|
+
/** Query or prompt (optional, prompts if not provided) */
|
|
3426
|
+
query?: string;
|
|
3427
|
+
/** Command options */
|
|
3428
|
+
options: CommandOptions;
|
|
3429
|
+
}
|
|
3430
|
+
declare const startCommandInputSchema: z.ZodObject<{
|
|
3431
|
+
expertKey: z.ZodOptional<z.ZodString>;
|
|
3432
|
+
query: z.ZodOptional<z.ZodString>;
|
|
3433
|
+
options: z.ZodObject<{
|
|
3434
|
+
config: z.ZodOptional<z.ZodString>;
|
|
3435
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
3436
|
+
anthropic: "anthropic";
|
|
3437
|
+
google: "google";
|
|
3438
|
+
openai: "openai";
|
|
3439
|
+
ollama: "ollama";
|
|
3440
|
+
"azure-openai": "azure-openai";
|
|
3441
|
+
"amazon-bedrock": "amazon-bedrock";
|
|
3442
|
+
"google-vertex": "google-vertex";
|
|
3443
|
+
deepseek: "deepseek";
|
|
3444
|
+
}>>;
|
|
3445
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3446
|
+
temperature: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3447
|
+
maxSteps: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3448
|
+
maxRetries: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3449
|
+
timeout: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
3450
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
3451
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
3452
|
+
envPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3453
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
3454
|
+
continue: z.ZodOptional<z.ZodBoolean>;
|
|
3455
|
+
continueJob: z.ZodOptional<z.ZodString>;
|
|
3456
|
+
resumeFrom: z.ZodOptional<z.ZodString>;
|
|
3457
|
+
interactiveToolCallResult: z.ZodOptional<z.ZodBoolean>;
|
|
3458
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
3459
|
+
perstack: "perstack";
|
|
3460
|
+
cursor: "cursor";
|
|
3461
|
+
"claude-code": "claude-code";
|
|
3462
|
+
gemini: "gemini";
|
|
3463
|
+
docker: "docker";
|
|
3464
|
+
}>>;
|
|
3465
|
+
}, z.core.$strip>;
|
|
3466
|
+
}, z.core.$strip>;
|
|
3467
|
+
|
|
3321
3468
|
/** Discriminator for skill manager types */
|
|
3322
3469
|
type SkillType = "mcp" | "interactive" | "delegate";
|
|
3323
3470
|
/** Parameters for initializing an MCP-based skill manager (stdio or SSE) */
|
|
@@ -3383,4 +3530,4 @@ type Resource = {
|
|
|
3383
3530
|
declare function formatZodError(error: ZodError): string;
|
|
3384
3531
|
declare function parseWithFriendlyError<T>(schema: ZodSchema<T>, data: unknown, context?: string): T;
|
|
3385
3532
|
|
|
3386
|
-
export { type AmazonBedrockProviderConfig, type AnthropicProviderConfig, type AzureOpenAiProviderConfig, type BaseEvent, type BasePart, type CallToolResultContent, type Checkpoint, type CheckpointStatus, type CommandOptions, type DeepseekProviderConfig, type DelegateSkillManagerParams, type DelegationTarget, type EventForType, type EventType, type Expert, type ExpertMessage, type FileBinaryPart, type FileInlinePart, type FileUrlPart, type GoogleGenerativeAiProviderConfig, type GoogleVertexProviderConfig, type Headers, type ImageBinaryPart, type ImageInlinePart, type ImageUrlPart, type InstructionMessage, type InteractiveSkill, type InteractiveSkillManagerParams, type InteractiveTool, type Job, type JobStatus, type McpSkillManagerParams, type McpSseSkill, type McpStdioSkill, type Message, type MessagePart, type OllamaProviderConfig, type OpenAiProviderConfig, type PerstackConfig, type PerstackConfigExpert, type PerstackConfigSkill, type ProviderConfig, type ProviderName, type ProviderTable, type Resource, type RunCommandInput, type RunEvent, type RunInput, type RunParams, type RunParamsInput, type RunSetting, type RuntimeEvent, type RuntimeEventForType, type RuntimeEventType, type Skill, type SkillManagerParams, type SkillType, type StartCommandInput, type Step, type TextPart, type ToolCall, type ToolCallPart, type ToolDefinition, type ToolMessage, type ToolResult, type ToolResultPart, type Usage, type UserMessage, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, attemptCompletion, azureOpenAiProviderConfigSchema, basePartSchema, callDelegate, callInteractiveTool, callTools, checkpointSchema, checkpointStatusSchema, completeRun, continueToNextStep, createEvent, createRuntimeEvent, deepseekProviderConfigSchema, defaultMaxRetries, defaultMaxSteps, defaultPerstackApiBaseUrl, defaultTemperature, defaultTimeout, delegationTargetSchema, envNameRegex, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileUrlPartSchema, finishAllToolCalls, finishToolCall, formatZodError, googleGenerativeAiProviderConfigSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolSchema, jobSchema, jobStatusSchema, knownModels, 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, ollamaProviderConfigSchema, openAiProviderConfigSchema, organizationNameRegex, packageWithVersionRegex, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, providerConfigSchema, providerNameSchema, providerTableSchema, resolveThought, resolveToolResults, resumeToolCalls, retry, runCommandInputSchema, runParamsSchema, runSettingSchema, skillSchema, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByExceededMaxSteps, stopRunByInteractiveTool, tagNameRegex, textPartSchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, urlSafeRegex, usageSchema, userMessageSchema };
|
|
3533
|
+
export { type AdapterRunParams, type AdapterRunResult, type AmazonBedrockProviderConfig, type AnthropicProviderConfig, type AzureOpenAiProviderConfig, BaseAdapter, type BaseEvent, type BasePart, type CallToolResultContent, type Checkpoint, type CheckpointStatus, type CommandOptions, type CreateCheckpointParams, type DeepseekProviderConfig, type DelegateSkillManagerParams, type DelegationTarget, type EventForType, type EventType, type ExecResult, type Expert, type ExpertMessage, type FileBinaryPart, type FileInlinePart, type FileUrlPart, type GoogleGenerativeAiProviderConfig, type GoogleVertexProviderConfig, type Headers, type ImageBinaryPart, type ImageInlinePart, type ImageUrlPart, type InstructionMessage, type InteractiveSkill, type InteractiveSkillManagerParams, type InteractiveTool, type Job, type JobStatus, type McpSkillManagerParams, type McpSseSkill, type McpStdioSkill, type Message, type MessagePart, type OllamaProviderConfig, type OpenAiProviderConfig, type PerstackConfig, type PerstackConfigExpert, type PerstackConfigSkill, type PrerequisiteError, type PrerequisiteResult, type ProviderConfig, type ProviderName, type ProviderTable, type Resource, type RunCommandInput, type RunEvent, type RunInput, type RunParams, type RunParamsInput, type RunSetting, type RuntimeAdapter, type RuntimeEvent, type RuntimeEventForType, type RuntimeEventType, type RuntimeExpertConfig, type RuntimeName, type Skill, type SkillManagerParams, type SkillType, type StartCommandInput, type Step, type TextPart, type ToolCall, type ToolCallPart, type ToolDefinition, type ToolMessage, type ToolResult, type ToolResultPart, type Usage, type UserMessage, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, attemptCompletion, azureOpenAiProviderConfigSchema, basePartSchema, callDelegate, callInteractiveTool, callTools, checkpointSchema, checkpointStatusSchema, completeRun, continueToNextStep, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStreamingTextEvent, createToolMessage, deepseekProviderConfigSchema, defaultMaxRetries, defaultMaxSteps, defaultPerstackApiBaseUrl, defaultTemperature, defaultTimeout, delegationTargetSchema, domainPatternSchema, envNameRegex, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileUrlPartSchema, finishAllToolCalls, finishToolCall, formatZodError, getAdapter, getRegisteredRuntimes, googleGenerativeAiProviderConfigSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolSchema, isAdapterAvailable, jobSchema, jobStatusSchema, knownModels, 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, ollamaProviderConfigSchema, openAiProviderConfigSchema, organizationNameRegex, packageWithVersionRegex, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, providerConfigSchema, providerNameSchema, providerTableSchema, registerAdapter, resolveThought, resolveToolResults, resumeToolCalls, retry, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeNameSchema, skillSchema, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByExceededMaxSteps, stopRunByInteractiveTool, tagNameRegex, textPartSchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, urlSafeRegex, usageSchema, userMessageSchema };
|