@roaming-ai/dsh-group-chat 0.3.1 → 0.4.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 +5 -3
- package/lib/client.js +176 -8
- package/lib/client.js.map +1 -1
- package/lib/index.js +110 -89
- package/lib/types/client/components/SpeakerOrb.d.ts +13 -0
- package/lib/types/core/types.d.ts +3 -2
- package/lib/types/host/persistence/persistence.d.ts +2 -4
- package/lib/types/host/persistence/store.d.ts +5 -1
- package/lib/types/host/service.d.ts +2 -2
- package/lib/types/host/state.d.ts +1 -0
- package/lib/types/host/tools/tools.d.ts +2 -1
- package/lib/types/index.d.ts +3 -0
- package/package.json +4 -1
- package/src/client/GroupChatPanel.tsx +2 -0
- package/src/client/components/ChatPanel.tsx +1 -1
- package/src/client/components/Composer.tsx +2 -2
- package/src/client/components/MessageFlow.tsx +6 -2
- package/src/client/components/SpeakerOrb.tsx +201 -0
- package/src/client/lib/styles.ts +9 -2
- package/src/core/types.ts +3 -2
- package/src/host/engine/conversation.ts +1 -1
- package/src/host/persistence/persistence.ts +57 -34
- package/src/host/persistence/store.ts +5 -1
- package/src/host/service.ts +4 -4
- package/src/host/state.ts +5 -2
- package/src/host/tools/tools.ts +40 -46
- package/src/index.ts +7 -5
package/src/index.ts
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* (engine/fold.ts;立刻 idle、fire-and-forget,不产生消息)
|
|
15
15
|
* - 群组工作区目录经 `fs` 服务读取(根下一层文本文件,最多 20 个),
|
|
16
16
|
* 以「共享资料」块注入每个角色的 system 提示词;无独立笔记/文件清单
|
|
17
|
+
* - 工具执行(read_file/list_dir/run_command)见 docs/TOOLS.md:run_command
|
|
18
|
+
* 经 `shell` 服务(ctx.shell 沙箱执行器)执行,per-call sandboxPolicy
|
|
19
|
+
* 收紧到群工作区(workspace_write 档)或免受限(full_access 档)
|
|
17
20
|
* - 经 `webServer` 暴露 HTTP API:
|
|
18
21
|
* GET /api/group-chat/state 全量快照
|
|
19
22
|
* POST /api/group-chat/action { kind: mutate|send|stop|confirmCommand|models|efforts|browse|fileSearch, ... }
|
|
@@ -36,7 +39,7 @@ import { createGroupChatService, makeGroupChatRoutes } from './host/index.ts'
|
|
|
36
39
|
|
|
37
40
|
export const name = 'group-chat'
|
|
38
41
|
|
|
39
|
-
export const inject = ['llm', 'fs', 'webServer', 'workspaceRegistry']
|
|
42
|
+
export const inject = ['llm', 'fs', 'shell', 'webServer', 'workspaceRegistry']
|
|
40
43
|
|
|
41
44
|
/** 设置命名空间;浏览器半拼写同一值,两边不共享代码。 */
|
|
42
45
|
export const SETTINGS_NAMESPACE = 'group-chat' as SettingsNamespace
|
|
@@ -65,10 +68,9 @@ export const apply = mountOnce('dsh-group-chat', (ctx: Context, config?: Config)
|
|
|
65
68
|
}
|
|
66
69
|
}, 'group-chat: host API routes')
|
|
67
70
|
|
|
68
|
-
// 插件卸载/热重载:唤醒确认等待 + kill 子进程 →
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
71
|
+
// 插件卸载/热重载:唤醒确认等待 + kill 子进程 → 异步最终 flush → 释放锁
|
|
72
|
+
// (返回 Promise,cordis 卸载时 await,保证新实例接管前锁已释放)
|
|
73
|
+
ctx.effect(() => () => service.dispose())
|
|
72
74
|
|
|
73
75
|
// ---------- 设置(enabled 持久化于 settings.yaml) ----------
|
|
74
76
|
|