DeepSeek Harness plugin

dsh-claude-code

Run Claude Code's harness as the DeepSeek Harness main loop, streaming its full trajectory into the DSH web UI in real time.

Jump to install

Source facts

Repository
Yuki-takuya-kun/dsh-claude-code
Latest update
Aug 20, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Yuki-takuya-kun/dsh-claude-code
Plugin: dsh-claude-code
Author: Yuki-takuya-kun

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-claude-code

<!-- Hero --> <div align="center"> <b style="font-size: 1.15em;">在 DSH 里用 Claude Code 驱动会话,轨迹实时可见</b><br /><br /> <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /></a><br /><br /> <img alt="轨迹实时流式" src="https://img.shields.io/badge/-轨迹实时流式-4d6bfe" /> <img alt="权限桥接" src="https://img.shields.io/badge/-权限桥接-4d6bfe" /> <img alt="零配置注册" src="https://img.shields.io/badge/-零配置注册-4d6bfe" /><br /><br /> <b>DSH 默认只用 DeepSeek</b>。装上 <a href="https://github.com/Yuki-takuya-kun/dsh-engine-switch">dsh-engine-switch</a> + 本插件,<br /> 预设列表就多一个「Claude Code」——选中它用 Claude Code 驱动,选其它用 DeepSeek。 </div>

<div align="center"> 🌏 <a href="./README.md"><b>中文</b></a> · <a href="./README_EN.md">English</a> </div>

✨ 能干什么

  • 🎯 一键接入 Claude Code:注册一个 claude-code 引擎(ClaudeCodeAgent + 预设),交给 dsh-engine-switch 按预设路由,零配置自动对上。
  • 📡 轨迹实时可见:文本、思考、工具调用与结果,每一步都实时流进 DSH 会话。
  • 📊 上下文占用可见:把 Claude Code 的 token 用量与模型上下文窗口写进 DSH 会话日志(TokenUsage + request/context),像 DSH 原生一样在界面显示上下文占用比例。
  • 🔐 权限桥接:DSH 的沙箱模式 + 审批策略,映射到 Claude 的权限回调(工作区内写放行、区外弹审批);AskUserQuestion 用 DSH 的选择题 UI 作答。
  • 🧰 工具与沙箱都来自 Claude Code:预设只当路由键,不把 DSH 的 persona / 工具透传过去。
  • ⏯️ 精确续接:Claude 会话 id 旁路持久化,续聊接回同一个 Claude 会话。
  • 🌐 子代理照旧 DeepSeek:不管主会话选了谁,子代理都走 DeepSeek。

> 🔌 一句话:本插件不自己替换主循环——它只定义一个 claude-code 引擎,交给 dsh-engine-switch 负责「预设 → 引擎」路由、切换与续接。预设只是路由键:切到它,工具、沙箱、人设都来自 Claude Code,DSH 保留日志与界面。

🚀 安装

先装 dsh-engine-switch(它提供本插件依赖的 ctx.engineSwitch 服务,peer 依赖不会自动装):

dsh plugin --profile web add github:Yuki-takuya-kun/dsh-engine-switch \
  && dsh plugin --profile web add github:Yuki-takuya-kun/dsh-claude-code

要求:PATH 里有 pnpm;本机有可用的 claude CLI(已登录)或 ANTHROPIC_API_KEY

⚙️ 启用

编辑 ~/.dsh/profiles/web/cordis.patch.yml

- id: dsh-engine-switch
  config:
    enabled: true
    # 可选:claude-code 引擎的选项:
    engines:
      claude-code:
        executable: claude
        # env: { ANTHROPIC_API_KEY: sk-... }  # 未登录时用

重启 web 应用。预设列表出现「Claude Code」:选中它 → Claude Code,选其它 → DeepSeek。

⚙️ 配置

这些是 claude-code 引擎的选项,写在 dsh-engine-switch 的 config.engines["claude-code"] 下:

默认含义
executable"claude"Claude Code 可执行(路径或 PATH 名)
persistSessiontrue跨轮复用同一个 Claude 会话
includePartialMessagestruetoken 级流式输出
traceSubagentstrue把 Claude Code 内部子代理(Agent/Task 工具)追踪为独立只读 DSH 子 session
env{}额外环境变量(如 ANTHROPIC_API_KEY)
contextWindow未配置手动指定模型上下文窗口(token 数),自动取不到时兜底

🔍 原理(可选阅读)

  • 本插件在 apply()ctx.engineSwitch.register(claudeCodeEngine) 注册 claude-code 引擎(inject: ["engineSwitch"])。
  • 每轮跑一次 Claude Code;SDK 事件被转成 DSH 会话事件(turn / step / assistant / tool 等),实时流式。
  • 权限经 canUseTool 回调桥接:工作区内写放行、区外弹审批;AskUserQuestion 用 DSH 选择题 UI 作答。

📄 许可证

MIT。第三方组件见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。