dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness plugin for cloning Git repositories as workspaces
English | 简体中文
直接通过 Git URL 添加 DeepSeek Harness 工作区。
此插件扩展了 Harness 现有的添加工作区流程。打开后会显示两个选项卡:
主机不通过 shell 运行 git clone,并将完成后的路径交回 Harness 的标准工作区创建流程。克隆操作在私有暂存目录中进行,因此克隆失败绝不会删除或覆盖现有目标位置。
0.1.1-rc.2 或兼容版本PATH 中可用的 gitpnpm install
pnpm pack
dsh plugin --profile default add /absolute/path/to/dsh-workspace-git-0.1.1.tgz
在 Windows 上使用 Harness 0.1.1-rc.2 时,包含空格的本地包路径在转发给 pnpm 时可能会被拆分。如有必要,请先将 tarball 复制到不含空格的路径(例如 $env:TEMP\dsh-workspace-git-0.1.1.tgz),然后再运行 dsh plugin add。
使用该 profile 重新启动 dsh web 并刷新 Web UI。客户端包元数据是在启动时扫描的,因此仅在 GUI 运行期间安装包是不够的。
此包遵循 Harness 官方插件打包指南,并包含从 Git 安装所需的 prepare 脚本:
dsh plugin --profile default add github:YOUR_ORG/dsh-workspace-git#COMMIT_SHA
pnpm 10 默认阻止依赖项的构建脚本。如果首次安装要求批准构建,请将它报告的确切包键添加到 profile 的 pnpm-workspace.yaml:
allowBuilds:
dsh-workspace-git: true
然后重复安装。只允许并固定你信任的代码:prepare 会在安装期间执行。
这两个字段都可在设置 → 插件 → Git 工作区中使用。更改在保存前处于暂存状态,通过 DSH Settings 持久保存,并在 DSH Web 重新启动后生效。profile 行仍是在已保存用户覆盖项之下的基础配置。
此 bundle 会添加一个 workspace-git 行。在 profile patch 中覆盖它以调整该基础配置:
- insert:
- id: workspace-git
name: dsh-workspace-git
config:
timeoutMs: 600000
maxOutputBytes: 65536
timeoutMs — 克隆超时;默认为 10 分钟,范围为 1 秒–60 分钟。maxOutputBytes — 失败时返回的最大已捕获 Git 输出;默认为 64 KiB,范围为 1 KiB–64 MiB。交互式 Git 提示已禁用,因此请求不会因等待终端输入而挂起。SSH agent 和已配置的凭据 helper 仍可正常工作。在正常浏览器操作中,克隆路由只接受同源 JSON 请求。
pnpm install
pnpm typecheck
pnpm test
pnpm build
此包包含两部分:
src/index.ts 是 Host Cordis 插件和克隆端点;src/client/index.ts 通过带文件夹/Git 选项卡的对话框占用两个标准的“添加工作区”目录流程 slot;package.json#dsh.client 和 ./client export 使 Harness 能够发现 lib/client.js;cordis.patch.yml 将该包加入 profile。要实现完整的浏览器集成,请将构建后的包安装或链接到 profile 中。仅含源代码的 --patch 行只会加载 Host 部分,因为客户端模块 registry 会从包 manifest 中发现浏览器 bundle。