@yejiming/dsh-data-agent 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +12 -12
- package/README.md +12 -12
- package/lib/client.js +313 -257
- package/lib/client.js.map +1 -1
- package/lib/{defaults-Dgu2B2Yq.js → defaults-Bac6QvNt.js} +469 -7
- package/lib/index.js +4 -4
- package/lib/{query-vK9dr7Z6.js → query-CmhTFklw.js} +2 -2
- package/lib/routes.js +3 -2
- package/lib/tool.js +335 -18
- package/lib/types/client/locales.d.ts +4 -2
- package/lib/types/clients.d.ts +22 -2
- package/lib/types/defaults.d.ts +3 -3
- package/lib/types/index.d.ts +6 -6
- package/lib/types/query.d.ts +6 -2
- package/lib/types/sql.d.ts +26 -0
- package/lib/types/structured.d.ts +29 -0
- package/lib/types/tool.d.ts +10 -4
- package/package.json +1 -1
- package/preset/data-agent/agent.cordis.yml +11 -7
- package/preset/data-agent/preset.yml +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yejiming/dsh-data-agent",
|
|
3
3
|
"description": "Data Agent for the dsh web GUI: session-scoped database connections (MySQL/PostgreSQL/SQLite), the sqlcmd tool, the data-agent agent preset, and the database conversation-view tab",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
#
|
|
11
11
|
# A preset composes what an agent HAS instead of subtracting from a shared
|
|
12
12
|
# default: every model-facing tool row absent from this file is simply not
|
|
13
|
-
# registered for agents on this preset.
|
|
13
|
+
# registered for agents on this preset. The database row below registers
|
|
14
|
+
# sql-query / sql-write / sqlcmd and the fs row registers read / write / edit;
|
|
14
15
|
# bash, glob/grep, str_replace_editor, skill, todo, goal, plan, web, subagent,
|
|
15
16
|
# workflow, tasks, and the rest are all absent, i.e. disabled.
|
|
16
17
|
#
|
|
@@ -25,11 +26,12 @@
|
|
|
25
26
|
name: '@deepseek-ai/dsh-persona'
|
|
26
27
|
config:
|
|
27
28
|
text: >-
|
|
28
|
-
你是数据工程师 Agent。工作目录 {{cwd}}
|
|
29
|
-
|
|
30
|
-
write、edit
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
你是数据工程师 Agent。工作目录 {{cwd}}。可用工具:sql-query(只读 SQL,返回结构化
|
|
30
|
+
JSON 结果)、sql-write(写/管理 SQL,单条自动提交)、sqlcmd(原始客户端输出,兼容
|
|
31
|
+
SHOW TABLES、DESCRIBE users 等命令)、read、write、edit(读写改本地文件)。工作流:
|
|
32
|
+
先用 sql-query 探查表结构与样例数据(禁止臆造表名与列名),把 SQL 写入 .sql 文件
|
|
33
|
+
(write/edit),再用 sql-query 执行只读查询或 sql-write 执行写入并核对结果;
|
|
34
|
+
结果可疑时缩小查询范围重试。每次数据库工具调用只允许一条 SQL 语句。
|
|
33
35
|
|
|
34
36
|
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
35
37
|
|
|
@@ -39,7 +41,9 @@
|
|
|
39
41
|
|
|
40
42
|
# ── database ────────────────────────────────────────────────────────────────
|
|
41
43
|
|
|
42
|
-
# This package's
|
|
44
|
+
# This package's database tool half; injects the host's subprocess service and
|
|
43
45
|
# the dataAgentConnections connection store (see the data-agent host row).
|
|
46
|
+
# Registers sql-query (structured read), sql-write (explicit write), and the
|
|
47
|
+
# legacy sqlcmd raw-terminal tool.
|
|
44
48
|
- id: tool-sqlcmd
|
|
45
49
|
name: '@yejiming/dsh-data-agent/tool'
|