← 返回列表
D

@npm_thanks-for-forest/my-dsh-tool

v0.1.2 · 3 天前发布

Minimal dsh tool plugin: read a file from disk.

deepseek-harnessdshdsh-plugintool

README

@npm_thanks-for-forest/my-dsh-tool

最小 dsh 工具插件:向 deepseek-harness(dsh)注册一个 read_file 工具,模型可直接读取磁盘文件。

安装与挂载

powershell

在 dsh profile 中安装插件(以 web profile 为例)


dsh plugin --profile web add @npm_thanks-for-forest/my-dsh-tool

在 profile 的 cordis.patch.yml 中追加插件行:

yaml

<$DSH_HOME>/profiles/web/cordis.patch.yml


  • id: my-tool

  • path: '@npm_thanks-for-forest/my-dsh-tool'

    启动 dsh web 后,read_file 即出现在模型可见工具列表;Code Mode 下可用 await tools.read_file(args) 调用。

    工具 API

    read_file

    | 项 | 说明 |
    |---|---|
    | 描述 | Read a file from disk. |
    | 参数 path | string,必填。绝对路径 |
    | 参数 limit | number,可选。最多读取的字符数 |
    | 输出 | string(canonical JSON value,非文本残渣) |

  • 参数由注册表按 schema 自动校验(类型/必填),不合规调用返回 isError

  • 读取过程中尊重 exec.signal,取消信号触发即停

  • output.render 为纯函数,UI 卡片与模型结果分离
  • ##

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ❓ 未知 metadata 缺失
    dsh@0.1.0 ❓ 未知
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    @npm_thanks-for-forest/my-dsh-tool
    Repo
    Engines
    {"node":"^22.19.0 || >=24.0.0"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {}