openclaw-amem 1.1.4 → 1.1.5

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/index.js CHANGED
@@ -1389,7 +1389,7 @@ async function listMemories(agentId = "main", storageCtx) {
1389
1389
  return { count };
1390
1390
  }
1391
1391
  function sleep(ms) {
1392
- return new Promise((resolve) => setTimeout(resolve, ms));
1392
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
1393
1393
  }
1394
1394
  async function mergeSimilarNotes(agentId, storageCtx) {
1395
1395
  const ctx = storageCtx ?? defaultCtx();
@@ -1709,10 +1709,21 @@ function severityBadge(reasons) {
1709
1709
  return "\u{1F7E0} CONFLICT";
1710
1710
  }
1711
1711
  async function generateReviewBatch(agentId, outputPath) {
1712
+ const root = path4.resolve(DEFAULT_OUTPUT_DIR);
1713
+ let filePath;
1714
+ let batchN;
1715
+ if (outputPath) {
1716
+ const name = path4.basename(outputPath);
1717
+ if (name !== outputPath || name === "" || name === "." || name === "..") {
1718
+ throw new Error(`[quality] outputPath \u5FC5\u987B\u662F\u7EAF\u6587\u4EF6\u540D\uFF08\u4E0D\u542B\u76EE\u5F55\uFF09: ${outputPath}`);
1719
+ }
1720
+ filePath = path4.join(root, name);
1721
+ batchN = 0;
1722
+ } else {
1723
+ batchN = nextBatchNumber(root);
1724
+ filePath = path4.join(root, `amem-review-batch${batchN}.md`);
1725
+ }
1712
1726
  const items = await scanLowQuality(agentId);
1713
- const dir = outputPath ? path4.dirname(outputPath) : DEFAULT_OUTPUT_DIR;
1714
- const batchN = outputPath ? 0 : nextBatchNumber(dir);
1715
- const filePath = outputPath || path4.join(dir, `amem-review-batch${batchN}.md`);
1716
1727
  const now = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
1717
1728
  const lines = [];
1718
1729
  const title = LOCALE2 === "zh" ? "A-MEM \u8D28\u91CF\u5BA1\u6838" : "A-MEM Quality Review";
@@ -2175,7 +2186,7 @@ ${text}${hookWarning}` }],
2175
2186
  properties: {
2176
2187
  outputPath: {
2177
2188
  type: "string",
2178
- description: "Custom output path for the review batch file (optional, auto-generates if omitted)"
2189
+ description: "Custom filename for the review batch (optional, auto-generates if omitted). A bare filename only \u2014 it is written under AMEM_REVIEW_DIR; a path with directories is rejected."
2179
2190
  }
2180
2191
  },
2181
2192
  required: []
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-amem",
3
3
  "name": "Memory (A-MEM v2)",
4
4
  "description": "OpenClaw memory plugin implementing A-MEM — memories evolve, not just accumulate. Graph linking, hybrid retrieval, LLM-driven evolution. No Python.",
5
- "version": "1.1.4",
5
+ "version": "1.1.5",
6
6
  "kind": "memory",
7
7
  "openclaw": {
8
8
  "compat": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-amem",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "OpenClaw memory plugin implementing A-MEM — memories evolve, not just accumulate. Graph linking, hybrid retrieval, LLM-driven evolution. No Python.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",