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 savecommand. - Keyword Recall: Search by keywords via the
/fact findcommand or thefact_findtool. - List View: View recently recorded items via
/fact list. - Delete Function: Delete specified records via
/fact rm. - Model Tool: The
fact_findtool 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.
- Install the plugin package:
dsh plugin --profile web add github:121212165/dsh-plugin-fact-vault
This command will automatically run the build via `pnpm`.
-
Merge the configuration file:
Open$DSH_HOME/profiles/web/cordis.patch.yml. Merge the content ofcordis.patch.ymllocated 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.
- Note: Do not simply append. Appending will result in two YAML documents, causing an error at startup:
-
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, defaulttrue.libraryPath: Path to the library file.limit: Maximum number of items returned byfindandfact_find, default10.
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
/factcommand 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.