Hua1Q1nG/dsh-hindsight-local-optimize

Desktop桌面端 Native原生 ⭐ 2 MIT Clients & Launchers客户端与启动器

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 分钟下载模型,且黑框是隐藏而非消除。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • 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 桌面端有两个缺口:

  1. 本地守护进程不会自动启动 官方 DSH 版插件只把记忆地址指向本机 127.0.0.1:9077,但从不主动拉起 hindsight-embed(hindsight-api)守护进程——自动冷启动只实现在 Claude Code / Cursor / Copilot 等 CLI 工具里。结果是:选「本地保存」后,DSH 去连 9077 端口但那里没人值班,记忆功能等于没生效。

  2. 会弹出黑框 守护进程的宿主 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)。

安装本插件

  1. 把本仓库克隆或复制到 DSH 的全局插件目录:

    ``` /profiles/node_modules/dsh-hindsight-local/ ```

  2. 在 <DSH_HOME>/profiles/web/cordis.patch.yml 末尾追加一行挂载:

    ```yaml

    • insert:
      • id: hindsight-local name: 'dsh-hindsight-local'

    ```

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-web-search-ollama 下一个 Next dsh-workbuddy-ppt →