coding-agents
vectorize-io/hindsightHindsight:会学习的 Agent 长期记忆系统,自动召回/保存、知识页、深度反思与按仓库隔离的记忆银行。
把 cipher 记忆平台原生带进 DSH:四类记忆每轮沉淀、跨会话确定性检索经 systemPrompt.context 注入、洞察复核只进沉淀、会话级 UNNI/LOOP 模式(记忆驱动自动续轮)、记忆检索/写入两个工具,以及设置页(SOUL 编辑器)与 AgentPool 面板。
A DeepSeek Harness plugin package that brings cipher's core design — persistent thinking, the three platforms (execution / insight / memory), four local memory types (attention, experience, preference, cognitive), and the UNNI/LOOP session modes — to DSH as a native bundle (no Rust process, no cipher binary required).
After installing and configuring a model in DSH, UNNI and LOOP become selectable in DSH's native agent-preset picker (next to Standard / PTC / Minimal). Conversations composed from one of these presets get the full cipher pipeline: every turn is sedimented into four memory types, recalled cross-session, and LOOP sessions self-continue after each sediment round.
standard preset + the cipher rows) into the user preset root — they show up in the native picker immediately, no restartsystemPrompt.context, re-recorded only when the snapshot changes)Cipher·UNNI / Cipher·LOOP toggle in the session header (cipher-preset sessions only); LOOP auto-continuation uses interval + run-count guards via Agent.followup, independent of DSH goal APIscipher_memory_search, cipher_memory_ingestdsh plugin --profile <name> add dsh-cipher
What you get after install:
~/.dsh/.agent-presets/) by copying your deployment's standard preset and appending the cipher rows. Re-synced automatically on plugin upgrade; removed on uninstall. A user-authored preset with the same id is never touched.cipher_memory_search, cipher_memory_ingest (only in cipher-preset sessions)agentPresets.copy('standard', ...) — the deployment's standard preset (or the default preset) is the composition source. Without it the plugin still runs (settings/pool), but the UNNI/LOOP presets cannot be materialized and no cipher rows activate.storageDomain is optional: when the composition mounts storage, memory persists to the deployment storages directory (cipher_memory domain). Without it, the plugin degrades to in-process memory (warned once, not durable across restarts).The bundle rows split into two planes (v0.1.2, "Design A" — cipher capabilities exist only inside the UNNI/LOOP presets):
| Plane | Row | Responsibility |
|---|---|---|
| host (bundle patch) | dsh-cipher/core | Private service ctx.cipher: four-type memory store, deterministic retrieval, quotas, session mode, settings namespaces |
| host | dsh-cipher | Dual-face panel row: host REST routes (config/settings/mode/subagents) + client settings page / pool panel / header toggle |
| host | dsh-cipher/presets | Materializes the UNNI/LOOP presets (copy standard → append cipher rows → metadata; idempotent, version-marked, self-healing) |
| preset (UNNI/LOOP) | dsh-cipher/memory | Sediment: session/event turn/end → evidence → 4 memory agents → store (deduplicated, per-session watermark) |
| preset | dsh-cipher/insight | Evidence review (three-question self-check) → output sedimented as [INSIGHT] experience |
| preset | dsh-cipher/prompt | Injection: SOUL+mode section (order 60, static snapshot) + four-type memory context (re-recorded only on snapshot change) |
| preset | dsh-cipher/mode | Mode pinning (presetMode row config, written as the session default at creation) + LOOP followup scheduling after sediment |
| preset | dsh-cipher/tools | cipher_memory_search / cipher_memory_ingest |
Preset rows are mounted once per preset (standing mount) and joined per session by scope, exactly like other DSH preset rows. Sessions composed from Standard/PTC/Minimal have no cipher rows at all.
Storage note: the memory domain is optional at runtime — storage faults (for example headless one-shot teardown windows) degrade to in-memory storage for the process instead of failing the turn.
presetMode); the header toggle overrides it for that session (stored in the modes table), and the settings default is the last fallback.cipher_memory domain; per process when no storage is mounted).Per DSH package convention:
context (cipher-memory): append-only growth — re-recorded only when the full snapshot changes (new sediment or compaction removal); zero re-record otherwise.cipher_memory_search/ingest are independent requests; they do not affect session request caching.pnpm install
pnpm build # tsc (host lib/) + tsdown (client/client.js, __ModuleLoader__ format)
pnpm test # vitest (retrieval, evidence boundaries, preset materialization)
pnpm preflight # publish artifact checks
@deepseek-ai/dsh-*) are declared as peers and resolved against the DSH install; only zod is a direct dependency.Installing a plugin runs third-party code with your own permissions — review the source before installing. This package runs no post-install scripts beyond building its own artifacts (prepare).
MIT