Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing agent applications, the context window is limited, and important facts are often lost after a session ends. Existing memory solutions usually require deploying external servers, increasing operational costs. The dsh-native-memory plugin aims to provide a native, lightweight long-term memory solution that stores data in DSH’s own storage domain and achieves cross-session recall through session query full-text search (FTS).

Plugin Overview

This is a native, workspace-level long-term memory plugin designed for DeepSeek Harness. It stores facts and configurations in DSH’s dedicated storage domain (~/.dsh/storages/dsh_memory.), supports cross-session recall, and uses a human-approval mechanism to control write operations. The plugin does not depend on external servers and has no additional runtime dependencies beyond zod and DSH itself.

Core Features

  • Native storage: Data is stored directly in DSH’s own storage domain ~/.dsh/storages/dsh_memory., without requiring an additional database service.
  • Workspace isolation: Authorization is based on the exact current working directory (exact-cwd), and each workspace has its own isolated data space.
  • Approved writes: All write operations (add, edit, forget) require human approval and include session log auditing.
  • Cross-session retrieval: Full-text search is used to support cross-session recall of historical sessions.
  • Source traceability: Each fact records its source (sessionId, seq), ensuring data traceability.

Installation and Enablement

Install the plugin using the official plugin command:

dsh plugin --profile web add dsh-native-memory

After installation, restart dsh web. The plugin enables session query full-text search through the cordis.patch.yml patch and injects memory tools into each session. The main configuration items include:
* secretPolicy: Controls the secret rejection policy. The default is rejection, and it can be set to "mask" or "off".
* proposeOnSessionEnd: Whether to generate fact suggestions at the end of a session.
* compactionGuard: Compaction drift protection. It is enabled by default and used to validate data integrity.

Typical Usage

The plugin provides a set of tools for managing memory:

  • memory_remember: Add or update facts in the current workspace. By default, it rejects text with secret-like patterns (such as tokens or passwords).
  • memory_recall: Performs a deterministic three-level keyword scan (tags > text > fuzzy matching) and uses freshness/permission as tie-breaking conditions.
  • memory_search: Performs full-text search on historical sessions in the current workspace.
  • memory_import: Imports candidate facts from historical session logs (approval required).
  • memory_export: Generates a Git-friendly Markdown mirror file (located at .dsh-memory/memory.md). The content is masked against secrets and idempotent.
  • memory_profile: Reads the always-injected configuration file for the current workspace.

Use Cases and Considerations

  • Code execution risk: Installing the plugin means running third-party code on your local machine with the permissions of the current DSH process. Be sure to review the source code before installation.
  • Secret security: By default, both prompt injection and tool output mask secrets. The credential assignment detector flags benign token values that are at least 16 characters long. In the “Memory” option on the browser settings page, you can view the list of masked facts; deletion operations are converted into memory_forget instructions and sent to chat through the approval gate.
  • Dependencies: The plugin depends on zod and the DSH runtime, with no additional dependencies.

Summary

dsh-native-memory provides DSH users with a local-storage-based long-term memory solution that requires no external servers. It balances convenience and security through workspace isolation and approval mechanisms, making it suitable for scenarios that need to persistently store working context locally and prioritize data privacy.

Links