rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:bearman141/dsh-kernel-restart
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness 加一个「重启内核」按钮:原地重建当前 profile,不关闭桌面客户端。 配置与插件条目重新加载(插件模块代码的更新仍需重启应用),会话保留;桌面端页面自动重连,Web 端页面自动刷新。
↻ 圆钮,hover 展开为「重启内核」,点击后二次确认。z-index 盖不住它;不支持 Popover 的运行时退回 position: fixed + 最大 z-index。localStorage;Alt+Shift+R 也能唤起。innerHTML 的 36px 兜底圆钮;富 UI 或动态脚本加载失败时仍然可点。GET /dsh-kernel/status、POST /dsh-kernel/ping,以及 $DSH_HOME/kernel-restart-status.json。安装后需要重启一次应用:桌面壳只在启动时收集页面注入脚本,之后按钮常驻。
在应用的 插件 页面点「添加插件」,选择本仓库目录,或填入:
github:bearman141/dsh-kernel-restart
也可以尝试 CLI(桌面 profile 由应用管理,部分版本会拒绝):
dsh plugin --profile desktop add github:bearman141/dsh-kernel-restart
dsh plugin --profile web add github:bearman141/dsh-kernel-restart
git clone https://github.com/bearman141/dsh-kernel-restart.git
dsh plugin --profile web add link:/path/to/dsh-kernel-restart
↻。重启会中断正在运行的任务、子代理和工具调用;已落盘的会话不会丢失。
在 profile 的 bundle patch 中给 dsh-kernel-restart 行加 config(全部可选):
- insert:
- id: dsh-kernel-restart
name: dsh-kernel-restart
config:
enabled: true
label: 重启内核
hotkey: Alt+Shift+R
confirm: true
diagnostics: true
| 键 | 默认 | 说明 |
|---|---|---|
enabled |
true |
false 时不注入按钮(诊断与重启路由仍可用) |
label |
重启内核 |
按钮文字与 tooltip |
hotkey |
Alt+Shift+R |
快捷键,支持 Ctrl/Alt/Shift/Meta + 单个按键 |
confirm |
true |
是否显示二次确认面板 |
diagnostics |
true |
是否写状态文件、记录心跳 |
GET /dsh-kernel/status:注入次数、最后一次心跳、按钮矩形、elementFromPoint 命中的元素、重启记录、错误。GET /dsh-kernel/button.js:当前按钮脚本(每次页面加载都会重新拉取)。POST /dsh-kernel/restart:需要请求头 x-dsh-kernel-restart: 1。$DSH_HOME/kernel-restart-status.json:同一份诊断的落盘副本。这些路由只应通过 Host 的本地监听地址访问,不要把 Host 暴露到公网。
0.2.2-rc.1 / Electron 44 / Windows 上实测:按钮注入与渲染、同端口原地重建、旧 cookie 复用,以及桌面端重启后页面原地重连(窗口未关闭、无错误)。在 插件 页移除,或:
dsh plugin --profile web remove dsh-kernel-restart
桌面版移除后重启应用。
npm test # Node 内置 test runner,校验脚本语法、manifest 与 patch
结构:
dsh-kernel-restart/
├── lib/index.js # Host 插件:注入、路由、诊断、原地重启
├── lib/client-script.js # 页面脚本:loader、按钮、兜底、快捷键
├── cordis.patch.yml # bundle patch(带默认 config)
├── locale/{en,zh}.json # 插件列表标题/描述
├── docs/ # 详情页文档与预览图
├── icon.svg # 插件图标
└── test/ # 校验测试
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。