SISCHOI/daruma--packages-dsh-daruma0

dsh-daruma

Daruma resilience plugin for DeepSeek Harness — detects model-request failures and fails over to another channel to keep long tasks alive.

包名
dsh-daruma
版本
0.1.0
许可证
MIT
最近更新
2026年8月31日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SISCHOI/daruma#56b411b37daac617958fe5ddcfd4f1ec76ed62c2&path:packages/dsh-daruma

dsh-daruma

Daruma resilience plugin for DeepSeek Harness — detects model-request failures and fails over to another channel to keep long tasks alive.

How it works

dsh-daruma is a native Cordis plugin. It sits downstream of the in-box dsh-llm-retry on the agent/request-error waterfall: retry owns the same-channel retry budget, and when it gives up it delegates (via next()) to daruma. daruma then:

  1. records the failure against the current channel's circuit-breaker state;
  2. when the channel trips (failureBudget consecutive failures, or a terminal code like QUOTA / INVALID_CREDENTIAL / CONTEXT_WINDOW_EXCEEDED), it arms the next routable channel and returns { kind: 'retry' };
  3. on the retry turn, the agent/request waterfall swaps the request config onto the armed channel.

Channel health persists to ~/.dsh/daruma/channel-health.json, so a tripped channel stays cooled-down across restarts.

Install

dsh plugin --profile web add dsh-daruma   # from npm
# or from a checkout:
dsh plugin --profile web add link:./packages/daruma-core link:./packages/dsh-daruma

Configure

Add a dsh-daruma entry to your profile's cordis.patch.yml (or rely on the bundle defaults) with an ordered failover chain:

- id: dsh-daruma
  name: dsh-daruma
  config:
    channels:
      - provider: mt
        model: deepseek-v4-pro
      - provider: mt
        model: glm-5.2
    failureBudget: 3
    cooldownMs: 30000
    giveUpBudget: 8

Each channel is a { provider, model } pair reachable by the LLM adapter registry (same names you use in the settings model selector).

Development

pnpm --filter dsh-daruma build
pnpm --filter dsh-daruma test