DeepSeek Harness plugin

dsh-cc-haha-dream

DSH 自动做梦插件:后台定期回顾近期会话与记忆,整合去重、更新过时、修剪索引(复刻 CC-HAHA autoDream,与 dsh-memory 并存)

Jump to install

Source facts

Repository
yihefeikong-rgb/dsh-cc-haha-dream
Latest update
Aug 21, 2026
Category
Memory
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-21

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/yihefeikong-rgb/dsh-cc-haha-dream
Plugin: dsh-cc-haha-dream
Author: yihefeikong-rgb

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-dream

DSH 自动做梦插件:后台定期回顾近期会话与已有记忆,整合去重、更新过时、删除矛盾、修剪重建索引。 复刻 CC-HAHAautoDream(后台记忆整合)行为, 与已安装的 dsh-memory 并存——dsh-memory 负责"随手记"(extractMemories),dsh-dream 负责"睡前整理"。

> [!IMPORTANT] > 本项目不是 CC-HAHA 官方组件,也不隶属于 CC-HAHA 或 DeepSeek。自动做梦的 > 门控链与整合流程参考 CC-HAHA(见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)), > 插件代码使用 DSH 原生能力(会话查询、子代理、命令、工具、设置)独立实现。

> [!IMPORTANT] > 独立插件,不修改 dsh-memory;与它共享同一个 ~/.dsh/memory/ 目录,文件格式与 MEMORY.md 索引完全兼容。

功能

  • 自动定时:默认 24 小时 + 积累 5 个会话后,后台静默执行一次记忆整合(五重门控,不阻塞对话)。
  • 手动触发/dream 命令,或 agent 调用 memory_dream 工具,立即整合一次。
  • 整合内容(对齐 CC-HAHA autoDream 4 阶段,执行用 fork 子代理):

- 插件 fork 一个子代理(默认继承会话模型;可选覆盖 provider/model/maxTokens) - 子代理按 4 阶段提示词(定向 → 收集近期信号 → 整合 → 修剪索引)输出动作 JSON - 插件在 host 侧安全落盘:合并重复(merge/update)、修正过时/删除矛盾(delete)、 从近期会话提炼新记忆(create)、重建 MEMORY.md 索引(≤200 行 / ≤25KB)

  • 安全:所有写操作限制在记忆目录内;动作整批预检通过后才开始写入;删除/覆盖前自动存 .history/ 历史版本;LLM 输出严格 JSON 校验;.dream-lock 防并发。

安装

dsh plugin --profile web add C:\Users\huangxinyang\.dsh\plugins\dsh-dream
# 或从源码目录:
dsh plugin --profile web add D:\claude\...\dsh-dream

安装后重启 DSH

dsh web

配置

有两种方式,效果一致(设置面板写入的是用户层,覆盖 patch 默认值;applies: restart重启后生效):

1. 设置面板(推荐):打开 DSH 设置 → 插件插件配置 选项卡 → 自动做梦 卡片,直接编辑并保存。 卡片字段含说明与"已覆盖/恢复默认"标记;保存后写入 ~/.dsh/settings.yamldsh-dream: 段。 2. patch 文件:编辑 cordis.patch.yml 的默认配置。

选项默认说明
enabledtrue后台自动做梦总开关
minHours24距上次整合最小间隔(小时)
minSessions5距上次整合后最少新会话数
triggerModehybridhybrid=时间或内容量先到先触发 / gates=仅固定间隔 / volume=仅按内容量
minVolumeChars30000内容量触发阈值(近期待整合会话文本估算字符数)
scanIntervalMinutes10后台门控检查间隔(分钟)
scopesautoauto=近期活跃项目+通用 / all=全部 / current=当前项目+通用
maxDigestChars60000近期会话摘要上限(字符)
maxMemoryChars80000记忆正文参考上限(字符)
maxTokens8192子代理整合输出上限;0=不传,由宿主/模型决定
agentTimeoutMs900000做梦子代理总超时(毫秒)
provider / model''空 = 继承会话模型
manualOnlyfalsetrue=只允许手动/工具触发
storageDir''空 = 默认 ~/.dsh/memory

> 设置卡片属于插件浏览器端(client bundle)。新增或更新设置卡片后需重启 DSH, > 让宿主重新扫描插件的 dsh.client 声明(pkgMeta 缓存只在进程启动时刷新)。

使用

  • 手动整合一次:发送 /dream(可选 all / current 指定作用域范围)。
  • agent 主动触发:调用 memory_dream 工具。

整合结果会作为一条系统消息出现在当前会话;日志以 [dsh-dream] 前缀输出。

与 CC-HAHA 的关系

参考 CC-HAHA src/services/autoDream/ 的门控链与整合流程(autoDream.ts / consolidationPrompt.ts / consolidationLock.ts),使用 DSH 原生能力(ctx.sessionQuery 读会话、ctx.llm 整合、ctx.commands / ctx.tools 入口)独立实现。

License

MIT