@gezi-wen/dsh-mem 0.5.5
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 +202 -0
- package/NOTICE +8 -0
- package/README.md +180 -0
- package/cordis.patch.yml +4 -0
- package/lib/client.js +1970 -0
- package/lib/index.js +558 -0
- package/lib/typert.host.js +137 -0
- package/package.json +85 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# dsh-mem · DSH 的文件式记忆插件
|
|
2
|
+
|
|
3
|
+
给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)装上**跨会话记忆**——agent 今天记住的事,明天的新会话自动想起来。
|
|
4
|
+
|
|
5
|
+
记忆存在**本地 markdown 文件**里(frontmatter + 正文),不是数据库。透明、可检查、防膨胀。
|
|
6
|
+
|
|
7
|
+
> ### 包名变更(v0.5.5)
|
|
8
|
+
>
|
|
9
|
+
> 本插件原名 `sage-mem`,自 **v0.5.5** 起改名为 **`@gezi-wen/dsh-mem`**。
|
|
10
|
+
>
|
|
11
|
+
> 迁移只需改 profile:`dependencies` 与 `dsh.profile.bundles` 里把 `sage-mem` 换成 `@gezi-wen/dsh-mem`,`pnpm install` 后重启 DSH。
|
|
12
|
+
> **记忆数据原地不动** —— 目录仍是 `~/.sage-mem/memory`(可用 `SAGE_MEM_DIR` 覆盖)。换名字不丢记忆。
|
|
13
|
+
|
|
14
|
+
> **DSH 版本兼容性(0.5.5 核对于 `0.1.7-rc.2`)**
|
|
15
|
+
> `session.deriveMessages()`(仍是同步)、`system-prompt/assemble` 事件、以及 `context.agent.session` 这条链,在 0.1.6 → 0.1.7 之间**均未改变**,本插件在 0.1.7 上无需改动即可工作。
|
|
16
|
+
> 0.5.3 另加了一层防御:`deriveMessages()` 若哪天被改成异步,或 `Session` 上的历史读取接口被改名(0.1.7 起 `snapshotEvents` / `eventAt` / `ownEvents` 已标记弃用),插件会在**日志里报警**,而不是像以前那样静默地不再注入记忆。
|
|
17
|
+
|
|
18
|
+
## 从 Claude Code 无损迁移
|
|
19
|
+
|
|
20
|
+
你已经在 Claude Code(CC)里养了一个 agent,舍不得它的记忆和人格?dsh-mem 是「CC → DSH」迁移方案的一部分,**记忆与人格都能无损搬过来**:
|
|
21
|
+
|
|
22
|
+
- **人格**:CC 的 `CLAUDE.md` → DSH 的 `AGENTS.md`,DSH 原生加载,纯文本一字不改就能用。
|
|
23
|
+
- **记忆**:CC 沉淀的跨会话记忆 → dsh-mem 的 `memory/` 目录(markdown + frontmatter,四类)。
|
|
24
|
+
|
|
25
|
+
没有数据库、没有私有格式——全都是 markdown 文本,**直接拷文件就完成迁移**。agent 换了身体,但依然记得你是谁、记得你们聊过什么、记得进行中的项目。
|
|
26
|
+
|
|
27
|
+
## 为什么用文件
|
|
28
|
+
|
|
29
|
+
DSH 原生没有记忆系统,每个会话都是白纸。市面上的记忆方案大多走 SQLite + 常驻 worker:
|
|
30
|
+
|
|
31
|
+
- 记忆写进数据库,**不透明**——想检查存了什么得查表,想清理要连数据库
|
|
32
|
+
- 事件自动捕获会**膨胀**——"用户打了个招呼"这种无实质内容也被存进去
|
|
33
|
+
- 需要一个**常驻 worker 进程** + 端口,多一份运维负担
|
|
34
|
+
|
|
35
|
+
dsh-mem 换成文件式:每条记忆一个 markdown 文件,直接用编辑器打开就能看、能改、能删。存不存由 agent 按规则判断,不是事件全捕获。没有 worker、没有 SQLite、没有端口。
|
|
36
|
+
|
|
37
|
+
## 功能
|
|
38
|
+
|
|
39
|
+
- **按问题检索注入**:每次提问,插件扫记忆目录,用 frontmatter 的 `description` 和文件名做匹配,把相关记忆注入上下文,agent 第一轮就「想起来」
|
|
40
|
+
- **每次会话必读**(v0.5):frontmatter 标了 `baseline: true` 的记忆,在新会话第一步无条件注入——给「待办清单」「你是谁」这类每次开场都该在场的记忆用(上限 5 条)
|
|
41
|
+
- **四类记忆**:`user`(用户是谁)/ `feedback`(工作方式指导)/ `project`(项目状态)/ `reference`(外部信息指针)
|
|
42
|
+
- **文件透明**:记忆就是 `*.md` 文件,frontmatter 存元数据,正文存内容
|
|
43
|
+
- **防膨胀**:写入靠规则引导 agent 判断「存不存」,无实质内容、能靠代码/git 推导的不存
|
|
44
|
+
- **Web 文件管理器**(v0.4):DSH 设置页「记忆管理」,浏览/查看/编辑/删除记忆文件,添加新记忆
|
|
45
|
+
- **记忆星图**(v0.4.3 起并入):把记忆画成一片星空,按类型和大小分布
|
|
46
|
+
|
|
47
|
+
## 架构
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
DSH(Cordis 插件)
|
|
51
|
+
└─ dsh-mem 插件(按问题检索 + 注入)← 本仓库
|
|
52
|
+
│ Node fs 直读
|
|
53
|
+
▼
|
|
54
|
+
memory/ 目录(markdown 文件,4 类)
|
|
55
|
+
├── user_*.md
|
|
56
|
+
├── feedback_*.md
|
|
57
|
+
├── project_*.md
|
|
58
|
+
├── reference_*.md
|
|
59
|
+
└── MEMORY.md ← 索引
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
没有 worker、没有 SQLite、没有 HTTP 端口、没有常驻进程。
|
|
63
|
+
|
|
64
|
+
## 安装
|
|
65
|
+
|
|
66
|
+
从 npm:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@gezi-wen/dsh-mem": "^0.5.5"
|
|
72
|
+
},
|
|
73
|
+
"dsh": {
|
|
74
|
+
"profile": {
|
|
75
|
+
"bundles": ["@gezi-wen/dsh-mem"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
或直接从 GitHub:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@gezi-wen/dsh-mem": "github:gezi-wen/dsh-mem"
|
|
87
|
+
},
|
|
88
|
+
"dsh": {
|
|
89
|
+
"profile": {
|
|
90
|
+
"bundles": ["@gezi-wen/dsh-mem"]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
或 clone 后本地 link:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"@gezi-wen/dsh-mem": "link:../dsh-mem"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
然后 `pnpm install` 重启 DSH。
|
|
107
|
+
|
|
108
|
+
## DSH 兼容性
|
|
109
|
+
|
|
110
|
+
dsh-mem 是纯 DSH 插件,在 `package.json` 的 `dsh.compatibility.dshReleases` 里逐版本声明兼容状态:
|
|
111
|
+
|
|
112
|
+
| DSH 版本 | 状态 |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| 0.1.2-rc.1 | compatible |
|
|
115
|
+
| 0.1.3-alpha.1 | compatible |
|
|
116
|
+
| 0.1.3-alpha.2 | compatible |
|
|
117
|
+
| 0.1.5-rc.1 | compatible |
|
|
118
|
+
| 0.1.6-alpha.1 | compatible |
|
|
119
|
+
| 0.1.6-alpha.2 | compatible |
|
|
120
|
+
| 0.1.7-rc.1 | compatible |
|
|
121
|
+
| 0.1.7-rc.2 | compatible |
|
|
122
|
+
|
|
123
|
+
自 DSH `0.1.6-alpha.2` 起,TypertCodec 契约从「读 `schema`」改为「读 `create()` 工厂」——
|
|
124
|
+
仍只写 `schema:` 的插件会在注册阶段直接抛错,导致整棵插件树加载失败。自 0.5.2 起每个 codec
|
|
125
|
+
同时带 `schema` 与 `create: () => schema`,因此**同一份构建同时兼容 alpha.1 及更早(读
|
|
126
|
+
schema)与 alpha.2 及以后(读 create)**,升级 DSH 时不需要换插件版本。
|
|
127
|
+
|
|
128
|
+
Node.js 要求 `>= 18`(见 `engines.node`)。
|
|
129
|
+
|
|
130
|
+
## 卸载
|
|
131
|
+
|
|
132
|
+
在 profile 的 `package.json` 里删掉 `@gezi-wen/dsh-mem` 依赖,并从 `dsh.profile.bundles` 移除
|
|
133
|
+
`"@gezi-wen/dsh-mem"`;`pnpm install` 后重启 DSH 即可。记忆 markdown 文件留在原目录,不受影响。
|
|
134
|
+
|
|
135
|
+
## 配置
|
|
136
|
+
|
|
137
|
+
用环境变量 `SAGE_MEM_DIR` 指定记忆目录,默认 `~/.sage-mem/memory`:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
SAGE_MEM_DIR=/path/to/your/memory
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
> 变量名与默认目录沿用了旧包名,**刻意不改**:它们是既有用户的记忆所在路径,改名会导致记忆「消失」。
|
|
144
|
+
|
|
145
|
+
记忆文件格式:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
---
|
|
149
|
+
name: 可选的短名
|
|
150
|
+
description: 一句话说清这条记忆是什么(检索靠它,务必写准)
|
|
151
|
+
metadata:
|
|
152
|
+
type: user # user / feedback / project / reference
|
|
153
|
+
baseline: true # 可选:新会话第一步无条件注入(上限 5 条)
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
记忆正文。
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`feedback` 类建议带 `**Why:**`(原因)和 `**How to apply:**`(何时生效)两行,方便判断边界。
|
|
160
|
+
|
|
161
|
+
## 验证
|
|
162
|
+
|
|
163
|
+
跨会话记忆链路(实测):
|
|
164
|
+
|
|
165
|
+
1. 会话 A 说「记住:我的猫叫芝麻,它喜欢晒太阳」——agent 按规则写进 `memory/`
|
|
166
|
+
2. 开新会话 B 问「我的猫叫什么」
|
|
167
|
+
3. agent 第一轮直接答出「芝麻」——记忆自动注入,无需 agent 自己找
|
|
168
|
+
|
|
169
|
+
## 相关项目
|
|
170
|
+
|
|
171
|
+
- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) — DSH 本体,一切皆插件
|
|
172
|
+
|
|
173
|
+
## 旧版
|
|
174
|
+
|
|
175
|
+
本仓库早期是 SQLite + worker 架构,已归档到 [`sqlite-worker`](../../tree/sqlite-worker) 分支。文件式是继任实现。
|
|
176
|
+
更早还用过 `sage-mem` 这个名字(0.1.0 – 0.5.4),v0.5.5 起改名为 `@gezi-wen/dsh-mem`。
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
Apache-2.0
|
package/cordis.patch.yml
ADDED