memory-eternal 0.9.2 → 0.9.4
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/.claude-plugin/plugin.json +16 -16
- package/.codex-plugin/plugin.json +16 -16
- package/.cursor-plugin/plugin.json +16 -16
- package/README.en.md +6 -0
- package/README.md +6 -0
- package/index.js +80 -2
- package/lib/client.js +2 -2
- package/package.json +35 -7
- package/web/app.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "memory-eternal",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"description": "璁板繂鏍稿績锛圡emory Eternal锛夛細鐭ヨ瘑鍗¤嚜鍔ㄦ矇娣€/鍙洖锛岀粺涓€ ~/.dsh/memory-vault锛屼細璇濈粨鏉熻嚜鍔ㄥ叆搴撹繘寰呭鏍搞€?,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "EternalNight996",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
2
|
"name": "memory-eternal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "璁板繂鏍稿績锛圡emory Eternal锛夛細鐭ヨ瘑鍗¤嚜鍔ㄦ矇娣€/鍙洖锛岀粺涓€ ~/.dsh/memory-vault锛屼細璇濈粨鏉熻嚜鍔ㄥ叆搴撹繘寰呭鏍搞€?,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "EternalNight996",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"mcpServers": "./.mcp.json",
|
|
14
14
|
"hooks": "./hooks/hooks.codex.json"
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
2
|
"name": "memory-eternal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "璁板繂鏍稿績锛圡emory Eternal锛夛細鐭ヨ瘑鍗¤嚜鍔ㄦ矇娣€/鍙洖锛岀粺涓€ ~/.dsh/memory-vault锛屼細璇濈粨鏉熻嚜鍔ㄥ叆搴撹繘寰呭鏍搞€?,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "EternalNight996",
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
"mcpServers": "./.mcp.json",
|
|
13
13
|
"hooks": "./hooks/hooks.cursor.json"
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
package/README.en.md
CHANGED
|
@@ -244,8 +244,14 @@ npm run build # builds lib/client.js (DSH embed) + web/app.js (standalone web
|
|
|
244
244
|
|
|
245
245
|
## 📋 Changelog
|
|
246
246
|
|
|
247
|
+
> **Withdrawn versions**: **v0.9.1 / v0.9.2 are deprecated on npm and their release tags have been removed from git** — both ship the blank-memory-page defect. Use **v0.9.3+** (`npm i memory-eternal@latest`). v0.9.0 is deprecated too (its capture alerts false-alarm).
|
|
248
|
+
|
|
249
|
+
> **DSH compatibility**: `>=0.1.5-alpha.2 <0.2.0`. **v0.9.4 adds support for DSH v0.1.7-rc.2**, which replaced the settings service with a forms-only API and removed `@deepseek-ai/dsh-client-runtime` / `settingsScope`. The 0.1.5 line still uses the legacy `settings.register` path; both paths are kept.
|
|
250
|
+
|
|
247
251
|
| Version | Date | Highlights |
|
|
248
252
|
|---|---|---|
|
|
253
|
+
| **v0.9.4** | 2026-09-28 | **DSH v0.1.7-rc.2 support (fixes "the plugin goes dark after the upgrade")**: (1) **The settings service was replaced** — in 0.1.7 `ctx.settings` is a forms-only API (`describe/update/replace/mutate/configure`) with no `register()`; the old `ctx.settings.register(...)` call throws a `TypeError`, so the plugin never mounts (memory page gone, auto-capture dead). A cross-version shim keeps `register` for older hosts while new hosts read the **live config reference** the loader passes in, subscribe to `loader/volatile-update` for hot updates, and write back through `settings.update(entry id, patch, revision)` (revision conflicts map to HTTP 409); it also registers `configure({ auto:false })` so the host does not generate a duplicate form page. (2) **Volatile field marking moved after construction**: no more chained `.volatile()` — that method only exists in schemastery ≥3.18.4, while the plugin actually resolves **3.18.1** at the profile level, so the chain threw `volatile is not a function` at import time and killed the plugin. (3) **Dead client references removed**: `inject` no longer lists `settingsScope`, which disappeared together with `@deepseek-ai/dsh-client-runtime` (0.1.7 has no such service, so the client plugin waited forever and never activated — taking the memory page and the sidebar button with it); `dsh.client.inject` dropped its non-existent package names. (4) New **`tests/settings-compat.test.mjs`** (8 cases: 0.1.7-shaped mount / live-reference reads / volatile hot update / write-back and revision conflict / legacy `register` path / field volatile markers) wired into `npm test`. Verified by booting a **real DSH v0.1.7-rc.2**: the host plugin mounts (config written to `memory-eternal-config.json`) and the client bundle composes into the boot graph (`plugins/??memory-eternal/client.js`) |
|
|
254
|
+
| **v0.9.3** | 2026-09-12 | **Fixed the blank memory page ("no UI")**: v0.9.1 placed the infinite-scroll `useEffect` **before** the `loadCards` definition — React evaluates the dependency array during render, hitting a TDZ error (`Cannot access 'loadCards' before initialization`) that **crashed the whole memory page on first render**. It now comes after the definition. Added a **render smoke test** (`tests/ssr.test.mjs`: renders the built bundle through all four entry points — cards / settings / usage / graph — wired into `npm test`) so "green build, blank page" bugs cannot ship again |
|
|
249
255
|
| **v0.9.2** | 2026-09-12 | **Log visibility + false-alarm fix**: the capture log is now **persisted to disk** (`~/.dsh/memory-eternal-capture.jsonl`, last 500 entries) — the standalone web page no longer says "log only available inside the DSH host" but shows the records, and history survives a host restart (read back on boot); fixed **stall-detector false alarms flooding the panel** (mismatched turn counters are normal: sub-agent turns and cancelled turns emit no `turn-stopping`; it now requires "turns running **and** no capture activity for 15 minutes" to alert once, and the alarm clears as soon as activity resumes — no more one `fail` line every 10 minutes permanently turning health red); when distillation returns nothing / unparseable JSON the content is **saved as a raw card instead of being dropped** |
|
|
250
256
|
| **v0.9.1** | 2026-09-12 | **Performance & UX batch**: memory page loads lazily per view (opening Settings no longer drags in 250KB of cards + 890KB of graph; first paint needs ~0.5KB); graph generation **3232ms → 43ms** (bigram sets computed once + lossless mathematical-bound pruning + tag inverted index) plus a server-side cache with **fingerprint invalidation** (write/audit/delete rebuilds immediately, no stale reads); site-wide **brotli q5** (graph 877KB → **54KB**, 34% smaller than gzip; cards 246KB → 83KB → 20KB with br) and large responses compressed with both br and gzip keeping the smaller, so no response is ever worse than gzip; `/cards` gained **real pagination** (offset/limit/total + server-side title sort, globally ordered across pages) loading 100 cards first and fetching more on scroll; the "Agent cards" panel in Usage/Today filters by agent server-side (30 rows); **audit red line**: the plugin injects "never call approve/reject on the user's behalf" into the agent context; the watchdog now **reaps redundant instances on fallback ports** (a duplicate web process holding 76MB was reaped in testing) |
|
|
251
257
|
| **v0.9.0** | 2026-09-12 | **Fixed silent auto-capture death (6 days without a single card)**: after a DSH upgrade the session event API moved from `events` to `ownEvents()/snapshotEvents()`; the listener read nothing, returned silently and left no trace — now it tries `ownEvents()` → `snapshotEvents()` → `events` and logs a per-session attach entry. Daily quota now counts **real writes only** (previously every "not worth saving" verdict burned quota, exhausting the 24h budget after 40 attempts); `captureCooldownMs` actually applies; a single capture input is tail-capped at 20k chars. New **capture log** panel and **active failure alerts** (red strip + agent-context injection + turn-stopping stall sweep). Removed the automatic "Daily review" digest (timer / `/todayBrief` route / UI button). |
|
package/README.md
CHANGED
|
@@ -257,8 +257,14 @@ npm run build # 构建 lib/client.js(DSH 内嵌)+ web/app.js(独立 web
|
|
|
257
257
|
|
|
258
258
|
## 📋 更新日志
|
|
259
259
|
|
|
260
|
+
> **版本撤回说明**:**v0.9.1 / v0.9.2 已从 npm 标记 deprecated 并从 git 取回(release tag 已删除)** —— 这两版带记忆页白屏缺陷,请使用 **v0.9.3+**(`npm i memory-eternal@latest`)。v0.9.0 同样标记 deprecated(沉淀告警会误报刷屏)。
|
|
261
|
+
|
|
262
|
+
> **DSH 兼容性**:`>=0.1.5-alpha.2 <0.2.0`。**v0.9.4 起适配 DSH v0.1.7-rc.2**(该版本把设置服务换成纯表单 API,并移除了 `@deepseek-ai/dsh-client-runtime` 与 `settingsScope`)。0.1.5 系列仍走旧的 `settings.register` 路径,两条路径都保留。
|
|
263
|
+
|
|
260
264
|
| 版本 | 日期 | 关键改动 |
|
|
261
265
|
|---|---|---|
|
|
266
|
+
| **v0.9.4** | 2026-09-28 | **适配 DSH v0.1.7-rc.2(修复「升级后插件整体失联」)**:① **设置服务换血** —— 0.1.7 的 `ctx.settings` 只剩表单 API(`describe/update/replace/mutate/configure`),不再有 `register()`;旧代码 `ctx.settings.register(...)` 直接抛 `TypeError`,插件根本挂不上(记忆页消失、自动沉淀停摆)。现改为跨版本兼容层:旧版仍走 `register`,新版读 loader 传进来的**活配置引用**、订阅 `loader/volatile-update` 做热更新、写回走 `settings.update(条目 id, patch, revision)`(revision 冲突映射 HTTP 409),并注册 `configure({ auto:false })` 免得宿主再生成一张重复的表单页。② **字段 volatile 标记改为构造后统一打**:不再链式写 `.volatile()` —— 该方法 schemastery ≥3.18.4 才有,而插件在 profile 层实际解析到的是 **3.18.1**,链式调用会在 `import` 期抛 `volatile is not a function`,把插件整个打挂。③ **客户端去死引用**:`inject` 移除已随 `@deepseek-ai/dsh-client-runtime` 一起消失的 `settingsScope`(0.1.7 客户端服务表里已无此服务,插件会永远等待服务而永不激活 → 记忆页与侧边栏按钮全部不见);`dsh.client.inject` 同步去掉不存在的包名。④ 新增 **`tests/settings-compat.test.mjs`**(8 项:0.1.7 形状挂载 / 活引用读值 / volatile 热更新 / 写回与 revision 冲突 / 老版本 `register` 路径 / 字段 volatile 标记),已并入 `npm test`。已在**真实 DSH v0.1.7-rc.2** 上启动验证:宿主插件正常挂载(配置落盘 `memory-eternal-config.json`)、客户端 bundle 正常进入 boot graph(`plugins/??memory-eternal/client.js`) |
|
|
267
|
+
| **v0.9.3** | 2026-09-12 | **修复记忆页白屏("没画面")**:v0.9.1 把「滚动续拉」的 `useEffect` 写在了 `loadCards` 定义**之前**——React 在渲染期求值依赖数组,触发 TDZ(`Cannot access 'loadCards' before initialization`),**整个记忆页一渲染就崩**;现已移到定义之后。**新增渲染冒烟测试**(`tests/ssr.test.mjs`:真跑打包产物、把卡片/设置/用量/图谱四个入口各渲染一遍,已并入 `npm test`)——「构建全绿、页面白屏」这类 bug 以后发不出去 |
|
|
262
268
|
| **v0.9.2** | 2026-09-12 | **日志可见性 + 误报修复**:自动沉淀日志**落盘持久化**(`~/.dsh/memory-eternal-capture.jsonl`,最多 500 条)——独立 Web 页不再显示「日志仅在 DSH 宿主内可用」而是直接能看到记录,宿主重启后历史也不丢(启动时读回);修复**停滞探测误报刷屏**(轮次计数对不上其实是常态:子代理轮次、被取消的轮次都不发 `turn-stopping`;现在要求「有轮次在跑 **且** 15 分钟无任何沉淀活动」才报一次,活动恢复即自动撤销,不再每 10 分钟刷一条把面板挤满、健康状态永久亮红);蒸馏无输出/JSON 解析失败时**改为原文卡兜底**,内容不再白丢 |
|
|
263
269
|
| **v0.9.1** | 2026-09-12 | **性能与体验批次**:记忆页按视图**懒加载**(打开「设置」不再顺带拉 250KB 卡片 + 890KB 图谱,首屏只需约 0.5KB);知识图谱生成 **3232ms → 43ms**(bigram 集合只算一次 + 数学上界剪枝无损跳过 + 标签倒排),并加**指纹精确失效**的服务端缓存(写卡/审核/删卡立即重建,无脏读);全站 **brotli q5**(图谱 877KB → **54KB**,比 gzip 再小 34%;卡片 246KB → 83KB → br 20KB),大响应体同时压 br + gzip 取更小者,保证任何响应都不比 gzip 差;`/cards` 支持**真分页**(offset/limit/total + 服务端标题排序,跨页全局有序),首屏只拉 100 条、滚到底续拉;「用量/今日」的 Agent 卡清单改为服务端署名过滤(30 条);**审核红线**:插件在 Agent 上下文注入「禁止调用 approve/reject 代用户审批」;watchdog **回收备用端口的多余实例**(实测清掉一个常驻 76MB 的重复 web 进程) |
|
|
264
270
|
| **v0.9.0** | 2026-09-12 | **修复自动沉淀静默失效(一连 6 天不写卡)**:DSH 升级后会话事件接口由 `events` 改为 `ownEvents()/snapshotEvents()`,监听器读不到事件后静默返回、不留任何痕迹 —— 现改为三级自适应取法(`ownEvents()` → `snapshotEvents()` → `events`)+ 每会话接入留痕;日配额改为**只统计真实写卡**(此前「不值得保存」的判定也照样扣配额,40 次即耗尽 24h 配额)、`captureCooldownMs` 冷却真正生效、单次沉淀输入截尾 20000 字;新增**自动沉淀日志**面板与**异常主动提示**(页面红条 + 注入 Agent 上下文 + 轮次收尾停滞巡检);移除「每日回顾」自动简报(定时器 / `/todayBrief` 接口 / UI 按钮) |
|
package/index.js
CHANGED
|
@@ -34,6 +34,14 @@ import { appendCaptureLog, readCaptureLog, rotateCaptureLog } from './lib/captur
|
|
|
34
34
|
export const name = 'memory-eternal'
|
|
35
35
|
export const inject = ['systemPrompt', 'settings']
|
|
36
36
|
|
|
37
|
+
// 所有字段都要能被「记忆配置」页写回:dsh ≥0.1.7 的设置服务只把 schema.meta.volatile
|
|
38
|
+
// 为真的字段投影成可编辑表单,保存走 settings.update(条目 id, patch) —— 非 volatile
|
|
39
|
+
// 字段会被拒写。volatile 变更不重挂插件,而是把新值提交进 apply 收到的活引用(见 bindSettings)。
|
|
40
|
+
//
|
|
41
|
+
// 为什么不直接链式写 .volatile():schemastery ≥3.18.4 才有这个方法,而插件在宿主里解析到的
|
|
42
|
+
// 是 profile 层的 schemastery(本机实测仍是 3.18.1)。链式调用会在 import 期抛
|
|
43
|
+
// "TypeError: ...volatile is not a function",把整个插件打挂;这里统一在构造后打标记,
|
|
44
|
+
// 新旧版本行为一致(.volatile() 本身就等价于 .extra('volatile', true),只写 meta)。
|
|
37
45
|
export const Config = z.object({
|
|
38
46
|
enabled: z.boolean().default(true),
|
|
39
47
|
autoCapture: z.boolean().default(true),
|
|
@@ -91,12 +99,82 @@ export const Config = z.object({
|
|
|
91
99
|
auditExemptKinds: z.array(z.string()).default([]),
|
|
92
100
|
})
|
|
93
101
|
|
|
102
|
+
/**
|
|
103
|
+
* 把对象 schema 的每个字段标成 volatile(等价于逐字段 .volatile(),但不依赖该方法存在)。
|
|
104
|
+
* 注意 schemastery 的 Schema 是**可调用对象**(typeof === 'function'),别用 typeof 过滤。
|
|
105
|
+
*/
|
|
106
|
+
function markAllVolatile(schema) {
|
|
107
|
+
for (const field of Object.values(schema?.dict ?? {})) {
|
|
108
|
+
if (field === null || field === undefined) continue
|
|
109
|
+
field.meta = { ...(field.meta ?? {}), volatile: true }
|
|
110
|
+
}
|
|
111
|
+
return schema
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
markAllVolatile(Config)
|
|
115
|
+
|
|
94
116
|
const API_PREFIX = '/memory-eternal/api'
|
|
95
117
|
// DSH 宿主自动沉淀卡的署名:用可读名而非 agent 会话 id,便于在智能体筛选中归组。
|
|
96
118
|
const DSH_AGENT = 'deepseek-harness'
|
|
97
119
|
|
|
120
|
+
// 设置读写兼容层(跨 dsh 版本):
|
|
121
|
+
// dsh ≤0.1.5:ctx.settings 是"设置命名空间注册表",register(ns, Config, { base })
|
|
122
|
+
// 返回带 get()/watch()/update() 的句柄;配置存在 settings.yaml。
|
|
123
|
+
// dsh ≥0.1.7:ctx.settings 只剩表单服务(describe/update/replace/mutate/configure),
|
|
124
|
+
// 没有 register。Config 由 cordis / loader 按 schema 校验后作为**活引用**
|
|
125
|
+
// 传进 apply();volatile 字段变更由 loader 原地提交到该引用并发
|
|
126
|
+
// 'loader/volatile-update';写回走 settings.update(条目 id, patch, revision)。
|
|
127
|
+
// 旧版行为原样保留,新版做等价映射,业务代码继续只依赖 get/watch/update 三个方法。
|
|
128
|
+
function settingsEntryId(ctx) {
|
|
129
|
+
// settings.describe() 以 **Loader 条目的 options.id** 作 ns(见 dsh-settings 实现:
|
|
130
|
+
// `ns: entry.options.id`),所以这里必须取 options.id,而不是带父级前缀的 Entry.id。
|
|
131
|
+
const entry = ctx?.fiber?.entry ?? ctx?.[Symbol.for('cordis.entry')]
|
|
132
|
+
return entry?.options?.id || 'memory-eternal'
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// 无 Loader 挂载、apply 又没拿到 config 时,用标准 schema 校验空对象取默认值。
|
|
136
|
+
function schemaDefaults(schema) {
|
|
137
|
+
try {
|
|
138
|
+
const std = schema?.['~standard']
|
|
139
|
+
if (std && typeof std.validate === 'function') {
|
|
140
|
+
const result = std.validate({})
|
|
141
|
+
if (result && !result.issues) return result.value
|
|
142
|
+
}
|
|
143
|
+
} catch { /* 拿不到默认值就用空对象 */ }
|
|
144
|
+
return {}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function bindSettings(ctx, schema, config) {
|
|
148
|
+
const service = typeof ctx.get === 'function' ? ctx.get('settings') : ctx.settings
|
|
149
|
+
if (service && typeof service.register === 'function') {
|
|
150
|
+
return service.register('memory-eternal', schema, { base: config ?? {} })
|
|
151
|
+
}
|
|
152
|
+
const fallback = schemaDefaults(schema)
|
|
153
|
+
const read = () => config ?? fallback
|
|
154
|
+
const entryId = settingsEntryId(ctx)
|
|
155
|
+
// dsh ≥0.1.7 的表单页策略:本插件自带「记忆」设置页(client 侧注册 settings.section),
|
|
156
|
+
// 声明 auto:false,免得宿主再按 schema 自动生成一张重复的表单页。
|
|
157
|
+
if (service && typeof service.configure === 'function') {
|
|
158
|
+
ctx.effect(() => {
|
|
159
|
+
try { return service.configure({ auto: false }, ctx.fiber) } catch { return () => {} }
|
|
160
|
+
}, 'memory-eternal: settings presentation')
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
get: read,
|
|
164
|
+
watch(listener) {
|
|
165
|
+
const handler = () => { try { listener(read()) } catch { /* 监听器异常不影响宿主 */ } }
|
|
166
|
+
ctx.on('loader/volatile-update', handler)
|
|
167
|
+
return () => { try { ctx.off('loader/volatile-update', handler) } catch { /* 已卸载 */ } }
|
|
168
|
+
},
|
|
169
|
+
async update(patch, expectedRevision) {
|
|
170
|
+
if (!service || typeof service.update !== 'function') throw new Error('当前 DSH 版本不支持写配置')
|
|
171
|
+
await service.update(entryId, patch, expectedRevision)
|
|
172
|
+
},
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
98
176
|
export function apply(ctx, config) {
|
|
99
|
-
const settings = ctx
|
|
177
|
+
const settings = bindSettings(ctx, Config, config)
|
|
100
178
|
|
|
101
179
|
// 首次激活:自动从 .md 文件迁移到 SQLite(幂等,已有数据则跳过)
|
|
102
180
|
const vaultDir = () => {
|
|
@@ -623,7 +701,7 @@ export function apply(ctx, config) {
|
|
|
623
701
|
if (Object.keys(clean).length === 0) return json(res, 400, { ok: false, error: '无可写入字段' })
|
|
624
702
|
if (typeof settings.update === 'function') {
|
|
625
703
|
try {
|
|
626
|
-
await settings.update(clean)
|
|
704
|
+
await settings.update(clean, expectedRevision)
|
|
627
705
|
// 把完整配置写入共享文件,让独立 web / MCP hook 与 DSH 设置同步(不同步修复)
|
|
628
706
|
syncConfigFile()
|
|
629
707
|
return json(res, 200, { ok: true, applied: Object.keys(clean), note: '已保存。autoWebMode/watchdogAutoSpawn 等需重启 DSH 生效' })
|
package/lib/client.js
CHANGED
|
@@ -3,7 +3,7 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
|
-
var Bt=Object.create;var dt=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Ft=(t,l)=>{for(var d in l)dt(t,d,{get:l[d],enumerable:!0})},kt=(t,l,d,v)=>{if(l&&typeof l=="object"||typeof l=="function")for(let m of Dt(l))!jt.call(t,m)&&m!==d&&dt(t,m,{get:()=>l[m],enumerable:!(v=At(l,m))||v.enumerable});return t};var Pt=(t,l,d)=>(d=t!=null?Bt(Rt(t)):{},kt(l||!t||!t.__esModule?dt(d,"default",{value:t,enumerable:!0}):d,t)),Et=t=>kt(dt({},"__esModule",{value:!0}),t);var sa={};Ft(sa,{EN:()=>zt,MemoryLibrary:()=>Xt,ZH:()=>Nt,apply:()=>_t,inject:()=>Ot});module.exports=Et(sa);var n=Pt(require("react"),1),e=require("react/jsx-runtime"),Ge="memory-eternal",W="/memory-eternal/api",$t=100,Ot=["settingsScope","slots","locale","connection","remote"],Nt={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",cardsTab:"\u77E5\u8BC6\u5361",graphTab:"\u77E5\u8BC6\u56FE\u8C31",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedSkipped:"\uFF08\u8DF3\u8FC7\u91CD\u590D ",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u7528\u91CF/\u4ECA\u65E5",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",tabAudit:"\u5BA1\u6838\u4E2D\u5FC3",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
6
|
+
var Bt=Object.create;var dt=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Ft=(t,l)=>{for(var d in l)dt(t,d,{get:l[d],enumerable:!0})},kt=(t,l,d,v)=>{if(l&&typeof l=="object"||typeof l=="function")for(let m of Dt(l))!jt.call(t,m)&&m!==d&&dt(t,m,{get:()=>l[m],enumerable:!(v=At(l,m))||v.enumerable});return t};var Pt=(t,l,d)=>(d=t!=null?Bt(Rt(t)):{},kt(l||!t||!t.__esModule?dt(d,"default",{value:t,enumerable:!0}):d,t)),Et=t=>kt(dt({},"__esModule",{value:!0}),t);var sa={};Ft(sa,{EN:()=>zt,MemoryLibrary:()=>Xt,ZH:()=>Nt,apply:()=>_t,inject:()=>Ot});module.exports=Et(sa);var n=Pt(require("react"),1),e=require("react/jsx-runtime"),Ge="memory-eternal",W="/memory-eternal/api",$t=100,Ot=["slots","locale"],Nt={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",cardsTab:"\u77E5\u8BC6\u5361",graphTab:"\u77E5\u8BC6\u56FE\u8C31",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedSkipped:"\uFF08\u8DF3\u8FC7\u91CD\u590D ",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u7528\u91CF/\u4ECA\u65E5",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",tabAudit:"\u5BA1\u6838\u4E2D\u5FC3",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
7
7
|
|
|
8
8
|
## \u80CC\u666F
|
|
9
9
|
- \u95EE\u9898\u63CF\u8FF0
|
|
@@ -219,7 +219,7 @@ Option A, because:
|
|
|
219
219
|
.me-graph-ctxmenu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: none; border-radius: 7px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
|
|
220
220
|
.me-graph-ctxmenu button:hover { background: rgba(255,255,255,0.1); }
|
|
221
221
|
.me-graph-hint { font-size: 11px; opacity: 0.6; margin-left: auto; }
|
|
222
|
-
`;function _t(t){t.effect(()=>t.locale.register(Ge,{zh:Nt,en:zt}),"memory-eternal: locale");let l=t.locale.bind(Ge);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:Ge,order:25,label:()=>l("nav"),locale:Ge,inject:()=>({})},()=>n.default.createElement(Kt,{t:l}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${Ge}:footer`,order:100,label:()=>l("nav"),locale:Ge,inject:()=>({})},d=>n.default.createElement(Yt,{t:l,locale:t.locale,wide:!(d&&d.wide===!1)}))),"memory-eternal: sidebar footer action")}function Ut(){let[t,l]=(0,n.useState)("http://127.0.0.1:7999/");return(0,n.useEffect)(()=>{fetch("/memory-eternal/api/web-info").then(d=>d.json()).then(d=>{d&&d.ok&&d.url&&l(d.url.endsWith("/")?d.url:d.url+"/")}).catch(()=>{})},[]),t}function Kt({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:Ie}),(0,e.jsx)(Tt,{t,onReload:()=>{},version:0})]})}function Yt({t,locale:l,wide:d}){let[v,m]=(0,n.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${d?"":" rail"}`,children:[(0,e.jsx)("style",{children:Ie}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>m(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(Lt,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),v&&(0,e.jsx)(qt,{t,locale:l,onClose:()=>m(!1)})]})}function qt({t,locale:l,onClose:d,tab:v}){let[m,i]=(0,n.useState)(!1),A=(0,n.useRef)(null),C=Ut(),L=(0,n.useCallback)(D=>l&&typeof l.subscribe=="function"?l.subscribe(D):()=>{},[l]),S=(0,n.useCallback)(()=>l&&typeof l.getSnapshot=="function"?l.getSnapshot():null,[l]),k=(0,n.useSyncExternalStore)(L,S),y=k&&(k.active==="zh"||k.active==="en")?k.active:null,x=(0,n.useRef)(null);x.current===null&&y&&(x.current=y);let U=(0,n.useMemo)(()=>{let D=x.current?`lang=${x.current}`:"";return v==="config"?`${W}/ui/config?tab=config${D?`&${D}`:""}`:v?`${C.replace(/\/$/,"")}/?tab=${v}${D?`&${D}`:""}`:D?`${C}${C.endsWith("/")?"":"/"}?${D}`:C},[C,v]);return(0,n.useEffect)(()=>{let D=A.current&&A.current.contentWindow;D&&y&&D.postMessage({source:"memory-eternal",type:"locale",lang:y},"*")},[y]),(0,n.useEffect)(()=>{let D=N=>{N.key==="Escape"&&d()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[d]),(0,e.jsxs)("div",{className:"me-overlay-top",onClick:d,children:[(0,e.jsx)("style",{children:Ie}),(0,e.jsx)("div",{className:"me-modal",onClick:D=>D.stopPropagation(),style:m?{position:"fixed",inset:0,width:"100vw",height:"100vh",maxWidth:"100vw",maxHeight:"100vh",borderRadius:0}:{},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{style:{position:"absolute",top:8,right:8,zIndex:10,display:"flex",gap:4,padding:"4px 6px",background:"var(--dsw-alias-bg-overlay, rgba(17,24,39,0.45))",borderRadius:8,backdropFilter:"blur(4px)"},children:[(0,e.jsx)("button",{type:"button",onClick:()=>i(D=>!D),"aria-label":t(m?"exitFullscreen":"enterFullscreen"),title:t(m?"exitFullscreen":"enterFullscreen"),style:{width:26,height:26,borderRadius:6,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.08)",color:"#fff",cursor:"pointer",fontSize:14,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:m?"\u2921":"\u2922"}),(0,e.jsx)("button",{type:"button",onClick:d,"aria-label":t("close"),title:t("close"),style:{width:26,height:26,borderRadius:6,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.08)",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),(0,e.jsx)("iframe",{ref:A,src:U,title:"memory-eternal",style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"var(--dsw-alias-bg-base, #fff)"}})]})})]})}function Lt(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}function Xt({t,inModal:l,onClose:d,onFull:v,full:m}){let[i,A]=(0,n.useState)(null),[C,L]=(0,n.useState)([]),[S,k]=(0,n.useState)(!0),[y,x]=(0,n.useState)(null),[U,D]=(0,n.useState)(""),[N,H]=(0,n.useState)("all"),[w,P]=(0,n.useState)(""),[re,ee]=(0,n.useState)("all"),[E,Le]=(0,n.useState)("all"),[R,be]=(0,n.useState)(()=>{try{let u=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),j={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config"};if(u&&j[u])return j[u]}catch{}return"cards"}),[b,ie]=(0,n.useState)(()=>new Set([R])),g=(0,n.useCallback)(u=>{ie(j=>j.has(u)?j:new Set(j).add(u)),be(u)},[]),[I,_]=(0,n.useState)("recent"),[V,F]=(0,n.useState)(null),O=(0,n.useRef)(null),J=(0,n.useRef)(null),[G,ye]=(0,n.useState)(!1),[Re,We]=(0,n.useState)(null),[Me,de]=(0,n.useState)(!1),[Z,c]=(0,n.useState)(!0),[Y,X]=(0,n.useState)(null),[oe,Ne]=(0,n.useState)(0),Ae=(0,n.useCallback)(()=>Ne(u=>u+1),[]),ze=(0,n.useRef)(null),[He,_e]=(0,n.useState)(0),[je,le]=(0,n.useState)(!1),Ke=(0,n.useRef)(null),Se=(0,n.useRef)(null)
|
|
222
|
+
`;function _t(t){t.effect(()=>t.locale.register(Ge,{zh:Nt,en:zt}),"memory-eternal: locale");let l=t.locale.bind(Ge);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:Ge,order:25,label:()=>l("nav"),locale:Ge,inject:()=>({})},()=>n.default.createElement(Kt,{t:l}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${Ge}:footer`,order:100,label:()=>l("nav"),locale:Ge,inject:()=>({})},d=>n.default.createElement(Yt,{t:l,locale:t.locale,wide:!(d&&d.wide===!1)}))),"memory-eternal: sidebar footer action")}function Ut(){let[t,l]=(0,n.useState)("http://127.0.0.1:7999/");return(0,n.useEffect)(()=>{fetch("/memory-eternal/api/web-info").then(d=>d.json()).then(d=>{d&&d.ok&&d.url&&l(d.url.endsWith("/")?d.url:d.url+"/")}).catch(()=>{})},[]),t}function Kt({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:Ie}),(0,e.jsx)(Tt,{t,onReload:()=>{},version:0})]})}function Yt({t,locale:l,wide:d}){let[v,m]=(0,n.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${d?"":" rail"}`,children:[(0,e.jsx)("style",{children:Ie}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>m(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(Lt,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),v&&(0,e.jsx)(qt,{t,locale:l,onClose:()=>m(!1)})]})}function qt({t,locale:l,onClose:d,tab:v}){let[m,i]=(0,n.useState)(!1),A=(0,n.useRef)(null),C=Ut(),L=(0,n.useCallback)(D=>l&&typeof l.subscribe=="function"?l.subscribe(D):()=>{},[l]),S=(0,n.useCallback)(()=>l&&typeof l.getSnapshot=="function"?l.getSnapshot():null,[l]),k=(0,n.useSyncExternalStore)(L,S),y=k&&(k.active==="zh"||k.active==="en")?k.active:null,x=(0,n.useRef)(null);x.current===null&&y&&(x.current=y);let U=(0,n.useMemo)(()=>{let D=x.current?`lang=${x.current}`:"";return v==="config"?`${W}/ui/config?tab=config${D?`&${D}`:""}`:v?`${C.replace(/\/$/,"")}/?tab=${v}${D?`&${D}`:""}`:D?`${C}${C.endsWith("/")?"":"/"}?${D}`:C},[C,v]);return(0,n.useEffect)(()=>{let D=A.current&&A.current.contentWindow;D&&y&&D.postMessage({source:"memory-eternal",type:"locale",lang:y},"*")},[y]),(0,n.useEffect)(()=>{let D=N=>{N.key==="Escape"&&d()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[d]),(0,e.jsxs)("div",{className:"me-overlay-top",onClick:d,children:[(0,e.jsx)("style",{children:Ie}),(0,e.jsx)("div",{className:"me-modal",onClick:D=>D.stopPropagation(),style:m?{position:"fixed",inset:0,width:"100vw",height:"100vh",maxWidth:"100vw",maxHeight:"100vh",borderRadius:0}:{},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{style:{position:"absolute",top:8,right:8,zIndex:10,display:"flex",gap:4,padding:"4px 6px",background:"var(--dsw-alias-bg-overlay, rgba(17,24,39,0.45))",borderRadius:8,backdropFilter:"blur(4px)"},children:[(0,e.jsx)("button",{type:"button",onClick:()=>i(D=>!D),"aria-label":t(m?"exitFullscreen":"enterFullscreen"),title:t(m?"exitFullscreen":"enterFullscreen"),style:{width:26,height:26,borderRadius:6,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.08)",color:"#fff",cursor:"pointer",fontSize:14,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:m?"\u2921":"\u2922"}),(0,e.jsx)("button",{type:"button",onClick:d,"aria-label":t("close"),title:t("close"),style:{width:26,height:26,borderRadius:6,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.08)",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),(0,e.jsx)("iframe",{ref:A,src:U,title:"memory-eternal",style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"var(--dsw-alias-bg-base, #fff)"}})]})})]})}function Lt(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}function Xt({t,inModal:l,onClose:d,onFull:v,full:m}){let[i,A]=(0,n.useState)(null),[C,L]=(0,n.useState)([]),[S,k]=(0,n.useState)(!0),[y,x]=(0,n.useState)(null),[U,D]=(0,n.useState)(""),[N,H]=(0,n.useState)("all"),[w,P]=(0,n.useState)(""),[re,ee]=(0,n.useState)("all"),[E,Le]=(0,n.useState)("all"),[R,be]=(0,n.useState)(()=>{try{let u=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),j={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config"};if(u&&j[u])return j[u]}catch{}return"cards"}),[b,ie]=(0,n.useState)(()=>new Set([R])),g=(0,n.useCallback)(u=>{ie(j=>j.has(u)?j:new Set(j).add(u)),be(u)},[]),[I,_]=(0,n.useState)("recent"),[V,F]=(0,n.useState)(null),O=(0,n.useRef)(null),J=(0,n.useRef)(null),[G,ye]=(0,n.useState)(!1),[Re,We]=(0,n.useState)(null),[Me,de]=(0,n.useState)(!1),[Z,c]=(0,n.useState)(!0),[Y,X]=(0,n.useState)(null),[oe,Ne]=(0,n.useState)(0),Ae=(0,n.useCallback)(()=>Ne(u=>u+1),[]),ze=(0,n.useRef)(null),[He,_e]=(0,n.useState)(0),[je,le]=(0,n.useState)(!1),Ke=(0,n.useRef)(null),Se=(0,n.useRef)(null),r=(0,n.useCallback)(async(u=N,j=w,K=E,ue={})=>{let pe=ue.append===!0;try{pe?le(!0):(k(!0),D(""));let me=new URLSearchParams;u&&u!=="all"&&me.set("kind",u),j.trim()&&me.set("q",j.trim()),me.set("status",K||"all"),me.set("limit",String($t)),me.set("offset",String(ue.offset||0)),I==="title"&&me.set("sort","title");let Ee=await(await fetch(`${W}/cards?${me.toString()}`)).json();if(Ee.ok){let Fe=Ee.cards||[];L(Ce=>pe?[...Ce,...Fe.filter(Ye=>!Ce.some(qe=>qe.path===Ye.path))]:Fe),_e(Number(Ee.total)||Fe.length)}}catch(me){D(String(me&&me.message?me.message:me))}finally{pe?le(!1):k(!1)}},[N,w,E,I]),o=(0,n.useCallback)(async()=>{try{let[u,j]=await Promise.all([fetch(`${W}/overview`).then(K=>K.json()),fetch(`${W}/capture-log`).then(K=>K.json()).catch(()=>null)]);u.ok&&A(u),x(j&&j.ok&&j.available&&j.health||null)}catch(u){D(String(u&&u.message?u.message:u))}finally{k(!1)}},[]),z=async u=>{try{let K=await(await fetch(`${W}/delete?path=${encodeURIComponent(u)}`)).json();K.ok?(F({ok:!0,msg:t("deleted")}),await o(),Ae()):F({ok:!1,msg:K.error||t("deleteFail")})}catch{F({ok:!1,msg:t("deleteFail")})}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>F(null),2e3)};(0,n.useEffect)(()=>(o(),()=>{ze.current&&clearTimeout(ze.current)}),[o]);let te=u=>{P(u),ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>r(N,u,E),280)},ce=u=>{H(u),r(u,w,E)};(0,n.useEffect)(()=>{R==="cards"&&r(N,w,E)},[E,R,oe,I]),(0,n.useEffect)(()=>{if(R!=="cards"||S||je||C.length>=He)return;let u=Ke.current,j=Se.current;if(!u)return;let K=new IntersectionObserver(ue=>{ue[0]&&ue[0].isIntersecting&&r(N,w,E,{append:!0,offset:C.length})},{root:j||null,rootMargin:"400px"});return K.observe(u),()=>K.disconnect()},[R,C,He,S,je,N,w,E,r]);let ke=async u=>{try{let K=await(await fetch(`${W}/card?path=${encodeURIComponent(u.path||u.id)}`)).json();K.ok&&We({path:K.path,title:u.title,text:K.text})}catch(j){D(String(j&&j.message?j.message:j))}},a=async(u,j)=>{ye(!0);try{let K=await fetch(`${W}/export`);if(!K.ok)throw new Error("HTTP "+K.status);let ue=await K.json();if(!ue.ok)throw new Error(ue.error||"export failed");let pe,me,ge;u==="json"?(me="memory-vault.json",ge="application/json",pe=JSON.stringify(ue.cards.map(Ce=>({path:Ce.path,title:Ce.title,kind:Ce.kind,text:Ce.text})),null,2)):(me="memory-vault.md",ge="text/markdown;charset=utf-8",pe=ue.cards.map(Ce=>Ce.text.trim()).filter(Boolean).join(`
|
|
223
223
|
|
|
224
224
|
---
|
|
225
225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memory-eternal",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "记忆核心(Memory Eternal):自研的 DeepSeek Harness 记忆插件,不移植任何既有记忆框架——对话结束后自动沉淀知识卡到本地 Markdown Vault(自研去重、自研 CJK 检索、可 git 管理),设置页提供图形化知识库(统计 / 搜索 / 知识图谱 + 侧边栏一键弹窗),Agent 通过 memory_recall 工具按需召回历史上下文。零人工干预。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"LICENSE"
|
|
41
41
|
],
|
|
42
42
|
"engines": {
|
|
43
|
-
"node": ">=22"
|
|
43
|
+
"node": ">=22",
|
|
44
|
+
"dsh": ">=0.1.5-alpha.2 <0.2.0"
|
|
44
45
|
},
|
|
45
46
|
"keywords": [
|
|
46
47
|
"deepseek-harness",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"build": "node build.mjs",
|
|
60
61
|
"build:client": "node build.mjs",
|
|
61
62
|
"prepublishOnly": "node build.mjs",
|
|
62
|
-
"test": "node tests/vault.test.mjs && node tests/capture.test.mjs && node tests/api.test.mjs"
|
|
63
|
+
"test": "node build.mjs && node tests/vault.test.mjs && node tests/capture.test.mjs && node tests/api.test.mjs && node tests/settings-compat.test.mjs && node tests/ssr.test.mjs"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
66
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
@@ -79,11 +80,8 @@
|
|
|
79
80
|
"client": {
|
|
80
81
|
"platform": "web",
|
|
81
82
|
"inject": [
|
|
82
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
83
83
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
84
|
-
"@deepseek-ai/dsh-client-locale"
|
|
85
|
-
"@deepseek-ai/dsh-client-connection",
|
|
86
|
-
"@deepseek-ai/dsh-api-remotes"
|
|
84
|
+
"@deepseek-ai/dsh-client-locale"
|
|
87
85
|
]
|
|
88
86
|
},
|
|
89
87
|
"bundle": {
|
|
@@ -96,6 +94,36 @@
|
|
|
96
94
|
"requiresBuildApproval": false,
|
|
97
95
|
"requiresRestart": true,
|
|
98
96
|
"manualSteps": false
|
|
97
|
+
},
|
|
98
|
+
"permissions": {
|
|
99
|
+
"level": "medium",
|
|
100
|
+
"files": "read-write",
|
|
101
|
+
"network": "none",
|
|
102
|
+
"commands": "node",
|
|
103
|
+
"credentials": [],
|
|
104
|
+
"externalServices": [],
|
|
105
|
+
"notes": "Read/write under ~/.dsh/memory-vault only (plugin-private Markdown vault). No outbound network, no credentials, no shell. Hooks/MCP run via the `node` binary that hosts the DSH process."
|
|
106
|
+
},
|
|
107
|
+
"lifecycle": {
|
|
108
|
+
"scripts": ["prepare", "prepublishOnly"],
|
|
109
|
+
"details": {
|
|
110
|
+
"prepare": "node build.mjs",
|
|
111
|
+
"prepublishOnly": "node build.mjs"
|
|
112
|
+
},
|
|
113
|
+
"notes": "Only `prepare` and `prepublishOnly` run `node build.mjs` (esbuild client bundling). No preinstall/install/postinstall hooks, no remote downloads, no native builds."
|
|
114
|
+
},
|
|
115
|
+
"compatibility": {
|
|
116
|
+
"dsh": ">=0.1.5-alpha.2 <0.2.0",
|
|
117
|
+
"dshReleases": {
|
|
118
|
+
"0.1.5-alpha.2": "compatible",
|
|
119
|
+
"0.1.5-rc.1": "compatible",
|
|
120
|
+
"0.1.5-rc.2": "compatible",
|
|
121
|
+
"0.1.7-rc.2": "compatible"
|
|
122
|
+
},
|
|
123
|
+
"node": ">=22",
|
|
124
|
+
"profiles": [
|
|
125
|
+
"web"
|
|
126
|
+
]
|
|
99
127
|
}
|
|
100
128
|
}
|
|
101
129
|
}
|
package/web/app.js
CHANGED
|
@@ -221,7 +221,7 @@ Option A, because:
|
|
|
221
221
|
.me-graph-ctxmenu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: none; border-radius: 7px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
|
|
222
222
|
.me-graph-ctxmenu button:hover { background: rgba(255,255,255,0.1); }
|
|
223
223
|
.me-graph-hint { font-size: 11px; opacity: 0.6; margin-left: auto; }
|
|
224
|
-
`;function dg(){return(0,i.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,i.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,i.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,i.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,i.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,i.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,i.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,i.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}function Tp({t:e,inModal:t,onClose:n,onFull:r,full:l}){let[o,a]=(0,x.useState)(null),[s,u]=(0,x.useState)([]),[p,v]=(0,x.useState)(!0),[y,g]=(0,x.useState)(null),[C,_]=(0,x.useState)(""),[S,B]=(0,x.useState)("all"),[d,c]=(0,x.useState)(""),[m,k]=(0,x.useState)("all"),[N,O]=(0,x.useState)("all"),[E,F]=(0,x.useState)(()=>{try{let P=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),K={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config"};if(P&&K[P])return K[P]}catch{}return"cards"}),[I,A]=(0,x.useState)(()=>new Set([E])),L=(0,x.useCallback)(P=>{A(K=>K.has(P)?K:new Set(K).add(P)),F(P)},[]),[W,q]=(0,x.useState)("recent"),[le,Q]=(0,x.useState)(null),X=(0,x.useRef)(null),ae=(0,x.useRef)(null),[ie,$e]=(0,x.useState)(!1),[Ut,Tn]=(0,x.useState)(null),[ut,Ne]=(0,x.useState)(!1),[se,z]=(0,x.useState)(!0),[te,re]=(0,x.useState)(null),[ge,ct]=(0,x.useState)(0),Dt=(0,x.useCallback)(()=>ct(P=>P+1),[]),ht=(0,x.useRef)(null),[_n,Pn]=(0,x.useState)(0),[Ht,xe]=(0,x.useState)(!1),Gn=(0,x.useRef)(null),rt=(0,x.useRef)(null)
|
|
224
|
+
`;function dg(){return(0,i.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,i.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,i.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,i.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,i.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,i.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,i.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,i.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}function Tp({t:e,inModal:t,onClose:n,onFull:r,full:l}){let[o,a]=(0,x.useState)(null),[s,u]=(0,x.useState)([]),[p,v]=(0,x.useState)(!0),[y,g]=(0,x.useState)(null),[C,_]=(0,x.useState)(""),[S,B]=(0,x.useState)("all"),[d,c]=(0,x.useState)(""),[m,k]=(0,x.useState)("all"),[N,O]=(0,x.useState)("all"),[E,F]=(0,x.useState)(()=>{try{let P=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),K={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config"};if(P&&K[P])return K[P]}catch{}return"cards"}),[I,A]=(0,x.useState)(()=>new Set([E])),L=(0,x.useCallback)(P=>{A(K=>K.has(P)?K:new Set(K).add(P)),F(P)},[]),[W,q]=(0,x.useState)("recent"),[le,Q]=(0,x.useState)(null),X=(0,x.useRef)(null),ae=(0,x.useRef)(null),[ie,$e]=(0,x.useState)(!1),[Ut,Tn]=(0,x.useState)(null),[ut,Ne]=(0,x.useState)(!1),[se,z]=(0,x.useState)(!0),[te,re]=(0,x.useState)(null),[ge,ct]=(0,x.useState)(0),Dt=(0,x.useCallback)(()=>ct(P=>P+1),[]),ht=(0,x.useRef)(null),[_n,Pn]=(0,x.useState)(0),[Ht,xe]=(0,x.useState)(!1),Gn=(0,x.useRef)(null),rt=(0,x.useRef)(null),w=(0,x.useCallback)(async(P=S,K=d,J=N,De={})=>{let Le=De.append===!0;try{Le?xe(!0):(v(!0),_(""));let Te=new URLSearchParams;P&&P!=="all"&&Te.set("kind",P),K.trim()&&Te.set("q",K.trim()),Te.set("status",J||"all"),Te.set("limit",String(sg)),Te.set("offset",String(De.offset||0)),W==="title"&&Te.set("sort","title");let on=await(await fetch(`${Z}/cards?${Te.toString()}`)).json();if(on.ok){let Vt=on.cards||[];u(Ze=>Le?[...Ze,...Vt.filter(qn=>!Ze.some(Zn=>Zn.path===qn.path))]:Vt),Pn(Number(on.total)||Vt.length)}}catch(Te){_(String(Te&&Te.message?Te.message:Te))}finally{Le?xe(!1):v(!1)}},[S,d,N,W]),h=(0,x.useCallback)(async()=>{try{let[P,K]=await Promise.all([fetch(`${Z}/overview`).then(J=>J.json()),fetch(`${Z}/capture-log`).then(J=>J.json()).catch(()=>null)]);P.ok&&a(P),g(K&&K.ok&&K.available&&K.health||null)}catch(P){_(String(P&&P.message?P.message:P))}finally{v(!1)}},[]),U=async P=>{try{let J=await(await fetch(`${Z}/delete?path=${encodeURIComponent(P)}`)).json();J.ok?(Q({ok:!0,msg:e("deleted")}),await h(),Dt()):Q({ok:!1,msg:J.error||e("deleteFail")})}catch{Q({ok:!1,msg:e("deleteFail")})}X.current&&clearTimeout(X.current),X.current=setTimeout(()=>Q(null),2e3)};(0,x.useEffect)(()=>(h(),()=>{ht.current&&clearTimeout(ht.current)}),[h]);let ce=P=>{c(P),ht.current&&clearTimeout(ht.current),ht.current=setTimeout(()=>w(S,P,N),280)},ze=P=>{B(P),w(P,d,N)};(0,x.useEffect)(()=>{E==="cards"&&w(S,d,N)},[N,E,ge,W]),(0,x.useEffect)(()=>{if(E!=="cards"||p||Ht||s.length>=_n)return;let P=Gn.current,K=rt.current;if(!P)return;let J=new IntersectionObserver(De=>{De[0]&&De[0].isIntersecting&&w(S,d,N,{append:!0,offset:s.length})},{root:K||null,rootMargin:"400px"});return J.observe(P),()=>J.disconnect()},[E,s,_n,p,Ht,S,d,N,w]);let qe=async P=>{try{let J=await(await fetch(`${Z}/card?path=${encodeURIComponent(P.path||P.id)}`)).json();J.ok&&Tn({path:J.path,title:P.title,text:J.text})}catch(K){_(String(K&&K.message?K.message:K))}},f=async(P,K)=>{$e(!0);try{let J=await fetch(`${Z}/export`);if(!J.ok)throw new Error("HTTP "+J.status);let De=await J.json();if(!De.ok)throw new Error(De.error||"export failed");let Le,Te,Oe;P==="json"?(Te="memory-vault.json",Oe="application/json",Le=JSON.stringify(De.cards.map(Ze=>({path:Ze.path,title:Ze.title,kind:Ze.kind,text:Ze.text})),null,2)):(Te="memory-vault.md",Oe="text/markdown;charset=utf-8",Le=De.cards.map(Ze=>Ze.text.trim()).filter(Boolean).join(`
|
|
225
225
|
|
|
226
226
|
---
|
|
227
227
|
|