dsh-malko-prefs: Preference Configuration and Enhancement Tools for DeepSeek Harness

DeepSeek Harness (DSH) uses a plugin-based architecture. The default configuration may not meet the needs of every scenario. dsh-malko-prefs is a personal preferences package that serves as a configurable companion to the official compaction engine, enriches llama.cpp metadata on the model page, and provides tab status indicators.

Plugin Overview

This is a plugin for DeepSeek Harness (DSH) that provides personal preferences, maintained by malko. It mainly addresses three specific issues: providing more flexible compaction control than the official engine, supplementing llama.cpp model metadata to improve the Models page, and providing session status feedback through tab colors and browser notifications.

Core Features

Compaction Engine Enhancements

The official @deepseek-ai/dsh-compaction-basic engine is the reference behavior. This plugin wraps it in a settings page, allowing you to adjust the following parameters:
* Threshold: Supports an absolute Token count (e.g. 130k) or a ratio relative to the context window (e.g. 0.8).
* Retention Policy: Configure the absolute Token count or ratio for retaining the most recent context.
* Summarization Configuration: Choose the summarization model (default uses the Session model or a custom model) and set the reasoning level.
* Behavior Control: Enable “turn-end compaction,” and fine-tune advanced options such as the summarization output limit and extra compaction attempts.
* Commands: Adds the /force-compact command to manually trigger compaction.

llama.cpp Model Enrichment

The plugin reads the rich model metadata exposed by the llama.cpp server (such as meta.n_ctx, architecture.input_modalities, and aliases) and fills it into the model entries in llm-pi-ai, automatically populating context window information and text/image input modality information.

Notifications and Tab Indicators

  • Tab status light: The browser tab icon color changes based on the session status:
    • Amber: The session is waiting for your action (question/approval).
    • Blue: The session is running.
    • Green: The main session has completed while you were away.
  • System notifications: Browser notification support, with independent toggles for different types (session completed, waiting), screen residence time settings, and sound effects.

Installation and Enablement

Install via the official DSH registry:

dsh plugin --profile web add dsh-malko-prefs

After installation, restart dsh web to apply the changes.

Typical Usage

  1. Manual compaction: Type /force-compact directly in the chat interface to force compaction.
  2. Import models: Go to the “llama.cpp models” tab in the plugin settings, click “Fetch from server” to read the server’s model list, select the models to import, and click “Import”.

Notes

  • Version requirement: Requires DSH version >= 0.1.7-rc.1.
  • Dependency: Requires an available llm-pi-ai provider (e.g. your llama.cpp server) to support model enrichment.
  • Preset overrides: The plugin restates all built-in agent presets (preset-cardis, preset-ptc, preset-standard), pointing their compaction backends to dsh-malko-prefs/compaction.
  • Generated files: Patch files (e.g. cordis.patch.yml) are generated automatically by scripts rather than handwritten, so the code logic may be more compact.
  • Risk notice: The plugin runs with the permissions of the current DSH process. Review the source code before use and be aware of potential security risks.

Summary

dsh-malko-prefs aims to provide DSH users with a more fine-grained control panel, especially for context compaction and model metadata management. It is open-sourced under the MIT license and is suitable for advanced users who want to deeply customize agent behavior and monitor session status.

Plugin directory | GitHub repository

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

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

Xiaoye