@yejiming/dsh-data-agent 0.0.1
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/LICENSE +21 -0
- package/README.en.md +185 -0
- package/README.md +185 -0
- package/cordis.patch.yml +16 -0
- package/lib/client.js +1157 -0
- package/lib/client.js.map +1 -0
- package/lib/defaults-D__D30ED.js +283 -0
- package/lib/index.js +153 -0
- package/lib/invariant.js +22 -0
- package/lib/query-DAjhNTo8.js +86 -0
- package/lib/routes.js +250 -0
- package/lib/tool.js +107 -0
- package/lib/types/client/DataAgentWorkbench.d.ts +22 -0
- package/lib/types/client/index.d.ts +27 -0
- package/lib/types/client/locales.d.ts +95 -0
- package/lib/types/client/persistence.d.ts +37 -0
- package/lib/types/clients.d.ts +96 -0
- package/lib/types/connections.d.ts +70 -0
- package/lib/types/defaults.d.ts +20 -0
- package/lib/types/index.d.ts +143 -0
- package/lib/types/invariant.d.ts +15 -0
- package/lib/types/query.d.ts +60 -0
- package/lib/types/routes.d.ts +107 -0
- package/lib/types/tool.d.ts +61 -0
- package/package.json +102 -0
- package/preset/data-agent/agent.cordis.yml +45 -0
- package/preset/data-agent/preset.yml +3 -0
package/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yejiming/dsh-data-agent",
|
|
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.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/omdsh-dev/dsh-data-agent.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/omdsh-dev/dsh-data-agent/issues"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./lib/types/index.d.ts",
|
|
18
|
+
"default": "./lib/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./routes": {
|
|
21
|
+
"types": "./lib/types/routes.d.ts",
|
|
22
|
+
"default": "./lib/routes.js"
|
|
23
|
+
},
|
|
24
|
+
"./tool": {
|
|
25
|
+
"types": "./lib/types/tool.d.ts",
|
|
26
|
+
"default": "./lib/tool.js"
|
|
27
|
+
},
|
|
28
|
+
"./invariant": {
|
|
29
|
+
"types": "./lib/types/invariant.d.ts",
|
|
30
|
+
"default": "./lib/invariant.js"
|
|
31
|
+
},
|
|
32
|
+
"./client": {
|
|
33
|
+
"types": "./lib/types/client/index.d.ts",
|
|
34
|
+
"default": "./lib/client.js"
|
|
35
|
+
},
|
|
36
|
+
"./src/*": "./src/*",
|
|
37
|
+
"./package.json": "./package.json",
|
|
38
|
+
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
39
|
+
},
|
|
40
|
+
"dsh": {
|
|
41
|
+
"bundle": {
|
|
42
|
+
"patch": "./cordis.patch.yml"
|
|
43
|
+
},
|
|
44
|
+
"client": {
|
|
45
|
+
"inject": [
|
|
46
|
+
"@deepseek-ai/dsh-client-locale",
|
|
47
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
49
|
+
],
|
|
50
|
+
"platform": "web"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"bundle": "rm -rf lib && tsdown",
|
|
55
|
+
"watch": "tsdown --watch",
|
|
56
|
+
"build": "rm -rf lib && tsdown && tsc -p tsconfig.build.json && tsc -p tsconfig.client.json",
|
|
57
|
+
"typecheck": "tsc --noEmit",
|
|
58
|
+
"test": "vitest run"
|
|
59
|
+
},
|
|
60
|
+
"files": [
|
|
61
|
+
"lib/**",
|
|
62
|
+
"cordis.patch.yml",
|
|
63
|
+
"preset/**"
|
|
64
|
+
],
|
|
65
|
+
"license": "MIT",
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"schemastery": "^3.18.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
72
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
76
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
|
|
77
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
78
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.0-rc.6",
|
|
79
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
80
|
+
"react": "^18.2.0"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
84
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
85
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
89
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
|
|
90
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
91
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.0-rc.6",
|
|
92
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
93
|
+
"@types/node": "^25.0.0",
|
|
94
|
+
"@types/react": "~18.3.1",
|
|
95
|
+
"lightningcss": "^1.32.0",
|
|
96
|
+
"react": "^18.2.0",
|
|
97
|
+
"schemastery": "^3.18.0",
|
|
98
|
+
"tsdown": "^0.22.2",
|
|
99
|
+
"typescript": "^6.0.3",
|
|
100
|
+
"vitest": "^3.0.0"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# The `data-agent` agent preset: the data-engineer surface.
|
|
2
|
+
#
|
|
3
|
+
# This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
|
|
4
|
+
# standing scope; every session naming it joins by scope parentage, so the
|
|
5
|
+
# tools registered here cover each joined agent while a session's own state
|
|
6
|
+
# stays keyed per Session/Agent inside the plugins. The host composition
|
|
7
|
+
# (base.cordis.yml + web.cordis.yml) keeps everything a preset must not own:
|
|
8
|
+
# the registries themselves, the sandbox and approval stack, persistence, and
|
|
9
|
+
# the model route.
|
|
10
|
+
#
|
|
11
|
+
# A preset composes what an agent HAS instead of subtracting from a shared
|
|
12
|
+
# default: every model-facing tool row absent from this file is simply not
|
|
13
|
+
# registered for agents on this preset. Only the four tools below exist here —
|
|
14
|
+
# bash, glob/grep, str_replace_editor, skill, todo, goal, plan, web, subagent,
|
|
15
|
+
# workflow, tasks, and the rest are all absent, i.e. disabled.
|
|
16
|
+
#
|
|
17
|
+
# All three rows only CONSUME host services (the tools registry, subprocess,
|
|
18
|
+
# the dataAgentConnections connection store), so no `isolate` realm is needed.
|
|
19
|
+
|
|
20
|
+
# ── identity ────────────────────────────────────────────────────────────────
|
|
21
|
+
|
|
22
|
+
# The data-engineer persona, shadowing the deployment default for this agent.
|
|
23
|
+
# `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
|
|
24
|
+
- id: persona
|
|
25
|
+
name: '@deepseek-ai/dsh-persona'
|
|
26
|
+
config:
|
|
27
|
+
text: >-
|
|
28
|
+
你是数据工程师 Agent。工作目录 {{cwd}}。你只有 4 个工具:sqlcmd(在数据库客户端执行
|
|
29
|
+
SQL 或命令,如 SHOW TABLES、DESCRIBE users、SELECT * FROM orders LIMIT 5)、read、
|
|
30
|
+
write、edit(读写改本地文件)。工作流:先用 sqlcmd 探查表结构与样例数据(禁止臆造
|
|
31
|
+
表名与列名),把 SQL 写入 .sql 文件(write/edit),再用 sqlcmd 执行并核对结果;
|
|
32
|
+
结果可疑时缩小查询范围重试。
|
|
33
|
+
|
|
34
|
+
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
35
|
+
|
|
36
|
+
# The project's own fs tools: read / write / edit (no search tools here).
|
|
37
|
+
- id: tool-fs
|
|
38
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
39
|
+
|
|
40
|
+
# ── database ────────────────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
# This package's sqlcmd tool half; injects the host's subprocess service and
|
|
43
|
+
# the dataAgentConnections connection store (see the data-agent host row).
|
|
44
|
+
- id: tool-sqlcmd
|
|
45
|
+
name: '@yejiming/dsh-data-agent/tool'
|