npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-plugins-raincode

v0.1.0

Published

Use raincode's model layer (cheap model pool, prompt caching, retry) and skill library inside DeepSeek Harness (dsh)

Readme

dsh-plugins-raincode

让 raincode 成为 DeepSeek Harness(dsh) 的模型层:低价模型池 + StablePrefix 提示缓存 + 重试/故障转移,由本地 OpenAI 兼容 gateway 驱动。在 dsh 里你可以从 raincode 模型池里任意选模型,并用 /skills 浏览 raincode 的 skill 库。

插件是「嘴」——把 dsh 的 GenerateOptions 翻译成 OpenAI wire 发给 raincode gateway,再把 OpenAI chunk 翻译回 dsh StreamChunk;raincode gateway(Rust)是 「脑」,持有 profile 选择、缓存与重试。插件不持有任何模型逻辑。

前置条件

  1. 安装 raincode(≥ 0.1.0,含 gateway 的 /v1/models 与 /skills):

    cd raincode
    cargo install --path crates/rc-cli
    # 或用 ./install.sh
  2. 配置 profile(模型池):

    raincode setup
    # 写入 ~/.raincode/profiles.toml
  3. 启动 gateway(保持运行):

    raincode proxy --port 8787

    验证:curl http://127.0.0.1:8787/health → {"ok":true,"service":"raincode-gateway"}。

在 dsh 中安装

dsh plugin --profile web add dsh-plugins-raincode

然后编辑该 profile 的补丁层(~/.dsh/profiles/web/cordis.patch.yml,所有 profile 通用则写 ~/.dsh/cordis.patch.yml),插入插件行:

- insert:
    - id: raincode
      name: dsh-plugins-raincode
      config:
        baseURL: http://127.0.0.1:8787
        apiKeyEnv: RAINCODE_API_KEY

dsh --profile web --dump-config 应能看到 raincode 行。重启 dsh web 生效。

配置

| 字段 | 默认 | 含义 | |---|---|---| | baseURL | http://127.0.0.1:8787 | raincode gateway 地址 | | apiKeyEnv | RAINCODE_API_KEY | 仅满足 dsh 凭据接缝;本地 loopback gateway 不校验 key(缺失也不报错) | | models | [] | 可选静态目录覆盖;缺省自动从 gateway /v1/models 拉取模型池 | | streamIdleTimeoutMs | 300000 | 流式空闲超时(复用 dsh-timeout helper) | | retryPolicy | dsh 默认 | 重试策略(复用 RetryPolicySchema/resolveRetryPolicy) |

你能得到什么

  • 选模型 —— dsh 模型选择器显示 raincode 模型池(来自 /v1/models);选中的 model 精确映射到 gateway 的 profile。
  • /skills 浏览 —— /skills 列出 raincode skill 库,/skills <name> 看正文。 数据来自 gateway 的 /skills 端点(~/.raincode/skills/)。
  • 缓存与重试 —— 提示缓存(sessionId → prompt_cache_key)与重试/故障转移由 gateway 按 profile 兜底,dsh 侧无需配置。

FAQ

  • gateway 没启动? 模型调用会报 TRANSPORT 类错误。先 raincode proxy --port 8787。
  • 为什么 API key 是摆设? 本地 loopback gateway 信任本机,真实上游 key 从 ~/.raincode/profiles.toml 解析(支持 api_key / api_key_file / api_key_env)。 指向本机 gateway 时插件不强制 key;指向远端 gateway 时才需要。
  • 怎么加模型? raincode setup(或编辑 ~/.raincode/profiles.toml 后重启 gateway)。
  • 支持并行工具调用吗? 支持:多个工具调用按 index 分块,参数分片按 index 累积, 不会被合并或丢参数。

License

MIT