DeepSeek Harness 插件

dsh-plugin-interpreters

Exposes run_python and run_node tools with configurable interpreter paths; settings card (via /interpreters/api HTTP route) lets users set the executable locations.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
HuanLinOTO/dsh-plugin-interpreters
最近更新
2026年8月19日
分类
工具与能力
GitHub stars
10
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/HuanLinOTO/dsh-plugin-interpreters
插件名:dsh-plugin-interpreters
作者:HuanLinOTO

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<p align="center"> <a href="https://dshfind.com/zh/plugins/huanlinoto/dsh-plugin-interpreters"><img src="https://dshfind.com/api/card/huanlinoto/dsh-plugin-interpreters?lang=zh" alt="dsh-plugin-interpreters card"></a> </p>

dsh-interpreters

![npm version](https://www.npmjs.com/package/@huanlin/dsh-plugin-interpreters)

DSH 插件:暴露 run_pythonrun_node 两个模型可调用工具,通过 stdin 执行代码并返回 stdout/stderr/exit code。在设置页「插件配置」分区提供配置卡片,让用户设置 Python 和 Node.js 解释器的可执行文件路径,工具描述中会告知模型解释器位置。

架构

  • 工具run_python / run_node,通过 spawn(executable, ['-']) 执行代码,代码经 stdin 传入(无命令行长度限制)
  • 设置持久化:通过 ctx.settings 命名空间 interpreters 持久化到 $DSH_HOME/settings.yaml
  • 动态 description:工具的 description 在注册时根据配置计算,包含解释器路径;设置变更时通过 bridge.onChange() 自动重新注册
  • 配置暴露(TypertRemoteService 模式):DSH 的 settings RPC 域(api-proxy)只向配置客户端提供白名单命名空间(interpreters 不在其中),所以浏览器通过 host 内置的 typertRemote /api RPC 通道读写 interpreters 命名空间——InterpretersConfigGateway 继承 TypertRemoteService 并用 @Remote('get') / @Remote('set') 标记方法,typertRemote 的 SRC discovery 自动 claim /api/interpreters/get/api/interpreters/set 端点。gateway 在 host 进程内 in-process 调 ctx.settings.update(ns, patch),绕过 wire-layer allowlist
  • 客户端 bundle:配置卡片通过 settings.plugin.item slot 注册(「插件配置」分区),卡片用 connection.rpc.call('/api', 'interpreters/get'|'set', { args: {...} }) 读写,不依赖 settingsScope(因为 interpreters 不在白名单中);connection/reset 事件触发卡片重载

开发

pnpm install          # 安装依赖(link: 指向 ~/.dsh/source/current/)
pnpm run typecheck    # tsc --noEmit
pnpm test             # vitest run
pnpm run build        # tsdown + tsc(生成 lib/index.js, lib/client.js, lib/types/*.d.ts)

目录结构

src/
├── index.ts              # Host 入口:name, inject, apply(实例化 bridge + gateway + 工具注册)
├── config.ts             # Config schema (schemastery), ResolvedConfig, resolveConfig
├── settings.ts           # installInterpretersSettings: 注册 namespace,返回 bridge (source() + onChange())
├── gateway.ts            # InterpretersConfigGateway: TypertRemoteService + @Remote('get'|'set')
├── tools.ts              # registerTools: 注册 run_python + run_node
├── runner.ts             # runCode: spawn + stdin + stdout/stderr 收集
└── client/
    ├── index.ts          # Client 入口:slots.inject('settings.plugin.item') + connection/reset
    ├── store.ts          # 卡片响应式 store(通过 connection.rpc 读写 /api/interpreters/*)
    ├── InterpretersCard.tsx  # 配置卡片组件
    └── locales.ts        # i18n (zh + en)

运行

本地安装

# 从 npm 安装(推荐):
dsh plugin --profile web add @huanlin/dsh-plugin-interpreters

# 本地开发(热更新):
dsh plugin --profile web add "link:D:/Projects/deepseek-harness/dsh-interpreters"

配置

默认配置(cordis.patch.yml):

pythonPath: 'python'    # Python 可执行文件路径
nodePath: 'node'        # Node.js 可执行文件路径
timeoutMs: 30000        # 执行超时(毫秒)

运行时通过设置页「插件配置」分区的卡片修改,持久化到 $DSH_HOME/settings.yaml

检查

pnpm run typecheck && pnpm test && pnpm run build

验证 lib/ 产物:

  • lib/index.js — host bundle(ESM,external: @deepseek-ai/dsh-typert-protocol, @deepseek-ai/dsh-settings, @deepseek-ai/dsh-tools, schemastery
  • lib/client.js — client bundle(CJS,window.__ModuleLoader__.load 包裹,external: react
  • lib/types/ — TypeScript 声明文件
  • cordis.patch.yml — bundle 配置层