DeepSeek Harness 插件

dsh-claude-code-local

Local Claude Code provider for DeepSeek Harness: a configurable 'claude-code' LLM route that runs your locally installed `claude` CLI and streams its output into the harness(英文原文)

跳到安装方式

来源信息

GitHub 仓库
NGdust/dsh-claude-code-local
最近更新
2026年8月19日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/NGdust/dsh-claude-code-local
插件名:dsh-claude-code-local
作者:NGdust

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-claude-code-local

![npm version](https://www.npmjs.com/package/dsh-claude-code-local) ![license](LICENSE)

Use your locally installed Claude Code as an LLM provider in DeepSeek Harness (DSH).

The plugin registers a claude-code provider route. Each model request spawns your local claude CLI in streaming JSON mode; Claude Code runs its own agentic loop (its built-in tools, permission mode, max turns) and the streamed text is translated into the harness chat in real time.

  • Pick the provider in the composer's model selector — group Claude Code (local).
  • No API key in DSH: the CLI uses its own stored credentials (~/.claude, ANTHROPIC_API_KEY, OAuth, Bedrock/Vertex, ...).
  • Your existing Claude Code setup keeps working: skills, commands, MCP servers, permission modes.
  • macOS/Linux only.

Requirements

  • DeepSeek Harness 0.1.0-rc.7 or newer (web, headless, or the DSH Desktop app).
  • The Claude Code CLI installed and authenticated:

``sh claude --version ``

Installation

Option 1: DSH Desktop community market

1. Open the Market page in DSH Desktop. 2. Sources → add a source with this manifest URL:

`` https://raw.githubusercontent.com/NGdust/dsh-claude-code-local/main/catalog/manifest.json ``

3. Select the source, open Discover, find Claude Code (local), and install it. Restart the app when prompted.

Option 2: dsh CLI

dsh plugin --profile web add dsh-claude-code-local
dsh --profile web

For a headless profile, replace web with the profile name. Restart the server after installing.

Option 3: manual (offline / air-gapped)

Copy this package into the profile module farm and register the plugin row in the profile patch layer:

cp -R dsh-claude-code-local ~/.dsh/profiles/node_modules/

Then add to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: llm-claude-code
      name: dsh-claude-code-local

A running web app picks the row up without a restart (the patch is hot-watched); the DSH Desktop app applies it on the next launch.

Verify

Open the composer's model selector (or the Models page) and look for the Claude Code (local) group with the model lineup (claude-opus-5, claude-sonnet-5, claude-haiku-4-5, claude-fable-5). Select any of them and send a message — the reply streams from your local CLI.

Configuration

Settings live in the llm-claude-code: section of $DSH_HOME/settings.yaml (default ~/.dsh/settings.yaml) and are hot-reloaded — no restart needed:

llm-claude-code:
  permissionMode: auto        # auto | acceptEdits | bypassPermissions | manual | dontAsk | plan
  maxTurns: 10                # internal agent steps per request
  streamIdleTimeoutMs: 300000 # kill the request if the CLI is silent this long (ms)

All options

KeyDefaultDescription
executableclaudePath or name of the Claude Code CLI. Set an absolute path (see which claude) if the CLI is not on the harness PATH.
model""Model passed to claude --model. Empty: use the picker selection. default: omit the flag and let the CLI pick.
permissionModeautoClaude Code permission mode. bypassPermissions is dangerous.
allowedTools[]claude --allowedTools list, e.g. ["Bash(git *)", "Read"].
disallowedTools[]claude --disallowedTools list.
toolsunsetRaw claude --tools override. "": disable Claude's built-in tools (pure text). default: restore them.
maxTurns10Max internal agent steps per request.
appendSystemPrompttrueAppend the harness system prompt to Claude Code's own.
cwdunsetWorking directory for the CLI; unset inherits the harness cwd.
noSessionPersistencetrueDon't write Claude Code session files to disk.
extraArgs[]Extra raw CLI arguments (advanced).
streamIdleTimeoutMs300000Idle watchdog between streamed events, in milliseconds.
modelscurrent lineupAdvisory catalog shown in the picker (see below).
retryPolicyharness defaultLLM retry policy.

Model catalog

The models list controls what the picker offers. The default lineup is what the installed CLI resolves today (opusclaude-opus-5, sonnetclaude-sonnet-5, haikuclaude-haiku-4-5, fableclaude-fable-5). Override it to pin or extend the list:

llm-claude-code:
  models:
    - id: claude-opus-5
      name: Claude Opus 5
      contextWindow: 200000
    - id: claude-sonnet-5
      name: Claude Sonnet 5
      contextWindow: 200000
    - id: claude-haiku-4-5
      name: Claude Haiku 4.5
      contextWindow: 200000
    - id: claude-fable-5
      name: Claude Fable 5
      contextWindow: 200000

The list is advisory: the CLI decides which models your account can actually serve, and a model that is not in the list is still served if it is selected.

Make it the default provider

New sessions default to the profile's agent-default-model (DeepSeek). To default every new session to local Claude Code:

agent-default-model:
  provider: claude-code
  model: claude-sonnet-5

Or just pick the provider per session with the composer's model selector.

Permission modes

  • auto (default): Claude Code's auto-mode classifier — safe actions run, risky ones are denied in non-interactive mode.
  • acceptEdits: file edits are auto-approved.
  • bypassPermissions: dangerous — Claude Code can do anything its tools allow (equivalent to --dangerously-skip-permissions).
  • manual / dontAsk / plan: see the Claude Code CLI docs.

Troubleshooting

SymptomFix
Provider not in the model pickerThe plugin is not loaded. Re-check the install step; restart the server (DSH Desktop applies changes on the next launch).
spawn claude ENOENT / claude: command not foundSet executable to the full path: llm-claude-code: { executable: /path/to/claude } (see which claude).
Auth / account errors on first messageLog in once: run claude interactively, or check ~/.claude / ANTHROPIC_API_KEY. The plugin never asks DSH for an API key.
Long agentic runs get cut off mid-streamRaise streamIdleTimeoutMs (e.g. 600000) — the request is aborted when the CLI stays silent longer than the timeout.
File edits are blockedUse permissionMode: acceptEdits. Note: DSH's sandbox does not gate Claude Code's actions — the CLI's permission mode does.
Nothing happens on WindowsNot supported. Use macOS, Linux, or WSL.

How it works

1. apply() registers the claude-code route with a ClaudeCodeAdapter and declares it in the configurable-provider directory, so the model picker and Models page know it. 2. Each request spawns claude -p --output-format stream-json --include-partial-messages --verbose <flags> with the rendered conversation piped over stdin (long histories never hit OS argument-length limits). 3. stream_event/result JSON events are translated into harness chunks: text deltas → chat text, thinking deltas → reasoning, tool use → a liveness line (Claude Code tool: ...), usage → token counts. 4. The child is killed on caller abort or idle timeout.

Limitations

  • Each request is a fresh stateless CLI invocation; the full conversation is re-rendered every turn (no cross-request prompt-cache reuse).
  • The harness's own tools are not used through this provider: Claude Code owns its loop, so DSH's sandbox/permission service does not gate Claude Code's actions — the CLI's permissionMode does.
  • maxTokens / temperature / stop from the harness request are ignored; the CLI controls sampling.

Contributing

Found a bug or missing a feature? Open an issue or a pull request in this repository.

License

MIT