sage-mem 2.29.0 → 2.29.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 +1 -1
- package/README.md +1 -1
- package/lib/client.js +25 -27
- package/package.json +1 -1
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.29.
|
|
15
|
+
**Current release: `2.29.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.29.
|
|
17
|
+
**当前发布版本:`2.29.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
|
@@ -8104,21 +8104,12 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8104
8104
|
const exposed = new Set(exposedNames);
|
|
8105
8105
|
const endpoint = (status && status.endpoint) || null;
|
|
8106
8106
|
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
*/
|
|
8114
|
-
function parseTagsOf(raw) {
|
|
8115
|
-
return String(raw == null ? "" : raw)
|
|
8116
|
-
.split(/[,,、]+/)
|
|
8117
|
-
.map(function (s) { return s.replace(/[\[\]"'#:]/g, "").trim(); })
|
|
8118
|
-
.filter(function (s) { return s !== ""; })
|
|
8119
|
-
.slice(0, 20)
|
|
8120
|
-
.map(function (s) { return s.slice(0, 40); });
|
|
8121
|
-
}
|
|
8107
|
+
// 标签切分直接用 `50-shared-ui.js` 的 `parseTagInput`(认 `,` `,` `、`,剥 YAML 字符,截断)。
|
|
8108
|
+
//
|
|
8109
|
+
// 这里曾经复制过一份 `parseTagsOf`,理由写的是「50 在内层作用域、68 够不着」——**那是错的**。
|
|
8110
|
+
// `client/*.js` 拼成的是**同一个 factory 作用域**(`scripts/build-client.mjs` 只是逐字节拼接),
|
|
8111
|
+
// `50` 与 `68` 的顶层声明同级。2026-12-04 那次白屏的真凶是另一次全局替换(`enabled` 未定义),
|
|
8112
|
+
// 与这里无关。2026-12-04 晚(2.29.1)删掉复制品、改回调用。
|
|
8122
8113
|
|
|
8123
8114
|
/** 前缀候选:默认那两个 + 另外两类(面板把「不给」也画出来,免得以为漏了)。 */
|
|
8124
8115
|
const PREFIX_CHOICES = ["project_", "reference_", "user_", "feedback_"];
|
|
@@ -8237,9 +8228,9 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8237
8228
|
|
|
8238
8229
|
/** 标签白名单:逗号分隔(中英文逗号都收)。空 = 不按标签开放。 */
|
|
8239
8230
|
function saveTags() {
|
|
8240
|
-
//
|
|
8231
|
+
// 走共享的 parseTagInput:认半角逗号、全角逗号与顿号,并剥掉 YAML 里有语法含义的字符。
|
|
8241
8232
|
// 旧实现只切 `[,,]`,中文输入法敲出的「记忆系统、发布」会被当成一个标签(审计 P3-1)。
|
|
8242
|
-
saveExternal({ tags:
|
|
8233
|
+
saveExternal({ tags: parseTagInput(tagDraft) }, t("ext.notice.saved"));
|
|
8243
8234
|
}
|
|
8244
8235
|
|
|
8245
8236
|
/**
|
|
@@ -8250,7 +8241,7 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8250
8241
|
* 并**只在真的变了**才发请求 —— 否则点一下输入框再点走,就会白刷一次提示。
|
|
8251
8242
|
*/
|
|
8252
8243
|
function saveTagsIfChanged() {
|
|
8253
|
-
const next =
|
|
8244
|
+
const next = parseTagInput(tagDraft);
|
|
8254
8245
|
const cur = (ext && Array.isArray(ext.tags) ? ext.tags : []).map(function (s) { return String(s).trim(); }).filter(function (s) { return s !== ""; });
|
|
8255
8246
|
if (next.join("\u0000") === cur.join("\u0000")) return;
|
|
8256
8247
|
saveTags();
|
|
@@ -8278,11 +8269,13 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8278
8269
|
function isIncluded(name) {
|
|
8279
8270
|
if (!ext) return false;
|
|
8280
8271
|
const n = String(name);
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
if (exc.indexOf(n) >= 0) return false;
|
|
8284
|
-
if (inc.indexOf(n) >= 0) return true;
|
|
8272
|
+
// 大小写不敏感 —— 与后端 `policy.js:246-247` 同口径。名单可能被手改过
|
|
8273
|
+
// (`Project_Beta.md`),前端按精确全等判就会画出「勾着但实际没导」。
|
|
8285
8274
|
const lower = n.toLowerCase();
|
|
8275
|
+
const inc = (ext.include || []).map(function (x) { return String(x).toLowerCase(); });
|
|
8276
|
+
const exc = (ext.exclude || []).map(function (x) { return String(x).toLowerCase(); });
|
|
8277
|
+
if (exc.indexOf(lower) >= 0) return false;
|
|
8278
|
+
if (inc.indexOf(lower) >= 0) return true;
|
|
8286
8279
|
// 与后端 `lib/mirror/policy.js` 的 `isExposed` **同序**:排除 > 包含 > 前缀 > 标签。
|
|
8287
8280
|
// 前端**刻意不判 `enabled`** —— 关着的时候勾选是「打开后要导出什么」,不是「现在正在导出」。
|
|
8288
8281
|
if ((ext.prefixes || []).some(function (p) { return lower.indexOf(String(p).toLowerCase()) === 0; })) return true;
|
|
@@ -8569,12 +8562,17 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8569
8562
|
}, function (e) { setBusy(""); setErr(String((e && e.message) || e)); });
|
|
8570
8563
|
}
|
|
8571
8564
|
|
|
8572
|
-
/**
|
|
8565
|
+
/**
|
|
8566
|
+
* patch 的「复制建议」:只复制「建议改成」那一段,不复制整份 patch。
|
|
8567
|
+
*
|
|
8568
|
+
* 走 `56-health-prompt.js` 的 `copyPromptText`:它带 `execCommand` 降级。
|
|
8569
|
+
* 只认 `navigator.clipboard` 的写法在**局域网 http 部署(非安全上下文)下必然失败** ——
|
|
8570
|
+
* 同一个产品里两处复制行为不同,用户只会觉得「这里坏了」(2.29.1 统一)。
|
|
8571
|
+
*/
|
|
8573
8572
|
function copySuggestion(text) {
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
setNotice(t("ext.intake.notice.copied"));
|
|
8573
|
+
Promise.resolve(copyPromptText(String(text == null ? "" : text))).then(function (ok) {
|
|
8574
|
+
if (ok === true) setNotice(t("ext.intake.notice.copied"));
|
|
8575
|
+
else setErr(t("ext.intake.err.noClipboard"));
|
|
8578
8576
|
}, function () { setErr(t("ext.intake.err.noClipboard")); });
|
|
8579
8577
|
}
|
|
8580
8578
|
|
package/package.json
CHANGED