Skip to content

HuanLinOTO/dsh-plugin-interpreters

60Last commit Aug 15, 2026

dsh-plugin-interpreters DSH plugin

This plugin provides two model-callable tools: run_python and run_node. It allows users to configure Python and Node.js interpreter paths via a settings card, and the tool descriptions dynamically reflect the interpreter locations. Code is executed by spawning the interpreter with stdin, capturing stdout, stderr, and exit code.

How to install the dsh-plugin-interpreters DSH plugin

dsh plugin --profile web add @huanlin/dsh-plugin-interpreters

Copying does not run this command. Review the repository and version before installing the dsh-plugin-interpreters DSH plugin.

dsh-plugin-interpreters DSH plugin data source

dsh-plugin-interpreters DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-plugin-interpreters DSH plugin can do

  • Exposes run_python and run_node tools that execute code via stdin and return stdout, stderr, and exit code.
  • Provides a settings card in the plugin configuration section to set Python and Node.js executable paths.
  • Supports a configurable timeout (default 30,000 ms) for code execution.
  • Dynamically updates tool descriptions based on configured interpreter paths via settings changes.
  • Persists configuration to $DSH_HOME/settings.yaml using the ctx.settings namespace.

Where the dsh-plugin-interpreters DSH plugin fits

  • Run Python code snippets directly in a DSH conversation to test algorithms or perform calculations.
  • Execute Node.js scripts for prototype testing or data processing within the DSH environment.
  • Automate code execution tasks by having the model call run_python or run_node as part of a workflow.
  • Verify code output and error messages interactively without leaving the DSH interface.

Who the dsh-plugin-interpreters DSH plugin is for

  • Developers who want to execute Python or Node.js code within DSH conversations.
  • Users who need a lightweight way to run code snippets and see results directly in the DSH interface.

dsh-plugin-interpreters DSH plugin limitations

  • Only supports Python and Node.js interpreters; no other languages are supported.
  • Requires the user to have Python and Node.js installed locally and configured correctly.
  • The execution timeout is fixed at 30 seconds by default and adjustable only via settings, not per-request.
  • Code execution is unsecured; the plugin does not sandbox or isolate the spawned processes.

dsh-plugin-interpreters DSH plugin: from the repository README

Quoted from the HuanLinOTO/dsh-plugin-interpreters README, the upstream source of the dsh-plugin-interpreters DSH plugin. Copyright remains with the original authors.

> 📌 本插件已收录于 [dshfind](https://dshfind.com/zh) 插件超市,点击上方徽章直达主页。 # dsh-interpreters [![npm version](https://img.shields.io/npm/v/@huanlin/dsh-plugin-interpreters)](https://www.npmjs.com/package/@huanlin/dsh-plugin-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.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

Read the full READMERepository license: NOASSERTION

dsh-plugin-interpreters DSH plugin questions

How do I install dsh-interpreters?

Run `dsh plugin --profile web add @huanlin/dsh-plugin-interpreters` in your terminal. This will install the plugin from npm. Make sure you have DSH installed and a profile named 'web' configured.

Can I run code in languages other than Python and Node.js?

No, this plugin only supports Python and Node.js interpreters. It provides two tools: run_python and run_node. If you need other languages, you would need a different plugin or custom solution.

How do I configure the Python and Node.js paths?

After installing the plugin, go to the DSH settings page and find the 'Plugin Configuration' section. There you will see a settings card for dsh-interpreters where you can set the paths to your Python and Node.js executables. The changes are saved to $DSH_HOME/settings.yaml.

What happens if my code exceeds the timeout?

The default timeout is 30,000 milliseconds (30 seconds). If execution takes longer, the process is killed and the tool returns an error with stderr output. You can adjust the timeout value in the plugin settings card.

Is the code execution sandboxed for security?

No, the plugin does not sandbox or isolate the spawned processes. The code runs directly with your configured interpreter. For security, be cautious about what code you allow the model to execute, especially if you are running untrusted scripts.