dsh-plugin-ide-hub

workflowtested: passnpmMIT

One hub over every coding IDE you run — dsh, Claude Code, Codex, ZCode, Qoder, CatPaw, Trae, OpenCode. Zero-API: it reads each tool's own on-disk state and gives a session inventory, per-IDE usage with cache-hit rates, one-line resume commands, and a single .hub/ rule body wired into all eight via m

下载量 / Downloads
777
依赖体积 / node_modules
0.64 MB
测试时间 / Tested
2026-11-07
DSH 版本 / Version
0.2.2-rc.1

Install

dsh plugin --profile web add dsh-plugin-ide-hub

Sandbox test results

StageResult
1 install✓
2 list✓
3 mount✓
4 boot—

Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).

README

dsh-plugin-ide-hub

<div align="center">

一个入口管住所有编码 IDE:会话、用量、规则文件 —— 8 个 IDE 零 API 盘点(含 Trae / Qoder / CatPaw 国产适配)· 用量与缓存命中率 · 会话一键恢复 · 规则一份本体多 IDE 下发

![GitHub stars](https://github.com/121212165/dsh-plugin-ide-hub/stargazers) ![license](LICENSE) ![tests]()

60 秒上手:dsh plugin --profile web add github:121212165/dsh-plugin-ide-hub → 重启 dsh → 对话里输入 /ide-hub(详细安装与排坑见下文)

<!-- 截图版位:web UI 实拍截图 / GIF(待补) -->

</div>

🧩 dsh 插件家族(22 件):总目录 dsh-plugin-family | 兄弟插件:task-forge 跨窗口无损交接 · quota 实时用量仪表

EN · One hub over the coding IDEs you actually run — dsh, Claude Code, Codex, ZCode, Qoder, CatPaw, Trae, OpenCode. It reads each tool's own on-disk state (sessions, usage, prompt-rule files) instead of calling any API, then gives you an inventory (/ide-hub), a quota-runway migration plan (/hub-migrate), usage breakdowns (/hub-usage), resumable sessions (/hub-sessions), a ranked "what should I do first" over the sibling plugins (/today) and an Obsidian export (/hub-export) — and, since /hub-init, writes back exactly one thing: a .hub/ rule body plus a marker-delimited pointer in each tool's project rule file. · 45 node --test green · reads real local data on this machine · v0.4's Trae chat reader is not yet wired into /hub-sessions — see 已知边界.

DeepSeek Harness (dsh) 插件:跨 IDE 统一管理器。各家编码 IDE 都把会话、用量、提示词规则写在自己的磁盘目录里,本插件直接读这些文件(不调任何厂商 API),在 dsh 里出六个命令。读之外只有一处写:/hub-init 往你自己指定的项目目录里装 .hub/ 规则本体与各 IDE 的指针段。

功能

  • /ide-hub:8 个适配器的在装盘点(N/8 在装,其中国产 M)+ 每个工具的提示词规则文件发现(CLAUDE.md / AGENTS.md / .cursorrules 一类)。
  • /hub-init [目录] [--dry-run] [--only …] [--remove]:指针生成器。建 .hub/AGENTS.md(规则本体,一份正文多处生效)+ .hub/PROJECT_NOTES.md + .hub/STRUCTURE.json(深度 2 的结构快照),再放 hub-pointer 标记段:8 个工具全覆盖——项目根 AGENTS.md 一份服务 codex / opencode / zcode / dsh / qoder / catpaw,CLAUDE.md 服务 Claude Code,Trae 因为它的「项目根 AGENTS.md」是设置里的开关("Include AGENTS.md in the context"),单独写 .trae/rules/project_rules.md 和 .trae-cn/rules/project_rules.md(本机装的 TRAE SOLO CN 两条路径都在用)。
  • 这些路径不是从文档抄的:2026-10-02 用 grep 从本机安装的厂商二进制里读出来(Trae 的 ai-modules-chat/dist/index.mjs 设置文案、Qoder 的 qoder-worker-runtime.obf.mjs 里 AGENTS.override.md → AGENTS.md 与 projectConfigName=.qoder/.qoder-cn、CatPaw 的 catpaw-cli.exe 里 loadProjectRules(.catpaw/rules) 与 loadAgentMdFiles)。CatPaw 的 .catpaw 目录名可被 CATPAW_DIR 覆盖,所以指针挂 AGENTS.md 而不是它。
  • /hub-usage:用量。zcode 走本地 model_usage 库,出总量、轮数、缓存命中率、非完成态与工具错误数,并按 provider/model 逐行拆;claude-code / codex 走各自转录统计。
  • /hub-sessions:最近会话列表 + 一键恢复命令(claude --resume … / codex resume … / dsh --profile … --resume …)。
  • /today:今天第一件事。把四个兄弟插件写在磁盘上的事实汇成一个排序结论——quota 的 summary.json(预算与下步预估)、cost-ledger 的当月台账、task-forge 的 ledger.jsonl(谁卡在等谁)、tool-trace 的调用记录(连败=系统性故障)。规则表在 src/hub/today.ts,是纯函数、逐条有测试;读不到哪个文件就在输出里点名「看不到的部分」,不假装全知。
  • /hub-migrate:配额迁移计划。按你配的 remainingMajor / dailyMajor / priority 算每个工具的耗尽倒计时,并给出该把活优先挪给谁。
  • /hub-export:把盘点结果与规则文件导出成 Obsidian 笔记(IDE-Hub/ 子树),未变化的文件跳过。

安装

三步,2026-10-03 在全新 DSH_HOME 上按本文档重跑通过(@deepseek-ai/dsh@0.2.0-rc.2 + pnpm 10.20.0):

# ① 装进 profile:dsh plugin 把参数原样转发给 pnpm,git 包会自动跑 prepare 构建 lib/
dsh plugin --profile web add github:121212165/dsh-plugin-ide-hub

② 把本仓库根目录 cordis.patch.yml 的内容并进 $DSH_HOME/profiles/web/cordis.patch.yml。

该文件默认是 [],所以要么整份替换,要么把 insert 条目并进同一个数组;不要直接追加——

追加会形成两个 YAML 文档,启动即报

failed to parse overlay ... end of the stream or a document separator is expected(本机实测踩过)。

③ 重启 dsh。配置层与 client 半都要重启才生效(客户端按 boot 时算出的内容 rev 下发,硬刷新浏览器没用)。

自检挂载:dsh --profile web --dump-config | grep dsh-plugin-ide-hub,应看到该条目。

装不上时先查这三样(2026-10-03 干净房实测踩点)

1. git 走了死代理:pnpm 内部会调 git ls-remote https://github.com/…。若你 git 全局配了

http.proxy 而那代理已经不在了,报 TLS connect error: error:0A000126:SSL routines::unexpected eof——

而同一时刻直连 github 是 200,所以别怀疑 GitHub。临时绕过(不动你的全局配置):

   export GIT_CONFIG_COUNT=2 \
     GIT_CONFIG_KEY_0=http.proxy  GIT_CONFIG_VALUE_0= \
     GIT_CONFIG_KEY_1=https.proxy GIT_CONFIG_VALUE_1=

永久修法自己定:git config --global --unset http.proxy(并 unset https.proxy)。

2. pnpm 拦构建脚本:git 包要在安装时跑 prepare 生成 lib/。pnpm 10.20.0 实测直接放行;

若你的版本拦了,按 dsh 的报错提示在 profiles/web/pnpm-workspace.yaml 的 allowBuilds

里加上包名再重跑同一条 dsh plugin … add。

3. missing peer @deepseek-ai/cordis@>=4.0.0 是预期噪音:cordis 由宿主 profile 提供,不用补装。

装完立刻可用的含义:只要 bundles 里有 dsh-plugin-ide-hub,它就会以 config: {enabled: true} 挂载,

/hub-init 与 /today 直接可用;上面第 ② 步的 cordis.patch.yml 只是往里加配置项(vaultDir 之类),

不配不影响主功能。确认到"真的挂上且带默认配置":

dsh --profile web --dump-config | grep -A2 dsh-plugin-ide-hub
# → - id: ide-hub / name: dsh-plugin-ide-hub / config: / enabled: true

配置

字段 · 默认 · 说明

enabled · true ·

vaultDir · 无 · /hub-export 的目标 Obsidian 库;不配则该命令直接报错而不是猜路径

quotaSummaryPath · ~/.dsh/quota/summary.json · /today 读它(预算、下步预估)

costLedgerDir · ~/.dsh/cost-ledger · /today 读当月 ledger-YYYY-MM.jsonl

taskForgeLedger · ~/.dsh/task-forge/ledger.jsonl · /today 读交接台账

toolTraceDir · ~/.dsh/tool-trace · /today 读工具追踪,窗口 todayWindowDays

quotas · [] · /hub-migrate 的输入,每项 {tool, remainingMajor, dailyMajor, priority};priority 取 work/batch/learning

/today 的优先级(为什么是这个顺序)

规则表只有 6 条,顺序是"现在能不能干活" > "钱" > "别人在等我的东西" > "我在等别人的东西" > "可以开工了":

1. tool-trace 里有工具连败 ≥ 3(与 error-radar 同阈值)→ 先修工具链:这条路现在就是走不通,别派活;

2. quota 预算 ≥

…(truncated)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::2,最后更新 2026-10-25

Links

GitHub · Homepage · npm

Same category