@polka-codes/core 0.9.54 → 0.9.56
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 +11 -11
- package/dist/index.js +6 -6
- package/package.json +1 -1
|
@@ -54,7 +54,7 @@ export { agentWorkflow as agentWorkflow_alias_2 }
|
|
|
54
54
|
declare type AgentWorkflowInput = {
|
|
55
55
|
tools: Readonly<FullToolInfo[]>;
|
|
56
56
|
maxToolRoundTrips?: number;
|
|
57
|
-
userMessage: JsonUserModelMessage[];
|
|
57
|
+
userMessage: readonly JsonUserModelMessage[];
|
|
58
58
|
outputSchema?: z.ZodSchema;
|
|
59
59
|
model?: string;
|
|
60
60
|
} & ({
|
|
@@ -170,13 +170,13 @@ declare const _default_10: {
|
|
|
170
170
|
readonly name: "readMemory";
|
|
171
171
|
readonly description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.";
|
|
172
172
|
readonly parameters: z.ZodObject<{
|
|
173
|
-
topic: z.ZodOptional<z.ZodString
|
|
173
|
+
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
174
|
}, z.core.$strip>;
|
|
175
175
|
}, MemoryProvider>;
|
|
176
176
|
name: "readMemory";
|
|
177
177
|
description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.";
|
|
178
178
|
parameters: z.ZodObject<{
|
|
179
|
-
topic: z.ZodOptional<z.ZodString
|
|
179
|
+
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
180
|
}, z.core.$strip>;
|
|
181
181
|
};
|
|
182
182
|
export { _default_10 as default_alias_9 }
|
|
@@ -274,7 +274,7 @@ declare const _default_15: {
|
|
|
274
274
|
remove: "remove";
|
|
275
275
|
}>;
|
|
276
276
|
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
-
content: z.ZodOptional<z.ZodString
|
|
277
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
278
|
}, z.core.$strip>;
|
|
279
279
|
}, MemoryProvider>;
|
|
280
280
|
name: "updateMemory";
|
|
@@ -286,7 +286,7 @@ declare const _default_15: {
|
|
|
286
286
|
remove: "remove";
|
|
287
287
|
}>;
|
|
288
288
|
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
289
|
-
content: z.ZodOptional<z.ZodString
|
|
289
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
290
290
|
}, z.core.$strip>;
|
|
291
291
|
};
|
|
292
292
|
export { _default_15 as default_alias_14 }
|
|
@@ -501,14 +501,14 @@ declare const _default_9: {
|
|
|
501
501
|
readonly description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
|
|
502
502
|
readonly parameters: z.ZodObject<{
|
|
503
503
|
path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
504
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean
|
|
504
|
+
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>>;
|
|
505
505
|
}, z.core.$strip>;
|
|
506
506
|
}, FilesystemProvider>;
|
|
507
507
|
name: "readFile";
|
|
508
508
|
description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
|
|
509
509
|
parameters: z.ZodObject<{
|
|
510
510
|
path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
511
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean
|
|
511
|
+
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>>;
|
|
512
512
|
}, z.core.$strip>;
|
|
513
513
|
};
|
|
514
514
|
export { _default_9 as default_alias_8 }
|
|
@@ -949,7 +949,7 @@ export { TaskEventKind as TaskEventKind_alias_2 }
|
|
|
949
949
|
*/
|
|
950
950
|
declare interface TaskEventStartRequest extends TaskEventBase {
|
|
951
951
|
kind: TaskEventKind.StartRequest;
|
|
952
|
-
userMessage: JsonModelMessage[];
|
|
952
|
+
userMessage: readonly JsonModelMessage[];
|
|
953
953
|
}
|
|
954
954
|
export { TaskEventStartRequest }
|
|
955
955
|
export { TaskEventStartRequest as TaskEventStartRequest_alias_1 }
|
|
@@ -1137,7 +1137,7 @@ export declare const toolInfo_alias_14: {
|
|
|
1137
1137
|
remove: "remove";
|
|
1138
1138
|
}>;
|
|
1139
1139
|
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1140
|
-
content: z.ZodOptional<z.ZodString
|
|
1140
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1141
1141
|
}, z.core.$strip>;
|
|
1142
1142
|
};
|
|
1143
1143
|
|
|
@@ -1229,7 +1229,7 @@ export declare const toolInfo_alias_8: {
|
|
|
1229
1229
|
readonly description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
|
|
1230
1230
|
readonly parameters: z.ZodObject<{
|
|
1231
1231
|
path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
1232
|
-
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean
|
|
1232
|
+
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>>;
|
|
1233
1233
|
}, z.core.$strip>;
|
|
1234
1234
|
};
|
|
1235
1235
|
|
|
@@ -1237,7 +1237,7 @@ export declare const toolInfo_alias_9: {
|
|
|
1237
1237
|
readonly name: "readMemory";
|
|
1238
1238
|
readonly description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.";
|
|
1239
1239
|
readonly parameters: z.ZodObject<{
|
|
1240
|
-
topic: z.ZodOptional<z.ZodString
|
|
1240
|
+
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1241
1241
|
}, z.core.$strip>;
|
|
1242
1242
|
};
|
|
1243
1243
|
|
package/dist/index.js
CHANGED
|
@@ -784,7 +784,7 @@ var toolInfo9 = {
|
|
|
784
784
|
if (lower === "true") return true;
|
|
785
785
|
}
|
|
786
786
|
return val;
|
|
787
|
-
}, z11.boolean().
|
|
787
|
+
}, z11.boolean().nullish().default(false)).describe("Whether to include ignored files. Use true to include files ignored by .gitignore.").meta({ usageValue: "true or false (optional)" })
|
|
788
788
|
}).meta({
|
|
789
789
|
examples: [
|
|
790
790
|
{
|
|
@@ -815,7 +815,7 @@ var handler9 = async (provider, args) => {
|
|
|
815
815
|
const { path: paths, includeIgnored } = toolInfo9.parameters.parse(args);
|
|
816
816
|
const resp = [];
|
|
817
817
|
for (const path of paths) {
|
|
818
|
-
const fileContent = await provider.readFile(path, includeIgnored);
|
|
818
|
+
const fileContent = await provider.readFile(path, includeIgnored ?? false);
|
|
819
819
|
if (!fileContent) {
|
|
820
820
|
resp.push(`<read_file_file_content path="${path}" file_not_found="true" />`);
|
|
821
821
|
} else {
|
|
@@ -846,12 +846,12 @@ var toolInfo10 = {
|
|
|
846
846
|
name: "readMemory",
|
|
847
847
|
description: "Reads content from a memory topic. Use this to retrieve information stored in previous steps. If no topic is specified, reads from the default topic.",
|
|
848
848
|
parameters: z12.object({
|
|
849
|
-
topic: z12.string().
|
|
849
|
+
topic: z12.string().nullish().describe('The topic to read from memory. Defaults to ":default:".')
|
|
850
850
|
})
|
|
851
851
|
};
|
|
852
852
|
var handler10 = async (provider, args) => {
|
|
853
853
|
const { topic } = toolInfo10.parameters.parse(args);
|
|
854
|
-
const content = await provider.readMemory(topic);
|
|
854
|
+
const content = await provider.readMemory(topic ?? void 0);
|
|
855
855
|
if (content) {
|
|
856
856
|
return {
|
|
857
857
|
type: "Reply" /* Reply */,
|
|
@@ -1331,7 +1331,7 @@ var toolInfo15 = {
|
|
|
1331
1331
|
parameters: z17.object({
|
|
1332
1332
|
operation: z17.enum(["append", "replace", "remove"]).describe("The operation to perform."),
|
|
1333
1333
|
topic: z17.string().nullish().describe('The topic to update in memory. Defaults to ":default:".'),
|
|
1334
|
-
content: z17.string().
|
|
1334
|
+
content: z17.string().nullish().describe("The content for append or replace operations. Must be omitted for remove operation.")
|
|
1335
1335
|
}).superRefine((data, ctx) => {
|
|
1336
1336
|
if (data.operation === "append" || data.operation === "replace") {
|
|
1337
1337
|
if (data.content === void 0) {
|
|
@@ -1363,7 +1363,7 @@ var handler15 = async (provider, args) => {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
const params = toolInfo15.parameters.parse(args);
|
|
1366
|
-
await provider.updateMemory(params.operation, params.topic ?? void 0,
|
|
1366
|
+
await provider.updateMemory(params.operation, params.topic ?? void 0, params.content ?? void 0);
|
|
1367
1367
|
switch (params.operation) {
|
|
1368
1368
|
case "append":
|
|
1369
1369
|
return {
|