sage-mem 2.26.0 → 2.26.1

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/README.en.md CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  **Cross-session memory for DeepSeek Harness — plain markdown files, no database, no worker.**
14
14
 
15
- **Current release: `2.26.0`** — the npm badge above is the dynamic source of truth. **Contract baseline: `1.0.0`** — the first stable release, whose public commitments, the capability boundaries and the list of things it explicitly cannot do are frozen in the
15
+ **Current release: `2.26.1`** — the npm badge above is the dynamic source of truth. **Contract baseline: `1.0.0`** — the first stable release, whose public commitments, the capability boundaries and the list of things it explicitly cannot do are frozen in the
16
16
  [frozen contract](https://github.com/gezi-wen/sage-mem/blob/main/docs/1.0.0-contract.md).
17
17
 
18
18
  If it is useful to you, a Star is the most direct feedback.
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  > File-based cross-session memory for DeepSeek Harness — every memory is a plain markdown file you can open, edit and delete. No database, no worker, no port.
16
16
 
17
- **当前发布版本:`2.26.0`** —— 顶部 npm 徽章是动态权威。**契约基线:`1.0.0`** —— 第一个稳定版,公开承诺、能力边界与「明确做不到」的清单冻结在
17
+ **当前发布版本:`2.26.1`** —— 顶部 npm 徽章是动态权威。**契约基线:`1.0.0`** —— 第一个稳定版,公开承诺、能力边界与「明确做不到」的清单冻结在
18
18
  [契约冻结](https://github.com/gezi-wen/sage-mem/blob/main/docs/1.0.0-contract.md)。
19
19
 
20
20
  如果它对你有用,给个 Star 是最直接的反馈。
package/lib/client.js CHANGED
@@ -4335,6 +4335,10 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
4335
4335
  "ext.what1": "开关打开后,白名单内的记忆会被复制到状态目录下的 mirror/ 里,其他 agent 通过 127.0.0.1 上的只读接口读那一份副本。",
4336
4336
  "ext.what2": "接口只有读:没有写入、不给文件路径、拿不到没勾选的条目。主库一个字都不会被它们改到。",
4337
4337
  "ext.status.on": "已开启 · 暴露 {count} 条",
4338
+ "ext.poll": "轮询间隔",
4339
+ "ext.unit.seconds": "秒",
4340
+ "ext.err.poll": "轮询间隔要填 15–600 的整数",
4341
+ "ext.notice.poll": "轮询间隔已保存",
4338
4342
  "ext.status.off": "关闭(默认)",
4339
4343
  "ext.prefixes": "按前缀整类开放",
4340
4344
  "ext.prefixesHint": "默认只开 project_ 与 reference_;user_ 与 feedback_ 是「关于我自己」的记忆,默认不给。",
@@ -5064,6 +5068,10 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
5064
5068
  "ext.what1": "When enabled, whitelisted memories are copied into mirror/ under the state directory, and other agents read that copy through a read-only endpoint on 127.0.0.1.",
5065
5069
  "ext.what2": "The endpoint can only read: no writes, no file paths, nothing outside the whitelist. Your main library is never modified by them.",
5066
5070
  "ext.status.on": "On · {count} exposed",
5071
+ "ext.poll": "Poll interval",
5072
+ "ext.unit.seconds": "s",
5073
+ "ext.err.poll": "Poll interval must be an integer between 15 and 600",
5074
+ "ext.notice.poll": "Poll interval saved",
5067
5075
  "ext.status.off": "Off (default)",
5068
5076
  "ext.prefixes": "Expose whole prefix groups",
5069
5077
  "ext.prefixesHint": "Only project_ and reference_ are on by default; user_ and feedback_ are memories about you and stay private.",
@@ -8036,6 +8044,7 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
8036
8044
  const sFiles = react.useState([]); const files = sFiles[0], setFiles = sFiles[1];
8037
8045
  const sTags = react.useState(""); const tagDraft = sTags[0], setTagDraft = sTags[1];
8038
8046
  const sPort = react.useState(""); const portDraft = sPort[0], setPortDraft = sPort[1];
8047
+ const sPoll = react.useState(""); const pollDraft = sPoll[0], setPollDraft = sPoll[1];
8039
8048
  const sBusy = react.useState(false); const busy = sBusy[0], setBusy = sBusy[1];
8040
8049
  const sErr = react.useState(null); const err = sErr[0], setErr = sErr[1];
8041
8050
  const sNotice = react.useState(""); const notice = sNotice[0], setNotice = sNotice[1];
@@ -8061,6 +8070,7 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
8061
8070
  const cur = d.external || {};
8062
8071
  setTagsOf(cur.tags);
8063
8072
  setPortDraft(String(typeof cur.port === "number" ? cur.port : ""));
8073
+ setPollDraft(String(typeof cur.pollSeconds === "number" ? cur.pollSeconds : ""));
8064
8074
  }, function (e) { setErr(String((e && e.message) || e)); });
8065
8075
  if (typeof remote.externalStatus === "function") {
8066
8076
  Promise.resolve(remote.externalStatus()).then(function (res) {
@@ -8090,6 +8100,7 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
8090
8100
  const cur = out.settings.external || {};
8091
8101
  setTagsOf(cur.tags);
8092
8102
  setPortDraft(String(typeof cur.port === "number" ? cur.port : ""));
8103
+ setPollDraft(String(typeof cur.pollSeconds === "number" ? cur.pollSeconds : ""));
8093
8104
  }
8094
8105
  // 保存完立刻重读状态:暴露条数与端点都要马上反映出来(宿主那边已经 refresh 过)。
8095
8106
  refreshStatus();
@@ -8149,6 +8160,14 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
8149
8160
  saveExternal({ port: n }, t("ext.notice.port"));
8150
8161
  }
8151
8162
 
8163
+ /** 轮询间隔(15–600 秒)。它是第二道保险:目录事件漏了也有它兜底。 */
8164
+ function savePoll() {
8165
+ const raw = String(pollDraft == null ? "" : pollDraft).trim();
8166
+ const n = Number(raw);
8167
+ if (raw === "" || !Number.isInteger(n) || n < 15 || n > 600) { setErr(t("ext.err.poll")); return; }
8168
+ saveExternal({ pollSeconds: n }, t("ext.notice.poll"));
8169
+ }
8170
+
8152
8171
  const statusText = busy
8153
8172
  ? t("lab.action.saving")
8154
8173
  : (enabled
@@ -8261,6 +8280,20 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
8261
8280
  disabled: busy || !memSet, onClick: savePort,
8262
8281
  }, busy ? t("lab.action.saving") : t("lab.action.save")),
8263
8282
  ]),
8283
+ h("div", { className: "smem-autodream-row", key: "poll" }, [
8284
+ h("span", { className: "smem-autodream-key", key: "k" }, t("ext.poll")),
8285
+ h("input", {
8286
+ className: "smem-input smem-num", key: "i", type: "number", min: 15, max: 600, step: 5,
8287
+ value: pollDraft,
8288
+ disabled: busy || !memSet,
8289
+ onChange: function (e) { setPollDraft(e.target.value); },
8290
+ }),
8291
+ h("span", { className: "smem-muted", key: "u" }, t("ext.unit.seconds")),
8292
+ h("button", {
8293
+ type: "button", className: "smem-btn smem-btn-primary", key: "save",
8294
+ disabled: busy || !memSet, onClick: savePoll,
8295
+ }, busy ? t("lab.action.saving") : t("lab.action.save")),
8296
+ ]),
8264
8297
  h("div", { className: "smem-autodream-note", key: "ep" }, t("ext.endpointLabel") + " " + endpointLine),
8265
8298
  h("div", { className: "smem-autodream-note", key: "last" }, lastLine),
8266
8299
  status && status.mirrorDir
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sage-mem",
3
3
  "description": "Cross-session memory for DeepSeek Harness — plain markdown files, no database, no worker.",
4
- "version": "2.26.0",
4
+ "version": "2.26.1",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "icon": "./icon.png",