@cuylabs/agent-code 0.1.4 → 0.1.6
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.
|
@@ -509,6 +509,9 @@ var grepParameters = z5.object({
|
|
|
509
509
|
});
|
|
510
510
|
async function executeGrep(params, host, cwd, abort) {
|
|
511
511
|
const searchPath = params.path ? path4.isAbsolute(params.path) ? params.path : path4.resolve(cwd, params.path) : cwd;
|
|
512
|
+
if (!await host.exists(searchPath)) {
|
|
513
|
+
return { matches: [], truncated: false };
|
|
514
|
+
}
|
|
512
515
|
const parts = [
|
|
513
516
|
"rg",
|
|
514
517
|
"-nH",
|
package/dist/index.js
CHANGED
package/dist/tools/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Bash tool - Execute shell commands
|
|
6
|
-
* Based on OpenCode's tool/bash.ts patterns
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
8
|
declare const bashParameters: z.ZodObject<{
|
|
@@ -54,7 +53,6 @@ declare const bashTool: Tool.Info<z.ZodObject<{
|
|
|
54
53
|
|
|
55
54
|
/**
|
|
56
55
|
* Read tool - Read file contents
|
|
57
|
-
* Based on OpenCode's tool/read.ts patterns
|
|
58
56
|
*/
|
|
59
57
|
|
|
60
58
|
declare const readParameters: z.ZodObject<{
|
|
@@ -96,7 +94,6 @@ declare const readTool: Tool.Info<z.ZodObject<{
|
|
|
96
94
|
|
|
97
95
|
/**
|
|
98
96
|
* Edit tool - Edit files by replacing text
|
|
99
|
-
* Based on OpenCode's tool/edit.ts patterns
|
|
100
97
|
*/
|
|
101
98
|
|
|
102
99
|
declare const editParameters: z.ZodObject<{
|
|
@@ -144,7 +141,6 @@ declare const editTool: Tool.Info<z.ZodObject<{
|
|
|
144
141
|
|
|
145
142
|
/**
|
|
146
143
|
* Write tool - Create or overwrite files
|
|
147
|
-
* Based on OpenCode's tool/write.ts patterns
|
|
148
144
|
*/
|
|
149
145
|
|
|
150
146
|
declare const writeParameters: z.ZodObject<{
|
|
@@ -179,7 +175,6 @@ declare const writeTool: Tool.Info<z.ZodObject<{
|
|
|
179
175
|
|
|
180
176
|
/**
|
|
181
177
|
* Grep tool - Search file contents
|
|
182
|
-
* Based on OpenCode's tool/grep.ts patterns
|
|
183
178
|
*/
|
|
184
179
|
|
|
185
180
|
declare const grepParameters: z.ZodObject<{
|
|
@@ -229,7 +224,6 @@ declare const grepTool: Tool.Info<z.ZodObject<{
|
|
|
229
224
|
|
|
230
225
|
/**
|
|
231
226
|
* Glob tool - Find files by pattern
|
|
232
|
-
* Based on OpenCode's tool/glob.ts patterns
|
|
233
227
|
*/
|
|
234
228
|
|
|
235
229
|
declare const globParameters: z.ZodObject<{
|
package/dist/tools/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuylabs/agent-code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Embeddable AI coding agent built on @cuylabs/agent-core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"ai": "^6.0.67",
|
|
26
26
|
"zod": "^3.24.0",
|
|
27
|
-
"@cuylabs/agent-core": "^0.
|
|
27
|
+
"@cuylabs/agent-core": "^0.4.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@ai-sdk/anthropic": "^3.0.0",
|