Preface¶
When using dsh-memory-evolve for memory ingestion in DeepSeek Harness (DSH), review, five-track, and merge rules are usually already in place; the difficulty often lies after ingestion: entry count and volume gradually exceed budget, whether to organize relies on human memory, organization plans are generated improvisationally in sessions, and mistakes are hard to roll back. Below introduces the community plugin dsh-memory-steward: it does not replace upstream storage, but under the premise of read-only observation of memory files, completes the post-ingestion half through budget alerts, expiration nudges, pending approval queues, and execution with backup. Maintained by rezon-aki, categorized as workflow.
The README notes at the top: the author has moved to the documentation management route (dsh-doc-kit), and the memory plugin route is marked as abandoned; if you still run the memory-evolve stack, this article describes the current repository capabilities and installation methods, with facts based on GitHub documentation.
What This Is¶
dsh-memory-steward is the companion governance layer of dsh-memory-evolve: installing it alone has no practical meaning, as memory storage and the single-writer are always upstream; this plugin has zero code coupling, only depends on 4 upstream official routes (memory/delete|update|archive, memory-files) and 6 memory file paths, writes always call back to upstream official HTTP API, and does not directly modify memory files.
The closed loop is roughly: budget watchdog → organization expiration reminder → model generates plan → approve in the Web “Organization Approval” Tab → full backup before execution.
What Problems It Solves¶
| Phenomenon | Steward-side Behavior |
|---|---|
| Memory exceeds budget without anyone being told | Three-track entry count/bytes vs budget (fixed threshold, or set baseline then apply multiplier); only when exceeding budget inject one line into systemPrompt |
| “Should organize” relies on human thought | Exceeds budget or archive over-limit, and enough days since last organization with no pending items, the reminder provides suggestions for this round (light mode can do archiveCheck first then deep, saving tokens) |
| Organization plans dissipate with sessions | memory_propose enters the pending approval queue: Tab red dot, select/batch adopt/reject/restore pending |
| Hard to roll back mistakes | Backup 6 memory files before execution; failures can resume from breakpoint (already successful ops not replayed) |
| Queue and polling payload bloat | Queue only keeps pending + recent N resolved items; main content is in the queue and backups/; also has an append-only event log (~200 B/line, includes summary and failure reasons, no main content) |
The README provides actual test results with 13 historical entries on a local machine: proposals.json reduced from 147,788 B to 13,855 B; the Tab’s 15s polling list interface reduced from 138,849 B to 5,934 B.
Core Functions¶
Web “Organization Approval” Tab¶
After restarting dsh web, the session view adds an “Organization Approval” Tab; when there are pending items, the title shows a count hint. The Tab mainly includes:
- Inventory and Budget: three-track entry count/bytes vs budget, oldest entries, expiration status
- Pending Approval List: expand “View Details” to on-demand fetch complete ops (original memory → modified)
- History: retention policy, single deletion, clear history, clean event log (with confirm)
- Organization Overhead: recent N rounds approximate tokens (inventory input + proposal output), exceeding target marked red
- Configuration Area: auto check, inject reminders, light mode, organization interval, archive threshold, budget multiplier, audit retention, history retention, auto adopt, etc.
Three Agent Tools¶
| Tool | Purpose |
|---|---|
memory_audit |
Inventory/budget/candidate clusters/archive pre-screening/entry list; deep runs upstream scanner; archiveCheck does archive pre-screening; track:'all' fetches everything at once |
memory_propose |
Submit proposals (single or proposals array, batch ≤20): archive / remove / replace / purge; match uses unique substring, will re-parse during execution |
memory_sweep_status |
Expiration query (check) and timing reset (complete) |
HTTP API (Same webServer)¶
With Host/Origin fence. Common routes include: GET /api/status, GET /api/proposals (lightweight list) and GET /api/proposals/:id (complete ops), POST /api/proposals/{approve,reject,restore,purge}, POST /api/propose, POST /api/scan, POST /api/config, POST /api/baseline, GET /api/rounds, GET /api/selfcheck, POST /api/history/clear, etc. Details see repository README.
Security and Cost¶
- Execution lock: each proposal only runs once at a time, avoiding duplicate submissions.
- Proposal period validation:
replacenew content cannot be empty, cannot contain entry separator§. - One-click self-check:
node scripts/selfcheck.mjs(reports FAIL when upstream is missing, does not silently fail). - The plugin itself does not call LLM; organization overhead is generated by the session model, README provides normal round target ≤2K tokens (large refactoring may be 10K+), same as
/api/roundsand Tab “Organization Overhead”.
Installation and Activation¶
Prerequisites: first install the memory storage and single-writer plugin, then install the steward. Official commands are as follows:
# 1. First install the companion plugin (memory storage and single-writer)
dsh plugin --profile web add github:csyangwen/dsh-memory-evolve
# 2. Then install the steward
dsh plugin --profile web add github:rezon-aki/dsh-memory-steward
# After publishing to npm, you can also: dsh plugin --profile web add dsh-memory-steward
Restart dsh web to take effect; cordis.patch.yml is automatically registered by the bundle manifest, do not manually insert the same id again.
Runtime environment: package.json requires Node ≥ 20; the plugin declares DSH engine >=0.1.5-rc.1. Current package version is 0.1.1, license MIT (test badge: 33 passed).
Typical Usage¶
1. Let the model inventory first then propose¶
When reminders or manual organization are initiated, you can follow the light path suggested in the README:
- Call
memory_audit, if necessary doarchiveCheckthendeep, controlling input size. - For confirmed operations, call
memory_proposeto submit archive/remove/replace/purge. - Approve in the Tab; after adoption, the steward executes via upstream API and keeps backups.
2. Tab or API to modify configuration¶
Configuration is saved to <memoryDir>/steward/config.json (default ~/.dsh/memories/steward/config.json). Modify in the Tab; or use POST /api/config, POST /api/baseline to set budget baseline.
Common keys (default values see README):
| Key | Default | Description |
|---|---|---|
autoCheck |
true | 12h timer + end-of-round refresh inventory |
nudge |
true | Inject one line reminder when exceeding budget/expired |
lightMode |
true | Reminder prioritizes archiveCheck + deep |
sweepIntervalDays |
7 | How many days since last organization to remind again |
archiveMaxEntries |
30 | Archive track entry count threshold |
budgetRatio |
1.5 | When baseline exists: budget = max(fixed threshold, ⌈baseline × this value⌉) |
autoApprove |
off | off / deterministic / all |
baseline |
null | Budget baseline snapshot |
Pure manual mode: Tab one-click or set autoCheck:false + nudge:false, after that mainly rely on tools/API to refresh and generate proposals.
3. Companion patch: distinguish “facts” from “organization tickets”¶
Upstream has two places that may write organization intent as memory entries and occupy budget long-term. The repository provides patches/dsh-018-memory-facts-vs-tickets-patch.mjs, which only changes wording and is idempotent; after upgrading memory-evolve, you may need to re-patch. Human local execution example (requires existing steward source directory):
node patches/dsh-018-memory-facts-vs-tickets-patch.mjs # default web profile
node patches/dsh-018-memory-facts-vs-tickets-patch.mjs web-test # specify profile
Expected output “patched 2 files / 6 places” or “no patch needed (contract already in)”; restart dsh web after completion. The README also provides guidance for the agent to grep step by step, get the patch, and verify “not facts” wording.
Applicable Scenarios and Notes¶
Who it’s for: Already using dsh-memory-evolve in DSH Web profile, wanting someone to help watch budget, expiration organization, proposal approval, and rollback-able execution, and accepting the division of labor where “the model judges in session, the plugin only governs and calls back API”.
Must pay attention to:
- The plugin runs with current dsh process permissions; before installation, please check the source code and MIT license yourself, and understand its boundary of read-only local memory and write operations going through HTTP.
- Community directory skillhub.cn plugin page and GitHub are independent information sources, with no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem philosophy is “everything is a plugin”.
- The author’s README has declared the memory plugin route abandoned, moving to dsh-doc-kit; new projects can first evaluate the documentation route, then decide whether to invest in the memory-evolve + steward combination.
- The repository README states: prohibited to force patching without verifying upstream text; patch “no matching text” means upstream has changed sentences.
Conclusion¶
dsh-memory-steward connects what memory-evolve excels at (“ingestion”) with post-ingestion (“budget, reminders, approval, backup execution”), and maintains the single-writer and official API contract. For further understanding, visit the community directory page and GitHub repository:
- Directory page: https://www.skillhub.cn/plugins/rezon-aki/dsh-memory-steward
- GitHub: https://github.com/rezon-aki/dsh-memory-steward
Design details see repository docs/ARCHITECTURE.md, human-machine acceptance see TESTING.md.