cortico-world-hands 0.4.0 → 0.5.0

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 +26 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1353,6 +1353,20 @@ var HANDS_TOOL_DECLS = [
1353
1353
  description: "\u770B\u624B\u81EA\u5DF1\u7684\u72B6\u6001\uFF1A\u8D70\u54EA\u6761\u901A\u9053\u3001\u901A\u4E0D\u901A\u3001\u8FD9\u4E00\u5206\u949F\u52A8\u4E86\u51E0\u4E2A\u52A8\u4F5C\u3001\u521A\u624D\u90A3\u4E00\u4E0B\u6210\u4E86\u6CA1\u6709\u3002\u5BF9\u65B9\u95EE\u300C\u624B\u80FD\u7528\u5417\u300D\u300C\u4F60\u521A\u624D\u70B9\u4E86\u4EC0\u4E48\u300D\u65F6\u7528\u5B83\u3002",
1354
1354
  parameters: { type: "object", properties: {}, required: [] }
1355
1355
  },
1356
+ {
1357
+ name: "memory_note",
1358
+ tags: ["write"],
1359
+ description: "\u968F\u624B\u8BB0\u4E00\u6761\u53EA\u5B58\u5728\u672C\u673A\u7684\u8BB0\u5FC6\uFF08\u4E0D\u8FDB\u4E91\u7AEF\uFF09\uFF1A\u4E34\u65F6\u7684\u89C2\u5BDF\u3001\u4ECA\u5929\u7684\u5C0F\u4E8B\u3001\u534A\u622A\u7684\u60F3\u6CD5\u90FD\u80FD\u8BB0\u3002\u60F3\u957F\u671F\u7559\u5B58\u3001\u4EE5\u540E\u8981\u7528\u7684\u624D\u7528 memory_save\u3002",
1360
+ parameters: {
1361
+ type: "object",
1362
+ properties: {
1363
+ key: { type: "string", description: "\u7B80\u77ED\u4E3B\u9898\uFF0C\u6BD4\u5982\u300C\u4ECA\u5929\u770B\u5230\u4ED6\u300D\u300C\u4E34\u65F6\u60F3\u6CD5\u300D" },
1364
+ value: { type: "string", description: "\u8981\u8BB0\u7684\u5185\u5BB9\uFF0C\u4E00\u53E5\u8BDD\u3002" },
1365
+ tags: { type: "string", description: "\u53EF\u9009\u6807\u7B7E\uFF0C\u9017\u53F7\u5206\u9694\u3002" }
1366
+ },
1367
+ required: ["key", "value"]
1368
+ }
1369
+ },
1356
1370
  {
1357
1371
  name: "memory_audit",
1358
1372
  tags: ["read"],
@@ -1645,6 +1659,8 @@ ${lines.join("\n")}
1645
1659
  return await this.unlockPages(args);
1646
1660
  case "memory_save":
1647
1661
  return await this.memorySave(args);
1662
+ case "memory_note":
1663
+ return await this.memoryNote(args);
1648
1664
  case "memory_audit":
1649
1665
  return await this.memoryAudit(args);
1650
1666
  case "memory_search":
@@ -1757,6 +1773,16 @@ ${lines.join("\n")}
1757
1773
  }
1758
1774
  return `\u8BB0\u7262\u4E86\uFF1A\u300C${key}\u300D\u2192 ${value}${cloud}`;
1759
1775
  }
1776
+ /** 只写本地的一条:不进云端,宽松记。 */
1777
+ async memoryNote(args) {
1778
+ const key = typeof args.key === "string" ? args.key.trim() : "";
1779
+ const value = typeof args.value === "string" ? args.value.trim() : "";
1780
+ if (!key || !value) return failed("\u8981 key \u548C value\u3002");
1781
+ const tags = typeof args.tags === "string" ? args.tags : "local";
1782
+ const r = await this.hands.memorySave(key, value, tags);
1783
+ if (!r.ok) return failed(`\u6CA1\u8BB0\u4E0A\uFF1A${r.detail || "\u624B\u6CA1\u54CD\u5E94"}`);
1784
+ return `\u8BB0\u5728\u672C\u673A\u4E86\uFF1A\u300C${key}\u300D\uFF08\u53EA\u5728\u672C\u5730\uFF0C\u4E0D\u540C\u6B65\u4E91\u7AEF\uFF09`;
1785
+ }
1760
1786
  /** 第三道闸:只读体检,出清单不删。 */
1761
1787
  async memoryAudit(args) {
1762
1788
  const rows = await this.hands.memorySearch();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
6
6
  "license": "MIT",