@travisennis/acai 0.0.11 → 0.0.12
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/README.md +2 -3
- package/dist/commands/init-project/utils.d.ts.map +1 -1
- package/dist/commands/init-project/utils.js +0 -11
- package/dist/commands/manager.d.ts.map +1 -1
- package/dist/commands/manager.js +6 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +4 -1
- package/dist/commands/session/index.d.ts.map +1 -1
- package/dist/commands/session/index.js +6 -0
- package/dist/commands/session/types.d.ts +1 -0
- package/dist/commands/session/types.d.ts.map +1 -1
- package/dist/commands/tools/index.d.ts +3 -0
- package/dist/commands/tools/index.d.ts.map +1 -0
- package/dist/commands/tools/index.js +190 -0
- package/dist/commands/tools/templates.d.ts +6 -0
- package/dist/commands/tools/templates.d.ts.map +1 -0
- package/dist/commands/tools/templates.js +97 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +41 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/models/anthropic-provider.d.ts +1 -1
- package/dist/models/deepseek-provider.d.ts +3 -3
- package/dist/models/deepseek-provider.js +17 -17
- package/dist/models/google-provider.d.ts +2 -4
- package/dist/models/google-provider.d.ts.map +1 -1
- package/dist/models/google-provider.js +2 -17
- package/dist/models/groq-provider.d.ts +2 -4
- package/dist/models/groq-provider.d.ts.map +1 -1
- package/dist/models/groq-provider.js +3 -21
- package/dist/models/opencode-go-provider.d.ts +11 -1
- package/dist/models/opencode-go-provider.d.ts.map +1 -1
- package/dist/models/opencode-go-provider.js +136 -0
- package/dist/models/opencode-zen-provider.d.ts +3 -3
- package/dist/models/opencode-zen-provider.d.ts.map +1 -1
- package/dist/models/opencode-zen-provider.js +26 -32
- package/dist/models/openrouter-provider.d.ts +4 -15
- package/dist/models/openrouter-provider.d.ts.map +1 -1
- package/dist/models/openrouter-provider.js +26 -169
- package/dist/models/providers.d.ts +1 -1
- package/dist/models/providers.d.ts.map +1 -1
- package/dist/models/xai-provider.d.ts +1 -2
- package/dist/models/xai-provider.d.ts.map +1 -1
- package/dist/models/xai-provider.js +0 -13
- package/dist/prompts/manager.d.ts.map +1 -1
- package/dist/prompts/manager.js +5 -1
- package/dist/prompts/system-prompt.d.ts +1 -0
- package/dist/prompts/system-prompt.d.ts.map +1 -1
- package/dist/prompts/system-prompt.js +20 -5
- package/dist/repl/index.d.ts +1 -2
- package/dist/repl/index.d.ts.map +1 -1
- package/dist/repl/index.js +5 -52
- package/dist/skills/activated-tracker.d.ts +11 -0
- package/dist/skills/activated-tracker.d.ts.map +1 -0
- package/dist/skills/activated-tracker.js +16 -0
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +7 -1
- package/dist/tools/bash.d.ts +4 -4
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +17 -6
- package/dist/tools/directory-tree.d.ts +4 -4
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +2 -0
- package/dist/tools/dynamic-tool-loader.d.ts +11 -2
- package/dist/tools/dynamic-tool-loader.d.ts.map +1 -1
- package/dist/tools/dynamic-tool-loader.js +299 -39
- package/dist/tools/edit-file.d.ts +2 -2
- package/dist/tools/glob.d.ts +16 -16
- package/dist/tools/glob.d.ts.map +1 -1
- package/dist/tools/glob.js +9 -1
- package/dist/tools/grep.d.ts +14 -14
- package/dist/tools/grep.d.ts.map +1 -1
- package/dist/tools/grep.js +7 -0
- package/dist/tools/index.d.ts +42 -36
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +16 -1
- package/dist/tools/ls.d.ts +2 -2
- package/dist/tools/ls.d.ts.map +1 -1
- package/dist/tools/ls.js +1 -0
- package/dist/tools/read-file.d.ts +8 -8
- package/dist/tools/save-file.d.ts +4 -4
- package/dist/tools/skill.d.ts +2 -1
- package/dist/tools/skill.d.ts.map +1 -1
- package/dist/tools/skill.js +55 -12
- package/dist/tools/types.d.ts +8 -2
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/web-fetch.d.ts +6 -6
- package/dist/tools/web-fetch.d.ts.map +1 -1
- package/dist/tools/web-fetch.js +27 -8
- package/dist/tools/web-search.d.ts +4 -4
- package/dist/tools/web-search.js +1 -1
- package/dist/tui/components/footer.d.ts +0 -2
- package/dist/tui/components/footer.d.ts.map +1 -1
- package/dist/tui/components/footer.js +1 -17
- package/dist/utils/binary-output.d.ts +32 -0
- package/dist/utils/binary-output.d.ts.map +1 -0
- package/dist/utils/binary-output.js +127 -0
- package/dist/utils/command-protection.d.ts.map +1 -1
- package/dist/utils/command-protection.js +92 -9
- package/dist/utils/parsing.d.ts +1 -1
- package/dist/utils/parsing.d.ts.map +1 -1
- package/package.json +27 -25
- package/dist/modes/manager.d.ts +0 -24
- package/dist/modes/manager.d.ts.map +0 -1
- package/dist/modes/manager.js +0 -77
- package/dist/modes/prompts.d.ts +0 -2
- package/dist/modes/prompts.d.ts.map +0 -1
- package/dist/modes/prompts.js +0 -142
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AsyncReturnType } from "@travisennis/stdlib/types";
|
|
2
2
|
import type { Tool } from "ai";
|
|
3
3
|
import type { WorkspaceContext } from "../index.ts";
|
|
4
|
+
import { ActivatedSkillsTracker } from "../skills/activated-tracker.ts";
|
|
4
5
|
export type CompleteToolSet = {
|
|
5
6
|
-readonly [K in keyof AsyncReturnType<typeof initTools>]: AsyncReturnType<typeof initTools>[K];
|
|
6
7
|
};
|
|
@@ -8,6 +9,11 @@ export type CompleteTools = {
|
|
|
8
9
|
-readonly [K in keyof AsyncReturnType<typeof initTools>]: Tool<unknown, string>;
|
|
9
10
|
};
|
|
10
11
|
export type CompleteToolNames = keyof CompleteToolSet;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the activated skills tracker instance.
|
|
14
|
+
* Used to reset the tracker when a new session starts.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getActivatedSkillsTracker(): ActivatedSkillsTracker;
|
|
11
17
|
export declare function initTools({ workspace, }: {
|
|
12
18
|
workspace: WorkspaceContext;
|
|
13
19
|
}): Promise<{
|
|
@@ -30,7 +36,7 @@ export declare function initTools({ workspace, }: {
|
|
|
30
36
|
description: string;
|
|
31
37
|
inputSchema: import("zod").ZodObject<{
|
|
32
38
|
path: import("zod").ZodString;
|
|
33
|
-
edits: import("zod").
|
|
39
|
+
edits: import("zod").ZodPreprocess<import("zod").ZodArray<import("zod").ZodObject<{
|
|
34
40
|
oldText: import("zod").ZodString;
|
|
35
41
|
newText: import("zod").ZodString;
|
|
36
42
|
}, import("zod/v4/core").$strip>>>;
|
|
@@ -56,8 +62,8 @@ export declare function initTools({ workspace, }: {
|
|
|
56
62
|
description: string;
|
|
57
63
|
inputSchema: import("zod").ZodObject<{
|
|
58
64
|
command: import("zod").ZodString;
|
|
59
|
-
cwd: import("zod").
|
|
60
|
-
timeout: import("zod").
|
|
65
|
+
cwd: import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
66
|
+
timeout: import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>;
|
|
61
67
|
background: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
62
68
|
}, import("zod/v4/core").$strip>;
|
|
63
69
|
};
|
|
@@ -81,14 +87,14 @@ export declare function initTools({ workspace, }: {
|
|
|
81
87
|
path: import("zod").ZodString;
|
|
82
88
|
content: import("zod").ZodString;
|
|
83
89
|
encoding: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
90
|
+
base64: "base64";
|
|
91
|
+
base64url: "base64url";
|
|
84
92
|
utf8: "utf8";
|
|
85
93
|
ascii: "ascii";
|
|
86
94
|
"utf-8": "utf-8";
|
|
87
95
|
utf16le: "utf16le";
|
|
88
96
|
ucs2: "ucs2";
|
|
89
97
|
"ucs-2": "ucs-2";
|
|
90
|
-
base64: "base64";
|
|
91
|
-
base64url: "base64url";
|
|
92
98
|
latin1: "latin1";
|
|
93
99
|
binary: "binary";
|
|
94
100
|
hex: "hex";
|
|
@@ -98,12 +104,12 @@ export declare function initTools({ workspace, }: {
|
|
|
98
104
|
display({ path }: {
|
|
99
105
|
path: string;
|
|
100
106
|
content: string;
|
|
101
|
-
encoding: "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "
|
|
107
|
+
encoding: "base64" | "base64url" | "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "latin1" | "binary" | "hex";
|
|
102
108
|
}): string;
|
|
103
109
|
execute({ path: userPath, content, encoding }: {
|
|
104
110
|
path: string;
|
|
105
111
|
content: string;
|
|
106
|
-
encoding: "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "
|
|
112
|
+
encoding: "base64" | "base64url" | "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "latin1" | "binary" | "hex";
|
|
107
113
|
}, { abortSignal }: import("./types.ts").ToolExecutionOptions): Promise<string>;
|
|
108
114
|
};
|
|
109
115
|
readonly Read: {
|
|
@@ -112,31 +118,31 @@ export declare function initTools({ workspace, }: {
|
|
|
112
118
|
inputSchema: import("zod").ZodObject<{
|
|
113
119
|
path: import("zod").ZodString;
|
|
114
120
|
encoding: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
121
|
+
base64: "base64";
|
|
122
|
+
base64url: "base64url";
|
|
115
123
|
utf8: "utf8";
|
|
116
124
|
ascii: "ascii";
|
|
117
125
|
"utf-8": "utf-8";
|
|
118
126
|
utf16le: "utf16le";
|
|
119
127
|
ucs2: "ucs2";
|
|
120
128
|
"ucs-2": "ucs-2";
|
|
121
|
-
base64: "base64";
|
|
122
|
-
base64url: "base64url";
|
|
123
129
|
latin1: "latin1";
|
|
124
130
|
binary: "binary";
|
|
125
131
|
hex: "hex";
|
|
126
132
|
}>>>;
|
|
127
|
-
startLine: import("zod").
|
|
128
|
-
lineCount: import("zod").
|
|
133
|
+
startLine: import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>;
|
|
134
|
+
lineCount: import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>;
|
|
129
135
|
}, import("zod/v4/core").$strip>;
|
|
130
136
|
};
|
|
131
137
|
display({ path: providedPath, startLine, lineCount }: {
|
|
132
138
|
path: string;
|
|
133
|
-
encoding: "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "
|
|
139
|
+
encoding: "base64" | "base64url" | "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "latin1" | "binary" | "hex" | null;
|
|
134
140
|
startLine: number | null;
|
|
135
141
|
lineCount: number | null;
|
|
136
142
|
}): string;
|
|
137
143
|
execute({ path: providedPath, encoding, startLine, lineCount, }: {
|
|
138
144
|
path: string;
|
|
139
|
-
encoding: "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "
|
|
145
|
+
encoding: "base64" | "base64url" | "utf8" | "ascii" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "latin1" | "binary" | "hex" | null;
|
|
140
146
|
startLine: number | null;
|
|
141
147
|
lineCount: number | null;
|
|
142
148
|
}, { abortSignal }: import("./types.ts").ToolExecutionOptions): Promise<string>;
|
|
@@ -145,14 +151,14 @@ export declare function initTools({ workspace, }: {
|
|
|
145
151
|
toolDef: {
|
|
146
152
|
description: string;
|
|
147
153
|
inputSchema: import("zod").ZodObject<{
|
|
148
|
-
patterns: import("zod").
|
|
149
|
-
path: import("zod").
|
|
150
|
-
gitignore: import("zod").
|
|
151
|
-
recursive: import("zod").
|
|
152
|
-
expandDirectories: import("zod").
|
|
153
|
-
ignoreFiles: import("zod").
|
|
154
|
-
cwd: import("zod").
|
|
155
|
-
maxResults: import("zod").
|
|
154
|
+
patterns: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>>;
|
|
155
|
+
path: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodString>>;
|
|
156
|
+
gitignore: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
157
|
+
recursive: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
158
|
+
expandDirectories: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
159
|
+
ignoreFiles: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>>>;
|
|
160
|
+
cwd: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedString<unknown>>>>;
|
|
161
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
156
162
|
}, import("zod/v4/core").$strip>;
|
|
157
163
|
};
|
|
158
164
|
display({ patterns, path }: {
|
|
@@ -182,13 +188,13 @@ export declare function initTools({ workspace, }: {
|
|
|
182
188
|
inputSchema: import("zod").ZodObject<{
|
|
183
189
|
pattern: import("zod").ZodString;
|
|
184
190
|
path: import("zod").ZodString;
|
|
185
|
-
recursive: import("zod").
|
|
186
|
-
ignoreCase: import("zod").
|
|
187
|
-
filePattern: import("zod").
|
|
188
|
-
contextLines: import("zod").
|
|
189
|
-
searchIgnored: import("zod").
|
|
190
|
-
literal: import("zod").
|
|
191
|
-
maxResults: import("zod").
|
|
191
|
+
recursive: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
192
|
+
ignoreCase: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
193
|
+
filePattern: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedString<unknown>>>>;
|
|
194
|
+
contextLines: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
195
|
+
searchIgnored: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
196
|
+
literal: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
197
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
192
198
|
}, import("zod/v4/core").$strip>;
|
|
193
199
|
};
|
|
194
200
|
display({ pattern, path, filePattern, recursive, ignoreCase, contextLines, }: {
|
|
@@ -219,8 +225,8 @@ export declare function initTools({ workspace, }: {
|
|
|
219
225
|
description: string;
|
|
220
226
|
inputSchema: import("zod").ZodObject<{
|
|
221
227
|
path: import("zod").ZodString;
|
|
222
|
-
maxResults: import("zod").
|
|
223
|
-
maxDepth: import("zod").
|
|
228
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
229
|
+
maxDepth: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
224
230
|
}, import("zod/v4/core").$strip>;
|
|
225
231
|
};
|
|
226
232
|
display({ path, maxDepth, maxResults }: {
|
|
@@ -251,7 +257,7 @@ export declare function initTools({ workspace, }: {
|
|
|
251
257
|
description: string;
|
|
252
258
|
inputSchema: import("zod").ZodObject<{
|
|
253
259
|
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
254
|
-
limit: import("zod").
|
|
260
|
+
limit: import("zod").ZodDefault<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
255
261
|
}, import("zod/v4/core").$strip>;
|
|
256
262
|
};
|
|
257
263
|
display({ path: providedPath, limit }: {
|
|
@@ -305,8 +311,8 @@ export declare function initTools({ workspace, }: {
|
|
|
305
311
|
description: string;
|
|
306
312
|
inputSchema: import("zod").ZodObject<{
|
|
307
313
|
query: import("zod").ZodString;
|
|
308
|
-
numResults: import("zod").ZodOptional<import("zod").
|
|
309
|
-
timeout: import("zod").ZodOptional<import("zod").
|
|
314
|
+
numResults: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
315
|
+
timeout: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
310
316
|
provider: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
311
317
|
exa: "exa";
|
|
312
318
|
duckduckgo: "duckduckgo";
|
|
@@ -337,9 +343,9 @@ export declare function initTools({ workspace, }: {
|
|
|
337
343
|
html: "html";
|
|
338
344
|
json: "json";
|
|
339
345
|
}>>;
|
|
340
|
-
jina: import("zod").ZodOptional<import("zod").
|
|
341
|
-
timeout: import("zod").ZodOptional<import("zod").
|
|
342
|
-
headers: import("zod").ZodOptional<import("zod").
|
|
346
|
+
jina: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
347
|
+
timeout: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedNumber<unknown>>>>;
|
|
348
|
+
headers: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNullable<import("zod").ZodCoercedBoolean<unknown>>>>;
|
|
343
349
|
}, import("zod/v4/core").$strip>;
|
|
344
350
|
};
|
|
345
351
|
display({ url }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAoBxE,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,UAAU,CAAC,IAAI,MAAM,eAAe,CAAC,OAAO,SAAS,CAAC,GAAG,eAAe,CACvE,OAAO,SAAS,CACjB,CAAC,CAAC,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,UAAU,CAAC,IAAI,MAAM,eAAe,CAAC,OAAO,SAAS,CAAC,GAAG,IAAI,CAC5D,OAAO,EACP,MAAM,CACP;CACF,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,eAAe,CAAC;AAKtD;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,sBAAsB,CAElE;AAED,wBAAsB,SAAS,CAAC,EAC9B,SAAS,GACV,EAAE;IACD,SAAS,EAAE,gBAAgB,CAAC;CAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EA"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { config } from "../config/index.js";
|
|
2
|
+
import { ActivatedSkillsTracker } from "../skills/activated-tracker.js";
|
|
2
3
|
import { AgentTool, createAgentTools } from "./agent.js";
|
|
3
4
|
import { ApplyPatchTool, createApplyPatchTool } from "./apply-patch.js";
|
|
4
5
|
import { BashTool, createBashTool } from "./bash.js";
|
|
@@ -14,6 +15,15 @@ import { createSkillTool, SkillTool } from "./skill.js";
|
|
|
14
15
|
import { createThinkTool, ThinkTool } from "./think.js";
|
|
15
16
|
import { createWebFetchTool, WebFetchTool } from "./web-fetch.js";
|
|
16
17
|
import { createWebSearchTool, WebSearchTool } from "./web-search.js";
|
|
18
|
+
// Singleton tracker for activated skills, reset when a new session starts
|
|
19
|
+
const activatedSkillsTracker = new ActivatedSkillsTracker();
|
|
20
|
+
/**
|
|
21
|
+
* Returns the activated skills tracker instance.
|
|
22
|
+
* Used to reset the tracker when a new session starts.
|
|
23
|
+
*/
|
|
24
|
+
export function getActivatedSkillsTracker() {
|
|
25
|
+
return activatedSkillsTracker;
|
|
26
|
+
}
|
|
17
27
|
export async function initTools({ workspace, }) {
|
|
18
28
|
const readFileTool = await createReadFileTool({ workspace });
|
|
19
29
|
const editFileTool = await createEditFileTool({ workspace });
|
|
@@ -25,7 +35,7 @@ export async function initTools({ workspace, }) {
|
|
|
25
35
|
const lsTool = await createLsTool({ workspace });
|
|
26
36
|
const projectConfig = await config.getConfig();
|
|
27
37
|
const bashTool = await createBashTool({ workspace, env: projectConfig.env });
|
|
28
|
-
const skillTool = await createSkillTool();
|
|
38
|
+
const skillTool = await createSkillTool(activatedSkillsTracker);
|
|
29
39
|
const agentTool = await createAgentTools({ workspace });
|
|
30
40
|
const webSearchTool = await createWebSearchTool();
|
|
31
41
|
const webFetchTool = await createWebFetchTool();
|
|
@@ -48,6 +58,11 @@ export async function initTools({ workspace, }) {
|
|
|
48
58
|
WebSearchTool.name,
|
|
49
59
|
WebFetchTool.name,
|
|
50
60
|
],
|
|
61
|
+
sessionContext: {
|
|
62
|
+
sessionId: "",
|
|
63
|
+
projectDir: workspace.primaryDir,
|
|
64
|
+
agentName: "repl",
|
|
65
|
+
},
|
|
51
66
|
});
|
|
52
67
|
// Build tools object for AI SDK
|
|
53
68
|
const tools = {
|
package/dist/tools/ls.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const LsTool: {
|
|
|
6
6
|
};
|
|
7
7
|
declare const inputSchema: z.ZodObject<{
|
|
8
8
|
path: z.ZodOptional<z.ZodString>;
|
|
9
|
-
limit: z.
|
|
9
|
+
limit: z.ZodDefault<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
type LsInputSchema = z.infer<typeof inputSchema>;
|
|
12
12
|
export declare const createLsTool: (options: {
|
|
@@ -16,7 +16,7 @@ export declare const createLsTool: (options: {
|
|
|
16
16
|
description: string;
|
|
17
17
|
inputSchema: z.ZodObject<{
|
|
18
18
|
path: z.ZodOptional<z.ZodString>;
|
|
19
|
-
limit: z.
|
|
19
|
+
limit: z.ZodDefault<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>>;
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
};
|
|
22
22
|
display({ path: providedPath, limit }: LsInputSchema): string;
|
package/dist/tools/ls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../source/tools/ls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,QAAA,MAAM,WAAW;;;
|
|
1
|
+
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../source/tools/ls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,QAAA,MAAM,WAAW;;;iBASf,CAAC;AAEH,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAIjD,eAAO,MAAM,YAAY,GAAU,SAAS;IAC1C,SAAS,EAAE,gBAAgB,CAAC;CAC7B;;;;;;;;2CAU0C,aAAa;2CAOnB,aAAa,mBAC3B,oBAAoB,GACpC,OAAO,CAAC,MAAM,CAAC;EA6DrB,CAAC"}
|
package/dist/tools/ls.js
CHANGED
|
@@ -16,6 +16,7 @@ const inputSchema = z.object({
|
|
|
16
16
|
.describe("Directory to list (default: current directory)"),
|
|
17
17
|
limit: z
|
|
18
18
|
.preprocess((val) => convertNullString(val), z.coerce.number().nullable())
|
|
19
|
+
.default(null)
|
|
19
20
|
.describe("Maximum number of entries to return (default: 500)"),
|
|
20
21
|
});
|
|
21
22
|
const DEFAULT_ENTRY_LIMIT = 500;
|
|
@@ -7,20 +7,20 @@ export declare const ReadFileTool: {
|
|
|
7
7
|
declare const inputSchema: z.ZodObject<{
|
|
8
8
|
path: z.ZodString;
|
|
9
9
|
encoding: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
10
|
+
base64: "base64";
|
|
11
|
+
base64url: "base64url";
|
|
10
12
|
utf8: "utf8";
|
|
11
13
|
ascii: "ascii";
|
|
12
14
|
"utf-8": "utf-8";
|
|
13
15
|
utf16le: "utf16le";
|
|
14
16
|
ucs2: "ucs2";
|
|
15
17
|
"ucs-2": "ucs-2";
|
|
16
|
-
base64: "base64";
|
|
17
|
-
base64url: "base64url";
|
|
18
18
|
latin1: "latin1";
|
|
19
19
|
binary: "binary";
|
|
20
20
|
hex: "hex";
|
|
21
21
|
}>>>;
|
|
22
|
-
startLine: z.
|
|
23
|
-
lineCount: z.
|
|
22
|
+
startLine: z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
23
|
+
lineCount: z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
type ReadFileInputSchema = z.infer<typeof inputSchema>;
|
|
26
26
|
export declare const createReadFileTool: (options: {
|
|
@@ -31,20 +31,20 @@ export declare const createReadFileTool: (options: {
|
|
|
31
31
|
inputSchema: z.ZodObject<{
|
|
32
32
|
path: z.ZodString;
|
|
33
33
|
encoding: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
34
|
+
base64: "base64";
|
|
35
|
+
base64url: "base64url";
|
|
34
36
|
utf8: "utf8";
|
|
35
37
|
ascii: "ascii";
|
|
36
38
|
"utf-8": "utf-8";
|
|
37
39
|
utf16le: "utf16le";
|
|
38
40
|
ucs2: "ucs2";
|
|
39
41
|
"ucs-2": "ucs-2";
|
|
40
|
-
base64: "base64";
|
|
41
|
-
base64url: "base64url";
|
|
42
42
|
latin1: "latin1";
|
|
43
43
|
binary: "binary";
|
|
44
44
|
hex: "hex";
|
|
45
45
|
}>>>;
|
|
46
|
-
startLine: z.
|
|
47
|
-
lineCount: z.
|
|
46
|
+
startLine: z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
47
|
+
lineCount: z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
};
|
|
50
50
|
display({ path: providedPath, startLine, lineCount }: ReadFileInputSchema): string;
|
|
@@ -8,14 +8,14 @@ declare const inputSchema: z.ZodObject<{
|
|
|
8
8
|
path: z.ZodString;
|
|
9
9
|
content: z.ZodString;
|
|
10
10
|
encoding: z.ZodDefault<z.ZodEnum<{
|
|
11
|
+
base64: "base64";
|
|
12
|
+
base64url: "base64url";
|
|
11
13
|
utf8: "utf8";
|
|
12
14
|
ascii: "ascii";
|
|
13
15
|
"utf-8": "utf-8";
|
|
14
16
|
utf16le: "utf16le";
|
|
15
17
|
ucs2: "ucs2";
|
|
16
18
|
"ucs-2": "ucs-2";
|
|
17
|
-
base64: "base64";
|
|
18
|
-
base64url: "base64url";
|
|
19
19
|
latin1: "latin1";
|
|
20
20
|
binary: "binary";
|
|
21
21
|
hex: "hex";
|
|
@@ -31,14 +31,14 @@ export declare const createSaveFileTool: (options: {
|
|
|
31
31
|
path: z.ZodString;
|
|
32
32
|
content: z.ZodString;
|
|
33
33
|
encoding: z.ZodDefault<z.ZodEnum<{
|
|
34
|
+
base64: "base64";
|
|
35
|
+
base64url: "base64url";
|
|
34
36
|
utf8: "utf8";
|
|
35
37
|
ascii: "ascii";
|
|
36
38
|
"utf-8": "utf-8";
|
|
37
39
|
utf16le: "utf16le";
|
|
38
40
|
ucs2: "ucs2";
|
|
39
41
|
"ucs-2": "ucs-2";
|
|
40
|
-
base64: "base64";
|
|
41
|
-
base64url: "base64url";
|
|
42
42
|
latin1: "latin1";
|
|
43
43
|
binary: "binary";
|
|
44
44
|
hex: "hex";
|
package/dist/tools/skill.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { ActivatedSkillsTracker } from "../skills/activated-tracker.ts";
|
|
2
3
|
import type { ToolExecutionOptions } from "./types.ts";
|
|
3
4
|
export declare const SkillTool: {
|
|
4
5
|
name: "Skill";
|
|
@@ -8,7 +9,7 @@ declare const inputSchema: z.ZodObject<{
|
|
|
8
9
|
args: z.ZodOptional<z.ZodString>;
|
|
9
10
|
}, z.core.$strip>;
|
|
10
11
|
type SkillInputSchema = z.infer<typeof inputSchema>;
|
|
11
|
-
export declare function createSkillTool(): Promise<{
|
|
12
|
+
export declare function createSkillTool(activatedSkillsTracker: ActivatedSkillsTracker): Promise<{
|
|
12
13
|
toolDef: {
|
|
13
14
|
description: string;
|
|
14
15
|
inputSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../source/tools/skill.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../source/tools/skill.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAI7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,QAAA,MAAM,WAAW;;;iBAKf,CAAC;AAEH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AA+BpD,wBAAsB,eAAe,CACnC,sBAAsB,EAAE,sBAAsB;;;;;;;;kCAcd,gBAAgB,GAAG,MAAM;wCAIzB,gBAAgB,mBAC3B,oBAAoB,GACpC,OAAO,CAAC,MAAM,CAAC;GA8DrB"}
|
package/dist/tools/skill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { dirname } from "node:path";
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
3
2
|
import { z } from "zod";
|
|
3
|
+
import { config, parseSkillsPath } from "../config/index.js";
|
|
4
4
|
import { loadSkills } from "../skills/index.js";
|
|
5
5
|
import style from "../terminal/style.js";
|
|
6
6
|
import { replaceArgumentPlaceholders } from "../utils/templates.js";
|
|
@@ -13,8 +13,37 @@ const inputSchema = z.object({
|
|
|
13
13
|
.describe('The skill name. E.g., "commit", "review-pr", or "pdf"'),
|
|
14
14
|
args: z.string().optional().describe("Optional arguments for the skill"),
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* List resources (files and directories) in a skill directory.
|
|
18
|
+
* Returns relative paths, excluding SKILL.md and hidden files.
|
|
19
|
+
*/
|
|
20
|
+
async function listSkillResources(baseDir) {
|
|
21
|
+
try {
|
|
22
|
+
const entries = await readdir(baseDir, { withFileTypes: true });
|
|
23
|
+
const resources = [];
|
|
24
|
+
for (const entry of entries) {
|
|
25
|
+
// Skip SKILL.md (already included in body)
|
|
26
|
+
if (entry.name === "SKILL.md")
|
|
27
|
+
continue;
|
|
28
|
+
// Skip hidden files
|
|
29
|
+
if (entry.name.startsWith("."))
|
|
30
|
+
continue;
|
|
31
|
+
resources.push(entry.name);
|
|
32
|
+
}
|
|
33
|
+
// Sort for consistent output
|
|
34
|
+
resources.sort();
|
|
35
|
+
// Cap at 50 files to avoid overwhelming output
|
|
36
|
+
return resources.slice(0, 50);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// Directory read failed, return empty
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export async function createSkillTool(activatedSkillsTracker) {
|
|
44
|
+
const appConfig = await config.getConfig();
|
|
45
|
+
const skillPaths = parseSkillsPath(appConfig.skills.path);
|
|
46
|
+
const skills = await loadSkills(skillPaths);
|
|
18
47
|
const modelInvocableSkills = skills.getModelInvocable();
|
|
19
48
|
const description = "Run a skill (e.g., commit, review-pr).";
|
|
20
49
|
return {
|
|
@@ -30,35 +59,49 @@ export async function createSkillTool() {
|
|
|
30
59
|
if (abortSignal?.aborted) {
|
|
31
60
|
throw new Error("Skill execution aborted");
|
|
32
61
|
}
|
|
62
|
+
// Check for deduplication
|
|
63
|
+
if (activatedSkillsTracker.has(skillName)) {
|
|
64
|
+
return `Skill "${skillName}" is already loaded in this session. Its instructions are available in the conversation context.`;
|
|
65
|
+
}
|
|
33
66
|
// Find the skill
|
|
34
67
|
const skill = modelInvocableSkills.find((s) => s.name === skillName);
|
|
35
68
|
if (!skill) {
|
|
36
69
|
const availableSkillNames = modelInvocableSkills
|
|
37
70
|
.map((s) => s.name)
|
|
38
71
|
.join(", ");
|
|
39
|
-
|
|
40
|
-
return errorMsg;
|
|
72
|
+
return `Skill "${skillName}" not found. Available skills: ${availableSkillNames}`;
|
|
41
73
|
}
|
|
42
74
|
if (skill.disableModelInvocation) {
|
|
43
75
|
return `Skill "${skillName}" is not available for model invocation.`;
|
|
44
76
|
}
|
|
45
77
|
// Read the skill file
|
|
46
78
|
const content = await readFile(skill.filePath, "utf8");
|
|
47
|
-
let result = `# Skill Name: ${skill.name}`;
|
|
48
|
-
result += `\n**Base directory**: ${dirname(skill.filePath)}\n\n`;
|
|
49
|
-
result +=
|
|
50
|
-
"Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.\n";
|
|
51
79
|
// Parse frontmatter and body
|
|
52
80
|
const yamlStart = content.indexOf("---");
|
|
53
81
|
const yamlEnd = content.indexOf("---", yamlStart + 3);
|
|
54
82
|
const body = yamlEnd !== -1 ? content.slice(yamlEnd + 3).trim() : content;
|
|
83
|
+
// List resources in skill directory
|
|
84
|
+
const resources = await listSkillResources(skill.baseDir);
|
|
85
|
+
// Build result
|
|
86
|
+
let result = `# Skill: ${skill.name}\n\n`;
|
|
87
|
+
result += `**Base directory**: ${skill.baseDir}\n\n`;
|
|
88
|
+
if (resources.length > 0) {
|
|
89
|
+
result += "<skill_resources>\n";
|
|
90
|
+
for (const resource of resources) {
|
|
91
|
+
result += `${resource}\n`;
|
|
92
|
+
}
|
|
93
|
+
result += "</skill_resources>\n\n";
|
|
94
|
+
result +=
|
|
95
|
+
"Relative paths in this skill are relative to the base directory.\n\n";
|
|
96
|
+
}
|
|
55
97
|
const argsArray = args ? args.split(/\s+/).filter(Boolean) : [];
|
|
56
98
|
result += replaceArgumentPlaceholders(body, argsArray);
|
|
99
|
+
// Mark as activated
|
|
100
|
+
activatedSkillsTracker.add(skillName);
|
|
57
101
|
return result;
|
|
58
102
|
}
|
|
59
103
|
catch (error) {
|
|
60
|
-
|
|
61
|
-
return errorMsg;
|
|
104
|
+
return error.message;
|
|
62
105
|
}
|
|
63
106
|
},
|
|
64
107
|
};
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const fileEncodingSchema: z.ZodEnum<{
|
|
3
|
+
base64: "base64";
|
|
4
|
+
base64url: "base64url";
|
|
3
5
|
utf8: "utf8";
|
|
4
6
|
ascii: "ascii";
|
|
5
7
|
"utf-8": "utf-8";
|
|
6
8
|
utf16le: "utf16le";
|
|
7
9
|
ucs2: "ucs2";
|
|
8
10
|
"ucs-2": "ucs-2";
|
|
9
|
-
base64: "base64";
|
|
10
|
-
base64url: "base64url";
|
|
11
11
|
latin1: "latin1";
|
|
12
12
|
binary: "binary";
|
|
13
13
|
hex: "hex";
|
|
14
14
|
}>;
|
|
15
|
+
export type SessionContext = {
|
|
16
|
+
sessionId: string;
|
|
17
|
+
projectDir: string;
|
|
18
|
+
agentName: string;
|
|
19
|
+
};
|
|
15
20
|
export type ToolExecutionOptions = {
|
|
16
21
|
toolCallId: string;
|
|
17
22
|
messages?: any[];
|
|
18
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
sessionContext?: SessionContext;
|
|
19
25
|
};
|
|
20
26
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../source/tools/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAY7B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../source/tools/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAY7B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC"}
|
|
@@ -14,9 +14,9 @@ declare const inputSchema: z.ZodObject<{
|
|
|
14
14
|
html: "html";
|
|
15
15
|
json: "json";
|
|
16
16
|
}>>;
|
|
17
|
-
jina: z.ZodOptional<z.
|
|
18
|
-
timeout: z.ZodOptional<z.
|
|
19
|
-
headers: z.ZodOptional<z.
|
|
17
|
+
jina: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedBoolean<unknown>>>>;
|
|
18
|
+
timeout: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>>;
|
|
19
|
+
headers: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedBoolean<unknown>>>>;
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
type WebFetchInputSchema = z.infer<typeof inputSchema>;
|
|
22
22
|
/**
|
|
@@ -37,9 +37,9 @@ export declare const createWebFetchTool: () => Promise<{
|
|
|
37
37
|
html: "html";
|
|
38
38
|
json: "json";
|
|
39
39
|
}>>;
|
|
40
|
-
jina: z.ZodOptional<z.
|
|
41
|
-
timeout: z.ZodOptional<z.
|
|
42
|
-
headers: z.ZodOptional<z.
|
|
40
|
+
jina: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedBoolean<unknown>>>>;
|
|
41
|
+
timeout: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>>;
|
|
42
|
+
headers: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodCoercedBoolean<unknown>>>>;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
44
|
};
|
|
45
45
|
display({ url }: WebFetchInputSchema): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-fetch.d.ts","sourceRoot":"","sources":["../../source/tools/web-fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web-fetch.d.ts","sourceRoot":"","sources":["../../source/tools/web-fetch.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,YAAY;;CAExB,CAAC;AASF;;GAEG;AACH,QAAA,MAAM,WAAW;;;;;;;;;;;iBAkBf,CAAC;AAEH,KAAK,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AA6bvD;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,mBAAmB,EAC5B,gBAAgB,EAAE,oBAAoB,GACrC,OAAO,CAAC,MAAM,CAAC,CAwFjB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;qBAQV,mBAAmB;qBAIzB,mBAAmB,oBACV,oBAAoB,GACrC,OAAO,CAAC,MAAM,CAAC;EAIrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC"}
|