Introduction

The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” dsh-data-mode is a plugin built on top of this foundation. It adds a new conversation type called “Data Mode” to DSH. This type is focused on read-only analysis scenarios: you can connect to databases or upload files, ask questions using natural language, stay within the chat interface, and avoid granting the model write permissions to the database.

Core Features

This plugin mainly addresses context and permission isolation issues when performing data queries in a DSH environment.

  1. Data source connection and preview

    • Supports connecting to PostgreSQL, MySQL, SQLite, or uploading CSV/XLSX files.
    • Provides table preview, allowing you to view table schemas and sample data before asking questions.
    • Supports managing business knowledge by data source (indicator definitions, aliases, formulas).
  2. Natural language and read-only SQL

    • Initiate queries using natural language; the plugin converts instructions into read-only SQL.
    • The available read-only SQL tools include: SELECT, WITH, EXPLAIN, SHOW, DESCRIBE, PRAGMA.
    • SQL execution restrictions: a single query can have a maximum LIMIT of 5000 (default 200), and operations must be read-only.
  3. Business knowledge base

    • Each data source can bind independent knowledge entries (Key-Value).
    • Supports management by data source, making it easier to keep definitions consistent (for example, defining GMV).
    • The knowledge base uses a BM25 recall mechanism to automatically match relevant entries based on question content and inject them into the system prompt.
  4. Environment isolation

    • After installation, built-in presets such as Standard, PTC, Minimal, and Creative remain unaffected, and SQL tools will not appear in these conversations.
    • The new dsh-data preset is dedicated to Data Mode.

Installation and Enabling

This plugin depends on the DSH Web environment and the Node.js environment.

  1. Environment requirements

    • DSH Web (dsh web) environment.
    • Node.js version >= 22.19.0 or >= 24.
  2. Installation command
    Use the official installation command to register the plugin:

    dsh plugin --profile web add github:tieveto666-code/dsh-data-mode
  1. Enabling
    • After installation, you must restart dsh web.
    • Open a new conversation and select Data Mode from the conversation type selector.

Typical Usage

  1. In a Data Mode conversation, click the “Data source” button to register a data source (database or file).
  2. After selecting a specific data source, the system loads its schema and knowledge base.
  3. Enter natural language questions in the conversation. For example:
    • “What were last month’s orders by category?”
    • “Which SKUs are low on stock?”
    • “Use our definition of GMV, not a guess.”
  4. If the source has defined business metrics (such as GMV), the answer will prioritize using that definition instead of making a model guess.

Notes

  • Permissions and security: Passwords are stored in $DSH_HOME/data-mode/secrets.yaml; ensure file permissions are secure. SQL must be read-only; otherwise it will be rejected.
  • Knowledge base limits: Each source is limited to 200 knowledge entries, keys must not exceed 100 characters, and values must not exceed 1000 characters.
  • Optional DuckDB dependency: The plugin relies on DuckDB for high-performance queries. If it is not installed, SQLite and pure XLSX files can still be read through the Node.js fallback. If build hangs occur, set allowBuilds.duckdb in the pnpm configuration.
  • Uninstall: To remove the plugin, run:
    dsh plugin --profile web remove dsh-data-mode

Ecosystem Context

This plugin is maintained by community developers and follows the MIT license. The DSH ecosystem emphasizes modularity; this plugin extends data analysis capabilities by introducing an independent conversation type and preset without disrupting existing features.