返回目录
模型与 MCP 插件

dsh-plugin-sql-manager

sijunmanyue/dsh-plugin-sql-manager

DeepSeek Harness SQL Manager plugin: reusable SQL per system, each with its own required JSON path, searchable by note, table, and field.

Stars
0
Forks
0
Issues
0
更新
13 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:sijunmanyue/dsh-plugin-sql-manager

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

SQL Manager

A DeepSeek Harness plugin that keeps reusable SQL grouped by system. Every system must have its own JSON storage path; systems can live in different folders. The page searches notes, table names, field names, and raw SQL text.

Repository: https://github.com/sijunmanyue/dsh-plugin-sql-manager

Install

git clone https://github.com/sijunmanyue/dsh-plugin-sql-manager.git

Then install the cloned directory as a DSH bundle through the Plugin Manager (or plugin_manager install_bundle with the absolute directory path), and enable SQL Manager if it is not enabled automatically.

Use

  1. Open SQL Manager from the sidebar.
  2. Create a system and fill in its required Storage path:
    • a JSON file path such as D:\SQL\crm.json, or
    • a folder path such as D:\SQL\crm; the plugin creates <system-id>.json inside it.
  3. Add SQL to the system.
  4. Search by a note such as 客服, a table such as t_user, or a field such as user_id.

Editing a system path moves its existing JSON file to the new location. If the entered path already points at a valid system JSON, that file is imported instead of overwritten.

The page also exposes the same library through the sql_manager agent tool (search, list_systems, add, update, delete, create_system, update_system, delete_system).

Storage

Each system is one self-contained JSON file. A small registry at $DSH_HOME/sql-manager/systems.json remembers the path of every system; it is an index, not a global storage folder. DSH_HOME defaults to ~/.dsh.

The suggested folder is $DSH_HOME/sql-manager/sqls, but it is only a convenience for new systems; each system path is stored and edited separately.

A system file follows this shape:

{
  "schema": "dsh.sql-manager.system/v1",
  "id": "crm",
  "name": "CRM 订单系统",
  "description": "订单域",
  "path": "D:\\SQL\\crm.json",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "sqls": [
    {
      "id": "sql-0123456789ab",
      "name": "按手机号查用户",
      "remark": "客服常用;按手机号精确查询",
      "sql": "SELECT u.id, u.mobile FROM t_user u WHERE u.mobile = ?",
      "tables": ["t_user"],
      "fields": ["id", "mobile"],
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}

path is descriptive; the registry is authoritative. tables and fields are refreshed from the SQL text whenever the file is read, so hand-editing the SQL keeps search accurate. A missing or unreadable system file is shown as a broken system with an Edit path action, so it can be repaired or removed.

If an older installation used one global storage folder, the first run with no registry scans the legacy settings.json folder, SQL_MANAGER_DIR, and the suggested folder, then registers those system JSONs automatically.

Notes

  • The HTTP API is /api/sql-manager and accepts loopback requests only.
  • Deleting a system removes its JSON file and registry entry.
  • There is no global storage folder setting.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。