@polka-codes/core 0.9.62 → 0.9.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.ts +49 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +41 -3
- package/package.json +2 -2
|
@@ -92,6 +92,10 @@ declare type Config = z.infer<typeof configSchema>;
|
|
|
92
92
|
export { Config }
|
|
93
93
|
export { Config as Config_alias_1 }
|
|
94
94
|
|
|
95
|
+
declare type ConfigRule = z.infer<typeof ruleSchema>;
|
|
96
|
+
export { ConfigRule }
|
|
97
|
+
export { ConfigRule as ConfigRule_alias_1 }
|
|
98
|
+
|
|
95
99
|
declare const configSchema: z.ZodObject<{
|
|
96
100
|
prices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
97
101
|
inputPrice: z.ZodOptional<z.ZodNumber>;
|
|
@@ -125,7 +129,25 @@ declare const configSchema: z.ZodObject<{
|
|
|
125
129
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
126
130
|
budget: z.ZodOptional<z.ZodNumber>;
|
|
127
131
|
}, z.core.$strip>>>;
|
|
128
|
-
|
|
132
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
search: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
134
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
135
|
+
model: z.ZodOptional<z.ZodString>;
|
|
136
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
137
|
+
budget: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strip>, z.ZodBoolean]>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
rules: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
141
|
+
path: z.ZodString;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
url: z.ZodString;
|
|
144
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
145
|
+
repo: z.ZodString;
|
|
146
|
+
path: z.ZodString;
|
|
147
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
148
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
149
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strict>]>>>, z.ZodString]>>;
|
|
129
151
|
excludeFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
152
|
}, z.core.$strict>;
|
|
131
153
|
export { configSchema }
|
|
@@ -239,13 +261,13 @@ export { _default_13 as replaceInFile_alias_1 }
|
|
|
239
261
|
declare const _default_14: {
|
|
240
262
|
handler: ToolHandler<{
|
|
241
263
|
readonly name: "search";
|
|
242
|
-
readonly description: "Search the web for information.";
|
|
264
|
+
readonly description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.";
|
|
243
265
|
readonly parameters: z.ZodObject<{
|
|
244
266
|
query: z.ZodString;
|
|
245
267
|
}, z.core.$strip>;
|
|
246
268
|
}, WebProvider>;
|
|
247
269
|
name: "search";
|
|
248
|
-
description: "Search the web for information.";
|
|
270
|
+
description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.";
|
|
249
271
|
parameters: z.ZodObject<{
|
|
250
272
|
query: z.ZodString;
|
|
251
273
|
}, z.core.$strip>;
|
|
@@ -871,6 +893,15 @@ export { ParseOutputResult }
|
|
|
871
893
|
export { ParseOutputResult as ParseOutputResult_alias_1 }
|
|
872
894
|
export { ParseOutputResult as ParseOutputResult_alias_2 }
|
|
873
895
|
|
|
896
|
+
declare const providerModelSchema: z.ZodObject<{
|
|
897
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
898
|
+
model: z.ZodOptional<z.ZodString>;
|
|
899
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
900
|
+
budget: z.ZodOptional<z.ZodNumber>;
|
|
901
|
+
}, z.core.$strip>;
|
|
902
|
+
export { providerModelSchema }
|
|
903
|
+
export { providerModelSchema as providerModelSchema_alias_1 }
|
|
904
|
+
|
|
874
905
|
declare const replaceInFile_2: (fileContent: string, diff: string) => ReplaceResult;
|
|
875
906
|
export { replaceInFile_2 as replaceInFileHelper }
|
|
876
907
|
export { replaceInFile_2 as replaceInFile_alias_2 }
|
|
@@ -896,6 +927,20 @@ export { responsePrompts }
|
|
|
896
927
|
export { responsePrompts as responsePrompts_alias_1 }
|
|
897
928
|
export { responsePrompts as responsePrompts_alias_2 }
|
|
898
929
|
|
|
930
|
+
declare const ruleSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
931
|
+
path: z.ZodString;
|
|
932
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
933
|
+
url: z.ZodString;
|
|
934
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
935
|
+
repo: z.ZodString;
|
|
936
|
+
path: z.ZodString;
|
|
937
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
938
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
939
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
940
|
+
}, z.core.$strict>]>;
|
|
941
|
+
export { ruleSchema }
|
|
942
|
+
export { ruleSchema as ruleSchema_alias_1 }
|
|
943
|
+
|
|
899
944
|
/**
|
|
900
945
|
* Union type of all possible task events
|
|
901
946
|
*/
|
|
@@ -1135,7 +1180,7 @@ export declare const toolInfo_alias_12: {
|
|
|
1135
1180
|
|
|
1136
1181
|
export declare const toolInfo_alias_13: {
|
|
1137
1182
|
readonly name: "search";
|
|
1138
|
-
readonly description: "Search the web for information.";
|
|
1183
|
+
readonly description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.";
|
|
1139
1184
|
readonly parameters: z.ZodObject<{
|
|
1140
1185
|
query: z.ZodString;
|
|
1141
1186
|
}, z.core.$strip>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export { ParseOutputResult } from './_tsup-dts-rollup.js';
|
|
|
3
3
|
export { parseJsonFromMarkdown } from './_tsup-dts-rollup.js';
|
|
4
4
|
export { responsePrompts } from './_tsup-dts-rollup.js';
|
|
5
5
|
export { computeRateLimitBackoffSeconds } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { providerModelSchema_alias_1 as providerModelSchema } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { ruleSchema_alias_1 as ruleSchema } from './_tsup-dts-rollup.js';
|
|
8
|
+
export { ConfigRule_alias_1 as ConfigRule } from './_tsup-dts-rollup.js';
|
|
6
9
|
export { configSchema_alias_1 as configSchema } from './_tsup-dts-rollup.js';
|
|
7
10
|
export { Config_alias_1 as Config } from './_tsup-dts-rollup.js';
|
|
8
11
|
export { ToolParameterValue } from './_tsup-dts-rollup.js';
|
package/dist/index.js
CHANGED
|
@@ -133,6 +133,18 @@ var providerModelSchema = z.object({
|
|
|
133
133
|
parameters: z.record(z.string(), z.any()).optional(),
|
|
134
134
|
budget: z.number().positive().optional()
|
|
135
135
|
});
|
|
136
|
+
var ruleSchema = z.union([
|
|
137
|
+
z.string(),
|
|
138
|
+
z.object({ path: z.string() }).strict(),
|
|
139
|
+
z.object({ url: z.string() }).strict(),
|
|
140
|
+
z.object({
|
|
141
|
+
repo: z.string(),
|
|
142
|
+
path: z.string(),
|
|
143
|
+
tag: z.string().optional(),
|
|
144
|
+
commit: z.string().optional(),
|
|
145
|
+
branch: z.string().optional()
|
|
146
|
+
}).strict()
|
|
147
|
+
]);
|
|
136
148
|
var configSchema = z.object({
|
|
137
149
|
prices: z.record(
|
|
138
150
|
z.string(),
|
|
@@ -177,7 +189,10 @@ var configSchema = z.object({
|
|
|
177
189
|
)
|
|
178
190
|
).optional(),
|
|
179
191
|
commands: z.record(z.string(), providerModelSchema).optional(),
|
|
180
|
-
|
|
192
|
+
tools: z.object({
|
|
193
|
+
search: providerModelSchema.or(z.boolean()).optional()
|
|
194
|
+
}).optional(),
|
|
195
|
+
rules: z.array(ruleSchema).optional().or(z.string()).optional(),
|
|
181
196
|
excludeFiles: z.array(z.string()).optional()
|
|
182
197
|
}).strict();
|
|
183
198
|
|
|
@@ -1248,9 +1263,30 @@ var replaceInFile_default = {
|
|
|
1248
1263
|
import { z as z16 } from "zod";
|
|
1249
1264
|
var toolInfo14 = {
|
|
1250
1265
|
name: "search",
|
|
1251
|
-
description: "Search the web for information.",
|
|
1266
|
+
description: "Search the web for information using Google Search. Use this tool to find current information, facts, news, documentation, or research that is not available in your training data. Returns comprehensive search results with relevant content extracted from the web.",
|
|
1252
1267
|
parameters: z16.object({
|
|
1253
|
-
query: z16.string().describe("The query to search for")
|
|
1268
|
+
query: z16.string().describe("The query to search for").meta({ usageValue: "Your search query here" })
|
|
1269
|
+
}).meta({
|
|
1270
|
+
examples: [
|
|
1271
|
+
{
|
|
1272
|
+
description: "Search for current events or news",
|
|
1273
|
+
input: {
|
|
1274
|
+
query: "latest developments in AI language models 2024"
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
description: "Look up technical documentation",
|
|
1279
|
+
input: {
|
|
1280
|
+
query: "TypeScript advanced type system features"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
description: "Research specific information",
|
|
1285
|
+
input: {
|
|
1286
|
+
query: "Node.js performance optimization best practices"
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
]
|
|
1254
1290
|
})
|
|
1255
1291
|
};
|
|
1256
1292
|
var handler14 = async (provider, args) => {
|
|
@@ -2051,6 +2087,7 @@ export {
|
|
|
2051
2087
|
listTodoItems_default as listTodoItems,
|
|
2052
2088
|
makeStepFn,
|
|
2053
2089
|
parseJsonFromMarkdown,
|
|
2090
|
+
providerModelSchema,
|
|
2054
2091
|
readBinaryFile_default as readBinaryFile,
|
|
2055
2092
|
readFile_default as readFile,
|
|
2056
2093
|
readMemory_default as readMemory,
|
|
@@ -2059,6 +2096,7 @@ export {
|
|
|
2059
2096
|
replaceInFile_default as replaceInFile,
|
|
2060
2097
|
replaceInFile as replaceInFileHelper,
|
|
2061
2098
|
responsePrompts,
|
|
2099
|
+
ruleSchema,
|
|
2062
2100
|
search_default as search,
|
|
2063
2101
|
searchFiles_default as searchFiles,
|
|
2064
2102
|
toJsonModelMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polka-codes/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.63",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"author": "github@polka.codes",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@ai-sdk/provider": "^2.0.0",
|
|
21
21
|
"@ai-sdk/provider-utils": "^3.0.15",
|
|
22
|
-
"ai": "^5.0.
|
|
22
|
+
"ai": "^5.0.97",
|
|
23
23
|
"yaml": "^2.8.1",
|
|
24
24
|
"zod": "^4.1.12"
|
|
25
25
|
}
|