Introduction

DeepSeek Harness (DSH) provides a Web GUI environment for agent development and debugging. When handling data, developers often have to switch between the DSH interface and a database client, which interrupts their workflow. The dsh-database-manager plugin adds a “Database Management” entry to the DSH sidebar, providing unified data source configuration and an independent panel. It supports querying data, modifying schemas, running SQL, and browsing Redis key-value pairs in the same interface.

Core Features

Unified Data Source Management

The plugin provides a dedicated “Database Management” entry in the sidebar. The data source list supports searching (by name/host/tag), grouped display (by type/group/tag), and tag management. Each data source is configured independently and supports runtime connection testing (including connectivity, latency, and server version), as well as editing and deletion.

MySQL / SQLite Panel

After entering a database, the left side displays the database/table tree, and the right side provides six tabs:

  1. Browse: Supports pagination, jump-to-page, and sorting by column/index. Column comments are displayed below column names, while table comments are displayed to the right of the pagination row. Supports double-clicking a cell to edit it in place, row edit/copy/delete, and multi-selection batch deletion. The result set from an executed SQL query is also rendered on this tab.
  2. Structure: Supports adding/modifying/deleting columns, and managing indexes, primary keys, and unique constraints. Hovering over a column comment displays its full text.
  3. SQL: Supports database-level SQL execution (a full-page editor with no USE statement required). Supports running queries with Ctrl+Enter.
  4. Search: Query by example (QBE), with one row per column. Rows with provided values participate in AND condition matching.
  5. Insert: Generates controls based on column types, supports generating multiple rows and submitting them as a batch. Supports distinguishing between “left blank” (use DEFAULT), NULL, and empty string.
  6. Operations: Includes moving tables, table options, copying tables, table maintenance, and deleting data or tables.

Database-Level SQL: A database operations row is provided at the top of the table list page, including exporting the entire database, importing into the current database, renaming, copying the database, character set settings, deleting the database, and creating new tables. When there are multiple tables and databases, the list initially displays names, while row counts and sizes are populated afterward.

Redis Panel

The left side displays a directory tree (collapsed in levels by :, showing the number of keys under each directory). The top filter box supports matching key names within expanded levels. The right side includes:

  1. Value: Renders values by type and allows editing (supports string/list/set/hash/zset). Supports TTL management. Stream type is read-only.
  2. Service Information: Displays version, memory, connection count, and key counts for each database.
  3. Command Line: Supports executing arbitrary commands on the currently selected database.

Import/Export and Compatibility

  • Import/Export: Supports SQL dump (structure/data/DROP optional, whole database or single table) and CSV export. After export completes, the file name and size are displayed, and a “Re-export” button is provided.
  • Engine Compatibility: The MySQL panel retrieves data based on server capabilities without assuming the latest version (compatible with 5.5+). It detects whether the server supports the GENERATION_EXPRESSION field to adapt to different versions. The SQLite panel relies on Node’s built-in driver, with zero dependencies. Features not supported by the engine are disabled in the UI with the reason explained.

Large Database Usability

For Redis databases with keyspace scales of tens of millions, the plugin adopts a level-by-level loading and one-time indexing strategy for large databases:

  • Small databases (< 1 million keys): Scans level by level; a prefix is scanned only when its directory is expanded, simultaneously deriving subdirectories and exact key counts.
  • Large databases (≥ 1 million keys): Traverses once, builds the full tree, and caches it. Uses Lua scripts to collapse key names on the server side, reducing network transfer overhead. Indexing starts directly, with a real progress bar at the top and no pre-execution confirmation dialog.
  • Data Accuracy: The index is built through a complete traversal rather than sampling, ensuring no directories are missed. Directories and counts are accurate; if the limit is exceeded, an error is reported rather than silently discarding.

Installation and Enabling

The installation command is missing from the original source, which was truncated.

Typical Usage

In the same interface, query data, modify schemas, run SQL, and browse Redis key-value pairs.

  • MySQL / SQLite Panel: Includes six tabs: Browse, Structure, SQL, Search, Insert, and Operations. Database-level SQL is available in the operations row at the top of the table list page.
  • Redis Panel: Includes four functional areas: directory tree, value, service information, and command line.

Applicable Scenarios and Notes

  • Permissions and Security: The plugin runs with the permissions of the current DSH process. The provided agent tools are constrained by a write-protection gate; write operations require attention to the approval policy.
  • Engine Limitations: Dangerous operations on large tables (such as changing column types or deleting columns in SQLite) explain the cost before execution.
  • Compatibility: The MySQL panel is compatible with older versions, and the SQLite panel has zero dependencies.

Brief Conclusion

dsh-database-manager integrates SQLite, MySQL, and Redis management capabilities into the DSH Web interface through a sidebar panel and protected agent tools. It not only provides complete browsing, editing, and SQL execution capabilities, but also specifically optimizes compatibility with large databases and older versions of MySQL.

View plugin directory
Visit GitHub