@polka-codes/core 0.9.47 → 0.9.49

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.
@@ -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,12 @@ 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 { ZodArray } from 'zod';
11
+ import { ZodEnum } from 'zod';
12
+ import { ZodNullable } from 'zod';
13
+ import { ZodObject } from 'zod';
14
+ import { ZodOptional } from 'zod';
15
+ import { ZodString } from 'zod';
9
16
 
10
17
  declare type CommandProvider = {
11
18
  executeCommand?: (command: string, needApprove: boolean) => Promise<{
@@ -79,59 +86,63 @@ export { configSchema as configSchema_alias_1 }
79
86
 
80
87
  declare const _default: {
81
88
  handler: ToolHandler<{
82
- readonly name: "appendMemory";
83
- readonly description: "Appends content to a memory topic.";
89
+ readonly name: "askFollowupQuestion";
90
+ 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.";
84
91
  readonly parameters: z.ZodObject<{
85
- topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
- content: z.ZodString;
92
+ questions: z.ZodArray<z.ZodObject<{
93
+ prompt: z.ZodString;
94
+ options: z.ZodDefault<z.ZodArray<z.ZodString>>;
95
+ }, z.core.$strip>>;
87
96
  }, z.core.$strip>;
88
- }, MemoryProvider>;
89
- name: "appendMemory";
90
- description: "Appends content to a memory topic.";
97
+ }, InteractionProvider>;
98
+ name: "askFollowupQuestion";
99
+ 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.";
91
100
  parameters: z.ZodObject<{
92
- topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
- content: z.ZodString;
101
+ questions: z.ZodArray<z.ZodObject<{
102
+ prompt: z.ZodString;
103
+ options: z.ZodDefault<z.ZodArray<z.ZodString>>;
104
+ }, z.core.$strip>>;
94
105
  }, z.core.$strip>;
95
106
  };
96
- export { _default as appendMemory }
97
- export { _default as appendMemory_alias_1 }
107
+ export { _default as askFollowupQuestion }
108
+ export { _default as askFollowupQuestion_alias_1 }
98
109
  export { _default as default_alias }
99
110
 
100
111
  declare const _default_10: {
101
112
  handler: ToolHandler<{
102
- readonly name: "removeFile";
103
- readonly description: "Request to remove a file at the specified path.";
113
+ readonly name: "readMemory";
114
+ 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.";
104
115
  readonly parameters: z.ZodObject<{
105
- path: z.ZodString;
116
+ topic: z.ZodOptional<z.ZodString>;
106
117
  }, z.core.$strip>;
107
- }, FilesystemProvider>;
108
- name: "removeFile";
109
- description: "Request to remove a file at the specified path.";
118
+ }, MemoryProvider>;
119
+ name: "readMemory";
120
+ 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.";
110
121
  parameters: z.ZodObject<{
111
- path: z.ZodString;
122
+ topic: z.ZodOptional<z.ZodString>;
112
123
  }, z.core.$strip>;
113
124
  };
114
125
  export { _default_10 as default_alias_9 }
115
- export { _default_10 as removeFile }
116
- export { _default_10 as removeFile_alias_1 }
126
+ export { _default_10 as readMemory }
127
+ export { _default_10 as readMemory_alias_1 }
117
128
 
118
129
  declare const _default_11: {
119
130
  handler: ToolHandler<{
120
- readonly name: "removeMemory";
121
- readonly description: "Removes a topic from memory.";
131
+ readonly name: "removeFile";
132
+ readonly description: "Request to remove a file at the specified path.";
122
133
  readonly parameters: z.ZodObject<{
123
- topic: z.ZodOptional<z.ZodString>;
134
+ path: z.ZodString;
124
135
  }, z.core.$strip>;
125
- }, MemoryProvider>;
126
- name: "removeMemory";
127
- description: "Removes a topic from memory.";
136
+ }, FilesystemProvider>;
137
+ name: "removeFile";
138
+ description: "Request to remove a file at the specified path.";
128
139
  parameters: z.ZodObject<{
129
- topic: z.ZodOptional<z.ZodString>;
140
+ path: z.ZodString;
130
141
  }, z.core.$strip>;
131
142
  };
132
143
  export { _default_11 as default_alias_10 }
133
- export { _default_11 as removeMemory }
134
- export { _default_11 as removeMemory_alias_1 }
144
+ export { _default_11 as removeFile }
145
+ export { _default_11 as removeFile_alias_1 }
135
146
 
136
147
  declare const _default_12: {
137
148
  handler: ToolHandler<{
@@ -174,26 +185,6 @@ export { _default_13 as replaceInFile }
174
185
  export { _default_13 as replaceInFile_alias_1 }
175
186
 
176
187
  declare const _default_14: {
177
- handler: ToolHandler<{
178
- readonly name: "replaceMemory";
179
- readonly description: "Replaces content of a memory topic.";
180
- readonly parameters: z.ZodObject<{
181
- topic: z.ZodOptional<z.ZodString>;
182
- content: z.ZodString;
183
- }, z.core.$strip>;
184
- }, MemoryProvider>;
185
- name: "replaceMemory";
186
- description: "Replaces content of a memory topic.";
187
- parameters: z.ZodObject<{
188
- topic: z.ZodOptional<z.ZodString>;
189
- content: z.ZodString;
190
- }, z.core.$strip>;
191
- };
192
- export { _default_14 as default_alias_13 }
193
- export { _default_14 as replaceMemory }
194
- export { _default_14 as replaceMemory_alias_1 }
195
-
196
- declare const _default_15: {
197
188
  handler: ToolHandler<{
198
189
  readonly name: "searchFiles";
199
190
  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.";
@@ -211,11 +202,85 @@ declare const _default_15: {
211
202
  filePattern: z.ZodOptional<z.ZodString>;
212
203
  }, z.core.$strip>;
213
204
  };
205
+ export { _default_14 as default_alias_13 }
206
+ export { _default_14 as searchFiles }
207
+ export { _default_14 as searchFiles_alias_1 }
208
+
209
+ declare const _default_15: {
210
+ handler: ToolHandler<{
211
+ readonly name: "updateMemory";
212
+ 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.";
213
+ readonly parameters: z.ZodObject<{
214
+ operation: z.ZodEnum<{
215
+ append: "append";
216
+ replace: "replace";
217
+ remove: "remove";
218
+ }>;
219
+ topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ content: z.ZodOptional<z.ZodString>;
221
+ }, z.core.$strip>;
222
+ }, MemoryProvider>;
223
+ name: "updateMemory";
224
+ 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.";
225
+ parameters: z.ZodObject<{
226
+ operation: z.ZodEnum<{
227
+ append: "append";
228
+ replace: "replace";
229
+ remove: "remove";
230
+ }>;
231
+ topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ content: z.ZodOptional<z.ZodString>;
233
+ }, z.core.$strip>;
234
+ };
214
235
  export { _default_15 as default_alias_14 }
215
- export { _default_15 as searchFiles }
216
- export { _default_15 as searchFiles_alias_1 }
236
+ export { _default_15 as updateMemory }
237
+ export { _default_15 as updateMemory_alias_1 }
217
238
 
218
239
  declare const _default_16: {
240
+ handler: ToolHandler<{
241
+ readonly name: "updateTodoItem";
242
+ readonly description: "Add or update a to-do item.";
243
+ readonly parameters: ZodObject< {
244
+ operation: ZodEnum< {
245
+ add: "add";
246
+ update: "update";
247
+ }>;
248
+ id: ZodOptional<ZodNullable<ZodString>>;
249
+ parentId: ZodOptional<ZodNullable<ZodString>>;
250
+ title: ZodOptional<ZodNullable<ZodString>>;
251
+ description: ZodOptional<ZodNullable<ZodString>>;
252
+ relevantFileList: ZodOptional<ZodNullable<ZodArray<ZodString>>>;
253
+ status: ZodOptional<ZodNullable<ZodEnum< {
254
+ open: "open";
255
+ completed: "completed";
256
+ closed: "closed";
257
+ }>>>;
258
+ }, $strip>;
259
+ }, TodoProvider>;
260
+ name: "updateTodoItem";
261
+ description: "Add or update a to-do item.";
262
+ parameters: ZodObject< {
263
+ operation: ZodEnum< {
264
+ add: "add";
265
+ update: "update";
266
+ }>;
267
+ id: ZodOptional<ZodNullable<ZodString>>;
268
+ parentId: ZodOptional<ZodNullable<ZodString>>;
269
+ title: ZodOptional<ZodNullable<ZodString>>;
270
+ description: ZodOptional<ZodNullable<ZodString>>;
271
+ relevantFileList: ZodOptional<ZodNullable<ZodArray<ZodString>>>;
272
+ status: ZodOptional<ZodNullable<ZodEnum< {
273
+ open: "open";
274
+ completed: "completed";
275
+ closed: "closed";
276
+ }>>>;
277
+ }, $strip>;
278
+ };
279
+ export { _default_16 as default_alias_15 }
280
+ export { _default_16 as updateTodoItem }
281
+ export { _default_16 as updateTodoItem_alias_1 }
282
+
283
+ declare const _default_17: {
219
284
  handler: ToolHandler<{
220
285
  readonly name: "writeToFile";
221
286
  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 `&lt;`, `&gt;`, or `&amp;`. Also ensure there is no unwanted CDATA tags in the content.";
@@ -231,35 +296,11 @@ declare const _default_16: {
231
296
  content: z.ZodString;
232
297
  }, z.core.$strip>;
233
298
  };
234
- export { _default_16 as default_alias_15 }
235
- export { _default_16 as writeToFile }
236
- export { _default_16 as writeToFile_alias_1 }
299
+ export { _default_17 as default_alias_16 }
300
+ export { _default_17 as writeToFile }
301
+ export { _default_17 as writeToFile_alias_1 }
237
302
 
238
303
  declare const _default_2: {
239
- handler: ToolHandler<{
240
- readonly name: "askFollowupQuestion";
241
- 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.";
242
- readonly parameters: z.ZodObject<{
243
- questions: z.ZodArray<z.ZodObject<{
244
- prompt: z.ZodString;
245
- options: z.ZodDefault<z.ZodArray<z.ZodString>>;
246
- }, z.core.$strip>>;
247
- }, z.core.$strip>;
248
- }, InteractionProvider>;
249
- name: "askFollowupQuestion";
250
- 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.";
251
- parameters: z.ZodObject<{
252
- questions: z.ZodArray<z.ZodObject<{
253
- prompt: z.ZodString;
254
- options: z.ZodDefault<z.ZodArray<z.ZodString>>;
255
- }, z.core.$strip>>;
256
- }, z.core.$strip>;
257
- };
258
- export { _default_2 as askFollowupQuestion }
259
- export { _default_2 as askFollowupQuestion_alias_1 }
260
- export { _default_2 as default_alias_1 }
261
-
262
- declare const _default_3: {
263
304
  handler: ToolHandler<{
264
305
  readonly name: "executeCommand";
265
306
  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.";
@@ -275,11 +316,11 @@ declare const _default_3: {
275
316
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
276
317
  }, z.core.$strip>;
277
318
  };
278
- export { _default_3 as default_alias_2 }
279
- export { _default_3 as executeCommand }
280
- export { _default_3 as executeCommand_alias_1 }
319
+ export { _default_2 as default_alias_1 }
320
+ export { _default_2 as executeCommand }
321
+ export { _default_2 as executeCommand_alias_1 }
281
322
 
282
- declare const _default_4: {
323
+ declare const _default_3: {
283
324
  handler: ToolHandler<{
284
325
  readonly name: "fetchUrl";
285
326
  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.";
@@ -293,9 +334,27 @@ declare const _default_4: {
293
334
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
294
335
  }, z.core.$strip>;
295
336
  };
337
+ export { _default_3 as default_alias_2 }
338
+ export { _default_3 as fetchUrl }
339
+ export { _default_3 as fetchUrl_alias_1 }
340
+
341
+ declare const _default_4: {
342
+ handler: ToolHandler<{
343
+ readonly name: "getTodoItem";
344
+ readonly description: "Get a to-do item by its ID.";
345
+ readonly parameters: z.ZodObject<{
346
+ id: z.ZodString;
347
+ }, z.core.$strip>;
348
+ }, TodoProvider>;
349
+ name: "getTodoItem";
350
+ description: "Get a to-do item by its ID.";
351
+ parameters: z.ZodObject<{
352
+ id: z.ZodString;
353
+ }, z.core.$strip>;
354
+ };
296
355
  export { _default_4 as default_alias_3 }
297
- export { _default_4 as fetchUrl }
298
- export { _default_4 as fetchUrl_alias_1 }
356
+ export { _default_4 as getTodoItem }
357
+ export { _default_4 as getTodoItem_alias_1 }
299
358
 
300
359
  declare const _default_5: {
301
360
  handler: ToolHandler<{
@@ -324,11 +383,11 @@ export { _default_5 as listFiles_alias_1 }
324
383
  declare const _default_6: {
325
384
  handler: ToolHandler<{
326
385
  readonly name: "listMemoryTopics";
327
- readonly description: "Lists all topics in memory.";
386
+ readonly description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
328
387
  readonly parameters: z.ZodObject<{}, z.core.$strip>;
329
388
  }, MemoryProvider>;
330
389
  name: "listMemoryTopics";
331
- description: "Lists all topics in memory.";
390
+ description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
332
391
  parameters: z.ZodObject<{}, z.core.$strip>;
333
392
  };
334
393
  export { _default_6 as default_alias_5 }
@@ -336,6 +395,34 @@ export { _default_6 as listMemoryTopics }
336
395
  export { _default_6 as listMemoryTopics_alias_1 }
337
396
 
338
397
  declare const _default_7: {
398
+ handler: ToolHandler<{
399
+ readonly name: "listTodoItems";
400
+ 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.";
401
+ readonly parameters: z.ZodObject<{
402
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
403
+ status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
404
+ open: "open";
405
+ completed: "completed";
406
+ closed: "closed";
407
+ }>>>;
408
+ }, z.core.$strip>;
409
+ }, TodoProvider>;
410
+ name: "listTodoItems";
411
+ 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.";
412
+ parameters: z.ZodObject<{
413
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
414
+ status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
415
+ open: "open";
416
+ completed: "completed";
417
+ closed: "closed";
418
+ }>>>;
419
+ }, z.core.$strip>;
420
+ };
421
+ export { _default_7 as default_alias_6 }
422
+ export { _default_7 as listTodoItems }
423
+ export { _default_7 as listTodoItems_alias_1 }
424
+
425
+ declare const _default_8: {
339
426
  handler: ToolHandler<{
340
427
  readonly name: "readBinaryFile";
341
428
  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.";
@@ -349,11 +436,11 @@ declare const _default_7: {
349
436
  url: z.ZodString;
350
437
  }, z.core.$strip>;
351
438
  };
352
- export { _default_7 as default_alias_6 }
353
- export { _default_7 as readBinaryFile }
354
- export { _default_7 as readBinaryFile_alias_1 }
439
+ export { _default_8 as default_alias_7 }
440
+ export { _default_8 as readBinaryFile }
441
+ export { _default_8 as readBinaryFile_alias_1 }
355
442
 
356
- declare const _default_8: {
443
+ declare const _default_9: {
357
444
  handler: ToolHandler<{
358
445
  readonly name: "readFile";
359
446
  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.";
@@ -369,27 +456,9 @@ declare const _default_8: {
369
456
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
370
457
  }, z.core.$strip>;
371
458
  };
372
- export { _default_8 as default_alias_7 }
373
- export { _default_8 as readFile }
374
- export { _default_8 as readFile_alias_1 }
375
-
376
- declare const _default_9: {
377
- handler: ToolHandler<{
378
- readonly name: "readMemory";
379
- readonly description: "Reads content from a memory topic.";
380
- readonly parameters: z.ZodObject<{
381
- topic: z.ZodOptional<z.ZodString>;
382
- }, z.core.$strip>;
383
- }, MemoryProvider>;
384
- name: "readMemory";
385
- description: "Reads content from a memory topic.";
386
- parameters: z.ZodObject<{
387
- topic: z.ZodOptional<z.ZodString>;
388
- }, z.core.$strip>;
389
- };
390
459
  export { _default_9 as default_alias_8 }
391
- export { _default_9 as readMemory }
392
- export { _default_9 as readMemory_alias_1 }
460
+ export { _default_9 as readFile }
461
+ export { _default_9 as readFile_alias_1 }
393
462
 
394
463
  /**
395
464
  * Returns the directory portion of a path string.
@@ -419,37 +488,49 @@ declare type FullToolInfo = ToolInfo & {
419
488
  export { FullToolInfo }
420
489
  export { FullToolInfo as FullToolInfo_alias_1 }
421
490
 
422
- export declare const handler: ToolHandler<typeof toolInfo, MemoryProvider>;
491
+ declare type GetTodoItemOutput = TodoItem & {
492
+ subItems: {
493
+ id: string;
494
+ title: string;
495
+ }[];
496
+ };
497
+ export { GetTodoItemOutput }
498
+ export { GetTodoItemOutput as GetTodoItemOutput_alias_1 }
499
+ export { GetTodoItemOutput as GetTodoItemOutput_alias_2 }
500
+
501
+ export declare const handler: ToolHandler<typeof toolInfo, InteractionProvider>;
423
502
 
424
- export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, InteractionProvider>;
503
+ export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, CommandProvider>;
425
504
 
426
- export declare const handler_alias_10: ToolHandler<typeof toolInfo_alias_10, MemoryProvider>;
505
+ export declare const handler_alias_10: ToolHandler<typeof toolInfo_alias_10, FilesystemProvider>;
427
506
 
428
507
  export declare const handler_alias_11: ToolHandler<typeof toolInfo_alias_11, FilesystemProvider>;
429
508
 
430
509
  export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12, FilesystemProvider>;
431
510
 
432
- export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, MemoryProvider>;
511
+ export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, FilesystemProvider>;
512
+
513
+ export declare const handler_alias_14: ToolHandler<typeof toolInfo_alias_14, MemoryProvider>;
433
514
 
434
- export declare const handler_alias_14: ToolHandler<typeof toolInfo_alias_14, FilesystemProvider>;
515
+ export declare const handler_alias_15: ToolHandler<typeof toolInfo_alias_15, TodoProvider>;
435
516
 
436
- export declare const handler_alias_15: ToolHandler<typeof toolInfo_alias_15, FilesystemProvider>;
517
+ export declare const handler_alias_16: ToolHandler<typeof toolInfo_alias_16, FilesystemProvider>;
437
518
 
438
- export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, CommandProvider>;
519
+ export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, WebProvider>;
439
520
 
440
- export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, WebProvider>;
521
+ export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, TodoProvider>;
441
522
 
442
523
  export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, FilesystemProvider>;
443
524
 
444
525
  export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, MemoryProvider>;
445
526
 
446
- export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, FilesystemProvider>;
527
+ export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, TodoProvider>;
447
528
 
448
529
  export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7, FilesystemProvider>;
449
530
 
450
- export declare const handler_alias_8: ToolHandler<typeof toolInfo_alias_8, MemoryProvider>;
531
+ export declare const handler_alias_8: ToolHandler<typeof toolInfo_alias_8, FilesystemProvider>;
451
532
 
452
- export declare const handler_alias_9: ToolHandler<typeof toolInfo_alias_9, FilesystemProvider>;
533
+ export declare const handler_alias_9: ToolHandler<typeof toolInfo_alias_9, MemoryProvider>;
453
534
 
454
535
  declare type InteractionProvider = {
455
536
  askFollowupQuestion?: (question: string, options: string[]) => Promise<string>;
@@ -463,18 +544,32 @@ export { InteractionProvider as InteractionProvider_alias_2 }
463
544
  */
464
545
  export declare function join(...parts: string[]): string;
465
546
 
547
+ declare type ListTodoItemsOutput = TodoItem[];
548
+ export { ListTodoItemsOutput }
549
+ export { ListTodoItemsOutput as ListTodoItemsOutput_alias_1 }
550
+ export { ListTodoItemsOutput as ListTodoItemsOutput_alias_2 }
551
+
466
552
  declare interface MemoryProvider {
467
553
  listMemoryTopics: () => Promise<string[]>;
468
554
  readMemory: (topic?: string) => Promise<string | undefined>;
469
- appendMemory: (topic: string | undefined, content: string) => Promise<void>;
470
- replaceMemory: (topic: string | undefined, content: string) => Promise<void>;
471
- removeMemory: (topic: string | undefined) => Promise<void>;
555
+ updateMemory: (operation: 'append' | 'replace' | 'remove', topic: string | undefined, content: string | undefined) => Promise<void>;
472
556
  }
473
557
  export { MemoryProvider }
474
558
  export { MemoryProvider as MemoryProvider_alias_1 }
475
559
  export { MemoryProvider as MemoryProvider_alias_2 }
476
560
 
477
561
  declare class MockProvider implements ToolProvider {
562
+ listTodoItems(id?: string | null, _status?: string | null): Promise<{
563
+ id: string;
564
+ title: string;
565
+ status: "open";
566
+ description: string;
567
+ relevantFileList: never[];
568
+ }[]>;
569
+ getTodoItem(id: string): Promise<GetTodoItemOutput | undefined>;
570
+ updateTodoItem(input: UpdateTodoItemInput): Promise<{
571
+ id: string;
572
+ }>;
478
573
  readFile(_path: string, _includeIgnored?: boolean): Promise<string>;
479
574
  writeFile(_path: string, _content: string): Promise<void>;
480
575
  removeFile(_path: string): Promise<void>;
@@ -488,6 +583,9 @@ declare class MockProvider implements ToolProvider {
488
583
  summary?: string;
489
584
  }>;
490
585
  askFollowupQuestion(_question: string, _options?: string[]): Promise<string>;
586
+ listMemoryTopics(): Promise<string[]>;
587
+ readMemory(_topic?: string): Promise<string | undefined>;
588
+ updateMemory(_operation: 'append' | 'replace' | 'remove', _topic?: string, _content?: string): Promise<void>;
491
589
  }
492
590
  export { MockProvider }
493
591
  export { MockProvider as MockProvider_alias_1 }
@@ -543,6 +641,44 @@ export { responsePrompts }
543
641
  export { responsePrompts as responsePrompts_alias_1 }
544
642
  export { responsePrompts as responsePrompts_alias_2 }
545
643
 
644
+ declare type TodoItem = z.infer<typeof TodoItemSchema>;
645
+ export { TodoItem }
646
+ export { TodoItem as TodoItem_alias_1 }
647
+ export { TodoItem as TodoItem_alias_2 }
648
+
649
+ declare const TodoItemSchema: z.ZodObject<{
650
+ id: z.ZodString;
651
+ title: z.ZodString;
652
+ description: z.ZodString;
653
+ relevantFileList: z.ZodArray<z.ZodString>;
654
+ status: z.ZodEnum<{
655
+ open: "open";
656
+ completed: "completed";
657
+ closed: "closed";
658
+ }>;
659
+ }, z.core.$strip>;
660
+ export { TodoItemSchema }
661
+ export { TodoItemSchema as TodoItemSchema_alias_1 }
662
+ export { TodoItemSchema as TodoItemSchema_alias_2 }
663
+
664
+ declare type TodoProvider = {
665
+ listTodoItems: (id?: string | null, status?: string | null) => Promise<ListTodoItemsOutput>;
666
+ getTodoItem: (id: string) => Promise<GetTodoItemOutput | undefined>;
667
+ updateTodoItem: (input: UpdateTodoItemInput) => Promise<UpdateTodoItemOutput>;
668
+ };
669
+ export { TodoProvider }
670
+ export { TodoProvider as TodoProvider_alias_1 }
671
+ export { TodoProvider as TodoProvider_alias_2 }
672
+
673
+ declare const TodoStatus: z.ZodEnum<{
674
+ open: "open";
675
+ completed: "completed";
676
+ closed: "closed";
677
+ }>;
678
+ export { TodoStatus }
679
+ export { TodoStatus as TodoStatus_alias_1 }
680
+ export { TodoStatus as TodoStatus_alias_2 }
681
+
546
682
  declare type ToolHandler<_T, P> = (provider: P, args: Partial<Record<string, ToolParameterValue>>) => Promise<ToolResponse>;
547
683
  export { ToolHandler }
548
684
  export { ToolHandler as ToolHandler_alias_1 }
@@ -556,15 +692,6 @@ export { ToolInfo }
556
692
  export { ToolInfo as ToolInfo_alias_1 }
557
693
 
558
694
  export declare const toolInfo: {
559
- readonly name: "appendMemory";
560
- readonly description: "Appends content to a memory topic.";
561
- readonly parameters: z.ZodObject<{
562
- topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
563
- content: z.ZodString;
564
- }, z.core.$strip>;
565
- };
566
-
567
- export declare const toolInfo_alias_1: {
568
695
  readonly name: "askFollowupQuestion";
569
696
  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.";
570
697
  readonly parameters: z.ZodObject<{
@@ -575,11 +702,20 @@ export declare const toolInfo_alias_1: {
575
702
  }, z.core.$strip>;
576
703
  };
577
704
 
705
+ export declare const toolInfo_alias_1: {
706
+ readonly name: "executeCommand";
707
+ 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.";
708
+ readonly parameters: z.ZodObject<{
709
+ command: z.ZodString;
710
+ requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
711
+ }, z.core.$strip>;
712
+ };
713
+
578
714
  export declare const toolInfo_alias_10: {
579
- readonly name: "removeMemory";
580
- readonly description: "Removes a topic from memory.";
715
+ readonly name: "removeFile";
716
+ readonly description: "Request to remove a file at the specified path.";
581
717
  readonly parameters: z.ZodObject<{
582
- topic: z.ZodOptional<z.ZodString>;
718
+ path: z.ZodString;
583
719
  }, z.core.$strip>;
584
720
  };
585
721
 
@@ -602,15 +738,6 @@ export declare const toolInfo_alias_12: {
602
738
  };
603
739
 
604
740
  export declare const toolInfo_alias_13: {
605
- readonly name: "replaceMemory";
606
- readonly description: "Replaces content of a memory topic.";
607
- readonly parameters: z.ZodObject<{
608
- topic: z.ZodOptional<z.ZodString>;
609
- content: z.ZodString;
610
- }, z.core.$strip>;
611
- };
612
-
613
- export declare const toolInfo_alias_14: {
614
741
  readonly name: "searchFiles";
615
742
  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.";
616
743
  readonly parameters: z.ZodObject<{
@@ -620,7 +747,42 @@ export declare const toolInfo_alias_14: {
620
747
  }, z.core.$strip>;
621
748
  };
622
749
 
750
+ export declare const toolInfo_alias_14: {
751
+ readonly name: "updateMemory";
752
+ 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.";
753
+ readonly parameters: z.ZodObject<{
754
+ operation: z.ZodEnum<{
755
+ append: "append";
756
+ replace: "replace";
757
+ remove: "remove";
758
+ }>;
759
+ topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
760
+ content: z.ZodOptional<z.ZodString>;
761
+ }, z.core.$strip>;
762
+ };
763
+
623
764
  export declare const toolInfo_alias_15: {
765
+ readonly name: "updateTodoItem";
766
+ readonly description: "Add or update a to-do item.";
767
+ readonly parameters: ZodObject< {
768
+ operation: ZodEnum< {
769
+ add: "add";
770
+ update: "update";
771
+ }>;
772
+ id: ZodOptional<ZodNullable<ZodString>>;
773
+ parentId: ZodOptional<ZodNullable<ZodString>>;
774
+ title: ZodOptional<ZodNullable<ZodString>>;
775
+ description: ZodOptional<ZodNullable<ZodString>>;
776
+ relevantFileList: ZodOptional<ZodNullable<ZodArray<ZodString>>>;
777
+ status: ZodOptional<ZodNullable<ZodEnum< {
778
+ open: "open";
779
+ completed: "completed";
780
+ closed: "closed";
781
+ }>>>;
782
+ }, $strip>;
783
+ };
784
+
785
+ export declare const toolInfo_alias_16: {
624
786
  readonly name: "writeToFile";
625
787
  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 `&lt;`, `&gt;`, or `&amp;`. Also ensure there is no unwanted CDATA tags in the content.";
626
788
  readonly parameters: z.ZodObject<{
@@ -630,19 +792,18 @@ export declare const toolInfo_alias_15: {
630
792
  };
631
793
 
632
794
  export declare const toolInfo_alias_2: {
633
- readonly name: "executeCommand";
634
- 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.";
795
+ readonly name: "fetchUrl";
796
+ 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.";
635
797
  readonly parameters: z.ZodObject<{
636
- command: z.ZodString;
637
- requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
798
+ url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
638
799
  }, z.core.$strip>;
639
800
  };
640
801
 
641
802
  export declare const toolInfo_alias_3: {
642
- readonly name: "fetchUrl";
643
- 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.";
803
+ readonly name: "getTodoItem";
804
+ readonly description: "Get a to-do item by its ID.";
644
805
  readonly parameters: z.ZodObject<{
645
- url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
806
+ id: z.ZodString;
646
807
  }, z.core.$strip>;
647
808
  };
648
809
 
@@ -659,11 +820,24 @@ export declare const toolInfo_alias_4: {
659
820
 
660
821
  export declare const toolInfo_alias_5: {
661
822
  readonly name: "listMemoryTopics";
662
- readonly description: "Lists all topics in memory.";
823
+ readonly description: "Lists all topics in memory. Use this to see what information has been stored and which topics are available to read from.";
663
824
  readonly parameters: z.ZodObject<{}, z.core.$strip>;
664
825
  };
665
826
 
666
827
  export declare const toolInfo_alias_6: {
828
+ readonly name: "listTodoItems";
829
+ 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.";
830
+ readonly parameters: z.ZodObject<{
831
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
832
+ status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
833
+ open: "open";
834
+ completed: "completed";
835
+ closed: "closed";
836
+ }>>>;
837
+ }, z.core.$strip>;
838
+ };
839
+
840
+ export declare const toolInfo_alias_7: {
667
841
  readonly name: "readBinaryFile";
668
842
  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.";
669
843
  readonly parameters: z.ZodObject<{
@@ -671,7 +845,7 @@ export declare const toolInfo_alias_6: {
671
845
  }, z.core.$strip>;
672
846
  };
673
847
 
674
- export declare const toolInfo_alias_7: {
848
+ export declare const toolInfo_alias_8: {
675
849
  readonly name: "readFile";
676
850
  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.";
677
851
  readonly parameters: z.ZodObject<{
@@ -680,22 +854,14 @@ export declare const toolInfo_alias_7: {
680
854
  }, z.core.$strip>;
681
855
  };
682
856
 
683
- export declare const toolInfo_alias_8: {
857
+ export declare const toolInfo_alias_9: {
684
858
  readonly name: "readMemory";
685
- readonly description: "Reads content from a memory topic.";
859
+ 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.";
686
860
  readonly parameters: z.ZodObject<{
687
861
  topic: z.ZodOptional<z.ZodString>;
688
862
  }, z.core.$strip>;
689
863
  };
690
864
 
691
- export declare const toolInfo_alias_9: {
692
- readonly name: "removeFile";
693
- readonly description: "Request to remove a file at the specified path.";
694
- readonly parameters: z.ZodObject<{
695
- path: z.ZodString;
696
- }, z.core.$strip>;
697
- };
698
-
699
865
  declare type ToolParameter = {
700
866
  name: string;
701
867
  description: string;
@@ -713,7 +879,7 @@ declare type ToolParameterValue = string | {
713
879
  export { ToolParameterValue }
714
880
  export { ToolParameterValue as ToolParameterValue_alias_1 }
715
881
 
716
- declare type ToolProvider = FilesystemProvider & CommandProvider & InteractionProvider & WebProvider & Partial<MemoryProvider>;
882
+ declare type ToolProvider = FilesystemProvider & CommandProvider & InteractionProvider & WebProvider & Partial<MemoryProvider> & Partial<TodoProvider>;
717
883
  export { ToolProvider }
718
884
  export { ToolProvider as ToolProvider_alias_1 }
719
885
  export { ToolProvider as ToolProvider_alias_2 }
@@ -791,6 +957,43 @@ declare type Totals = {
791
957
  messageCount: number;
792
958
  };
793
959
 
960
+ declare type UpdateTodoItemInput = z.infer<typeof UpdateTodoItemInputSchema>;
961
+ export { UpdateTodoItemInput }
962
+ export { UpdateTodoItemInput as UpdateTodoItemInput_alias_1 }
963
+ export { UpdateTodoItemInput as UpdateTodoItemInput_alias_2 }
964
+
965
+ declare const UpdateTodoItemInputSchema: z.ZodObject<{
966
+ operation: z.ZodEnum<{
967
+ add: "add";
968
+ update: "update";
969
+ }>;
970
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
971
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
972
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
973
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
974
+ relevantFileList: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
975
+ status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
976
+ open: "open";
977
+ completed: "completed";
978
+ closed: "closed";
979
+ }>>>;
980
+ }, z.core.$strip>;
981
+ export { UpdateTodoItemInputSchema }
982
+ export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_1 }
983
+ export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_2 }
984
+
985
+ declare type UpdateTodoItemOutput = z.infer<typeof UpdateTodoItemOutputSchema>;
986
+ export { UpdateTodoItemOutput }
987
+ export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_1 }
988
+ export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_2 }
989
+
990
+ declare const UpdateTodoItemOutputSchema: z.ZodObject<{
991
+ id: z.ZodString;
992
+ }, z.core.$strip>;
993
+ export { UpdateTodoItemOutputSchema }
994
+ export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_1 }
995
+ export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_2 }
996
+
794
997
  /**
795
998
  * Tracks token / cost usage across any mix of LLM models.
796
999
  * Supports optional caps on total messages and total cost.