@sparkelf/dsh-knowledge-base 0.6.0 → 0.6.1
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/README.md +28 -7
- package/lib/client.js +1103 -645
- package/lib/client.js.map +1 -1
- package/lib/index.js +857 -81
- package/lib/types/client/KnowledgeMemory.d.ts +63 -0
- package/lib/types/client/locales.d.ts +27 -0
- package/lib/types/memoryPromotion.d.ts +180 -0
- package/lib/types/memoryPromotionRoutes.d.ts +80 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,13 +66,34 @@ index tooling over a mounted directory. Runs standalone or against a DataOps bac
|
|
|
66
66
|
已存在;本轮补了 30s 的会话解析/投递上限(`GuardianTimeoutError`,code=unreachable),
|
|
67
67
|
避免守护会话卡住时普通会话工具调用无限等待。守护会话模型回合本身的耗时仍由 DSH agent
|
|
68
68
|
运行时决定,本轮未重新跑完整 AI guardian E2E。
|
|
69
|
-
- **SOP
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
`memory.
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
- **SOP→技能**:`memory_promote_sop` 只有守护会话工具入口;它把有效 SOP 写成
|
|
70
|
+
`$DSH_HOME/skills/<slug>/SKILL.md` 后删除 SOP。该路径与下节的「记忆晋升到部门/全局」
|
|
71
|
+
是两件事,本轮未给前者增加产品页入口。
|
|
72
|
+
- **部门/全局晋升**:已由 0.6.1 的 `memory.promote` / `memory.promotions` /
|
|
73
|
+
`memory.review-promotion` / `memory.shared` 落地(见下节);撤回/降级、跨部门迁移和
|
|
74
|
+
技能归属策略仍未做。
|
|
75
|
+
|
|
76
|
+
## 记忆晋升与部门/全局可见性(0.6.1)
|
|
77
|
+
|
|
78
|
+
- 产品 API:`memory.promote` 把调用者**自己的**一条普通隐私记忆(含 SOP)晋升到
|
|
79
|
+
`department:<code>` 或 `global`。
|
|
80
|
+
- 权限:全局目标要求 `kb:config:manage` + 平台管理员;部门目标要求该部门在
|
|
81
|
+
`review.departments` 内(部门管理员即可,不需要 `kb:config:manage`)。DataOps 的
|
|
82
|
+
`canWrite` 仍是目标路径的最终权威,投影与后端不一致时只会更窄。
|
|
83
|
+
- 审核:默认创建 `pending` 记录,由**另一位**审核人通过;提交人自批返回 403
|
|
84
|
+
`SELF_APPROVAL_FORBIDDEN`。管理员可用 `confirm: true` 走「显式确认」直接生效,审计
|
|
85
|
+
记为 `confirmed`,与审核通过区分。
|
|
86
|
+
- 隐私:仅 `privacy: normal` 可晋升;`private`/`sensitive`/`secret` 直接拒绝
|
|
87
|
+
(`PRIVACY_NOT_PROMOTABLE`),不会被降级后共享。
|
|
88
|
+
- 落盘:通过后写 `<scope>/记忆共享/<promotion-id>.md` 并登记
|
|
89
|
+
`<scope>/.graphs/shared-memory/graph.json`;部门/全局列表按现有 KB 读写权限过滤,
|
|
90
|
+
响应中不含 `sourceUserId`、session id 或个人来源标签。
|
|
91
|
+
- 队列:`<actualRoot>/.memory/promotions.json`(v1),记录 actor、source memory、target
|
|
92
|
+
graph、审核人、时间与逐步 audit。
|
|
93
|
+
- UI:记忆页显示每条的「待审核/已晋升/已拒绝」状态;有审核权限时显示晋升审核队列
|
|
94
|
+
(自批按钮禁用并说明);「部门和全局记忆」为只读表,不出现个人记忆的查看/纠正/忘记操作。
|
|
95
|
+
- 兼容:个人记忆文件、`settings.json` v1/v2 和既有 `memory.list` 契约不变;晋升是复制,
|
|
96
|
+
原个人记忆保留。
|
|
76
97
|
|
|
77
98
|
## 两种部署形态
|
|
78
99
|
|