@dsh-external/dsh-memory
Codex-like persistent memory for DeepSeek Harness: auto-injected memory summary, raw memory tools, and per-session rollout summaries distilled into a bounded global memory file. 适合需要跨会话持久化记忆、自动注入记忆摘要及版本回滚功能的深度用户。
同名パッケージの別リポジトリ
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:haitang1/dsh-memoryドキュメント
README 全文を読む ↗Configuration
| Key | Default | Description |
|---|---|---|
memoryDir | $DSH_HOME/memories | Memory directory (empty = default). |
maxBytes | 16000 | Byte budget of the injected summary (and of the summary file itself). |
injectTokens | 0 | Estimated-token cap for the injected summary; 0 leaves the byte budget in charge. CJK text counts about one token per character, Latin about a quarter. |
consolidateMaxBytes | 40000 | Byte budget of the consolidation input sent to the merge model. |
keepSummaryVersions | 20 | Previous summary versions retained for memory_rollback (0 disables history). |
rawArchiveMaxBytes | 200000 | Active raw file byte budget; oldest entries move to archive/ beyond it. |
autoSummarize | true | Distill finished turns into rollout summaries. |
summarizeProvider / summarizeModel | selected agent model | Model used for summarization. |
summarizeDebounceMs | 300000 | Minimum interval between summarizations of the same session (0 disables the debounce). |
consolidateEvery | 3 | Rollout summaries written before re-consolidating the global summary. |
summaryMaxTokens | 1500 | Max output tokens for turn summarization. |
consolidateMaxTokens | 8192 | Max output tokens for summary consolidation. Values below the floor a maxBytes-sized summary needs are lifted at runtime and reported in memory_stats.configAlerts. |
llmRetries | 1 | Retries after a transient LLM failure. |
maxActiveSummaries | 4 | Maximum concurrent turn summarizations before new jobs are dropped. |
scopedMemory | false | Enable per-workspace memory scopes. |
captureSubagents | true | Keep a bounded excerpt (2000 chars) of each settled subagent's final answer as a rollout block. Capturing costs one file append — the periodic consolidation distills it, so no extra LLM call is made. |
redactSecrets | true | Redact credential-looking text from injected summaries. |
readOnlyScopes | [] | Scope keys whose write tools are blocked (global, exact ws-*/project-* keys, or * for all). |
embeddingBaseURL / embeddingApiKey / embeddingModel | empty | OpenAI-compatible /embeddings endpoint for vector:true; empty uses local hashed vectors. |
scopeMaxBytes | 2400 | Injected byte budget for the workspace summary when scopedMemory is enabled. |
seedFromAgentsMd | true | Seed the first summary from $DSH_HOME/AGENTS.md. |
The Web settings form (see below) edits every config field live; keys are likewise overridable through the loader row or the memory: section of settings.yaml. Settings resolve as schema defaults → composition base → user layer, and the user layer wins, so the form persists only the fields you changed and a field saved back at its default drops its user-layer entry instead of pinning the default. See Upgrade notes.