@polka-codes/core 0.9.80 → 0.9.82
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 +3 -4
- package/dist/index.js +1707 -1286
- package/package.json +1 -1
- package/dist/_tsup-dts-rollup.d.ts +0 -1775
- package/dist/index.d.ts +0 -115
|
@@ -1,1775 +0,0 @@
|
|
|
1
|
-
import { $strip } from 'zod/v4/core';
|
|
2
|
-
import type { FilePart } from 'ai';
|
|
3
|
-
import type { ImagePart } from 'ai';
|
|
4
|
-
import type { JSONValue } from '@ai-sdk/provider';
|
|
5
|
-
import type { LanguageModelV2 } from '@ai-sdk/provider';
|
|
6
|
-
import type { LanguageModelV2ToolResultOutput } from '@ai-sdk/provider';
|
|
7
|
-
import type { LanguageModelV2Usage } from '@ai-sdk/provider';
|
|
8
|
-
import type { ModelMessage } from '@ai-sdk/provider-utils';
|
|
9
|
-
import type { ProviderOptions } from '@ai-sdk/provider-utils';
|
|
10
|
-
import type { ReasoningPart } from '@ai-sdk/provider-utils';
|
|
11
|
-
import type { SystemModelMessage } from '@ai-sdk/provider-utils';
|
|
12
|
-
import type { TextPart } from 'ai';
|
|
13
|
-
import type { TextPart as TextPart_2 } from '@ai-sdk/provider-utils';
|
|
14
|
-
import type { ToolModelMessage } from '@ai-sdk/provider-utils';
|
|
15
|
-
import type { ToolResultPart } from '@ai-sdk/provider-utils';
|
|
16
|
-
import { ToolSet } from 'ai';
|
|
17
|
-
import { z } from 'zod';
|
|
18
|
-
import { ZodEnum } from 'zod';
|
|
19
|
-
import { ZodNullable } from 'zod';
|
|
20
|
-
import { ZodObject } from 'zod';
|
|
21
|
-
import { ZodOptional } from 'zod';
|
|
22
|
-
import { ZodString } from 'zod';
|
|
23
|
-
|
|
24
|
-
declare type AgentToolInfo = {
|
|
25
|
-
name: string;
|
|
26
|
-
description: string;
|
|
27
|
-
parameters: z.ZodObject<any>;
|
|
28
|
-
};
|
|
29
|
-
export { AgentToolInfo }
|
|
30
|
-
export { AgentToolInfo as AgentToolInfo_alias_1 }
|
|
31
|
-
|
|
32
|
-
declare type AgentToolRegistry = {
|
|
33
|
-
generateText: {
|
|
34
|
-
input: {
|
|
35
|
-
messages: JsonModelMessage[];
|
|
36
|
-
tools: ToolSet;
|
|
37
|
-
model?: string;
|
|
38
|
-
};
|
|
39
|
-
output: JsonResponseMessage[];
|
|
40
|
-
};
|
|
41
|
-
taskEvent: {
|
|
42
|
-
input: TaskEvent;
|
|
43
|
-
output: void;
|
|
44
|
-
};
|
|
45
|
-
invokeTool: {
|
|
46
|
-
input: {
|
|
47
|
-
toolName: string;
|
|
48
|
-
input: any;
|
|
49
|
-
};
|
|
50
|
-
output: AgentToolResponse;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export { AgentToolRegistry }
|
|
54
|
-
export { AgentToolRegistry as AgentToolRegistry_alias_1 }
|
|
55
|
-
export { AgentToolRegistry as AgentToolRegistry_alias_2 }
|
|
56
|
-
|
|
57
|
-
declare type AgentToolResponse = ToolResponseReply | ToolResponseExit | ToolResponseError;
|
|
58
|
-
export { AgentToolResponse }
|
|
59
|
-
export { AgentToolResponse as AgentToolResponse_alias_1 }
|
|
60
|
-
|
|
61
|
-
declare const agentWorkflow: WorkflowFn<AgentWorkflowInput, ExitReason, AgentToolRegistry>;
|
|
62
|
-
export { agentWorkflow }
|
|
63
|
-
export { agentWorkflow as agentWorkflow_alias_1 }
|
|
64
|
-
export { agentWorkflow as agentWorkflow_alias_2 }
|
|
65
|
-
|
|
66
|
-
declare type AgentWorkflowInput = {
|
|
67
|
-
tools: Readonly<FullAgentToolInfo[]>;
|
|
68
|
-
maxToolRoundTrips?: number;
|
|
69
|
-
userMessage: readonly JsonUserModelMessage[];
|
|
70
|
-
outputSchema?: z.ZodSchema;
|
|
71
|
-
model?: string;
|
|
72
|
-
} & ({
|
|
73
|
-
messages: JsonModelMessage[];
|
|
74
|
-
} | {
|
|
75
|
-
systemPrompt: string;
|
|
76
|
-
});
|
|
77
|
-
export { AgentWorkflowInput }
|
|
78
|
-
export { AgentWorkflowInput as AgentWorkflowInput_alias_1 }
|
|
79
|
-
export { AgentWorkflowInput as AgentWorkflowInput_alias_2 }
|
|
80
|
-
|
|
81
|
-
declare type CommandProvider = {
|
|
82
|
-
executeCommand?: (command: string, needApprove: boolean) => Promise<{
|
|
83
|
-
stdout: string;
|
|
84
|
-
stderr: string;
|
|
85
|
-
exitCode: number;
|
|
86
|
-
summary?: string;
|
|
87
|
-
}>;
|
|
88
|
-
};
|
|
89
|
-
export { CommandProvider }
|
|
90
|
-
export { CommandProvider as CommandProvider_alias_1 }
|
|
91
|
-
export { CommandProvider as CommandProvider_alias_2 }
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Utility to compute exponential backoff delays for rate-limit handling. generated by polka.codes
|
|
95
|
-
*
|
|
96
|
-
* The backoff starts at baseSeconds and doubles each time, capped at capSeconds.
|
|
97
|
-
* Example with base=2, cap=60: 2, 4, 8, 16, 32, 60, 60, ...
|
|
98
|
-
*/
|
|
99
|
-
declare function computeRateLimitBackoffSeconds(count: number, baseSeconds?: number, capSeconds?: number): number;
|
|
100
|
-
export { computeRateLimitBackoffSeconds }
|
|
101
|
-
export { computeRateLimitBackoffSeconds as computeRateLimitBackoffSeconds_alias_1 }
|
|
102
|
-
|
|
103
|
-
declare type Config = NonNullable<z.infer<typeof configSchema>>;
|
|
104
|
-
export { Config }
|
|
105
|
-
export { Config as Config_alias_1 }
|
|
106
|
-
|
|
107
|
-
declare type ConfigRule = z.infer<typeof ruleSchema>;
|
|
108
|
-
export { ConfigRule }
|
|
109
|
-
export { ConfigRule as ConfigRule_alias_1 }
|
|
110
|
-
|
|
111
|
-
declare const configSchema: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
112
|
-
prices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
113
|
-
inputPrice: z.ZodOptional<z.ZodNumber>;
|
|
114
|
-
outputPrice: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
cacheWritesPrice: z.ZodOptional<z.ZodNumber>;
|
|
116
|
-
cacheReadsPrice: z.ZodOptional<z.ZodNumber>;
|
|
117
|
-
}, z.core.$strip>>>>;
|
|
118
|
-
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
119
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
120
|
-
defaultModel: z.ZodOptional<z.ZodString>;
|
|
121
|
-
defaultParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
122
|
-
location: z.ZodOptional<z.ZodString>;
|
|
123
|
-
project: z.ZodOptional<z.ZodString>;
|
|
124
|
-
keyFile: z.ZodOptional<z.ZodString>;
|
|
125
|
-
}, z.core.$strip>>>;
|
|
126
|
-
defaultProvider: z.ZodOptional<z.ZodString>;
|
|
127
|
-
defaultModel: z.ZodOptional<z.ZodString>;
|
|
128
|
-
defaultParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
129
|
-
maxMessageCount: z.ZodOptional<z.ZodNumber>;
|
|
130
|
-
budget: z.ZodOptional<z.ZodNumber>;
|
|
131
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
132
|
-
requestTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
133
|
-
summaryThreshold: z.ZodOptional<z.ZodNumber>;
|
|
134
|
-
scripts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
135
|
-
command: z.ZodString;
|
|
136
|
-
description: z.ZodString;
|
|
137
|
-
}, z.core.$strip>]>>>;
|
|
138
|
-
commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
139
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
140
|
-
model: z.ZodOptional<z.ZodString>;
|
|
141
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
142
|
-
budget: z.ZodOptional<z.ZodNumber>;
|
|
143
|
-
}, z.core.$strip>>>;
|
|
144
|
-
tools: z.ZodOptional<z.ZodObject<{
|
|
145
|
-
search: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
146
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
147
|
-
model: z.ZodOptional<z.ZodString>;
|
|
148
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
149
|
-
budget: z.ZodOptional<z.ZodNumber>;
|
|
150
|
-
}, z.core.$strip>, z.ZodBoolean]>>;
|
|
151
|
-
}, z.core.$strip>>;
|
|
152
|
-
rules: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
153
|
-
path: z.ZodString;
|
|
154
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
-
url: z.ZodString;
|
|
156
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
157
|
-
repo: z.ZodString;
|
|
158
|
-
path: z.ZodString;
|
|
159
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
160
|
-
commit: z.ZodOptional<z.ZodString>;
|
|
161
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
162
|
-
}, z.core.$strict>]>>>, z.ZodString]>>;
|
|
163
|
-
excludeFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
-
}, z.core.$strict>>>;
|
|
165
|
-
export { configSchema }
|
|
166
|
-
export { configSchema as configSchema_alias_1 }
|
|
167
|
-
|
|
168
|
-
declare function createContext<TTools extends ToolRegistry>(tools: WorkflowTools<TTools>, stepFn?: StepFn, logger?: Logger): WorkflowContext<TTools>;
|
|
169
|
-
export { createContext }
|
|
170
|
-
export { createContext as createContext_alias_1 }
|
|
171
|
-
export { createContext as createContext_alias_2 }
|
|
172
|
-
|
|
173
|
-
declare function createDynamicWorkflow<TTools extends ToolRegistry = DynamicWorkflowRegistry>(definition: WorkflowFile | string, options?: DynamicWorkflowRunnerOptions): (workflowId: string, input: Record<string, any>, context: WorkflowContext<TTools>) => Promise<any>;
|
|
174
|
-
export { createDynamicWorkflow }
|
|
175
|
-
export { createDynamicWorkflow as createDynamicWorkflow_alias_1 }
|
|
176
|
-
|
|
177
|
-
declare const _default: {
|
|
178
|
-
handler: ToolHandler<{
|
|
179
|
-
readonly name: "askFollowupQuestion";
|
|
180
|
-
readonly description: "Call this when vital details are missing. Pose each follow-up as one direct, unambiguous question. If it speeds the reply, add up to five short, mutually-exclusive answer options. Group any related questions in the same call to avoid a back-and-forth chain.";
|
|
181
|
-
readonly parameters: z.ZodObject<{
|
|
182
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
183
|
-
prompt: z.ZodString;
|
|
184
|
-
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
185
|
-
}, z.core.$strip>>;
|
|
186
|
-
}, z.core.$strip>;
|
|
187
|
-
}, InteractionProvider>;
|
|
188
|
-
name: "askFollowupQuestion";
|
|
189
|
-
description: "Call this when vital details are missing. Pose each follow-up as one direct, unambiguous question. If it speeds the reply, add up to five short, mutually-exclusive answer options. Group any related questions in the same call to avoid a back-and-forth chain.";
|
|
190
|
-
parameters: z.ZodObject<{
|
|
191
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
192
|
-
prompt: z.ZodString;
|
|
193
|
-
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
194
|
-
}, z.core.$strip>>;
|
|
195
|
-
}, z.core.$strip>;
|
|
196
|
-
};
|
|
197
|
-
export { _default as askFollowupQuestion }
|
|
198
|
-
export { _default as askFollowupQuestion_alias_1 }
|
|
199
|
-
export { _default as default_alias }
|
|
200
|
-
|
|
201
|
-
declare const _default_10: {
|
|
202
|
-
handler: ToolHandler<{
|
|
203
|
-
readonly name: "readMemory";
|
|
204
|
-
readonly description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.";
|
|
205
|
-
readonly parameters: z.ZodObject<{
|
|
206
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
|
-
}, z.core.$strip>;
|
|
208
|
-
}, MemoryProvider>;
|
|
209
|
-
name: "readMemory";
|
|
210
|
-
description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.";
|
|
211
|
-
parameters: z.ZodObject<{
|
|
212
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
|
-
}, z.core.$strip>;
|
|
214
|
-
};
|
|
215
|
-
export { _default_10 as default_alias_9 }
|
|
216
|
-
export { _default_10 as readMemory }
|
|
217
|
-
export { _default_10 as readMemory_alias_1 }
|
|
218
|
-
|
|
219
|
-
declare const _default_11: {
|
|
220
|
-
handler: ToolHandler<{
|
|
221
|
-
readonly name: "removeFile";
|
|
222
|
-
readonly description: "Request to remove a file at the specified path.";
|
|
223
|
-
readonly parameters: z.ZodObject<{
|
|
224
|
-
path: z.ZodString;
|
|
225
|
-
}, z.core.$strip>;
|
|
226
|
-
}, FilesystemProvider>;
|
|
227
|
-
name: "removeFile";
|
|
228
|
-
description: "Request to remove a file at the specified path.";
|
|
229
|
-
parameters: z.ZodObject<{
|
|
230
|
-
path: z.ZodString;
|
|
231
|
-
}, z.core.$strip>;
|
|
232
|
-
};
|
|
233
|
-
export { _default_11 as default_alias_10 }
|
|
234
|
-
export { _default_11 as removeFile }
|
|
235
|
-
export { _default_11 as removeFile_alias_1 }
|
|
236
|
-
|
|
237
|
-
declare const _default_12: {
|
|
238
|
-
handler: ToolHandler<{
|
|
239
|
-
readonly name: "renameFile";
|
|
240
|
-
readonly description: "Request to rename a file from source path to target path.";
|
|
241
|
-
readonly parameters: z.ZodObject<{
|
|
242
|
-
source_path: z.ZodString;
|
|
243
|
-
target_path: z.ZodString;
|
|
244
|
-
}, z.core.$strip>;
|
|
245
|
-
}, FilesystemProvider>;
|
|
246
|
-
name: "renameFile";
|
|
247
|
-
description: "Request to rename a file from source path to target path.";
|
|
248
|
-
parameters: z.ZodObject<{
|
|
249
|
-
source_path: z.ZodString;
|
|
250
|
-
target_path: z.ZodString;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
|
-
};
|
|
253
|
-
export { _default_12 as default_alias_11 }
|
|
254
|
-
export { _default_12 as renameFile }
|
|
255
|
-
export { _default_12 as renameFile_alias_1 }
|
|
256
|
-
|
|
257
|
-
declare const _default_13: {
|
|
258
|
-
handler: ToolHandler<{
|
|
259
|
-
readonly name: "replaceInFile";
|
|
260
|
-
readonly description: "Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.";
|
|
261
|
-
readonly parameters: z.ZodObject<{
|
|
262
|
-
path: z.ZodString;
|
|
263
|
-
diff: z.ZodString;
|
|
264
|
-
}, z.core.$strip>;
|
|
265
|
-
}, FilesystemProvider>;
|
|
266
|
-
name: "replaceInFile";
|
|
267
|
-
description: "Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.";
|
|
268
|
-
parameters: z.ZodObject<{
|
|
269
|
-
path: z.ZodString;
|
|
270
|
-
diff: z.ZodString;
|
|
271
|
-
}, z.core.$strip>;
|
|
272
|
-
};
|
|
273
|
-
export { _default_13 as default_alias_12 }
|
|
274
|
-
export { _default_13 as replaceInFile }
|
|
275
|
-
export { _default_13 as replaceInFile_alias_1 }
|
|
276
|
-
|
|
277
|
-
declare const _default_14: {
|
|
278
|
-
handler: ToolHandler<{
|
|
279
|
-
readonly name: "search";
|
|
280
|
-
readonly description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.";
|
|
281
|
-
readonly parameters: z.ZodObject<{
|
|
282
|
-
query: z.ZodString;
|
|
283
|
-
}, z.core.$strip>;
|
|
284
|
-
}, WebProvider>;
|
|
285
|
-
name: "search";
|
|
286
|
-
description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.";
|
|
287
|
-
parameters: z.ZodObject<{
|
|
288
|
-
query: z.ZodString;
|
|
289
|
-
}, z.core.$strip>;
|
|
290
|
-
};
|
|
291
|
-
export { _default_14 as default_alias_13 }
|
|
292
|
-
export { _default_14 as search }
|
|
293
|
-
export { _default_14 as search_alias_1 }
|
|
294
|
-
|
|
295
|
-
declare const _default_15: {
|
|
296
|
-
handler: ToolHandler<{
|
|
297
|
-
readonly name: "searchFiles";
|
|
298
|
-
readonly description: "Request to perform a regex search across files in a specified directory, outputting context-rich results that include surrounding lines. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context.";
|
|
299
|
-
readonly parameters: z.ZodObject<{
|
|
300
|
-
path: z.ZodString;
|
|
301
|
-
regex: z.ZodString;
|
|
302
|
-
filePattern: z.ZodOptional<z.ZodString>;
|
|
303
|
-
}, z.core.$strip>;
|
|
304
|
-
}, FilesystemProvider>;
|
|
305
|
-
name: "searchFiles";
|
|
306
|
-
description: "Request to perform a regex search across files in a specified directory, outputting context-rich results that include surrounding lines. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context.";
|
|
307
|
-
parameters: z.ZodObject<{
|
|
308
|
-
path: z.ZodString;
|
|
309
|
-
regex: z.ZodString;
|
|
310
|
-
filePattern: z.ZodOptional<z.ZodString>;
|
|
311
|
-
}, z.core.$strip>;
|
|
312
|
-
};
|
|
313
|
-
export { _default_15 as default_alias_14 }
|
|
314
|
-
export { _default_15 as searchFiles }
|
|
315
|
-
export { _default_15 as searchFiles_alias_1 }
|
|
316
|
-
|
|
317
|
-
declare const _default_16: {
|
|
318
|
-
handler: ToolHandler<{
|
|
319
|
-
readonly name: "updateMemory";
|
|
320
|
-
readonly description: "Appends, replaces, or removes content from a memory topic. Use \"append\" to add to existing content, \"replace\" to overwrite entirely, or \"remove\" to delete a topic. Memory persists across tool calls within a workflow.";
|
|
321
|
-
readonly parameters: z.ZodObject<{
|
|
322
|
-
operation: z.ZodEnum<{
|
|
323
|
-
append: "append";
|
|
324
|
-
replace: "replace";
|
|
325
|
-
remove: "remove";
|
|
326
|
-
}>;
|
|
327
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
329
|
-
}, z.core.$strip>;
|
|
330
|
-
}, MemoryProvider>;
|
|
331
|
-
name: "updateMemory";
|
|
332
|
-
description: "Appends, replaces, or removes content from a memory topic. Use \"append\" to add to existing content, \"replace\" to overwrite entirely, or \"remove\" to delete a topic. Memory persists across tool calls within a workflow.";
|
|
333
|
-
parameters: z.ZodObject<{
|
|
334
|
-
operation: z.ZodEnum<{
|
|
335
|
-
append: "append";
|
|
336
|
-
replace: "replace";
|
|
337
|
-
remove: "remove";
|
|
338
|
-
}>;
|
|
339
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
340
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
341
|
-
}, z.core.$strip>;
|
|
342
|
-
};
|
|
343
|
-
export { _default_16 as default_alias_15 }
|
|
344
|
-
export { _default_16 as updateMemory }
|
|
345
|
-
export { _default_16 as updateMemory_alias_1 }
|
|
346
|
-
|
|
347
|
-
declare const _default_17: {
|
|
348
|
-
handler: ToolHandler<{
|
|
349
|
-
readonly name: "updateTodoItem";
|
|
350
|
-
readonly description: "Add or update a to-do item.";
|
|
351
|
-
readonly parameters: ZodObject< {
|
|
352
|
-
operation: ZodEnum< {
|
|
353
|
-
add: "add";
|
|
354
|
-
update: "update";
|
|
355
|
-
}>;
|
|
356
|
-
id: ZodOptional<ZodNullable<ZodString>>;
|
|
357
|
-
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
358
|
-
title: ZodOptional<ZodNullable<ZodString>>;
|
|
359
|
-
description: ZodOptional<ZodNullable<ZodString>>;
|
|
360
|
-
status: ZodOptional<ZodNullable<ZodEnum< {
|
|
361
|
-
open: "open";
|
|
362
|
-
completed: "completed";
|
|
363
|
-
closed: "closed";
|
|
364
|
-
}>>>;
|
|
365
|
-
}, $strip>;
|
|
366
|
-
}, TodoProvider>;
|
|
367
|
-
name: "updateTodoItem";
|
|
368
|
-
description: "Add or update a to-do item.";
|
|
369
|
-
parameters: ZodObject< {
|
|
370
|
-
operation: ZodEnum< {
|
|
371
|
-
add: "add";
|
|
372
|
-
update: "update";
|
|
373
|
-
}>;
|
|
374
|
-
id: ZodOptional<ZodNullable<ZodString>>;
|
|
375
|
-
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
376
|
-
title: ZodOptional<ZodNullable<ZodString>>;
|
|
377
|
-
description: ZodOptional<ZodNullable<ZodString>>;
|
|
378
|
-
status: ZodOptional<ZodNullable<ZodEnum< {
|
|
379
|
-
open: "open";
|
|
380
|
-
completed: "completed";
|
|
381
|
-
closed: "closed";
|
|
382
|
-
}>>>;
|
|
383
|
-
}, $strip>;
|
|
384
|
-
};
|
|
385
|
-
export { _default_17 as default_alias_16 }
|
|
386
|
-
export { _default_17 as updateTodoItem }
|
|
387
|
-
export { _default_17 as updateTodoItem_alias_1 }
|
|
388
|
-
|
|
389
|
-
declare const _default_18: {
|
|
390
|
-
handler: ToolHandler<{
|
|
391
|
-
readonly name: "writeToFile";
|
|
392
|
-
readonly description: "Request to write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the file. Ensure that the output content does not include incorrect escaped character patterns such as `<`, `>`, or `&`. Also ensure there is no unwanted CDATA tags in the content.";
|
|
393
|
-
readonly parameters: z.ZodObject<{
|
|
394
|
-
path: z.ZodString;
|
|
395
|
-
content: z.ZodString;
|
|
396
|
-
}, z.core.$strip>;
|
|
397
|
-
}, FilesystemProvider>;
|
|
398
|
-
name: "writeToFile";
|
|
399
|
-
description: "Request to write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the file. Ensure that the output content does not include incorrect escaped character patterns such as `<`, `>`, or `&`. Also ensure there is no unwanted CDATA tags in the content.";
|
|
400
|
-
parameters: z.ZodObject<{
|
|
401
|
-
path: z.ZodString;
|
|
402
|
-
content: z.ZodString;
|
|
403
|
-
}, z.core.$strip>;
|
|
404
|
-
};
|
|
405
|
-
export { _default_18 as default_alias_17 }
|
|
406
|
-
export { _default_18 as writeToFile }
|
|
407
|
-
export { _default_18 as writeToFile_alias_1 }
|
|
408
|
-
|
|
409
|
-
declare const _default_2: {
|
|
410
|
-
handler: ToolHandler<{
|
|
411
|
-
readonly name: "executeCommand";
|
|
412
|
-
readonly description: "Run a single CLI command. The command is always executed in the project-root working directory (regardless of earlier commands). Prefer one-off shell commands over wrapper scripts for flexibility. **IMPORTANT**: After an `execute_command` call, you MUST stop and NOT allowed to make further tool calls in the same message.";
|
|
413
|
-
readonly parameters: z.ZodObject<{
|
|
414
|
-
command: z.ZodString;
|
|
415
|
-
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
416
|
-
}, z.core.$strip>;
|
|
417
|
-
}, CommandProvider>;
|
|
418
|
-
name: "executeCommand";
|
|
419
|
-
description: "Run a single CLI command. The command is always executed in the project-root working directory (regardless of earlier commands). Prefer one-off shell commands over wrapper scripts for flexibility. **IMPORTANT**: After an `execute_command` call, you MUST stop and NOT allowed to make further tool calls in the same message.";
|
|
420
|
-
parameters: z.ZodObject<{
|
|
421
|
-
command: z.ZodString;
|
|
422
|
-
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
423
|
-
}, z.core.$strip>;
|
|
424
|
-
};
|
|
425
|
-
export { _default_2 as default_alias_1 }
|
|
426
|
-
export { _default_2 as executeCommand }
|
|
427
|
-
export { _default_2 as executeCommand_alias_1 }
|
|
428
|
-
|
|
429
|
-
declare const _default_3: {
|
|
430
|
-
handler: ToolHandler<{
|
|
431
|
-
readonly name: "fetchUrl";
|
|
432
|
-
readonly description: "Fetch the content located at one or more HTTP(S) URLs and return it in Markdown format. This works for standard web pages as well as raw files (e.g. README.md, source code) hosted on platforms like GitHub.";
|
|
433
|
-
readonly parameters: z.ZodObject<{
|
|
434
|
-
url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
435
|
-
}, z.core.$strip>;
|
|
436
|
-
}, WebProvider>;
|
|
437
|
-
name: "fetchUrl";
|
|
438
|
-
description: "Fetch the content located at one or more HTTP(S) URLs and return it in Markdown format. This works for standard web pages as well as raw files (e.g. README.md, source code) hosted on platforms like GitHub.";
|
|
439
|
-
parameters: z.ZodObject<{
|
|
440
|
-
url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
441
|
-
}, z.core.$strip>;
|
|
442
|
-
};
|
|
443
|
-
export { _default_3 as default_alias_2 }
|
|
444
|
-
export { _default_3 as fetchUrl }
|
|
445
|
-
export { _default_3 as fetchUrl_alias_1 }
|
|
446
|
-
|
|
447
|
-
declare const _default_4: {
|
|
448
|
-
handler: ToolHandler<{
|
|
449
|
-
readonly name: "getTodoItem";
|
|
450
|
-
readonly description: "Get a to-do item by its ID.";
|
|
451
|
-
readonly parameters: z.ZodObject<{
|
|
452
|
-
id: z.ZodString;
|
|
453
|
-
}, z.core.$strip>;
|
|
454
|
-
}, TodoProvider>;
|
|
455
|
-
name: "getTodoItem";
|
|
456
|
-
description: "Get a to-do item by its ID.";
|
|
457
|
-
parameters: z.ZodObject<{
|
|
458
|
-
id: z.ZodString;
|
|
459
|
-
}, z.core.$strip>;
|
|
460
|
-
};
|
|
461
|
-
export { _default_4 as default_alias_3 }
|
|
462
|
-
export { _default_4 as getTodoItem }
|
|
463
|
-
export { _default_4 as getTodoItem_alias_1 }
|
|
464
|
-
|
|
465
|
-
declare const _default_5: {
|
|
466
|
-
handler: ToolHandler<{
|
|
467
|
-
readonly name: "listFiles";
|
|
468
|
-
readonly description: "Request to list files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents. Do not use this tool to confirm the existence of files you may have created, as the user will let you know if the files were created successfully or not.";
|
|
469
|
-
readonly parameters: z.ZodObject<{
|
|
470
|
-
path: z.ZodString;
|
|
471
|
-
maxCount: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
472
|
-
recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
473
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
474
|
-
}, z.core.$strip>;
|
|
475
|
-
}, FilesystemProvider>;
|
|
476
|
-
name: "listFiles";
|
|
477
|
-
description: "Request to list files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents. Do not use this tool to confirm the existence of files you may have created, as the user will let you know if the files were created successfully or not.";
|
|
478
|
-
parameters: z.ZodObject<{
|
|
479
|
-
path: z.ZodString;
|
|
480
|
-
maxCount: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
481
|
-
recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
482
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
483
|
-
}, z.core.$strip>;
|
|
484
|
-
};
|
|
485
|
-
export { _default_5 as default_alias_4 }
|
|
486
|
-
export { _default_5 as listFiles }
|
|
487
|
-
export { _default_5 as listFiles_alias_1 }
|
|
488
|
-
|
|
489
|
-
declare const _default_6: {
|
|
490
|
-
handler: ToolHandler<{
|
|
491
|
-
readonly name: "listMemoryTopics";
|
|
492
|
-
readonly description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
|
|
493
|
-
readonly parameters: z.ZodObject<{}, z.core.$strip>;
|
|
494
|
-
}, MemoryProvider>;
|
|
495
|
-
name: "listMemoryTopics";
|
|
496
|
-
description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
|
|
497
|
-
parameters: z.ZodObject<{}, z.core.$strip>;
|
|
498
|
-
};
|
|
499
|
-
export { _default_6 as default_alias_5 }
|
|
500
|
-
export { _default_6 as listMemoryTopics }
|
|
501
|
-
export { _default_6 as listMemoryTopics_alias_1 }
|
|
502
|
-
|
|
503
|
-
declare const _default_7: {
|
|
504
|
-
handler: ToolHandler<{
|
|
505
|
-
readonly name: "listTodoItems";
|
|
506
|
-
readonly description: "List all to-do items, sorted by id. If an id is provided, it lists all sub-items for that id. Can be filtered by status.";
|
|
507
|
-
readonly parameters: z.ZodObject<{
|
|
508
|
-
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
|
-
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
510
|
-
open: "open";
|
|
511
|
-
completed: "completed";
|
|
512
|
-
closed: "closed";
|
|
513
|
-
}>>>;
|
|
514
|
-
}, z.core.$strip>;
|
|
515
|
-
}, TodoProvider>;
|
|
516
|
-
name: "listTodoItems";
|
|
517
|
-
description: "List all to-do items, sorted by id. If an id is provided, it lists all sub-items for that id. Can be filtered by status.";
|
|
518
|
-
parameters: z.ZodObject<{
|
|
519
|
-
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
520
|
-
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
521
|
-
open: "open";
|
|
522
|
-
completed: "completed";
|
|
523
|
-
closed: "closed";
|
|
524
|
-
}>>>;
|
|
525
|
-
}, z.core.$strip>;
|
|
526
|
-
};
|
|
527
|
-
export { _default_7 as default_alias_6 }
|
|
528
|
-
export { _default_7 as listTodoItems }
|
|
529
|
-
export { _default_7 as listTodoItems_alias_1 }
|
|
530
|
-
|
|
531
|
-
declare const _default_8: {
|
|
532
|
-
handler: ToolHandler<{
|
|
533
|
-
readonly name: "readBinaryFile";
|
|
534
|
-
readonly description: "Read a binary file from a URL or local path. Use file:// prefix to access local files. This can be used to access non-text files such as PDFs or images.";
|
|
535
|
-
readonly parameters: z.ZodObject<{
|
|
536
|
-
url: z.ZodString;
|
|
537
|
-
}, z.core.$strip>;
|
|
538
|
-
}, FilesystemProvider>;
|
|
539
|
-
name: "readBinaryFile";
|
|
540
|
-
description: "Read a binary file from a URL or local path. Use file:// prefix to access local files. This can be used to access non-text files such as PDFs or images.";
|
|
541
|
-
parameters: z.ZodObject<{
|
|
542
|
-
url: z.ZodString;
|
|
543
|
-
}, z.core.$strip>;
|
|
544
|
-
};
|
|
545
|
-
export { _default_8 as default_alias_7 }
|
|
546
|
-
export { _default_8 as readBinaryFile }
|
|
547
|
-
export { _default_8 as readBinaryFile_alias_1 }
|
|
548
|
-
|
|
549
|
-
declare const _default_9: {
|
|
550
|
-
handler: ToolHandler<{
|
|
551
|
-
readonly name: "readFile";
|
|
552
|
-
readonly description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
|
|
553
|
-
readonly parameters: z.ZodObject<{
|
|
554
|
-
path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
555
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>>;
|
|
556
|
-
}, z.core.$strip>;
|
|
557
|
-
}, FilesystemProvider>;
|
|
558
|
-
name: "readFile";
|
|
559
|
-
description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
|
|
560
|
-
parameters: z.ZodObject<{
|
|
561
|
-
path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
562
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>>;
|
|
563
|
-
}, z.core.$strip>;
|
|
564
|
-
};
|
|
565
|
-
export { _default_9 as default_alias_8 }
|
|
566
|
-
export { _default_9 as readFile }
|
|
567
|
-
export { _default_9 as readFile_alias_1 }
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Returns the directory portion of a path string.
|
|
571
|
-
* Strips trailing slashes, then takes everything up to the last slash.
|
|
572
|
-
*/
|
|
573
|
-
export declare function dirname(path: string): string;
|
|
574
|
-
|
|
575
|
-
declare type DynamicStepRuntimeContext<TTools extends ToolRegistry> = {
|
|
576
|
-
workflowId: string;
|
|
577
|
-
stepId: string;
|
|
578
|
-
input: Record<string, any>;
|
|
579
|
-
state: Record<string, any>;
|
|
580
|
-
tools: WorkflowTools<TTools>;
|
|
581
|
-
logger: Logger;
|
|
582
|
-
step: StepFn;
|
|
583
|
-
runWorkflow: (workflowId: string, input?: Record<string, any>) => Promise<any>;
|
|
584
|
-
toolInfo: Readonly<FullAgentToolInfo[]> | undefined;
|
|
585
|
-
};
|
|
586
|
-
export { DynamicStepRuntimeContext }
|
|
587
|
-
export { DynamicStepRuntimeContext as DynamicStepRuntimeContext_alias_1 }
|
|
588
|
-
|
|
589
|
-
declare type DynamicWorkflowParseResult = {
|
|
590
|
-
success: true;
|
|
591
|
-
definition: WorkflowFile;
|
|
592
|
-
} | {
|
|
593
|
-
success: false;
|
|
594
|
-
error: string;
|
|
595
|
-
};
|
|
596
|
-
export { DynamicWorkflowParseResult }
|
|
597
|
-
export { DynamicWorkflowParseResult as DynamicWorkflowParseResult_alias_1 }
|
|
598
|
-
|
|
599
|
-
declare type DynamicWorkflowRegistry = ToolRegistry & {
|
|
600
|
-
runWorkflow: RunWorkflowTool;
|
|
601
|
-
};
|
|
602
|
-
export { DynamicWorkflowRegistry }
|
|
603
|
-
export { DynamicWorkflowRegistry as DynamicWorkflowRegistry_alias_1 }
|
|
604
|
-
|
|
605
|
-
declare type DynamicWorkflowRunnerOptions = {
|
|
606
|
-
/**
|
|
607
|
-
* Tool definitions used when a step does not have persisted `code`
|
|
608
|
-
* and needs to be executed via `agentWorkflow`.
|
|
609
|
-
*/
|
|
610
|
-
toolInfo?: Readonly<FullAgentToolInfo[]>;
|
|
611
|
-
/**
|
|
612
|
-
* Model id forwarded to `agentWorkflow` for agent-executed steps.
|
|
613
|
-
*/
|
|
614
|
-
model?: string;
|
|
615
|
-
/**
|
|
616
|
-
* Maximum round trips for agent-executed steps.
|
|
617
|
-
*/
|
|
618
|
-
maxToolRoundTrips?: number;
|
|
619
|
-
/**
|
|
620
|
-
* Opt-in to execute persisted step `code` strings.
|
|
621
|
-
* When false, steps without code must be agent-executed.
|
|
622
|
-
*/
|
|
623
|
-
allowUnsafeCodeExecution?: boolean;
|
|
624
|
-
/**
|
|
625
|
-
* Customize per-step system prompt for agent-executed steps.
|
|
626
|
-
*/
|
|
627
|
-
stepSystemPrompt?: (args: {
|
|
628
|
-
workflowId: string;
|
|
629
|
-
step: WorkflowStepDefinition;
|
|
630
|
-
input: any;
|
|
631
|
-
state: any;
|
|
632
|
-
}) => string;
|
|
633
|
-
/**
|
|
634
|
-
* Whether to wrap plain text agent responses in an object { result: ... }.
|
|
635
|
-
* Defaults to false.
|
|
636
|
-
*/
|
|
637
|
-
wrapAgentResultInObject?: boolean;
|
|
638
|
-
};
|
|
639
|
-
export { DynamicWorkflowRunnerOptions }
|
|
640
|
-
export { DynamicWorkflowRunnerOptions as DynamicWorkflowRunnerOptions_alias_1 }
|
|
641
|
-
|
|
642
|
-
declare type ExitReason = {
|
|
643
|
-
type: 'UsageExceeded';
|
|
644
|
-
messages: JsonModelMessage[];
|
|
645
|
-
} | {
|
|
646
|
-
type: 'Exit';
|
|
647
|
-
message: string;
|
|
648
|
-
object?: any;
|
|
649
|
-
messages: JsonModelMessage[];
|
|
650
|
-
} | {
|
|
651
|
-
type: 'Error';
|
|
652
|
-
error: {
|
|
653
|
-
message: string;
|
|
654
|
-
stack?: string;
|
|
655
|
-
};
|
|
656
|
-
messages: JsonModelMessage[];
|
|
657
|
-
};
|
|
658
|
-
export { ExitReason }
|
|
659
|
-
export { ExitReason as ExitReason_alias_1 }
|
|
660
|
-
export { ExitReason as ExitReason_alias_2 }
|
|
661
|
-
|
|
662
|
-
declare type FilesystemProvider = {
|
|
663
|
-
readFile?: (path: string, includeIgnored: boolean) => Promise<string | undefined>;
|
|
664
|
-
writeFile?: (path: string, content: string) => Promise<void>;
|
|
665
|
-
removeFile?: (path: string) => Promise<void>;
|
|
666
|
-
renameFile?: (sourcePath: string, targetPath: string) => Promise<void>;
|
|
667
|
-
listFiles?: (path: string, recursive: boolean, maxCount: number, includeIgnored: boolean) => Promise<[string[], boolean]>;
|
|
668
|
-
searchFiles?: (path: string, regex: string, filePattern: string) => Promise<string[]>;
|
|
669
|
-
readBinaryFile?: (url: string) => Promise<{
|
|
670
|
-
base64Data: string;
|
|
671
|
-
mediaType: string;
|
|
672
|
-
}>;
|
|
673
|
-
};
|
|
674
|
-
export { FilesystemProvider }
|
|
675
|
-
export { FilesystemProvider as FilesystemProvider_alias_1 }
|
|
676
|
-
export { FilesystemProvider as FilesystemProvider_alias_2 }
|
|
677
|
-
|
|
678
|
-
declare const fromJsonModelMessage: (msg: JsonModelMessage) => ModelMessage;
|
|
679
|
-
export { fromJsonModelMessage }
|
|
680
|
-
export { fromJsonModelMessage as fromJsonModelMessage_alias_1 }
|
|
681
|
-
export { fromJsonModelMessage as fromJsonModelMessage_alias_2 }
|
|
682
|
-
|
|
683
|
-
declare type FullAgentToolInfo = AgentToolInfo & {
|
|
684
|
-
handler: ToolHandler<AgentToolInfo, any>;
|
|
685
|
-
};
|
|
686
|
-
export { FullAgentToolInfo }
|
|
687
|
-
export { FullAgentToolInfo as FullAgentToolInfo_alias_1 }
|
|
688
|
-
|
|
689
|
-
declare type GenerateWorkflowCodeInput = z.infer<typeof GenerateWorkflowCodeInputSchema>;
|
|
690
|
-
export { GenerateWorkflowCodeInput }
|
|
691
|
-
export { GenerateWorkflowCodeInput as GenerateWorkflowCodeInput_alias_1 }
|
|
692
|
-
|
|
693
|
-
declare const GenerateWorkflowCodeInputSchema: z.ZodObject<{
|
|
694
|
-
workflow: z.ZodObject<{
|
|
695
|
-
workflows: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
696
|
-
task: z.ZodString;
|
|
697
|
-
inputs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
698
|
-
id: z.ZodString;
|
|
699
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
700
|
-
default: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
701
|
-
}, z.core.$strip>>>>;
|
|
702
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
703
|
-
id: z.ZodString;
|
|
704
|
-
tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
705
|
-
task: z.ZodString;
|
|
706
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
707
|
-
expected_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
708
|
-
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
709
|
-
outputSchema: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
710
|
-
timeout: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
711
|
-
}, z.core.$strip>>;
|
|
712
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
713
|
-
}, z.core.$strip>>;
|
|
714
|
-
}, z.core.$strip>;
|
|
715
|
-
}, z.core.$strip>;
|
|
716
|
-
export { GenerateWorkflowCodeInputSchema }
|
|
717
|
-
export { GenerateWorkflowCodeInputSchema as GenerateWorkflowCodeInputSchema_alias_1 }
|
|
718
|
-
|
|
719
|
-
declare const generateWorkflowCodeWorkflow: WorkflowFn<GenerateWorkflowCodeInput, WorkflowFile, AgentToolRegistry>;
|
|
720
|
-
export { generateWorkflowCodeWorkflow }
|
|
721
|
-
export { generateWorkflowCodeWorkflow as generateWorkflowCodeWorkflow_alias_1 }
|
|
722
|
-
|
|
723
|
-
declare type GenerateWorkflowDefinitionInput = z.infer<typeof GenerateWorkflowDefinitionInputSchema>;
|
|
724
|
-
export { GenerateWorkflowDefinitionInput }
|
|
725
|
-
export { GenerateWorkflowDefinitionInput as GenerateWorkflowDefinitionInput_alias_1 }
|
|
726
|
-
|
|
727
|
-
declare const GenerateWorkflowDefinitionInputSchema: z.ZodObject<{
|
|
728
|
-
prompt: z.ZodString;
|
|
729
|
-
availableTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
730
|
-
name: z.ZodString;
|
|
731
|
-
description: z.ZodString;
|
|
732
|
-
}, z.core.$strip>>>;
|
|
733
|
-
}, z.core.$strip>;
|
|
734
|
-
export { GenerateWorkflowDefinitionInputSchema }
|
|
735
|
-
export { GenerateWorkflowDefinitionInputSchema as GenerateWorkflowDefinitionInputSchema_alias_1 }
|
|
736
|
-
|
|
737
|
-
declare const generateWorkflowDefinitionWorkflow: WorkflowFn<GenerateWorkflowDefinitionInput, WorkflowFile, AgentToolRegistry>;
|
|
738
|
-
export { generateWorkflowDefinitionWorkflow }
|
|
739
|
-
export { generateWorkflowDefinitionWorkflow as generateWorkflowDefinitionWorkflow_alias_1 }
|
|
740
|
-
|
|
741
|
-
declare type GetTodoItemOutput = TodoItem & {
|
|
742
|
-
subItems: {
|
|
743
|
-
id: string;
|
|
744
|
-
title: string;
|
|
745
|
-
}[];
|
|
746
|
-
};
|
|
747
|
-
export { GetTodoItemOutput }
|
|
748
|
-
export { GetTodoItemOutput as GetTodoItemOutput_alias_1 }
|
|
749
|
-
export { GetTodoItemOutput as GetTodoItemOutput_alias_2 }
|
|
750
|
-
|
|
751
|
-
export declare const handler: ToolHandler<typeof toolInfo, InteractionProvider>;
|
|
752
|
-
|
|
753
|
-
export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, CommandProvider>;
|
|
754
|
-
|
|
755
|
-
export declare const handler_alias_10: ToolHandler<typeof toolInfo_alias_10, FilesystemProvider>;
|
|
756
|
-
|
|
757
|
-
export declare const handler_alias_11: ToolHandler<typeof toolInfo_alias_11, FilesystemProvider>;
|
|
758
|
-
|
|
759
|
-
export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12, FilesystemProvider>;
|
|
760
|
-
|
|
761
|
-
export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, WebProvider>;
|
|
762
|
-
|
|
763
|
-
export declare const handler_alias_14: ToolHandler<typeof toolInfo_alias_14, FilesystemProvider>;
|
|
764
|
-
|
|
765
|
-
export declare const handler_alias_15: ToolHandler<typeof toolInfo_alias_15, MemoryProvider>;
|
|
766
|
-
|
|
767
|
-
export declare const handler_alias_16: ToolHandler<typeof toolInfo_alias_16, TodoProvider>;
|
|
768
|
-
|
|
769
|
-
export declare const handler_alias_17: ToolHandler<typeof toolInfo_alias_17, FilesystemProvider>;
|
|
770
|
-
|
|
771
|
-
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, WebProvider>;
|
|
772
|
-
|
|
773
|
-
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, TodoProvider>;
|
|
774
|
-
|
|
775
|
-
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, FilesystemProvider>;
|
|
776
|
-
|
|
777
|
-
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, MemoryProvider>;
|
|
778
|
-
|
|
779
|
-
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, TodoProvider>;
|
|
780
|
-
|
|
781
|
-
export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7, FilesystemProvider>;
|
|
782
|
-
|
|
783
|
-
export declare const handler_alias_8: ToolHandler<typeof toolInfo_alias_8, FilesystemProvider>;
|
|
784
|
-
|
|
785
|
-
export declare const handler_alias_9: ToolHandler<typeof toolInfo_alias_9, MemoryProvider>;
|
|
786
|
-
|
|
787
|
-
declare type InteractionProvider = {
|
|
788
|
-
askFollowupQuestion?: (question: string, options: string[]) => Promise<string>;
|
|
789
|
-
};
|
|
790
|
-
export { InteractionProvider }
|
|
791
|
-
export { InteractionProvider as InteractionProvider_alias_1 }
|
|
792
|
-
export { InteractionProvider as InteractionProvider_alias_2 }
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* Joins all given path segments, then normalizes the result.
|
|
796
|
-
*/
|
|
797
|
-
export declare function join(...parts: string[]): string;
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
Content of an assistant message.
|
|
801
|
-
It can be a string or an array of text, image, reasoning, redacted reasoning, and tool call parts.
|
|
802
|
-
*/
|
|
803
|
-
declare type JsonAssistantContent = string | Array<TextPart_2 | JsonFilePart | ReasoningPart | JsonToolCallPart | ToolResultPart>;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
An assistant message. It can contain text, tool calls, or a combination of text and tool calls.
|
|
807
|
-
*/
|
|
808
|
-
declare type JsonAssistantModelMessage = {
|
|
809
|
-
role: 'assistant';
|
|
810
|
-
content: JsonAssistantContent;
|
|
811
|
-
/**
|
|
812
|
-
Additional provider-specific metadata. They are passed through
|
|
813
|
-
to the provider from the AI SDK and enable provider-specific
|
|
814
|
-
functionality that can be fully encapsulated in the provider.
|
|
815
|
-
*/
|
|
816
|
-
providerOptions?: ProviderOptions;
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
declare type JsonDataContent = {
|
|
820
|
-
type: 'base64' | 'url';
|
|
821
|
-
value: string;
|
|
822
|
-
};
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
File content part of a prompt. It contains a file.
|
|
826
|
-
*/
|
|
827
|
-
declare interface JsonFilePart {
|
|
828
|
-
type: 'file';
|
|
829
|
-
/**
|
|
830
|
-
File data. Can either be:
|
|
831
|
-
|
|
832
|
-
- data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
|
|
833
|
-
- URL: a URL that points to the image
|
|
834
|
-
*/
|
|
835
|
-
data: JsonDataContent;
|
|
836
|
-
/**
|
|
837
|
-
Optional filename of the file.
|
|
838
|
-
*/
|
|
839
|
-
filename?: string;
|
|
840
|
-
/**
|
|
841
|
-
IANA media type of the file.
|
|
842
|
-
|
|
843
|
-
@see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
844
|
-
*/
|
|
845
|
-
mediaType: string;
|
|
846
|
-
/**
|
|
847
|
-
Additional provider-specific metadata. They are passed through
|
|
848
|
-
to the provider from the AI SDK and enable provider-specific
|
|
849
|
-
functionality that can be fully encapsulated in the provider.
|
|
850
|
-
*/
|
|
851
|
-
providerOptions?: ProviderOptions;
|
|
852
|
-
}
|
|
853
|
-
export { JsonFilePart }
|
|
854
|
-
export { JsonFilePart as JsonFilePart_alias_1 }
|
|
855
|
-
export { JsonFilePart as JsonFilePart_alias_2 }
|
|
856
|
-
|
|
857
|
-
declare interface JsonImagePart {
|
|
858
|
-
type: 'image';
|
|
859
|
-
/**
|
|
860
|
-
Image data. Can either be:
|
|
861
|
-
|
|
862
|
-
- data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
|
|
863
|
-
- URL: a URL that points to the image
|
|
864
|
-
*/
|
|
865
|
-
image: JsonDataContent;
|
|
866
|
-
/**
|
|
867
|
-
Optional IANA media type of the image.
|
|
868
|
-
|
|
869
|
-
@see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
870
|
-
*/
|
|
871
|
-
mediaType?: string;
|
|
872
|
-
/**
|
|
873
|
-
Additional provider-specific metadata. They are passed through
|
|
874
|
-
to the provider from the AI SDK and enable provider-specific
|
|
875
|
-
functionality that can be fully encapsulated in the provider.
|
|
876
|
-
*/
|
|
877
|
-
providerOptions?: ProviderOptions;
|
|
878
|
-
}
|
|
879
|
-
export { JsonImagePart }
|
|
880
|
-
export { JsonImagePart as JsonImagePart_alias_1 }
|
|
881
|
-
export { JsonImagePart as JsonImagePart_alias_2 }
|
|
882
|
-
|
|
883
|
-
declare type JsonModelMessage = SystemModelMessage | JsonUserModelMessage | JsonAssistantModelMessage | ToolModelMessage;
|
|
884
|
-
export { JsonModelMessage }
|
|
885
|
-
export { JsonModelMessage as JsonModelMessage_alias_1 }
|
|
886
|
-
export { JsonModelMessage as JsonModelMessage_alias_2 }
|
|
887
|
-
|
|
888
|
-
declare type JsonResponseMessage = JsonAssistantModelMessage | ToolModelMessage;
|
|
889
|
-
export { JsonResponseMessage }
|
|
890
|
-
export { JsonResponseMessage as JsonResponseMessage_alias_1 }
|
|
891
|
-
export { JsonResponseMessage as JsonResponseMessage_alias_2 }
|
|
892
|
-
|
|
893
|
-
declare interface JsonToolCallPart {
|
|
894
|
-
type: 'tool-call';
|
|
895
|
-
/**
|
|
896
|
-
ID of the tool call. This ID is used to match the tool call with the tool result.
|
|
897
|
-
*/
|
|
898
|
-
toolCallId: string;
|
|
899
|
-
/**
|
|
900
|
-
Name of the tool that is being called.
|
|
901
|
-
*/
|
|
902
|
-
toolName: string;
|
|
903
|
-
/**
|
|
904
|
-
Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
|
|
905
|
-
*/
|
|
906
|
-
input: JSONValue;
|
|
907
|
-
/**
|
|
908
|
-
Additional provider-specific metadata. They are passed through
|
|
909
|
-
to the provider from the AI SDK and enable provider-specific
|
|
910
|
-
functionality that can be fully encapsulated in the provider.
|
|
911
|
-
*/
|
|
912
|
-
providerOptions?: ProviderOptions;
|
|
913
|
-
/**
|
|
914
|
-
Whether the tool call was executed by the provider.
|
|
915
|
-
*/
|
|
916
|
-
providerExecuted?: boolean;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
Content of a user message. It can be a string or an array of text and image parts.
|
|
921
|
-
*/
|
|
922
|
-
declare type JsonUserContent = string | Array<TextPart_2 | JsonImagePart | JsonFilePart>;
|
|
923
|
-
export { JsonUserContent }
|
|
924
|
-
export { JsonUserContent as JsonUserContent_alias_1 }
|
|
925
|
-
export { JsonUserContent as JsonUserContent_alias_2 }
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
A user message. It can contain text or a combination of text and images.
|
|
929
|
-
*/
|
|
930
|
-
declare type JsonUserModelMessage = {
|
|
931
|
-
role: 'user';
|
|
932
|
-
content: JsonUserContent;
|
|
933
|
-
/**
|
|
934
|
-
Additional provider-specific metadata. They are passed through
|
|
935
|
-
to the provider from the AI SDK and enable provider-specific
|
|
936
|
-
functionality that can be fully encapsulated in the provider.
|
|
937
|
-
*/
|
|
938
|
-
providerOptions?: ProviderOptions;
|
|
939
|
-
};
|
|
940
|
-
export { JsonUserModelMessage }
|
|
941
|
-
export { JsonUserModelMessage as JsonUserModelMessage_alias_1 }
|
|
942
|
-
export { JsonUserModelMessage as JsonUserModelMessage_alias_2 }
|
|
943
|
-
|
|
944
|
-
declare type ListTodoItemsOutput = TodoItem[];
|
|
945
|
-
export { ListTodoItemsOutput }
|
|
946
|
-
export { ListTodoItemsOutput as ListTodoItemsOutput_alias_1 }
|
|
947
|
-
export { ListTodoItemsOutput as ListTodoItemsOutput_alias_2 }
|
|
948
|
-
|
|
949
|
-
declare interface Logger {
|
|
950
|
-
debug: (...args: any[]) => void;
|
|
951
|
-
info: (...args: any[]) => void;
|
|
952
|
-
warn: (...args: any[]) => void;
|
|
953
|
-
error: (...args: any[]) => void;
|
|
954
|
-
}
|
|
955
|
-
export { Logger }
|
|
956
|
-
export { Logger as Logger_alias_1 }
|
|
957
|
-
export { Logger as Logger_alias_2 }
|
|
958
|
-
|
|
959
|
-
declare const makeStepFn: () => StepFn;
|
|
960
|
-
export { makeStepFn }
|
|
961
|
-
export { makeStepFn as makeStepFn_alias_1 }
|
|
962
|
-
export { makeStepFn as makeStepFn_alias_2 }
|
|
963
|
-
|
|
964
|
-
declare interface MemoryProvider {
|
|
965
|
-
listMemoryTopics: () => Promise<string[]>;
|
|
966
|
-
readMemory: (topic?: string) => Promise<string | undefined>;
|
|
967
|
-
updateMemory: (operation: 'append' | 'replace' | 'remove', topic: string | undefined, content: string | undefined) => Promise<void>;
|
|
968
|
-
}
|
|
969
|
-
export { MemoryProvider }
|
|
970
|
-
export { MemoryProvider as MemoryProvider_alias_1 }
|
|
971
|
-
export { MemoryProvider as MemoryProvider_alias_2 }
|
|
972
|
-
|
|
973
|
-
declare class MockProvider implements ToolProvider {
|
|
974
|
-
listTodoItems(id?: string | null, _status?: string | null): Promise<{
|
|
975
|
-
id: string;
|
|
976
|
-
title: string;
|
|
977
|
-
status: "open";
|
|
978
|
-
description: string;
|
|
979
|
-
}[]>;
|
|
980
|
-
getTodoItem(id: string): Promise<GetTodoItemOutput | undefined>;
|
|
981
|
-
updateTodoItem(input: UpdateTodoItemInput): Promise<{
|
|
982
|
-
id: string;
|
|
983
|
-
}>;
|
|
984
|
-
readFile(_path: string, _includeIgnored?: boolean): Promise<string>;
|
|
985
|
-
writeFile(_path: string, _content: string): Promise<void>;
|
|
986
|
-
removeFile(_path: string): Promise<void>;
|
|
987
|
-
renameFile(_sourcePath: string, _targetPath: string): Promise<void>;
|
|
988
|
-
listFiles(_path: string, _recursive: boolean, _maxCount: number, _includeIgnored?: boolean): Promise<[string[], boolean]>;
|
|
989
|
-
searchFiles(_path: string, _regex: string, _filePattern: string): Promise<string[]>;
|
|
990
|
-
executeCommand(_command: string, _needApprove: boolean): Promise<{
|
|
991
|
-
stdout: string;
|
|
992
|
-
stderr: string;
|
|
993
|
-
exitCode: number;
|
|
994
|
-
summary?: string;
|
|
995
|
-
}>;
|
|
996
|
-
askFollowupQuestion(_question: string, _options?: string[]): Promise<string>;
|
|
997
|
-
search(_query: string): Promise<string>;
|
|
998
|
-
listMemoryTopics(): Promise<string[]>;
|
|
999
|
-
readMemory(_topic?: string): Promise<string | undefined>;
|
|
1000
|
-
updateMemory(_operation: 'append' | 'replace' | 'remove', _topic?: string, _content?: string): Promise<void>;
|
|
1001
|
-
}
|
|
1002
|
-
export { MockProvider }
|
|
1003
|
-
export { MockProvider as MockProvider_alias_1 }
|
|
1004
|
-
export { MockProvider as MockProvider_alias_2 }
|
|
1005
|
-
|
|
1006
|
-
declare type ModelInfo = {
|
|
1007
|
-
inputPrice: number;
|
|
1008
|
-
outputPrice: number;
|
|
1009
|
-
cacheWritesPrice: number;
|
|
1010
|
-
cacheReadsPrice: number;
|
|
1011
|
-
};
|
|
1012
|
-
export { ModelInfo }
|
|
1013
|
-
export { ModelInfo as ModelInfo_alias_1 }
|
|
1014
|
-
|
|
1015
|
-
declare function parseDynamicWorkflowDefinition(source: string): DynamicWorkflowParseResult;
|
|
1016
|
-
export { parseDynamicWorkflowDefinition }
|
|
1017
|
-
export { parseDynamicWorkflowDefinition as parseDynamicWorkflowDefinition_alias_1 }
|
|
1018
|
-
|
|
1019
|
-
declare const parseJsonFromMarkdown: (markdown: string) => ParseOutputResult<any>;
|
|
1020
|
-
export { parseJsonFromMarkdown }
|
|
1021
|
-
export { parseJsonFromMarkdown as parseJsonFromMarkdown_alias_1 }
|
|
1022
|
-
export { parseJsonFromMarkdown as parseJsonFromMarkdown_alias_2 }
|
|
1023
|
-
|
|
1024
|
-
declare type ParseOutputResult<T> = {
|
|
1025
|
-
success: true;
|
|
1026
|
-
data: T;
|
|
1027
|
-
} | {
|
|
1028
|
-
success: false;
|
|
1029
|
-
error?: string;
|
|
1030
|
-
};
|
|
1031
|
-
export { ParseOutputResult }
|
|
1032
|
-
export { ParseOutputResult as ParseOutputResult_alias_1 }
|
|
1033
|
-
export { ParseOutputResult as ParseOutputResult_alias_2 }
|
|
1034
|
-
|
|
1035
|
-
declare const providerModelSchema: z.ZodObject<{
|
|
1036
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
1037
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1038
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1039
|
-
budget: z.ZodOptional<z.ZodNumber>;
|
|
1040
|
-
}, z.core.$strip>;
|
|
1041
|
-
export { providerModelSchema }
|
|
1042
|
-
export { providerModelSchema as providerModelSchema_alias_1 }
|
|
1043
|
-
|
|
1044
|
-
declare const replaceInFile_2: (fileContent: string, diff: string) => ReplaceResult;
|
|
1045
|
-
export { replaceInFile_2 as replaceInFileHelper }
|
|
1046
|
-
export { replaceInFile_2 as replaceInFile_alias_2 }
|
|
1047
|
-
export { replaceInFile_2 as replaceInFile_alias_3 }
|
|
1048
|
-
|
|
1049
|
-
declare type ReplaceResult = {
|
|
1050
|
-
content: string;
|
|
1051
|
-
status: 'no_diff_applied' | 'some_diff_applied' | 'all_diff_applied';
|
|
1052
|
-
appliedCount: number;
|
|
1053
|
-
totalCount: number;
|
|
1054
|
-
};
|
|
1055
|
-
export { ReplaceResult }
|
|
1056
|
-
export { ReplaceResult as ReplaceResult_alias_1 }
|
|
1057
|
-
|
|
1058
|
-
declare const responsePrompts: {
|
|
1059
|
-
readonly errorInvokeTool: (tool: string, error: unknown) => string;
|
|
1060
|
-
readonly requireUseTool: "Error: No tool use detected. You MUST use a tool before proceeding.\ne.g. <tool_tool_name>tool_name</tool_tool_name>\n\nEnsure the opening and closing tags are correctly nested and closed, and that you are using the correct tool name.\nAvoid unnecessary text or symbols before or after the tool use.\nAvoid unnecessary escape characters or special characters.\n";
|
|
1061
|
-
readonly requireUseToolNative: "Error: No tool use detected. You MUST use a tool before proceeding.\n";
|
|
1062
|
-
readonly toolResults: (tool: string, result: LanguageModelV2ToolResultOutput) => Array<TextPart | ImagePart | FilePart>;
|
|
1063
|
-
readonly commandResult: (command: string, exitCode: number, stdout: string, stderr: string) => string;
|
|
1064
|
-
};
|
|
1065
|
-
export { responsePrompts }
|
|
1066
|
-
export { responsePrompts as responsePrompts_alias_1 }
|
|
1067
|
-
export { responsePrompts as responsePrompts_alias_2 }
|
|
1068
|
-
|
|
1069
|
-
declare const ruleSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1070
|
-
path: z.ZodString;
|
|
1071
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1072
|
-
url: z.ZodString;
|
|
1073
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1074
|
-
repo: z.ZodString;
|
|
1075
|
-
path: z.ZodString;
|
|
1076
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
1077
|
-
commit: z.ZodOptional<z.ZodString>;
|
|
1078
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
1079
|
-
}, z.core.$strict>]>;
|
|
1080
|
-
export { ruleSchema }
|
|
1081
|
-
export { ruleSchema as ruleSchema_alias_1 }
|
|
1082
|
-
|
|
1083
|
-
declare type RunWorkflowTool = {
|
|
1084
|
-
input: {
|
|
1085
|
-
workflowId: string;
|
|
1086
|
-
input?: any;
|
|
1087
|
-
};
|
|
1088
|
-
output: any;
|
|
1089
|
-
};
|
|
1090
|
-
export { RunWorkflowTool }
|
|
1091
|
-
export { RunWorkflowTool as RunWorkflowTool_alias_1 }
|
|
1092
|
-
|
|
1093
|
-
declare interface StepFn {
|
|
1094
|
-
<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
1095
|
-
<T>(name: string, options: StepOptions, fn: () => Promise<T>): Promise<T>;
|
|
1096
|
-
}
|
|
1097
|
-
export { StepFn }
|
|
1098
|
-
export { StepFn as StepFn_alias_1 }
|
|
1099
|
-
export { StepFn as StepFn_alias_2 }
|
|
1100
|
-
|
|
1101
|
-
declare type StepOptions = {
|
|
1102
|
-
retry?: number;
|
|
1103
|
-
};
|
|
1104
|
-
export { StepOptions }
|
|
1105
|
-
export { StepOptions as StepOptions_alias_1 }
|
|
1106
|
-
export { StepOptions as StepOptions_alias_2 }
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* Union type of all possible task events
|
|
1110
|
-
*/
|
|
1111
|
-
declare type TaskEvent = TaskEventStartTask | TaskEventStartRequest | TaskEventEndRequest | TaskEventText | TaskEventToolUse | TaskEventToolResult | TaskEventToolError | TaskEventUsageExceeded | TaskEventEndTask;
|
|
1112
|
-
export { TaskEvent }
|
|
1113
|
-
export { TaskEvent as TaskEvent_alias_1 }
|
|
1114
|
-
export { TaskEvent as TaskEvent_alias_2 }
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* Base interface for all task events
|
|
1118
|
-
*/
|
|
1119
|
-
declare interface TaskEventBase {
|
|
1120
|
-
kind: TaskEventKind;
|
|
1121
|
-
}
|
|
1122
|
-
export { TaskEventBase }
|
|
1123
|
-
export { TaskEventBase as TaskEventBase_alias_1 }
|
|
1124
|
-
export { TaskEventBase as TaskEventBase_alias_2 }
|
|
1125
|
-
|
|
1126
|
-
declare type TaskEventCallback = (event: TaskEvent) => void | Promise<void>;
|
|
1127
|
-
export { TaskEventCallback }
|
|
1128
|
-
export { TaskEventCallback as TaskEventCallback_alias_1 }
|
|
1129
|
-
export { TaskEventCallback as TaskEventCallback_alias_2 }
|
|
1130
|
-
|
|
1131
|
-
/**
|
|
1132
|
-
* Event for request end
|
|
1133
|
-
*/
|
|
1134
|
-
declare interface TaskEventEndRequest extends TaskEventBase {
|
|
1135
|
-
kind: TaskEventKind.EndRequest;
|
|
1136
|
-
message: string;
|
|
1137
|
-
}
|
|
1138
|
-
export { TaskEventEndRequest }
|
|
1139
|
-
export { TaskEventEndRequest as TaskEventEndRequest_alias_1 }
|
|
1140
|
-
export { TaskEventEndRequest as TaskEventEndRequest_alias_2 }
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* Event for task end
|
|
1144
|
-
*/
|
|
1145
|
-
declare interface TaskEventEndTask extends TaskEventBase {
|
|
1146
|
-
kind: TaskEventKind.EndTask;
|
|
1147
|
-
exitReason: ExitReason;
|
|
1148
|
-
}
|
|
1149
|
-
export { TaskEventEndTask }
|
|
1150
|
-
export { TaskEventEndTask as TaskEventEndTask_alias_1 }
|
|
1151
|
-
export { TaskEventEndTask as TaskEventEndTask_alias_2 }
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* Enum representing different kinds of task events
|
|
1155
|
-
*/
|
|
1156
|
-
declare enum TaskEventKind {
|
|
1157
|
-
StartTask = "StartTask",
|
|
1158
|
-
StartRequest = "StartRequest",
|
|
1159
|
-
EndRequest = "EndRequest",
|
|
1160
|
-
Text = "Text",
|
|
1161
|
-
Reasoning = "Reasoning",
|
|
1162
|
-
ToolUse = "ToolUse",
|
|
1163
|
-
ToolReply = "ToolReply",
|
|
1164
|
-
ToolError = "ToolError",
|
|
1165
|
-
UsageExceeded = "UsageExceeded",
|
|
1166
|
-
EndTask = "EndTask"
|
|
1167
|
-
}
|
|
1168
|
-
export { TaskEventKind }
|
|
1169
|
-
export { TaskEventKind as TaskEventKind_alias_1 }
|
|
1170
|
-
export { TaskEventKind as TaskEventKind_alias_2 }
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* Event for request start
|
|
1174
|
-
*/
|
|
1175
|
-
declare interface TaskEventStartRequest extends TaskEventBase {
|
|
1176
|
-
kind: TaskEventKind.StartRequest;
|
|
1177
|
-
userMessage: readonly JsonModelMessage[];
|
|
1178
|
-
}
|
|
1179
|
-
export { TaskEventStartRequest }
|
|
1180
|
-
export { TaskEventStartRequest as TaskEventStartRequest_alias_1 }
|
|
1181
|
-
export { TaskEventStartRequest as TaskEventStartRequest_alias_2 }
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
* Event for task start
|
|
1185
|
-
*/
|
|
1186
|
-
declare interface TaskEventStartTask extends TaskEventBase {
|
|
1187
|
-
kind: TaskEventKind.StartTask;
|
|
1188
|
-
systemPrompt: string;
|
|
1189
|
-
}
|
|
1190
|
-
export { TaskEventStartTask }
|
|
1191
|
-
export { TaskEventStartTask as TaskEventStartTask_alias_1 }
|
|
1192
|
-
export { TaskEventStartTask as TaskEventStartTask_alias_2 }
|
|
1193
|
-
|
|
1194
|
-
/**
|
|
1195
|
-
* Event for text/reasoning updates
|
|
1196
|
-
*/
|
|
1197
|
-
declare interface TaskEventText extends TaskEventBase {
|
|
1198
|
-
kind: TaskEventKind.Text | TaskEventKind.Reasoning;
|
|
1199
|
-
newText: string;
|
|
1200
|
-
}
|
|
1201
|
-
export { TaskEventText }
|
|
1202
|
-
export { TaskEventText as TaskEventText_alias_1 }
|
|
1203
|
-
export { TaskEventText as TaskEventText_alias_2 }
|
|
1204
|
-
|
|
1205
|
-
declare interface TaskEventToolError extends TaskEventBase {
|
|
1206
|
-
kind: TaskEventKind.ToolError;
|
|
1207
|
-
tool: string;
|
|
1208
|
-
error: ToolResponseError | ToolResponseResult;
|
|
1209
|
-
}
|
|
1210
|
-
export { TaskEventToolError }
|
|
1211
|
-
export { TaskEventToolError as TaskEventToolError_alias_1 }
|
|
1212
|
-
export { TaskEventToolError as TaskEventToolError_alias_2 }
|
|
1213
|
-
|
|
1214
|
-
declare interface TaskEventToolResult extends TaskEventBase {
|
|
1215
|
-
kind: TaskEventKind.ToolReply;
|
|
1216
|
-
tool: string;
|
|
1217
|
-
content: ToolResponseResult;
|
|
1218
|
-
}
|
|
1219
|
-
export { TaskEventToolResult }
|
|
1220
|
-
export { TaskEventToolResult as TaskEventToolResult_alias_1 }
|
|
1221
|
-
export { TaskEventToolResult as TaskEventToolResult_alias_2 }
|
|
1222
|
-
|
|
1223
|
-
/**
|
|
1224
|
-
* Event for tool-related updates
|
|
1225
|
-
*/
|
|
1226
|
-
declare interface TaskEventToolUse extends TaskEventBase {
|
|
1227
|
-
kind: TaskEventKind.ToolUse;
|
|
1228
|
-
tool: string;
|
|
1229
|
-
params: Record<string, any>;
|
|
1230
|
-
}
|
|
1231
|
-
export { TaskEventToolUse }
|
|
1232
|
-
export { TaskEventToolUse as TaskEventToolUse_alias_1 }
|
|
1233
|
-
export { TaskEventToolUse as TaskEventToolUse_alias_2 }
|
|
1234
|
-
|
|
1235
|
-
/**
|
|
1236
|
-
* Event for task usage exceeded
|
|
1237
|
-
*/
|
|
1238
|
-
declare interface TaskEventUsageExceeded extends TaskEventBase {
|
|
1239
|
-
kind: TaskEventKind.UsageExceeded;
|
|
1240
|
-
}
|
|
1241
|
-
export { TaskEventUsageExceeded }
|
|
1242
|
-
export { TaskEventUsageExceeded as TaskEventUsageExceeded_alias_1 }
|
|
1243
|
-
export { TaskEventUsageExceeded as TaskEventUsageExceeded_alias_2 }
|
|
1244
|
-
|
|
1245
|
-
declare type TodoItem = z.infer<typeof TodoItemSchema>;
|
|
1246
|
-
export { TodoItem }
|
|
1247
|
-
export { TodoItem as TodoItem_alias_1 }
|
|
1248
|
-
export { TodoItem as TodoItem_alias_2 }
|
|
1249
|
-
|
|
1250
|
-
declare const TodoItemSchema: z.ZodObject<{
|
|
1251
|
-
id: z.ZodString;
|
|
1252
|
-
title: z.ZodString;
|
|
1253
|
-
description: z.ZodString;
|
|
1254
|
-
status: z.ZodEnum<{
|
|
1255
|
-
open: "open";
|
|
1256
|
-
completed: "completed";
|
|
1257
|
-
closed: "closed";
|
|
1258
|
-
}>;
|
|
1259
|
-
}, z.core.$strip>;
|
|
1260
|
-
export { TodoItemSchema }
|
|
1261
|
-
export { TodoItemSchema as TodoItemSchema_alias_1 }
|
|
1262
|
-
export { TodoItemSchema as TodoItemSchema_alias_2 }
|
|
1263
|
-
|
|
1264
|
-
declare type TodoProvider = {
|
|
1265
|
-
listTodoItems: (id?: string | null, status?: string | null) => Promise<ListTodoItemsOutput>;
|
|
1266
|
-
getTodoItem: (id: string) => Promise<GetTodoItemOutput | undefined>;
|
|
1267
|
-
updateTodoItem: (input: UpdateTodoItemInput) => Promise<UpdateTodoItemOutput>;
|
|
1268
|
-
};
|
|
1269
|
-
export { TodoProvider }
|
|
1270
|
-
export { TodoProvider as TodoProvider_alias_1 }
|
|
1271
|
-
export { TodoProvider as TodoProvider_alias_2 }
|
|
1272
|
-
|
|
1273
|
-
declare const TodoStatus: z.ZodEnum<{
|
|
1274
|
-
open: "open";
|
|
1275
|
-
completed: "completed";
|
|
1276
|
-
closed: "closed";
|
|
1277
|
-
}>;
|
|
1278
|
-
export { TodoStatus }
|
|
1279
|
-
export { TodoStatus as TodoStatus_alias_1 }
|
|
1280
|
-
export { TodoStatus as TodoStatus_alias_2 }
|
|
1281
|
-
|
|
1282
|
-
declare const toJsonModelMessage: (msg: ModelMessage) => JsonModelMessage;
|
|
1283
|
-
export { toJsonModelMessage }
|
|
1284
|
-
export { toJsonModelMessage as toJsonModelMessage_alias_1 }
|
|
1285
|
-
export { toJsonModelMessage as toJsonModelMessage_alias_2 }
|
|
1286
|
-
|
|
1287
|
-
declare type ToolHandler<_T, P> = (provider: P, args: Partial<Record<string, ToolParameterValue>>) => Promise<AgentToolResponse>;
|
|
1288
|
-
export { ToolHandler }
|
|
1289
|
-
export { ToolHandler as ToolHandler_alias_1 }
|
|
1290
|
-
|
|
1291
|
-
export declare const toolInfo: {
|
|
1292
|
-
readonly name: "askFollowupQuestion";
|
|
1293
|
-
readonly description: "Call this when vital details are missing. Pose each follow-up as one direct, unambiguous question. If it speeds the reply, add up to five short, mutually-exclusive answer options. Group any related questions in the same call to avoid a back-and-forth chain.";
|
|
1294
|
-
readonly parameters: z.ZodObject<{
|
|
1295
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
1296
|
-
prompt: z.ZodString;
|
|
1297
|
-
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1298
|
-
}, z.core.$strip>>;
|
|
1299
|
-
}, z.core.$strip>;
|
|
1300
|
-
};
|
|
1301
|
-
|
|
1302
|
-
export declare const toolInfo_alias_1: {
|
|
1303
|
-
readonly name: "executeCommand";
|
|
1304
|
-
readonly description: "Run a single CLI command. The command is always executed in the project-root working directory (regardless of earlier commands). Prefer one-off shell commands over wrapper scripts for flexibility. **IMPORTANT**: After an `execute_command` call, you MUST stop and NOT allowed to make further tool calls in the same message.";
|
|
1305
|
-
readonly parameters: z.ZodObject<{
|
|
1306
|
-
command: z.ZodString;
|
|
1307
|
-
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1308
|
-
}, z.core.$strip>;
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
export declare const toolInfo_alias_10: {
|
|
1312
|
-
readonly name: "removeFile";
|
|
1313
|
-
readonly description: "Request to remove a file at the specified path.";
|
|
1314
|
-
readonly parameters: z.ZodObject<{
|
|
1315
|
-
path: z.ZodString;
|
|
1316
|
-
}, z.core.$strip>;
|
|
1317
|
-
};
|
|
1318
|
-
|
|
1319
|
-
export declare const toolInfo_alias_11: {
|
|
1320
|
-
readonly name: "renameFile";
|
|
1321
|
-
readonly description: "Request to rename a file from source path to target path.";
|
|
1322
|
-
readonly parameters: z.ZodObject<{
|
|
1323
|
-
source_path: z.ZodString;
|
|
1324
|
-
target_path: z.ZodString;
|
|
1325
|
-
}, z.core.$strip>;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
|
-
export declare const toolInfo_alias_12: {
|
|
1329
|
-
readonly name: "replaceInFile";
|
|
1330
|
-
readonly description: "Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.";
|
|
1331
|
-
readonly parameters: z.ZodObject<{
|
|
1332
|
-
path: z.ZodString;
|
|
1333
|
-
diff: z.ZodString;
|
|
1334
|
-
}, z.core.$strip>;
|
|
1335
|
-
};
|
|
1336
|
-
|
|
1337
|
-
export declare const toolInfo_alias_13: {
|
|
1338
|
-
readonly name: "search";
|
|
1339
|
-
readonly description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.";
|
|
1340
|
-
readonly parameters: z.ZodObject<{
|
|
1341
|
-
query: z.ZodString;
|
|
1342
|
-
}, z.core.$strip>;
|
|
1343
|
-
};
|
|
1344
|
-
|
|
1345
|
-
export declare const toolInfo_alias_14: {
|
|
1346
|
-
readonly name: "searchFiles";
|
|
1347
|
-
readonly description: "Request to perform a regex search across files in a specified directory, outputting context-rich results that include surrounding lines. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context.";
|
|
1348
|
-
readonly parameters: z.ZodObject<{
|
|
1349
|
-
path: z.ZodString;
|
|
1350
|
-
regex: z.ZodString;
|
|
1351
|
-
filePattern: z.ZodOptional<z.ZodString>;
|
|
1352
|
-
}, z.core.$strip>;
|
|
1353
|
-
};
|
|
1354
|
-
|
|
1355
|
-
export declare const toolInfo_alias_15: {
|
|
1356
|
-
readonly name: "updateMemory";
|
|
1357
|
-
readonly description: "Appends, replaces, or removes content from a memory topic. Use \"append\" to add to existing content, \"replace\" to overwrite entirely, or \"remove\" to delete a topic. Memory persists across tool calls within a workflow.";
|
|
1358
|
-
readonly parameters: z.ZodObject<{
|
|
1359
|
-
operation: z.ZodEnum<{
|
|
1360
|
-
append: "append";
|
|
1361
|
-
replace: "replace";
|
|
1362
|
-
remove: "remove";
|
|
1363
|
-
}>;
|
|
1364
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1365
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1366
|
-
}, z.core.$strip>;
|
|
1367
|
-
};
|
|
1368
|
-
|
|
1369
|
-
export declare const toolInfo_alias_16: {
|
|
1370
|
-
readonly name: "updateTodoItem";
|
|
1371
|
-
readonly description: "Add or update a to-do item.";
|
|
1372
|
-
readonly parameters: ZodObject< {
|
|
1373
|
-
operation: ZodEnum< {
|
|
1374
|
-
add: "add";
|
|
1375
|
-
update: "update";
|
|
1376
|
-
}>;
|
|
1377
|
-
id: ZodOptional<ZodNullable<ZodString>>;
|
|
1378
|
-
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
1379
|
-
title: ZodOptional<ZodNullable<ZodString>>;
|
|
1380
|
-
description: ZodOptional<ZodNullable<ZodString>>;
|
|
1381
|
-
status: ZodOptional<ZodNullable<ZodEnum< {
|
|
1382
|
-
open: "open";
|
|
1383
|
-
completed: "completed";
|
|
1384
|
-
closed: "closed";
|
|
1385
|
-
}>>>;
|
|
1386
|
-
}, $strip>;
|
|
1387
|
-
};
|
|
1388
|
-
|
|
1389
|
-
export declare const toolInfo_alias_17: {
|
|
1390
|
-
readonly name: "writeToFile";
|
|
1391
|
-
readonly description: "Request to write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the file. Ensure that the output content does not include incorrect escaped character patterns such as `<`, `>`, or `&`. Also ensure there is no unwanted CDATA tags in the content.";
|
|
1392
|
-
readonly parameters: z.ZodObject<{
|
|
1393
|
-
path: z.ZodString;
|
|
1394
|
-
content: z.ZodString;
|
|
1395
|
-
}, z.core.$strip>;
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
export declare const toolInfo_alias_2: {
|
|
1399
|
-
readonly name: "fetchUrl";
|
|
1400
|
-
readonly description: "Fetch the content located at one or more HTTP(S) URLs and return it in Markdown format. This works for standard web pages as well as raw files (e.g. README.md, source code) hosted on platforms like GitHub.";
|
|
1401
|
-
readonly parameters: z.ZodObject<{
|
|
1402
|
-
url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
1403
|
-
}, z.core.$strip>;
|
|
1404
|
-
};
|
|
1405
|
-
|
|
1406
|
-
export declare const toolInfo_alias_3: {
|
|
1407
|
-
readonly name: "getTodoItem";
|
|
1408
|
-
readonly description: "Get a to-do item by its ID.";
|
|
1409
|
-
readonly parameters: z.ZodObject<{
|
|
1410
|
-
id: z.ZodString;
|
|
1411
|
-
}, z.core.$strip>;
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
export declare const toolInfo_alias_4: {
|
|
1415
|
-
readonly name: "listFiles";
|
|
1416
|
-
readonly description: "Request to list files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents. Do not use this tool to confirm the existence of files you may have created, as the user will let you know if the files were created successfully or not.";
|
|
1417
|
-
readonly parameters: z.ZodObject<{
|
|
1418
|
-
path: z.ZodString;
|
|
1419
|
-
maxCount: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
1420
|
-
recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1421
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1422
|
-
}, z.core.$strip>;
|
|
1423
|
-
};
|
|
1424
|
-
|
|
1425
|
-
export declare const toolInfo_alias_5: {
|
|
1426
|
-
readonly name: "listMemoryTopics";
|
|
1427
|
-
readonly description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
|
|
1428
|
-
readonly parameters: z.ZodObject<{}, z.core.$strip>;
|
|
1429
|
-
};
|
|
1430
|
-
|
|
1431
|
-
export declare const toolInfo_alias_6: {
|
|
1432
|
-
readonly name: "listTodoItems";
|
|
1433
|
-
readonly description: "List all to-do items, sorted by id. If an id is provided, it lists all sub-items for that id. Can be filtered by status.";
|
|
1434
|
-
readonly parameters: z.ZodObject<{
|
|
1435
|
-
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1436
|
-
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1437
|
-
open: "open";
|
|
1438
|
-
completed: "completed";
|
|
1439
|
-
closed: "closed";
|
|
1440
|
-
}>>>;
|
|
1441
|
-
}, z.core.$strip>;
|
|
1442
|
-
};
|
|
1443
|
-
|
|
1444
|
-
export declare const toolInfo_alias_7: {
|
|
1445
|
-
readonly name: "readBinaryFile";
|
|
1446
|
-
readonly description: "Read a binary file from a URL or local path. Use file:// prefix to access local files. This can be used to access non-text files such as PDFs or images.";
|
|
1447
|
-
readonly parameters: z.ZodObject<{
|
|
1448
|
-
url: z.ZodString;
|
|
1449
|
-
}, z.core.$strip>;
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
export declare const toolInfo_alias_8: {
|
|
1453
|
-
readonly name: "readFile";
|
|
1454
|
-
readonly description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
|
|
1455
|
-
readonly parameters: z.ZodObject<{
|
|
1456
|
-
path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
1457
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>>;
|
|
1458
|
-
}, z.core.$strip>;
|
|
1459
|
-
};
|
|
1460
|
-
|
|
1461
|
-
export declare const toolInfo_alias_9: {
|
|
1462
|
-
readonly name: "readMemory";
|
|
1463
|
-
readonly description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.";
|
|
1464
|
-
readonly parameters: z.ZodObject<{
|
|
1465
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1466
|
-
}, z.core.$strip>;
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
declare type ToolParameter = {
|
|
1470
|
-
name: string;
|
|
1471
|
-
description: string;
|
|
1472
|
-
required: boolean;
|
|
1473
|
-
usageValue?: string;
|
|
1474
|
-
allowMultiple?: boolean;
|
|
1475
|
-
children?: ToolParameter[];
|
|
1476
|
-
};
|
|
1477
|
-
export { ToolParameter }
|
|
1478
|
-
export { ToolParameter as ToolParameter_alias_1 }
|
|
1479
|
-
|
|
1480
|
-
declare type ToolParameterValue = string | {
|
|
1481
|
-
[key: string]: ToolParameterValue;
|
|
1482
|
-
} | ToolParameterValue[];
|
|
1483
|
-
export { ToolParameterValue }
|
|
1484
|
-
export { ToolParameterValue as ToolParameterValue_alias_1 }
|
|
1485
|
-
|
|
1486
|
-
declare type ToolProvider = FilesystemProvider & CommandProvider & InteractionProvider & WebProvider & Partial<MemoryProvider> & Partial<TodoProvider>;
|
|
1487
|
-
export { ToolProvider }
|
|
1488
|
-
export { ToolProvider as ToolProvider_alias_1 }
|
|
1489
|
-
export { ToolProvider as ToolProvider_alias_2 }
|
|
1490
|
-
|
|
1491
|
-
declare type ToolRegistry = Record<string, ToolSignature<any, any>>;
|
|
1492
|
-
export { ToolRegistry }
|
|
1493
|
-
export { ToolRegistry as ToolRegistry_alias_1 }
|
|
1494
|
-
export { ToolRegistry as ToolRegistry_alias_2 }
|
|
1495
|
-
|
|
1496
|
-
declare type ToolResponseError = {
|
|
1497
|
-
type: ToolResponseType.Error;
|
|
1498
|
-
message: ToolResponseResult;
|
|
1499
|
-
};
|
|
1500
|
-
export { ToolResponseError }
|
|
1501
|
-
export { ToolResponseError as ToolResponseError_alias_1 }
|
|
1502
|
-
|
|
1503
|
-
declare type ToolResponseExit = {
|
|
1504
|
-
type: ToolResponseType.Exit;
|
|
1505
|
-
message: string;
|
|
1506
|
-
object?: any;
|
|
1507
|
-
};
|
|
1508
|
-
export { ToolResponseExit }
|
|
1509
|
-
export { ToolResponseExit as ToolResponseExit_alias_1 }
|
|
1510
|
-
|
|
1511
|
-
declare type ToolResponseReply = {
|
|
1512
|
-
type: ToolResponseType.Reply;
|
|
1513
|
-
message: ToolResponseResult;
|
|
1514
|
-
};
|
|
1515
|
-
export { ToolResponseReply }
|
|
1516
|
-
export { ToolResponseReply as ToolResponseReply_alias_1 }
|
|
1517
|
-
|
|
1518
|
-
declare type ToolResponseResult = {
|
|
1519
|
-
type: 'text';
|
|
1520
|
-
value: string;
|
|
1521
|
-
} | {
|
|
1522
|
-
type: 'json';
|
|
1523
|
-
value: JSONValue;
|
|
1524
|
-
} | {
|
|
1525
|
-
type: 'error-text';
|
|
1526
|
-
value: string;
|
|
1527
|
-
} | {
|
|
1528
|
-
type: 'error-json';
|
|
1529
|
-
value: JSONValue;
|
|
1530
|
-
} | {
|
|
1531
|
-
type: 'content';
|
|
1532
|
-
value: Array<{
|
|
1533
|
-
type: 'text';
|
|
1534
|
-
text: string;
|
|
1535
|
-
} | ToolResponseResultMedia>;
|
|
1536
|
-
};
|
|
1537
|
-
export { ToolResponseResult }
|
|
1538
|
-
export { ToolResponseResult as ToolResponseResult_alias_1 }
|
|
1539
|
-
|
|
1540
|
-
declare type ToolResponseResultMedia = {
|
|
1541
|
-
type: 'media';
|
|
1542
|
-
data: string;
|
|
1543
|
-
mediaType: string;
|
|
1544
|
-
url: string;
|
|
1545
|
-
};
|
|
1546
|
-
export { ToolResponseResultMedia }
|
|
1547
|
-
export { ToolResponseResultMedia as ToolResponseResultMedia_alias_1 }
|
|
1548
|
-
|
|
1549
|
-
declare enum ToolResponseType {
|
|
1550
|
-
Reply = "Reply",
|
|
1551
|
-
Exit = "Exit",
|
|
1552
|
-
Error = "Error"
|
|
1553
|
-
}
|
|
1554
|
-
export { ToolResponseType }
|
|
1555
|
-
export { ToolResponseType as ToolResponseType_alias_1 }
|
|
1556
|
-
|
|
1557
|
-
declare type ToolSignature<I, O> = {
|
|
1558
|
-
input: I;
|
|
1559
|
-
output: O;
|
|
1560
|
-
};
|
|
1561
|
-
export { ToolSignature }
|
|
1562
|
-
export { ToolSignature as ToolSignature_alias_1 }
|
|
1563
|
-
export { ToolSignature as ToolSignature_alias_2 }
|
|
1564
|
-
|
|
1565
|
-
declare type Totals = {
|
|
1566
|
-
input: number;
|
|
1567
|
-
output: number;
|
|
1568
|
-
cachedRead: number;
|
|
1569
|
-
cost: number;
|
|
1570
|
-
messageCount: number;
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
declare type UpdateTodoItemInput = z.infer<typeof UpdateTodoItemInputSchema>;
|
|
1574
|
-
export { UpdateTodoItemInput }
|
|
1575
|
-
export { UpdateTodoItemInput as UpdateTodoItemInput_alias_1 }
|
|
1576
|
-
export { UpdateTodoItemInput as UpdateTodoItemInput_alias_2 }
|
|
1577
|
-
|
|
1578
|
-
declare const UpdateTodoItemInputSchema: z.ZodObject<{
|
|
1579
|
-
operation: z.ZodEnum<{
|
|
1580
|
-
add: "add";
|
|
1581
|
-
update: "update";
|
|
1582
|
-
}>;
|
|
1583
|
-
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1584
|
-
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1585
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1586
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1587
|
-
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1588
|
-
open: "open";
|
|
1589
|
-
completed: "completed";
|
|
1590
|
-
closed: "closed";
|
|
1591
|
-
}>>>;
|
|
1592
|
-
}, z.core.$strip>;
|
|
1593
|
-
export { UpdateTodoItemInputSchema }
|
|
1594
|
-
export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_1 }
|
|
1595
|
-
export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_2 }
|
|
1596
|
-
|
|
1597
|
-
declare type UpdateTodoItemOutput = z.infer<typeof UpdateTodoItemOutputSchema>;
|
|
1598
|
-
export { UpdateTodoItemOutput }
|
|
1599
|
-
export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_1 }
|
|
1600
|
-
export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_2 }
|
|
1601
|
-
|
|
1602
|
-
declare const UpdateTodoItemOutputSchema: z.ZodObject<{
|
|
1603
|
-
id: z.ZodString;
|
|
1604
|
-
}, z.core.$strip>;
|
|
1605
|
-
export { UpdateTodoItemOutputSchema }
|
|
1606
|
-
export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_1 }
|
|
1607
|
-
export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_2 }
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* Tracks token / cost usage across any mix of LLM models.
|
|
1611
|
-
* Supports optional caps on total messages and total cost.
|
|
1612
|
-
*/
|
|
1613
|
-
declare class UsageMeter {
|
|
1614
|
-
#private;
|
|
1615
|
-
constructor(modelInfos?: Record<string, Record<string, Partial<ModelInfo>>>, opts?: {
|
|
1616
|
-
maxMessages?: number;
|
|
1617
|
-
maxCost?: number;
|
|
1618
|
-
});
|
|
1619
|
-
addUsage(llm: LanguageModelV2, resp: {
|
|
1620
|
-
usage: LanguageModelV2Usage;
|
|
1621
|
-
providerMetadata?: any;
|
|
1622
|
-
} | {
|
|
1623
|
-
totalUsage: LanguageModelV2Usage;
|
|
1624
|
-
providerMetadata?: any;
|
|
1625
|
-
}, options?: {
|
|
1626
|
-
modelInfo?: ModelInfo;
|
|
1627
|
-
}): void;
|
|
1628
|
-
/** Override the running totals (e.g., restore from saved state). */
|
|
1629
|
-
setUsage(newUsage: Partial<Totals>): void;
|
|
1630
|
-
/** Manually bump the message count (useful if you record some messages without token info). */
|
|
1631
|
-
incrementMessageCount(n?: number): void;
|
|
1632
|
-
/** Reset the running totals. */
|
|
1633
|
-
resetUsage(): void;
|
|
1634
|
-
/** Return true once either messages or cost exceed the configured caps. */
|
|
1635
|
-
isLimitExceeded(): {
|
|
1636
|
-
messageCount: boolean;
|
|
1637
|
-
maxMessages: number;
|
|
1638
|
-
cost: boolean;
|
|
1639
|
-
maxCost: number;
|
|
1640
|
-
result: boolean;
|
|
1641
|
-
};
|
|
1642
|
-
/** Same as isLimitExceeded but throws an error if a limit is hit. */
|
|
1643
|
-
checkLimit(): void;
|
|
1644
|
-
/** Getter for the aggregated totals (immutable copy). */
|
|
1645
|
-
get usage(): {
|
|
1646
|
-
input: number;
|
|
1647
|
-
output: number;
|
|
1648
|
-
cachedRead: number;
|
|
1649
|
-
cost: number;
|
|
1650
|
-
messageCount: number;
|
|
1651
|
-
};
|
|
1652
|
-
/** Merge another UsageMeter's totals into this one. */
|
|
1653
|
-
merge(other: UsageMeter): void;
|
|
1654
|
-
getUsageText(): string;
|
|
1655
|
-
onFinishHandler(llm: LanguageModelV2): (evt: {
|
|
1656
|
-
totalUsage: LanguageModelV2Usage;
|
|
1657
|
-
providerMetadata: any;
|
|
1658
|
-
}) => void;
|
|
1659
|
-
}
|
|
1660
|
-
export { UsageMeter }
|
|
1661
|
-
export { UsageMeter as UsageMeter_alias_1 }
|
|
1662
|
-
|
|
1663
|
-
declare type WebProvider = {
|
|
1664
|
-
fetchUrl?: (url: string) => Promise<string>;
|
|
1665
|
-
search?: (query: string) => Promise<string>;
|
|
1666
|
-
};
|
|
1667
|
-
export { WebProvider }
|
|
1668
|
-
export { WebProvider as WebProvider_alias_1 }
|
|
1669
|
-
export { WebProvider as WebProvider_alias_2 }
|
|
1670
|
-
|
|
1671
|
-
declare type WorkflowContext<TTools extends ToolRegistry> = {
|
|
1672
|
-
step: StepFn;
|
|
1673
|
-
logger: Logger;
|
|
1674
|
-
tools: WorkflowTools<TTools>;
|
|
1675
|
-
};
|
|
1676
|
-
export { WorkflowContext }
|
|
1677
|
-
export { WorkflowContext as WorkflowContext_alias_1 }
|
|
1678
|
-
export { WorkflowContext as WorkflowContext_alias_2 }
|
|
1679
|
-
|
|
1680
|
-
declare type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
|
|
1681
|
-
export { WorkflowDefinition }
|
|
1682
|
-
export { WorkflowDefinition as WorkflowDefinition_alias_1 }
|
|
1683
|
-
|
|
1684
|
-
declare const WorkflowDefinitionSchema: z.ZodObject<{
|
|
1685
|
-
task: z.ZodString;
|
|
1686
|
-
inputs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1687
|
-
id: z.ZodString;
|
|
1688
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1689
|
-
default: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1690
|
-
}, z.core.$strip>>>>;
|
|
1691
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
1692
|
-
id: z.ZodString;
|
|
1693
|
-
tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1694
|
-
task: z.ZodString;
|
|
1695
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1696
|
-
expected_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1697
|
-
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1698
|
-
outputSchema: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1699
|
-
timeout: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1700
|
-
}, z.core.$strip>>;
|
|
1701
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1702
|
-
}, z.core.$strip>;
|
|
1703
|
-
export { WorkflowDefinitionSchema }
|
|
1704
|
-
export { WorkflowDefinitionSchema as WorkflowDefinitionSchema_alias_1 }
|
|
1705
|
-
|
|
1706
|
-
declare type WorkflowFile = z.infer<typeof WorkflowFileSchema>;
|
|
1707
|
-
export { WorkflowFile }
|
|
1708
|
-
export { WorkflowFile as WorkflowFile_alias_1 }
|
|
1709
|
-
|
|
1710
|
-
declare const WorkflowFileSchema: z.ZodObject<{
|
|
1711
|
-
workflows: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1712
|
-
task: z.ZodString;
|
|
1713
|
-
inputs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1714
|
-
id: z.ZodString;
|
|
1715
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1716
|
-
default: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1717
|
-
}, z.core.$strip>>>>;
|
|
1718
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
1719
|
-
id: z.ZodString;
|
|
1720
|
-
tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1721
|
-
task: z.ZodString;
|
|
1722
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1723
|
-
expected_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1724
|
-
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1725
|
-
outputSchema: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1726
|
-
timeout: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1727
|
-
}, z.core.$strip>>;
|
|
1728
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1729
|
-
}, z.core.$strip>>;
|
|
1730
|
-
}, z.core.$strip>;
|
|
1731
|
-
export { WorkflowFileSchema }
|
|
1732
|
-
export { WorkflowFileSchema as WorkflowFileSchema_alias_1 }
|
|
1733
|
-
|
|
1734
|
-
declare type WorkflowFn<TInput, TOutput, TTools extends ToolRegistry> = (input: TInput, context: WorkflowContext<TTools>) => Promise<TOutput>;
|
|
1735
|
-
export { WorkflowFn }
|
|
1736
|
-
export { WorkflowFn as WorkflowFn_alias_1 }
|
|
1737
|
-
export { WorkflowFn as WorkflowFn_alias_2 }
|
|
1738
|
-
|
|
1739
|
-
declare type WorkflowInputDefinition = z.infer<typeof WorkflowInputDefinitionSchema>;
|
|
1740
|
-
export { WorkflowInputDefinition }
|
|
1741
|
-
export { WorkflowInputDefinition as WorkflowInputDefinition_alias_1 }
|
|
1742
|
-
|
|
1743
|
-
declare const WorkflowInputDefinitionSchema: z.ZodObject<{
|
|
1744
|
-
id: z.ZodString;
|
|
1745
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1746
|
-
default: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1747
|
-
}, z.core.$strip>;
|
|
1748
|
-
export { WorkflowInputDefinitionSchema }
|
|
1749
|
-
export { WorkflowInputDefinitionSchema as WorkflowInputDefinitionSchema_alias_1 }
|
|
1750
|
-
|
|
1751
|
-
declare type WorkflowStepDefinition = z.infer<typeof WorkflowStepDefinitionSchema>;
|
|
1752
|
-
export { WorkflowStepDefinition }
|
|
1753
|
-
export { WorkflowStepDefinition as WorkflowStepDefinition_alias_1 }
|
|
1754
|
-
|
|
1755
|
-
declare const WorkflowStepDefinitionSchema: z.ZodObject<{
|
|
1756
|
-
id: z.ZodString;
|
|
1757
|
-
tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1758
|
-
task: z.ZodString;
|
|
1759
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1760
|
-
expected_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1761
|
-
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1762
|
-
outputSchema: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1763
|
-
timeout: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1764
|
-
}, z.core.$strip>;
|
|
1765
|
-
export { WorkflowStepDefinitionSchema }
|
|
1766
|
-
export { WorkflowStepDefinitionSchema as WorkflowStepDefinitionSchema_alias_1 }
|
|
1767
|
-
|
|
1768
|
-
declare type WorkflowTools<TTools extends ToolRegistry> = {
|
|
1769
|
-
[K in keyof TTools]: (input: TTools[K]['input']) => Promise<TTools[K]['output']>;
|
|
1770
|
-
};
|
|
1771
|
-
export { WorkflowTools }
|
|
1772
|
-
export { WorkflowTools as WorkflowTools_alias_1 }
|
|
1773
|
-
export { WorkflowTools as WorkflowTools_alias_2 }
|
|
1774
|
-
|
|
1775
|
-
export { }
|