stratagate-dsh 0.2.87 → 0.2.90

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/docs/DSH.md CHANGED
@@ -91,8 +91,10 @@ Every explicit retrieval creates an independent batch. The model passes its `bat
91
91
 
92
92
  ### Agent-recorded memory
93
93
 
94
- `memory_remember` lets the agent record facts proactively: explicit user preferences or
95
- corrections, decisions, durable project facts, or anything the user asks to remember.
94
+ Choose by scope: `memory_profile_update` changes a global Persistent Profile field supplied to every future conversation without retrieval; `memory_remember` stores an Event surfaced when relevant, such as a project-specific preference or a past decision. A one-turn request needs neither. The word "remember" does not select a tool, and the same information should normally be stored in one place. An inferred Profile change still requires the consent specified by that tool.
95
+
96
+ `memory_remember` lets the agent record facts proactively: context-specific user preferences or
97
+ corrections, decisions, and durable project facts when they need to be recalled in relevant situations.
96
98
  Recordings enter the same long-term Event pipeline as conversation-derived memory, with
97
99
  two differences:
98
100
 
@@ -213,7 +215,7 @@ For diagnostics, the five most recent successful memory-model responses are reta
213
215
 
214
216
  ## Compatibility and permissions
215
217
 
216
- Release gates exercise the complete DSH `0.1.2-rc.1` family, `@deepseek-ai/dsh@0.1.5-rc.1`, `@deepseek-ai/dsh@0.1.6-alpha.1`, and `@deepseek-ai/dsh@0.1.7-rc.1` on Node `24`, on both Linux and Windows. The 0.1.5 CLI's real dependency tree resolves its internal DSH packages to `0.1.5-rc.2`; the 0.1.6 and 0.1.7 CLIs resolve the tested internal DSH and Session Format packages to their respective versions. The 0.1.7 host also supplies Cordis `4.0.4` and Schemastery `3.18.4`. The plugin declares these packages as optional, exact-version peers so the host supplies one coherent runtime instead of npm installing a second copy. Other `0.1.x` versions are not implicitly supported.
218
+ Release gates exercise the complete DSH `0.1.2-rc.1` family, `@deepseek-ai/dsh@0.1.5-rc.1`, `@deepseek-ai/dsh@0.1.6-alpha.1`, `@deepseek-ai/dsh@0.1.7-rc.1`, and `@deepseek-ai/dsh@0.1.7-rc.2` on Node `24`, on both Linux and Windows. The 0.1.5 CLI's real dependency tree resolves its internal DSH packages to `0.1.5-rc.2`; the 0.1.6 and 0.1.7 CLIs resolve the tested internal DSH and Session Format packages to their respective versions. The 0.1.7 host also supplies Cordis `4.0.4` and Schemastery `3.18.4`. Optional peers for the DSH `0.1.7` packages now accept `>=0.1.7-rc.1 <0.1.8-0`. Startup still requires one coherent DSH internal version and limits Cordis and Schemastery to compatible patch lines. Later `0.1.7` releases can install without a plugin update, but the release gate only tests the versions listed above; compatibility checks remain advisable after a host upgrade. DSH `0.1.8` is excluded.
217
219
 
218
220
  DSH core packages are host-provided optional peers. After upgrading a profile that once installed those peers locally, run `dsh plugin --profile <name> exec stratagate-dsh-repair` before starting it. The command moves only the known DSH runtime packages into `.stratagate-runtime-backups` inside that profile and writes a recovery receipt; it does not delete them or touch session data. At startup, a bootstrap resolver also forces StrataGate's own imports through the installation-owned module fallback, then verifies the resolved DSH core family and stops with an actionable error for an unknown host family. On DSH `0.1.5` through `0.1.7`, v0 sessions containing the retired `stratagate/memory-citations` event are copied to a validated v1 generation before the host continues its migration chain. The original v0 log is never modified; a `stratagate-legacy-citations-v1.json` receipt records source/target hashes and recovery instructions.
219
221
 
package/docs/DSH.zh-CN.md CHANGED
@@ -91,7 +91,9 @@ DSH_HOME/stratagate/memory.db
91
91
 
92
92
  ### Agent 主动记忆
93
93
 
94
- `memory_remember` 让 agent 主动记录值得记忆的事实:用户明确的偏好或纠正、决定、持久的项目事实,以及用户要求记住的内容。记录会进入与对话派生记忆相同的长期 Event 管线,但有两点不同:
94
+ 选用写入工具时看信息的适用范围:`memory_profile_update` 修改每次对话都自动提供的全局常驻画像字段;`memory_remember` 保存只需在相关情境中想起的 Event,例如项目专属偏好和已做出的决定;仅本次有效的要求不写入记忆。“记住”一词本身不决定用哪个工具,同一信息默认只写入一处。主动提出修改画像仍须遵守该工具的“同意”规则。
95
+
96
+ `memory_remember` 让 agent 主动记录值得记忆的事实:适用于特定情境的用户偏好、事实纠正、决定和持久的项目事实。记录会进入与对话派生记忆相同的长期 Event 管线,但有两点不同:
95
97
 
96
98
  - **隔离存储。** agent 记录的 Event 存放在专属的 `agent_events` 隔离表中,数据模型与普通 Event 完全一致,但与被动对话表物理分离。其溯源直接引用**记录会话中的真实对话消息** —— 优先取 open tail 中的 user/assistant 消息,其次取该会话最新封存 Block 的消息 —— 绝不生成虚构的 user 消息。仅当会话中没有任何已摄取消息时,才会创建合成的 `agent-memory:` 溯源 Block。
97
99
  - **写入前消解。** 写入前,StrataGate 会先在两个池中检索重复与冲突:精确或高度近似的重复会强化既有卡片而不新写;词面重叠模糊的记录会触发一次同步模型仲裁,复用外部记忆导入的决策契约 —— `ADD`、`MERGE`、`SUPERSEDE`(仅高置信度;低置信度的合并/取代会降级为非破坏性的冲突标记)、`CONFLICT`(双向回链)或 `IGNORE`。工具结果会回报 `action`、`gate` 与 `reason`。与既有记忆没有实质重叠的事实直接写入,不调用模型。
@@ -185,7 +187,7 @@ config:
185
187
 
186
188
  ## 兼容性与权限
187
189
 
188
- 发布门禁会在 Node `24`、Linux 和 Windows 上测试完整的 DSH `0.1.2-rc.1` 依赖族,以及 `@deepseek-ai/dsh@0.1.5-rc.1`、`@deepseek-ai/dsh@0.1.6-alpha.1` 和 `@deepseek-ai/dsh@0.1.7-rc.1`。0.1.5 CLI 的真实依赖树会把内部 DSH 包解析为 `0.1.5-rc.2`;0.1.6 和 0.1.7 CLI 的受测内部 DSH 与 Session Format 包分别解析为对应版本。0.1.7 宿主还提供 Cordis `4.0.4` 和 Schemastery `3.18.4`。插件将这些包声明为可选且精确版本的 peer,由宿主提供一套一致的运行时,避免 npm 在插件目录再安装第二套核心包;不会笼统承诺其他 `0.1.x` 版本。
190
+ 发布门禁会在 Node `24`、Linux 和 Windows 上测试完整的 DSH `0.1.2-rc.1` 依赖族,以及 `@deepseek-ai/dsh@0.1.5-rc.1`、`@deepseek-ai/dsh@0.1.6-alpha.1`、`@deepseek-ai/dsh@0.1.7-rc.1` 和 `@deepseek-ai/dsh@0.1.7-rc.2`。0.1.5 CLI 的真实依赖树会把内部 DSH 包解析为 `0.1.5-rc.2`;0.1.6 和 0.1.7 CLI 的受测内部 DSH 与 Session Format 包分别解析为对应版本。0.1.7 宿主还提供 Cordis `4.0.4` 和 Schemastery `3.18.4`。插件将 DSH `0.1.7` 内部包的可选 peer 范围放宽到 `>=0.1.7-rc.1 <0.1.8-0`,启动时仍要求它们全部来自同一版本,并限制 Cordis 与 Schemastery 在已知的小版本补丁范围内。未来 `0.1.7` 更新可直接安装,但发布门禁只覆盖上面列出的版本;更新后仍应运行兼容性检查。不包含 `0.1.8`。
189
191
 
190
192
  DSH 核心包现在都是由宿主提供的可选 peer。若某个 profile 曾在本地安装这些 peer,升级后、启动前运行 `dsh plugin --profile <名称> exec stratagate-dsh-repair`。该命令只会把已知 DSH 运行时包移动到 profile 内的 `.stratagate-runtime-backups` 并写入恢复收据,不会删除包或触碰会话数据。启动时 bootstrap 还会把 StrataGate 自身的 DSH 导入定向到宿主维护的共享模块回退目录,再检查实际解析出的 DSH 核心族;未知宿主会立即给出明确错误并停止,而不是让正文区域空白。对于 DSH `0.1.5` 至 `0.1.7`,含已废弃 `stratagate/memory-citations` 事件的 v0 会话会先复制成经过校验的 v1 代际,再由宿主继续其迁移链;原始 v0 日志不会被修改,并写入 `stratagate-legacy-citations-v1.json` 记录源/目标哈希和恢复说明。
191
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stratagate-dsh",
3
- "version": "0.2.87",
3
+ "version": "0.2.90",
4
4
  "description": "Recent conversations stay vivid. Older ones fade into summaries, not oblivion. StrataGate gives DeepSeek Harness six-layer, time-decaying memory, while lasting events and relationships settle into a knowledge graph. Bring your memories from other AIs with you—no need to start over.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -118,7 +118,8 @@
118
118
  "0.1.2-rc.1",
119
119
  "0.1.5-rc.1",
120
120
  "0.1.6-alpha.1",
121
- "0.1.7-rc.1"
121
+ "0.1.7-rc.1",
122
+ "0.1.7-rc.2"
122
123
  ]
123
124
  },
124
125
  "permissions": [
@@ -151,19 +152,19 @@
151
152
  "node": "^22.19.0 || >=24.0.0"
152
153
  },
153
154
  "peerDependencies": {
154
- "@deepseek-ai/cordis": "4.0.2 || 4.0.4",
155
- "@deepseek-ai/dsh-agent-default-model": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
156
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
157
- "@deepseek-ai/dsh-llm": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
158
- "@deepseek-ai/dsh-native-command": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
159
- "@deepseek-ai/dsh-session": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
160
- "@deepseek-ai/dsh-session-format": "0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
161
- "@deepseek-ai/dsh-session-format-catalog": "0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
162
- "@deepseek-ai/dsh-session-format-v0-to-v1": "0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
163
- "@deepseek-ai/dsh-settings": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
164
- "@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
165
- "@deepseek-ai/dsh-tools": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.7-rc.1",
166
- "@deepseek-ai/schemastery": "3.18.2 || 3.18.4"
155
+ "@deepseek-ai/cordis": "4.0.2 || ~4.0.4",
156
+ "@deepseek-ai/dsh-agent-default-model": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
157
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
158
+ "@deepseek-ai/dsh-llm": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
159
+ "@deepseek-ai/dsh-native-command": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
160
+ "@deepseek-ai/dsh-session": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
161
+ "@deepseek-ai/dsh-session-format": "0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
162
+ "@deepseek-ai/dsh-session-format-catalog": "0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
163
+ "@deepseek-ai/dsh-session-format-v0-to-v1": "0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
164
+ "@deepseek-ai/dsh-settings": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
165
+ "@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
166
+ "@deepseek-ai/dsh-tools": "0.1.2-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || >=0.1.7-rc.1 <0.1.8-0",
167
+ "@deepseek-ai/schemastery": "3.18.2 || ~3.18.4"
167
168
  },
168
169
  "peerDependenciesMeta": {
169
170
  "@deepseek-ai/cordis": {
@@ -208,18 +209,18 @@
208
209
  },
209
210
  "devDependencies": {
210
211
  "@deepseek-ai/cordis": "4.0.4",
211
- "@deepseek-ai/dsh": "0.1.7-rc.1",
212
- "@deepseek-ai/dsh-agent-default-model": "0.1.7-rc.1",
213
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.1",
214
- "@deepseek-ai/dsh-llm": "0.1.7-rc.1",
215
- "@deepseek-ai/dsh-native-command": "0.1.7-rc.1",
216
- "@deepseek-ai/dsh-session": "0.1.7-rc.1",
217
- "@deepseek-ai/dsh-session-format": "0.1.7-rc.1",
218
- "@deepseek-ai/dsh-session-format-catalog": "0.1.7-rc.1",
219
- "@deepseek-ai/dsh-session-format-v0-to-v1": "0.1.7-rc.1",
220
- "@deepseek-ai/dsh-settings": "0.1.7-rc.1",
221
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.1",
222
- "@deepseek-ai/dsh-tools": "0.1.7-rc.1",
212
+ "@deepseek-ai/dsh": "0.1.7-rc.2",
213
+ "@deepseek-ai/dsh-agent-default-model": "0.1.7-rc.2",
214
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
215
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
216
+ "@deepseek-ai/dsh-native-command": "0.1.7-rc.2",
217
+ "@deepseek-ai/dsh-session": "0.1.7-rc.2",
218
+ "@deepseek-ai/dsh-session-format": "0.1.7-rc.2",
219
+ "@deepseek-ai/dsh-session-format-catalog": "0.1.7-rc.2",
220
+ "@deepseek-ai/dsh-session-format-v0-to-v1": "0.1.7-rc.2",
221
+ "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
222
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
223
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
223
224
  "@deepseek-ai/schemastery": "3.18.4",
224
225
  "@types/node": "^22.0.0",
225
226
  "cytoscape": "^3.34.1",