DeepSeek Harness plugin

dsh-mysql

DeepSeek Harness MySQL 连接插件:在设置页配置多套 MySQL 连接(每连接可配表白名单与写权限),输入栏一键切换当前会话的数据库连接,为所有 Agent 预设全局提供 mysql_query / mysql_tables / mysql_execute 工具。MySQL connector for DeepSeek Harness: configure multiple

Jump to install

Source facts

Repository
1321928757/dsh-mysql
Latest update
Aug 18, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/1321928757/dsh-mysql
Plugin: dsh-mysql
Author: 1321928757

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-mysql

MySQL connector plugin for DeepSeek Harness. Configure multiple MySQL connections in the DSH settings page, switch the active connection per session from a button in the composer, and expose MySQL tools globally to every agent preset — no preset edits required.

中文说明

Features

  • Settings page (设置 → MySQL 数据库): add / edit / delete / test connections — host, port, user, password, default database, per-connection table allowlist and write permission (default off).
  • Composer button (🐬, left side of the input bar): pick the connection for the current session only; switch any time. The chosen connection and its readable tables are injected into each turn's runtime-context snapshot (appended after the conversation, so switching or editing a connection never rewrites the stable system-prompt prefix used for context caching).
  • Global tools (available under every agent preset):
ToolPurpose
mysql_queryRead-only single-statement SELECT/SHOW/DESCRIBE/EXPLAIN against the selected connection. Table allowlist enforced, multi-statement rejected, MAX_EXECUTION_TIME hint injected into SELECT, max 2000 rows returned with a truncated flag.
mysql_tablesInspect the schema (columns, types, keys, comments) of the readable tables via information_schema.
mysql_executeINSERT/UPDATE/DELETE only, and only when the connection has allowWrite enabled (default off). DDL (DROP/TRUNCATE/ALTER/...) and multi-statement SQL are always rejected.
  • Per-session selection is resolved through the tool execution context (exec.agent), so the model always queries the database the user picked in the composer.
  • All connection state persists locally in $DSH_HOME/storages/dsh-mysql/connections.json; passwords are stored in that file and never sent back to the browser UI (the UI only sees hasPassword).

Install

# From npm / GitHub (recommended once published)
dsh plugin --profile web add github:1321928757/dsh-mysql#v0.1.4

# Or from a local tarball
pnpm pack
dsh plugin --profile web add C:\path\to\dsh-mysql-0.1.4.tgz

Then restart dsh web (make sure the old process really exited). After the restart, open 设置 → MySQL 数据库, add a connection and press 测试连接.

Quick start

1. Open Settings → MySQL 数据库+ 添加连接; fill in host / port / user / password / default database, optionally list the readable tables (comma separated), decide whether to enable write permission. Press 测试连接, then 保存. 2. In any conversation, click the 🐬 button on the left of the composer and pick a connection (per-session). 3. Ask the agent anything about the database — it can call mysql_tables to inspect the schema and mysql_query to read data. When the connection has write permission enabled, mysql_execute can run INSERT/UPDATE/DELETE.

Safety model

  • Tool-layer enforcement, defense in depth. For production use, also create a dedicated MySQL account with only the needed privileges (ideally SELECT only) for the agent.
  • mysql_query accepts only single SELECT/SHOW/DESCRIBE/EXPLAIN; mysql_execute accepts only single INSERT/UPDATE/DELETE and requires the per-connection allowWrite flag.
  • Table allowlist: when a connection lists tables, every statement is checked and rejected if it references a table outside the list (an empty list means "all tables").
  • SELECT statements get a MAX_EXECUTION_TIME(15000) optimizer hint injected; result sets are capped at 2000 rows.
  • Passwords live in $DSH_HOME/storages/dsh-mysql/connections.json (plain text on the local machine). Use file permissions / a dedicated OS account to protect it.

Migrating from a preset-embedded mysql tool

If a preset previously embedded mysql_query/mysql_execute (e.g. a row loading a local mysql-tool.mjs):

1. Install this plugin into the profile. 2. Remove the mysql tool row (and connection config) from the preset's agent.cordis.yml; keep the business persona text. 3. Restart dsh web, then recreate the connection in Settings → MySQL 数据库. The tool names are identical, so preset prompts that mention mysql_query keep working unchanged.

Development

node --check lib\index.js lib\shared.js lib\typert.host.js lib\client.js
node test\shared.test.mjs
pnpm pack
dsh plugin --profile web add .\dsh-mysql-0.1.4.tgz
# restart dsh web, then verify in the browser

License

MIT