Hua1Q1nG/dsh-hindsight-local-optimize
DSH桌面优化插件,适用于hindsight-coding-agents:自动启动、退出时自动停止、隐藏控制台窗口、安装到其他驱动器。
Project Overview项目介绍
This plugin is a sidecar patch for the @vectorize-io/hindsight-coding-agents plugin in the DSH desktop client, providing full local-memory lifecycle management. It auto-starts the hindsight-embed daemon, kills it when DSH exits via a watchdog, hides the uv terminal window, and lets users move the cache to another drive. A sidebar toggle with status indicator and boot-autostart are included. Use it when the official plugin fails to auto-launch in DSH and shows a console window. Note: it uses ~0.8–1 GB RAM constantly, the first cold start needs 1–3 minutes, and the window is only hidden, not removed.
本插件为 DSH 桌面的 @vectorize-io/hindsight-coding-agents 提供本地记忆守护进程的旁路补丁:自动拉起 hindsight-embed、DSH 退出随停、隐藏 uv 终端黑框、支持将档案柜安装到其它盘。侧边栏一键开关含状态灯,可设开机自启。适用于官方插件在 DSH 下不会自动启动且会弹黑框的场景。注意:常驻约 0.8–1 GB 内存,首次冷启动需 1–3 分钟下载模型,且黑框是隐藏而非消除。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-hindsight-local-optimize(Hua1Q1nG/dsh-hindsight-local-optimize)
仓库:https://github.com/Hua1Q1nG/dsh-hindsight-local-optimize
本站详情页:https://www.yhbd.top/plugins/hua1q1ng-dsh-hindsight-local-optimize/
本站登记:类型 client · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-20 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
- Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:Hua1Q1nG/dsh-hindsight-local-optimize
把 Hua1Q1nG/dsh-hindsight-local-optimize 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-hindsight-local-optimize
为 DeepSeek Harness(DSH 桌面端)的 @vectorize-io/hindsight-coding-agents 插件补上「本地记忆」完整生命周期与体验的优化插件。
本插件不修改官方插件的业务逻辑,而是作为旁路补丁:接管守护进程的启动/停止、自动绑定 DSH 生命周期、隐藏终端黑框、支持把档案柜装到其它盘。
背景:解决了什么问题
官方 hindsight-coding-agents 在 DSH 桌面端有两个缺口:
本地守护进程不会自动启动 官方 DSH 版插件只把记忆地址指向本机
127.0.0.1:9077,但从不主动拉起hindsight-embed(hindsight-api)守护进程——自动冷启动只实现在 Claude Code / Cursor / Copilot 等 CLI 工具里。结果是:选「本地保存」后,DSH 去连 9077 端口但那里没人值班,记忆功能等于没生效。会弹出黑框 守护进程的宿主
uv.exe在 Windows 11 上会用WindowsTerminal弹出一个终端黑框,且常驻不消失。
本插件补齐这两点,并提供一键开关、开机自启、退出随停。
功能
- ✅ 一键开关:侧边栏「本地记忆」按钮,实时状态灯(未运行 / 启动中 / 运行中 / 失败)。
- ✅ 开机自启:DSH 启动时自动在后台拉起守护进程(带重试,约 40 秒内就绪,不阻塞 DSH)。
- ✅ 退出随停:独立「看门狗」进程监控 DSH 主进程,DSH 退出时立即杀掉守护进程、释放内存。
- ✅ 隐藏黑框:自动给官方启动器
daemon-start.js打「隐藏窗口」补丁(自愈),并后台隐藏uv.exe的终端窗口。 - ✅ 装到其它盘:守护进程(uv 缓存)与模型(HuggingFace 缓存)可安装到任意盘。
架构
``` dsh-hindsight-local-optimize/ ├── lib/ │ ├── index.js # 宿主半边:路由、启停、凭证读取、官方启动器补丁、看门狗 │ ├── client.js # 客户端半边:侧边栏开关按钮 │ ├── hide-window.ps1 # 隐藏 uv.exe 终端黑框(Win32 ShowWindow) │ └── watchdog.mjs # 看门狗:独立进程,DSH 退出时杀守护进程 ├── package.json # 双面插件声明(dsh.bundle.patch + dsh.client) ├── cordis.patch.yml # 挂载补丁 └── README.md ```
工作原理(关键点)
- 启动链路:插件读宿主凭证服务取
DEEPSEEK_API_KEY(Key 不出宿主进程)→ 注入HINDSIGHT_API_LLM_*环境变量 → 后台spawn node daemon-start.js --harness dsh拉起守护进程。 - 退出链路:因为守护进程是「孤儿进程」,且 DSH 退出时承载插件的进程会被 Windows 强杀、退出钩子不可靠,所以插件额外 spawn 一个独立看门狗进程,每 2 秒探测 DSH 主进程;一旦发现 DSH 退出,立即
taskkill守护进程并自身退出。 - 黑框处理:启动前给官方
daemon-start.js内部spawn uvx补windowsHide: true(自愈:官方更新覆盖后下次自动重打),再用hide-window.ps1枚举并隐藏标题含uv.exe的窗口。
安装
前置条件
- 已通过 DSH 插件市场安装官方
@vectorize-io/hindsight-coding-agents(本插件依赖它的daemon-start.js)。 - 本机已安装 uv(
uvx在 PATH),用于运行hindsight-embed。 - 已在 DSH 凭证里配置
DEEPSEEK_API_KEY(本地记忆抽取需要一个大模型,官方支持 DeepSeek)。
安装本插件
把本仓库克隆或复制到 DSH 的全局插件目录:
``` /profiles/node_modules/dsh-hindsight-local/ ```
在
<DSH_HOME>/profiles/web/cordis.patch.yml末尾追加一行挂载:```yaml
- insert:
- id: hindsight-local name: 'dsh-hindsight-local'
```
- insert:
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
reactive-resume/reactive-resume
anywhere-labs/dsh-desktop
dataelement/dsh-desktop
ccch1mneyyy/dsh-TUI
DSH-EAC/DSH-Desktop-EAC
shaobeichen/dsh-pocket
xyTom/coding-tools-mcp