@polka-codes/cli-shared 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.
Files changed (2) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31188,7 +31188,7 @@ var toolInfo9 = {
31188
31188
  return true;
31189
31189
  }
31190
31190
  return val;
31191
- }, exports_external.boolean().optional().default(false)).describe("Whether to include ignored files. Use true to include files ignored by .gitignore.").meta({ usageValue: "true or false (optional)" })
31191
+ }, exports_external.boolean().nullish().default(false)).describe("Whether to include ignored files. Use true to include files ignored by .gitignore.").meta({ usageValue: "true or false (optional)" })
31192
31192
  }).meta({
31193
31193
  examples: [
31194
31194
  {
@@ -31219,7 +31219,7 @@ var handler9 = async (provider, args) => {
31219
31219
  const { path: paths, includeIgnored } = toolInfo9.parameters.parse(args);
31220
31220
  const resp = [];
31221
31221
  for (const path of paths) {
31222
- const fileContent = await provider.readFile(path, includeIgnored);
31222
+ const fileContent = await provider.readFile(path, includeIgnored ?? false);
31223
31223
  if (!fileContent) {
31224
31224
  resp.push(`<read_file_file_content path="${path}" file_not_found="true" />`);
31225
31225
  } else {
@@ -31249,12 +31249,12 @@ var toolInfo10 = {
31249
31249
  name: "readMemory",
31250
31250
  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.",
31251
31251
  parameters: exports_external.object({
31252
- topic: exports_external.string().optional().describe('The topic to read from memory. Defaults to ":default:".')
31252
+ topic: exports_external.string().nullish().describe('The topic to read from memory. Defaults to ":default:".')
31253
31253
  })
31254
31254
  };
31255
31255
  var handler10 = async (provider, args) => {
31256
31256
  const { topic } = toolInfo10.parameters.parse(args);
31257
- const content = await provider.readMemory(topic);
31257
+ const content = await provider.readMemory(topic ?? undefined);
31258
31258
  if (content) {
31259
31259
  return {
31260
31260
  type: "Reply" /* Reply */,
@@ -31717,7 +31717,7 @@ var toolInfo15 = {
31717
31717
  parameters: exports_external.object({
31718
31718
  operation: exports_external.enum(["append", "replace", "remove"]).describe("The operation to perform."),
31719
31719
  topic: exports_external.string().nullish().describe('The topic to update in memory. Defaults to ":default:".'),
31720
- content: exports_external.string().optional().describe("The content for append or replace operations. Must be omitted for remove operation.")
31720
+ content: exports_external.string().nullish().describe("The content for append or replace operations. Must be omitted for remove operation.")
31721
31721
  }).superRefine((data, ctx) => {
31722
31722
  if (data.operation === "append" || data.operation === "replace") {
31723
31723
  if (data.content === undefined) {
@@ -31749,7 +31749,7 @@ var handler15 = async (provider, args) => {
31749
31749
  };
31750
31750
  }
31751
31751
  const params = toolInfo15.parameters.parse(args);
31752
- await provider.updateMemory(params.operation, params.topic ?? undefined, "content" in params ? params.content : undefined);
31752
+ await provider.updateMemory(params.operation, params.topic ?? undefined, params.content ?? undefined);
31753
31753
  switch (params.operation) {
31754
31754
  case "append":
31755
31755
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli-shared",
3
- "version": "0.9.54",
3
+ "version": "0.9.56",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",