The philosophy behind DSH is “everything is a plugin.” When developing with local large language models, models often make repeated mistakes (goldfish memory) or waste compute in infinite loops. dsh-host-rsi is a host-side plugin designed to address this pain point, enabling local models to accumulate experience during a session and automatically correct their behavior.
Plugin Positioning¶
This plugin belongs to the model inference category and is maintained by the developer pk14742952-AD. It is a pure host plugin that does not touch model weights. Its core value is to help local large language models become “stronger with use” within a session and prevent them from falling into infinite loops.
Core Capabilities¶
The plugin mainly provides the following capabilities:
- Self-evolution: Through an L1/L2/L3 signal staircase reliability-weighting mechanism, it hierarchically processes the model’s self-inspection conclusions, tool successes and failures, user corrections, and long-term preferences, distilling high-value experience.
- Convergence guidance: When detecting infinite loops, it automatically injects convergence prompts, preventing the model from repeatedly attempting already verified tasks and saving compute resources.
- Five-state delivery guardrails: It intercepts five types of delivery failure states (EMPTY, TRUNCATED, FIXED_POINT, SAME_PLAN, and SHELL_LOOP), ensuring outputs are complete and valid.
- Persistent memory: It uses in-memory cache reads plus background debounced writes to ensure the hot path is never blocked, while also providing crash self-recovery capabilities.
- Project-aware instruction deduplication: It groups by project/workspace to prevent the memory store from bloating due to duplicate instructions.
- Zero intrusion: Running as a host plugin, it does not interfere with the model’s inference process.
Installation and Activation¶
At present, the plugin does not provide a CLI installation command and must be installed via the GUI:
- In the DSH interface, go to Settings → Plugins.
- Install
dsh-host-rsi. - Restart DSH.
- Go to Settings → Plugins → DSH HOST RSI Memory → click Open Dashboard.
Typical Usage¶
After installation and activation, you can verify and use it in the following ways:
- View the dashboard: After restarting DSH, open the dashboard on the plugin settings page to view captures, injections, interceptions, and recent trigger events in real time.
- Run the standalone demo: In the project root directory, run the following command to start the standalone demo service:
node demo-serve.mjs
- Call the diagnostics API: Call
rsi_eventsto view trigger diagnostics.
Notes¶
- Compatibility: General-purpose mode, compatible with both API-based and local models, and tuned by default for local 27B/Flash models.
- Data source filtering: It captures only messages where
source.kind === 'user', preventing system prompts from polluting memory. - Fallback strategy: If the plugin directory is not writable, it automatically falls back to pure in-memory mode without affecting functionality.
- Performance optimization: It uses background debounced writes, ensuring that the hot path (pre-step / turn-end) is never blocked.
Conclusion¶
Through its signal staircase and delivery guardrail mechanisms, this plugin provides a memory layer and convergence layer for local models in DSH. For more detailed principles or the changelog, refer to its GitHub repository.