@perstack/base 0.0.19 → 0.0.21
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/src/index.d.ts +419 -0
- package/dist/src/index.js +895 -4
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/bin/server.js +0 -73
- package/dist/bin/server.js.map +0 -1
- package/dist/chunk-4N6IWATT.js +0 -899
- package/dist/chunk-4N6IWATT.js.map +0 -1
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
type ToolResult = Record<string, unknown>;
|
|
4
|
+
|
|
5
|
+
declare const inputSchema$b: z.ZodObject<{
|
|
6
|
+
path: z.ZodString;
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
text: string;
|
|
10
|
+
path: string;
|
|
11
|
+
}, {
|
|
12
|
+
text: string;
|
|
13
|
+
path: string;
|
|
14
|
+
}>;
|
|
15
|
+
type InputSchema$b = z.infer<typeof inputSchema$b>;
|
|
16
|
+
declare function appendTextFileConfig(): {
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
inputSchema: {
|
|
20
|
+
path: z.ZodString;
|
|
21
|
+
text: z.ZodString;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare function appendTextFile(input: InputSchema$b): Promise<ToolResult>;
|
|
25
|
+
|
|
26
|
+
declare function attemptCompletionConfig(): {
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
inputSchema: {};
|
|
30
|
+
};
|
|
31
|
+
declare function attemptCompletion(): Promise<ToolResult>;
|
|
32
|
+
|
|
33
|
+
declare const inputSchema$a: z.ZodObject<{
|
|
34
|
+
path: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
path: string;
|
|
37
|
+
}, {
|
|
38
|
+
path: string;
|
|
39
|
+
}>;
|
|
40
|
+
type InputSchema$a = z.infer<typeof inputSchema$a>;
|
|
41
|
+
declare function createDirectoryConfig(): {
|
|
42
|
+
title: string;
|
|
43
|
+
description: string;
|
|
44
|
+
inputSchema: {
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
declare function createDirectory(input: InputSchema$a): Promise<{
|
|
49
|
+
path: string;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
52
|
+
declare const inputSchema$9: z.ZodObject<{
|
|
53
|
+
path: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
path: string;
|
|
56
|
+
}, {
|
|
57
|
+
path: string;
|
|
58
|
+
}>;
|
|
59
|
+
type InputSchema$9 = z.infer<typeof inputSchema$9>;
|
|
60
|
+
declare function deleteFileConfig(): {
|
|
61
|
+
title: string;
|
|
62
|
+
description: string;
|
|
63
|
+
inputSchema: {
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
declare function deleteFile(input: InputSchema$9): Promise<{
|
|
68
|
+
path: string;
|
|
69
|
+
}>;
|
|
70
|
+
|
|
71
|
+
declare const inputSchema$8: z.ZodObject<{
|
|
72
|
+
path: z.ZodString;
|
|
73
|
+
newText: z.ZodString;
|
|
74
|
+
oldText: z.ZodString;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
path: string;
|
|
77
|
+
newText: string;
|
|
78
|
+
oldText: string;
|
|
79
|
+
}, {
|
|
80
|
+
path: string;
|
|
81
|
+
newText: string;
|
|
82
|
+
oldText: string;
|
|
83
|
+
}>;
|
|
84
|
+
type InputSchema$8 = z.infer<typeof inputSchema$8>;
|
|
85
|
+
declare function editTextFileConfig(): {
|
|
86
|
+
title: string;
|
|
87
|
+
description: string;
|
|
88
|
+
inputSchema: {
|
|
89
|
+
path: z.ZodString;
|
|
90
|
+
newText: z.ZodString;
|
|
91
|
+
oldText: z.ZodString;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
declare function editTextFile(input: InputSchema$8): Promise<{
|
|
95
|
+
path: string;
|
|
96
|
+
newText: string;
|
|
97
|
+
oldText: string;
|
|
98
|
+
}>;
|
|
99
|
+
|
|
100
|
+
declare const execInputSchema: z.ZodObject<{
|
|
101
|
+
command: z.ZodString;
|
|
102
|
+
args: z.ZodArray<z.ZodString, "many">;
|
|
103
|
+
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
104
|
+
cwd: z.ZodString;
|
|
105
|
+
stdout: z.ZodBoolean;
|
|
106
|
+
stderr: z.ZodBoolean;
|
|
107
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
command: string;
|
|
110
|
+
args: string[];
|
|
111
|
+
env: Record<string, string>;
|
|
112
|
+
cwd: string;
|
|
113
|
+
stdout: boolean;
|
|
114
|
+
stderr: boolean;
|
|
115
|
+
timeout?: number | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
command: string;
|
|
118
|
+
args: string[];
|
|
119
|
+
env: Record<string, string>;
|
|
120
|
+
cwd: string;
|
|
121
|
+
stdout: boolean;
|
|
122
|
+
stderr: boolean;
|
|
123
|
+
timeout?: number | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
type ExecInput = z.infer<typeof execInputSchema>;
|
|
126
|
+
declare function execConfig(): {
|
|
127
|
+
title: string;
|
|
128
|
+
description: string;
|
|
129
|
+
inputSchema: {
|
|
130
|
+
command: z.ZodString;
|
|
131
|
+
args: z.ZodArray<z.ZodString, "many">;
|
|
132
|
+
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
133
|
+
cwd: z.ZodString;
|
|
134
|
+
stdout: z.ZodBoolean;
|
|
135
|
+
stderr: z.ZodBoolean;
|
|
136
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
declare function exec(input: ExecInput): Promise<{
|
|
140
|
+
content: {
|
|
141
|
+
type: string;
|
|
142
|
+
text: string;
|
|
143
|
+
}[];
|
|
144
|
+
}>;
|
|
145
|
+
|
|
146
|
+
declare const inputSchema$7: z.ZodObject<{
|
|
147
|
+
path: z.ZodString;
|
|
148
|
+
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
path: string;
|
|
150
|
+
}, {
|
|
151
|
+
path: string;
|
|
152
|
+
}>;
|
|
153
|
+
type InputSchema$7 = z.infer<typeof inputSchema$7>;
|
|
154
|
+
declare function getFileInfoConfig(): {
|
|
155
|
+
title: string;
|
|
156
|
+
description: string;
|
|
157
|
+
inputSchema: {
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
declare function getFileInfo(input: InputSchema$7): Promise<{
|
|
162
|
+
exists: boolean;
|
|
163
|
+
path: string;
|
|
164
|
+
absolutePath: string;
|
|
165
|
+
name: string;
|
|
166
|
+
directory: string;
|
|
167
|
+
extension: string | null;
|
|
168
|
+
type: string;
|
|
169
|
+
mimeType: string | null;
|
|
170
|
+
size: number;
|
|
171
|
+
sizeFormatted: string;
|
|
172
|
+
created: string;
|
|
173
|
+
modified: string;
|
|
174
|
+
accessed: string;
|
|
175
|
+
permissions: {
|
|
176
|
+
readable: boolean;
|
|
177
|
+
writable: boolean;
|
|
178
|
+
executable: boolean;
|
|
179
|
+
};
|
|
180
|
+
}>;
|
|
181
|
+
|
|
182
|
+
declare const inputSchema$6: z.ZodObject<{
|
|
183
|
+
path: z.ZodString;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
path: string;
|
|
186
|
+
}, {
|
|
187
|
+
path: string;
|
|
188
|
+
}>;
|
|
189
|
+
type InputSchema$6 = z.infer<typeof inputSchema$6>;
|
|
190
|
+
interface DirectoryItem {
|
|
191
|
+
name: string;
|
|
192
|
+
path: string;
|
|
193
|
+
type: "directory" | "file";
|
|
194
|
+
size: number;
|
|
195
|
+
modified: string;
|
|
196
|
+
}
|
|
197
|
+
declare function listDirectoryConfig(): {
|
|
198
|
+
title: string;
|
|
199
|
+
description: string;
|
|
200
|
+
inputSchema: {
|
|
201
|
+
path: z.ZodString;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
declare function listDirectory(input: InputSchema$6): Promise<{
|
|
205
|
+
path: string;
|
|
206
|
+
items: DirectoryItem[];
|
|
207
|
+
}>;
|
|
208
|
+
|
|
209
|
+
declare const inputSchema$5: z.ZodObject<{
|
|
210
|
+
source: z.ZodString;
|
|
211
|
+
destination: z.ZodString;
|
|
212
|
+
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
source: string;
|
|
214
|
+
destination: string;
|
|
215
|
+
}, {
|
|
216
|
+
source: string;
|
|
217
|
+
destination: string;
|
|
218
|
+
}>;
|
|
219
|
+
type InputSchema$5 = z.infer<typeof inputSchema$5>;
|
|
220
|
+
declare function moveFileConfig(): {
|
|
221
|
+
title: string;
|
|
222
|
+
description: string;
|
|
223
|
+
inputSchema: {
|
|
224
|
+
source: z.ZodString;
|
|
225
|
+
destination: z.ZodString;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
declare function moveFile(input: InputSchema$5): Promise<{
|
|
229
|
+
source: string;
|
|
230
|
+
destination: string;
|
|
231
|
+
}>;
|
|
232
|
+
|
|
233
|
+
declare const inputSchema$4: z.ZodObject<{
|
|
234
|
+
path: z.ZodString;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
path: string;
|
|
237
|
+
}, {
|
|
238
|
+
path: string;
|
|
239
|
+
}>;
|
|
240
|
+
type InputSchema$4 = z.infer<typeof inputSchema$4>;
|
|
241
|
+
declare function readImageFileConfig(): {
|
|
242
|
+
title: string;
|
|
243
|
+
description: string;
|
|
244
|
+
inputSchema: {
|
|
245
|
+
path: z.ZodString;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
declare function readImageFile(input: InputSchema$4): Promise<{
|
|
249
|
+
path: string;
|
|
250
|
+
mimeType: string;
|
|
251
|
+
size: number;
|
|
252
|
+
}>;
|
|
253
|
+
|
|
254
|
+
declare const inputSchema$3: z.ZodObject<{
|
|
255
|
+
path: z.ZodString;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
path: string;
|
|
258
|
+
}, {
|
|
259
|
+
path: string;
|
|
260
|
+
}>;
|
|
261
|
+
type InputSchema$3 = z.infer<typeof inputSchema$3>;
|
|
262
|
+
declare function readPdfFileConfig(): {
|
|
263
|
+
title: string;
|
|
264
|
+
description: string;
|
|
265
|
+
inputSchema: {
|
|
266
|
+
path: z.ZodString;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
declare function readPdfFile(input: InputSchema$3): Promise<{
|
|
270
|
+
path: string;
|
|
271
|
+
mimeType: string;
|
|
272
|
+
size: number;
|
|
273
|
+
}>;
|
|
274
|
+
|
|
275
|
+
declare const inputSchema$2: z.ZodObject<{
|
|
276
|
+
path: z.ZodString;
|
|
277
|
+
from: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
to: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
path: string;
|
|
281
|
+
from?: number | undefined;
|
|
282
|
+
to?: number | undefined;
|
|
283
|
+
}, {
|
|
284
|
+
path: string;
|
|
285
|
+
from?: number | undefined;
|
|
286
|
+
to?: number | undefined;
|
|
287
|
+
}>;
|
|
288
|
+
type InputSchema$2 = z.infer<typeof inputSchema$2>;
|
|
289
|
+
declare function readTextFileConfig(): {
|
|
290
|
+
title: string;
|
|
291
|
+
description: string;
|
|
292
|
+
inputSchema: {
|
|
293
|
+
path: z.ZodString;
|
|
294
|
+
from: z.ZodOptional<z.ZodNumber>;
|
|
295
|
+
to: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
declare function readTextFile(input: InputSchema$2): Promise<{
|
|
299
|
+
path: string;
|
|
300
|
+
content: string;
|
|
301
|
+
from: number;
|
|
302
|
+
to: number;
|
|
303
|
+
}>;
|
|
304
|
+
|
|
305
|
+
declare const inputSchema$1: z.ZodObject<{
|
|
306
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
urls: string[];
|
|
309
|
+
}, {
|
|
310
|
+
urls: string[];
|
|
311
|
+
}>;
|
|
312
|
+
type InputSchema$1 = z.infer<typeof inputSchema$1>;
|
|
313
|
+
declare function testUrlConfig(): {
|
|
314
|
+
title: string;
|
|
315
|
+
description: string;
|
|
316
|
+
inputSchema: {
|
|
317
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
interface UrlTestResult {
|
|
321
|
+
url: string;
|
|
322
|
+
status: number;
|
|
323
|
+
title: string;
|
|
324
|
+
description: string;
|
|
325
|
+
}
|
|
326
|
+
declare function testUrls(input: InputSchema$1): Promise<{
|
|
327
|
+
results: UrlTestResult[];
|
|
328
|
+
}>;
|
|
329
|
+
|
|
330
|
+
declare const inputSchema: z.ZodObject<{
|
|
331
|
+
thought: z.ZodString;
|
|
332
|
+
nextThoughtNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
}, "strip", z.ZodTypeAny, {
|
|
334
|
+
thought: string;
|
|
335
|
+
nextThoughtNeeded?: boolean | undefined;
|
|
336
|
+
}, {
|
|
337
|
+
thought: string;
|
|
338
|
+
nextThoughtNeeded?: boolean | undefined;
|
|
339
|
+
}>;
|
|
340
|
+
type InputSchema = z.infer<typeof inputSchema>;
|
|
341
|
+
declare function thinkConfig(): {
|
|
342
|
+
title: string;
|
|
343
|
+
description: string;
|
|
344
|
+
inputSchema: {
|
|
345
|
+
thought: z.ZodString;
|
|
346
|
+
nextThoughtNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
declare function think(input: InputSchema): Promise<{
|
|
350
|
+
nextThoughtNeeded: boolean | undefined;
|
|
351
|
+
thoughtHistoryLength: number;
|
|
352
|
+
}>;
|
|
353
|
+
|
|
354
|
+
declare const todoInputSchema: z.ZodObject<{
|
|
355
|
+
newTodos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
356
|
+
completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
newTodos?: string[] | undefined;
|
|
359
|
+
completedTodos?: number[] | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
newTodos?: string[] | undefined;
|
|
362
|
+
completedTodos?: number[] | undefined;
|
|
363
|
+
}>;
|
|
364
|
+
type TodoInputSchema = z.infer<typeof todoInputSchema>;
|
|
365
|
+
declare function todoConfig(): {
|
|
366
|
+
title: string;
|
|
367
|
+
description: string;
|
|
368
|
+
inputSchema: {
|
|
369
|
+
newTodos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
370
|
+
completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
declare function todo(input: TodoInputSchema): Promise<{
|
|
374
|
+
todos: {
|
|
375
|
+
id: number;
|
|
376
|
+
title: string;
|
|
377
|
+
completed: boolean;
|
|
378
|
+
}[];
|
|
379
|
+
}>;
|
|
380
|
+
declare const clearTodoInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
381
|
+
type ClearTodoInputSchema = z.infer<typeof clearTodoInputSchema>;
|
|
382
|
+
declare function clearTodoConfig(): {
|
|
383
|
+
title: string;
|
|
384
|
+
description: string;
|
|
385
|
+
inputSchema: {};
|
|
386
|
+
};
|
|
387
|
+
declare function clearTodo(input: ClearTodoInputSchema): Promise<{
|
|
388
|
+
todos: {
|
|
389
|
+
id: number;
|
|
390
|
+
title: string;
|
|
391
|
+
completed: boolean;
|
|
392
|
+
}[];
|
|
393
|
+
}>;
|
|
394
|
+
|
|
395
|
+
declare const toolInputSchema: z.ZodObject<{
|
|
396
|
+
path: z.ZodString;
|
|
397
|
+
text: z.ZodString;
|
|
398
|
+
}, "strip", z.ZodTypeAny, {
|
|
399
|
+
text: string;
|
|
400
|
+
path: string;
|
|
401
|
+
}, {
|
|
402
|
+
text: string;
|
|
403
|
+
path: string;
|
|
404
|
+
}>;
|
|
405
|
+
type ToolInputSchema = z.infer<typeof toolInputSchema>;
|
|
406
|
+
declare function writeTextFileConfig(): {
|
|
407
|
+
title: string;
|
|
408
|
+
description: string;
|
|
409
|
+
inputSchema: {
|
|
410
|
+
path: z.ZodString;
|
|
411
|
+
text: z.ZodString;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
declare function writeTextFile(input: ToolInputSchema): Promise<{
|
|
415
|
+
path: string;
|
|
416
|
+
text: string;
|
|
417
|
+
}>;
|
|
418
|
+
|
|
419
|
+
export { appendTextFile, appendTextFileConfig, attemptCompletion, attemptCompletionConfig, clearTodo, clearTodoConfig, createDirectory, createDirectoryConfig, deleteFile, deleteFileConfig, editTextFile, editTextFileConfig, exec, execConfig, getFileInfo, getFileInfoConfig, listDirectory, listDirectoryConfig, moveFile, moveFileConfig, readImageFile, readImageFileConfig, readPdfFile, readPdfFileConfig, readTextFile, readTextFileConfig, testUrlConfig, testUrls, think, thinkConfig, todo, todoConfig, writeTextFile, writeTextFileConfig };
|