dsh-mnemon 0.5.14 → 0.5.16

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/lib/index.js CHANGED
@@ -7916,7 +7916,7 @@ function registerTools(ctx, runtimeSource, coordinator) {
7916
7916
  branches: {
7917
7917
  type: "array",
7918
7918
  items: { type: "string" },
7919
- description: "Optional git branch names restricting where a target=memory entry is injected. Omit for cross-branch facts; on replace an empty list clears the scope and an omitted list keeps it. Never accepted for target=user."
7919
+ description: "Optional git branch names restricting where a target=memory entry is injected. Omit for cross-branch facts; on replace an empty list clears the scope and an omitted list keeps it. For target=user, omit or pass []; non-empty branches are rejected."
7920
7920
  }
7921
7921
  },
7922
7922
  required: ["action", "target"]
@@ -7936,7 +7936,7 @@ function registerTools(ctx, runtimeSource, coordinator) {
7936
7936
  ...args.content === void 0 ? {} : { content: args.content },
7937
7937
  ...args.old_text === void 0 ? {} : { oldText: args.old_text },
7938
7938
  ...args.importance === void 0 ? {} : { importance: args.importance },
7939
- ...args.branches === void 0 ? {} : { branches: args.branches }
7939
+ ...args.branches === void 0 || args.target === "user" && Array.isArray(args.branches) && args.branches.length === 0 ? {} : { branches: args.branches }
7940
7940
  };
7941
7941
  return coordinator.runtime(requireAgent(exec), request, exec.signal);
7942
7942
  },