sage-mem 2.7.1 → 2.8.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.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +41 -3
- 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.
|
|
15
|
+
**Current release: `2.8.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
|
|
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.
|
|
17
|
+
**当前发布版本:`2.8.0`** —— 顶部 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
|
@@ -2679,6 +2679,8 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
2679
2679
|
".smem-autodream-note{font-size:11.5px;color:var(--dsw-alias-label-secondary);line-height:1.5;}",
|
|
2680
2680
|
// 2.7.1(Q04):上限设置的诊断清单 —— 逐条列宿主的原话,缩进浅一点、行距紧一点。
|
|
2681
2681
|
".smem-diag-list{margin:4px 0 4px 16px;padding:0;font-size:11.5px;line-height:1.6;color:var(--dsw-alias-label-secondary);}",
|
|
2682
|
+
// 2.8.0(子槽):第三方向 settings.memory.starmap 注入的视图挂在这里,空的时候不占位置。
|
|
2683
|
+
".smem-extra-slot{margin-top:14px;padding-top:12px;border-top:0.5px solid var(--dsw-alias-border-l2);}",
|
|
2682
2684
|
".smem-autodream-list{display:flex;flex-direction:column;gap:6px;}",
|
|
2683
2685
|
".smem-report{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;padding:6px 9px;font-size:12px;cursor:pointer;background:transparent;color:inherit;text-align:left;font-family:inherit;}",
|
|
2684
2686
|
".smem-report:hover{border-color:var(--dsw-alias-border-l2);}",
|
|
@@ -4268,6 +4270,7 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
4268
4270
|
"entry.sidebarUnsupported": "当前宿主不支持侧栏入口。",
|
|
4269
4271
|
"entry.degraded": "当前宿主不支持侧栏入口,已临时按「只显示设置页」显示。",
|
|
4270
4272
|
"entry.legacyHost": "宿主模块还是旧版本,重启 DSH 后可选「只显示侧栏」。",
|
|
4273
|
+
"entry.sidebarHidesSlot": "选这一档后,第三方通过「记忆星图」子槽注入的视图也会一起藏掉 —— 那一块挂在设置页上。",
|
|
4271
4274
|
"entry.notice.saved": "界面入口已更新。",
|
|
4272
4275
|
"entry.err.noSetSettings": "宿主侧还没有 setSettings 接口(插件版本较旧)",
|
|
4273
4276
|
"entry.err.saveFailed": "保存失败(未知原因)",
|
|
@@ -4777,6 +4780,7 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
4777
4780
|
"entry.sidebarUnsupported": "This host does not support the sidebar entry.",
|
|
4778
4781
|
"entry.degraded": "The sidebar entry is unavailable on this host, so the Settings entry is shown instead.",
|
|
4779
4782
|
"entry.legacyHost": "The host module is still the old version; restart DSH to choose Sidebar only.",
|
|
4783
|
+
"entry.sidebarHidesSlot": "With this mode, views that third-party plugins inject into the “memory starmap” sub-slot disappear too — they live on the Settings page.",
|
|
4780
4784
|
"entry.notice.saved": "Interface entries updated.",
|
|
4781
4785
|
"entry.err.noSetSettings": "The host has no setSettings API yet (older plugin version)",
|
|
4782
4786
|
"entry.err.saveFailed": "Save failed (unknown reason)",
|
|
@@ -6054,6 +6058,12 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
6054
6058
|
? h("div", { className: "smem-autodream-note smem-ad-warn", key: "deg" },
|
|
6055
6059
|
t(entryApiModern === false ? "entry.legacyHost" : "entry.degraded"))
|
|
6056
6060
|
: null,
|
|
6061
|
+
// 2.8.0:子槽接上渲染之后,「只显示侧栏」会连带把别人注入进来的视图一起藏掉
|
|
6062
|
+
// (设置页 section 一注销,挂在它下面的 `settings.memory.starmap` 就没了)。
|
|
6063
|
+
// 这不是 bug,但选这一档的人得先知道 —— 所以只在选中的时候写一句。
|
|
6064
|
+
entryModeValue === "sidebar" && !entryIsDegraded
|
|
6065
|
+
? h("div", { className: "smem-autodream-note", key: "slotloss" }, t("entry.sidebarHidesSlot"))
|
|
6066
|
+
: null,
|
|
6057
6067
|
entryErr ? h("div", { className: "smem-autodream-note smem-ad-warn", key: "err" }, entryErr) : null,
|
|
6058
6068
|
]),
|
|
6059
6069
|
// 自动归档那一段(三档策略 + 三个阈值)**已挪到「自动归档」页签**(v0.9.9):
|
|
@@ -6697,6 +6707,30 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
6697
6707
|
]);
|
|
6698
6708
|
}
|
|
6699
6709
|
|
|
6710
|
+
/**
|
|
6711
|
+
* 渲染 `settings.memory.starmap` 子槽(2.8.0)。
|
|
6712
|
+
*
|
|
6713
|
+
* 1.8.0 起这个子槽就**只声明不渲染**(`Section` 从没调过 `renderSlot`):
|
|
6714
|
+
* 第三方按契约往里面注入视图,一个像素都不会出现。接上之后:
|
|
6715
|
+
* - `renderSlot` 是宿主经 props 传进来的(声明了 children 才有),旧外壳可能没有 → 判类型;
|
|
6716
|
+
* - 返回 null / false 表示没有占用者 —— 此时**不占版面**(空 div 也会破坏间距);
|
|
6717
|
+
* - 出任何异常都吞掉:这是个可选面,绝不能让第三方把整个设置页拖垮。
|
|
6718
|
+
* ⚠️ 连带后果(2.7.0 的入口三选一带来的):「只显示侧栏」会把设置页 section 注销,
|
|
6719
|
+
* 于是注入到这里的内容也跟着消失 —— 所以那一档的文案里点明了一句(`entry.sidebarHidesSlot`)。
|
|
6720
|
+
*/
|
|
6721
|
+
function renderMemoryExtraSlot(props) {
|
|
6722
|
+
if (!props || typeof props.renderSlot !== "function") return null;
|
|
6723
|
+
try {
|
|
6724
|
+
// owner 传 `{}`:官方对 root scope 的子槽就是这么调的(`renderSlot("shell.overlay", {})`、
|
|
6725
|
+
// `renderSlot("main", {}, …)`)—— 少传一个参数在对 scope 做检查的宿主上可能直接抛。
|
|
6726
|
+
const node = props.renderSlot("settings.memory.starmap", {});
|
|
6727
|
+
if (node === null || node === undefined || node === false) return null;
|
|
6728
|
+
return h("div", { className: "smem-extra-slot", key: "extra-slot" }, node);
|
|
6729
|
+
} catch (e) {
|
|
6730
|
+
return null;
|
|
6731
|
+
}
|
|
6732
|
+
}
|
|
6733
|
+
|
|
6700
6734
|
function Section(props) {
|
|
6701
6735
|
// 走 stableRemote:真实宿主里 `ctx.get()` 每次返回新对象(issue #3 的成因)。
|
|
6702
6736
|
// 这个面板的 effect 依赖是 `[]`、暂时不会爆,但引用稳定是**所有**面板的共同前提。
|
|
@@ -8159,6 +8193,9 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8159
8193
|
h(AuditPanel, { key: "audit", report: audit, busy: auditBusy, onRun: runAudit, standalone: true }),
|
|
8160
8194
|
])
|
|
8161
8195
|
: h("div", { className: "smem-view", key: "files" }, filesView),
|
|
8196
|
+
// 2.8.0:第三方注入的视图(`settings.memory.starmap` 子槽)。没有占用者时是 null,
|
|
8197
|
+
// 一个 div 都不出 —— 所以默认安装下界面与 2.7.0 逐像素相同。
|
|
8198
|
+
renderMemoryExtraSlot(props),
|
|
8162
8199
|
// 2.6.0:复制成功的回执铺在视口下方中央(`position:fixed`,不吃点击,10s 自收,
|
|
8163
8200
|
// 也能自己点 × 关)。渲染在 `.smem-root` 直属层 —— 别塞进带进场动画的
|
|
8164
8201
|
// `.smem-view`(那个祖先有 transform,`fixed` 会被改写定位)。
|
|
@@ -8516,9 +8553,10 @@ h("span", { key: "sep", className: "smem-actions-sep", "aria-hidden": "true" }),
|
|
|
8516
8553
|
order: 20,
|
|
8517
8554
|
label: function () { return t("section.label"); },
|
|
8518
8555
|
// 声明「记忆星图」子槽(沿用 1.8.0 的契约):sage-starmap 之类的
|
|
8519
|
-
//
|
|
8520
|
-
//
|
|
8521
|
-
//
|
|
8556
|
+
// 第三方插件向它注入视图。2.8.0 起 `Section` 真的调 `renderSlot` 了
|
|
8557
|
+
// (之前只声明、不渲染 —— 注进来的东西一个像素都不出现)。
|
|
8558
|
+
// ⚠️ 连带后果:注销这个 section 时子槽跟着没(「只显示侧栏」那一档),
|
|
8559
|
+
// 界面文案里已点明(`entry.sidebarHidesSlot`)。
|
|
8522
8560
|
children: { "settings.memory.starmap": { kind: "list", scope: "root" } },
|
|
8523
8561
|
}, function (props) {
|
|
8524
8562
|
return react.createElement(Section, { ...props, ctx: ctx });
|
package/package.json
CHANGED