deepagentsdk 0.9.2
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/LICENSE +21 -0
- package/README.md +159 -0
- package/package.json +95 -0
- package/src/agent.ts +1230 -0
- package/src/backends/composite.ts +273 -0
- package/src/backends/filesystem.ts +692 -0
- package/src/backends/index.ts +22 -0
- package/src/backends/local-sandbox.ts +175 -0
- package/src/backends/persistent.ts +593 -0
- package/src/backends/sandbox.ts +510 -0
- package/src/backends/state.ts +244 -0
- package/src/backends/utils.ts +287 -0
- package/src/checkpointer/file-saver.ts +98 -0
- package/src/checkpointer/index.ts +5 -0
- package/src/checkpointer/kv-saver.ts +82 -0
- package/src/checkpointer/memory-saver.ts +82 -0
- package/src/checkpointer/types.ts +125 -0
- package/src/cli/components/ApiKeyInput.tsx +300 -0
- package/src/cli/components/FilePreview.tsx +237 -0
- package/src/cli/components/Input.tsx +277 -0
- package/src/cli/components/Message.tsx +93 -0
- package/src/cli/components/ModelSelection.tsx +338 -0
- package/src/cli/components/SlashMenu.tsx +101 -0
- package/src/cli/components/StatusBar.tsx +89 -0
- package/src/cli/components/Subagent.tsx +91 -0
- package/src/cli/components/TodoList.tsx +133 -0
- package/src/cli/components/ToolApproval.tsx +70 -0
- package/src/cli/components/ToolCall.tsx +144 -0
- package/src/cli/components/ToolCallSummary.tsx +175 -0
- package/src/cli/components/Welcome.tsx +75 -0
- package/src/cli/components/index.ts +24 -0
- package/src/cli/hooks/index.ts +12 -0
- package/src/cli/hooks/useAgent.ts +933 -0
- package/src/cli/index.tsx +1066 -0
- package/src/cli/theme.ts +205 -0
- package/src/cli/utils/model-list.ts +365 -0
- package/src/constants/errors.ts +29 -0
- package/src/constants/limits.ts +195 -0
- package/src/index.ts +176 -0
- package/src/middleware/agent-memory.ts +330 -0
- package/src/prompts.ts +196 -0
- package/src/skills/index.ts +2 -0
- package/src/skills/load.ts +191 -0
- package/src/skills/types.ts +53 -0
- package/src/tools/execute.ts +167 -0
- package/src/tools/filesystem.ts +418 -0
- package/src/tools/index.ts +39 -0
- package/src/tools/subagent.ts +443 -0
- package/src/tools/todos.ts +101 -0
- package/src/tools/web.ts +567 -0
- package/src/types/backend.ts +177 -0
- package/src/types/core.ts +220 -0
- package/src/types/events.ts +429 -0
- package/src/types/index.ts +94 -0
- package/src/types/structured-output.ts +43 -0
- package/src/types/subagent.ts +96 -0
- package/src/types.ts +22 -0
- package/src/utils/approval.ts +213 -0
- package/src/utils/events.ts +416 -0
- package/src/utils/eviction.ts +181 -0
- package/src/utils/index.ts +34 -0
- package/src/utils/model-parser.ts +38 -0
- package/src/utils/patch-tool-calls.ts +233 -0
- package/src/utils/project-detection.ts +32 -0
- package/src/utils/summarization.ts +254 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filesystem tools for virtual file operations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { tool } from "ai";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import type {
|
|
8
|
+
BackendProtocol,
|
|
9
|
+
DeepAgentState,
|
|
10
|
+
BackendFactory,
|
|
11
|
+
EventCallback,
|
|
12
|
+
} from "../types";
|
|
13
|
+
import { StateBackend } from "../backends/state";
|
|
14
|
+
import {
|
|
15
|
+
evictToolResult,
|
|
16
|
+
DEFAULT_EVICTION_TOKEN_LIMIT,
|
|
17
|
+
} from "../utils/eviction";
|
|
18
|
+
import {
|
|
19
|
+
createFileReadEvent,
|
|
20
|
+
createFileWriteStartEvent,
|
|
21
|
+
createFileWrittenEvent,
|
|
22
|
+
createFileEditedEvent,
|
|
23
|
+
} from "../utils/events";
|
|
24
|
+
|
|
25
|
+
// Tool descriptions
|
|
26
|
+
const LS_TOOL_DESCRIPTION = "List files and directories in a directory. Paths are relative to the working directory.";
|
|
27
|
+
const READ_FILE_TOOL_DESCRIPTION = "Read the contents of a file. Paths are relative to the working directory.";
|
|
28
|
+
const WRITE_FILE_TOOL_DESCRIPTION =
|
|
29
|
+
"Write content to a new file. Returns an error if the file already exists. Paths are relative to the working directory.";
|
|
30
|
+
const EDIT_FILE_TOOL_DESCRIPTION =
|
|
31
|
+
"Edit a file by replacing a specific string with a new string. Paths are relative to the working directory.";
|
|
32
|
+
const GLOB_TOOL_DESCRIPTION =
|
|
33
|
+
"Find files matching a glob pattern (e.g., '**/*.py' for all Python files). Paths are relative to the working directory.";
|
|
34
|
+
const GREP_TOOL_DESCRIPTION =
|
|
35
|
+
"Search for a regex pattern in files. Returns matching files and line numbers. Paths are relative to the working directory.";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Resolve backend from factory or instance.
|
|
39
|
+
*/
|
|
40
|
+
function getBackend(
|
|
41
|
+
backend: BackendProtocol | BackendFactory,
|
|
42
|
+
state: DeepAgentState
|
|
43
|
+
): BackendProtocol {
|
|
44
|
+
if (typeof backend === "function") {
|
|
45
|
+
return backend(state);
|
|
46
|
+
}
|
|
47
|
+
return backend;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Create the ls tool.
|
|
52
|
+
*/
|
|
53
|
+
export function createLsTool(
|
|
54
|
+
state: DeepAgentState,
|
|
55
|
+
backend: BackendProtocol | BackendFactory,
|
|
56
|
+
onEvent?: EventCallback
|
|
57
|
+
) {
|
|
58
|
+
return tool({
|
|
59
|
+
description: LS_TOOL_DESCRIPTION,
|
|
60
|
+
inputSchema: z.object({
|
|
61
|
+
path: z
|
|
62
|
+
.string()
|
|
63
|
+
.default(".")
|
|
64
|
+
.describe("Directory path to list (default: current directory)"),
|
|
65
|
+
}),
|
|
66
|
+
execute: async ({ path }) => {
|
|
67
|
+
const resolvedBackend = getBackend(backend, state);
|
|
68
|
+
const infos = await resolvedBackend.lsInfo(path || ".");
|
|
69
|
+
|
|
70
|
+
// Emit ls event
|
|
71
|
+
if (onEvent) {
|
|
72
|
+
onEvent({
|
|
73
|
+
type: "ls",
|
|
74
|
+
path: path || ".",
|
|
75
|
+
count: infos.length,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (infos.length === 0) {
|
|
80
|
+
return `No files found in ${path}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const lines: string[] = [];
|
|
84
|
+
for (const info of infos) {
|
|
85
|
+
if (info.is_dir) {
|
|
86
|
+
lines.push(`${info.path} (directory)`);
|
|
87
|
+
} else {
|
|
88
|
+
const size = info.size ? ` (${info.size} bytes)` : "";
|
|
89
|
+
lines.push(`${info.path}${size}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return lines.join("\n");
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Create the read_file tool.
|
|
99
|
+
*/
|
|
100
|
+
export function createReadFileTool(
|
|
101
|
+
state: DeepAgentState,
|
|
102
|
+
backend: BackendProtocol | BackendFactory,
|
|
103
|
+
evictionLimit?: number,
|
|
104
|
+
onEvent?: EventCallback
|
|
105
|
+
) {
|
|
106
|
+
return tool({
|
|
107
|
+
description: READ_FILE_TOOL_DESCRIPTION,
|
|
108
|
+
inputSchema: z.object({
|
|
109
|
+
file_path: z.string().describe("Path to the file to read (e.g., 'src/main.ts' or './main.ts')"),
|
|
110
|
+
offset: z
|
|
111
|
+
.number()
|
|
112
|
+
.default(0)
|
|
113
|
+
.describe("Line offset to start reading from (0-indexed)"),
|
|
114
|
+
limit: z
|
|
115
|
+
.number()
|
|
116
|
+
.default(2000)
|
|
117
|
+
.describe("Maximum number of lines to read"),
|
|
118
|
+
}),
|
|
119
|
+
execute: async ({ file_path, offset, limit }, { toolCallId }) => {
|
|
120
|
+
const resolvedBackend = getBackend(backend, state);
|
|
121
|
+
const content = await resolvedBackend.read(file_path, offset ?? 0, limit ?? 2000);
|
|
122
|
+
|
|
123
|
+
// Emit file-read event
|
|
124
|
+
if (onEvent) {
|
|
125
|
+
const lineCount = content.split("\n").length;
|
|
126
|
+
onEvent(createFileReadEvent(file_path, lineCount));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Evict large results if limit is set
|
|
130
|
+
if (evictionLimit && evictionLimit > 0) {
|
|
131
|
+
const evictResult = await evictToolResult({
|
|
132
|
+
result: content,
|
|
133
|
+
toolCallId: toolCallId || `read_${Date.now()}`,
|
|
134
|
+
toolName: "read_file",
|
|
135
|
+
backend: resolvedBackend,
|
|
136
|
+
tokenLimit: evictionLimit,
|
|
137
|
+
});
|
|
138
|
+
return evictResult.content;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return content;
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Create the write_file tool.
|
|
148
|
+
*/
|
|
149
|
+
export function createWriteFileTool(
|
|
150
|
+
state: DeepAgentState,
|
|
151
|
+
backend: BackendProtocol | BackendFactory,
|
|
152
|
+
onEvent?: EventCallback
|
|
153
|
+
) {
|
|
154
|
+
return tool({
|
|
155
|
+
description: WRITE_FILE_TOOL_DESCRIPTION,
|
|
156
|
+
inputSchema: z.object({
|
|
157
|
+
file_path: z.string().describe("Path to the file to write (e.g., 'src/main.ts' or './main.ts')"),
|
|
158
|
+
content: z.string().describe("Content to write to the file"),
|
|
159
|
+
}),
|
|
160
|
+
execute: async ({ file_path, content }) => {
|
|
161
|
+
// Emit file-write-start event for preview
|
|
162
|
+
if (onEvent) {
|
|
163
|
+
onEvent(createFileWriteStartEvent(file_path, content));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const resolvedBackend = getBackend(backend, state);
|
|
167
|
+
const result = await resolvedBackend.write(file_path, content);
|
|
168
|
+
|
|
169
|
+
if (result.error) {
|
|
170
|
+
return result.error;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Emit file-written event with content
|
|
174
|
+
if (onEvent) {
|
|
175
|
+
onEvent(createFileWrittenEvent(file_path, content));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return `Successfully wrote to '${file_path}'`;
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Create the edit_file tool.
|
|
185
|
+
*/
|
|
186
|
+
export function createEditFileTool(
|
|
187
|
+
state: DeepAgentState,
|
|
188
|
+
backend: BackendProtocol | BackendFactory,
|
|
189
|
+
onEvent?: EventCallback
|
|
190
|
+
) {
|
|
191
|
+
return tool({
|
|
192
|
+
description: EDIT_FILE_TOOL_DESCRIPTION,
|
|
193
|
+
inputSchema: z.object({
|
|
194
|
+
file_path: z.string().describe("Path to the file to edit (e.g., 'src/main.ts' or './main.ts')"),
|
|
195
|
+
old_string: z
|
|
196
|
+
.string()
|
|
197
|
+
.describe("String to be replaced (must match exactly)"),
|
|
198
|
+
new_string: z.string().describe("String to replace with"),
|
|
199
|
+
replace_all: z
|
|
200
|
+
.boolean()
|
|
201
|
+
.default(false)
|
|
202
|
+
.describe("Whether to replace all occurrences"),
|
|
203
|
+
}),
|
|
204
|
+
execute: async ({ file_path, old_string, new_string, replace_all }) => {
|
|
205
|
+
const resolvedBackend = getBackend(backend, state);
|
|
206
|
+
const result = await resolvedBackend.edit(
|
|
207
|
+
file_path,
|
|
208
|
+
old_string,
|
|
209
|
+
new_string,
|
|
210
|
+
replace_all ?? false
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
if (result.error) {
|
|
214
|
+
return result.error;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Emit event if callback provided
|
|
218
|
+
if (onEvent) {
|
|
219
|
+
onEvent(createFileEditedEvent(file_path, result.occurrences ?? 0));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return `Successfully replaced ${result.occurrences} occurrence(s) in '${file_path}'`;
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Create the glob tool.
|
|
229
|
+
*/
|
|
230
|
+
export function createGlobTool(
|
|
231
|
+
state: DeepAgentState,
|
|
232
|
+
backend: BackendProtocol | BackendFactory,
|
|
233
|
+
onEvent?: EventCallback
|
|
234
|
+
) {
|
|
235
|
+
return tool({
|
|
236
|
+
description: GLOB_TOOL_DESCRIPTION,
|
|
237
|
+
inputSchema: z.object({
|
|
238
|
+
pattern: z.string().describe("Glob pattern (e.g., '*.py', '**/*.ts')"),
|
|
239
|
+
path: z
|
|
240
|
+
.string()
|
|
241
|
+
.default(".")
|
|
242
|
+
.describe("Base path to search from (default: current directory)"),
|
|
243
|
+
}),
|
|
244
|
+
execute: async ({ pattern, path }) => {
|
|
245
|
+
const resolvedBackend = getBackend(backend, state);
|
|
246
|
+
const infos = await resolvedBackend.globInfo(pattern, path || ".");
|
|
247
|
+
|
|
248
|
+
// Emit glob event
|
|
249
|
+
if (onEvent) {
|
|
250
|
+
onEvent({
|
|
251
|
+
type: "glob",
|
|
252
|
+
pattern,
|
|
253
|
+
count: infos.length,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (infos.length === 0) {
|
|
258
|
+
return `No files found matching pattern '${pattern}'`;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return infos.map((info) => info.path).join("\n");
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Create the grep tool.
|
|
268
|
+
*/
|
|
269
|
+
export function createGrepTool(
|
|
270
|
+
state: DeepAgentState,
|
|
271
|
+
backend: BackendProtocol | BackendFactory,
|
|
272
|
+
evictionLimit?: number,
|
|
273
|
+
onEvent?: EventCallback
|
|
274
|
+
) {
|
|
275
|
+
return tool({
|
|
276
|
+
description: GREP_TOOL_DESCRIPTION,
|
|
277
|
+
inputSchema: z.object({
|
|
278
|
+
pattern: z.string().describe("Regex pattern to search for"),
|
|
279
|
+
path: z
|
|
280
|
+
.string()
|
|
281
|
+
.default(".")
|
|
282
|
+
.describe("Base path to search from (default: current directory)"),
|
|
283
|
+
glob: z
|
|
284
|
+
.string()
|
|
285
|
+
.optional()
|
|
286
|
+
.nullable()
|
|
287
|
+
.describe("Optional glob pattern to filter files (e.g., '*.py')"),
|
|
288
|
+
}),
|
|
289
|
+
execute: async ({ pattern, path, glob }, { toolCallId }) => {
|
|
290
|
+
const resolvedBackend = getBackend(backend, state);
|
|
291
|
+
const result = await resolvedBackend.grepRaw(
|
|
292
|
+
pattern,
|
|
293
|
+
path || ".",
|
|
294
|
+
glob ?? null
|
|
295
|
+
);
|
|
296
|
+
|
|
297
|
+
if (typeof result === "string") {
|
|
298
|
+
// Emit grep event even for string results (errors)
|
|
299
|
+
if (onEvent) {
|
|
300
|
+
onEvent({
|
|
301
|
+
type: "grep",
|
|
302
|
+
pattern,
|
|
303
|
+
count: 0,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
return result;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Emit grep event
|
|
310
|
+
if (onEvent) {
|
|
311
|
+
onEvent({
|
|
312
|
+
type: "grep",
|
|
313
|
+
pattern,
|
|
314
|
+
count: result.length,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (result.length === 0) {
|
|
319
|
+
return `No matches found for pattern '${pattern}'`;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Format output: group by file
|
|
323
|
+
const lines: string[] = [];
|
|
324
|
+
let currentFile: string | null = null;
|
|
325
|
+
for (const match of result) {
|
|
326
|
+
if (match.path !== currentFile) {
|
|
327
|
+
currentFile = match.path;
|
|
328
|
+
lines.push(`\n${currentFile}:`);
|
|
329
|
+
}
|
|
330
|
+
lines.push(` ${match.line}: ${match.text}`);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const content = lines.join("\n");
|
|
334
|
+
|
|
335
|
+
// Evict large results if limit is set
|
|
336
|
+
if (evictionLimit && evictionLimit > 0) {
|
|
337
|
+
const evictResult = await evictToolResult({
|
|
338
|
+
result: content,
|
|
339
|
+
toolCallId: toolCallId || `grep_${Date.now()}`,
|
|
340
|
+
toolName: "grep",
|
|
341
|
+
backend: resolvedBackend,
|
|
342
|
+
tokenLimit: evictionLimit,
|
|
343
|
+
});
|
|
344
|
+
return evictResult.content;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return content;
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Options for creating filesystem tools.
|
|
354
|
+
*/
|
|
355
|
+
export interface CreateFilesystemToolsOptions {
|
|
356
|
+
/** Backend for filesystem operations */
|
|
357
|
+
backend?: BackendProtocol | BackendFactory;
|
|
358
|
+
/** Callback for emitting events */
|
|
359
|
+
onEvent?: EventCallback;
|
|
360
|
+
/** Token limit before evicting large tool results (default: disabled) */
|
|
361
|
+
toolResultEvictionLimit?: number;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Create all filesystem tools.
|
|
366
|
+
* @param state - The shared agent state
|
|
367
|
+
* @param backendOrOptions - Backend or options object
|
|
368
|
+
* @param onEvent - Optional callback for emitting events (deprecated, use options)
|
|
369
|
+
*/
|
|
370
|
+
export function createFilesystemTools(
|
|
371
|
+
state: DeepAgentState,
|
|
372
|
+
backendOrOptions?: BackendProtocol | BackendFactory | CreateFilesystemToolsOptions,
|
|
373
|
+
onEvent?: EventCallback
|
|
374
|
+
) {
|
|
375
|
+
// Handle both old and new API
|
|
376
|
+
let backend: BackendProtocol | BackendFactory | undefined;
|
|
377
|
+
let eventCallback: EventCallback | undefined = onEvent;
|
|
378
|
+
let evictionLimit: number | undefined;
|
|
379
|
+
|
|
380
|
+
if (backendOrOptions && typeof backendOrOptions === "object" && "backend" in backendOrOptions) {
|
|
381
|
+
// New options API
|
|
382
|
+
const options = backendOrOptions as CreateFilesystemToolsOptions;
|
|
383
|
+
backend = options.backend;
|
|
384
|
+
eventCallback = options.onEvent;
|
|
385
|
+
evictionLimit = options.toolResultEvictionLimit;
|
|
386
|
+
} else {
|
|
387
|
+
// Old API (backend directly)
|
|
388
|
+
backend = backendOrOptions as BackendProtocol | BackendFactory | undefined;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Default to StateBackend if no backend provided
|
|
392
|
+
const resolvedBackend =
|
|
393
|
+
backend || ((s: DeepAgentState) => new StateBackend(s));
|
|
394
|
+
|
|
395
|
+
return {
|
|
396
|
+
ls: createLsTool(state, resolvedBackend, eventCallback),
|
|
397
|
+
read_file: createReadFileTool(state, resolvedBackend, evictionLimit, eventCallback),
|
|
398
|
+
write_file: createWriteFileTool(state, resolvedBackend, eventCallback),
|
|
399
|
+
edit_file: createEditFileTool(state, resolvedBackend, eventCallback),
|
|
400
|
+
glob: createGlobTool(state, resolvedBackend, eventCallback),
|
|
401
|
+
grep: createGrepTool(state, resolvedBackend, evictionLimit, eventCallback),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// ============================================================================
|
|
406
|
+
// Individual Tool References
|
|
407
|
+
// ============================================================================
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Individual builtin tool references for selective subagent configuration.
|
|
411
|
+
* These are references to the creator functions, not instances.
|
|
412
|
+
*/
|
|
413
|
+
export const ls = createLsTool;
|
|
414
|
+
export const read_file = createReadFileTool;
|
|
415
|
+
export const write_file = createWriteFileTool;
|
|
416
|
+
export const edit_file = createEditFileTool;
|
|
417
|
+
export const glob = createGlobTool;
|
|
418
|
+
export const grep = createGrepTool;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tools exports.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export { createTodosTool, write_todos } from "./todos";
|
|
6
|
+
export {
|
|
7
|
+
createFilesystemTools,
|
|
8
|
+
createLsTool,
|
|
9
|
+
createReadFileTool,
|
|
10
|
+
createWriteFileTool,
|
|
11
|
+
createEditFileTool,
|
|
12
|
+
createGlobTool,
|
|
13
|
+
createGrepTool,
|
|
14
|
+
ls,
|
|
15
|
+
read_file,
|
|
16
|
+
write_file,
|
|
17
|
+
edit_file,
|
|
18
|
+
glob,
|
|
19
|
+
grep,
|
|
20
|
+
} from "./filesystem";
|
|
21
|
+
export { createSubagentTool, type CreateSubagentToolOptions } from "./subagent";
|
|
22
|
+
export {
|
|
23
|
+
createExecuteTool,
|
|
24
|
+
createExecuteToolFromBackend,
|
|
25
|
+
type CreateExecuteToolOptions,
|
|
26
|
+
execute,
|
|
27
|
+
} from "./execute";
|
|
28
|
+
export {
|
|
29
|
+
createWebTools,
|
|
30
|
+
htmlToMarkdown,
|
|
31
|
+
type CreateWebToolsOptions,
|
|
32
|
+
createWebSearchTool,
|
|
33
|
+
createHttpRequestTool,
|
|
34
|
+
createFetchUrlTool,
|
|
35
|
+
web_search,
|
|
36
|
+
http_request,
|
|
37
|
+
fetch_url,
|
|
38
|
+
} from "./web";
|
|
39
|
+
|