Introduction¶
When developing agents in DeepSeek Harness (DSH), you frequently need to inspect and manipulate databases. Using command-line tools or third-party clients requires constant context switching, which reduces efficiency. DSH’s plugin architecture allows extending functionality alongside the chat interface, but existing data browsing capabilities are limited, lacking type-aware editing and AI integration.
The DshDataCat plugin provides a database workspace in DSH’s sidebar, with a built-in AI Copilot, supporting four data source types: MySQL, PostgreSQL, Redis, and Elasticsearch. It integrates database browsing, SQL execution, and an AI assistant into a single interface, reducing switching overhead.
What It Is¶
DshDataCat is a DeepSeek Harness (DSH) plugin developed by maintainer Leeaoyin. It provides a database management interface for DSH Web and DeepSeek Harness Desktop (deepseek-harness-app). The plugin is designed in an AI Copilot style, allowing in-page browsing and editing of MySQL, PostgreSQL, Redis, and Elasticsearch data, running and formatting SQL, exporting DDL/data, and querying with AI assistant support.
The plugin establishes connections through the DSH Host; the browser invokes the Host API via DSH’s authenticated same-origin session. This means database connections are managed by the DSH Host, while the browser side is responsible solely for UI interaction.
Core Features¶
Connections & Browsing¶
- Supports adding MySQL, PostgreSQL, Redis, and Elasticsearch data sources. A connection URL, username, password, and optional default database name are required.
- The browsing path is instance → database → table. Clicking a database expands/collapses its tables; clicking a table header sorts by that column; clicking the funnel icon locates that column in the filter bar.
- Pagination supports 50, 100, or 200 rows per page.
- Filter tables by name; view column types and primary key information.
Database Management (MySQL / PostgreSQL)¶
- Create a database under a connection:
- MySQL: uses
utf8mb4encoding andutf8mb4_unicode_cicollation. - PostgreSQL: uses UTF8 encoding.
- When deleting the current database, the full phrase
confirm-delete-<database-name>must be typed into the confirmation dialog before execution. - The following system databases are protected across the UI, Host API, and SQL Playground and cannot be operated on:
- MySQL:
mysql,information_schema,performance_schema,sys, Alibaba Cloud RDS__recycle_bin__ - PostgreSQL:
postgres,template0,template1
Table Data Editing (MySQL / PostgreSQL)¶
- Click a column header to cycle through sort modes (ascending → descending → default).
- Double-click a cell to enter staged edit mode.
- The editor provides type-aware input fields based on field type:
- Numeric, boolean, MySQL ENUM, datetime, JSON/array, text.
- Nullable columns support explicitly setting
NULL. - The editor displays field type, primary key marker, and current instance/database/table context.
- All modifications first enter a “Pending Changes” panel, which shows the
UPDATESQL to be executed. - Commit Changes executes the entire batch in a single transaction; if execution fails, the entire batch is rolled back.
- Discard restores the last loaded rows.
- Primary key columns are not editable in pending mode. Tables without a primary key, views, binary fields, and Redis/Elasticsearch virtual tables are read-only.
SQL Playground¶
- Runs against the current instance and database. If a portion of the statements is selected, only the selected portion is executed; otherwise, the entire editor content is executed.
- Shortcut
Ctrl/Cmd + Enterto run statements. - The results panel is resizable or minimizable.
- SQL syntax highlighting is implemented via an overlay, kept in sync with the native textarea, preserving selection, input, paste, and IME behavior.
- MySQL/PostgreSQL support a format button: formats the selected portion, or the entire editor when nothing is selected.
- Statements are split by top-level semicolons; each statement is executed in its own single transaction and is not batched to the driver. MySQL is configured with
multipleStatements: falseat runtime. - Read-only statements use engine-level read-only transactions (
START TRANSACTION READ ONLY/BEGIN TRANSACTION READ ONLY), with a per-statement timeout (default 15 seconds). - Write operations, DDL, and Redis delete commands require confirmation before execution. Result set size is limited by source policy (default 2,000).
- Result sets remember the source instance/database and display a staleness warning when the context no longer matches.
AI Assistant¶
- The AI chat window is only visible within the DshDataCat page and does not appear on other chat pages.
- The window can be moved via the title bar and resized from the four corners; on narrow screens, it becomes a bottom drawer within the panel.
- The assistant reads the current database schema to generate queries and explain risks. Sample data is excluded by default; when
aiSampleDatais explicitly enabled, columns containingpassword,token,email,phone, orsecretin their names are masked. - Read-only queries are executed automatically and results are opened in the SQL Playground. Write operations and other high-risk statements require confirmation.
- On execution failure, the error is added to the conversation history as an execution error event, facilitating follow-up fix queries.
- Uses the current DSH default model.
Export¶
- MySQL/PostgreSQL: export table DDL, or DDL plus data.
- Redis: export key-value command scripts.
- Elasticsearch: export mapping JSON or NDJSON.
- Export limits: 50,000 SQL rows, 1,000 Redis keys, 10,000 Elasticsearch documents. Export files that hit the limit include an explanatory note.
Technical Details¶
- The plugin requires Node.js >= 20.
- Core dependencies include:
@elastic/elasticsearch^9.5.1mysql2^3.24.6pg^8.23.1redis^6.3.1xlsx0.18.5- The plugin is licensed under the MIT License.
Use Cases & Notes¶
- Ideal for developers who need to quickly browse and operate on MySQL, PostgreSQL, Redis, and Elasticsearch within DSH, especially in scenarios requiring AI-assisted querying and schema comprehension.
- The plugin runs database connections with the current DSH process privileges. Review the source code and license before installation to ensure compliance with your project’s security requirements.
- Table sorting and pagination rely on the table’s primary key or PostgreSQL’s
ctid/ MySQL full-column ordering. Tables without a primary key may still have pagination results affected under concurrent writes. - System databases are protected across the UI, Host API, and SQL Playground. Verify the current database context before performing operations.
In Short¶
DshDataCat unifies database management, SQL editing, and an AI assistant into the DSH sidebar, providing agent developers with a cohesive data manipulation experience. The plugin supports MySQL, PostgreSQL, Redis, and Elasticsearch, offering type-aware editing, batch commits, read-only transactions, export, and AI-assisted querying. For more information and source code, see:
- Plugin directory: https://www.skillhub.cn/plugins/Leeaoyin/dsh-data-cat
- GitHub: https://github.com/Leeaoyin/dsh-data-cat