@cloudbase/agent-tools 0.0.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/CHANGELOG.md +416 -0
- package/dist/agent_tool.d.ts +7 -0
- package/dist/agent_tool.d.ts.map +1 -0
- package/dist/agent_tool.js +16 -0
- package/dist/agent_tool.js.map +1 -0
- package/dist/bash/bash-tool.d.ts +61 -0
- package/dist/bash/bash-tool.d.ts.map +1 -0
- package/dist/bash/bash-tool.js +191 -0
- package/dist/bash/bash-tool.js.map +1 -0
- package/dist/bash/index.d.ts +7 -0
- package/dist/bash/index.d.ts.map +1 -0
- package/dist/bash/index.js +17 -0
- package/dist/bash/index.js.map +1 -0
- package/dist/bash/operator/base-operator.d.ts +44 -0
- package/dist/bash/operator/base-operator.d.ts.map +1 -0
- package/dist/bash/operator/base-operator.js +14 -0
- package/dist/bash/operator/base-operator.js.map +1 -0
- package/dist/bash/operator/local-operator.d.ts +15 -0
- package/dist/bash/operator/local-operator.d.ts.map +1 -0
- package/dist/bash/operator/local-operator.js +145 -0
- package/dist/bash/operator/local-operator.js.map +1 -0
- package/dist/bash/operator/sandbox-operator.d.ts +22 -0
- package/dist/bash/operator/sandbox-operator.d.ts.map +1 -0
- package/dist/bash/operator/sandbox-operator.js +112 -0
- package/dist/bash/operator/sandbox-operator.js.map +1 -0
- package/dist/bash/utils.d.ts +106 -0
- package/dist/bash/utils.d.ts.map +1 -0
- package/dist/bash/utils.js +197 -0
- package/dist/bash/utils.js.map +1 -0
- package/dist/browser/browser-instance-manager.d.ts +79 -0
- package/dist/browser/browser-instance-manager.d.ts.map +1 -0
- package/dist/browser/browser-instance-manager.js +242 -0
- package/dist/browser/browser-instance-manager.js.map +1 -0
- package/dist/browser/browser-tool-executor.d.ts +57 -0
- package/dist/browser/browser-tool-executor.d.ts.map +1 -0
- package/dist/browser/browser-tool-executor.js +205 -0
- package/dist/browser/browser-tool-executor.js.map +1 -0
- package/dist/browser/browser_client_unified.d.ts +52 -0
- package/dist/browser/browser_client_unified.d.ts.map +1 -0
- package/dist/browser/browser_client_unified.js +381 -0
- package/dist/browser/browser_client_unified.js.map +1 -0
- package/dist/browser/browser_tool_unified.d.ts +93 -0
- package/dist/browser/browser_tool_unified.d.ts.map +1 -0
- package/dist/browser/browser_tool_unified.js +181 -0
- package/dist/browser/browser_tool_unified.js.map +1 -0
- package/dist/browser/index.d.ts +7 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +19 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/sandbox-connector.d.ts +93 -0
- package/dist/browser/sandbox-connector.d.ts.map +1 -0
- package/dist/browser/sandbox-connector.js +272 -0
- package/dist/browser/sandbox-connector.js.map +1 -0
- package/dist/browser/types.d.ts +53 -0
- package/dist/browser/types.d.ts.map +1 -0
- package/dist/browser/types.js +3 -0
- package/dist/browser/types.js.map +1 -0
- package/dist/code_executers/base_code_executor.d.ts +17 -0
- package/dist/code_executers/base_code_executor.d.ts.map +1 -0
- package/dist/code_executers/base_code_executor.js +20 -0
- package/dist/code_executers/base_code_executor.js.map +1 -0
- package/dist/code_executers/built_in_code_executor.d.ts +25 -0
- package/dist/code_executers/built_in_code_executor.d.ts.map +1 -0
- package/dist/code_executers/built_in_code_executor.js +106 -0
- package/dist/code_executers/built_in_code_executor.js.map +1 -0
- package/dist/code_executers/unsafe_local_code_executor.d.ts +118 -0
- package/dist/code_executers/unsafe_local_code_executor.d.ts.map +1 -0
- package/dist/code_executers/unsafe_local_code_executor.js +605 -0
- package/dist/code_executers/unsafe_local_code_executor.js.map +1 -0
- package/dist/fs/edit-tool.d.ts +26 -0
- package/dist/fs/edit-tool.d.ts.map +1 -0
- package/dist/fs/edit-tool.js +202 -0
- package/dist/fs/edit-tool.js.map +1 -0
- package/dist/fs/glob-tool.d.ts +31 -0
- package/dist/fs/glob-tool.d.ts.map +1 -0
- package/dist/fs/glob-tool.js +287 -0
- package/dist/fs/glob-tool.js.map +1 -0
- package/dist/fs/grep-tool.d.ts +32 -0
- package/dist/fs/grep-tool.d.ts.map +1 -0
- package/dist/fs/grep-tool.js +353 -0
- package/dist/fs/grep-tool.js.map +1 -0
- package/dist/fs/index.d.ts +11 -0
- package/dist/fs/index.d.ts.map +1 -0
- package/dist/fs/index.js +38 -0
- package/dist/fs/index.js.map +1 -0
- package/dist/fs/ls-tool.d.ts +26 -0
- package/dist/fs/ls-tool.d.ts.map +1 -0
- package/dist/fs/ls-tool.js +235 -0
- package/dist/fs/ls-tool.js.map +1 -0
- package/dist/fs/multiedit-tool.d.ts +34 -0
- package/dist/fs/multiedit-tool.d.ts.map +1 -0
- package/dist/fs/multiedit-tool.js +158 -0
- package/dist/fs/multiedit-tool.js.map +1 -0
- package/dist/fs/operator/base-operator.d.ts +28 -0
- package/dist/fs/operator/base-operator.d.ts.map +1 -0
- package/dist/fs/operator/base-operator.js +21 -0
- package/dist/fs/operator/base-operator.js.map +1 -0
- package/dist/fs/operator/in-memory-operator.d.ts +39 -0
- package/dist/fs/operator/in-memory-operator.d.ts.map +1 -0
- package/dist/fs/operator/in-memory-operator.js +115 -0
- package/dist/fs/operator/in-memory-operator.js.map +1 -0
- package/dist/fs/operator/index.d.ts +6 -0
- package/dist/fs/operator/index.d.ts.map +1 -0
- package/dist/fs/operator/index.js +28 -0
- package/dist/fs/operator/index.js.map +1 -0
- package/dist/fs/operator/local-operator.d.ts +25 -0
- package/dist/fs/operator/local-operator.d.ts.map +1 -0
- package/dist/fs/operator/local-operator.js +62 -0
- package/dist/fs/operator/local-operator.js.map +1 -0
- package/dist/fs/operator/sanbox-operator.d.ts +31 -0
- package/dist/fs/operator/sanbox-operator.d.ts.map +1 -0
- package/dist/fs/operator/sanbox-operator.js +172 -0
- package/dist/fs/operator/sanbox-operator.js.map +1 -0
- package/dist/fs/operator/transaction/index.d.ts +6 -0
- package/dist/fs/operator/transaction/index.d.ts.map +1 -0
- package/dist/fs/operator/transaction/index.js +28 -0
- package/dist/fs/operator/transaction/index.js.map +1 -0
- package/dist/fs/operator/transaction/snapshot-strategies.d.ts +54 -0
- package/dist/fs/operator/transaction/snapshot-strategies.d.ts.map +1 -0
- package/dist/fs/operator/transaction/snapshot-strategies.js +278 -0
- package/dist/fs/operator/transaction/snapshot-strategies.js.map +1 -0
- package/dist/fs/operator/transaction/transaction-operator.d.ts +53 -0
- package/dist/fs/operator/transaction/transaction-operator.d.ts.map +1 -0
- package/dist/fs/operator/transaction/transaction-operator.js +195 -0
- package/dist/fs/operator/transaction/transaction-operator.js.map +1 -0
- package/dist/fs/operator/transaction/transaction-utils.d.ts +80 -0
- package/dist/fs/operator/transaction/transaction-utils.d.ts.map +1 -0
- package/dist/fs/operator/transaction/transaction-utils.js +156 -0
- package/dist/fs/operator/transaction/transaction-utils.js.map +1 -0
- package/dist/fs/read-tool.d.ts +32 -0
- package/dist/fs/read-tool.d.ts.map +1 -0
- package/dist/fs/read-tool.js +271 -0
- package/dist/fs/read-tool.js.map +1 -0
- package/dist/fs/str-replace-editor.d.ts +23 -0
- package/dist/fs/str-replace-editor.d.ts.map +1 -0
- package/dist/fs/str-replace-editor.js +74 -0
- package/dist/fs/str-replace-editor.js.map +1 -0
- package/dist/fs/toolkit.d.ts +61 -0
- package/dist/fs/toolkit.d.ts.map +1 -0
- package/dist/fs/toolkit.js +113 -0
- package/dist/fs/toolkit.js.map +1 -0
- package/dist/fs/utils.d.ts +32 -0
- package/dist/fs/utils.d.ts.map +1 -0
- package/dist/fs/utils.js +133 -0
- package/dist/fs/utils.js.map +1 -0
- package/dist/fs/write-tool.d.ts +26 -0
- package/dist/fs/write-tool.d.ts.map +1 -0
- package/dist/fs/write-tool.js +110 -0
- package/dist/fs/write-tool.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/agkit-mcp-server.d.ts +291 -0
- package/dist/mcp/agkit-mcp-server.d.ts.map +1 -0
- package/dist/mcp/agkit-mcp-server.js +821 -0
- package/dist/mcp/agkit-mcp-server.js.map +1 -0
- package/dist/mcp/client-tool.d.ts +65 -0
- package/dist/mcp/client-tool.d.ts.map +1 -0
- package/dist/mcp/client-tool.js +220 -0
- package/dist/mcp/client-tool.js.map +1 -0
- package/dist/mcp/index.d.ts +14 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +26 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/mcp-client-manager.d.ts +153 -0
- package/dist/mcp/mcp-client-manager.d.ts.map +1 -0
- package/dist/mcp/mcp-client-manager.js +606 -0
- package/dist/mcp/mcp-client-manager.js.map +1 -0
- package/dist/mcp/mcp-toolkit.d.ts +112 -0
- package/dist/mcp/mcp-toolkit.d.ts.map +1 -0
- package/dist/mcp/mcp-toolkit.js +188 -0
- package/dist/mcp/mcp-toolkit.js.map +1 -0
- package/dist/mcp/types.d.ts +157 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +34 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/mcp/utils.d.ts +17 -0
- package/dist/mcp/utils.d.ts.map +1 -0
- package/dist/mcp/utils.js +48 -0
- package/dist/mcp/utils.js.map +1 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/zod.d.ts +18 -0
- package/dist/types/zod.d.ts.map +1 -0
- package/dist/types/zod.js +3 -0
- package/dist/types/zod.js.map +1 -0
- package/dist/utils.d.ts +141 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +379 -0
- package/dist/utils.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.editFile = editFile;
|
|
37
|
+
exports.createEditTool = createEditTool;
|
|
38
|
+
const v4_1 = require("zod/v4");
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const utils_1 = require("./utils");
|
|
41
|
+
const utils_2 = require("../utils");
|
|
42
|
+
const editParametersSchema = v4_1.z.object({
|
|
43
|
+
file_path: v4_1.z.string().describe("The absolute path to the file to modify"),
|
|
44
|
+
old_string: v4_1.z
|
|
45
|
+
.string()
|
|
46
|
+
.describe("The exact text to find and replace. Must match exactly including whitespace, indentation, and context. For single replacements, include 2+ lines of context before and after the target text."),
|
|
47
|
+
new_string: v4_1.z
|
|
48
|
+
.string()
|
|
49
|
+
.describe("The text to replace it with (must be different from old_string)"),
|
|
50
|
+
expected_replacements: v4_1.z
|
|
51
|
+
.number()
|
|
52
|
+
.min(1)
|
|
53
|
+
.optional()
|
|
54
|
+
.describe("The expected number of replacements to perform. Defaults to 1 if not specified."),
|
|
55
|
+
});
|
|
56
|
+
// Path validation is now handled by validateWorkspacePath in tool-utils
|
|
57
|
+
/**
|
|
58
|
+
* Escape special regex characters
|
|
59
|
+
*/
|
|
60
|
+
function escapeRegExp(string) {
|
|
61
|
+
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Calculate the edit operation without executing it
|
|
65
|
+
*/
|
|
66
|
+
async function calculateEdit(file_path, old_string, new_string, expected_replacements, context) {
|
|
67
|
+
// Use the utility function to resolve paths
|
|
68
|
+
const absolutePath = (0, utils_1.resolveWorkspacePath)(file_path, context);
|
|
69
|
+
try {
|
|
70
|
+
await context.fsOperator.access(absolutePath);
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
if (old_string === "") {
|
|
74
|
+
// Creating a new file
|
|
75
|
+
return {
|
|
76
|
+
currentContent: "",
|
|
77
|
+
newContent: new_string,
|
|
78
|
+
occurrences: 1,
|
|
79
|
+
isNewFile: true,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return {
|
|
84
|
+
currentContent: "",
|
|
85
|
+
newContent: "",
|
|
86
|
+
occurrences: 0,
|
|
87
|
+
isNewFile: false,
|
|
88
|
+
error: `File not found: ${file_path}. Cannot apply edit. Use empty old_string to create a new file.`,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Read current content
|
|
93
|
+
let currentContent;
|
|
94
|
+
try {
|
|
95
|
+
currentContent = await context.fsOperator.readFile(absolutePath, "utf8");
|
|
96
|
+
// Normalize line endings to LF
|
|
97
|
+
currentContent = currentContent.replace(/\r\n/g, "\n");
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
return {
|
|
101
|
+
currentContent: "",
|
|
102
|
+
newContent: "",
|
|
103
|
+
occurrences: 0,
|
|
104
|
+
isNewFile: false,
|
|
105
|
+
error: `Failed to read file: ${error instanceof Error ? error.message : String(error)}`,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// Handle creating file that already exists
|
|
109
|
+
if (old_string === "") {
|
|
110
|
+
return {
|
|
111
|
+
currentContent,
|
|
112
|
+
newContent: "",
|
|
113
|
+
occurrences: 0,
|
|
114
|
+
isNewFile: false,
|
|
115
|
+
error: `File already exists, cannot create: ${file_path}`,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
// Count occurrences
|
|
119
|
+
const occurrences = (currentContent.match(new RegExp(escapeRegExp(old_string), "g")) || []).length;
|
|
120
|
+
// Validate occurrence count
|
|
121
|
+
if (occurrences === 0) {
|
|
122
|
+
return {
|
|
123
|
+
currentContent,
|
|
124
|
+
newContent: currentContent,
|
|
125
|
+
occurrences: 0,
|
|
126
|
+
isNewFile: false,
|
|
127
|
+
error: `Text not found in file. 0 occurrences of old_string found. Ensure exact text match including whitespace and indentation.`,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
if (occurrences !== expected_replacements) {
|
|
131
|
+
return {
|
|
132
|
+
currentContent,
|
|
133
|
+
newContent: currentContent,
|
|
134
|
+
occurrences,
|
|
135
|
+
isNewFile: false,
|
|
136
|
+
error: `Expected ${expected_replacements} replacement(s) but found ${occurrences} occurrence(s).`,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
// Apply replacement
|
|
140
|
+
const newContent = currentContent.split(old_string).join(new_string);
|
|
141
|
+
return {
|
|
142
|
+
currentContent,
|
|
143
|
+
newContent,
|
|
144
|
+
occurrences,
|
|
145
|
+
isNewFile: false,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
async function editFile(context, params) {
|
|
149
|
+
try {
|
|
150
|
+
const { file_path, old_string, new_string, expected_replacements = 1, } = params;
|
|
151
|
+
// Validate workspace path (handles both absolute and relative paths)
|
|
152
|
+
const pathError = (0, utils_1.validateWorkspacePath)(file_path, context);
|
|
153
|
+
if (pathError) {
|
|
154
|
+
return pathError;
|
|
155
|
+
}
|
|
156
|
+
// Calculate the edit
|
|
157
|
+
const editResult = await calculateEdit(file_path, old_string, new_string, expected_replacements, context);
|
|
158
|
+
if (editResult.error) {
|
|
159
|
+
return (0, utils_2.handleToolError)(editResult.error, "Edit operation", "execution");
|
|
160
|
+
}
|
|
161
|
+
const absolutePath = (0, utils_1.resolveWorkspacePath)(file_path, context);
|
|
162
|
+
// Create parent directories if needed (for new files)
|
|
163
|
+
if (editResult.isNewFile) {
|
|
164
|
+
const dirName = path.dirname(absolutePath);
|
|
165
|
+
try {
|
|
166
|
+
await context.fsOperator.access(dirName);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
await context.fsOperator.mkdir(dirName, { recursive: true });
|
|
170
|
+
console.log(`Created parent directories for: ${file_path}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// Write the updated content
|
|
174
|
+
await context.fsOperator.writeFile(absolutePath, editResult.newContent);
|
|
175
|
+
const newLines = editResult.newContent.split("\n").length;
|
|
176
|
+
const newSize = Buffer.byteLength(editResult.newContent, "utf8");
|
|
177
|
+
return (0, utils_1.createSuccessResponse)({
|
|
178
|
+
file_path,
|
|
179
|
+
absolute_path: absolutePath,
|
|
180
|
+
is_new_file: editResult.isNewFile,
|
|
181
|
+
replacements_made: editResult.occurrences,
|
|
182
|
+
lines_total: newLines,
|
|
183
|
+
bytes_total: newSize,
|
|
184
|
+
old_string_length: old_string.length,
|
|
185
|
+
new_string_length: new_string.length,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
return (0, utils_2.handleToolError)(error, "Edit tool execution", "execution");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function createEditTool(context) {
|
|
193
|
+
return (0, utils_2.tool)((params) => editFile(context, params), {
|
|
194
|
+
name: "Edit",
|
|
195
|
+
description: "Performs exact string replacements in files with strict occurrence count validation.\n\nUsage:\n- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.",
|
|
196
|
+
schema: editParametersSchema,
|
|
197
|
+
getDisplay: ({ name, input }) => {
|
|
198
|
+
return `Using ${name} for tool call: ${input.file_path || ""}`;
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=edit-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-tool.js","sourceRoot":"","sources":["../../src/fs/edit-tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+JA,4BAsEC;AAED,wCAUC;AAjPD,+BAA2B;AAE3B,2CAA6B;AAC7B,mCAKiB;AACjB,oCAA6D;AAE7D,MAAM,oBAAoB,GAAG,MAAC,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACzE,UAAU,EAAE,MAAC;SACV,MAAM,EAAE;SACR,QAAQ,CACP,+LAA+L,CAChM;IACH,UAAU,EAAE,MAAC;SACV,MAAM,EAAE;SACR,QAAQ,CACP,iEAAiE,CAClE;IACH,qBAAqB,EAAE,MAAC;SACrB,MAAM,EAAE;SACR,GAAG,CAAC,CAA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AC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAEjE,OAAO,IAAA,6BAAqB,EAAC;YAC3B,SAAS;YACT,aAAa,EAAE,YAAY;YAC3B,WAAW,EAAE,UAAU,CAAC,SAAS;YACjC,iBAAiB,EAAE,UAAU,CAAC,WAAW;YACzC,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,OAAO;YACpB,iBAAiB,EAAE,UAAU,CAAC,MAAM;YACpC,iBAAiB,EAAE,UAAU,CAAC,MAAM;SACrC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,uBAAe,EAAC,KAAK,EAAE,qBAAqB,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,SAAgB,cAAc,CAAC,OAAyB;IACtD,OAAO,IAAA,YAAI,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;QACjD,IAAI,EAAE,MAAM;QACZ,WAAW,EACT,0iBAA0iB;QAC5iB,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAC9B,OAAO,SAAS,IAAI,mBAAmB,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC;QACjE,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { ExecutionContext } from "./utils";
|
|
3
|
+
interface GlobFileEntry {
|
|
4
|
+
path: string;
|
|
5
|
+
absolutePath: string;
|
|
6
|
+
isDirectory: boolean;
|
|
7
|
+
size: number;
|
|
8
|
+
modifiedTime: Date;
|
|
9
|
+
extension?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function createGlobTool(context: ExecutionContext): import("../utils").DynamicTool<z.ZodObject<{
|
|
12
|
+
pattern: z.ZodString;
|
|
13
|
+
path: z.ZodOptional<z.ZodString>;
|
|
14
|
+
case_sensitive: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
include_dirs: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
show_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
sort_by_time: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
}, z.core.$strip>, Record<string, unknown>, {
|
|
20
|
+
pattern: string;
|
|
21
|
+
search_path: string;
|
|
22
|
+
matches: GlobFileEntry[];
|
|
23
|
+
total_matches: number;
|
|
24
|
+
file_count: number;
|
|
25
|
+
directory_count: number;
|
|
26
|
+
summary: string;
|
|
27
|
+
truncated: boolean;
|
|
28
|
+
sorted_by_time: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=glob-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glob-tool.d.ts","sourceRoot":"","sources":["../../src/fs/glob-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EACL,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AA0CjB,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+LD,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;aAMvC,MAAM;iBACF,MAAM;aACV,aAAa,EAAE;mBACT,MAAM;gBACT,MAAM;qBACD,MAAM;aACd,MAAM;eACJ,OAAO;oBACF,OAAO;GAwF9B"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createGlobTool = createGlobTool;
|
|
37
|
+
const v4_1 = require("zod/v4");
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const utils_1 = require("./utils");
|
|
40
|
+
const utils_2 = require("../utils");
|
|
41
|
+
const globParametersSchema = v4_1.z.object({
|
|
42
|
+
pattern: v4_1.z
|
|
43
|
+
.string()
|
|
44
|
+
.describe('Glob pattern to match (e.g., "*.js", "src/**/*.ts", "**/*.{js,ts}")'),
|
|
45
|
+
path: v4_1.z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe("Directory to search in (relative to workspace root, or absolute path within workspace). Defaults to workspace root."),
|
|
49
|
+
case_sensitive: v4_1.z
|
|
50
|
+
.boolean()
|
|
51
|
+
.optional()
|
|
52
|
+
.describe("Whether the search should be case-sensitive (default: false)"),
|
|
53
|
+
include_dirs: v4_1.z
|
|
54
|
+
.boolean()
|
|
55
|
+
.optional()
|
|
56
|
+
.describe("Whether to include directories in results (default: false)"),
|
|
57
|
+
show_hidden: v4_1.z
|
|
58
|
+
.boolean()
|
|
59
|
+
.optional()
|
|
60
|
+
.describe("Whether to include hidden files/directories (starting with .)"),
|
|
61
|
+
max_results: v4_1.z
|
|
62
|
+
.number()
|
|
63
|
+
.min(1)
|
|
64
|
+
.optional()
|
|
65
|
+
.describe("Maximum number of results to return (default: 500)"),
|
|
66
|
+
sort_by_time: v4_1.z
|
|
67
|
+
.boolean()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe("Whether to sort results by modification time, newest first (default: false)"),
|
|
70
|
+
});
|
|
71
|
+
// Path validation is now handled by validateWorkspacePath in tool-utils
|
|
72
|
+
/**
|
|
73
|
+
* Convert glob pattern to regex pattern
|
|
74
|
+
*/
|
|
75
|
+
function globToRegex(pattern, caseSensitive = false) {
|
|
76
|
+
// Handle special cases for braces {js,ts}
|
|
77
|
+
let regexPattern = pattern;
|
|
78
|
+
// Handle brace expansion like {js,ts,jsx}
|
|
79
|
+
const braceRegex = /\{([^}]+)\}/g;
|
|
80
|
+
regexPattern = regexPattern.replace(braceRegex, (match, content) => {
|
|
81
|
+
const options = content.split(",").map((s) => s.trim());
|
|
82
|
+
return `(${options.join("|")})`;
|
|
83
|
+
});
|
|
84
|
+
// Escape regex special characters except glob chars
|
|
85
|
+
regexPattern = regexPattern
|
|
86
|
+
.replace(/[.+^${}()|[\]\\]/g, "\\$&") // Escape special regex chars except *, ?, and already handled {}
|
|
87
|
+
.replace(/\\\{/g, "{") // Restore { that we want to keep
|
|
88
|
+
.replace(/\\\}/g, "}") // Restore } that we want to keep
|
|
89
|
+
.replace(/\\\|/g, "|") // Restore | that we want to keep
|
|
90
|
+
.replace(/\\\(/g, "(") // Restore ( that we want to keep
|
|
91
|
+
.replace(/\\\)/g, ")"); // Restore ) that we want to keep
|
|
92
|
+
// Handle glob patterns
|
|
93
|
+
regexPattern = regexPattern
|
|
94
|
+
.replace(/\*\*/g, "###DOUBLESTAR###") // Temporarily replace **
|
|
95
|
+
.replace(/\*/g, "[^/]*") // * becomes [^/]* (match any chars except path separator)
|
|
96
|
+
.replace(/###DOUBLESTAR###/g, ".*") // ** becomes .* (match any chars including path separator)
|
|
97
|
+
.replace(/\?/g, "[^/]"); // ? becomes [^/] (match single char except path separator)
|
|
98
|
+
const flags = caseSensitive ? "" : "i";
|
|
99
|
+
return new RegExp(`^${regexPattern}$`, flags);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Check if a file should be skipped based on common patterns
|
|
103
|
+
*/
|
|
104
|
+
function shouldSkipPath(relativePath, showHidden) {
|
|
105
|
+
// Skip hidden files unless requested
|
|
106
|
+
if (!showHidden &&
|
|
107
|
+
relativePath.split("/").some((part) => part.startsWith("."))) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
// Skip common directories that should never be searched
|
|
111
|
+
const skipPatterns = [
|
|
112
|
+
/node_modules/,
|
|
113
|
+
/\.git$/,
|
|
114
|
+
/\.svn$/,
|
|
115
|
+
/\.hg$/,
|
|
116
|
+
/\.vscode$/,
|
|
117
|
+
/dist$/,
|
|
118
|
+
/build$/,
|
|
119
|
+
/coverage$/,
|
|
120
|
+
/\.nyc_output$/,
|
|
121
|
+
/\.next$/,
|
|
122
|
+
/\.cache$/,
|
|
123
|
+
];
|
|
124
|
+
return skipPatterns.some((pattern) => pattern.test(relativePath));
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Recursively find files matching the pattern
|
|
128
|
+
*/
|
|
129
|
+
async function findMatches(context, searchDir, pattern, options) {
|
|
130
|
+
const results = [];
|
|
131
|
+
const scanDirectory = async (currentDir) => {
|
|
132
|
+
if (results.length >= options.maxResults) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const entries = (await context.fsOperator.readdir(currentDir, {
|
|
137
|
+
withFileTypes: true,
|
|
138
|
+
}));
|
|
139
|
+
for (const entry of entries) {
|
|
140
|
+
if (results.length >= options.maxResults) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
const fullPath = path.join(currentDir, entry.name.toString());
|
|
144
|
+
const relativePath = path.relative(searchDir, fullPath);
|
|
145
|
+
// Skip paths that should be ignored
|
|
146
|
+
if (shouldSkipPath(relativePath, options.showHidden)) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const isDirectory = entry.isDirectory();
|
|
150
|
+
// Check if this path matches the pattern
|
|
151
|
+
const matches = pattern.test(relativePath);
|
|
152
|
+
if (matches && (options.includeDirs || !isDirectory)) {
|
|
153
|
+
try {
|
|
154
|
+
const stats = await context.fsOperator.stat(fullPath);
|
|
155
|
+
results.push({
|
|
156
|
+
path: relativePath,
|
|
157
|
+
absolutePath: fullPath,
|
|
158
|
+
isDirectory,
|
|
159
|
+
size: isDirectory ? 0 : Number(stats.size),
|
|
160
|
+
modifiedTime: stats.mtime,
|
|
161
|
+
extension: isDirectory
|
|
162
|
+
? undefined
|
|
163
|
+
: path.extname(entry.name.toString()).slice(1),
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
// Ignore stat errors and continue
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// Recursively scan subdirectories
|
|
171
|
+
if (isDirectory) {
|
|
172
|
+
await scanDirectory(fullPath);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
// Ignore permission errors and continue
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
await scanDirectory(searchDir);
|
|
181
|
+
return results;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Sort results by modification time (newest first) or alphabetically
|
|
185
|
+
*/
|
|
186
|
+
function sortResults(results, sortByTime) {
|
|
187
|
+
if (!sortByTime) {
|
|
188
|
+
// Sort alphabetically with directories first
|
|
189
|
+
return results.sort((a, b) => {
|
|
190
|
+
if (a.isDirectory && !b.isDirectory) {
|
|
191
|
+
return -1;
|
|
192
|
+
}
|
|
193
|
+
if (!a.isDirectory && b.isDirectory) {
|
|
194
|
+
return 1;
|
|
195
|
+
}
|
|
196
|
+
return a.path.localeCompare(b.path);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
// Sort by modification time (newest first) with recent files prioritized
|
|
200
|
+
const oneDayAgo = new Date().getTime() - 24 * 60 * 60 * 1000;
|
|
201
|
+
return results.sort((a, b) => {
|
|
202
|
+
const aTime = a.modifiedTime.getTime();
|
|
203
|
+
const bTime = b.modifiedTime.getTime();
|
|
204
|
+
const aIsRecent = aTime > oneDayAgo;
|
|
205
|
+
const bIsRecent = bTime > oneDayAgo;
|
|
206
|
+
// Both recent: newest first
|
|
207
|
+
if (aIsRecent && bIsRecent) {
|
|
208
|
+
return bTime - aTime;
|
|
209
|
+
}
|
|
210
|
+
// One recent: recent first
|
|
211
|
+
if (aIsRecent) {
|
|
212
|
+
return -1;
|
|
213
|
+
}
|
|
214
|
+
if (bIsRecent) {
|
|
215
|
+
return 1;
|
|
216
|
+
}
|
|
217
|
+
// Both old: alphabetical
|
|
218
|
+
return a.path.localeCompare(b.path);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
function createGlobTool(context) {
|
|
222
|
+
return (0, utils_2.tool)(async (params) => {
|
|
223
|
+
try {
|
|
224
|
+
const { pattern, path: searchPath = ".", case_sensitive = false, include_dirs = false, show_hidden = false, max_results = 500, sort_by_time = false, } = params;
|
|
225
|
+
// Validate workspace path (handles both absolute and relative paths)
|
|
226
|
+
const pathError = (0, utils_1.validateWorkspacePath)(searchPath, context);
|
|
227
|
+
if (pathError) {
|
|
228
|
+
return pathError;
|
|
229
|
+
}
|
|
230
|
+
// Resolve search directory
|
|
231
|
+
const absolutePath = (0, utils_1.resolveWorkspacePath)(searchPath, context);
|
|
232
|
+
// Check if path exists and is a directory
|
|
233
|
+
const dirError = await (0, utils_1.validateDirectoryExists)(context, absolutePath, searchPath);
|
|
234
|
+
if (dirError) {
|
|
235
|
+
return dirError;
|
|
236
|
+
}
|
|
237
|
+
// Convert glob pattern to regex
|
|
238
|
+
const regex = globToRegex(pattern, case_sensitive);
|
|
239
|
+
// Find matching files
|
|
240
|
+
const matches = await findMatches(context, absolutePath, regex, {
|
|
241
|
+
includeDirs: include_dirs,
|
|
242
|
+
showHidden: show_hidden,
|
|
243
|
+
maxResults: max_results,
|
|
244
|
+
});
|
|
245
|
+
// Sort results
|
|
246
|
+
const sortedMatches = sortResults(matches, sort_by_time);
|
|
247
|
+
// Create summary
|
|
248
|
+
const fileCount = sortedMatches.filter((m) => !m.isDirectory).length;
|
|
249
|
+
const dirCount = sortedMatches.filter((m) => m.isDirectory).length;
|
|
250
|
+
let summary = `Found ${sortedMatches.length} match(es) for pattern "${pattern}"`;
|
|
251
|
+
if (fileCount > 0 && dirCount > 0) {
|
|
252
|
+
summary += ` (${fileCount} files, ${dirCount} directories)`;
|
|
253
|
+
}
|
|
254
|
+
else if (fileCount > 0) {
|
|
255
|
+
summary += ` (${fileCount} files)`;
|
|
256
|
+
}
|
|
257
|
+
else if (dirCount > 0) {
|
|
258
|
+
summary += ` (${dirCount} directories)`;
|
|
259
|
+
}
|
|
260
|
+
if (sortedMatches.length >= max_results) {
|
|
261
|
+
summary += ` - results truncated at ${max_results}`;
|
|
262
|
+
}
|
|
263
|
+
return (0, utils_1.createSuccessResponse)({
|
|
264
|
+
pattern,
|
|
265
|
+
search_path: searchPath,
|
|
266
|
+
matches: sortedMatches,
|
|
267
|
+
total_matches: sortedMatches.length,
|
|
268
|
+
file_count: fileCount,
|
|
269
|
+
directory_count: dirCount,
|
|
270
|
+
summary,
|
|
271
|
+
truncated: sortedMatches.length >= max_results,
|
|
272
|
+
sorted_by_time: sort_by_time,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
return (0, utils_2.handleToolError)(error, "Glob tool execution", "execution");
|
|
277
|
+
}
|
|
278
|
+
}, {
|
|
279
|
+
name: "Glob",
|
|
280
|
+
description: 'Find files and directories matching glob patterns (e.g., "*.js", "src/**/*.ts"). Efficient for locating files by name or path structure.',
|
|
281
|
+
schema: globParametersSchema,
|
|
282
|
+
getDisplay: ({ name, input }) => {
|
|
283
|
+
return `Using ${name} for tool call: ${input.pattern || ""}`;
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=glob-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glob-tool.js","sourceRoot":"","sources":["../../src/fs/glob-tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyPA,wCAsGC;AA/VD,+BAA2B;AAE3B,2CAA6B;AAC7B,mCAMiB;AACjB,oCAA6D;AAI7D,MAAM,oBAAoB,GAAG,MAAC,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,qEAAqE,CACtE;IACH,IAAI,EAAE,MAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SAC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AAC;YACrC,CAAC;iBAAM,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;gBACxB,OAAO,IAAI,KAAK,QAAQ,eAAe,CAAC;YAC1C,CAAC;YAED,IAAI,aAAa,CAAC,MAAM,IAAI,WAAW,EAAE,CAAC;gBACxC,OAAO,IAAI,2BAA2B,WAAW,EAAE,CAAC;YACtD,CAAC;YAED,OAAO,IAAA,6BAAqB,EAAC;gBAC3B,OAAO;gBACP,WAAW,EAAE,UAAU;gBACvB,OAAO,EAAE,aAAa;gBACtB,aAAa,EAAE,aAAa,CAAC,MAAM;gBACnC,UAAU,EAAE,SAAS;gBACrB,eAAe,EAAE,QAAQ;gBACzB,OAAO;gBACP,SAAS,EAAE,aAAa,CAAC,MAAM,IAAI,WAAW;gBAC9C,cAAc,EAAE,YAAY;aAC7B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAA,uBAAe,EAAC,KAAK,EAAE,qBAAqB,EAAE,WAAW,CAAC,CAAC;QACpE,CAAC;IACH,CAAC,EACD;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EACT,0IAA0I;QAC5I,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAC9B,OAAO,SAAS,IAAI,mBAAmB,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;QAC/D,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { ExecutionContext } from "./utils";
|
|
3
|
+
interface GrepMatch {
|
|
4
|
+
filePath: string;
|
|
5
|
+
lineNumber: number;
|
|
6
|
+
line: string;
|
|
7
|
+
matchStart: number;
|
|
8
|
+
matchEnd: number;
|
|
9
|
+
}
|
|
10
|
+
interface GrepResult {
|
|
11
|
+
pattern: string;
|
|
12
|
+
search_path: string;
|
|
13
|
+
include_pattern?: string;
|
|
14
|
+
files_searched: number;
|
|
15
|
+
files_with_matches?: number;
|
|
16
|
+
matches: GrepMatch[];
|
|
17
|
+
matches_by_file?: Record<string, GrepMatch[]>;
|
|
18
|
+
total_matches: number;
|
|
19
|
+
summary?: string;
|
|
20
|
+
truncated?: boolean;
|
|
21
|
+
message?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createGrepTool(context: ExecutionContext): import("../utils").DynamicTool<z.ZodObject<{
|
|
24
|
+
pattern: z.ZodString;
|
|
25
|
+
path: z.ZodOptional<z.ZodString>;
|
|
26
|
+
include: z.ZodOptional<z.ZodString>;
|
|
27
|
+
case_sensitive: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
max_files: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
max_matches: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strip>, any, GrepResult>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=grep-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grep-tool.d.ts","sourceRoot":"","sources":["../../src/fs/grep-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EACL,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AAyCjB,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAiOD,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB;;;;;;;oCA8IvD"}
|