Introduction

The philosophy of DSH is “everything is a plugin”; plugins can be added to a specified profile to extend agent behavior. The DSH community directory is an independent site and does not constitute an official subordinate relationship with DeepSeek or Huaan. For users who need to retain information across sessions, information after the end of a single session will not automatically enter subsequent sessions.

@asherliner/dsh-memory-connect is a cross-session memory plugin for DSH, covering capabilities such as auto-extraction, semantic recall, scheduled maintenance, and LLM-powered consolidation. The plugin’s package.json version is 0.6.1, license is MIT, and Node.js requirement is >=18.

What is This

@asherliner/dsh-memory-connect provides cross-session memory and global identity capabilities. The listed capabilities include:

  • Global Soul
  • Auto Extraction
  • Cross-Session Recall
  • Context Explosion Prevention
  • Scheduled Maintenance
  • LLM Consolidation
  • Memory Decay
  • Smart Prioritization
  • Memory Compression
  • Temporal Context Graph
  • Trust Model
  • Turn-End Summarization
  • Semantic Recall
  • Zero-config
  • SQLite FTS5

Repository URL:

https://github.com/Asher-2000/dsh-memory-connect

Core Features

  • Global Soul: Provides persistent global identity via ~/.dsh/soul.md.
  • Auto Extraction: Extracts information from sessions.
  • Cross-Session Recall: Recalls memories across sessions, and lists SQLite FTS5 capabilities.
  • Context Explosion Prevention: Controls memory context inflation.
  • Scheduled Maintenance: Provides scheduled maintenance.
  • LLM Consolidation: Provides LLM-powered consolidation.
  • Memory Decay, Smart Prioritization, Memory Compression: Used for memory decay, priority processing, and compression, respectively.
  • Temporal Context Graph: One of the listed memory capabilities.
  • Trust Model: Recalled history is injected as untrusted references; current instruction always wins.
  • Turn-End Summarization: Lists the turn-end summary capability.
  • Semantic Recall: Optional semantic recall; degrades to keyword-only recall if the local embedding server is unavailable.

Installation and Usage

First, install it to a DSH profile:

dsh plugin --profile <your_profile> add @asherliner/dsh-memory-connect

This command adds @asherliner/dsh-memory-connect to the specified profile.

You can also install it directly via npm:

npm install @asherliner/dsh-memory-connect

If using local source code for debugging, clone the repository first, then add it to the profile using the link: method:

git clone https://github.com/Asher-2000/dsh-memory-connect.git
cd dsh-memory-connect
dsh plugin --profile <your_profile> add link:/path/to/dsh-memory-connect

In the DSH composition, path is a required configuration item. It can be written as:

config:
  path: ~/.dsh/memory.db
  enableSoul: true

Here, the SQLite database path is configured, and Soul injection is enabled.

The plugin will inject systemPrompt, so the profile loading this plugin requires the systemPrompt service to be available.

Typical Usage

Create Global Identity

Create ~/.dsh/soul.md to provide persistent global identity:

~/.dsh/soul.md

If Soul is enabled in the plugin configuration, it can be set in the DSH composition:

enableSoul: true

Query Memory

Example of the API exposed by the plugin:

ctx.crossSessionMemory.searchMemories({
  query: 'TypeScript configuration',
  types: ['fact', 'decision'],
  limit: 5
})

This call recalls memories based on the query term and memory type, and limits the returned count.

Optional Semantic Recall

Semantic recall is an optional capability. First, start the local embedding server:

pip install sentence-transformers
python3 node_modules/@asherliner/dsh-memory-connect/scripts/embed_server.py --port 8765

These two commands are used to install Python model dependencies and start the embedding server on port 8765.

Then, enable semantic recall:

embeddingEnabled: true

If the embedding server is unreachable, the plugin will degrade to keyword-only recall.

Applicable Scenarios and Notes

Suitable for scenarios requiring DSH agent cross-session memory, global identity, scheduled maintenance, LLM consolidation, or optional semantic recall.

Notes before use:

  • The plugin runs with the current dsh process permissions; check the source code and license before installing.
  • Node.js requirement is >=18.
  • path is required in the plugin configuration.
  • The plugin will inject systemPrompt; the profile needs the systemPrompt service available.
  • Semantic recall is optional and requires a local embedding server.
  • Recalled history is injected in the form of untrusted references; current instruction always wins.
  • PeerDependencies include @deepseek-ai/cordis ^4.0.1 and several @deepseek-ai/dsh-* rc packages; @deepseek-ai/dsh-session-query and @deepseek-ai/dsh-scope are optional.

Conclusion

After the above installation, configuration, and usage, @asherliner/dsh-memory-connect can connect auto-extraction, cross-session recall, scheduled maintenance, LLM consolidation, and optional semantic recall to DSH.

Repository URL:

https://github.com/Asher-2000/dsh-memory-connect