dsh-mate-companion: Packaging Persisto Mate as a DeepSeek Harness Plugin

In the plugin-based ecosystem of DeepSeek Harness (DSH), agents often need to manage long-term memory, emotional state, and periodic behaviors (such as sleep). m-rui001/dsh-mate-companion packages the core logic of Persisto Mate into a DSH plugin, providing out-of-the-box memory, emotional simulation, and body clock features.

Plugin Positioning

The plugin is maintained by m-rui001 and released under the MIT license. It implements Persisto Mate—an AI companion with a body clock, realistic sleep, memory, and feelings—as a DSH plugin package.

Core Features

  • System prompt sections
    The plugin provides system prompt fragments, including cached identity/role/memory blocks and volatile state blocks (clock, mood, drives, session log, reply tendency). These states are re-rendered on each assembly.

  • The kernel
    It processes each incoming user message to advance emotional state. It integrates offline time, crosses sleep windows, and performs memory retrieval, rehearsal, and consolidation. It also crystallizes SPARK beliefs from recurring themes.

  • The affect judge
    After each user interaction, the model reports changes in each Plutchik emotion on a scale from -2 to +2 via the mate_feel tool. The report uses the same literature-anchored mathematics as pi companion (staircase equivalence, negative asymmetry), and is gated to ensure it reflects the new exchange rather than re-reading an old exchange.

  • A waking heartbeat
    The kernel delivers impulses it deems worth expressing as separate follow-up messages, wrapped in a <system-event type="mate-impulse"> envelope to prevent them from being mistaken for user speech.

  • Tools
    Three tools are provided:

    • mate_remember: persistent memory.
    • mate_ponder: private thinking.
    • mate_debug: full internal state.

Installation and Enablement

Before installing, make sure the Node version requirement is met (22.19+ or 24).

Install the plugin with the official command:

dsh plugin --profile <your-profile> add github:m-rui001/dsh-mate-companion

After installation, start the profile. State is stored under agent/mate/ in the Harness home directory ($DSH_HOME or ~/.dsh), separate from the state of pi-host companion, because different hosts imply different bodies.

Typical Usage

  • Start the profile: After installation, load the profile directly to run it.
  • Switch language: To switch the companion’s prompt language, edit the agent/mate/lang.json file and write:
    {"version":1,"lang":"zh"}
  • Rebuild: The source code is located in the packages/ directory. To modify or verify the build, run:
    bun install
    npm run build

Use Cases and Notes

  • Developer preview: DSH itself is in developer preview, and the plugin surface may change accordingly.
  • Self-report bias: The judge reads exchanges through the host model’s self-report (rather than a separate side-channel model), which introduces typical self-assessment bias. This design regards it as acceptable until a completion API aimed at Harness document plugins is available.
  • Feature limitations: There is currently no real-time sleep mode, dreams, or alarm tools. Offline sleep is fully simulated by the kernel’s catch-up simulation, and sleep-time suppression still applies.
  • Source synchronization: This repository is a published mirror of the monorepo. Changes should be submitted upstream to the monorepo, because the next release will overwrite the code here.

Summary

This plugin is suitable for developers who want to add persistent memory and emotional state management capabilities to agents in a DSH environment. For more information, see the directory page or the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye