stratagate-dsh 0.3.3 → 0.3.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/CHANGELOG.md +13 -0
- package/dist/client.js +4 -3
- package/dist/plugin.js +375 -73
- package/dist/plugin.js.map +1 -1
- package/docs/DSH.md +6 -0
- package/docs/DSH.zh-CN.md +6 -0
- package/docs/MEMORY_TOPICS.zh-CN.md +2 -2
- package/package.json +1 -1
package/docs/DSH.md
CHANGED
|
@@ -197,6 +197,12 @@ config:
|
|
|
197
197
|
# model: deepseek-chat
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
+
Topic Projection has an independent output bound of 32,768 tokens. Advertised model context capacity can lower it after subtracting estimated input and a 1,024-token margin. Other memory tasks retain their existing budget policies. The Host's `defaultMaxTokens` is a default, not a hard capacity declaration; unadvertised provider limits can still fail a request.
|
|
201
|
+
|
|
202
|
+
Topic technical details and task details in `/api/stratagate/overview` distinguish `max-tokens`, `schema-invalid`, `validation-failed`, `timeout`, `provider-failed`, `worker-failed`, and `source-changed`. Diagnostics retain only safe validation rules and numeric/runtime metadata, never raw chat, Event/Topic prose, full model responses, or reasoning. `requested-unverified` means off was requested, not that the provider honored it; observed reasoning is marked separately.
|
|
203
|
+
|
|
204
|
+
Only explicit `finish=max-tokens` splits a failed batch in half, with at most four levels and three attempts per singleton. Each historical child still consumes the shared Bootstrap allowance, without trimming Event evidence. Other failures keep bounded retry and backoff. After automatic attempts are exhausted, the directory retry action (`POST /api/stratagate/topics/retry`, with namespace, jobId and expectedRevision) or `POST /api/stratagate/jobs/retry?namespace=...&kind=topic-projection&jobId=...` queues a fresh job ID. Both paths enforce source versions, reject old results, and persist across restart. Upgrades never automatically revive historical terminal failures.
|
|
205
|
+
|
|
200
206
|
`blockTurnSize` and `blockDecayLambda` are initial fallbacks. Once changed in **Advanced Settings**, persisted UI values take precedence. λ defaults to `0.3`; smaller values forget more slowly and consume more tokens, and values above `0.4` are not recommended.
|
|
201
207
|
|
|
202
208
|
`project` derives a stable namespace from the normalized session working directory. `session` isolates every DSH session. `global` shares one namespace.
|
package/docs/DSH.zh-CN.md
CHANGED
|
@@ -172,6 +172,12 @@ config:
|
|
|
172
172
|
# model: deepseek-chat
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
+
Topic Projection 使用独立的 32,768 token 输出上限;若宿主公布了模型 context window,会扣除估算输入和 1,024 token 余量后进一步降低上限。其他记忆任务继续使用原有预算策略。宿主的 `defaultMaxTokens` 是默认值,不代表模型硬上限;未公布的 provider 限制仍可能导致调用失败。
|
|
176
|
+
|
|
177
|
+
Topic 技术详情及 `/api/stratagate/overview` 的任务详情会区分 `max-tokens`、`schema-invalid`、`validation-failed`、`timeout`、`provider-failed`、`worker-failed` 和 `source-changed`。诊断仅记录安全校验规则、数量、估算 token、请求预算、finish reason、reasoning off 请求/回退状态和尝试次数,不记录原始聊天、Event/Topic 正文、完整模型响应或 reasoning。`requested-unverified` 表示发送了 off 请求,不能证明 provider 实际关闭了 reasoning;若仍观察到 reasoning,会明确标记。
|
|
178
|
+
|
|
179
|
+
只有明确的 `finish=max-tokens` 才会二分失败批次,最多四层,单条批次最多尝试三次;每个历史子批次仍受共用 Bootstrap 额度约束,不裁剪 Event 证据。其他错误维持原有有限重试与退避。自动尝试耗尽后,可通过目录“重新整理这 N 条”(`POST /api/stratagate/topics/retry`,携带 namespace、jobId 和 expectedRevision),或 `POST /api/stratagate/jobs/retry?namespace=...&kind=topic-projection&jobId=...` 重新排队。两条路径均开启新 jobId 周期,检查来源版本并拒绝旧结果,状态在重启后保留。升级不会自动复活历史终态失败。
|
|
180
|
+
|
|
175
181
|
配置文件中的 `blockTurnSize` 和 `blockDecayLambda` 是初始后备值;一旦在“高级设置”中修改,持久化的界面值优先生效。λ 默认值为 `0.3`;数字越小,记忆遗忘越慢、消耗 token 越多,不建议大于 `0.4`。
|
|
176
182
|
|
|
177
183
|
`project` 会根据规范化后的会话工作目录生成稳定的命名空间;`session` 会隔离每个 DSH 会话;`global` 则让所有会话共享同一个命名空间。
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 使用方式
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 用户画像继续单独常驻。默认目录提供 Chapter 标题、description 和按稳定顺序排列的 Section 标题,并保留主题编号;不注入 `.0` / overview 正文。
|
|
8
8
|
- 目录只用于导航;主题概览把已有事件整理为背景、进展、决定、变化和待确认问题,每段保留事件来源。
|
|
9
9
|
- 一个 Topic 对应长期的大章节,例如“StrataGate”“求职与职业发展”。节是能持续容纳同类事件的长期类别,例如“缺陷排查与修复”“版本发布与安装”“架构与配置决策”;单个 bug、版本、日期、任务和处理状态留在节内总览与原事件,不独立成节。已有类别能容纳时复用原标题,同类不同状态或不同版本不再拆节。分类随章的实际内容归纳,不套全局固定表,不设硬节数上限;归类不改变任何事件事实。
|
|
10
10
|
- 小节归属单独保存在 `sections` 的标题与事件编号中;总览只概括内容并保留各段自己的证据引用。同一章内同名小节及总览按全半角、大小写和空白规范化匹配,与段落类型无关。新总览的展示标题必须匹配本轮声明或继承的小节;省略标题时,其类型对应的默认名称也必须匹配,模型解析和显式 `sections` 写入共用同一校验。总览不能自行建立无事件的小节;旧快照及无 `sections` 的旧 SDK 调用仍按来源和类型名称恢复,有效旧总览可原样保留。节的 `.0 总览` 按各段最早来源在章节中的位置排序并原样展示内容,同位置按最晚来源位置及稳定内容排序;`.1~N` 分页展示归入该节的事件,不要求总览引用每条事件。没有总览的小节仍展示事件,界面不显示空的 `.0 总览`。
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
- 主题目录按偏好与要求、决定与计划、工作与结果、交流与协作、其他经历分类;分类仅用于浏览,不改变主题内容和编号。完整目录每页最多 20 项。
|
|
35
35
|
- 正式主题按创建时间从早到晚排列,新增主题追加;同一时刻仅以不可变的主题编号排序,改名不改变章序。注入目录、主题工具与界面共用这一顺序,待整理入口置后,展示章号不写入数据库。
|
|
36
36
|
- Dashboard 只返回主题、节、总览段落及事件数量,不返回事件成员编号、全量标题或摘要;Bootstrap 失败详情也只传数量。完整成员关系保留在服务端。节编号由规范化标题派生,界面与分页共用同一聚合规则。展开节、待整理或失败详情时,用只读接口每页最多读取 9 条事件;数据版本变化时丢弃旧页。同类型但不同标题仍是不同节,同名段落合为一个节。
|
|
37
|
-
-
|
|
37
|
+
- 目录默认预算不超过 400 个估算词元,原相关记忆预算为 900 词元。超预算时先预留分类、`memory_list_topics(category, offset)` 分页和 `memory_expand_topic(id)` 小节入口;优先保留章标题与 description,再逐轮为各章加入小节标题。章信息仍放不下时优先保留各分类的章入口,必要时省略 description;全部输出共用预算,未展示的章和小节可继续按需浏览。
|
|
38
38
|
|
|
39
39
|
## 必须始终成立
|
|
40
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stratagate-dsh",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
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",
|