DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-memory-loader

w

dsh-memory-loader

Manifest valid

DSH plugin: deterministic two-level memory injection (global + project MEMORY.md + today's notes) at session start

hasBundlePatch

dsh-memory-loader

dsh-plugin License: MIT

DeepSeek Harness(DSH)确定性记忆注入插件:每个新会话开始时,把两级记忆自动注入上下文——不依赖模型「自觉去 read」,对齐并超越 Claude Code auto-memory 的效果,且预算与层级可控。

English summary: a DSH plugin that deterministically injects your two-level memory (global ~/.dsh/memory/ + project <cwd>/memory/, each MEMORY.md plus today's YYYY-MM-DD.md) into every new agent session via the agent/pre-step seam, with an independent byte budget.

为什么需要它

DSH 原生只自动加载指令文件链(AGENTS.md / CLAUDE.md),不加载 memory/ 目录;指令文件里写的「会话开始先读记忆」依赖模型自觉,是概率性的。本插件把这一步变成 harness 级确定性注入。

注入内容与顺序(broad → specific)

  1. ~/.dsh/memory/MEMORY.md(全局长期)
  2. ~/.dsh/memory/YYYY-MM-DD.md(全局当日,若存在)
  3. <cwd>/memory/MEMORY.md(项目长期,若存在)
  4. <cwd>/memory/YYYY-MM-DD.md(项目当日,若存在)

cwd 取 agent.session.header.cwd,不硬编码任何项目路径。

安装

方式 A:plugin add(bundle 形态,推荐)

dsh plugin --profile web add https://github.com/wuruihi/dsh-memory-loader/archive/refs/heads/main.tar.gz

方式 B:单文件 file:// 挂载

把 dsh-memory-loader.mjs 放到 ~/.dsh/profiles/web/ 下(该目录能解析 @deepseek-ai/dsh-llm 裸包名),然后在 ~/.dsh/profiles/web/cordis.patch.yml 追加:

- insert:
    - id: dsh-memory-loader
      name: file:///<绝对路径>/~/.dsh/profiles/web/dsh-memory-loader.mjs
      config:
        maxBytes: 16384
        maxSourceBytes: 65536

patch 变更由 watchUserPatches 热应用,无需重启。

配置

键默认说明
maxBytes16384注入帧总预算(字节),独立于 AGENTS.md 链的 64KB
maxSourceBytes65536单文件读取上限,超限视为不存在

预算策略与官方 dsh-agent-instructions 一致:超限时先整文件丢弃最不特定者,最后截断最特定文件并附提示。

设计要点

  • 标记缺失则注入:一个规则覆盖新会话 / resume / 子代理 / fork 继承四种场景;帧内含固定标记,扫描会话历史去重,不会重复注入
  • 注入 seam 与官方 instructions 插件同源:agent/pre-step 包装下游 decision,createUserMessage(from @deepseek-ai/dsh-llm)构造 durable user 消息,紧跟用户首条 prompt
  • 安全:内容中字面 </system-reminder> 被转义,防止记忆内容逃逸帧;任何内部错误只降级为放弃注入,不影响会话
  • 只读不写:沉淀仍按你自己的记忆协议走,插件不碰写回

验证

node selfcheck.mjs

20 项自检覆盖:四文件加载顺序、预算整丢/截断策略、帧转义、日期文件名、有界读取、幂等标记。本机另有端到端验证记录(headless 会话哨兵注入 + 会话存储解压取证 + 回滚对照),见交付报告。

License

MIT

Comments

Loading…

From the same category

billion-context

by ranxianglei

基本稳定可用 100K tokens is enough. Universal context-compression proxy for ALL AI coding agents,10w上下文足矣

Sessions & MessagesManifest valid

★ 804

↓ 423.4k/wk

MIT

TypeScript

Oct 11, 2026

dsh plugin --profile web add billion-context

by Han-1413141

DeepSeek Harness session cost meter plugin: session/daily cost, budget, history, OpenCode Go quota, official & custom-provider balance, Codex-like token heatmap, peak/off-peak pricing with pre-switch

Sessions & MessagesManifest valid

★ 388

↓ 23k/wk

MIT

JavaScript

Oct 10, 2026

dsh plugin --profile web add dsh-cost-meter

by Nwflower

Import 14+ external agent chat histories (Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, ZCode, Grok Build, OpenClaw, Pi, Hermes, Kimi CLI, DSH) into DeepSeek Harness as resumable se

Sessions & MessagesManifest valid

★ 224

MIT

JavaScript

Oct 7, 2026

dsh plugin --profile web add dsh-chat-import

by Totoro-qaq

DeepSeek Harness plugin for previewable cross-preset session migration. Fixed-schema handoffs preserve state, source-model intent, and unresolved images; the original session stays untouched.

Sessions & MessagesManifest valid

★ 165

MIT

JavaScript

Oct 11, 2026

dsh plugin --profile web add dsh-plugin-bridge

by Anionex

deepseek harness对话和代码状态回退插件 | DSH — rewind conversation and workspace state, powered by a persistent Change Ledger

Sessions & MessagesManifest valid

★ 131

BSD-3-Clause

JavaScript

Oct 1, 2026

dsh plugin --profile web add @anionex/dsh-turn-rewind

by SiriLee

DSH 插件:真正便捷无感的同窗口内对话回退,从不新建分支;自带轻量工作区备份,可一并还原文件(完整 Claude Code /rewind 语义)。 · DSH plugin: genuinely effortless in-window conversation rewind — never forking a new session; ships a lightweight workspac

Sessions & MessagesManifest valid

★ 123

↓ 5.5k/wk

MIT

TypeScript

Oct 9, 2026

dsh plugin --profile web add dsh-rewind-plugin