dsh-cc
开发工具 活跃维护

dsh-cc

jianxx/dsh-cc

完整支持Claude Code全工作流能力,覆盖TUI交互、权限管控、钩子扩展、上下文记忆、自定义技能、子代理调度、MCP对接、工作树管理,开箱即用无需额外配置。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
1
Open Issues
TypeScript
主要语言
Apache-2.0
开源协议
2.9 MB
仓库大小
21 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:jianxx/dsh-cc
git clone https://github.com/jianxx/dsh-cc.git
git clone git@github.com:jianxx/dsh-cc.git
README.md main

dsh-cc

A Claude Code-style coding experience for DeepSeek Harness.

dsh-cc adds the interactive coding-agent features developers expect — a terminal UI, slash commands, subagents, skills, MCP, hooks, permissions, memory, worktrees, resumable sessions, model aliases, and more — as composable plugins for DeepSeek Harness.

No permanent DeepSeek Harness fork required.

This project is not Claude Code and is not a wrapper around Claude Code. It re-creates familiar Claude Code-style workflows on top of the DeepSeek Harness runtime, where you control the models, tools, plugins, and agent composition.

Why dsh-cc?

DeepSeek Harness provides a flexible agent runtime and plugin system. dsh-cc builds a more complete interactive coding environment on top of it.

With the CC profile installed, you get:

  • a full-screen terminal UI designed for coding-agent workflows;
  • familiar slash commands such as /doctor, /memory, /skills, /permissions, /tasks, /resume, and /branch;
  • .claude/agents subagents and SKILL.md skills;
  • CLAUDE.md-style project memory and background memory consolidation;
  • MCP tools, resources, prompts, and OAuth 2.1 support;
  • Claude Code-style hooks and permission rules;
  • worktree-aware workflows and resumable sessions;
  • deferred tool discovery with ToolSearch;
  • tools such as NotebookEdit, StructuredOutput, and Sleep;
  • configurable model aliases such as opus, sonnet, haiku, and inherit;
  • the same CC-oriented backend available from both terminal and web profiles.

All of this is loaded through the native dsh profile/plugin system rather than maintained as a long-lived product fork.

Quick start

Prerequisite: dsh on PATH, version >= 0.1.0-rc.5.

Install the CC-oriented terminal profile:

dsh plugin --profile tui add \
  @jianxx/dsh-cc-bundle-permissions \
  @jianxx/dsh-cc-bundle-shell \
  @jianxx/dsh-cc-bundle-tui
dsh --profile tui

Or install the optional launcher:

npm install -g @jianxx/dsh-cc
dsh-cc

For the web UI, install the same backend without the TUI bundle:

dsh plugin --profile web add \
  @jianxx/dsh-cc-bundle-permissions \
  @jianxx/dsh-cc-bundle-shell
dsh web

The tui profile boots directly into the CC preset.

What you get

Category Full Partial Missing Non-goal
Engine subsystems 11 6 5 2
Hook events 12 4 4 0
Command surface 19 5 1 2
Sessions and context 1 0 1 0
Memory and CLAUDE.md 0 1 1 0
Skills 0 1 0 0
Subagents 0 1 0 0
MCP 1 0 0 0
Plugins and marketplaces 1 0 0 0
Settings 1 1 0 0
Permissions 0 1 0 0
Models 0 1 0 0
Workspace 1 0 0 0
Interactive UX 1 0 1 0

Known deviations

  • engine.bash-jobs — downgrade: CC's TaskCreate/TaskOutput/TaskStop tool naming is not aliased; the dsh jobs tools (tool-jobs over the host job registry) carry the equivalent surface under dsh names.
  • engine.cost-tracking — downgrade: Ships an empty default price table (composition decides pricing), and CC quota/limit surfaces are vendor-billing-bound — the TUI /usage panel footnotes quota as unavailable.
  • engine.credentials — downgrade: FORCED DOWNGRADE at seed: the row is genuinely ✅ via the host-plane upstream package dsh-credentials-local, but that package has no in-repo file to anchor a positive claim against, so per the evidence backfill rule the claim is downgraded until an in-repo seam exists.
  • engine.ide-lsp — downgrade: Two paths. Production: Serena MCP via user-scope ~/.claude.json (v1.7.0 pin) — symbol-level retrieval/editing/diagnostics, ~30 tools deferred through ToolSearch; gaps: no hover tool, no call hierarchy, no push diagnostics. Native dsh-lsp/dsh-lsp-stdio/dsh-tool-lsp exist with a closed 4-operation read-only seam but are NOT mounted by any shipped composition (no lsp rows in cordis.patch.yml/agent.cordis.yml). cc-plugin-loader does not parse lspServers/.lsp.json manifests; PreToolUse hooks ignore additionalContext. /ide and editor pods remain host-shell scope; headless does not apply.
  • engine.notifications — upstream-blocked: No notification seam in deepseek-harness; needs a new design.
  • engine.onboarding — downgrade: No package or design doc exists for onboarding/tips.
  • engine.remote-sessions — downgrade: FORCED DOWNGRADE at seed: the legacy row reads "🔶 different — CC bridge/ is claude.ai-bound; dsh has its own web/host/sdk/acp stack outside this repo", but that stack has no in-repo surface to anchor a positive claim against, so the seed records the four dimensions as non-positive until the external stack gains an in-repo seam.
  • engine.sandbox — downgrade: FORCED DOWNGRADE at seed: the row is genuinely ✅ via the host-plane upstream packages dsh-sandbox-local + policy, but they have no in-repo file to anchor a positive claim against, so per the evidence backfill rule the claim is downgraded until an in-repo seam exists.
  • engine.schedule — downgrade: after_seconds / at / every_seconds (>=300s) supported; CC's cron-expression selectors are unsupported until the dsh-schedule selector seam lands (upstream extension planned).
  • engine.tui — downgrade: dsh --profile tui is the terminal surface: Shift+Tab mode cycling, Esc interrupt, Ctrl+C/Ctrl+S/Ctrl+T/Ctrl+O/Up/Tab bindings, approval previews with 1/2/3 answers on a shared FIFO, leading-! bash mode with separate history, TUI-local /export-md /copy /usage, six-role theme, context-occupancy statusline, multi-hunk diff transcript rendering. Vim mode and ghost text are still later. The statusline settings contract is tracked separately as ux.statusline.
  • engine.vendor-internals — non-goal: Anthropic-internal or vendor-bound features; no design asset and out of parity scope.
  • engine.voice — non-goal: Vendor feature with no design asset; won't port.
  • engine.web-fetch — downgrade: Mounted via @jianxx/dsh-cc-tool-web-fetch (optional prompt summarized on resolve('haiku') when configured, else raw converted text + notice). No fetch provider is shipped through 0.1.1-rc.2 (WEB_PROVIDER_UNAVAILABLE at execute until a deployment mounts one); no host allowlist — enable only on egress-restricted deployments; upstream SSRF allowlist remains a follow-up.
  • hooks.executors — downgrade: command + http (SSRF-allowlisted via allowedHttpHookUrls) executors are always on; prompt/agent executors are gated behind enablePromptHooks / enableAgentHooks (default off) and resolve their model: through ccModelRoutes (omitted model → the haiku cheap lane).
  • hooks.message-display — downgrade: Not bridged — no dsh emit point for message-display rendering events.
  • hooks.notification — downgrade: Bridged for the permission_prompt subtype only; idle_prompt / auth_success / elicitation* subtypes have no equivalent seam in a headless harness (cannot map).
  • hooks.post-tool-batch — downgrade: Not bridged — the dsh tool pipeline has no per-batch emit point yet (hook-bridge follow-up).
  • hooks.pre-compact — upstream-blocked: Needs an upstream compaction-waterfall interception seam in dsh-compaction (planned).
  • hooks.pre-tool-use — downgrade: Bridged with matcher support and the permissionDecision decision contract, but additionalContext is ignored, bounding hook-based pre-tool shaping.
  • hooks.setup — downgrade: Bridged as a first-run approximation, not the full upstream Setup contract.
  • hooks.user-prompt-expansion — downgrade: Not bridged — no dsh emit point for prompt-template expansion.
  • commands.branch — downgrade: Forks and reports the child id; switching to the child requires a restart.
  • commands.config — downgrade: Text-only render/patch with an allowlisted key set, not an interactive editor.
  • commands.exit — non-goal: Host-owned by design; the dsh-native equivalents are the TUI /exit command (packages/ui/tui/src/slash.ts) and the idle double Ctrl+C gesture, so a preset-side port is out of parity scope.
  • commands.init — downgrade: Drives a follow-up turn that writes/refreshes CLAUDE.md rather than the upstream one-shot initializer flow.
  • commands.model — non-goal: Host-owned by design; the dsh-native equivalents are the TUI-local /model and /effort commands (packages/ui/tui/src/slash.ts, model-catalog) plus the ccModelRoutes alias service, so a preset-side port is out of parity scope.
  • commands.resume — downgrade: Lists sessions; switching is host-owned (dsh --resume ).
  • commands.rewind — upstream-blocked: Needs the session file-snapshot seam; no checkpoint/rewind design exists yet.
  • commands.tasks — downgrade: Human-facing /tasks lists background jobs only; the todo-list seam is pending. The model-facing dsh-tool-todo and the TUI Ctrl+T todo panel cover the rest of the workflow.
  • sessions.checkpointing — upstream-blocked: Feature absent; requires a snapshot seam in the session layer.
  • memory.claude-md-imports — downgrade: The @path import machinery is absent — no parser or loader handles imports today.
  • memory.core — downgrade: Per-repo isolation (worktrees/subdirs share one store), shared global layer, memory_save as the save channel, recall reference-doc suppression, and opt-in team memory all work; CC's mtime-threaded recall and memoryAge aging are deferred until the harness FsInfo seam grows an mtime field.
  • skills.system — downgrade: Loader + base tool-skill, CC paths conditional activation, bundled subset (debug/simplify/batch), and TUI /name routing all work; CC's verify/stuck skills are not ported (ant-only; verify companion files absent).
  • subagents.task-tool — divergent: subagent_type dispatch over per-workspace .claude/agents (persona = definition systemPrompt, alias routing via ccModelRoutes, sanitized toolFilter, maxDepth 3, bundled explore/dsh-cc-guide agents) plus the continuable background loop (run_in_background, agentId-addressable send_message/interrupt/list). Deliberate deviations: fork + background is rejected naming upstream issue #2124 (fork stays foreground one-shot); no TaskOutput alias and no outputFile field; omitting run_in_background stays foreground unless the definition pins background: true, unlike Claude Code's interactive omit=background.
  • settings.migrations — downgrade: Mechanism only (version-gated runMigrations over an atomically-written settings.json, auto-run on mount) — no real migrations yet.
  • permissions.rules — downgrade: Rule engine + dangerous-command/path risk classifier, durable modes (default/acceptEdits/plan/auto/bypassPermissions via /permissions), plan deny with exit_plan_mode guidance, bypassPermissions pinning danger-full-access with resumeSandbox restore, and the always-allow derived-rule persistence all work. Remaining vs CC: ML/bash risk classifier service, managed/enterprise remote settings, UI mode cycle; the upstream permission/mode catalog pin is an upstream polish.
  • models.aliases — downgrade: Frontmatter aliases (sonnet/opus/haiku/fable + dsh lanes + open set), settings model-aliases overlay with null-delete and builtin fallback, shared toAgentOptions per-field inheritance, and the ccModelRoutes service all work. Follow-ups: the /model command, ANTHROPIC_* env vars (no Anthropic semantics), and aliasing the main-session default model.
  • ux.statusline — downgrade: The statusLine settings contract is unimplemented (no parsing or execution of a configured status-line command); the TUI renders its own fixed HUD statusline (context occupancy) instead.

Statuses were verified against upstream documentation retrieved as of 2026-09-03 (freshness threshold: 120 days).

For the exact feature-by-feature status and known gaps, see the Claude Code parity matrix.

For the exact feature-by-feature status and known gaps, see the Claude Code parity matrix.

Familiar coding-agent workflows

Subagents

Project-local Claude Code-style agent definitions under .claude/agents can be discovered and dispatched by the CC preset.

.claude/
  agents/
    reviewer.md
    debugger.md

Agent frontmatter can continue using familiar model aliases while dsh decides which provider/model actually serves the request.

Skills

SKILL.md-based skills are discovered by the CC skill provider, including project-specific skills and bundled utility skills.

Memory

The memory layer supports CLAUDE.md-style context plus a dedicated write channel for durable memories. Memory is isolated by workspace, with optional shared team memory.

MCP

The CC profile includes an MCP client with:

  • tools;
  • resources;
  • prompts;
  • OAuth 2.1 flows.

Use /mcp to inspect and manage MCP connections.

Hooks

Claude Code-style hooks can react to session, prompt, tool, permission, compaction, task, and subagent lifecycle events. Command and HTTP executors are supported, with additional prompt/agent executors available behind configuration gates.

This repository ships a tracked hooks.json (the CC preset loads it from the launch cwd). The PreToolUse remind hook requires serena-hooks on PATH — see Local development.

See the parity matrix for the currently bridged event set.

Slash commands

The CC preset exposes a growing command surface, including:

/cost              token / cost information
/doctor            diagnose the current setup
/status            environment and session status
/memory            inspect memories
/skills            list installed skills
/config            inspect or change settings
/permissions       inspect or change permission mode/rules
/mcp               manage MCP connections
/tasks             inspect current tasks/jobs
/resume            resume an interrupted session
/branch            worktree branch management
/diff              inspect CLAUDE.md / settings differences
/init               scan a project and scaffold CLAUDE.md
/plugin             manage plugins
/release-notes      show release notes
/version            show version information

The TUI also provides terminal-oriented interactions such as todo inspection, approval flows, queued prompts, transcript export, usage/context display, and local shell commands.

Use the models you want

Claude Code-style agent definitions often refer to models using aliases:

model: sonnet

dsh-cc can route those aliases to provider/model pairs configured for your deployment.

Conceptually:

sonnet / draft      -> <provider>/<general coding model>
opus / blueprint    -> <provider>/<reasoning model>
haiku / sketch      -> <provider>/<fast model>
fable / masterplan  -> <provider>/<maximum-reasoning model>
architect           -> parent agent route (planning / orchestration)
inherit             -> parent agent route

Aliases are configuration, not hard-coded vendor bindings. This lets you preserve familiar agent definitions while choosing the models that fit your own environment.

Dogfooding dsh-cc

dsh-cc is now developed with dsh-cc itself. The project's current development setup uses the same model-alias routing described above, with this mapping:

Alias Model
fable / masterplan kimi-k3
opus / blueprint glm-5.3
sonnet / draft glm-5.3-flash
haiku / sketch deepseek-v4-flash-0731
architect inherit (main thread)

This is a real project configuration rather than a required default: users can map the aliases to any provider/model combination supported by their DeepSeek Harness deployment.

How this is different

vs. Claude Code

Claude Code is a complete coding-agent product. dsh-cc instead brings many familiar interaction patterns to the DeepSeek Harness runtime, where the deployment controls models, tools, plugins, permissions, and agent composition.

vs. a DeepSeek Harness fork

This repository is designed primarily as an out-of-repo plugin stack. Most functionality is installed and composed through dsh profiles, reducing the amount of permanent fork maintenance required as upstream evolves.

A small number of upstream packages are vendored where the required extension point cannot currently be expressed as a wrapper. See Architecture notes below.

vs. model/API routers

This is not just a model-routing proxy. It extends the agent runtime and developer experience itself: UI, commands, tools, memory, subagents, hooks, MCP, permissions, sessions, and worktree workflows.

CC Mode

CC Mode is an additional dsh agent preset. The four built-in dsh modes remain behaviorally unchanged.

On the tui profile, CC Mode is the default. On other profiles it can be selected through the preset selector or configured as the default agent preset.

The terminal profile launches in fullscreen mode by default. To opt out for one invocation:

DSH_CCTUI_UI_MODE=regular dsh --profile tui

Configuration

Your profile remains ordinary dsh composition. Local tweaks can be placed in:

~/.dsh/profiles/tui/cordis.patch.yml

They are applied after the installed bundles.

Model alias configuration, permissions, settings precedence, hook behavior, memory options, and TUI behavior are exposed through the corresponding plugins/settings namespaces.

For exact semantics, use the package READMEs and the parity matrix as the source of truth.

Compatibility and known limits

The goal is useful Claude Code-style workflow compatibility, not byte-for-byte emulation of Claude Code.

Some areas are intentionally partial or depend on DeepSeek Harness extension points. Examples include parts of the hook event vocabulary, background subagent workflows, notification/IDE-shell behavior, and vendor-specific features.

The project tracks those differences explicitly instead of hiding them:

Read the full Claude Code parity matrix →

Architecture

The repository is a monorepo of small plugins and bundles grouped by responsibility:

packages/
  settings/       settings cascade and migrations
  interaction/    permissions and slash commands
  mcp/            MCP client and configuration
  hooks/          hook protocol and CC bridge
  core/           tools, ToolSearch, NotebookEdit, StructuredOutput, Sleep
  skill/          SKILL.md support
  preset/         CC agent preset and agent compatibility
  compat/         plugin loader, model aliases, output styles
  memory/         CLAUDE.md memory and consolidation
  workspace/      worktree tools
  subagent/       coordinator / subagent integration
  compaction/     micro-compaction
  session/        cost, export, and stats commands
  bundle/         installable profile bundles
  ui/             terminal UI
  launcher/       optional dsh-cc executable

Most packages are normal out-of-repo dsh plugins.

A few packages vendor upstream implementations when the required changes need private/internal extension points rather than composition. These currently include the tools registry, MCP client, hook protocol, and Claude Code hook bridge. At runtime they are mounted under distinct package names while preserving the expected service interfaces.

Local development

This repository expects a sibling DeepSeek Harness checkout at ../deepseek-harness for local link: development dependencies.

pnpm install --frozen-lockfile
pnpm run typecheck
pnpm test

Serena (serena-hooks on PATH)

Dogfooding this repo loads the tracked hooks.json. Its PreToolUse remind hook runs serena-hooks remind --client claude-code on every Read/Grep, so the binary must already be on PATH:

uv tool install git+https://github.com/oraios/serena@v1.7.0

That pin provides serena, serena-agent, and serena-hooks. Do not invoke uvx --from git+… from the hook: that writes ~/.cache/uv on every call, the session sandbox denies it, and Read hangs behind PreToolUse.

Health-check and index remain one-shot uvx commands; see docs/code-intelligence-health.md.

To test unpublished packages against a real profile:

pnpm run build
bash scripts/sync-local-profile.sh web
dsh web

To install/update the CC preset during local development:

bash scripts/sync-cc-preset.sh

See docs/dev.md for offline development details and repository-specific dependency rules.

Packages and releases

Published plugins use the @jianxx npm scope. The root monorepo package is private; installable packages are released individually through the repository release tooling.

Release process details: docs/release.md.

Project status

dsh-cc is evolving alongside DeepSeek Harness. The compatibility surface can change as upstream adds new extension points or changes existing ones.

If you find a workflow that works differently from Claude Code, the parity matrix is the best place to check whether it is implemented, partial, intentionally out of scope, or still missing.

Contributions, compatibility reports, and focused upstream extension proposals are welcome.