Skip to content
Back to search

dsh-session-bridge

Move coding-agent conversations between DeepSeek Harness and Codex — DSH plugin, CLI and MCP server. Zero dependencies.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/sunlee-1--dsh-session-bridge/badge.svg)](/listings/sunlee-1--dsh-session-bridge)

HTML

<a href="/listings/sunlee-1--dsh-session-bridge"><img src="/api/listings/sunlee-1--dsh-session-bridge/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

As a DeepSeek Harness plugin (gives you the panel)

Requires **DeepSeek Harness** and Node **22.0+** (bundled runtime is fine).

git clone https://github.com/SUNLee-1/dsh-session-bridge.git

Then in DSH: **Plugins → Add plugin → local directory**, and pick the cloned folder. Or from an agent session:

plugin_manager  action: install_bundle
target: /absolute/path/to/dsh-session-bridge

Restart DSH once; the sidebar gains a **会话互通 / Session bridge** icon.

As a CLI (works without DSH)

node bin/asb.mjs doctor          # what this machine can do
node bin/asb.mjs list            # every session, grouped by project
node bin/asb.mjs migrate --from codex --id <session-id> --to dsh --cwd /target
node bin/asb.mjs verify <session.v4.jsonl.zstd>

Encoding or decoding DSH logs needs zstd. Either run inside DSH (its Electron runtime has it), or use Node ≥ 22.15. On an older Node the CLI shells out to the installed DSH binary automatically; `doctor` reports which path is in use.

As an MCP server (for Codex, Claude Code, any MCP client)

{
  "mcpServers": {
    "session-bridge": {
      "command": "node",
      "args": ["/absolute/path/to/dsh-session-bridge/mcp/server.mjs"]
    }
  }
}

Tools: `session_bridge_list`, `session_bridge_migrate`, `session_bridge_verify`, `session_bridge_drift`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 206 lines
  1. # dsh-session-bridge
  2. Move one coding-agent conversation at a time between **DeepSeek Harness** and
  3. **Codex** — in either direction — without touching a single existing session.
  4. DeepSeek Harness is the control center: it shows the Codex sidebar exactly as
  5. Codex itself renders it, and writes the Codex-side records only after taking a
  6. backup.
  7. ```
  8. ┌ Session bridge ───────────────────────────────────────────┐
  9. │ Choose a direction │
  10. │ ┌───────────────────────┐ ┌───────────────────────┐ │
  11. │ │ Codex → DSH │ │ DSH → Codex │ │
  12. │ └───────────────────────┘ └───────────────────────┘ │
  13. └───────────────────────────────────────────────────────────┘
  14. │
  15. ▼
  16. ┌ projects (as the source agent groups them) │ conversation ┐
  17. │ 作品相关(portfolio) 0 │ 11 messages │
  18. │ UNISEE账号运营 1 │ 29 tool calls │
  19. │ 杂项 6 │ 2 turns │
  20. │ 论文+毕设专家助理 5 │ │
  21. │ LibTV Plugin 9 │ target folder │
  22. │ 飞书+UIUX 4 │ [ 开始导入 ] │
  23. └────────────────────────────────────────────┴────────────────┘
  24. ```
  25. ## Why it is not just another converter
  26. **It mirrors each harness instead of guessing.** Codex does not group its
  27. sidebar by working directory. It persists the layout in
  28. `.codex-global-state.json` (`project-order`, `local-projects`,
  29. `thread-project-assignments`, `sidebar-project-thread-orders`,
  30. `projectless-thread-ids`), and it hides its own internal review threads
  31. (`thread_source = guardian_review`). Reading those keys is the difference between
  32. 104 mixed rows and the 28 conversations you actually see.
  33. **It satisfies DSH's load-time invariants.** A structurally valid log can still
  34. be rejected: a `tool/call` must be advertised by an `assistant/message`, a step
  35. must not end with an unresolved call, and turns/steps must number 1..n. The
  36. writer does all three, and `asb verify` runs DSH's own validator.
  37. **It follows DSH's schema instead of hard-coding it.** Required fields for every
  38. session event are resolved at runtime from
  39. `<install>/docs/persistence-schema.json`, and `schema/baseline.json` records the
  40. digest this build was written against. `asb drift` reports a change.
  41. **It stays small.** No dependencies, no build step, ~3k lines. A session is
  42. streamed source → writer; transcripts are never buffered whole.
  43. | Operation | Cost |
  44. |---|---|
  45. | Plugin resident memory | ≈ 6 MB |
  46. | Listing 110 Codex rollouts (1.3 GB, largest 299 MB) | ≈ 30–110 ms, +25 MB transient |
  47. | Repeat listing (3 s TTL cache) | 0 ms |
  48. | Importing a 101-event conversation | 110 KB log, 2 zstd frames |
  49. ## The bridge inbox
  50. On first activation the plugin creates **one folder that is both a DSH Workspace
  51. and a Codex Project**, so migrations have a predictable home instead of landing
  52. wherever the source folder happened to be:
  53. | | |
  54. |---|---|
  55. | Folder | `~/Session Bridge` (same real path on both sides) |
  56. | DSH | Workspace titled *Session Bridge* |
  57. | Codex | Project titled *Session Bridge*, first in the sidebar |
  58. Every import targets it by default, and the panel marks it **互通收件箱 / Bridge
  59. inbox**. Creation is idempotent, backs up the Codex index and UI state, and never
  60. touches existing projects.
  61. Change it in `cordis.patch.yml`:
  62. ```yaml
  63. config:
  64. bridge:
  65. enabled: true
  66. path: '~/Documents/My Bridge' # empty = "<home>/Session Bridge"
  67. name: 'My Bridge'
  68. ```
  69. Or from the CLI: `node bin/asb.mjs init --path "~/Documents/My Bridge" --name "My Bridge"`
  70. (quit DSH first, or run `session_bridge action=init` from inside it).
  71. **Read it in Chinese:** [README.zh-CN.md](README.zh-CN.md)
  72. ## Install
  73. ### As a DeepSeek Harness plugin (gives you the panel)
  74. Requires **DeepSeek Harness** and Node **22.0+** (bundled runtime is fine).
  75. ```bash
  76. git clone https://github.com/SUNLee-1/dsh-session-bridge.git
  77. ```
  78. Then in DSH: **Plugins → Add plugin → local directory**, and pick the cloned
  79. folder. Or from an agent session:
  80. ```
  81. plugin_manager action: install_bundle
  82. target: /absolute/path/to/dsh-session-bridge
  83. ```
  84. Restart DSH once; the sidebar gains a **会话互通 / Session bridge** icon.
  85. ### As a CLI (works without DSH)
  86. ```bash
  87. node bin/asb.mjs doctor # what this machine can do
  88. node bin/asb.mjs list # every session, grouped by project
  89. node bin/asb.mjs migrate --from codex --id <session-id> --to dsh --cwd /target
  90. node bin/asb.mjs verify <session.v4.jsonl.zstd>
  91. ```
  92. Encoding or decoding DSH logs needs zstd. Either run inside DSH (its Electron
  93. runtime has it), or use Node ≥ 22.15. On an older Node the CLI shells out to the
  94. installed DSH binary automatically; `doctor` reports which path is in use.
  95. ### As an MCP server (for Codex, Claude Code, any MCP client)
  96. ```json
  97. {
  98. "mcpServers": {
  99. "session-bridge": {
  100. "command": "node",
  101. "args": ["/absolute/path/to/dsh-session-bridge/mcp/server.mjs"]
  102. }
  103. }
  104. }
  105. ```
  106. Tools: `session_bridge_list`, `session_bridge_migrate`, `session_bridge_verify`,
  107. `session_bridge_drift`.
  108. ## Platform support
  109. | | Linux | macOS | Windows |
  110. |---|---|---|---|
  111. | DSH plugin (Host + panel) | ✅ | ✅ | ✅ |
  112. | CLI (read/write with DSH present) | ✅ | ✅ | ✅ |
  113. | MCP server | ✅ | ✅ | ✅ |
  114. | Paths are discovered, never assumed | `DSH_INSTALL_DIR`, `process.resourcesPath`, per-platform defaults | | |
  115. Overrides: `DSH_HOME`, `CODEX_HOME`, `DSH_INSTALL_DIR`, `ASB_NODE`.
  116. ## What a migration writes
  117. | Direction | Created | Never touched |
  118. |---|---|---|
  119. | Codex → DSH | one new `session.v4.jsonl.zstd` under `~/.dsh/sessions/<project>/<id>/` | every existing session |
  120. | DSH → Codex | one rollout under `~/.codex/sessions/YYYY/MM/DD/`, one new row in `state_N.sqlite`, one membership entry in `.codex-global-state.json` | every existing row, rollout and project |
  121. Codex-side writes copy `state_N.sqlite` and `.codex-global-state.json` to
  122. `*.asb-backup-<timestamp>` first, keep only the newest three backups, and use
  123. `INSERT` only. Every import is recorded in
  124. `~/.dsh/session-bridge/migrations.json`, so repeating one reports `duplicate`
  125. instead of copying the conversation twice.
  126. ## What DSH will not accept
  127. A session can be structurally perfect and still be rejected on load. The writer
  128. satisfies the three invariants DSH's validator enforces:
  129. - a `tool/call` must be advertised as a `tool-call` block of an `assistant/message`
  130. - a step must not end with an advertised call unresolved (a source session
  131. without a result gets an explicit isError result saying so)
  132. - turns are `1..n` and steps are `1..n` inside each turn; source numbering is
  133. discarded and renumbered
  134. `asb verify` runs DSH's own `assertReleasedV4Relationships`, so a bad log is
  135. caught before you ever open it.
  136. ## Extending to another agent
  137. Drop a module into `lib/adapters/local/` — see
  138. [lib/adapters/local/README.md](lib/adapters/local/README.md). Adapters are
  139. discovered at startup; no core edit, no build step.
  140. ## Development
  141. ```bash
  142. node --test # 9 tests, no dependencies
  143. node bin/asb.mjs doctor
  144. ```
  145. ## Known limitations
  146. - **A DSH target must be an existing workspace.** DSH builds its sidebar from the
  147. Workspace registry, not from a directory scan, and rejects a session whose
  148. `cwd` is not a workspace path. The panel lists workspaces for this reason; a
  149. custom path that is not a workspace will produce an invisible session.
  150. - A newly written session appears in the target app's sidebar only after that
  151. app restarts; both harnesses read their registries at startup.
  152. - Codex's `source` / `model_provider` columns are `NOT NULL` and only accept
  153. values Codex itself writes, so imported rows carry `vscode` / `openai`. The
  154. conversation content is the imported one.
  155. - Metadata that has no counterpart in the target format is dropped, not
  156. approximated.
  157. ## License
  158. MIT — see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.