dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Floating notes for the dsh web GUI: keep commands, credentials and snippets at hand, insert any note into the composer, save any selection as a note
DeepSeek Harness Web GUI(dsh web)的悬浮笔记插件。把命令、重要凭证、参数值以及任何你认为值得记录的内容随手记下来,并在需要时一键放回对话里。
$DSH_HOME/notes/notes.json(默认 ~/.dsh/notes/notes.json),原子写入、容错读取。--dsw-alias-*):默认完美匹配官方浅色/深色主题;安装皮肤插件(dsh-skins / skin-center)后自动跟随皮肤配色实时变化,无需刷新、无需皮肤专用代码。插件已发布到 npm registry:
dsh plugin --profile web add dsh-web-notes
如果你的默认 npm 源是镜像且尚未同步到该包(例如 npmmirror——只读、同步有延迟),可直接指定官方源安装:
dsh plugin --profile web add dsh-web-notes --registry https://registry.npmjs.org/
dsh plugin --profile web add link:/path/to/dsh-web-notes
然后把 bundle 加入 profile 清单,插件才会真正启动:
# 在 ~/.dsh/profiles/web/package.json 的 "dsh" > "profile" > "bundles" 列表末尾
# 追加 "dsh-web-notes",然后重启 dsh web
官方
dsh plugin --profile web add <spec>只是转发给 pnpm:它会安装包,但不会修改dsh.profile.bundles清单——由这个清单决定哪些已安装的包会被启动。需要手动把包名加进去(或通过聚合包携带cordis.patch.ymlinsert),再重启。
dsh plugin --profile web list # 应能看到 dsh-web-notes
npm view dsh-web-notes version # → 最新已发布版本
重启 dsh web 后,聊天窗口右侧会出现笔记本图标(见使用)。
dsh plugin 只是转发给 pnpm,所以更新就是 pnpm 的 update——无需手动改 manifest(profile 会在下一次 dsh plugin 运行时按已安装状态自动对账 bundle 清单),然后重启 dsh web:
dsh plugin --profile web update dsh-web-notes
# 或指定精确版本:
dsh plugin --profile web add dsh-web-notes@latest --registry https://registry.npmjs.org/
镜像同步延迟:发布是发到官方源的,而 npmmirror 等镜像同步有延迟——刚发布后你的默认源可能还是旧版本(甚至短暂 404)。如果新版本发布后 update「没反应」,加上
--registry https://registry.npmjs.org/直连官方源即可。
更新不会动你的笔记:数据存在宿主机
$DSH_HOME/notes/notes.json,设置也会保留。
笔记支持按标题、内容、标签搜索(编辑时用逗号分隔标签)。
插件注册了 notes 设置命名空间,并在 设置 → 插件 → 插件配置 中提供设置卡片(命名空间也可通过 ~/.dsh/settings.yaml 修改):
notes:
enabled: true # 总开关:false 时完全隐藏悬浮图标
selectionCapture: true # false 时关闭「选中即存」悬浮按钮
dockMode: floating # floating(悬浮可拖动)| fixed(对话窗口右上角固定)
buttonSize: large # small(较小)| regular(常规)| large(较大)
defaultGlobal: false # 新建笔记默认存为全局(所有会话可见)
五项均可直接在设置卡片中实时修改,悬浮图标与面板立即响应。
笔记里可能包含凭证、Token 等敏感信息。它们以明文存储在本地 JSON 文件(~/.dsh/notes/notes.json,与 ~/.dsh/credentials.yaml 同一信任模型),且仅向本机浏览器提供服务。请勿存放你无法承受在本机泄露的密钥,并依靠操作系统的用户权限保护该文件。备份/导出该文件即等于导出全部笔记。
pnpm install
pnpm run build # tsc -b(类型)+ tsdown(lib/index.js + lib/client.js)
node scripts/smoke-host.mjs # 宿主逻辑独立冒烟测试(无需 dsh 应用)
# 客户端 UI 验证,无需 dsh 应用(见下)
pnpm exec tsdown --config tsdown.harness.config.ts
node scripts/verify-touch.mjs
scripts/verify-touch.mjs 驱动 scripts/harness/entry.tsx:一个独立 harness,用真实的 NotesDock 组件树 + 真实的 NOTES_CSS 配上 mock 的宿主契约(笔记 API、会话 store、settings scope),在无头 Chrome 中经 CDP 断言粗指针适配与各条关闭路径,并输出 .logs/touch-desktop.png / .logs/touch-coarse.png 供肉眼检查。
scripts/cdp-*.mjs与screenshot.mjs这些探针驱动的是正在运行的 GUI,因此需要该实例的浏览器认证:dsh ≥ 0.1.5 把/放在进程级 launch token(换取签名 cookie)之后,全新的无头浏览器会拿到401 dsh web authentication required,应用根本不会启动。请在同一个浏览器 profile 中打开dsh web启动时打印的带 token URL,或改用上面的 harness 做纯客户端检查。
架构:
src/index.ts、src/service.ts、src/routes.ts、src/persist.ts)— cordis 插件行 notes:CRUD 服务、原子 JSON 持久化、loopback 保护的 /api/notes/* 路由、settings 命名空间。src/client/)— 直接挂在 document.body 上的全局悬浮界面(笔记没有会话维度);通过同源 JSON 与宿主通信;通过官方对话输入门面 ctx.conversation.input.for(actx).setDraft(...) 写入输入框。客户端 bundle 以闭包工厂产物(window.__ModuleLoader__.load({ id: 'dsh-web-notes', factory }))构建,由 web 插件表在 /plugins/dsh-web-notes/client.js 提供。
Apache-2.0。© 2026 Shrbuz — 署名信息见 NOTICE。