DSH Plugin Overview: dsh-plugin-fact-vault (Cross-Session Fact Sticky Note Library)

Preface

In the agent development scenarios of DeepSeek Harness (DSH), the context window is a core constraint. Traditional Transcript plugins record “what happened,” but often lack persistent storage for “what the conclusion is,” leading to the need for repeated explanations of established decisions or standards in subsequent sessions. dsh-plugin-fact-vault aims to solve this problem by providing a cross-session fact vault.

Plugin Introduction

This is an MIT-licensed plugin maintained by 121212165. Its core value lies in separating “decisions” from “processes”: users or models can record tagged decisions via tools and recall them on demand in any subsequent session. Compared to plugins like Pinboard that unconditionally inject into system prompts, this plugin adopts an on-demand recall mechanism, which does not consume the system prompt budget.

Core Features

The plugin provides the following core capabilities:

  • Record Decisions: Record tagged decisions via the /fact save command.
  • Keyword Recall: Search by keywords via the /fact find command or the fact_find tool.
  • List View: View recently recorded items via /fact list.
  • Delete Function: Delete specified records via /fact rm.
  • Model Tool: The fact_find tool allows the model to automatically call it when answering questions about “what was said/decided before.”
  • Fault Tolerance: Skip corrupted lines when reading data, and never rewrite corrupted lines in the source file.

Installation and Activation

The installation process involves installing the plugin package to a specified Profile and merging the configuration file.

  1. Install the plugin package:
    dsh plugin --profile web add github:121212165/dsh-plugin-fact-vault
This command will automatically run the build via `pnpm`.
  1. Merge the configuration file:
    Open $DSH_HOME/profiles/web/cordis.patch.yml. Merge the content of cordis.patch.yml located in the root directory of the plugin repository into this file.

    • Note: Do not simply append. Appending will result in two YAML documents, causing an error at startup: failed to parse overlay ... end of the stream or a document separator is expected.
  2. Restart DSH:
    Both the configuration layer and the client need to be restarted to take effect (the client distributes content calculated at startup; a hard refresh of the browser will not work).

Basic Usage

1. Record Decisions

Use /fact save to record a decision, which supports adding tags. Tags start with #, and multiple tags are allowed.

/fact save The budget limit here is 500 #budget #money

2. Search Decisions

Use /fact find to search records. The system tokenizes keywords by spaces and sorts them by weight:
* Tag hit: 3 points.
* Body hit: 1 point.
* Same scores are sorted in reverse chronological order (new records first).

/fact find budget

3. View List

View the most recent 20 records.

/fact list

4. Delete Record

Delete a specified record using its ID.

/fact rm 3

5. Model Invocation

When answering questions, the model can call the fact_find tool to automatically search historical decisions. For example, when asked “What was the standard set last week?”, the model will automatically call this tool to get the answer.

Configuration and Data Structure

  • Default Library Path: ~/.dsh/fact-vault/facts.jsonl
  • Data Format: JSONL, each line contains {v:1, id, text, tags, at}.
  • ID Rules: The ID is a self-incrementing numeric string (max(existing id)+1), not a hash, to facilitate manual deletion.
  • Configuration Items:
    • enabled: Whether to enable it, default true.
    • libraryPath: Path to the library file.
    • limit: Maximum number of items returned by find and fact_find, default 10.

Notes

  • Write and Read Logic: Writing is the plugin’s own logic; reading is fault-tolerant (bad lines are skipped and counted), but corrupted lines in the source file are never rewritten.
  • Web UI Experience: The manual input experience of the /fact command in the web UI has not been verified (Headless sessions have no input channel).
  • Environment Requirements: Node.js version must be >= 22.18.

Use Cases

This plugin is suitable for answering questions like “What was the standard I set in this harness last week?”, transforming temporary conversation conclusions into a searchable knowledge base.

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

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

Xiaoye