@polka-codes/core 0.9.47 → 0.9.48
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 +156 -199
- package/dist/index.d.ts +1 -3
- package/dist/index.js +204 -201
- package/package.json +1 -1
|
@@ -79,61 +79,29 @@ export { configSchema as configSchema_alias_1 }
|
|
|
79
79
|
|
|
80
80
|
declare const _default: {
|
|
81
81
|
handler: ToolHandler<{
|
|
82
|
-
readonly name: "
|
|
83
|
-
readonly description: "
|
|
82
|
+
readonly name: "askFollowupQuestion";
|
|
83
|
+
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
84
|
readonly parameters: z.ZodObject<{
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
86
|
+
prompt: z.ZodString;
|
|
87
|
+
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
87
89
|
}, z.core.$strip>;
|
|
88
|
-
},
|
|
89
|
-
name: "
|
|
90
|
-
description: "
|
|
90
|
+
}, InteractionProvider>;
|
|
91
|
+
name: "askFollowupQuestion";
|
|
92
|
+
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
93
|
parameters: z.ZodObject<{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
95
|
+
prompt: z.ZodString;
|
|
96
|
+
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
94
98
|
}, z.core.$strip>;
|
|
95
99
|
};
|
|
96
|
-
export { _default as
|
|
97
|
-
export { _default as
|
|
100
|
+
export { _default as askFollowupQuestion }
|
|
101
|
+
export { _default as askFollowupQuestion_alias_1 }
|
|
98
102
|
export { _default as default_alias }
|
|
99
103
|
|
|
100
104
|
declare const _default_10: {
|
|
101
|
-
handler: ToolHandler<{
|
|
102
|
-
readonly name: "removeFile";
|
|
103
|
-
readonly description: "Request to remove a file at the specified path.";
|
|
104
|
-
readonly parameters: z.ZodObject<{
|
|
105
|
-
path: z.ZodString;
|
|
106
|
-
}, z.core.$strip>;
|
|
107
|
-
}, FilesystemProvider>;
|
|
108
|
-
name: "removeFile";
|
|
109
|
-
description: "Request to remove a file at the specified path.";
|
|
110
|
-
parameters: z.ZodObject<{
|
|
111
|
-
path: z.ZodString;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
};
|
|
114
|
-
export { _default_10 as default_alias_9 }
|
|
115
|
-
export { _default_10 as removeFile }
|
|
116
|
-
export { _default_10 as removeFile_alias_1 }
|
|
117
|
-
|
|
118
|
-
declare const _default_11: {
|
|
119
|
-
handler: ToolHandler<{
|
|
120
|
-
readonly name: "removeMemory";
|
|
121
|
-
readonly description: "Removes a topic from memory.";
|
|
122
|
-
readonly parameters: z.ZodObject<{
|
|
123
|
-
topic: z.ZodOptional<z.ZodString>;
|
|
124
|
-
}, z.core.$strip>;
|
|
125
|
-
}, MemoryProvider>;
|
|
126
|
-
name: "removeMemory";
|
|
127
|
-
description: "Removes a topic from memory.";
|
|
128
|
-
parameters: z.ZodObject<{
|
|
129
|
-
topic: z.ZodOptional<z.ZodString>;
|
|
130
|
-
}, z.core.$strip>;
|
|
131
|
-
};
|
|
132
|
-
export { _default_11 as default_alias_10 }
|
|
133
|
-
export { _default_11 as removeMemory }
|
|
134
|
-
export { _default_11 as removeMemory_alias_1 }
|
|
135
|
-
|
|
136
|
-
declare const _default_12: {
|
|
137
105
|
handler: ToolHandler<{
|
|
138
106
|
readonly name: "renameFile";
|
|
139
107
|
readonly description: "Request to rename a file from source path to target path.";
|
|
@@ -149,11 +117,11 @@ declare const _default_12: {
|
|
|
149
117
|
target_path: z.ZodString;
|
|
150
118
|
}, z.core.$strip>;
|
|
151
119
|
};
|
|
152
|
-
export {
|
|
153
|
-
export {
|
|
154
|
-
export {
|
|
120
|
+
export { _default_10 as default_alias_9 }
|
|
121
|
+
export { _default_10 as renameFile }
|
|
122
|
+
export { _default_10 as renameFile_alias_1 }
|
|
155
123
|
|
|
156
|
-
declare const
|
|
124
|
+
declare const _default_11: {
|
|
157
125
|
handler: ToolHandler<{
|
|
158
126
|
readonly name: "replaceInFile";
|
|
159
127
|
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.";
|
|
@@ -169,31 +137,11 @@ declare const _default_13: {
|
|
|
169
137
|
diff: z.ZodString;
|
|
170
138
|
}, z.core.$strip>;
|
|
171
139
|
};
|
|
172
|
-
export {
|
|
173
|
-
export {
|
|
174
|
-
export {
|
|
175
|
-
|
|
176
|
-
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 }
|
|
140
|
+
export { _default_11 as default_alias_10 }
|
|
141
|
+
export { _default_11 as replaceInFile }
|
|
142
|
+
export { _default_11 as replaceInFile_alias_1 }
|
|
195
143
|
|
|
196
|
-
declare const
|
|
144
|
+
declare const _default_12: {
|
|
197
145
|
handler: ToolHandler<{
|
|
198
146
|
readonly name: "searchFiles";
|
|
199
147
|
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 +159,41 @@ declare const _default_15: {
|
|
|
211
159
|
filePattern: z.ZodOptional<z.ZodString>;
|
|
212
160
|
}, z.core.$strip>;
|
|
213
161
|
};
|
|
214
|
-
export {
|
|
215
|
-
export {
|
|
216
|
-
export {
|
|
162
|
+
export { _default_12 as default_alias_11 }
|
|
163
|
+
export { _default_12 as searchFiles }
|
|
164
|
+
export { _default_12 as searchFiles_alias_1 }
|
|
217
165
|
|
|
218
|
-
declare const
|
|
166
|
+
declare const _default_13: {
|
|
167
|
+
handler: ToolHandler<{
|
|
168
|
+
readonly name: "updateMemory";
|
|
169
|
+
readonly description: "Appends, replaces, or removes content from a memory topic.";
|
|
170
|
+
readonly parameters: z.ZodObject<{
|
|
171
|
+
operation: z.ZodEnum<{
|
|
172
|
+
append: "append";
|
|
173
|
+
replace: "replace";
|
|
174
|
+
remove: "remove";
|
|
175
|
+
}>;
|
|
176
|
+
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
content: z.ZodOptional<z.ZodString>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
}, MemoryProvider>;
|
|
180
|
+
name: "updateMemory";
|
|
181
|
+
description: "Appends, replaces, or removes content from a memory topic.";
|
|
182
|
+
parameters: z.ZodObject<{
|
|
183
|
+
operation: z.ZodEnum<{
|
|
184
|
+
append: "append";
|
|
185
|
+
replace: "replace";
|
|
186
|
+
remove: "remove";
|
|
187
|
+
}>;
|
|
188
|
+
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
content: z.ZodOptional<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
};
|
|
192
|
+
export { _default_13 as default_alias_12 }
|
|
193
|
+
export { _default_13 as updateMemory }
|
|
194
|
+
export { _default_13 as updateMemory_alias_1 }
|
|
195
|
+
|
|
196
|
+
declare const _default_14: {
|
|
219
197
|
handler: ToolHandler<{
|
|
220
198
|
readonly name: "writeToFile";
|
|
221
199
|
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.";
|
|
@@ -231,35 +209,11 @@ declare const _default_16: {
|
|
|
231
209
|
content: z.ZodString;
|
|
232
210
|
}, z.core.$strip>;
|
|
233
211
|
};
|
|
234
|
-
export {
|
|
235
|
-
export {
|
|
236
|
-
export {
|
|
212
|
+
export { _default_14 as default_alias_13 }
|
|
213
|
+
export { _default_14 as writeToFile }
|
|
214
|
+
export { _default_14 as writeToFile_alias_1 }
|
|
237
215
|
|
|
238
216
|
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
217
|
handler: ToolHandler<{
|
|
264
218
|
readonly name: "executeCommand";
|
|
265
219
|
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 +229,11 @@ declare const _default_3: {
|
|
|
275
229
|
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
276
230
|
}, z.core.$strip>;
|
|
277
231
|
};
|
|
278
|
-
export {
|
|
279
|
-
export {
|
|
280
|
-
export {
|
|
232
|
+
export { _default_2 as default_alias_1 }
|
|
233
|
+
export { _default_2 as executeCommand }
|
|
234
|
+
export { _default_2 as executeCommand_alias_1 }
|
|
281
235
|
|
|
282
|
-
declare const
|
|
236
|
+
declare const _default_3: {
|
|
283
237
|
handler: ToolHandler<{
|
|
284
238
|
readonly name: "fetchUrl";
|
|
285
239
|
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,11 +247,11 @@ declare const _default_4: {
|
|
|
293
247
|
url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
294
248
|
}, z.core.$strip>;
|
|
295
249
|
};
|
|
296
|
-
export {
|
|
297
|
-
export {
|
|
298
|
-
export {
|
|
250
|
+
export { _default_3 as default_alias_2 }
|
|
251
|
+
export { _default_3 as fetchUrl }
|
|
252
|
+
export { _default_3 as fetchUrl_alias_1 }
|
|
299
253
|
|
|
300
|
-
declare const
|
|
254
|
+
declare const _default_4: {
|
|
301
255
|
handler: ToolHandler<{
|
|
302
256
|
readonly name: "listFiles";
|
|
303
257
|
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.";
|
|
@@ -317,11 +271,11 @@ declare const _default_5: {
|
|
|
317
271
|
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
318
272
|
}, z.core.$strip>;
|
|
319
273
|
};
|
|
320
|
-
export {
|
|
321
|
-
export {
|
|
322
|
-
export {
|
|
274
|
+
export { _default_4 as default_alias_3 }
|
|
275
|
+
export { _default_4 as listFiles }
|
|
276
|
+
export { _default_4 as listFiles_alias_1 }
|
|
323
277
|
|
|
324
|
-
declare const
|
|
278
|
+
declare const _default_5: {
|
|
325
279
|
handler: ToolHandler<{
|
|
326
280
|
readonly name: "listMemoryTopics";
|
|
327
281
|
readonly description: "Lists all topics in memory.";
|
|
@@ -331,11 +285,11 @@ declare const _default_6: {
|
|
|
331
285
|
description: "Lists all topics in memory.";
|
|
332
286
|
parameters: z.ZodObject<{}, z.core.$strip>;
|
|
333
287
|
};
|
|
334
|
-
export {
|
|
335
|
-
export {
|
|
336
|
-
export {
|
|
288
|
+
export { _default_5 as default_alias_4 }
|
|
289
|
+
export { _default_5 as listMemoryTopics }
|
|
290
|
+
export { _default_5 as listMemoryTopics_alias_1 }
|
|
337
291
|
|
|
338
|
-
declare const
|
|
292
|
+
declare const _default_6: {
|
|
339
293
|
handler: ToolHandler<{
|
|
340
294
|
readonly name: "readBinaryFile";
|
|
341
295
|
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 +303,11 @@ declare const _default_7: {
|
|
|
349
303
|
url: z.ZodString;
|
|
350
304
|
}, z.core.$strip>;
|
|
351
305
|
};
|
|
352
|
-
export {
|
|
353
|
-
export {
|
|
354
|
-
export {
|
|
306
|
+
export { _default_6 as default_alias_5 }
|
|
307
|
+
export { _default_6 as readBinaryFile }
|
|
308
|
+
export { _default_6 as readBinaryFile_alias_1 }
|
|
355
309
|
|
|
356
|
-
declare const
|
|
310
|
+
declare const _default_7: {
|
|
357
311
|
handler: ToolHandler<{
|
|
358
312
|
readonly name: "readFile";
|
|
359
313
|
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,11 +323,11 @@ declare const _default_8: {
|
|
|
369
323
|
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
370
324
|
}, z.core.$strip>;
|
|
371
325
|
};
|
|
372
|
-
export {
|
|
373
|
-
export {
|
|
374
|
-
export {
|
|
326
|
+
export { _default_7 as default_alias_6 }
|
|
327
|
+
export { _default_7 as readFile }
|
|
328
|
+
export { _default_7 as readFile_alias_1 }
|
|
375
329
|
|
|
376
|
-
declare const
|
|
330
|
+
declare const _default_8: {
|
|
377
331
|
handler: ToolHandler<{
|
|
378
332
|
readonly name: "readMemory";
|
|
379
333
|
readonly description: "Reads content from a memory topic.";
|
|
@@ -387,9 +341,27 @@ declare const _default_9: {
|
|
|
387
341
|
topic: z.ZodOptional<z.ZodString>;
|
|
388
342
|
}, z.core.$strip>;
|
|
389
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
|
+
};
|
|
390
362
|
export { _default_9 as default_alias_8 }
|
|
391
|
-
export { _default_9 as
|
|
392
|
-
export { _default_9 as
|
|
363
|
+
export { _default_9 as removeFile }
|
|
364
|
+
export { _default_9 as removeFile_alias_1 }
|
|
393
365
|
|
|
394
366
|
/**
|
|
395
367
|
* Returns the directory portion of a path string.
|
|
@@ -419,35 +391,31 @@ declare type FullToolInfo = ToolInfo & {
|
|
|
419
391
|
export { FullToolInfo }
|
|
420
392
|
export { FullToolInfo as FullToolInfo_alias_1 }
|
|
421
393
|
|
|
422
|
-
export declare const handler: ToolHandler<typeof toolInfo,
|
|
394
|
+
export declare const handler: ToolHandler<typeof toolInfo, InteractionProvider>;
|
|
423
395
|
|
|
424
|
-
export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1,
|
|
396
|
+
export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, CommandProvider>;
|
|
425
397
|
|
|
426
|
-
export declare const handler_alias_10: ToolHandler<typeof toolInfo_alias_10,
|
|
398
|
+
export declare const handler_alias_10: ToolHandler<typeof toolInfo_alias_10, FilesystemProvider>;
|
|
427
399
|
|
|
428
400
|
export declare const handler_alias_11: ToolHandler<typeof toolInfo_alias_11, FilesystemProvider>;
|
|
429
401
|
|
|
430
|
-
export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12,
|
|
431
|
-
|
|
432
|
-
export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, MemoryProvider>;
|
|
433
|
-
|
|
434
|
-
export declare const handler_alias_14: ToolHandler<typeof toolInfo_alias_14, FilesystemProvider>;
|
|
402
|
+
export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12, MemoryProvider>;
|
|
435
403
|
|
|
436
|
-
export declare const
|
|
404
|
+
export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, FilesystemProvider>;
|
|
437
405
|
|
|
438
|
-
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2,
|
|
406
|
+
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, WebProvider>;
|
|
439
407
|
|
|
440
|
-
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3,
|
|
408
|
+
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, FilesystemProvider>;
|
|
441
409
|
|
|
442
|
-
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4,
|
|
410
|
+
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, MemoryProvider>;
|
|
443
411
|
|
|
444
|
-
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5,
|
|
412
|
+
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, FilesystemProvider>;
|
|
445
413
|
|
|
446
414
|
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, FilesystemProvider>;
|
|
447
415
|
|
|
448
|
-
export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7,
|
|
416
|
+
export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7, MemoryProvider>;
|
|
449
417
|
|
|
450
|
-
export declare const handler_alias_8: ToolHandler<typeof toolInfo_alias_8,
|
|
418
|
+
export declare const handler_alias_8: ToolHandler<typeof toolInfo_alias_8, FilesystemProvider>;
|
|
451
419
|
|
|
452
420
|
export declare const handler_alias_9: ToolHandler<typeof toolInfo_alias_9, FilesystemProvider>;
|
|
453
421
|
|
|
@@ -466,9 +434,7 @@ export declare function join(...parts: string[]): string;
|
|
|
466
434
|
declare interface MemoryProvider {
|
|
467
435
|
listMemoryTopics: () => Promise<string[]>;
|
|
468
436
|
readMemory: (topic?: string) => Promise<string | undefined>;
|
|
469
|
-
|
|
470
|
-
replaceMemory: (topic: string | undefined, content: string) => Promise<void>;
|
|
471
|
-
removeMemory: (topic: string | undefined) => Promise<void>;
|
|
437
|
+
updateMemory: (operation: 'append' | 'replace' | 'remove', topic: string | undefined, content: string | undefined) => Promise<void>;
|
|
472
438
|
}
|
|
473
439
|
export { MemoryProvider }
|
|
474
440
|
export { MemoryProvider as MemoryProvider_alias_1 }
|
|
@@ -488,6 +454,9 @@ declare class MockProvider implements ToolProvider {
|
|
|
488
454
|
summary?: string;
|
|
489
455
|
}>;
|
|
490
456
|
askFollowupQuestion(_question: string, _options?: string[]): Promise<string>;
|
|
457
|
+
listMemoryTopics(): Promise<string[]>;
|
|
458
|
+
readMemory(_topic?: string): Promise<string | undefined>;
|
|
459
|
+
updateMemory(_operation: 'append' | 'replace' | 'remove', _topic?: string, _content?: string): Promise<void>;
|
|
491
460
|
}
|
|
492
461
|
export { MockProvider }
|
|
493
462
|
export { MockProvider as MockProvider_alias_1 }
|
|
@@ -556,15 +525,6 @@ export { ToolInfo }
|
|
|
556
525
|
export { ToolInfo as ToolInfo_alias_1 }
|
|
557
526
|
|
|
558
527
|
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
528
|
readonly name: "askFollowupQuestion";
|
|
569
529
|
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
530
|
readonly parameters: z.ZodObject<{
|
|
@@ -575,24 +535,16 @@ export declare const toolInfo_alias_1: {
|
|
|
575
535
|
}, z.core.$strip>;
|
|
576
536
|
};
|
|
577
537
|
|
|
578
|
-
export declare const
|
|
579
|
-
readonly name: "
|
|
580
|
-
readonly description: "
|
|
581
|
-
readonly parameters: z.ZodObject<{
|
|
582
|
-
topic: z.ZodOptional<z.ZodString>;
|
|
583
|
-
}, z.core.$strip>;
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
export declare const toolInfo_alias_11: {
|
|
587
|
-
readonly name: "renameFile";
|
|
588
|
-
readonly description: "Request to rename a file from source path to target path.";
|
|
538
|
+
export declare const toolInfo_alias_1: {
|
|
539
|
+
readonly name: "executeCommand";
|
|
540
|
+
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.";
|
|
589
541
|
readonly parameters: z.ZodObject<{
|
|
590
|
-
|
|
591
|
-
|
|
542
|
+
command: z.ZodString;
|
|
543
|
+
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
592
544
|
}, z.core.$strip>;
|
|
593
545
|
};
|
|
594
546
|
|
|
595
|
-
export declare const
|
|
547
|
+
export declare const toolInfo_alias_10: {
|
|
596
548
|
readonly name: "replaceInFile";
|
|
597
549
|
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.";
|
|
598
550
|
readonly parameters: z.ZodObject<{
|
|
@@ -601,16 +553,7 @@ export declare const toolInfo_alias_12: {
|
|
|
601
553
|
}, z.core.$strip>;
|
|
602
554
|
};
|
|
603
555
|
|
|
604
|
-
export declare const
|
|
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: {
|
|
556
|
+
export declare const toolInfo_alias_11: {
|
|
614
557
|
readonly name: "searchFiles";
|
|
615
558
|
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
559
|
readonly parameters: z.ZodObject<{
|
|
@@ -620,7 +563,21 @@ export declare const toolInfo_alias_14: {
|
|
|
620
563
|
}, z.core.$strip>;
|
|
621
564
|
};
|
|
622
565
|
|
|
623
|
-
export declare const
|
|
566
|
+
export declare const toolInfo_alias_12: {
|
|
567
|
+
readonly name: "updateMemory";
|
|
568
|
+
readonly description: "Appends, replaces, or removes content from a memory topic.";
|
|
569
|
+
readonly parameters: z.ZodObject<{
|
|
570
|
+
operation: z.ZodEnum<{
|
|
571
|
+
append: "append";
|
|
572
|
+
replace: "replace";
|
|
573
|
+
remove: "remove";
|
|
574
|
+
}>;
|
|
575
|
+
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
576
|
+
content: z.ZodOptional<z.ZodString>;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export declare const toolInfo_alias_13: {
|
|
624
581
|
readonly name: "writeToFile";
|
|
625
582
|
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.";
|
|
626
583
|
readonly parameters: z.ZodObject<{
|
|
@@ -630,15 +587,6 @@ export declare const toolInfo_alias_15: {
|
|
|
630
587
|
};
|
|
631
588
|
|
|
632
589
|
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.";
|
|
635
|
-
readonly parameters: z.ZodObject<{
|
|
636
|
-
command: z.ZodString;
|
|
637
|
-
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
638
|
-
}, z.core.$strip>;
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
export declare const toolInfo_alias_3: {
|
|
642
590
|
readonly name: "fetchUrl";
|
|
643
591
|
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.";
|
|
644
592
|
readonly parameters: z.ZodObject<{
|
|
@@ -646,7 +594,7 @@ export declare const toolInfo_alias_3: {
|
|
|
646
594
|
}, z.core.$strip>;
|
|
647
595
|
};
|
|
648
596
|
|
|
649
|
-
export declare const
|
|
597
|
+
export declare const toolInfo_alias_3: {
|
|
650
598
|
readonly name: "listFiles";
|
|
651
599
|
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.";
|
|
652
600
|
readonly parameters: z.ZodObject<{
|
|
@@ -657,13 +605,13 @@ export declare const toolInfo_alias_4: {
|
|
|
657
605
|
}, z.core.$strip>;
|
|
658
606
|
};
|
|
659
607
|
|
|
660
|
-
export declare const
|
|
608
|
+
export declare const toolInfo_alias_4: {
|
|
661
609
|
readonly name: "listMemoryTopics";
|
|
662
610
|
readonly description: "Lists all topics in memory.";
|
|
663
611
|
readonly parameters: z.ZodObject<{}, z.core.$strip>;
|
|
664
612
|
};
|
|
665
613
|
|
|
666
|
-
export declare const
|
|
614
|
+
export declare const toolInfo_alias_5: {
|
|
667
615
|
readonly name: "readBinaryFile";
|
|
668
616
|
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
617
|
readonly parameters: z.ZodObject<{
|
|
@@ -671,7 +619,7 @@ export declare const toolInfo_alias_6: {
|
|
|
671
619
|
}, z.core.$strip>;
|
|
672
620
|
};
|
|
673
621
|
|
|
674
|
-
export declare const
|
|
622
|
+
export declare const toolInfo_alias_6: {
|
|
675
623
|
readonly name: "readFile";
|
|
676
624
|
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
625
|
readonly parameters: z.ZodObject<{
|
|
@@ -680,7 +628,7 @@ export declare const toolInfo_alias_7: {
|
|
|
680
628
|
}, z.core.$strip>;
|
|
681
629
|
};
|
|
682
630
|
|
|
683
|
-
export declare const
|
|
631
|
+
export declare const toolInfo_alias_7: {
|
|
684
632
|
readonly name: "readMemory";
|
|
685
633
|
readonly description: "Reads content from a memory topic.";
|
|
686
634
|
readonly parameters: z.ZodObject<{
|
|
@@ -688,7 +636,7 @@ export declare const toolInfo_alias_8: {
|
|
|
688
636
|
}, z.core.$strip>;
|
|
689
637
|
};
|
|
690
638
|
|
|
691
|
-
export declare const
|
|
639
|
+
export declare const toolInfo_alias_8: {
|
|
692
640
|
readonly name: "removeFile";
|
|
693
641
|
readonly description: "Request to remove a file at the specified path.";
|
|
694
642
|
readonly parameters: z.ZodObject<{
|
|
@@ -696,6 +644,15 @@ export declare const toolInfo_alias_9: {
|
|
|
696
644
|
}, z.core.$strip>;
|
|
697
645
|
};
|
|
698
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
|
+
|
|
699
656
|
declare type ToolParameter = {
|
|
700
657
|
name: string;
|
|
701
658
|
description: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export { ToolResponseExit } from './_tsup-dts-rollup.js';
|
|
|
17
17
|
export { ToolResponseError } from './_tsup-dts-rollup.js';
|
|
18
18
|
export { ToolResponse } from './_tsup-dts-rollup.js';
|
|
19
19
|
export { ToolHandler } from './_tsup-dts-rollup.js';
|
|
20
|
-
export { appendMemory } from './_tsup-dts-rollup.js';
|
|
21
20
|
export { askFollowupQuestion } from './_tsup-dts-rollup.js';
|
|
22
21
|
export { executeCommand } from './_tsup-dts-rollup.js';
|
|
23
22
|
export { fetchUrl } from './_tsup-dts-rollup.js';
|
|
@@ -27,11 +26,10 @@ export { readBinaryFile } from './_tsup-dts-rollup.js';
|
|
|
27
26
|
export { readFile } from './_tsup-dts-rollup.js';
|
|
28
27
|
export { readMemory } from './_tsup-dts-rollup.js';
|
|
29
28
|
export { removeFile } from './_tsup-dts-rollup.js';
|
|
30
|
-
export { removeMemory } from './_tsup-dts-rollup.js';
|
|
31
29
|
export { renameFile } from './_tsup-dts-rollup.js';
|
|
32
30
|
export { replaceInFile } from './_tsup-dts-rollup.js';
|
|
33
|
-
export { replaceMemory } from './_tsup-dts-rollup.js';
|
|
34
31
|
export { searchFiles } from './_tsup-dts-rollup.js';
|
|
32
|
+
export { updateMemory } from './_tsup-dts-rollup.js';
|
|
35
33
|
export { writeToFile } from './_tsup-dts-rollup.js';
|
|
36
34
|
export { FilesystemProvider } from './_tsup-dts-rollup.js';
|
|
37
35
|
export { CommandProvider } from './_tsup-dts-rollup.js';
|