
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-plugin-open-with
Advanced tools
Capsule split-button in the dsh web conversation header: open the workspace in VS Code, terminal, or file explorer — extensible to more launchers.
打开方式 · 胶囊拆分按钮
在 DeepSeek Harness Web 会话头部添加胶囊拆分按钮,一键在当前工作区打开 VS Code、终端(CMD / PowerShell)和文件资源管理器。
🖼 效果图 · 🧩 功能 · 🚀 安装 · 🔒 安全模型 · 🚧 已知限制 · 🏗 构建与扩展 · 🤝 贡献 · 📜 License


actions)或右侧工具区(utilities),保存后立即迁移槽位。open-in-app(Host 与 Client 两半同进同退),会话头部不会出现两个打开按钮。补丁层随插件加载、也随插件消失 —— 卸载后内置按钮自动恢复,本插件从不改动 profile 的 cordis.patch.yml。profile/<mode>/open-with/settings.json,重启后保持。已发布到 npm:dsh-plugin-open-with(当前最新 2.0.0)。在终端执行:
# 安装
dsh --profile web plugin add dsh-plugin-open-with
# 验证安装版本
dsh --profile web plugin list
# 卸载
dsh --profile web plugin remove dsh-plugin-open-with
git clone https://github.com/hyrinx/dsh-plugin-open-with.git
cd dsh-plugin-open-with
npm install
npm run build
dsh --profile web plugin add "link:$($PWD.Path)"
重启 dsh web 生效。后续修改源码只需重新 npm run build + 刷新浏览器。
本插件会在 DSH 宿主端启动外部程序,安全措施如下:
ctx.webServer 注册 settings / icon / open / log 四条路由;每条都先经 ctx.connection.requestRejection 校验 Host / Origin,抵御 DNS rebinding 与跨站调用。请求体限 64 KiB 且必须是 JSON。open-in-app 的 Host / Client 是一对,由本插件的 bundle 补丁按 id 一并关闭,避免只留一半的残缺形态;该补丁不属于 profile 配置,卸载即自动恢复。localhost / 127.0.0.1)。code 命令加入 PATH:首次运行时 host 用 PATH 解析预设项为绝对路径并写入配置;若命令不在 PATH,该项会保留裸名,需在设置页改填完整 .exe 路径。.exe 绝对路径。ExtractAssociatedIcon 取图标并缓存;取不到时图标位置留空,不显示占位图。npm install
npm run build # 先清 lib,再 tsdown 出主/客两端 bundle,tsc 出 lib/types/*.d.ts
npm run clean # 只删 lib(改过 src 文件结构后 build 会自己调它)
npm run typecheck # tsc -p tsconfig.json --noEmit
npm pack # 发布前预览 tarball 内容
npm publish --access public
目录结构(双半包:一个 host 半 + 一个 dsh.client 浏览器半):
dsh-plugin-open-with/
├── src/
│ ├── index.ts host 半入口:四条 webServer 路由 + connection 信任栅栏
│ ├── shared.ts 两半共享的路由、协议、设置模型与归一化
│ ├── storage.ts settings.json 原子读写 + profile 路径解析
│ ├── logger.ts host.log 落盘
│ ├── launch.ts 各启动器的 spawn 配方与可执行文件解析
│ ├── icons.ts 从可执行文件提取图标
│ └── client/ 浏览器半
│ ├── index.ts 入口:挂载按钮、注入设置页、注册词典
│ ├── OpenWithButton.tsx 胶囊拆分按钮
│ ├── OpenWithSettings.tsx 设置面板(添加/编辑表单、拖拽排序、可见性)
│ ├── ItemIcon.tsx 两个界面共用的行内图标
│ ├── settings-events.ts 设置变更进程内广播(按钮即时刷新 + 图标破缓存)
│ ├── controller.ts 浏览器 → host 的 RPC 载体
│ └── locales.ts 中英双语词典
├── locale/ 插件展示元数据(DSH 插件管理页的标题与描述来源)
├── lib/ 构建产物,勿手改(index.js / client.js / types/)
├── cordis.patch.yml bundle 补丁:插入本插件,并按 id 关掉内置 open-in-app
├── tsdown.config.ts 双配置:host 出 ESM,client 出 ModuleLoader 闭包工厂
└── tsconfig.json 只出声明(emitDeclarationOnly → lib/types/)
模型核心:所有启动器都是同一个 OpenWithItem(id / name / path / passCwd),没有预设与自定义的区分。默认项(DEFAULT_ITEMS)仅在设置文档不存在时作为种子写入,host 逐项把裸命令解析为绝对路径后落盘;此后每项就是普通项,可改名、改路径、隐藏、删除。要使一项不可被删除,并不存在这种情况——设计上所有项一律平等。
lib/ 与 package.json#exports 的子路径一一对应:. → lib/index.js、./client → lib/client.js、./locale/*.json → locale/*.json。展示名与描述只来自 locale/*.json 的 meta(package.json 的 name / description 仅作 fallback),locale/en.json 是 DSH 的发现基线,缺了整包元数据就不生效。
如何新增一个启动器:
src/shared.ts 的 DEFAULT_ITEMS 数组即可——因为所有项本就统一,新增默认项只需补一条 { id, name, path, passCwd },无需改动类型或启动分发。首次写入时 host 会解析并落盘。欢迎以下方向的 PR:
wt)、PowerShell 7 (pwsh)、Git Bash、Alacritty、WezTerm……提 PR 前请确保:
npm run typecheck # 通过
npm run build # 通过
npm pack # 无 WARN / error
FAQs
Capsule split-button in the dsh web conversation header: open the workspace in VS Code, terminal, or file explorer — extensible to more launchers.
We found that dsh-plugin-open-with demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.