Files
deepseek-harness/packages/host/README.zh.md
creatixchu 85ca8be104 feat(host,client): compose directory picking through slots — dual-face -native, no wire advertisement
ui-workspace's two trigger surfaces each declare a single-kind directory-flow
hole (conversation.hero.workspace.directoryFlow / sidebar.workspaces.directoryFlow,
same owner contract) and keep only the trigger and the adoption: the Open-local-
folder entry renders while the surface's hole is occupied, and the occupant
reports one picked path per open through the hole's owner conversation
(open/busy/onPicked/onCancel/onError).

directory-picker-native becomes dual-face: its browser half fills both holes
with a renderless occupant driving host.pickDirectory, so the cordis.yml row
that mounts the backend also composes the client interaction — a mismatch is
impossible and a second flow package fails at client load.

With composition wiring both sides, the host.describe.directoryPicker
advertisement and the client's kind branching lose their last consumer:
the field, WorkspacesService.directoryPickerKind(), the DirectoryPickerKind
wire type, and the picker's per-open describe read are deleted. The connection
fixture now serves a deterministic pickDirectory path so the keyless snapshot
drives the full pick-then-adopt flow. ui-workspace's hand-rolled declaration
deferral is replaced by the deferRegistration helper it duplicated.
2026-07-28 21:51:01 +08:00

1.7 KiB
Raw Blame History

host/ — web GUI 宿主半侧

English | 中文

dsh web GUI 的宿主侧:所有客户端形态共用的 API 网关,以及承载它的纯 HTTP 服务器。浏览器侧位于 client/;组合后的应用是 apps/cli,它负责服务 apps/web。全部为产品包。

角色 ctx 键
apiproxy/ 共享 API 网关:零 Node 依赖的 TS 协议契约(src/api/、fetch 载体对(宿主侧 toFetchHandler、客户端侧 AbstractApiClient),以及基于 ctx.agentsctx.workspace 的宿主实现 ctx.apiProxy
webserver/ 纯 HTTP 路由注册载体:激活即监听的 node:http 服务器;路由以命名的 exactprefix 处理器注册 ctx.httpServer
directory-picker/ 工作区目录选择 seam网关的 picker RPC 委托的可辨识 nativebrowse 能力 ctx.directoryPicker
directory-picker-native/ 双面原生交互OS 选择器后端osascriptPowerShellZenity+KDialog仅宿主屏幕可用+ 填入 ui-workspace 目录流 slot 的 browser half (注册 ctx.directoryPicker
directory-picker-browse/ 应用内浏览后端:基于 Node 标准库的列举/创建原语;支持远程 (注册 ctx.directoryPicker

apiproxy 在设计上与传输方式无关——它不注册任何路由;载体自行包装 ctx.apiProxy。HTTP 载体路由(连同其 /api 浏览器信任栅栏)由 client/connection 的 node 半侧挂载,这正是该包住在 client 组的原因:它拥有这条线的两端。