hong1413/dsh-memory ↗★ 1

dsh-memory

Long-term experience memory for any LLM inside DeepSeek Harness: 5 model tools plus an interactive 3D star map.

패키지
dsh-memory
호환성
미검증
Harness peer 범위
>=0.2.1-rc.5
버전
1.2.1
라이선스
MIT
최근 업데이트
2026. 11. 7.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hong1413/dsh-memory

dsh-memory

License: MIT Platform Python DSH

Long-term experience memory for any LLM running inside DeepSeek Harness.

Your model forgets everything when the chat window scrolls away. dsh-memory gives it a local, provider-agnostic memory store: it can search past experience before starting a task, save lessons the user confirms, report how a lesson worked out, and see the whole library as an interactive 3D star map.

No cloud, no vendor lock-in, no model-specific skill format — just five tools plus one settings page.

3D star map

Features

🔎 memory_searchCross-session retrieval with relevance, confidence, maturity, premise/counter, conflicts, provenance, staleness
📄 memory_getFull text and metadata for one entry
📊 memory_statusCounts, archive, pending proposals, maturity distribution, data location
💾 memory_saveStore a lesson — summary, detail, tags, premise, counter, score, case type, pin, source reference
🔁 memory_feedbackgood / bad / neutral outcome, advances maturity (draft → active → trusted, bad → flipped)
🌌 3D star mapZones = nebulae, subzones = clusters, units = stars; orbit camera, click-to-focus, pending proposals fall as clickable meteors

Design rules baked in:

  • Human in the loop. Writes ask for approval through the Harness approval service and fail closed when it is unavailable.
  • Nothing is silently overwritten. Conflicting lessons are kept and returned as a pair.
  • Everything is auditable. Each entry has a version, a provenance field, and a maturity state driven only by explicit feedback.

Requirements

  • DeepSeek Harness with plugin support (plugin_manager), desktop or CLI profile
  • Python 3.8+ available as python (Windows) / python3 (macOS, Linux), or point pythonExe at an interpreter
  • No npm dependencies. The client half is plain JavaScript and plain Canvas; there is no build step.

Install

1. Get the code

git clone https://github.com/hong1413/dsh-memory.git

Or download the repository ZIP and extract it — the folder itself is the plugin package.

2. Install into your DSH profile

Ask the agent (or the Plugins page) to install the bundle by directory:

plugin_manager: install_bundle  target = 

That is the whole installation: the manager links the package, applies cordis.patch.yml, and the five tools appear in the model's tool list.

Client half needs one restart. The 3D star map lives in the Web UI. After the first install, quit and reopen DeepSeek Harness once; later edits to client.js only need a page refresh.

3. Configure (optional)

Configuration is a plain object on the plugin row. Every field has a working default, so an empty config is valid:

- insert:
    - id: dsh-memory
      name: 'dsh-memory'
      config:
        dataDir: 'C:\Users\you\AppData\Local\doubao-memory\data'
        # pythonExe: 'python'
        # timeoutMs: 30000
        # maxResults: 6
        # allowWrites: true
        # requireApproval: true
        # allowUiWrites: true
        # promptHint: true
FieldDefaultMeaning
dataDir%LOCALAPPDATA%\doubao-memory\data (~/.local/share elsewhere)Where the JSON memory store lives
scriptPathbundled memory_onefile.pyPoint at your own copy of the engine
pythonExepython / python3Interpreter to run the engine
maxResults6Default result cap for memory_search
timeoutMs30000Per-command timeout
allowWritestrueSet false for a read-only deployment
requireApprovaltrueAsk the user before writes
allowUiWritestrueEnable the Approve/Reject buttons on the star map
promptHinttrueInject a short behavioural hint into the system prompt

Use it

Ask the model in plain language:

Did I write down anything about pricing used cameras?   → it calls memory_search first
Remember this: always check the shutter count before buying a used camera.
How did that advice work out? It saved me.              → memory_feedback good

Or drive the same engine from a terminal (no Harness needed):

python memory_onefile.py remember "Used cameras: check shutter count first" \
  --premise "in-person inspection" --counter "online listings without a hands-on test" \
  --score 0.85 --case-type success --tags camera,used

python memory_onefile.py search "used camera inspection" --json
python memory_onefile.py status
python memory_onefile.py selftest      # 16 built-in assertions

The CLI has its own command reference: python memory_onefile.py --help.

The 3D star map

Settings → Memory star map:

  • Zones render as nebulae, subzones as star clusters, each unit as a star whose size and brightness track confidence and heat, and whose colour encodes maturity (blue = draft, green = active, gold = trusted, red = flipped).
  • Pinned entries carry a white ring; conflicts are joined by red dashed lines; archived (cold-storage) entries appear in a dim region of their own.
  • Interactions: drag to orbit, scroll to zoom, double-click to reset, toggle auto-rotation, hover for a summary, click a star to fly the camera to it, and click a falling meteor to approve or reject a pending proposal.
  • Camera distance is derived from the scene's bounding sphere, so any data volume stays framed.
  • Empty stores show a friendly hint instead of an empty void.

Empty state

Read-only data route

The page renders from one same-origin endpoint, served by the Host half:

GET /dsh-memory/starmap.json
→ { ok, generatedAt, dataDir, zones[], subzones[], units[], cold[], mirrors[], proposals[], stats{} }

Proposal actions (the only write route)

The Approve/Reject buttons post here; it is the human click that authorises the write:

POST /dsh-memory/proposals   { "id": "p_xxxxxxxxxxxx", "action": "approve" | "reject" }
→ { ok: true, message: "..." }

Only pending proposals are accepted; approve runs approve --execute, reject runs reject -r "界面驳回". Disable the route entirely with allowUiWrites: false.

Data model

One JSON file per unit under main_library/units/, version snapshots under forget_layer1/snapshots/, archived units under forget_layer2/cold_units/, proposals under proposals/. The layout is stable and human-readable; you can back it up, diff it, or migrate it with plain tools.

A unit carries: summary, content, tags, premise, counter, score, case_type, pinned, source_ref, maturity, version, conflict_ids, active_score, access_unseal_count.

Security notes

  • Both HTTP routes bind to the Harness Web server on 127.0.0.1 only. There is no additional auth — the trade-off of a single-user local tool. Set allowUiWrites: false if that matters to you.
  • Writes from the model go through the approval service; without it (or without a session context) they fail closed rather than writing silently.
  • The plugin never edits the session log, never registers custom session events, and stores nothing outside dataDir.

FAQ

The star map page is missing after install. The client half is loaded from the app bundle at startup — restart DeepSeek Harness once.

Where is my memory stored? Run memory_status, or read dataDir from the "status" output. Point several installations at the same dataDir to share one store.

Can I use it without DeepSeek Harness? Yes. memory_onefile.py is a complete standalone CLI with 30+ subcommands.

How do I reset everything? Stop using it, delete dataDir, restart. Nothing is written elsewhere.

Contributing

Issues and pull requests are welcome. The engine has a self-test (python memory_onefile.py selftest, 16 assertions) and a regression script is included upstream for the retrieval and lifecycle rules.

License

MIT © 2026 dsh-memory contributors