@polka-codes/core 0.9.48 → 0.9.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.ts +347 -108
- package/dist/index.d.ts +13 -0
- package/dist/index.js +273 -104
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { $strip } from 'zod/v4/core';
|
|
1
2
|
import type { FilePart } from 'ai';
|
|
2
3
|
import type { ImagePart } from 'ai';
|
|
3
4
|
import type { JSONValue } from '@ai-sdk/provider';
|
|
@@ -6,6 +7,11 @@ import type { LanguageModelV2ToolResultOutput } from '@ai-sdk/provider';
|
|
|
6
7
|
import type { LanguageModelV2Usage } from '@ai-sdk/provider';
|
|
7
8
|
import type { TextPart } from 'ai';
|
|
8
9
|
import { z } from 'zod';
|
|
10
|
+
import { ZodEnum } from 'zod';
|
|
11
|
+
import { ZodNullable } from 'zod';
|
|
12
|
+
import { ZodObject } from 'zod';
|
|
13
|
+
import { ZodOptional } from 'zod';
|
|
14
|
+
import { ZodString } from 'zod';
|
|
9
15
|
|
|
10
16
|
declare type CommandProvider = {
|
|
11
17
|
executeCommand?: (command: string, needApprove: boolean) => Promise<{
|
|
@@ -102,6 +108,42 @@ export { _default as askFollowupQuestion_alias_1 }
|
|
|
102
108
|
export { _default as default_alias }
|
|
103
109
|
|
|
104
110
|
declare const _default_10: {
|
|
111
|
+
handler: ToolHandler<{
|
|
112
|
+
readonly name: "readMemory";
|
|
113
|
+
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.";
|
|
114
|
+
readonly parameters: z.ZodObject<{
|
|
115
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
}, MemoryProvider>;
|
|
118
|
+
name: "readMemory";
|
|
119
|
+
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.";
|
|
120
|
+
parameters: z.ZodObject<{
|
|
121
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
};
|
|
124
|
+
export { _default_10 as default_alias_9 }
|
|
125
|
+
export { _default_10 as readMemory }
|
|
126
|
+
export { _default_10 as readMemory_alias_1 }
|
|
127
|
+
|
|
128
|
+
declare const _default_11: {
|
|
129
|
+
handler: ToolHandler<{
|
|
130
|
+
readonly name: "removeFile";
|
|
131
|
+
readonly description: "Request to remove a file at the specified path.";
|
|
132
|
+
readonly parameters: z.ZodObject<{
|
|
133
|
+
path: z.ZodString;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
}, FilesystemProvider>;
|
|
136
|
+
name: "removeFile";
|
|
137
|
+
description: "Request to remove a file at the specified path.";
|
|
138
|
+
parameters: z.ZodObject<{
|
|
139
|
+
path: z.ZodString;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
};
|
|
142
|
+
export { _default_11 as default_alias_10 }
|
|
143
|
+
export { _default_11 as removeFile }
|
|
144
|
+
export { _default_11 as removeFile_alias_1 }
|
|
145
|
+
|
|
146
|
+
declare const _default_12: {
|
|
105
147
|
handler: ToolHandler<{
|
|
106
148
|
readonly name: "renameFile";
|
|
107
149
|
readonly description: "Request to rename a file from source path to target path.";
|
|
@@ -117,11 +159,11 @@ declare const _default_10: {
|
|
|
117
159
|
target_path: z.ZodString;
|
|
118
160
|
}, z.core.$strip>;
|
|
119
161
|
};
|
|
120
|
-
export {
|
|
121
|
-
export {
|
|
122
|
-
export {
|
|
162
|
+
export { _default_12 as default_alias_11 }
|
|
163
|
+
export { _default_12 as renameFile }
|
|
164
|
+
export { _default_12 as renameFile_alias_1 }
|
|
123
165
|
|
|
124
|
-
declare const
|
|
166
|
+
declare const _default_13: {
|
|
125
167
|
handler: ToolHandler<{
|
|
126
168
|
readonly name: "replaceInFile";
|
|
127
169
|
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.";
|
|
@@ -137,11 +179,11 @@ declare const _default_11: {
|
|
|
137
179
|
diff: z.ZodString;
|
|
138
180
|
}, z.core.$strip>;
|
|
139
181
|
};
|
|
140
|
-
export {
|
|
141
|
-
export {
|
|
142
|
-
export {
|
|
182
|
+
export { _default_13 as default_alias_12 }
|
|
183
|
+
export { _default_13 as replaceInFile }
|
|
184
|
+
export { _default_13 as replaceInFile_alias_1 }
|
|
143
185
|
|
|
144
|
-
declare const
|
|
186
|
+
declare const _default_14: {
|
|
145
187
|
handler: ToolHandler<{
|
|
146
188
|
readonly name: "searchFiles";
|
|
147
189
|
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.";
|
|
@@ -159,14 +201,14 @@ declare const _default_12: {
|
|
|
159
201
|
filePattern: z.ZodOptional<z.ZodString>;
|
|
160
202
|
}, z.core.$strip>;
|
|
161
203
|
};
|
|
162
|
-
export {
|
|
163
|
-
export {
|
|
164
|
-
export {
|
|
204
|
+
export { _default_14 as default_alias_13 }
|
|
205
|
+
export { _default_14 as searchFiles }
|
|
206
|
+
export { _default_14 as searchFiles_alias_1 }
|
|
165
207
|
|
|
166
|
-
declare const
|
|
208
|
+
declare const _default_15: {
|
|
167
209
|
handler: ToolHandler<{
|
|
168
210
|
readonly name: "updateMemory";
|
|
169
|
-
readonly description: "Appends, replaces, or removes content from a memory topic.";
|
|
211
|
+
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.";
|
|
170
212
|
readonly parameters: z.ZodObject<{
|
|
171
213
|
operation: z.ZodEnum<{
|
|
172
214
|
append: "append";
|
|
@@ -178,7 +220,7 @@ declare const _default_13: {
|
|
|
178
220
|
}, z.core.$strip>;
|
|
179
221
|
}, MemoryProvider>;
|
|
180
222
|
name: "updateMemory";
|
|
181
|
-
description: "Appends, replaces, or removes content from a memory topic.";
|
|
223
|
+
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.";
|
|
182
224
|
parameters: z.ZodObject<{
|
|
183
225
|
operation: z.ZodEnum<{
|
|
184
226
|
append: "append";
|
|
@@ -189,11 +231,53 @@ declare const _default_13: {
|
|
|
189
231
|
content: z.ZodOptional<z.ZodString>;
|
|
190
232
|
}, z.core.$strip>;
|
|
191
233
|
};
|
|
192
|
-
export {
|
|
193
|
-
export {
|
|
194
|
-
export {
|
|
234
|
+
export { _default_15 as default_alias_14 }
|
|
235
|
+
export { _default_15 as updateMemory }
|
|
236
|
+
export { _default_15 as updateMemory_alias_1 }
|
|
195
237
|
|
|
196
|
-
declare const
|
|
238
|
+
declare const _default_16: {
|
|
239
|
+
handler: ToolHandler<{
|
|
240
|
+
readonly name: "updateTodoItem";
|
|
241
|
+
readonly description: "Add or update a to-do item.";
|
|
242
|
+
readonly parameters: ZodObject< {
|
|
243
|
+
operation: ZodEnum< {
|
|
244
|
+
add: "add";
|
|
245
|
+
update: "update";
|
|
246
|
+
}>;
|
|
247
|
+
id: ZodOptional<ZodNullable<ZodString>>;
|
|
248
|
+
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
249
|
+
title: ZodOptional<ZodNullable<ZodString>>;
|
|
250
|
+
description: ZodOptional<ZodNullable<ZodString>>;
|
|
251
|
+
status: ZodOptional<ZodNullable<ZodEnum< {
|
|
252
|
+
open: "open";
|
|
253
|
+
completed: "completed";
|
|
254
|
+
closed: "closed";
|
|
255
|
+
}>>>;
|
|
256
|
+
}, $strip>;
|
|
257
|
+
}, TodoProvider>;
|
|
258
|
+
name: "updateTodoItem";
|
|
259
|
+
description: "Add or update a to-do item.";
|
|
260
|
+
parameters: ZodObject< {
|
|
261
|
+
operation: ZodEnum< {
|
|
262
|
+
add: "add";
|
|
263
|
+
update: "update";
|
|
264
|
+
}>;
|
|
265
|
+
id: ZodOptional<ZodNullable<ZodString>>;
|
|
266
|
+
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
267
|
+
title: ZodOptional<ZodNullable<ZodString>>;
|
|
268
|
+
description: ZodOptional<ZodNullable<ZodString>>;
|
|
269
|
+
status: ZodOptional<ZodNullable<ZodEnum< {
|
|
270
|
+
open: "open";
|
|
271
|
+
completed: "completed";
|
|
272
|
+
closed: "closed";
|
|
273
|
+
}>>>;
|
|
274
|
+
}, $strip>;
|
|
275
|
+
};
|
|
276
|
+
export { _default_16 as default_alias_15 }
|
|
277
|
+
export { _default_16 as updateTodoItem }
|
|
278
|
+
export { _default_16 as updateTodoItem_alias_1 }
|
|
279
|
+
|
|
280
|
+
declare const _default_17: {
|
|
197
281
|
handler: ToolHandler<{
|
|
198
282
|
readonly name: "writeToFile";
|
|
199
283
|
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.";
|
|
@@ -209,9 +293,9 @@ declare const _default_14: {
|
|
|
209
293
|
content: z.ZodString;
|
|
210
294
|
}, z.core.$strip>;
|
|
211
295
|
};
|
|
212
|
-
export {
|
|
213
|
-
export {
|
|
214
|
-
export {
|
|
296
|
+
export { _default_17 as default_alias_16 }
|
|
297
|
+
export { _default_17 as writeToFile }
|
|
298
|
+
export { _default_17 as writeToFile_alias_1 }
|
|
215
299
|
|
|
216
300
|
declare const _default_2: {
|
|
217
301
|
handler: ToolHandler<{
|
|
@@ -252,6 +336,24 @@ export { _default_3 as fetchUrl }
|
|
|
252
336
|
export { _default_3 as fetchUrl_alias_1 }
|
|
253
337
|
|
|
254
338
|
declare const _default_4: {
|
|
339
|
+
handler: ToolHandler<{
|
|
340
|
+
readonly name: "getTodoItem";
|
|
341
|
+
readonly description: "Get a to-do item by its ID.";
|
|
342
|
+
readonly parameters: z.ZodObject<{
|
|
343
|
+
id: z.ZodString;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
}, TodoProvider>;
|
|
346
|
+
name: "getTodoItem";
|
|
347
|
+
description: "Get a to-do item by its ID.";
|
|
348
|
+
parameters: z.ZodObject<{
|
|
349
|
+
id: z.ZodString;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
};
|
|
352
|
+
export { _default_4 as default_alias_3 }
|
|
353
|
+
export { _default_4 as getTodoItem }
|
|
354
|
+
export { _default_4 as getTodoItem_alias_1 }
|
|
355
|
+
|
|
356
|
+
declare const _default_5: {
|
|
255
357
|
handler: ToolHandler<{
|
|
256
358
|
readonly name: "listFiles";
|
|
257
359
|
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.";
|
|
@@ -271,25 +373,53 @@ declare const _default_4: {
|
|
|
271
373
|
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
272
374
|
}, z.core.$strip>;
|
|
273
375
|
};
|
|
274
|
-
export {
|
|
275
|
-
export {
|
|
276
|
-
export {
|
|
376
|
+
export { _default_5 as default_alias_4 }
|
|
377
|
+
export { _default_5 as listFiles }
|
|
378
|
+
export { _default_5 as listFiles_alias_1 }
|
|
277
379
|
|
|
278
|
-
declare const
|
|
380
|
+
declare const _default_6: {
|
|
279
381
|
handler: ToolHandler<{
|
|
280
382
|
readonly name: "listMemoryTopics";
|
|
281
|
-
readonly description: "Lists all topics in memory.";
|
|
383
|
+
readonly description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
|
|
282
384
|
readonly parameters: z.ZodObject<{}, z.core.$strip>;
|
|
283
385
|
}, MemoryProvider>;
|
|
284
386
|
name: "listMemoryTopics";
|
|
285
|
-
description: "Lists all topics in memory.";
|
|
387
|
+
description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
|
|
286
388
|
parameters: z.ZodObject<{}, z.core.$strip>;
|
|
287
389
|
};
|
|
288
|
-
export {
|
|
289
|
-
export {
|
|
290
|
-
export {
|
|
390
|
+
export { _default_6 as default_alias_5 }
|
|
391
|
+
export { _default_6 as listMemoryTopics }
|
|
392
|
+
export { _default_6 as listMemoryTopics_alias_1 }
|
|
291
393
|
|
|
292
|
-
declare const
|
|
394
|
+
declare const _default_7: {
|
|
395
|
+
handler: ToolHandler<{
|
|
396
|
+
readonly name: "listTodoItems";
|
|
397
|
+
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.";
|
|
398
|
+
readonly parameters: z.ZodObject<{
|
|
399
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
400
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
401
|
+
open: "open";
|
|
402
|
+
completed: "completed";
|
|
403
|
+
closed: "closed";
|
|
404
|
+
}>>>;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
}, TodoProvider>;
|
|
407
|
+
name: "listTodoItems";
|
|
408
|
+
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.";
|
|
409
|
+
parameters: z.ZodObject<{
|
|
410
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
411
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
412
|
+
open: "open";
|
|
413
|
+
completed: "completed";
|
|
414
|
+
closed: "closed";
|
|
415
|
+
}>>>;
|
|
416
|
+
}, z.core.$strip>;
|
|
417
|
+
};
|
|
418
|
+
export { _default_7 as default_alias_6 }
|
|
419
|
+
export { _default_7 as listTodoItems }
|
|
420
|
+
export { _default_7 as listTodoItems_alias_1 }
|
|
421
|
+
|
|
422
|
+
declare const _default_8: {
|
|
293
423
|
handler: ToolHandler<{
|
|
294
424
|
readonly name: "readBinaryFile";
|
|
295
425
|
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.";
|
|
@@ -303,11 +433,11 @@ declare const _default_6: {
|
|
|
303
433
|
url: z.ZodString;
|
|
304
434
|
}, z.core.$strip>;
|
|
305
435
|
};
|
|
306
|
-
export {
|
|
307
|
-
export {
|
|
308
|
-
export {
|
|
436
|
+
export { _default_8 as default_alias_7 }
|
|
437
|
+
export { _default_8 as readBinaryFile }
|
|
438
|
+
export { _default_8 as readBinaryFile_alias_1 }
|
|
309
439
|
|
|
310
|
-
declare const
|
|
440
|
+
declare const _default_9: {
|
|
311
441
|
handler: ToolHandler<{
|
|
312
442
|
readonly name: "readFile";
|
|
313
443
|
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.";
|
|
@@ -323,45 +453,9 @@ declare const _default_7: {
|
|
|
323
453
|
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
324
454
|
}, z.core.$strip>;
|
|
325
455
|
};
|
|
326
|
-
export { _default_7 as default_alias_6 }
|
|
327
|
-
export { _default_7 as readFile }
|
|
328
|
-
export { _default_7 as readFile_alias_1 }
|
|
329
|
-
|
|
330
|
-
declare const _default_8: {
|
|
331
|
-
handler: ToolHandler<{
|
|
332
|
-
readonly name: "readMemory";
|
|
333
|
-
readonly description: "Reads content from a memory topic.";
|
|
334
|
-
readonly parameters: z.ZodObject<{
|
|
335
|
-
topic: z.ZodOptional<z.ZodString>;
|
|
336
|
-
}, z.core.$strip>;
|
|
337
|
-
}, MemoryProvider>;
|
|
338
|
-
name: "readMemory";
|
|
339
|
-
description: "Reads content from a memory topic.";
|
|
340
|
-
parameters: z.ZodObject<{
|
|
341
|
-
topic: z.ZodOptional<z.ZodString>;
|
|
342
|
-
}, z.core.$strip>;
|
|
343
|
-
};
|
|
344
|
-
export { _default_8 as default_alias_7 }
|
|
345
|
-
export { _default_8 as readMemory }
|
|
346
|
-
export { _default_8 as readMemory_alias_1 }
|
|
347
|
-
|
|
348
|
-
declare const _default_9: {
|
|
349
|
-
handler: ToolHandler<{
|
|
350
|
-
readonly name: "removeFile";
|
|
351
|
-
readonly description: "Request to remove a file at the specified path.";
|
|
352
|
-
readonly parameters: z.ZodObject<{
|
|
353
|
-
path: z.ZodString;
|
|
354
|
-
}, z.core.$strip>;
|
|
355
|
-
}, FilesystemProvider>;
|
|
356
|
-
name: "removeFile";
|
|
357
|
-
description: "Request to remove a file at the specified path.";
|
|
358
|
-
parameters: z.ZodObject<{
|
|
359
|
-
path: z.ZodString;
|
|
360
|
-
}, z.core.$strip>;
|
|
361
|
-
};
|
|
362
456
|
export { _default_9 as default_alias_8 }
|
|
363
|
-
export { _default_9 as
|
|
364
|
-
export { _default_9 as
|
|
457
|
+
export { _default_9 as readFile }
|
|
458
|
+
export { _default_9 as readFile_alias_1 }
|
|
365
459
|
|
|
366
460
|
/**
|
|
367
461
|
* Returns the directory portion of a path string.
|
|
@@ -391,6 +485,16 @@ declare type FullToolInfo = ToolInfo & {
|
|
|
391
485
|
export { FullToolInfo }
|
|
392
486
|
export { FullToolInfo as FullToolInfo_alias_1 }
|
|
393
487
|
|
|
488
|
+
declare type GetTodoItemOutput = TodoItem & {
|
|
489
|
+
subItems: {
|
|
490
|
+
id: string;
|
|
491
|
+
title: string;
|
|
492
|
+
}[];
|
|
493
|
+
};
|
|
494
|
+
export { GetTodoItemOutput }
|
|
495
|
+
export { GetTodoItemOutput as GetTodoItemOutput_alias_1 }
|
|
496
|
+
export { GetTodoItemOutput as GetTodoItemOutput_alias_2 }
|
|
497
|
+
|
|
394
498
|
export declare const handler: ToolHandler<typeof toolInfo, InteractionProvider>;
|
|
395
499
|
|
|
396
500
|
export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, CommandProvider>;
|
|
@@ -399,25 +503,31 @@ export declare const handler_alias_10: ToolHandler<typeof toolInfo_alias_10, Fil
|
|
|
399
503
|
|
|
400
504
|
export declare const handler_alias_11: ToolHandler<typeof toolInfo_alias_11, FilesystemProvider>;
|
|
401
505
|
|
|
402
|
-
export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12,
|
|
506
|
+
export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12, FilesystemProvider>;
|
|
403
507
|
|
|
404
508
|
export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, FilesystemProvider>;
|
|
405
509
|
|
|
510
|
+
export declare const handler_alias_14: ToolHandler<typeof toolInfo_alias_14, MemoryProvider>;
|
|
511
|
+
|
|
512
|
+
export declare const handler_alias_15: ToolHandler<typeof toolInfo_alias_15, TodoProvider>;
|
|
513
|
+
|
|
514
|
+
export declare const handler_alias_16: ToolHandler<typeof toolInfo_alias_16, FilesystemProvider>;
|
|
515
|
+
|
|
406
516
|
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, WebProvider>;
|
|
407
517
|
|
|
408
|
-
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3,
|
|
518
|
+
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, TodoProvider>;
|
|
409
519
|
|
|
410
|
-
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4,
|
|
520
|
+
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, FilesystemProvider>;
|
|
411
521
|
|
|
412
|
-
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5,
|
|
522
|
+
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, MemoryProvider>;
|
|
413
523
|
|
|
414
|
-
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6,
|
|
524
|
+
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, TodoProvider>;
|
|
415
525
|
|
|
416
|
-
export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7,
|
|
526
|
+
export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7, FilesystemProvider>;
|
|
417
527
|
|
|
418
528
|
export declare const handler_alias_8: ToolHandler<typeof toolInfo_alias_8, FilesystemProvider>;
|
|
419
529
|
|
|
420
|
-
export declare const handler_alias_9: ToolHandler<typeof toolInfo_alias_9,
|
|
530
|
+
export declare const handler_alias_9: ToolHandler<typeof toolInfo_alias_9, MemoryProvider>;
|
|
421
531
|
|
|
422
532
|
declare type InteractionProvider = {
|
|
423
533
|
askFollowupQuestion?: (question: string, options: string[]) => Promise<string>;
|
|
@@ -431,6 +541,11 @@ export { InteractionProvider as InteractionProvider_alias_2 }
|
|
|
431
541
|
*/
|
|
432
542
|
export declare function join(...parts: string[]): string;
|
|
433
543
|
|
|
544
|
+
declare type ListTodoItemsOutput = TodoItem[];
|
|
545
|
+
export { ListTodoItemsOutput }
|
|
546
|
+
export { ListTodoItemsOutput as ListTodoItemsOutput_alias_1 }
|
|
547
|
+
export { ListTodoItemsOutput as ListTodoItemsOutput_alias_2 }
|
|
548
|
+
|
|
434
549
|
declare interface MemoryProvider {
|
|
435
550
|
listMemoryTopics: () => Promise<string[]>;
|
|
436
551
|
readMemory: (topic?: string) => Promise<string | undefined>;
|
|
@@ -441,6 +556,16 @@ export { MemoryProvider as MemoryProvider_alias_1 }
|
|
|
441
556
|
export { MemoryProvider as MemoryProvider_alias_2 }
|
|
442
557
|
|
|
443
558
|
declare class MockProvider implements ToolProvider {
|
|
559
|
+
listTodoItems(id?: string | null, _status?: string | null): Promise<{
|
|
560
|
+
id: string;
|
|
561
|
+
title: string;
|
|
562
|
+
status: "open";
|
|
563
|
+
description: string;
|
|
564
|
+
}[]>;
|
|
565
|
+
getTodoItem(id: string): Promise<GetTodoItemOutput | undefined>;
|
|
566
|
+
updateTodoItem(input: UpdateTodoItemInput): Promise<{
|
|
567
|
+
id: string;
|
|
568
|
+
}>;
|
|
444
569
|
readFile(_path: string, _includeIgnored?: boolean): Promise<string>;
|
|
445
570
|
writeFile(_path: string, _content: string): Promise<void>;
|
|
446
571
|
removeFile(_path: string): Promise<void>;
|
|
@@ -512,6 +637,43 @@ export { responsePrompts }
|
|
|
512
637
|
export { responsePrompts as responsePrompts_alias_1 }
|
|
513
638
|
export { responsePrompts as responsePrompts_alias_2 }
|
|
514
639
|
|
|
640
|
+
declare type TodoItem = z.infer<typeof TodoItemSchema>;
|
|
641
|
+
export { TodoItem }
|
|
642
|
+
export { TodoItem as TodoItem_alias_1 }
|
|
643
|
+
export { TodoItem as TodoItem_alias_2 }
|
|
644
|
+
|
|
645
|
+
declare const TodoItemSchema: z.ZodObject<{
|
|
646
|
+
id: z.ZodString;
|
|
647
|
+
title: z.ZodString;
|
|
648
|
+
description: z.ZodString;
|
|
649
|
+
status: z.ZodEnum<{
|
|
650
|
+
open: "open";
|
|
651
|
+
completed: "completed";
|
|
652
|
+
closed: "closed";
|
|
653
|
+
}>;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
export { TodoItemSchema }
|
|
656
|
+
export { TodoItemSchema as TodoItemSchema_alias_1 }
|
|
657
|
+
export { TodoItemSchema as TodoItemSchema_alias_2 }
|
|
658
|
+
|
|
659
|
+
declare type TodoProvider = {
|
|
660
|
+
listTodoItems: (id?: string | null, status?: string | null) => Promise<ListTodoItemsOutput>;
|
|
661
|
+
getTodoItem: (id: string) => Promise<GetTodoItemOutput | undefined>;
|
|
662
|
+
updateTodoItem: (input: UpdateTodoItemInput) => Promise<UpdateTodoItemOutput>;
|
|
663
|
+
};
|
|
664
|
+
export { TodoProvider }
|
|
665
|
+
export { TodoProvider as TodoProvider_alias_1 }
|
|
666
|
+
export { TodoProvider as TodoProvider_alias_2 }
|
|
667
|
+
|
|
668
|
+
declare const TodoStatus: z.ZodEnum<{
|
|
669
|
+
open: "open";
|
|
670
|
+
completed: "completed";
|
|
671
|
+
closed: "closed";
|
|
672
|
+
}>;
|
|
673
|
+
export { TodoStatus }
|
|
674
|
+
export { TodoStatus as TodoStatus_alias_1 }
|
|
675
|
+
export { TodoStatus as TodoStatus_alias_2 }
|
|
676
|
+
|
|
515
677
|
declare type ToolHandler<_T, P> = (provider: P, args: Partial<Record<string, ToolParameterValue>>) => Promise<ToolResponse>;
|
|
516
678
|
export { ToolHandler }
|
|
517
679
|
export { ToolHandler as ToolHandler_alias_1 }
|
|
@@ -545,6 +707,23 @@ export declare const toolInfo_alias_1: {
|
|
|
545
707
|
};
|
|
546
708
|
|
|
547
709
|
export declare const toolInfo_alias_10: {
|
|
710
|
+
readonly name: "removeFile";
|
|
711
|
+
readonly description: "Request to remove a file at the specified path.";
|
|
712
|
+
readonly parameters: z.ZodObject<{
|
|
713
|
+
path: z.ZodString;
|
|
714
|
+
}, z.core.$strip>;
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
export declare const toolInfo_alias_11: {
|
|
718
|
+
readonly name: "renameFile";
|
|
719
|
+
readonly description: "Request to rename a file from source path to target path.";
|
|
720
|
+
readonly parameters: z.ZodObject<{
|
|
721
|
+
source_path: z.ZodString;
|
|
722
|
+
target_path: z.ZodString;
|
|
723
|
+
}, z.core.$strip>;
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
export declare const toolInfo_alias_12: {
|
|
548
727
|
readonly name: "replaceInFile";
|
|
549
728
|
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.";
|
|
550
729
|
readonly parameters: z.ZodObject<{
|
|
@@ -553,7 +732,7 @@ export declare const toolInfo_alias_10: {
|
|
|
553
732
|
}, z.core.$strip>;
|
|
554
733
|
};
|
|
555
734
|
|
|
556
|
-
export declare const
|
|
735
|
+
export declare const toolInfo_alias_13: {
|
|
557
736
|
readonly name: "searchFiles";
|
|
558
737
|
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.";
|
|
559
738
|
readonly parameters: z.ZodObject<{
|
|
@@ -563,9 +742,9 @@ export declare const toolInfo_alias_11: {
|
|
|
563
742
|
}, z.core.$strip>;
|
|
564
743
|
};
|
|
565
744
|
|
|
566
|
-
export declare const
|
|
745
|
+
export declare const toolInfo_alias_14: {
|
|
567
746
|
readonly name: "updateMemory";
|
|
568
|
-
readonly description: "Appends, replaces, or removes content from a memory topic.";
|
|
747
|
+
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.";
|
|
569
748
|
readonly parameters: z.ZodObject<{
|
|
570
749
|
operation: z.ZodEnum<{
|
|
571
750
|
append: "append";
|
|
@@ -577,7 +756,27 @@ export declare const toolInfo_alias_12: {
|
|
|
577
756
|
}, z.core.$strip>;
|
|
578
757
|
};
|
|
579
758
|
|
|
580
|
-
export declare const
|
|
759
|
+
export declare const toolInfo_alias_15: {
|
|
760
|
+
readonly name: "updateTodoItem";
|
|
761
|
+
readonly description: "Add or update a to-do item.";
|
|
762
|
+
readonly parameters: ZodObject< {
|
|
763
|
+
operation: ZodEnum< {
|
|
764
|
+
add: "add";
|
|
765
|
+
update: "update";
|
|
766
|
+
}>;
|
|
767
|
+
id: ZodOptional<ZodNullable<ZodString>>;
|
|
768
|
+
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
769
|
+
title: ZodOptional<ZodNullable<ZodString>>;
|
|
770
|
+
description: ZodOptional<ZodNullable<ZodString>>;
|
|
771
|
+
status: ZodOptional<ZodNullable<ZodEnum< {
|
|
772
|
+
open: "open";
|
|
773
|
+
completed: "completed";
|
|
774
|
+
closed: "closed";
|
|
775
|
+
}>>>;
|
|
776
|
+
}, $strip>;
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
export declare const toolInfo_alias_16: {
|
|
581
780
|
readonly name: "writeToFile";
|
|
582
781
|
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.";
|
|
583
782
|
readonly parameters: z.ZodObject<{
|
|
@@ -595,6 +794,14 @@ export declare const toolInfo_alias_2: {
|
|
|
595
794
|
};
|
|
596
795
|
|
|
597
796
|
export declare const toolInfo_alias_3: {
|
|
797
|
+
readonly name: "getTodoItem";
|
|
798
|
+
readonly description: "Get a to-do item by its ID.";
|
|
799
|
+
readonly parameters: z.ZodObject<{
|
|
800
|
+
id: z.ZodString;
|
|
801
|
+
}, z.core.$strip>;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
export declare const toolInfo_alias_4: {
|
|
598
805
|
readonly name: "listFiles";
|
|
599
806
|
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.";
|
|
600
807
|
readonly parameters: z.ZodObject<{
|
|
@@ -605,13 +812,26 @@ export declare const toolInfo_alias_3: {
|
|
|
605
812
|
}, z.core.$strip>;
|
|
606
813
|
};
|
|
607
814
|
|
|
608
|
-
export declare const
|
|
815
|
+
export declare const toolInfo_alias_5: {
|
|
609
816
|
readonly name: "listMemoryTopics";
|
|
610
|
-
readonly description: "Lists all topics in memory.";
|
|
817
|
+
readonly description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
|
|
611
818
|
readonly parameters: z.ZodObject<{}, z.core.$strip>;
|
|
612
819
|
};
|
|
613
820
|
|
|
614
|
-
export declare const
|
|
821
|
+
export declare const toolInfo_alias_6: {
|
|
822
|
+
readonly name: "listTodoItems";
|
|
823
|
+
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.";
|
|
824
|
+
readonly parameters: z.ZodObject<{
|
|
825
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
826
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
827
|
+
open: "open";
|
|
828
|
+
completed: "completed";
|
|
829
|
+
closed: "closed";
|
|
830
|
+
}>>>;
|
|
831
|
+
}, z.core.$strip>;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
export declare const toolInfo_alias_7: {
|
|
615
835
|
readonly name: "readBinaryFile";
|
|
616
836
|
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.";
|
|
617
837
|
readonly parameters: z.ZodObject<{
|
|
@@ -619,7 +839,7 @@ export declare const toolInfo_alias_5: {
|
|
|
619
839
|
}, z.core.$strip>;
|
|
620
840
|
};
|
|
621
841
|
|
|
622
|
-
export declare const
|
|
842
|
+
export declare const toolInfo_alias_8: {
|
|
623
843
|
readonly name: "readFile";
|
|
624
844
|
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.";
|
|
625
845
|
readonly parameters: z.ZodObject<{
|
|
@@ -628,31 +848,14 @@ export declare const toolInfo_alias_6: {
|
|
|
628
848
|
}, z.core.$strip>;
|
|
629
849
|
};
|
|
630
850
|
|
|
631
|
-
export declare const
|
|
851
|
+
export declare const toolInfo_alias_9: {
|
|
632
852
|
readonly name: "readMemory";
|
|
633
|
-
readonly description: "Reads content from a memory topic.";
|
|
853
|
+
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.";
|
|
634
854
|
readonly parameters: z.ZodObject<{
|
|
635
855
|
topic: z.ZodOptional<z.ZodString>;
|
|
636
856
|
}, z.core.$strip>;
|
|
637
857
|
};
|
|
638
858
|
|
|
639
|
-
export declare const toolInfo_alias_8: {
|
|
640
|
-
readonly name: "removeFile";
|
|
641
|
-
readonly description: "Request to remove a file at the specified path.";
|
|
642
|
-
readonly parameters: z.ZodObject<{
|
|
643
|
-
path: z.ZodString;
|
|
644
|
-
}, z.core.$strip>;
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
export declare const toolInfo_alias_9: {
|
|
648
|
-
readonly name: "renameFile";
|
|
649
|
-
readonly description: "Request to rename a file from source path to target path.";
|
|
650
|
-
readonly parameters: z.ZodObject<{
|
|
651
|
-
source_path: z.ZodString;
|
|
652
|
-
target_path: z.ZodString;
|
|
653
|
-
}, z.core.$strip>;
|
|
654
|
-
};
|
|
655
|
-
|
|
656
859
|
declare type ToolParameter = {
|
|
657
860
|
name: string;
|
|
658
861
|
description: string;
|
|
@@ -670,7 +873,7 @@ declare type ToolParameterValue = string | {
|
|
|
670
873
|
export { ToolParameterValue }
|
|
671
874
|
export { ToolParameterValue as ToolParameterValue_alias_1 }
|
|
672
875
|
|
|
673
|
-
declare type ToolProvider = FilesystemProvider & CommandProvider & InteractionProvider & WebProvider & Partial<MemoryProvider>;
|
|
876
|
+
declare type ToolProvider = FilesystemProvider & CommandProvider & InteractionProvider & WebProvider & Partial<MemoryProvider> & Partial<TodoProvider>;
|
|
674
877
|
export { ToolProvider }
|
|
675
878
|
export { ToolProvider as ToolProvider_alias_1 }
|
|
676
879
|
export { ToolProvider as ToolProvider_alias_2 }
|
|
@@ -748,6 +951,42 @@ declare type Totals = {
|
|
|
748
951
|
messageCount: number;
|
|
749
952
|
};
|
|
750
953
|
|
|
954
|
+
declare type UpdateTodoItemInput = z.infer<typeof UpdateTodoItemInputSchema>;
|
|
955
|
+
export { UpdateTodoItemInput }
|
|
956
|
+
export { UpdateTodoItemInput as UpdateTodoItemInput_alias_1 }
|
|
957
|
+
export { UpdateTodoItemInput as UpdateTodoItemInput_alias_2 }
|
|
958
|
+
|
|
959
|
+
declare const UpdateTodoItemInputSchema: z.ZodObject<{
|
|
960
|
+
operation: z.ZodEnum<{
|
|
961
|
+
add: "add";
|
|
962
|
+
update: "update";
|
|
963
|
+
}>;
|
|
964
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
965
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
968
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
969
|
+
open: "open";
|
|
970
|
+
completed: "completed";
|
|
971
|
+
closed: "closed";
|
|
972
|
+
}>>>;
|
|
973
|
+
}, z.core.$strip>;
|
|
974
|
+
export { UpdateTodoItemInputSchema }
|
|
975
|
+
export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_1 }
|
|
976
|
+
export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_2 }
|
|
977
|
+
|
|
978
|
+
declare type UpdateTodoItemOutput = z.infer<typeof UpdateTodoItemOutputSchema>;
|
|
979
|
+
export { UpdateTodoItemOutput }
|
|
980
|
+
export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_1 }
|
|
981
|
+
export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_2 }
|
|
982
|
+
|
|
983
|
+
declare const UpdateTodoItemOutputSchema: z.ZodObject<{
|
|
984
|
+
id: z.ZodString;
|
|
985
|
+
}, z.core.$strip>;
|
|
986
|
+
export { UpdateTodoItemOutputSchema }
|
|
987
|
+
export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_1 }
|
|
988
|
+
export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_2 }
|
|
989
|
+
|
|
751
990
|
/**
|
|
752
991
|
* Tracks token / cost usage across any mix of LLM models.
|
|
753
992
|
* Supports optional caps on total messages and total cost.
|