dsh-tdai-memory 0.3.1 → 0.3.3
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/LICENSE +21 -21
- package/README.md +9 -1
- package/README.zh.md +8 -1
- package/THIRD-PARTY-NOTICES.md +20 -20
- package/client.js +4 -3
- package/cordis.patch.yml +8 -8
- package/index.js +436 -436
- package/package.json +16 -4
- package/recall-inject.js +86 -86
- package/vendor/tdai/adapters/index.js +15 -15
- package/vendor/tdai/adapters/openclaw/host-adapter.js +83 -83
- package/vendor/tdai/adapters/openclaw/index.js +5 -5
- package/vendor/tdai/adapters/openclaw/llm-runner.js +69 -69
- package/vendor/tdai/adapters/standalone/host-adapter.js +58 -58
- package/vendor/tdai/adapters/standalone/index.js +5 -5
- package/vendor/tdai/adapters/standalone/llm-runner.js +274 -274
- package/vendor/tdai/config.js +366 -366
- package/vendor/tdai/core/conversation/l0-recorder.js +420 -420
- package/vendor/tdai/core/hooks/auto-capture.js +236 -236
- package/vendor/tdai/core/hooks/auto-recall.js +653 -653
- package/vendor/tdai/core/index.js +8 -8
- package/vendor/tdai/core/persona/persona-generator.js +184 -184
- package/vendor/tdai/core/persona/persona-trigger.js +94 -94
- package/vendor/tdai/core/profile/profile-sync.js +200 -200
- package/vendor/tdai/core/prompts/l1-dedup.js +136 -136
- package/vendor/tdai/core/prompts/l1-extraction.js +132 -132
- package/vendor/tdai/core/prompts/persona-generation.js +160 -160
- package/vendor/tdai/core/prompts/scene-extraction.js +269 -269
- package/vendor/tdai/core/record/l1-dedup.js +318 -318
- package/vendor/tdai/core/record/l1-extractor.js +379 -379
- package/vendor/tdai/core/record/l1-reader.js +178 -178
- package/vendor/tdai/core/record/l1-writer.js +141 -141
- package/vendor/tdai/core/report/reporter.js +86 -86
- package/vendor/tdai/core/scene/filename-normalizer.js +161 -161
- package/vendor/tdai/core/scene/scene-extractor.js +410 -410
- package/vendor/tdai/core/scene/scene-format.js +53 -53
- package/vendor/tdai/core/scene/scene-index.js +82 -82
- package/vendor/tdai/core/scene/scene-navigation.js +60 -60
- package/vendor/tdai/core/seed/input.js +404 -404
- package/vendor/tdai/core/seed/seed-runtime.js +318 -318
- package/vendor/tdai/core/seed/types.js +9 -9
- package/vendor/tdai/core/store/bm25-client.js +117 -117
- package/vendor/tdai/core/store/bm25-local.js +68 -68
- package/vendor/tdai/core/store/embedding.js +632 -632
- package/vendor/tdai/core/store/factory.js +95 -95
- package/vendor/tdai/core/store/search-utils.js +54 -54
- package/vendor/tdai/core/store/sqlite.js +1822 -1822
- package/vendor/tdai/core/store/tcvdb-client.js +221 -221
- package/vendor/tdai/core/store/tcvdb.js +1047 -1047
- package/vendor/tdai/core/store/types.js +17 -17
- package/vendor/tdai/core/tdai-core.js +450 -450
- package/vendor/tdai/core/tools/conversation-search.js +199 -199
- package/vendor/tdai/core/tools/memory-search.js +207 -207
- package/vendor/tdai/core/types.js +12 -12
- package/vendor/tdai/utils/backup.js +189 -189
- package/vendor/tdai/utils/checkpoint.js +360 -360
- package/vendor/tdai/utils/clean-context-runner.js +472 -472
- package/vendor/tdai/utils/ensure-hook-policy.js +213 -213
- package/vendor/tdai/utils/env.js +13 -13
- package/vendor/tdai/utils/managed-timer.js +127 -127
- package/vendor/tdai/utils/manifest.js +91 -91
- package/vendor/tdai/utils/memory-cleaner.js +300 -300
- package/vendor/tdai/utils/no-think-fetch.js +109 -109
- package/vendor/tdai/utils/openclaw-state-dir.js +26 -26
- package/vendor/tdai/utils/pipeline-factory.js +517 -517
- package/vendor/tdai/utils/pipeline-manager.js +892 -892
- package/vendor/tdai/utils/sanitize.js +360 -360
- package/vendor/tdai/utils/serial-queue.js +103 -103
- package/vendor/tdai/utils/session-filter.js +88 -88
- package/vendor/tdai/utils/session-header-fetch.js +88 -88
- package/vendor/tdai/utils/text-utils.js +29 -29
- package/vendor/tdai/utils/time.js +252 -252
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Scorp1o117
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Scorp1o117
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -11,7 +11,15 @@ Part of the [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/d
|
|
|
11
11
|
A port of **TencentDB Agent Memory** (Tencent Cloud's open-source four-layer
|
|
12
12
|
memory system, originally an OpenClaw plugin) into DeepSeek Harness.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Compatibility (v0.3.3)
|
|
15
|
+
|
|
16
|
+
Verified in a DSH `0.1.5-rc.3` (`next`) disposable Web profile; DSH
|
|
17
|
+
`0.1.5-rc.2` remains `latest`. The rc.3 host currently references an
|
|
18
|
+
unpublished `dsh-client-ui-sidebar-documentpreview@0.1.5-rc.3`, so the smoke
|
|
19
|
+
profile temporarily used that unrelated UI package at rc.2. A clean rc.3
|
|
20
|
+
installation is blocked upstream. Alpha releases remain `unknown`.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
15
23
|
|
|
16
24
|
- **L0 conversation capture**: every turn (turn end, request boundary) is
|
|
17
25
|
written to raw conversation storage (JSONL + SQLite + FTS + vectors)
|
package/README.zh.md
CHANGED
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
把 **TencentDB Agent Memory**(腾讯云开源的四层记忆系统,原为 OpenClaw 插件)移植进 DeepSeek Harness。
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## 兼容性(v0.3.3)
|
|
12
|
+
|
|
13
|
+
已在 DSH `0.1.5-rc.3`(`next`)的一次性 Web Profile 中验证;`0.1.5-rc.2`
|
|
14
|
+
仍是 `latest`。rc.3 宿主目前引用尚未发布的
|
|
15
|
+
`dsh-client-ui-sidebar-documentpreview@0.1.5-rc.3`,烟测仅将这一无关的 UI
|
|
16
|
+
包临时回退为 rc.2;rc.3 原样安装仍受上游阻塞。alpha 版本继续标记 `unknown`。
|
|
17
|
+
|
|
18
|
+
## 能力
|
|
12
19
|
|
|
13
20
|
- **L0 对话捕获**:每轮对话(turn 结束、请求边界)自动写入原始对话(JSONL + SQLite + FTS + 向量)
|
|
14
21
|
- **L1 结构化记忆**:后台管线用 LLM 从对话中提取事实/偏好/事件(persona / episodic / instruction),写入 `records/` + SQLite + FTS + 向量
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# Third-party notices
|
|
2
|
-
|
|
3
|
-
## TencentDB Agent Memory core (vendored in `vendor/tdai`)
|
|
4
|
-
|
|
5
|
-
`vendor/tdai` is a TypeScript-compiled copy of the host-neutral core of
|
|
6
|
-
[TencentCloud/TencentDB-Agent-Memory](https://github.com/TencentCloud/TencentDB-Agent-Memory)
|
|
7
|
-
(`tdai-memory-openclaw-plugin`, npm: `@tencentdb-agent-memory/memory-tencentdb`),
|
|
8
|
-
compiled with `tsc -p dsh-tsconfig.json` (see the upstream repo for source).
|
|
9
|
-
Its runtime dependencies are declared in this package's `dependencies`.
|
|
10
|
-
|
|
11
|
-
MIT License — Copyright (c) 2026 TencentCloud
|
|
12
|
-
|
|
13
|
-
## Runtime dependencies
|
|
14
|
-
|
|
15
|
-
- `ai` / `@ai-sdk/openai` — Vercel AI SDK (Apache-2.0)
|
|
16
|
-
- `@node-rs/jieba` — Rust jieba bindings (MIT)
|
|
17
|
-
- `sqlite-vec` — vector search extension for SQLite (Apache-2.0 / MIT)
|
|
18
|
-
- `json5` — JSON5 parser (MIT)
|
|
19
|
-
- `undici` — HTTP client (MIT)
|
|
20
|
-
- `@tencentdb-agent-memory/tcvdb-text` — TencentDB text utilities (MIT)
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## TencentDB Agent Memory core (vendored in `vendor/tdai`)
|
|
4
|
+
|
|
5
|
+
`vendor/tdai` is a TypeScript-compiled copy of the host-neutral core of
|
|
6
|
+
[TencentCloud/TencentDB-Agent-Memory](https://github.com/TencentCloud/TencentDB-Agent-Memory)
|
|
7
|
+
(`tdai-memory-openclaw-plugin`, npm: `@tencentdb-agent-memory/memory-tencentdb`),
|
|
8
|
+
compiled with `tsc -p dsh-tsconfig.json` (see the upstream repo for source).
|
|
9
|
+
Its runtime dependencies are declared in this package's `dependencies`.
|
|
10
|
+
|
|
11
|
+
MIT License — Copyright (c) 2026 TencentCloud
|
|
12
|
+
|
|
13
|
+
## Runtime dependencies
|
|
14
|
+
|
|
15
|
+
- `ai` / `@ai-sdk/openai` — Vercel AI SDK (Apache-2.0)
|
|
16
|
+
- `@node-rs/jieba` — Rust jieba bindings (MIT)
|
|
17
|
+
- `sqlite-vec` — vector search extension for SQLite (Apache-2.0 / MIT)
|
|
18
|
+
- `json5` — JSON5 parser (MIT)
|
|
19
|
+
- `undici` — HTTP client (MIT)
|
|
20
|
+
- `@tencentdb-agent-memory/tcvdb-text` — TencentDB text utilities (MIT)
|
package/client.js
CHANGED
|
@@ -185,7 +185,10 @@ window.__ModuleLoader__.load({
|
|
|
185
185
|
var [error, setError] = react.useState(null);
|
|
186
186
|
|
|
187
187
|
react.useEffect(function () {
|
|
188
|
-
|
|
188
|
+
// No refresh call: the scope's public seam has no load() — reads ride the
|
|
189
|
+
// shared describe mirror, which re-reads on every Host
|
|
190
|
+
// `settings/document-updated`. The guarded scope.load() that used to sit
|
|
191
|
+
// here was dead code that read like a refresh that never happened.
|
|
189
192
|
var alive = true;
|
|
190
193
|
var sync = function () { if (alive) setSnapshot(scope.getSnapshot()); };
|
|
191
194
|
var un = typeof scope.subscribe === "function" ? scope.subscribe(sync) : null;
|
|
@@ -258,7 +261,6 @@ window.__ModuleLoader__.load({
|
|
|
258
261
|
}
|
|
259
262
|
setNotice(t("saved"));
|
|
260
263
|
if (response.result.value) setDraft(Object.assign({}, valueToDraft(response.result.value)));
|
|
261
|
-
if (typeof scope.load === "function") scope.load();
|
|
262
264
|
}).catch(function (e) {
|
|
263
265
|
setBusy(false); setError(t("error") + ": " + String(e && e.message || e));
|
|
264
266
|
});
|
|
@@ -275,7 +277,6 @@ window.__ModuleLoader__.load({
|
|
|
275
277
|
if (!response.result.ok) { setError(t("error")); return; }
|
|
276
278
|
setNotice(t("saved"));
|
|
277
279
|
if (response.result.value) setDraft(Object.assign({}, valueToDraft(response.result.value)));
|
|
278
|
-
if (typeof scope.load === "function") scope.load();
|
|
279
280
|
}).catch(function (e) {
|
|
280
281
|
setBusy(false); setError(t("error") + ": " + String(e && e.message || e));
|
|
281
282
|
});
|
package/cordis.patch.yml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# dsh-tdai-memory — bundle patch layer
|
|
2
|
-
#
|
|
3
|
-
# Declares the plugin as a Cordis loader entry, making the package a standard
|
|
4
|
-
# profile bundle: `dsh plugin --profile <p> add dsh-tdai-memory` installs and
|
|
5
|
-
# mounts it without manual cordis.patch.yml edits.
|
|
6
|
-
- insert:
|
|
7
|
-
- id: tdai-memory
|
|
8
|
-
name: 'dsh-tdai-memory'
|
|
1
|
+
# dsh-tdai-memory — bundle patch layer
|
|
2
|
+
#
|
|
3
|
+
# Declares the plugin as a Cordis loader entry, making the package a standard
|
|
4
|
+
# profile bundle: `dsh plugin --profile <p> add dsh-tdai-memory` installs and
|
|
5
|
+
# mounts it without manual cordis.patch.yml edits.
|
|
6
|
+
- insert:
|
|
7
|
+
- id: tdai-memory
|
|
8
|
+
name: 'dsh-tdai-memory'
|