DeepSeek Harness 插件

GrannyProgramming/dsh-dario-sidecar

Star 数 ★ 0 分类 模型与账号接入 收录于 2026-10-15

随 DSH 启动并管理 dario 代理(把 Claude/ChatGPT 订阅当 API 用),就绪门控、随停随止,订阅模型路由开箱即用。

安装

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:GrannyProgramming/dsh-dario-sidecar

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

Harness-owned lifecycle for dario — a DeepSeek Harness (DSH) profile plugin.

In plain terms

You probably pay for a ChatGPT or Claude subscription. That plan works in the vendor's own app — but most other tools, including the DeepSeek Harness this plugin is written for, expect an API key. An API key bills you per token, separately, on top of the subscription you already pay for.

dario closes that gap. It's a small program that runs on your machine and lets any OpenAI- or Anthropic-compatible tool use your subscription instead of an API bill.

One catch: dario only works while it's running. Normally that means opening a terminal, starting it yourself, and hoping you remember after every reboot — and when you forget, your tools fail with confusing errors.

This plugin wires dario into your harness's own startup: harness starts → dario starts. Harness stops → dario stops. Install it once, stop thinking about it. The rest of this README covers the details.

What it does

  • Spawns dario proxy through DSH's subprocess seam when the plugin mounts. Default args ['proxy'] serve every plan dario holds credentials for; override args for a single-plan posture (see Configuration).
  • Readiness-gates on GET /v1/models answering 2xx before reporting ready (default 120 s budget, 500 ms polls), so a slow proxy surfaces as "starting", not as a model-route credential error.
  • Adopts an already-healthy listener instead of spawning a doomed duplicate. Adoption is not ownership: teardown kills only what this plugin started.
  • Tears down effect-scoped: SIGTERM → grace (5 s default) → SIGKILL, tree-scoped, on unload/HMR — the proxy never outlives the harness.
  • Surfaces mid-life exits in the harness log with exit code/signal.

Prerequisites

  • A working DSH deployment with a profile (e.g. web).

  • dario installed and logged in on the host the harness runs on:

    npm install -g @askalf/dario
    dario add altman   # attach a ChatGPT Plus/Pro plan (paste the redirect URL back)
    dario login        # and/or a Claude Pro/Max plan
    

    This plugin manages the proxy process only — OAuth login is a human step it deliberately never performs.

Install

Managed route (wires dependency + bundle entry; the package's own patch supplies the loader row, so defaults apply):

dsh plugin --profile web add github:GrannyProgramming/dsh-dario-sidecar

Manual route — add the dependency to your profile's package.json:

{
  "dependencies": {
    "dsh-dario-sidecar": "github:GrannyProgramming/dsh-dario-sidecar"
  }
}

install profile dependencies, then pick one of the two ways to mount it:

  • Bundle entry (defaults, no config): add "dsh-dario-sidecar" to dsh.profile.bundles. The package's own patch inserts the loader row.

  • Manual insert (you want to override config, e.g. args): leave it out of the bundles list and add the row to the profile's cordis.patch.yml user patch layer instead:

    - insert:
        - id: dsh-dario-sidecar
          name: 'dsh-dario-sidecar'
          config:
            args: ['proxy', '--no-claude-auth']   # your override
    

⚠️ These two are mutually exclusive. A bundle entry and a manual insert for the same id is a duplicate loader entry id boot failure — the loader refuses the whole tree, not just the duplicate row.

Configuration

Everything lives in the insert row's config:

- insert:
    - id: dsh-dario-sidecar
      name: 'dsh-dario-sidecar'
      config:
        args: ['proxy', '--no-claude-auth']   # example: ChatGPT-only posture
Field Default Meaning
command dario Executable to spawn (absolute, or resolved on PATH at load).
args ['proxy'] Arguments, no shell. ['proxy','--no-claude-auth'] never loads the Claude OAuth path — useful with a dead/stale Claude credential or a ChatGPT-only deployment.
host / port 127.0.0.1 / 3456 Readiness-probe target; passed to the child as DARIO_HOST / DARIO_PORT.
env {} Extra env vars merged onto the scrubbed ambient env (PATH/HOME survive).
readyTimeoutMs 120000 Readiness budget before the spawn is torn down and load fails.
pollIntervalMs 500 Interval between readiness polls.
killGraceMs 5000 SIGTERM → SIGKILL escalation grace.

Point a model route at it

With the sidecar up, add dario as an llm-pi-ai custom provider in $DSH_HOME/settings.yaml:

llm-pi-ai:
  providers:
    dario:
      displayName: Dario (subscription)
      api: openai-completions
      baseURL: http://127.0.0.1:3456/v1
      apiKeyEnv: DARIO_API_KEY   # any non-empty value; dario accepts a literal "dario"
      compat:
        supportsDeveloperRole: true
        maxTokensField: max_completion_tokens
      models:
        - id: gpt-5.6-sol
          name: GPT-5.6 Sol
          contextWindow: 272000
          maxTokens: 128000
          input: [ text, image ]
          reasoningEfforts: { off: none, low: low, high: high, max: max }

Verify what your account serves before declaring models: curl -s localhost:3456/v1/models. The listing is static — a live /v1/chat/completions round-trip is the only real auth proof.

Troubleshooting

  • Load fails not ready within …ms; stderr tail: … — dario started but never served: check dario status, purge stale credentials (dario logout), or raise readyTimeoutMs.
  • resolveExecutable failure — dario is not on the harness process's PATH. Set command to the absolute binary path.
  • Port conflict — set port in the insert row and the matching baseURL in your model route.
  • WSL + Windows both have dario — the two installs shadow each other and version-split (hash -r to re-resolve). Keep exactly one on the harness host, or pin command to the right binary.
  • Parallel agents — subscription tokens flag under concurrency; dario is strictly single-flight. Route parallel fan-out to per-token API providers instead.

Origin

Extracted from a working tiered-routing deployment; the design was fixed and verified in council_of_agents #7 (lifecycle mechanism) and #5 (integration + verification). Shape follows DSH's own @deepseek-ai/dsh-lsp-stdio subprocess-lifecycle pattern.

License

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。