DeepSeek Harness Plugin

lcthe/dsh-hermes-memory

Stars ★ 0 Downloads (30d) 1,461 Category Memory Added 2026-09-07 npm @lcthe/dsh-hermes-memory

Scoped persistent memory for DSH: memory_save/search/replace/remove/list across global, user, project and failure scopes, DSH storage-domain persistence with secret and prompt-injection scanning, session-scope search, retention cleanup, and optional session-start injection; standing context via memory_pin/memory_pins/memory_unpin.

Install

# from npm (prebuilt)

dsh plugin --profile web add @lcthe/dsh-hermes-memory

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:lcthe/dsh-hermes-memory

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

DSH-native persistent memory, session-aware retrieval, and safe learning for DeepSeek Harness.

Status

V5 background review, V6 standing context, and the V7 consolidation foundation are implemented locally. Standing profiles and instructions are explicitly saved, bounded, persisted in the DSH storage domain, and injected once at the start of each new session. V7 now has crash-safe plan state, replacement-before-retirement execution, structured model scheduling, and native settings. V8 now has storage-backed skills and a DSH-native provider; explicit skill tools and automatic learning remain in progress.

Product boundary

This is a new DSH plugin. It does not copy Pi runtime code, Pi commands, Pi TUI, Pi branding, Pi logos, Pi screenshots, or other Pi visual assets. It reuses only general engineering ideas such as scoped memories, provenance, full-text retrieval, correction tracking, and secret scanning.

V1 scope

  • Explicit memory_save, memory_search, memory_replace, and memory_remove tools.
  • Global, user, project, and failure memory scopes.
  • DSH storage-domain persistence with schema validation.
  • Pre-write secret and prompt-injection scanning.
  • Settings namespace and a small settings card for enablement, retrieval limits, capture policy, and retention.
  • Source provenance containing session ID and event sequence when a memory comes from a DSH session.
  • session_memory_search powered by DSH's native sessionQuery service.
  • Optional V3 session-start injection of bounded reference context, off by default.

V3 scope

  • Opt-in agent/session-start injection of one bounded form: 'recall' context message per agent lifecycle.
  • Authorized global, user, and current project memories only; failure memories are not injected automatically.
  • Deterministic scope/date/ID ordering, entry limits, total character limits, resume de-duplication, and fail-soft startup behavior.

V3.1 scope

  • memory_list lists bounded records by scope/category and the current workspace.
  • memory_stats reports counts and character usage per scope.
  • lastReferencedAt advances on search hits and successful startup injection, off-path and fail-soft.
  • List/stats and reference tracking never bypass the existing exact-match workspace authorization.

V4 scope (first slice)

  • Rule-based captures from real user/message events: corrections, project conventions, and preferences.
  • Captured records carry source: 'session' provenance with session ID and event sequence.
  • Idempotency via existing provenance fields and content deduplication; no new storage tables or domain version bump.
  • Per-session capture cap, category switches, and safety scanning before every write; default off.

V4.1 scope

  • Per-session tracking of lastToolCall/lastFailure and the previous user-message sequence.
  • Corrections paired with a failed tool call in the same exchange also save a failure/tool-quirk record naming the tool.
  • A failure context is consumed at most once; captureToolContext lets users disable pairing.

V4.2 scope

  • Expired memory cleanup using lastReferencedAt ?? updatedAt as the aging anchor.
  • Failure-scope records expire after failureRetentionDays; all others after retentionDays.
  • Hard delete with count-only logging; invalid timestamps are kept; retentionEnabled can disable cleanup.
  • Sweeps run at startup and are throttled to once per hour per process on session starts.

Deferred scope

  • Automatic prompt injection on every step.
  • Vector or embedding retrieval.
  • Custom session database access.
  • Replacement of DSH chat UI or session shell.
  • A separate memory management UI is not planned: ordinary memories use the existing memory tools, while standing context is managed with memory_pin, memory_pins, and memory_unpin.

Development

The V5 background review implementation and its safety constraints are documented here:

  • docs/superpowers/specs/2026-08-27-dsh-hermes-memory-v5-background-review-design.md
  • docs/superpowers/plans/2026-08-27-dsh-hermes-memory-v5-background-review.md

The implementation plan for earlier versions lives at:

  • docs/superpowers/specs/2026-08-27-dsh-hermes-memory-v3-session-start-injection-design.md
  • docs/superpowers/plans/2026-08-27-dsh-hermes-memory-v3-session-start-injection.md

The approved design is documented at:

  • docs/superpowers/specs/2026-08-26-dsh-hermes-memory-design.md

License

MIT. The implementation will contain original DSH-specific code and will not vendor Pi project assets.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.