DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Sql — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

dsh-sql

Sql

DSH engineer-grade database plugin: four tools—sql_list/query/exec/schema—supporting SQLite/MySQL/PostgreSQL, multiple connections, read-only mode with an approval gate for write operations, lexical-level read-only protection, streaming row limits, and configurable query/write timeouts.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:STARDUSTLC666/dsh-sql#529d420a8423409aef503627bf575fca749e2000
READMECompatibilityVersions

Compatibility and provenance

Sql is published as dsh-sql and currently resolves to version 0.4.3. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/20/2026

Versions

0.4.3stable
9/12/2026
0.4.2stable
9/5/2026
0.4.1stable
9/2/2026
Show 5 more versionsCollapse versions
0.4.0stable
8/26/2026
0.3.0stable
8/16/2026
0.2.0stable
8/16/2026
0.1.1stable
8/16/2026
0.1.0stable
8/16/2026

Related plugins

Loading related plugins…

Latest
0.4.3
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 8
Weekly downloads
298
Last push
9/18/2026
View source ↗Project homepage ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseSubagent Codex@deepseek-ai/dsh-subagent-codexOne-shot Codex subagent provider over the official app-server protocol

README

English

dsh-sql

你的 agent 会查库了:SQLite / MySQL / PostgreSQL 三引擎,只读白名单 + 写审批门。

DSH(DeepSeek Harness)工程师级数据库插件:六个工具覆盖连接管理、只读查询、写操作、结构探查、统计概览与健康自检。

兼容性

已在官方 @deepseek-ai/dsh@0.1.5-rc.1、Node 24.16.0 上验证(2026-09-11):18 个组件与 Modlens 同载,工具 schema、技能注册及离线只读调用检查通过。采用 cordis.patch.yml + dsh.bundle.patch 组合包模型。Node 要求与该版本 Harness 一致:22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。

安装

dsh plugin --profile web add dsh-sql

卸载

dsh plugin --profile web remove dsh-sql

卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile cordis.patch.yml 中覆盖的插件行。

配置

- id: sql
  name: 'dsh-sql'
  config:
    connections:
      - name: local
        engine: sqlite
        file: E:\data\app.db          # 或 :memory:
      - name: prod
        engine: postgres
        host: db.internal
        database: app
        # password: xxx              # 推荐环境变量 DSH_SQL_PASSWORD_PROD
      - name: legacy
        engine: mysql
        host: 127.0.0.1
        port: 3306
        user: root
        database: legacy
    maxRows: 1000                     # 查询返回行数上限(1-10000)
    queryTimeoutMs: 60000             # 单次查询超时(默认 60 秒,5 秒 - 10 分钟)
    execTimeoutMs: 120000             # 单次写操作超时(默认 120 秒,5 秒 - 10 分钟)
    readOnly: false                   # true 时禁用 sql_exec
    writeApproval: true               # 写操作先弹审批(默认 true)

配置缺省时会提供一个 :memory: SQLite 连接;配置一旦给出但格式无效,插件会直接报错并停止加载,不会静默回退到内存库。

工具一览

工具作用安全
sql_list列出连接 + 连通性测试—
sql_query只读查询(SELECT/PRAGMA/EXPLAIN/SHOW/DESCRIBE/WITH)关键字白名单 + 拒绝多语句
sql_exec写操作/DDL(可多语句脚本)readOnly 禁用 + 审批门
sql_schema表清单 / 表结构标识符白名单校验
sql_stats表数量、行数与库体积概览表名引用 + 查询失败隔离
sql_health连接与安全配置自检逐连接探活,不回显密码

示例

sql_list {}
sql_schema {}                                  # 列出所有表
sql_schema { table: users }                    # 看 users 表结构
sql_stats {}                                   # 查看默认连接的数据规模
sql_health {}                                  # 检查连接和安全配置
sql_query { sql: SELECT * FROM orders WHERE status = 'pending' LIMIT 50 }
sql_exec { sql: UPDATE orders SET status = 'paid' WHERE id = 42 }

安全设计

  • 词法级只读保护:sql_query 先剥离字符串/注释再校验,拒绝 data-modifying CTE(WITH…DELETE/UPDATE)、SELECT INTO、FOR UPDATE/FOR SHARE、PRAGMA 赋值与多语句
  • 写审批门:sql_exec 默认弹审批(对齐 dsh-email 的发信审批),headless 环境无审批通道时拒绝执行
  • readOnly 模式:生产库可整体禁用写
  • 流式行数钳制:SQLite 迭代器 / MySQL Readable / PostgreSQL Query 行事件最多收集 maxRows+1 行,超量标记 truncated;MySQL 和 PostgreSQL 在达到上限时关闭该查询的专用连接,未达上限则正常归还连接池,避免全量结果驻留内存
  • 可取消执行:查询与写操作遵守 Harness 的 exec.signal;取消时会中止等待并销毁正在工作的 MySQL/PostgreSQL 专用连接
  • 大整数无损:数据库返回的 bigint 在 JavaScript 安全整数范围内输出 number,超出范围则输出十进制字符串,避免静默丢精度
  • 标识符校验:表名只允许字母/数字/下划线,杜绝 schema 注入
  • 密钥不落配置:密码支持 DSH_SQL_PASSWORD_<连接名> 环境变量

引擎

  • SQLite:Node 22.13+ 内置 node:sqlite,零依赖
  • MySQL:mysql2 连接池
  • PostgreSQL:pg 连接池

开发

pnpm install
pnpm test       # 构建 + 完整测试套件(含真实 SQLite 集成)

License

MIT