@camusugar/dsh-notify
Manifest validDSH system notifications (OS toast) while a session waits on user approval, a question, or a plan review
@camusugar/dsh-notify
DSH 用户级插件:当会话卡在等人操作时(权限批准 / ask_user_question 提问 / plan 模式方案确认),且应用窗口不在前台(最小化、切到别的窗口、失焦),弹一条 操作系统级系统通知(Windows toast / macOS 通知中心)。用户回到应用窗口,或回答完 对应请求后,通知自动消失。
已验证:DSH Desktop 0.1.7-rc.2(Windows)。通知走标准 Web Notification API, 理论上跨平台;macOS 要求应用为签名构建(UNNotification 限制)。
安装
dsh plugin add https://github.com/Camusugar/dsh-notify
特性
- 纯事件驱动:1 个
uiSession.sessionStatus订阅 + 3 个标准 DOM 监听 (visibilitychange / blur / focus),没有任何定时器、轮询、React 渲染。 - 不修改 DSH 本体;随 profile 安装,应用升级后仍保留。
- 容错设计:uiSession 服务缺失或形状漂移 → 静默禁用(console.warn), 绝不向 Cordis loader 或共享发布器抛错;通知创建失败 → 跳过。
- 每个待决请求一条通知(按 key 去重),上限 16 条,超出静默抑制。
- 多会话并发:状态快照按会话索引,插件一次遍历所有会话;各域 key
(
approval:N/question:N,含 plan-review)为模块级全局递增计数器, 跨会话唯一。各会话通知独立弹出、独立关闭(某会话解决只关它那条)。 body 首段带会话显示名(持久标题 → 工作区目录名 → 会话 id),方便区分。 - 中文/英文文案按
navigator.language自动选择。
文件
├── package.json bundle + client 插件清单(dsh.bundle / dsh.client)
├── cordis.patch.yml 插入一行 client 插件
├── lib/index.js 宿主端入口(空 apply;双脸包必须有宿主入口,否则宿主报 failed to import)
├── lib/client.js 浏览器端插件产物(window.__ModuleLoader__ 行)
└── smoke.mjs 回归测试(node smoke.mjs,7+1 用例,无需装依赖)
卸载
插件页 → 卸载 @camusugar/dsh-notify;或手动:
- 退出应用
- 编辑
~/.dsh/profiles/desktop/package.json(Windows:C:\Users\<用户名>\.dsh\profiles\desktop\package.json):从dsh.profile.bundles和dependencies中删除@camusugar/dsh-notify - (可选)删除同目录
node_modules\@camusugar - 重启应用
如果插件把应用弄坏了(恢复手册)
第一优先:应用内置恢复。 启动失败时应用会弹致命错误对话框,选择
「禁用全部插件并重启」(disableAllPlugins):它会把
cordis.patch.yml 备份为 cordis.patch.yml.bak-<时间戳>,并把
dsh.profile.bundles 重置为官方默认(dsh-base + dsh-web-app),然后重启。
之后可重新安装本插件。
手动恢复(保留你 cordis.patch.yml 里的模型等自定义配置):
- 退出应用(托盘图标退出;任务管理器结束所有 "DeepSeek Harness" 进程)
- 编辑
~/.dsh/profiles/desktop/package.json:dsh.profile.bundles数组里 删掉"@camusugar/dsh-notify";dependencies里删掉对应那一项 - 重启应用 —— 其余配置(模型 provider 等)不受影响
最后手段(上面都不行时):退出应用,把 ~/.dsh/profiles/desktop 整个
目录改名成 desktop.bak,再启动应用 —— 应用会自动重建一个全新默认 profile。
注意:这会丢掉 cordis.patch.yml 里的自定义(模型 provider 等),改名前先备份。
Comments
Loading…
From the same category
by zhu1090093659
DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
★ 8.3k
↓ 203/wk
Apache-2.0
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-webby ccch1mneyyy
DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol
★ 4k
↓ 15.9k/wk
MIT
TypeScript
Oct 3, 2026
dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tuiby YuJunZhiXue
DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐
★ 3.1k
MIT
JavaScript
Oct 3, 2026
dsh plugin --profile web add dsh-purgeby bowenliang123
The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,
★ 1.8k
↓ 37.3k/wk
Apache-2.0
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-contextby agentrq
AgentRQ: Human-in-loop realtime conversational task manager for AI Agents. Self-hosted! Control your own agents from wherever you want Mobile, Web, Desktop. Designed to work well with your own Claude
★ 1.1k
↓ 46/wk
Apache-2.0
JavaScript
Oct 3, 2026
dsh plugin --profile web add @agentrq/dsh-plugin-agentrqby vshulcz
One memory shared by Claude Code, Codex, Cursor, Copilot CLI, OpenClaw and 20 more coding agents, built from the session history already on disk. A fix found in one agent comes back in any of them, in
★ 1.1k
↓ 1.2k/wk
MIT
Go
Oct 3, 2026
dsh plugin --profile web add dsh-deja