StarPivotNet/dsh-plugins-public--packages-session-import ↗★ 0
@starpivot/dsh-session-import
DSH 会话导入插件:支持将 Cursor、Codex 和 Claude Code 的历史会话与技能导入到 DeepSeek Harness 中。
AI 分析
核心用途是实现跨 AI 助手的会话和技能迁移。适合之前使用 Cursor 或 Claude Code,并希望将已有的对话记录、上下文和自定义技能无缝导入到 DSH 中的用户。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:StarPivotNet/dsh-plugins-public#b8b8d5cbaa2b2fc16dc32fa01c0af392598c50cf&path:packages/session-import说明文档
阅读完整 README ↗@starpivot/dsh-session-import
Import Cursor, Codex, and Claude Code conversations and skills into DeepSeek Harness. This package lives at packages/session-import in dsh-plugins-public.
Install
From a machine that already has dsh:
dsh plugin --profile web add @starpivot/dsh-session-import
# or, from git:
dsh plugin --profile web add github:StarPivotNet/dsh-plugins-public#path:packages/session-import
# restart dsh web
What it does
After restart, Settings gains 导入 / Import:
- 会话 — scan the local Claude Code, Codex, and Cursor homes, then write selected conversations as cold DSH sessions
- 技能 — copy Claude / Codex / Cursor
SKILL.mdbundles and Markdown commands into~/.dsh/skills
Imported conversations keep user text, assistant text, reasoning, and tool-call / tool-result pairs. They are written under the current workspace cwd so they appear in this project's session list after a refresh. Open one to resume it with the current DSH agent. Pass --keep-cwd to keep the foreign working directory instead.
Slash commands:
/import— usage/import list [claude|codex|cursor]— discover local conversations/import all— import every discovered conversation/import claude|codex|cursor [id-or-path]— import one store, or one match/import skills [claude|codex|cursor]— copy skills into~/.dsh/skills
Where it reads
| Source | Conversations | Skills |
|---|---|---|
| Claude Code | ~/.claude/projects/**/*.jsonl, ~/.claude/sessions/**/*.jsonl | ~/.claude/skills, ~/.claude/commands |
| Codex | ~/.codex/sessions/**/rollout-*.jsonl, ~/.codex/archived_sessions | ~/.codex/skills |
| Cursor | ~/.cursor/projects, ~/.cursor/chats, Cursor workspaceStorage composer / transcript JSON | ~/.cursor/skills, ~/.cursor/commands |
A file path that is not under those homes can still be imported with /import /absolute/path.jsonl from the Host command, or from the Settings page when you pass that path through the RPC importSessions call.
Conversion
Each foreign conversation becomes one DSH session id import- -. The seed is a balanced turn/step log:
- human prompts become
user/message - Codex
# AGENTS.mddumps become plugin instruction context - assistant text and thinking become
assistant/message - Claude
tool_use, Codexfunction_call/custom_tool_call, and Cursor tool bubbles becometool/callplustool/result - a missing tool result is closed with a synthetic error so the seed stays balanced
- an existing native title, or the first human prompt, is written as
session/title
Images, attachments, and Cursor's proprietary blobs are dropped. Tool output longer than 32 KiB characters is truncated. Files larger than 32 MiB are skipped during discovery.
Re-importing the same native id is a no-op.
Config
On the session-import Host row:
| Field | Default | Meaning |
|---|---|---|
maxFileBytes | 33554432 | Discovery skips larger conversation files |
maxToolResultChars | 32000 | Truncate imported tool output |
maxTextChars | 200000 | Truncate imported message text |
skillTarget | ~/.dsh/skills | Destination for copied skills |
Develop
From the repository root:
pnpm install
pnpm --filter @starpivot/dsh-session-import test
pnpm --filter @starpivot/dsh-session-import run build