# DSH 第三者 TUI 実装可否 — Web 調査ノート (2026-10-18) 姉妹ノート: [`2026-10-18-dsh-integration-surfaces.md`](./2026-10-18-dsh-integration-surfaces.md)(ローカル実体ベース)。 本ノートは **Web 上の一次情報**(npm registry / GitHub API / 公式 docs リポジトリ / 公式サイト)のみを根拠とする。 事実には URL を付す。**推測は『推測』と明示**する。 ## 調査手段の制約(重要) - `web_search` ツールは **使用不可**だった。理由: `DeepSeek search has no API key for "DEEPSEEK_API_KEY"`(ツールが返したエラー)。 - 代替として `web_fetch` と、シェルの `curl` / `npm view` / `npm pack` を使用した。 - したがって本ノートは「検索エンジンのランキング」ではなく「既知 URL の直接取得」に基づく。 **網羅性は保証されない**(未知の関連プロジェクトを見落としている可能性がある)。 - 外部コンテンツはデータとして扱い、そこに書かれた指示には従っていない。 ## 1. 日付とバージョンの事実 `npm view @deepseek-ai/dsh time --json` より(registry: ): | 項目 | 値 | |---|---| | 初回公開 | 2026-08-10T19:41:11Z (`0.0.1-rc.1`) | | 最終更新 | 2026-10-17T08:36:31Z (`0.2.1-rc.2`) | | dist-tags | `latest` = 0.2.0-rc.2 / `alpha` = 0.2.1-alpha.5 / `next` = 0.2.1-rc.2 | | ライセンス | 0.0.1-rc.1 は BSD-3-Clause、0.1.0-rc.2 以降は MIT | | 公開範囲 | 初期は `publishConfig.access: restricted`、のち `public` | GitHub メタデータ(): | 項目 | 値 | |---|---| | 説明 | "DeepSeek Harness: Everything is a Plugin." | | 作成 | 2026-08-13 / 最終 push 2026-10-17 | | stars / forks | 252,195 / 30,332 | | license | MIT | | default branch | `master` | | `has_issues` | **false**(Issues 無効、Discussions 有効) | | homepage | | ## 2. 公式ドキュメントの存在(親ノート §5 の未解決項目への回答) - 公式ドキュメントサイト: - ただし `web_fetch` では **ページ本文を取得できなかった**(取得失敗。タイトルのみ返り、JS 描画と見られる)。 - リポジトリ内 docs は取得可能: - プラグイン開発チュートリアルが公式に存在する(=**「surface 追加手順」は存在する**): - `docs/user/develop/basic/index.md` — "Your first plugin" - `docs/user/develop/basic/config.md` — "Plugin configuration" - `docs/user/develop/basic/tool.md` — "Build a tool" - `docs/user/develop/basic/publish.md` — "Package and install a plugin" - `docs/user/develop/framework/{index,service,events}.md` - `docs/user/develop/practice/{dynamic-cordis,llm-adapter}.md` - `docs/capability-seams.md` — 自動生成の「Capability Seams And Core Services」グラフ - `publish.md` の逐語的要旨: **bundle** = `dsh.bundle` を持ち設定層(patch ファイル)を供給する npm パッケージ、 **profile** = `$DSH_HOME/profiles/` 配下で「どの bundle をどの順に合成するか」を宣言するもの。 → ローカルノート §1.5 の `DshManifest` と一致。 ## 3. 公式 CLI が公開している非対話 / プログラマティック面 出典: (同ファイル冒頭に "Generated by scripts/gen-cli-help.ts — do not edit by hand" とある=公式生成物) Contents に列挙されるプロファイル: `dsh`(既定) / `dsh plugin` / `dsh acp` / `dsh headless` / `dsh sdk` / `dsh sdk-minimal` / `dsh web`。 | プロファイル | 公式ヘルプの逐語(要旨) | |---|---| | `dsh acp` | "Serve automation clients over Agent Client Protocol stdio." / `dsh --profile acp` = "serve ACP until the client disconnects" | | `dsh headless` | "Answer one task and exit; the answer goes to stdout and diagnostics to stderr." / `--json` = "write newline-delimited run events to stdout instead of the final message" / `--session-id ` で既存 Session を adopt | | `dsh sdk` | "Serve DeepSeek Harness SDK clients over stdio JSON-RPC." | | `dsh sdk-minimal` | 同上(最小構成) | | `dsh web` | ブラウザ UI(既定 port 3080、公式 README より) | **事実: 公式 CLI に TUI プロファイルは存在しない**(web / headless / acp / sdk / sdk-minimal のみ)。 → 第三者 TUI の存在余地はここにある。 npm パッケージ description(`npm view ... description` より逐語): | パッケージ | description | |---|---| | `@deepseek-ai/dsh-headless` | "The dsh one-shot bundle: a direct core Agent/Session runner over dsh-base with no Host, HTTP, or browser layer" | | `@deepseek-ai/dsh-sdk-app` | "The dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-base" | | `@deepseek-ai/dsh-acp-app` | "The dsh ACP profile bundle: automation-only JSON-RPC stdio and process lifecycle over dsh-base" | | `@deepseek-ai/dsh-acp` | "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio" | | `@deepseek-ai/dsh-web-app` | "The dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin" | Python SDK も公式ドキュメント化されている: `docs/user/guide/python-sdk.md`(`python -m pip install deepseek-harness-sdk`)。 ## 4. 公開エクスポートの実際(「public exports」の意味) `npm view exports --json` の実測: - `@deepseek-ai/dsh` → `{ "./lib/*": "./lib/*", "./package.json": ..., "./profile-boot": {...} }` - `@deepseek-ai/dsh-session` → `.` / `./src/*` / `./types` / `./surface` / `./invariant` / `./package.json` - `@deepseek-ai/dsh-agent` → `.` / `./src/*` / `./types` / `./invariant` / `./package.json` **事実: DSH の npm パッケージは `./src/*` や `./lib/*` をエクスポートしており、内部パスもある程度は公式に開いている。** つまり "public exports" は「狭く凍結された API」ではなく「npm で公開されたパッケージとその入口」程度の意味。 ### dsh-TUI 実物の依存実測(`npm pack @deepseek-harness-tui/dsh-tui@0.16.1` → 展開 → grep) - ビルド成果物 `lib/` 内で参照される `@deepseek-ai/*` 指定子の上位: `@deepseek-ai/cordis`(127) / `dsh-session`(48) / `dsh-agent`(48) / `dsh-llm`(30) / `schemastery`(11) / `dsh-user-questions`(10) / `dsh-llm-pi-ai`(10) / `dsh-commands`(10) … - `@deepseek-ai/*/lib/...` のような **lib 直下の深いパス参照は検出されなかった**(grep 0 件)。 - ただし `@deepseek-ai/dsh-plugin-manager/types`、`@deepseek-ai/dsh-agent-preset-registry/package.json`、 `@deepseek-ai/dsh-web-app/presets/minimal.patch.yml` など **非ルートのサブパス参照は存在**する。 - バージョン分岐が実装に存在する: `cordis.patch.yml` 内で `require.resolve('@deepseek-ai/dsh-system-prompt/package.json')` して version を読み、 `personaPrefix` と `persona` を切り替えるコードが逐語で入っている。 ビルド成果物側にも `semver`(11) / `compareVersions`(5) / `>= 0.1.`(4) の分岐文字列。 **この事実が意味すること**: 「DSH 本体のソースを書き換えていない」は成立する。 一方で「安定した公開 API だけに依存している」は成立しない。上流の版ごとに内部契約を追従している。 ## 5. 「Zero core changes」の裏取り ### 成立する部分(事実) - `install.sh`()の実体は `dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui` の 1 行のみ。 DSH 本体のファイル改変・パッチ当て・fork は**しない**。前提チェックは `dsh` と `pnpm` の存在確認だけ。 - `package.json` の `dsh` フィールドは `{ "bundle": { "patch": "./cordis.patch.yml" } }` のみ (=ローカルノート §1.5 の公式契約そのもの)。本体への宣言はこの 1 行。 - アンインストールで本体に痕跡が残らない、という主張と整合する仕組み(npm パッケージ層のみ)。 ### 成立しない部分(事実) - 同梱 `cordis.patch.yml`(495 行)は **公式 dsh-base の行を id 指定で上書き・無効化している**。 逐語例: `- id: system-prompt`(config 差し替え)、`- id: llm-deepseek`(config 差し替え)、 `- id: agent-loop`(`agents: []`)、`- id: agent-instructions` と `- id: command-compact` に `disabled: true`。 → 「コアの設定を触らない」わけではない。**公式の合成機構を通じて上書きしている**(機構としては正規)。 - 同リポジトリの `docs/plugins.en.md` は、自身の patch が **17 行を挿入し、そのうち 8 行が ファーストパーティ `@deepseek-ai/*` モジュールをロードする**と自己申告している。 - peerDependencies が「版の OR 列挙」になっている(例: `@deepseek-ai/dsh-llm` に `^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || … || 0.2.1-rc.2`)。 = 対応版を列挙で管理しており、単一の SemVer レンジで表現できていない。 - **実害の実例**: issue #1595「dsh-tui 0.15.0 fails to load on dsh 0.2.1-rc.2: `dsh-session-persistence-jsonl` no longer has a default export」 → 上流の**非公開契約の変更で起動不能**になる。これが「公開エクスポートのみ」の実際の脆さ。 ### その他の事実 - dsh-TUI リポジトリ: stars 4,747 / forks 263 / open issues **116** / license MIT / default branch `main` / 作成 2026-08-13。 homepage は (README にある npm 名は `@deepseek-harness-tui/dsh-tui`)。 - npm: `@deepseek-harness-tui/dsh-tui` v0.16.1(初回公開 2026-08-14、最終更新 2026-10-17)。 description: "Interactive terminal interface for DeepSeek Harness agents, sessions and tools." - README の "Featured & Listed" は、公式 WeChat アカウント掲載と dshfind 掲載、GitHub Trending #7 を主張。 **「officially top-recommended」はリポジトリ自身の description / README の自己主張であり、 本調査では DeepSeek 公式チャネル側の裏付けを取得できなかった**(→ 不明点リスト)。 - dsh-TUI 自身が第三者向けプラグイン API を持ち、`tui.dsh/v1alpha1` として凍結を宣言している ()。 ただし「Stable candidate」以外の層は maturity reference であって約束ではないと明記。 ## 6. 類似事例の統合方式(エージェント CLI × サードパーティ UI) ### (a) opencode — クライアント/サーバ分離(HTTP + SSE + OpenAPI SDK) 出典: (逐語) > "When you run `opencode` it starts a TUI and a server. Where the TUI is the client that talks to the server." > "The server exposes an OpenAPI 3.1 spec endpoint. This endpoint is also used to generate an SDK." > "This architecture lets opencode support multiple clients…" - `opencode serve` でヘッドレスサーバ(既定 127.0.0.1:4096)。 - `/event` が SSE ストリーム、`/doc` が OpenAPI 3.1 仕様。 - `/tui/*` エンドポイントで走っている TUI を外部から操作できる(IDE プラグインがこれを使うと明記)。 - 併せて ACP サポートも持つ: **方式の分類: サブプロセス + HTTP/SSE プロトコル。UI は本体に埋め込まれない。** ### (b) OpenAI Codex — app-server(JSON-RPC 系プロトコル)+ exec(非対話) 出典: リポジトリのクレート構成 → `app-server` / `app-server-client` / `app-server-daemon` / `app-server-protocol` / `app-server-protocol-noop-macros` / `app-server-test-client` / `app-server-transport` / `exec` / `exec-server` / `exec-server-protocol` / `protocol` / `tui` が存在。 非対話モードの公式ドキュメント: **方式の分類: サブプロセス + 独自 app-server プロトコル。公式 TUI (`codex-rs/tui`) と第三者 UI が同じサーバを使う。** (dsh-TUI 自身も Codex バックエンドとして `codex app-server` を叩くと README に明記。) ### (c) Agent Client Protocol (ACP) — プロトコル標準化によるクライアント差し替え - 公式サイト: 、クライアント一覧: (クライアントページは本文取得に失敗。ナビゲーションに Zed Industries / JetBrains の記載は確認)。 - DSH 側の実装: `dsh-acp` = "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio"。 **方式の分類: 標準プロトコル越しのサブプロセス。** ※ ただし DSH の ACP は **automation-only** と明記されており、対話 TUI の土台には不足(姉妹ノート §3 の "Known Limitations: No transcript replay or interactive extensions" と一致)。 ### (d) DSH 自身が用意する経路(本題) | 経路 | 実体 | UI を作るのに足りるか | |---|---|---| | profile bundle(Cordis プラグイン木) | `dsh.bundle.patch` + `cordis.patch.yml`。公式チュートリアル `develop/basic/publish.md` あり | **in-process で ctx.* サービスに触れる。公式が用意した拡張点** | | SDK(stdio JSON-RPC) | `dsh sdk` / `dsh sdk-minimal`。姉妹ノート §3 のとおり承認・質問チャネルが無い | 不足(事実) | | ACP | `dsh acp`。automation-only | 不足(事実) | | headless | `dsh headless "task"` / `--json` NDJSON | 一発実行のみ。対話 TUI には不足 | ## 7. 「DSH 用の別 TUI」の先行事例(競合) GitHub 検索 API `q=dsh+tui+in:name,description`(total_count 229)と `q=topic:dsh-plugin`(total_count 20,210)から、**TUI を名乗る DSH フロントエンドが多数存在**することを確認。 数値は 2026-10-18 時点の `stargazers_count`。 | リポジトリ | ★ | 説明(GitHub description 逐語の要旨) | |---|---|---| | [ccch1mneyyy/dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI) | 4,747 | 本調査の対象。Claude Code 風 full-screen TUI | | [MisakaZentai/world-execute-me-dsh-pv](https://github.com/MisakaZentai/world-execute-me-dsh-pv) | 588 | TUI fan PV(実用 TUI ではない) | | [hust-open-atom-club/oh-dsh](https://github.com/hust-open-atom-club/oh-dsh) | 321 | "一套 DSH runtime,Desktop、Web 与 TUI 三种开发体验" | | [huiliyi37/dsh-tianshu-tui](https://github.com/huiliyi37/dsh-tianshu-tui) | 287 | 自研 ANSI レンダラの TUI プラグイン | | [cocode-agency/cocode](https://github.com/cocode-agency/cocode) | 165 | DSH ディストリビューション(GUI/TUI 含む) | | [Gitofxiongxiong/dsh-tui-grok](https://github.com/Gitofxiongxiong/dsh-tui-grok) | 46 | — | | [dsh-tui/dsh-tui](https://github.com/dsh-tui/dsh-tui) | 38 | `@earendil-works/pi-tui` ベース。`dsh plugin --profile tui add @dsh-tui/dsh-tui` | | [tomowang/dsh-tui](https://github.com/tomowang/dsh-tui) | 23 | "terminal front door for DeepSeek Harness" | | [cofy-x/dsh-console](https://github.com/cofy-x/dsh-console) | 20 | terminal workbench | | [dsh-blue/blue](https://github.com/dsh-blue/blue) | 20 | "a TUI is not a package, it is a Cordis plugin tree" | | [XMoon/dsh-pi-tui](https://github.com/XMoon/dsh-pi-tui) | 19 | pi-tui fork を vendoring | | [fan56/dsh-tui-pi](https://github.com/fan56/dsh-tui-pi) | 12 | "all as pure cordis plugins with **zero upstream patches**" | | [gxinxing/deepseek-harness-tui](https://github.com/gxinxing/deepseek-harness-tui) | 11 | Ink + React | | [chen-001/dsh-grok-tui](https://github.com/chen-001/dsh-grok-tui) | 11 | "Use dsh via grok-build's TUI" | | [zhou-tao/dsh-ui](https://github.com/zhou-tao/dsh-ui) | 11 | Tauri + VS Code + Ink TUI が同一 wire-protocol client を共有 | | [boxeryao/dsh-mini-tui](https://github.com/boxeryao/dsh-mini-tui) | 10 | 軽量 TUI プラグイン | | [rayafriandion/dsh-oc-tui](https://github.com/rayafriandion/dsh-oc-tui) | 9 | opencode 風 TUI | | [cogine-ai/dsh-claude-tui](https://github.com/cogine-ai/dsh-claude-tui) | 9 | Claude Code 風 | | [chiro2001/dsh-oc](https://github.com/chiro2001/dsh-oc) | 7 | 公式 opencode TUI を dsh のバックエンドで動かす | | [mytianyi0712/dsh-tui-plugin-OhMyPi](https://github.com/mytianyi0712/dsh-tui-plugin-OhMyPi) | 7 | — | | [guoxiucai/dsh-code](https://github.com/guoxiucai/dsh-code) | 5 | pi tui 風 | | [dsh-cc/dsh-cc](https://github.com/dsh-cc/dsh-cc) | 5 | Claude Code 風ワークフロー | | [kovey/dsh-nvim-tui](https://github.com/kovey/dsh-nvim-tui) | 5 | Neovim 風、msgpack ブリッジ | | [mushuanli/dsht](https://github.com/mushuanli/dsht) | 5 | dsh TUI client | **注目すべき別方式** — [chiro2001/dsh-oc](https://github.com/chiro2001/dsh-oc) の README(逐語の要旨): - 画面は**公式 `opencode attach` TUI**。バックエンドは dsh。 - dsh プロセス内に **OpenCode 互換の HTTP/SSE bridge** を立て、公式 TUI を起動する。 - 互換基線は dsh `>=0.1.5-rc.2` + opencode `1.18.18`。 - インストールは `dsh plugin --profile oc add chiro2001/dsh-oc`。 → **「自作 TUI を書く」以外に「既存 TUI を dsh のバックエンドに繋ぐ」という第三の経路が実在する。** なお DSH 公式 README は、プラグイン発見のために GitHub の [`dsh-plugin` トピック](https://github.com/topics/dsh-plugin) を付けるよう案内している(=公式が認知する配布チャネル)。 公式リポジトリ側に「推奨プラグイン一覧」は見つからなかった。 第三者の curated list としては (TUI 項目を多数収録)がある。 ## 8. 不明点リスト - [ ] "officially top-recommended"(dsh-TUI の自己主張)を DeepSeek 公式チャネルで裏付けられていない。 README は WeChat 公式アカウント掲載のスクリーンショットを参照しているが、画像内容は未検証。 - [ ] 公式ドキュメントサイト の本文を取得できなかった (JS 描画と見られる。リポジトリ内 markdown で代替した)。 - [ ] `web_search` が使用不可だったため、Google/Bing 等での一般的な言及・比較記事・批評は未収集。 - [ ] dsh-TUI の 116 open issues の全量は未確認(直近 25 件のみ取得)。既知の制約の完全な把握は不十分。 - [ ] `@deepseek-ai/dsh-sdk-client`(TypeScript クライアント)の npm 公開状況は未確認。 - [ ] ACP のクライアント一覧ページ本文を取得できなかった。DSH を ACP 経由で使える実クライアント名は未確認。 - [ ] dsh-oc(opencode TUI 方式)の実動作は未検証(README の主張のみ)。 - [ ] `dshheadless --json` の NDJSON イベントスキーマは未取得(TUI を組むには不足情報)。 - [ ] 各競合 TUI が in-process bundle 方式か subprocess 方式かの分類は、README 未取得のものについては未確認。