@kenz1117/dsh-engram 0.13.11 → 0.13.12
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/CHANGELOG.md +10 -0
- package/README.en.md +7 -4
- package/README.md +9 -6
- package/lib/client.js +1 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +27 -14
- package/lib/local.js +2 -2
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -864,7 +864,7 @@ const zh$1 = {
|
|
|
864
864
|
"tool.reviewSectionRelated": "关联",
|
|
865
865
|
"tool.reviewRevisions": "\n修订历史:\n{entries}",
|
|
866
866
|
"tool.reviewOperations": "\n最近操作:\n{entries}",
|
|
867
|
-
"tool.statsDescription": "记忆库统计:各状态与种类数量、关系边数、信噪比、操作日志量,以及房间目录(房名/桩位数/最新门牌——检索前先看目录决定进哪个房间,配 engram_search 的 room 参数)。scope=all
|
|
867
|
+
"tool.statsDescription": "记忆库统计:各状态与种类数量、关系边数、信噪比、操作日志量,以及房间目录(房名/桩位数/最新门牌——检索前先看目录决定进哪个房间,配 engram_search 的 room 参数)。scope=all 时合并三库。",
|
|
868
868
|
"tool.statsRoomLine": " {room}({label}): {count}/{maxIndex} 桩{placard}",
|
|
869
869
|
"tool.statsRoomPlacard": " · 最新门牌「{placard}」",
|
|
870
870
|
"tool.statsTotal": "[{scope}] 总数 {total}(active {active} / archived {archived} / forgotten {forgotten})",
|
|
@@ -1199,7 +1199,7 @@ const en$1 = {
|
|
|
1199
1199
|
"tool.reviewSectionRelated": "Related",
|
|
1200
1200
|
"tool.reviewRevisions": "\nRevision history:\n{entries}",
|
|
1201
1201
|
"tool.reviewOperations": "\nRecent operations:\n{entries}",
|
|
1202
|
-
"tool.statsDescription": "Memory store statistics: counts by status and kind, number of relation edges, signal-to-noise ratio, operation-log volume, and the room guide (room name / slot count / latest placard — check the guide before retrieval to decide which room to enter, together with the room parameter of engram_search). With scope=all
|
|
1202
|
+
"tool.statsDescription": "Memory store statistics: counts by status and kind, number of relation edges, signal-to-noise ratio, operation-log volume, and the room guide (room name / slot count / latest placard — check the guide before retrieval to decide which room to enter, together with the room parameter of engram_search). With scope=all all three stores are merged.",
|
|
1203
1203
|
"tool.statsRoomLine": " {room} ({label}): {count}/{maxIndex} slots{placard}",
|
|
1204
1204
|
"tool.statsRoomPlacard": " · latest placard “{placard}”",
|
|
1205
1205
|
"tool.statsTotal": "[{scope}] total {total} (active {active} / archived {archived} / forgotten {forgotten})",
|
|
@@ -2148,7 +2148,7 @@ const en = {
|
|
|
2148
2148
|
logFilterIngest: "Capture",
|
|
2149
2149
|
logFilterRetrieve: "Retrieval",
|
|
2150
2150
|
logFilterOrganize: "Organize",
|
|
2151
|
-
logCount: "{n} entries ·
|
|
2151
|
+
logCount: "{n} entries · all stores merged, newest first",
|
|
2152
2152
|
palaceAskTitle: "Which language will you use to talk to the agent?",
|
|
2153
2153
|
palaceAskBody: "We will set the Memory Palace up to work efficiently in that language. You can change the interface language of the Memory Palace plugin at any time yourself.",
|
|
2154
2154
|
palaceAskFallback: "The palace has no bundled set of texts for your language yet: it will be recorded as {language} and will take its service texts from English — it will still understand notes written in your language. Ask the agent to print the instruction we keep for it inside the plugin in your native language: it will help you set the Memory Palace up for comfortable work in a couple of minutes.",
|
|
@@ -2468,7 +2468,7 @@ const en = {
|
|
|
2468
2468
|
pageHeaderEpisodesSubtitle: "Sessions grouped by episode, with adjacent-window and summary recall",
|
|
2469
2469
|
pageHeaderEntitiesSubtitle: "Entity dictionary (people/projects/tools/concepts), filter by kind and name",
|
|
2470
2470
|
pageHeaderBeliefsSubtitle: "Consolidated beliefs with evidence chain, click \"n evidence\" for read-only recall",
|
|
2471
|
-
pageHeaderLogSubtitle: "Merged operation log across
|
|
2471
|
+
pageHeaderLogSubtitle: "Merged operation log across all DBs, filterable by category",
|
|
2472
2472
|
pageHeaderBackfillSubtitle: "Distil historical sessions into the palace, estimate first then run, resumable",
|
|
2473
2473
|
pageHeaderJevSubtitle: "Jev system-one adjudication, config overrides and recent decisions log",
|
|
2474
2474
|
heatmapTitle: "Last 26 weeks activity",
|
|
@@ -3464,7 +3464,7 @@ const zh = {
|
|
|
3464
3464
|
logFilterIngest: "发掘",
|
|
3465
3465
|
logFilterRetrieve: "检索",
|
|
3466
3466
|
logFilterOrganize: "整理",
|
|
3467
|
-
logCount: "{n} 条 ·
|
|
3467
|
+
logCount: "{n} 条 · 三库合并倒序",
|
|
3468
3468
|
palaceAskTitle: "您打算用哪种语言与代理对话?",
|
|
3469
3469
|
palaceAskBody: "我们会把记忆宫殿配置成在该语言下高效工作。记忆宫殿插件的界面语言您可以随时自行切换。",
|
|
3470
3470
|
palaceAskFallback: "宫殿目前还没有您语言的内置文本:它会被记录为 {language},服务性文字先用英文——用您的语言写下的记录它仍然看得懂。请让代理用您的母语输出我们为它保存在插件中的说明:它会在几分钟内帮您把记忆宫殿配置到舒适可用的状态。",
|
|
@@ -3784,7 +3784,7 @@ const zh = {
|
|
|
3784
3784
|
pageHeaderEpisodesSubtitle: "按会话分组的经历时间线,支持邻近扩展与摘要回看",
|
|
3785
3785
|
pageHeaderEntitiesSubtitle: "实体词典:人物/项目/工具/概念,按类别与名称筛选",
|
|
3786
3786
|
pageHeaderBeliefsSubtitle: "巩固信念与证据链,点证据 n 条展开只读回查",
|
|
3787
|
-
pageHeaderLogSubtitle: "
|
|
3787
|
+
pageHeaderLogSubtitle: "三库合并的完整操作日志,按类别筛选",
|
|
3788
3788
|
pageHeaderBackfillSubtitle: "把历史会话逐轮提炼进宫殿,先估算再执行,可暂停续做",
|
|
3789
3789
|
pageHeaderJevSubtitle: "Jev 系统一裁决,配置覆盖与近期裁决观测",
|
|
3790
3790
|
heatmapTitle: "近半年活动热力",
|
|
@@ -11139,7 +11139,11 @@ function registerEngramRoutes(ctx, deps) {
|
|
|
11139
11139
|
return;
|
|
11140
11140
|
}
|
|
11141
11141
|
const scopeParam = url.searchParams.get("scope");
|
|
11142
|
-
const scopes = scopeParam === "all" || scopeParam === null || scopeParam === "" ? [
|
|
11142
|
+
const scopes = scopeParam === "all" || scopeParam === null || scopeParam === "" ? [
|
|
11143
|
+
"user",
|
|
11144
|
+
"project",
|
|
11145
|
+
"shared"
|
|
11146
|
+
] : [scopeOf$1(scopeParam, "user")];
|
|
11143
11147
|
const kind = url.searchParams.get("kind");
|
|
11144
11148
|
const limit = Math.min(20, Math.max(1, Number(url.searchParams.get("limit") ?? 10) || 10));
|
|
11145
11149
|
const embedder = deps.embedder === void 0 ? void 0 : await deps.embedder;
|
|
@@ -11470,7 +11474,11 @@ function registerEngramRoutes(ctx, deps) {
|
|
|
11470
11474
|
}
|
|
11471
11475
|
if (req.method === "GET" && route === "activity") {
|
|
11472
11476
|
const limit = Math.min(50, Math.max(1, Number(url.searchParams.get("limit") ?? 20) || 20));
|
|
11473
|
-
json(res, 200, { operations: (await Promise.all([
|
|
11477
|
+
json(res, 200, { operations: (await Promise.all([
|
|
11478
|
+
"user",
|
|
11479
|
+
"project",
|
|
11480
|
+
"shared"
|
|
11481
|
+
].map(async (scope) => {
|
|
11474
11482
|
return (await (await storeFor(scope)).recentOps(limit)).map((op) => ({
|
|
11475
11483
|
...op,
|
|
11476
11484
|
scope
|
|
@@ -11644,10 +11652,15 @@ function registerEngramRoutes(ctx, deps) {
|
|
|
11644
11652
|
}
|
|
11645
11653
|
if (req.method === "GET" && route === "health") {
|
|
11646
11654
|
const rawScope = url.searchParams.get("scope");
|
|
11647
|
-
const scopes = rawScope === "user" || rawScope === "project" || rawScope === "shared" ? [rawScope] : [
|
|
11648
|
-
|
|
11655
|
+
const scopes = rawScope === "user" || rawScope === "project" || rawScope === "shared" ? [rawScope] : [
|
|
11656
|
+
"user",
|
|
11657
|
+
"project",
|
|
11658
|
+
"shared"
|
|
11659
|
+
];
|
|
11660
|
+
const scored = (await Promise.all(scopes.map(async (scope) => {
|
|
11649
11661
|
const store = await storeFor(scope);
|
|
11650
11662
|
const s = await store.stats();
|
|
11663
|
+
if (scope === "shared" && s.total === 0) return null;
|
|
11651
11664
|
const edgeCount = (await store.exportAll()).edges.length;
|
|
11652
11665
|
const total = Math.max(s.total, 1);
|
|
11653
11666
|
const signal = s.signalRatio;
|
|
@@ -11671,10 +11684,10 @@ function registerEngramRoutes(ctx, deps) {
|
|
|
11671
11684
|
redacted: s.redacted,
|
|
11672
11685
|
archivedRatio
|
|
11673
11686
|
};
|
|
11674
|
-
}));
|
|
11687
|
+
}))).filter((part) => part !== null);
|
|
11675
11688
|
json(res, 200, {
|
|
11676
|
-
overall: Math.round(
|
|
11677
|
-
parts,
|
|
11689
|
+
overall: Math.round(scored.reduce((sum, part) => sum + part.score, 0) / scored.length),
|
|
11690
|
+
parts: scored,
|
|
11678
11691
|
evaluatedAt: Date.now()
|
|
11679
11692
|
});
|
|
11680
11693
|
return;
|
|
@@ -19113,7 +19126,7 @@ function foldNearDuplicates(records, vectors, threshold = FOLD_COSINE) {
|
|
|
19113
19126
|
};
|
|
19114
19127
|
}
|
|
19115
19128
|
// package.json
|
|
19116
|
-
var version = "0.13.
|
|
19129
|
+
var version = "0.13.12";
|
|
19117
19130
|
// src/index.ts
|
|
19118
19131
|
/**
|
|
19119
19132
|
* dsh-engram:DeepSeek Harness 跨会话长期记忆插件(host 半)。
|
package/lib/local.js
CHANGED
|
@@ -690,7 +690,7 @@ const zh = {
|
|
|
690
690
|
"tool.reviewSectionRelated": "关联",
|
|
691
691
|
"tool.reviewRevisions": "\n修订历史:\n{entries}",
|
|
692
692
|
"tool.reviewOperations": "\n最近操作:\n{entries}",
|
|
693
|
-
"tool.statsDescription": "记忆库统计:各状态与种类数量、关系边数、信噪比、操作日志量,以及房间目录(房名/桩位数/最新门牌——检索前先看目录决定进哪个房间,配 engram_search 的 room 参数)。scope=all
|
|
693
|
+
"tool.statsDescription": "记忆库统计:各状态与种类数量、关系边数、信噪比、操作日志量,以及房间目录(房名/桩位数/最新门牌——检索前先看目录决定进哪个房间,配 engram_search 的 room 参数)。scope=all 时合并三库。",
|
|
694
694
|
"tool.statsRoomLine": " {room}({label}): {count}/{maxIndex} 桩{placard}",
|
|
695
695
|
"tool.statsRoomPlacard": " · 最新门牌「{placard}」",
|
|
696
696
|
"tool.statsTotal": "[{scope}] 总数 {total}(active {active} / archived {archived} / forgotten {forgotten})",
|
|
@@ -1025,7 +1025,7 @@ const en = {
|
|
|
1025
1025
|
"tool.reviewSectionRelated": "Related",
|
|
1026
1026
|
"tool.reviewRevisions": "\nRevision history:\n{entries}",
|
|
1027
1027
|
"tool.reviewOperations": "\nRecent operations:\n{entries}",
|
|
1028
|
-
"tool.statsDescription": "Memory store statistics: counts by status and kind, number of relation edges, signal-to-noise ratio, operation-log volume, and the room guide (room name / slot count / latest placard — check the guide before retrieval to decide which room to enter, together with the room parameter of engram_search). With scope=all
|
|
1028
|
+
"tool.statsDescription": "Memory store statistics: counts by status and kind, number of relation edges, signal-to-noise ratio, operation-log volume, and the room guide (room name / slot count / latest placard — check the guide before retrieval to decide which room to enter, together with the room parameter of engram_search). With scope=all all three stores are merged.",
|
|
1029
1029
|
"tool.statsRoomLine": " {room} ({label}): {count}/{maxIndex} slots{placard}",
|
|
1030
1030
|
"tool.statsRoomPlacard": " · latest placard “{placard}”",
|
|
1031
1031
|
"tool.statsTotal": "[{scope}] total {total} (active {active} / archived {archived} / forgotten {forgotten})",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenz1117/dsh-engram",
|
|
3
|
-
"description": "Local-first cross-session long-term memory for DeepSeek Harness:
|
|
4
|
-
"version": "0.13.
|
|
3
|
+
"description": "Local-first cross-session long-term memory for DeepSeek Harness: three-scope SQLite stores (user / project / shared), hybrid FTS5 + local-vector retrieval with RRF, an evidence gate, provenance audit and SM-2 spaced repetition. 23 narrow tools, zero external services, zero API keys.",
|
|
4
|
+
"version": "0.13.12",
|
|
5
5
|
"icon": "icon.svg",
|
|
6
6
|
"logo": "icon-256.svg",
|
|
7
7
|
"publishConfig": {
|