枫叶155 downloadsMath-focused, experimental DeepSeek Harness memory agent in the right sidebar: automatic dsh service management, layered long-term memory, note workflow, and proactive idea-memo reminders.
A long-term math-memory agent for DeepSeek Harness that lives inside Obsidian as a right-sidebar chat panel.
A two-component repository:
dsh-math-assistant, repo-root manifest.json + main.js): embeds dsh web in the right sidebar, detects and starts the dsh service, bootstraps the dsh-side configuration and vault templates on first run, and hosts the memory panel, capture-policy settings, and deterministic maintenance.dsh-math-memory, dsh/): installs the same notes-assistant agent preset / profile and vault templates into $DSH_HOME.The three install paths (native bundle / --direct offline copy / Obsidian's embedded bootstrap) produce equivalent configuration, kept conflict-free by owner markers. Installing the Obsidian plugin alone is enough; the CLI dsh-math-memory install (and uninstall) covers headless use.
Mathematics learning is long-horizon accumulation: notation habits, theoretical preferences, half-finished proofs, techniques, counterexamples, and ideas all need continuous collection and polishing into a connected system. Generic chat AI treats every conversation as isolated Q&A. This plugin gives the agent cross-session layered memory (five layers + a notation ledger + memo lifecycle), unified retrieval (notes + memory in one search), and a standing protocol (AGENTS.md) so each new session starts where the last one ended.
Being explicit about the boundary matters more than listing features:
note_recall) in one pass, on-demand layer injection instead of dumping everything into context, plus a daily audit and a user feedback loop for deterministic upkeep. The cross-session remember / find / correct line works end to end.note_recall unified search: one BM25-ranked pass over user notes AND all memory layers (hook-weighted cards, memos, topics, theorem/episode indexes); unicode-dash normalization and CJK char containment bridge word-form gaps; hits carry a coverage indicator (query-token coverage; <0.35 marks a lexical-coincidence weak signal).note_search (user-note tag filter), note_links (backlinks / link-following), note_create (refuses to overwrite).hook: blocks and verification levels ✅⚖️❓) / episodes (raw evidence, append-only) / inbox (idea memos, inbox→polishing→done).memory/notation.md with adopted/candidates/rejected tables and a revision history — collect → unify → maintain; the agent proposes unifications when your notation drifts (observes first when you have no stable habit yet).uses/success_rate.idea/fact/preference/structure × auto/ask/off — one gate per memory layer (ideas → inbox, facts → records, preferences → profile/notation, structure → topics/theorem index/templates/strategy). Pick them in the plugin settings or by clicking the 「捕获策略」 line in either memory panel (both write back to capture-policy.md); auto-tier writes are announced in the closing line, ask-tier proposals state what/why/where.✅ confirm / ❌ wrong / stale / archive (archive asks twice) with a plain-language receipt; an episode timeline with human titles + topics (8 rows, expandable); a Chinese audit summary with the model-facing checklist folded away; edit-and-save in the panel (mtime conflict guard).依据的记忆:<card title> — [✅ 这条对] [❌ 这张卡有错] links in replies deterministically rewrite cards through the loopback /feedback endpoint (CSRF-token protected); note references are clickable and jump into Obsidian (/open).@linxin666 UI plugins mounted by default (independence): the profile bundles dsh-web-app for the embedded chat UI, but mounts none of the UI plugin family that the dsh-web-all aggregate brings in (skin center / task board / SSH / aionui panel / git-graph / pet / live-stats, etc.) by default — so it has no @linxin666 UI packages to resolve and boots cleanly with or without a web profile. The skin center (skin picker + background transparency) can be optionally re-enabled from the plugin settings; it requires a web profile to mirror the @linxin666 skin packages from. If that web profile carries the @linxin666/dsh-web-all aggregate (which has shipped its own skin-center row since 0.3.20), this toggle is functionally redundant — it still covers machines that have the skin packages but not the aggregate.note_recall / note_strategy / note_search / note_create / note_links) + ask_user; no shell, no web, no subagents, no delete tools. No @linxin666 UI plugins are mounted — the profile keeps the minimal agent tool surface.approval: never); DSH_PERMISSION_MODE=danger-full-access only re-enables escalation prompts, the sandbox itself stays workspace-write.@deepseek-ai/dsh, verified against 0.1.5-rc.1 — see docs/dsh-0.1.5-adaptation.md for the session-format-V3 adaptation); a configured DeepSeek model.dsh web on 3080; configurable in settings).A (recommended): install it from the community plugin browser — "Settings → Community plugins → Browse" and search DSH Math Notes Assistant — or download main.js / manifest.json / styles.css from the latest release into <vault>/.obsidian/plugins/dsh-math-assistant/. First run auto-detects dsh, initializes preset/profile/templates, and starts the service.
On the store: the listing is live at community.obsidian.md/plugins/dsh-math-assistant. Updates follow the store and the plugin manager once a release exists whose tag equals the
manifest.jsonversion; no manual file replacement is needed.docs/release.mdowns the release procedure.
B (CLI):
npm install -g dsh-math-memory
dsh-math-memory install --vault "<path-to-your-vault>"
dsh --profile notes-assistant --port 3180 # start (native: the bundle provides panel/workspace, no --patch needed)
Plugin settings: port, dsh install dir, DSH_HOME, auto-start, auto-init, auto-archive (>90-day episodes), ribbon button, keep-alive on close, the skin-center toggle (advanced; the aggregate bundle already carries a skin center), sidebar performance mode (default on: the loopback proxy drops the skin's expensive effects and slows the two hot loops in the skin's client hook script — the measured cause of the sidebar stutter), sidebar skin decorations (default on; turn it off to skip the skin's client script entirely — smoothest, at the cost of the hero scene / status character), and the capture-policy dropdowns. Measurements and the full cause list: docs/memory/sidebar-performance.md.
Full guide — installation model, conflict resolution (owner markers /
--forcetakeover), and uninstall (three-tier deletion,--purge-dataconfirm phrase) — indocs/installation.md.
vault/
AGENTS.md working protocol (auto-loaded)
.deepseek/
memory/profile.md semantic layer (profile)
memory/notation.md notation ledger (collect → unify → maintain)
memory/topics/ navigation layer
memory/records/ typed atomic cards (+ hook blocks)
memory/theorems/ personal theorem index (Matlas-style)
memory/templates/ problem-template ↔ theorem graph
memory/episodes/ raw evidence (append-only + archive/)
inbox/ idea memos
capture-policy.md capture policy (user-maintained)
cache/ machine-generated caches (do not edit)
npm test # syntax + 335 zero-token regression checks + 47 route-level checks + 8 real-dsh handshake checks + 32 loopback-proxy checks + installer e2e (drift detection)
npm run qa # engine probe: 12 ground-truth recall assertions + reachability layering / pooling A/B on the real vault (zero tokens)
npm run qa:e2e # real-session end-to-end acceptance (spends real tokens; reports API-level usage)
node scripts/build-obsidian.mjs # rebuild main.js (required after shared-file changes)
node scripts/deploy-local.mjs # one-shot local deployment
[email protected].buildRecallDoc / rankRecallDocuments / rankStrategyCards) instead of re-deriving it — seed probe 8/8 on the synthetic vault, engine probe 12/12 on the real vault (navigation indices are demoted, so the "library has no answer → weak signal" control holds). The engine probe additionally prints GraphMemix-style reachability layering (Direct / Recoverable / No access) and a signed net-recovery Δ for the bag-vs-multi-view A/B, plus target ranks — the measurement that kept multi-view max-pooling out of the default path (docs/memory/retrieval-v3.md §7.2). The real-session E2E suite covers 5 cases (including the no-answer honesty and reformulate-retry behaviors).Everything runs locally: the service binds 127.0.0.1, memory is markdown inside the vault, and the past-session index never leaves the machine.
MIT