D
@huanlin/dsh-plugin-interpreters
v0.1.0 · 4 天前发布
Exposes run_python and run_node tools with configurable interpreter paths; settings card (via /interpreters/api HTTP route) lets users set the executable locations.
README
dsh-interpreters
DSH 插件:暴露 run_python 和 run_node 两个模型可调用工具,通过 stdin 执行代码并返回 stdout/stderr/exit code。在设置页「插件配置」分区提供配置卡片,让用户设置 Python 和 Node.js 解释器的可执行文件路径,工具描述中会告知模型解释器位置。
架构
run_python / run_node,通过 spawn(executable, ['-']) 执行代码,代码经 stdin 传入(无命令行长度限制)ctx.settings 命名空间 interpreters 持久化到 $DSH_HOME/settings.yamldescription 在注册时根据配置计算,包含解释器路径;设置变更时通过 bridge.onChange() 自动重新注册interpreters 不在其中),所以浏览器通过 host 内置的 typertRemote /api RPC 通道读写 interpreters 命名空间——InterpretersConfigGateway 继承 TypertRemoteService 并用 @Remote('get') / @Remote('set') 标记方法,typertRemote 的 SRC discovery 自动 claim /api/interpreters/get 和 `/api/interpret版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- AGPL-3.0
- npm
- @huanlin/dsh-plugin-interpreters
- Repo
- —
- Engines
{"node":">=18.0.0"}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-ui-settings-plugins","@deepseek-ai/dsh-client-ui-slots"],"platform":"web"}}