@sparkelf/dsh-knowledge-base 0.5.3 → 0.6.0
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 +36 -0
- package/lib/client.js +1128 -739
- package/lib/client.js.map +1 -1
- package/lib/index.js +219 -34
- package/lib/types/client/KnowledgeContextMenu.d.ts +19 -1
- package/lib/types/client/KnowledgeFileTree.d.ts +23 -0
- package/lib/types/client/KnowledgeMemory.d.ts +13 -0
- package/lib/types/client/locales.d.ts +7 -0
- package/lib/types/guardianSession.d.ts +23 -0
- package/lib/types/index.d.ts +21 -0
- package/lib/types/memoryRoutes.d.ts +7 -1
- package/lib/types/memorySettings.d.ts +83 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,42 @@ index tooling over a mounted directory. Runs standalone or against a DataOps bac
|
|
|
38
38
|
- 守护会话用标准模式(不新增 preset),由 `users/<uid>/guardian.json` 记录 sessionId,懒创建;它读 `memory-guardian` 技能,派 `memory-extract` / `memory-sop-evaluate` 子代理。
|
|
39
39
|
- 写入工具:`memory_record`(仅守护会话)写五类记忆;`memory_promote_sop` 把有效 SOP 晋升为 `$DSH_HOME/skills/<slug>/SKILL.md` 并删除 SOP。
|
|
40
40
|
|
|
41
|
+
## 记忆设置(0.6.0)
|
|
42
|
+
|
|
43
|
+
- 记忆页同时管理开关和整理间隔:`memoryEnabled` 与 `consolidationIntervalMinutes`
|
|
44
|
+
(默认 60,允许 15–1440 的整数分钟)。
|
|
45
|
+
- 设置仍写在 `<usersRoot>/<userId>/settings.json`,0.6.0 写入 `version: 2`;旧版
|
|
46
|
+
`{version:1,memoryEnabled}` 或手写 `{memoryEnabled}` 继续可读,缺失/损坏的 interval
|
|
47
|
+
回退 60,不会改变用户已经明确选择的开关。
|
|
48
|
+
- 保存走一次 tmp+rename 原子写:`memory.save-settings` 接受 `enabled` 和/或
|
|
49
|
+
`consolidationIntervalMinutes`,只保存间隔时保留开关。`memory.settings` 返回
|
|
50
|
+
`enabled`、`consolidationIntervalMinutes`、`intervalMin`、`intervalMax`、
|
|
51
|
+
`intervalDefault`。
|
|
52
|
+
- 首次读取默认:只有 `/auth/me` 的 `permissions` 含配置项
|
|
53
|
+
`memoryDefaultEnabledPermission`(默认 `kb:config:manage`,DataOps 中仅超管/管理员)
|
|
54
|
+
的主体才默认 `memoryEnabled: true`;其他新用户仍为 paused。默认只在没有 settings 文件
|
|
55
|
+
时生效,用户显式关闭写入的 `false` 永远优先。KB 包本身不硬编码角色名;部署可把该配置
|
|
56
|
+
指向更严格的权限键,或设为空字符串关闭管理员默认。
|
|
57
|
+
- guardian/tool/trigger 与页面共用同一个默认策略;页面请求把本次请求已经解析的权限投影
|
|
58
|
+
直接传给 store,避免重复调用 DataOps。
|
|
59
|
+
- `consolidationIntervalMinutes` 本轮只做校验、持久化和展示。现有触发模型是
|
|
60
|
+
idle/compaction/dream,没有按该间隔运行的调度器;把 interval 接到 dream/外部调度属于
|
|
61
|
+
下一阶段,不在本轮偷偷加一个 cron。
|
|
62
|
+
|
|
63
|
+
### 未完成项(2026-11-18)
|
|
64
|
+
|
|
65
|
+
- **Guardian**:`memory_context` / `memory_guardian_send` / `memory_guardian_run` 代码路径
|
|
66
|
+
已存在;本轮补了 30s 的会话解析/投递上限(`GuardianTimeoutError`,code=unreachable),
|
|
67
|
+
避免守护会话卡住时普通会话工具调用无限等待。守护会话模型回合本身的耗时仍由 DSH agent
|
|
68
|
+
运行时决定,本轮未重新跑完整 AI guardian E2E。
|
|
69
|
+
- **SOP 晋升**:`memory_promote_sop` 只有守护会话工具入口,没有 `memory.promote` 产品
|
|
70
|
+
API,也没有审核/发布 UI。**BLOCKED-BY-PRODUCT-GAP**:先定义谁能审核、晋升后技能归属
|
|
71
|
+
与回滚,再开路由。
|
|
72
|
+
- **部门/全局可见性**:`memoryRoutes.ts` 只服务调用者个人记忆;没有
|
|
73
|
+
`memory.publish`/`memory.list-shared` 产品路由,也没有部门管理员审核面。
|
|
74
|
+
**BLOCKED-BY-PRODUCT-GAP**:需要先确认部门/全局记忆的发布、撤回与可见性矩阵,不能在
|
|
75
|
+
个人路由上直接放宽 scope。
|
|
76
|
+
|
|
41
77
|
## 两种部署形态
|
|
42
78
|
|
|
43
79
|
同一个包,一份代码,由**有没有配置 `baseUrl`** 决定跑哪种形态。这不是一个运行期开关,
|