Chang-Tong/dsh-unified-context ↗★ 21

dsh-unified-context

DSH Unified Context (统一上下文): migrate pi/opencode/codex/claude-code/WorkBuddy sessions into DeepSeek Harness, share AGENTS.md/skills/project & agent memory through symlinks, and migrate automations. One context, every harness.

パッケージ
dsh-unified-context
互換性
未検証
Harness ピア範囲
>=0.1.0-rc.0
Cordis ピア範囲
>=0.1.0
バージョン
0.5.0
ライセンス
MIT
最終更新
2026/11/09

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add dsh-unified-context

ドキュメント

README 全文を読む ↗

Usage

Quick start

  1. Refresh the page after a restart.
  2. Click Sync in the composer tool row — or type /import-all in the input. This runs the complete migration: sessions from all five sources, agents → skills, shared context links, and paused automation tasks.
  3. Imported sessions appear in the session list (grouped by workspace); imported agents appear as skills; the Automation tasks page shows the migrated tasks (paused — pause the source automation first, then resume it in dsh).

Everything is idempotent — run it as often as you like; already-imported sessions are skipped, existing links are reused, and identical automation tasks are not duplicated.

Slash commands

CommandWhat it does
/import-pi [options]Import pi sessions
/import-opencode [options]Import opencode sessions
/import-codex [options]Import codex sessions
/import-claude-code [options]Import claude-code sessions
/import-workbuddy [options]Import WorkBuddy sessions
/import-agentsConvert pi/opencode agents & prompts into dsh skills
/link-context [--project DIR] [--dry-run] [--push] [--memory=authority|merge|off] [--authority=harness]Share one AGENTS.md/CLAUDE.md/CODEBUDDY.md, skill hub and long-term memory across harnesses with symlinks (never copies)
/import-automations [--only id] [--activate] [--dry-run]Migrate Codex + WorkBuddy automations into dsh scheduled tasks (paused by default)
/import-all [options]All of the above (5 session sources + agents + context links + paused automations)
/attach-workspacesAttach imported sessions to cwd-matched workspaces (retro-fit)

Options: --limit N · --project · --since · --no-tools · --tools-as-text · --tool-truncate N · --context-project DIR · --push · --activate

CLI (no dsh needed)

node import.mjs all                    # dry-run preview (writes nothing)
node import.mjs all --apply            # sessions + skills + shared context links
node import.mjs sessions codex --apply --limit 20        # one source at a time
node import.mjs sessions workbuddy --apply               # WorkBuddy sessions
node import.mjs agents --apply         # agents/prompts → skills only
node import.mjs context --apply        # share AGENTS.md/CLAUDE.md/CODEBUDDY.md + skills
node import.mjs context --push --apply # also link hub skills into every harness root
node import.mjs context --project-dir ~/work/app --apply # project-level unification
node import.mjs context --memory=merge --apply           # merged memory index (references, no copies)
node import.mjs context --authority=workbuddy --apply    # pick which harness memory wins
node import.mjs automations            # plan Codex/WorkBuddy automations (paused)
node export.mjs                        # export sessions as Markdown for any agent to read
  • import.mjs defaults to dry-run; pass --apply to write.
  • all = five session sources + agents + context links (with --apply) + the automation plan. Creating automation tasks needs the running host — use /import-automations in dsh.
  • context links one shared copy instead of copying: no-op on re-runs, conflicts are reported and left untouched; --push opts into bidirectional skill parity.
  • export.mjs writes $DSH_HOME/exports/ /.md (--source, --project, --limit, --since, --out, --no-reasoning, --no-tools).

Configuration

KeyDefaultMeaning
offerOnStarttrueAsk about migration when a new top-level session starts
piRoot~/.pi/agent/sessionspi session root
piAgentRoot~/.pi/agentpi agents & prompts root
opencodeDb~/.local/share/opencode/opencode.dbopencode SQLite path
opencodeConfig~/.config/opencodeopencode agents root
codexRoot~/.codex/sessionscodex session root
claudeRoot~/.claude/projectsclaude-code projects root
workbuddyRoot~/.workbuddyWorkBuddy data root (sessions, skills)
workbuddyAutomationsDb~/Library/Application Support/WorkBuddy/automations/automations.dbWorkBuddy automations SQLite database
codexHome~/.codexCodex config root (automations/ is read from here)
timeZoneAsia/Shanghaitime zone used when translating automation RRULEs
skillsRoot$DSH_AGENTS_HOME/skillsskills output root
toolTruncate1000tool-call arguments truncation (chars)

The migration prompt only fires for brand-new top-level sessions (startup, not subagents) that have a cwd and unimported history. Per-project decisions and the global agents decision are stored in $DSH_HOME/unified-context-state.json; headless environments without a UI provider silently skip the prompt.