rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
PROJECT README
DeepSeek Harness 的本地更新中心:内置插件市场(浏览/搜索/一键安装/卸载/禁用),统一管理 profile 中 npm/link 插件以及 agent preset 的更新。
插件声明了 dsh.bundle(bundle patch 位于 cordis.patch.yml),构建产物随包分发,用官方 CLI 安装即可挂载为 profile 层。
推荐 npm 安装(秒级,无需构建):
dsh plugin --profile web add dsh-update-center
或从 GitHub 安装:
dsh plugin --profile web add github:Britneycode/dsh-update-center
本地开发时也可以 link 安装:
dsh plugin --profile web add link:<本插件目录>
安装后重启 dsh web,设置页会出现「更新中心」面板。不需要第三方注入器。
plugins.json(raw 直链拉取,可独立于插件发版更新),初始内容为 GitHub topic:dsh-plugin 星标前 500 + 本插件,共 501 条。topic:dsh-plugin(星标前 500,排除 fork),与注册表按 owner/name 去重合并——重复条目仅刷新星标,新条目追加;掉出扫描窗口的老条目在 plugins.json 中保留(累计语义,上限 2000 防膨胀)。keywords:dsh-plugin,约 800+ 包),按 repository 地址与市场条目匹配——仓库一致才映射(天然防抢注);命中的条目显示 npm 标记并走 npm 秒级安装,未命中的走 github: 安装。npm run refresh:snapshot 会以现有 plugins.json 为基底累计合并最新扫描结果并连同离线快照一起重写,提交推送后生效。.github/workflows/registry-refresh.yml)每天自动跑刷新脚本并在有变化时提交推送,也可在 Actions 页面手动触发。data/registry-snapshot.json);常驻条目(data/extra-plugins.json)无条件并入,保证 0 星新插件始终可见。github:owner/repo。pnpm add。dsh-routing-suite 即按此方式提供。pnpm remove + 移出 dsh.profile.bundles,仅对 npm 安装的插件开放;link/preset 插件请直接编辑 profile。cordis.patch.yml 写入/移除受管的 disabled: true 条目(按插件自身 insert id 定位,带标记区块与备份),不删文件、可随时恢复,重启后生效。/status 带 5 秒快照缓存。$DSH_HOME/update-center 下的独立 worker 执行,停止或重启 dsh 不会中断任务。node_modules 中的实际版本;版本没有变化时返回失败。~/.dsh/update-center/dsh-web.stderr.log,不再静默失败。dsh plugin 的规则对账 dsh.profile.bundles;模板 bundle 不受影响。src 而没有更新 lib/dist 时,自动执行包的 build 脚本。Start-DSH.ps1 会等待后台更新完成再启动,Stop-DSH.ps1 不会结束更新 worker。面板与桌面端设置界面同一套设计系统,不是自绘 DOM:
| 方面 | 做法 |
|---|---|
| 控件 | 来自宿主基线模块 @deepseek-ai/dsh-client-ui-primitives(Button / SegmentedTabs / RiskConfirmation / Toast),声明为 dsh.client.external,不打包 |
| 颜色 | 只走 --dsw-* 语义令牌,跟随亮/暗主题(bundle 内硬编码颜色数为 0) |
| 不可逆操作 | 卸载、重启、批量更新、安装 —— 全部走 RiskConfirmation 模态 + 勾选确认,不用 window.confirm |
| 排版 | 页标题 16/24、行标题 14/20、行说明 12/18 |
| 窄屏 | 纯 CSS 媒体查询,不再用 !important 硬改宿主内部 class 名 |
dsh.client.platform 必须是 "web" ——桌面端跑的就是 dsh-web-app 那套 web 前端,写成 "desktop" 会被 @deepseek-ai/dsh-client-modules 判为非客户端包,面板永不出现。
导航项图标拿不到:宿主 settings-general 的 navIcon() 只给 account / models / agent-presets / plugins / archived-sessions 配了图标,其余 id 一律回落成齿轮。本插件用 update-center(语义正确,且不与宿主已有的 plugins 页冲突),因此显示为齿轮。要换专属图标需要宿主侧扩展那张映射表。
构建脚本支持 Windows、macOS 和 Linux。它会从 DSH_CHECKOUT、相邻目录及常见用户目录中寻找 DeepSeek Harness checkout,并复用 checkout 的 TypeScript 与 tsdown。
npm run typecheck
npm test
npm run build
无法自动找到 checkout 时,先设置 DSH_CHECKOUT:
$env:DSH_CHECKOUT = 'D:\App\dsh\deepseek-harness'
npm run build
宿主半边(lib/index.js 等)是纯 Node 代码,已随仓库分发,日常改面板不需要重建它。浏览器半边可以直接用本仓库的 tsdown,绕过需要 checkout 的 scripts/build.mjs:
npm run build:client:local # tsdown,只产出 lib/client.js
npm run typecheck:client # tsc -p tsconfig.client.json
npm run test:client # lib/client.js 的契约测试(6 条)
test:client 里有一条用例会读运行中桌面端的 app.asar,取出 shell 真实的 PLATFORM_MODULES 表逐条核对 bundle 的 require 目标。不指路会 skip:
$env:DSH_DESKTOP_ROOT = 'D:\App\deepseek harness'
npm run test:client
| 字段 | 说明 | 默认值 |
|---|---|---|
repoDir |
dsh 源码仓库 | 自动探测 |
profileDir |
web profile | $DSH_HOME/profiles/web |
presetDir |
agent preset 目录 | $DSH_HOME/.agent-presets |
proxy |
npm/pnpm 代理 | dsh 仓库的 http.proxy |
remote |
Git 远端名 | origin |
branch |
dsh 更新分支 | master |
upstreams |
插件名到 GitHub 仓库的来源映射 | 内置常用插件 |
更新中心只修改已明确识别的 dsh 仓库、profile npm 依赖和已安装的 Git 插件。它不会自动 stash、强制切换普通分支、执行非快进合并,也不会自动结束正在运行的 dsh 进程。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。