Chang-Tong/dsh-import-agents7

dsh-import-agents

Import pi / opencode sessions, chat history, and agents into DeepSeek Harness (dsh): slash commands, session-start migration prompt, and a one-click Sync button in the composer.

AI 分析

核心用途是跨平台迁移 Agent 会话和技能。适合此前使用过 pi 或 Claude Code 等工具,并希望将历史记录无缝同步到 DSH 的用户。

パッケージ
dsh-import-agents
バージョン
0.2.4
ライセンス
MIT
最終更新
2026/08/17

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Chang-Tong/dsh-import-agents

ドキュメント

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.
  3. Imported sessions appear in the session list (grouped by workspace); imported agents appear as skills.

Everything is idempotent — run it as often as you like; already-imported sessions are skipped.

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-agentsConvert pi/opencode agents & prompts into dsh skills
/import-all [options]All of the above (4 sources + agents)
/attach-workspacesAttach imported sessions to cwd-matched workspaces (retro-fit)

Options: --limit N · --project · --since · --no-tools · --tools-as-text · --tool-truncate N

CLI (no dsh needed)

node import.mjs all                # dry-run preview (writes nothing)
node import.mjs all --apply        # write sessions + skills
node import.mjs sessions codex --apply --limit 20   # one source at a time
node import.mjs agents --apply     # agents/prompts → skills only
node export.mjs                    # export sessions as Markdown for any agent to read
  • import.mjs defaults to dry-run; pass --apply to write.
  • all = pi + opencode + agents; add codex/claude-code explicitly (e.g. sessions codex, sessions claude-code).
  • 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
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/import-pi-opencode-state.json; headless environments without a UI provider silently skip the prompt.