dsh-host-directory-picker/packages/host/directory-picker官方

175.3kStar19.0kFork0Issue752Watching

为 DeepSeek Harness web GUI host 提供目录选择能力抽象,定义 ctx.directoryPicker 接口,支持原生系统选择器和应用内浏览器两种交互模式

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-host-directory-picker

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/host/directory-picker:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

The web GUI host's workspace-directory picker is a capability seam. The abstract DirectoryPicker service (ctx.directoryPicker) is its Service Definition. Its only method, capability(), returns a discriminated union describing how an operator selects a directory. Backends differ in user interaction, not just implementation: { kind: 'native', pick(signal) } opens one native OS chooser on the host display (-native); { kind: 'browse', list(path?), createDirectory(path, name) } provides listing and creation operations for an in-app browser, which works for remote clients that cannot reach an OS chooser (-browse). Consumers switch on capability().kind; the union derives from the merge-extensible DirectoryPickerCapabilities map, and a new backend adds its variant there through declaration merging. For an unknown kind, consumers hide directory picking rather than fail. The capability object must be stable for the service lifetime. Each backend package also has a browser entrypoint that registers the matching interaction in ui-workspace's directory-flow slots, so one composition row selects both the host capability and the client flow. A composition that should choose at runtime mounts -auto, which inspects the host once at boot and mounts the matching backend row.

Browse primitives fail with the typed DirectoryPickerError (directory-unreadable / directory-exists / directory-create-failed, each carrying the subject path), which the consuming gateway maps 1:1 onto wire error codes. DirectoryEntry rows carry a host-owned hidden flag (POSIX dot convention) so display policy stays client-side; DirectoryListing.crumbs is the ancestor chain from the filesystem root, every crumb a jump target. Design rationale, the ctx.fs separation, and the policy decisions live in the directory-picker capability seam Agent Note.

Model Experience

None, as the seam serves the GUI host's directory selection; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • No multi-root support — the browse contract exposes one ancestry chain per listing; per-deployment root scoping (and Windows drive-root enumeration above a drive) waits for a consumer that needs it, per the DirectoryPicker Agent Note.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/host/directory-picker)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录
dsh-host-directory-picker/packages/host/directory-picker — DeepSeek Harness 插件 | deepseek-plugin.org