whale-persona: Persona Engine and Long-Term Memory Plugin

Introduction

When using DeepSeek Harness (DSH), you may frequently encounter cases where the AI forgets its established persona, requires reconfirmation of its stance and working contract in every conversation, or repeatedly asks whether to continue. whale-persona turns this repeatedly stated content into a configurable file that is automatically loaded with each session.

It ships blank and does not change any AI behavior by default; only the content you need is written into the configuration. Unlike other approaches, its long-term memory mechanism is enforced by code: the AI can only propose, and it takes effect only after manual confirmation.

Basic Information

  • Plugin name: whale-persona
  • Maintainer: shenA2024
  • Category: Memory
  • Open-source license: MIT
  • Core positioning: Persona engine / DeepSeek Harness plugin

Core Features

The plugin manages AI behavior and state through configuration files. Its main capabilities include:

  1. Self-reference and address: Supports specifying self-reference and how to address the user by specific model tiers.
  2. Stance and personality: Defines the AI’s basic stance and personality content.
  3. Appearance and tone:
    • Appearance: Disabled by default; can inject identity and appearance descriptions.
    • Appearance cards: Supports cards for the AI itself, the user, and third parties (summary injected into the prompt; full text kept in configuration).
    • Tone: Disabled by default; only adjusts wording and pacing, without changing conclusions or evidence standards.
  4. Working contract: Supports individually checkable contract items; setting on: false disables the item.
  5. Chain-of-thought language: Only modifies the language of the thinking process, without affecting the language of the final response.
  6. Long-term memory: Uses a “propose–confirm” model; memory is stored only after manual confirmation.
  7. Category routing: Supports routing memory entries by kind to different files.
  8. Injection size measurement: Measures character counts for each segment of the prompt; visible in the panel and CLI.
  9. Reflex: Supports user-defined rules; when triggered, instructions are injected at the code level (default zero rules).
  10. Zero behavior change: All configuration is empty by default, ensuring that installing the plugin does not alter existing behavior.

Installation and Activation

Before installation, make sure the environment meets the requirements: Node.js >= 20, DeepSeek Harness >= 0.1.6-alpha.1.

  1. Run the installation command:
    npx -y whale-persona
After installation, DSH must be restarted.
  1. After restarting, the plugin defaults to a blank configuration. In the settings panel, create or edit config.json and fill in the desired self-reference, stance, contract, and other content.

Typical Usage

After installation, you can use scripts to preview the actual injection effect of the current configuration or manage preset personas.

  1. Preview injection content:
    node scripts/render-preview.mjs --config examples/demo-config. --cwd D:/work/demo
This command prints the three text segments actually injected into the prompt.
  1. Manage presets:
    node scripts/presets.mjs list
    node scripts/presets.mjs import starter-plus.
    node scripts/presets.mjs apply starter-plus

Notes

  • Pure ESM: The plugin uses pure ESM modules and has no runtime dependencies.
  • Zero network access: The plugin does not connect to the network, does not execute commands, and does not read the working directory; it is secure and controllable.
  • Memory confirmation: Long-term memory activation must be manually confirmed; enforcement is performed at the code level rather than relying solely on prompt constraints.
  • ZCode adapter: Development of the ZCode adapter has been discontinued.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye