plugin
已验证@claude2dsh/plugin · v0.2.0-rc.5 · MIT · Web 界面
Import Claude Code sessions and skills into DeepSeek Harness, and sync DSH sessions back to Claude Code
安装
dsh plugin add @claude2dsh/plugin 用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。
源码
标签
作者
说明文档
@claude2dsh/plugin
DeepSeek Harness plugin for Claude2DSH. It imports Claude Code conversations and skills into DSH as native resumable sessions, and exports/syncs DSH sessions back into Claude Code JSONL.
Install
dsh plugin --profile web add @claude2dsh/[email protected]
dsh web
Then open Settings → Claude2DSH.
Settings
The bundle registers a claude2dsh settings namespace and a Claude2DSH page in the DSH Settings UI. It edits auto-mirror, import defaults, export/write-back and hook-bridge fields. The host schema validates every save; invalid values return a 400 with the schema error. Tool arguments and CLAUDE2DSH_* environment variables remain call-time overrides.
Tools
claude2dsh_import: read~/.claude/projectsread-only, write DSH-native session logs. Idempotent; grown Claude transcripts append only new turns.preview:trueis zero-side-effect.includeSubagents:trueimports subagent/workflow transcripts asorigin:"subagent"child sessions.claude2dsh_import_skills: copy validated Claude skills into$DSH_HOME/skills; conflicts are never overwritten.claude2dsh_export: serialize one DSH session into a Claude Code JSONL transcript under$DSH_HOME/claude2dsh/exports. Writing below the real~/.claudeis refused unlessallowOriginalClaudeDir:true.claude2dsh_sync: append DSH turns newer than the export watermark to the exported Claude copy (defaulttarget:"copy").target:"source"requiresallowOriginalClaudeDir:true. External modification/shrink guards refuse the write unlessforce:true.claude2dsh_import_context: copy the user-global~/.claude/CLAUDE.mdinto$DSH_HOME/AGENTS.mdwith preview and never-overwrite conflicts; project CLAUDE.md is left to DSH native discovery.claude2dsh_import_memory: package one projectMEMORY.md/memory/*.mdas a DSH-native skill bundle with preview and never-overwrite conflicts.claude2dsh_merge: explicit bidirectional three-way merge after double-side growth; same-turn dual edits keep both versions and a log-only conflict marker, always writing a new safe copy.claude2dsh_sidecars: list/resolve copied tool-result.txtsidecars.claude2dsh_session_sources: list/resolve source markers (claude-main/claude-subagent/claude-merged).claude2dsh_plugin_inventory: read-only inventory of installed Claude Code plugins;apply:truecopies only declarative SKILL.md assets. Hooks and app-server runtime code are never executed.claude2dsh_autosync:statusshows the mirror's pause state, reason, recent conflicts and pending queue;resumeclears a conflict pause after the two sides were reconciled with explicit tools.claude2dsh_importimage policy:imageMode:"auto"follows the current DSH session route. Leave Settings provider/model empty to follow the live session, or fill them to probe an explicit route; text-only routes degrade images to safe placeholders while attachments are retained and re-projected on model switch. Each import item records the route and reason.
Safety
~/.claude is read-only for migration. DSH writes go only through host persistence and $DSH_HOME.
Optional features
- Auto mirror (default off): set
autoSync.enabled: truein the plugin row config to watch the Claude projects directory and mirror completed DSH turns to the safe export copy. The real~/.claudedirectory is never written by auto-sync. Live sessions are skipped, the pending queue survives restart, and double-side growth pauses the mirror with a conflict report (claude2dsh_autosyncinspects/resumes). - Claude hook bridge (default off): set
CLAUDE2DSH_HOOKS_CONFIG=/path/to/hooks.jsonbefore boot to activate the upstream@deepseek-ai/dsh-hooks-claude-codebridge. Invalid or unreadable config fails boot with the exact path and reason. The Settings page can read-only scan Claude settings/plugin hooks, preview mappable command handlers, and save a candidate for the next boot. Only command handlers for the seven mapped hook events are supported; hook outcomes are persisted ashook/invoked+hook/resultsession-log events. See that package's README for the exact subset.