Bundle
dsh-memory-dreaming
从原生会话整理日常记忆、Dream 与每周复查,保留出处并审阅长期事实。
- Source
- Kerberos255
- License
- MIT
- Updated
- Updated 7 days ago
Readme
# Dream & Memory for DeepSeek Harness
[简体中文](README.zh-CN.md) · [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) · [Security](SECURITY.md)
Turn verified DSH conversations into **daily journals, Dream consolidations, weekly reviews, and searchable long-term memory**, without loading whole conversations into every prompt.
## Memory lifecycle
1. **Daily journal:** summarize eligible user messages into `memory/YYYY-MM-DD.md`.
2. **Dream:** consolidate recent experiences into `DREAMS.md` and candidate facts.
3. **Long-term memory:** verify source evidence and publish approved facts to managed sections of `MEMORY.md`.
4. **Recall:** fetch a few relevant published facts from the current authorized workspace; optional embeddings complement keyword search.
5. **Weekly review:** merge the previous week's daily journals, track coverage, and safely archive eligible daily files.
The original native DSH session log remains the evidence source. Candidate memories are not automatically treated as facts, and retrieved user content is not trusted as instructions.
## Semantic recall and historical archives
Automatic recall of **verified, source-backed long-term memory** can use keyword, semantic-fallback, or hybrid matching (`autoRecallMode`). Embedding failures fall back to lexical retrieval; content from unverified history never enters trusted automatic recall.
The plugin maintains a scoped, incremental SQLite index for explicit `memory_search` over curated archives under `memory/history/{daily,weekly,monthly,notes}/`. Only these structured Markdown paths are scanned; account/configuration files and migrated raw sessions are excluded. Rolling daily/weekly maintenance preserves permanent archive copies according to the history settings. No user archives or migration scripts are included in this public package.
CI runs portable memory-indexing and recall tests using `npm test`. The full plugin integration suite (`npm run test:integration`) requires a compatible DSH host with the declared peer services.
## Requirements and install
Requires a DSH host with native session query, scheduling and model services; see [package.json](package.json) for runtime and peer requirements.
```sh
dsh plugin --profile desktop add github:Kerberos255/dsh-memory-dreaming
```
Use your actual profile and restart after installing or updating code.
## Quick start
1. Open **Settings → Plugins → Dream & Memory**. Choose an available summarization model.
2. Start with the manual daily/Dream/weekly actions and inspect eligible-source diagnostics and proposed facts.
3. Review the candidate list and publish verified facts, or deliberately enable automatic promotion with its evidence checks.
4. Enable the built-in DSH scheduled jobs only when wanted; **scheduled processing and automatic fact promotion are off by default**.
5. For private Discord/Feishu sources, configure [Channel Core](https://github.com/Kerberos255/dsh-channel-core) owner verification first.
By default, published facts can be recalled automatically in small bounded amounts. The plugin supports keyword retrieval without an embedding model; an optional embedding provider may improve semantic matching.
## Storage and safety
State and write recovery are managed in local SQLite under DSH data; managed journals, Dream output and `MEMORY.md` remain regular workspace Markdown. Source identity, workspace authorization, incremental cursors, atomic writes, and hash checks protect publication and cleanup. Archived eligible daily entries are retained temporarily before removal; human-edited files are preserved.
An on-demand `memory_dream` tool is **not** permission to inspect unrelated private conversations. Live model and scheduling results must be checked in DSH; standalone CI covers mock-based behavior.
## Development
Run `npm test` for portable tests. Config template: [config.example.json](config.example.json). Historical changes: [CHANGELOG.md](CHANGELOG.md).
Related: [Channel Core](https://github.com/Kerberos255/dsh-channel-core) · [Instruction Files](https://github.com/Kerberos255/dsh-instruction-files) · [Lossless Context](https://github.com/Kerberos255/dsh-lossless-context).
MIT licensed. See [LICENSE](LICENSE).
## Optional plugin diagnostics
The plugin optionally emits privacy-restricted operation and failure metadata to dsh-plugin-diagnostics. Diagnostics contain event type, status, fixed error code and elapsed time; conversation content and credentials are not logged. The diagnostics plugin is optional and does not change the host requirements.
## Natural-language project and task memory
Dream can extract source-backed task events from eligible user messages and link them to stable internal task/project IDs without requiring users to type canonical names. State changes (requested, in progress, blocked, completed, cancelled, reopened) are stored separately from verified long-term facts, with timestamps and verbatim source references. Unclear aliases remain separate rather than being forcibly merged. A status question can receive a dated task timeline via `memory_search` and limited owner-authorized recall; historical user statements are **not evidence of verified implementation**. Manual draft-only runs do not publish events, and revoked/forgotten sources are excluded.
Daily, Dream and weekly consolidation now offer distinct configurable default content-guidance prompts, with a **Restore default** action in the plugin settings. Mandatory JSON, authorization and source verification remain code-enforced. Existing native DSH Session Log remains the evidence source. The task index is populated on new successful memory runs; older journals are still searchable but are not automatically backfilled into structured tasks.
Install
dsh plugin --profile web add github:Kerberos255/dsh-memory-dreaming
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-memory-dreaming from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.