@agent_memory/dsh 0.5.3 → 0.5.4

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/plugin.mjs CHANGED
@@ -5347,6 +5347,9 @@ function replacementProblems(replacement, path) {
5347
5347
  });
5348
5348
  return problems;
5349
5349
  }
5350
+ function proposalPendingReminder(proposalId) {
5351
+ return `\u63D0\u6848\u5DF2\u521B\u5EFA\uFF08${proposalId}\uFF09\uFF0C\u7B49\u5F85\u4EBA\u5DE5\u5BA1\u6279\u3002\u8BF7\u5230\u3010\u8BB0\u5FC6 \u2192 \u63D0\u6848\u3011\u67E5\u770B\u5E76\u70B9\u51FB\u300C\u91C7\u7EB3\u300D\u6216\u300C\u9A73\u56DE\u300D\u3002`;
5352
+ }
5350
5353
  function capabilitiesFor(mode, delegationDepth) {
5351
5354
  const capabilities = ["facts.read", "rules.read"];
5352
5355
  if (delegationDepth === 0) {
@@ -5364,7 +5367,7 @@ function registerTools(ctx, service2, actor, quota = new SessionQuota(service2.c
5364
5367
  memory_recall: "\u68C0\u7D22\u957F\u671F\u8BB0\u5FC6\uFF1A\u6309\u67E5\u8BE2\u8FD4\u56DE\u76F8\u5173\u6458\u8981\u4E0E\u8BB0\u5FC6\u7F16\u53F7",
5365
5368
  memory_read: "\u8BFB\u53D6\u4E00\u6761\u8BB0\u5FC6\u7684\u5168\u6587\u3001\u51FA\u5904\u4E0E\u72B6\u6001",
5366
5369
  memory_record: "\u5199\u5165\u4E00\u6761\u65B0\u8BB0\u5FC6\uFF08\u5FC5\u987B\u7ED9\u51FA\u771F\u5B9E\u4E8B\u4EF6\u51FA\u5904\uFF09",
5367
- memory_propose: "\u63D0\u51FA\u8BB0\u5FC6\u4FEE\u8BA2\u6216\u5220\u9664\u63D0\u6848\uFF1B\u53EA\u521B\u5EFA\u5F85\u5BA1\u63D0\u6848\uFF0C\u4E0D\u81EA\u52A8\u5BA1\u6279",
5370
+ memory_propose: "\u63D0\u51FA\u8BB0\u5FC6\u4FEE\u8BA2\u6216\u5220\u9664\u63D0\u6848\uFF1B\u53EA\u521B\u5EFA\u5F85\u5BA1\u63D0\u6848\uFF0C\u521B\u5EFA\u540E\u5FC5\u987B\u63D0\u9192\u7528\u6237\u53BB\u3010\u8BB0\u5FC6 \u2192 \u63D0\u6848\u3011\u5BA1\u6279\uFF0C\u4E0D\u81EA\u52A8\u5BA1\u6279",
5368
5371
  memory_review: "\u4E3A\u5F85\u5BA1\u63D0\u6848\u5F39\u51FA\u4E2D\u6587\u5BA1\u6279\u5361\u7247",
5369
5372
  memory_context: "\u67E5\u770B\u5F53\u524D\u4F1A\u8BDD\u6700\u8FD1\u4E8B\u4EF6\uFF0C\u53D6\u5F97\u53EF\u7528\u4E8E\u51FA\u5904\u7684 event_seq",
5370
5373
  rules_list: "\u5217\u51FA\u5F53\u524D\u751F\u6548\u7684\u89C4\u5219"
@@ -5381,9 +5384,10 @@ function registerTools(ctx, service2, actor, quota = new SessionQuota(service2.c
5381
5384
  const proposal = candidate.proposal ?? candidate;
5382
5385
  const review = candidate.review;
5383
5386
  const proposalId = name2 === "memory_propose" && review === void 0 ? proposal.id : void 0;
5384
- const hint = typeof proposalId === "string" ? `
5387
+ const reminder = typeof candidate.reminder === "string" ? candidate.reminder : typeof proposalId === "string" ? proposalPendingReminder(proposalId) : "";
5388
+ const hint = reminder === "" ? "" : `
5385
5389
 
5386
- \u4EBA\u5728\u804A\u5929\u6846\u51B3\u5B9A\uFF1A/mem decide ${proposalId} accept \u6216 reject\uFF1B\u4E5F\u53EF\u8C03\u7528 memory_review \u91CD\u65B0\u5F39\u51FA\u5361\u7247` : "";
5390
+ ${reminder}`;
5387
5391
  return [{ type: "text", text: text + hint }];
5388
5392
  }
5389
5393
  },
@@ -5414,7 +5418,13 @@ function registerTools(ctx, service2, actor, quota = new SessionQuota(service2.c
5414
5418
  if (service2.mode === "readonly") {
5415
5419
  throw new ToolInputError("\u5F53\u524D\u4E3A readonly \u6A21\u5F0F\uFF1A\u53EA\u80FD\u8BFB\u53D6\u8BB0\u5FC6\uFF0C\u4E0D\u80FD\u63D0\u51FA\u4FEE\u6539");
5416
5420
  }
5417
- return service2.propose(args, actor, exec);
5421
+ const proposal = await service2.propose(args, actor, exec);
5422
+ const proposalId = typeof proposal.id === "string" ? proposal.id : "";
5423
+ return {
5424
+ ...proposal,
5425
+ status: "pending",
5426
+ reminder: proposalPendingReminder(proposalId)
5427
+ };
5418
5428
  },
5419
5429
  memory_review: async (args, exec) => {
5420
5430
  if (hooks.reviewPending === void 0) {
@@ -6587,7 +6597,7 @@ function registerGuiRoutes(connection, deps, effect) {
6587
6597
  }
6588
6598
 
6589
6599
  // packages/dsh/src/update.ts
6590
- var PLUGIN_VERSION = "0.5.3";
6600
+ var PLUGIN_VERSION = "0.5.4";
6591
6601
  var PACKAGE_NAME = "@agent_memory/dsh";
6592
6602
  var REGISTRY_LATEST = [
6593
6603
  "https://registry.npmjs.org/@agent_memory%2Fdsh/latest",