wanwulizhi/dsh-claude-code-sdk ↗★ 0

dsh-claude-code-sdk

DSH tool plugin that delegates a self-contained coding task to the local Claude Code agent through the Claude Agent SDK, prepends the current DSH conversation history, and keeps the worker's intermediate tool calls out of the main context. 适合开发者,需本机已安装并登录Claude Code及Node.js环境。

패키지
dsh-claude-code-sdk
호환성
미검증
Harness peer 범위
>=0.2.0-rc.2 <0.3.0-0
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 10. 21.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wanwulizhi/dsh-claude-code-sdk

配置

默认值写在插件自带的 cordis.patch.yml。要覆盖就在 profile 的 cordis.patch.yml 里按 id 改:

- id: claude-code-sdk
  config:
    model: sonnet
    permissionMode: acceptEdits
    maxTurns: 100
    timeoutMs: 600000
    effort: high
    cwd: '/path/to/project'
    allowedTools: [Bash, PowerShell, Read, Write, Edit, Glob, Grep]
    includeHistory: true
    historyMaxMessages: 20
    historyMaxChars: 12000
    # 可选:指定某个 claude 可执行文件;留空则由 SDK 解析自带的 CLI
    pathToClaudeCodeExecutable: '/path/to/claude'

字段一览

字段默认值说明
modelsonnet模型别名或完整 id。若 ~/.claude/settings.json 里配了模型映射,这里写的是映射前的别名
permissionModeacceptEdits权限模式,详见「权限模型」
maxTurns100单次委派的最大 agentic 轮数。到顶会报 Reached maximum number of turns
timeoutMs600000工具级超时(10 分钟),同时作为 DSH 的工具超时声明
cwd未设置工作目录。建议显式指定,否则会落在 DSH 进程目录
allowedTools见下预授权工具白名单。默认 Bash, PowerShell, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch
pathToClaudeCodeExecutable未设置留空时由 SDK 解析自己捆绑的 CLI(`claude-agent-sdk-
/claude.exe`)
efforthigh思考强度
maxThinkingTokens未设置思考 token 上限,与 effort 二选一即可
includeHistorytrue是否注入 DSH 对话历史
historyMaxMessages20最多注入最近多少条消息
historyMaxChars12000注入历史的字符预算

工具参数与配置同名时,工具参数优先(args.x ?? config.x)。注意空数组不会被默认值覆盖——[] 是有效值,?? 只对 null / undefined 生效,所以显式传 allowedTools: [] 就是"什么都不预授权"。