@yejiming/dsh-data-agent 0.0.12 → 0.0.13

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.
Files changed (46) hide show
  1. package/README.en.md +56 -10
  2. package/README.md +56 -10
  3. package/conformance/dsh-ecosystem/baseline.json +59 -0
  4. package/conformance/dsh-ecosystem/dependencies.json +41 -0
  5. package/conformance/dsh-ecosystem/fixtures/host-degraded.fixture.json +12 -0
  6. package/conformance/dsh-ecosystem/fixtures/host-eligible.fixture.json +13 -0
  7. package/conformance/dsh-ecosystem/fixtures/host-rejected.fixture.json +12 -0
  8. package/conformance/dsh-ecosystem/fixtures/profiles/native-only/package.json +8 -0
  9. package/conformance/dsh-ecosystem/fixtures/profiles/native-plus-adapter/package.json +9 -0
  10. package/conformance/dsh-ecosystem/inventory.json +77 -0
  11. package/conformance/dsh-ecosystem/restrictions.json +20 -0
  12. package/dsh-plugin.json +67 -0
  13. package/lib/client.js +1348 -129
  14. package/lib/client.js.map +1 -1
  15. package/lib/{command-DuCpwVbl.js → command-utC5MHd9.js} +101 -60
  16. package/lib/command.js +1 -1
  17. package/lib/{connections-5sfdEDsG.js → connections-CHY4uB6z.js} +747 -65
  18. package/lib/defaults-Cngd8Tf8.js +131 -0
  19. package/lib/ecosystem.js +19 -0
  20. package/lib/index.js +30 -22
  21. package/lib/routes.js +5 -6
  22. package/lib/{tool-DgL0fBfj.js → tool-ZTOS4B33.js} +5 -167
  23. package/lib/tool.js +1 -1
  24. package/lib/types/client/DataAgentWorkbench.d.ts +1 -2
  25. package/lib/types/client/QueryResultTable.d.ts +13 -0
  26. package/lib/types/client/locales.d.ts +48 -0
  27. package/lib/types/client/persistence.d.ts +3 -1
  28. package/lib/types/client/query-export.d.ts +11 -0
  29. package/lib/types/client-discovery.d.ts +3 -4
  30. package/lib/types/clients.d.ts +14 -8
  31. package/lib/types/command.d.ts +2 -2
  32. package/lib/types/connections.d.ts +33 -4
  33. package/lib/types/database-types.d.ts +23 -0
  34. package/lib/types/defaults.d.ts +4 -0
  35. package/lib/types/ecosystem.d.ts +13 -0
  36. package/lib/types/index.d.ts +16 -10
  37. package/lib/types/query.d.ts +13 -11
  38. package/lib/types/sql.d.ts +9 -1
  39. package/lib/types/storage.d.ts +11 -1
  40. package/lib/types/structured-read.d.ts +2 -2
  41. package/lib/types/structured.d.ts +1 -1
  42. package/lib/types/tool.d.ts +5 -5
  43. package/lib/types/tui-connection-form.d.ts +10 -7
  44. package/package.json +27 -3
  45. package/preset/data-agent/agent.cordis.yml +4 -1
  46. package/lib/defaults-DP4RyRh1.js +0 -21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yejiming/dsh-data-agent",
3
3
  "description": "Data Agent for DSH Web and TUI: shared database connections, a masked TUI form, secure credential references, SQL tools, and the data-agent preset",
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -36,6 +36,10 @@
36
36
  "types": "./lib/types/invariant.d.ts",
37
37
  "default": "./lib/invariant.js"
38
38
  },
39
+ "./ecosystem": {
40
+ "types": "./lib/types/ecosystem.d.ts",
41
+ "default": "./lib/ecosystem.js"
42
+ },
39
43
  "./client": {
40
44
  "types": "./lib/types/client/index.d.ts",
41
45
  "default": "./lib/client.js"
@@ -63,16 +67,23 @@
63
67
  "watch": "tsdown --watch",
64
68
  "build": "rm -rf lib && tsdown && tsc -p tsconfig.build.json && tsc -p tsconfig.client.json",
65
69
  "typecheck": "tsc --noEmit",
66
- "test": "vitest run"
70
+ "test": "vitest run",
71
+ "conformance": "node scripts/dsh-ecosystem-conformance.mjs",
72
+ "conformance:artifact": "node scripts/dsh-ecosystem-pack-evidence.mjs"
67
73
  },
68
74
  "files": [
69
75
  "lib/**",
70
76
  "cordis.patch.yml",
71
- "preset/**"
77
+ "preset/**",
78
+ "dsh-plugin.json",
79
+ "conformance/dsh-ecosystem/**"
72
80
  ],
73
81
  "license": "MIT",
74
82
  "dependencies": {
83
+ "@clickhouse/client": "~1.23.1",
84
+ "@dsh-std/sdk": "0.1.0-rc1",
75
85
  "echarts": "^6.1.0",
86
+ "fflate": "0.8.3",
76
87
  "schemastery": "^3.18.0",
77
88
  "zod": "^4.4.3"
78
89
  },
@@ -132,24 +143,37 @@
132
143
  "@deepseek-ai/cordis": "^4.0.1",
133
144
  "@deepseek-ai/dsh-agent": "^0.1.0-rc.7",
134
145
  "@deepseek-ai/dsh-agent-presets": "^0.1.0-rc.7",
146
+ "@deepseek-ai/dsh-attachment": "0.1.0-rc.7",
135
147
  "@deepseek-ai/dsh-client-locale": "^0.1.0-rc.7",
136
148
  "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.7",
137
149
  "@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.7",
138
150
  "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.7",
151
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.7",
139
152
  "@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.7",
140
153
  "@deepseek-ai/dsh-client-ui-tool": "0.1.0-rc.7",
141
154
  "@deepseek-ai/dsh-commands": "^0.1.0-rc.7",
142
155
  "@deepseek-ai/dsh-credentials": "^0.1.0-rc.7",
143
156
  "@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.7",
144
157
  "@deepseek-ai/dsh-invariants": "^0.1.0-rc.7",
158
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.7",
145
159
  "@deepseek-ai/dsh-scope": "^0.1.0-rc.7",
160
+ "@deepseek-ai/dsh-session": "0.1.0-rc.7",
146
161
  "@deepseek-ai/dsh-storage": "^0.1.0-rc.7",
147
162
  "@deepseek-ai/dsh-storage-domain": "^0.1.0-rc.7",
148
163
  "@deepseek-ai/dsh-storage-json": "^0.1.0-rc.7",
149
164
  "@deepseek-ai/dsh-subprocess": "^0.1.0-rc.7",
150
165
  "@deepseek-ai/dsh-subprocess-local": "0.1.0-rc.7",
151
166
  "@deepseek-ai/dsh-tools": "^0.1.0-rc.7",
167
+ "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.7",
152
168
  "@deepseek-ai/dsh-user-questions": "^0.1.0-rc.7",
169
+ "@deepseek-ai/schemastery": "3.18.1",
170
+ "@dsh-std/adapter-dsh": "0.1.0-rc3",
171
+ "@dsh-std/command": "0.1.0-rc2",
172
+ "@dsh-std/core": "0.1.0-rc1",
173
+ "@dsh-std/lifecycle": "0.1.0-rc1",
174
+ "@dsh-std/manifest": "0.1.0-rc1",
175
+ "@dsh-std/presentation": "0.1.0-rc1",
176
+ "@dsh-std/storage": "0.1.0-rc1",
153
177
  "@testing-library/dom": "^10.4.1",
154
178
  "@testing-library/react": "^16.3.2",
155
179
  "@types/node": "^25.0.0",
@@ -37,7 +37,10 @@
37
37
  生成 3-6 个互补视图。聚合、Top N、排序必须写在 SQL 中,line/time 数据需 ORDER BY。
38
38
  工作流:先用 str_replace_editor 把 SQL 写入 .sql 文件,再用 sql-query 执行只读查询或
39
39
  sql-write 执行写入并核对结果;结果可疑时缩小查询范围重试。每次数据库工具调用
40
- 只允许一条 SQL 语句。
40
+ 只允许一条 SQL 语句。根据当前连接使用正确方言:SQL Server使用TOP或OFFSET/FETCH,
41
+ 不使用LIMIT,也不输出GO、冒号命令、!!或sqlcmd变量;ClickHouse、Doris等支持LIMIT的
42
+ 数据库才使用LIMIT。Doris首版只按当前/internal catalog浏览,不臆造外部catalog层级;
43
+ 未经真实部署验证,不宣称任意ClickHouse Cloud或TLS组合都可用。
41
44
 
42
45
  # ── filesystem ──────────────────────────────────────────────────────────────
43
46
 
@@ -1,21 +0,0 @@
1
- //#region src/defaults.ts
2
- /**
3
- * Package-wide defaults shared by the server half (`src/index.ts`) and the
4
- * database tool half (`src/tool.ts`). Loader schemas carry these as their
5
- * defaults so a deployment may override every one of them in cordis.yml.
6
- * @module @yejiming/dsh-data-agent/defaults
7
- */
8
- /** Preset directory name installed into `$DSH_HOME/.agent-presets/`. */
9
- const DEFAULT_PRESET_ID = "data-agent";
10
- /** End-to-end deadline for one `/connect` connectivity check, milliseconds. */
11
- const DEFAULT_CONNECT_TIMEOUT_MS = 1e4;
12
- /** End-to-end deadline for one database-tool query, milliseconds. */
13
- const DEFAULT_QUERY_TIMEOUT_MS = 3e4;
14
- /** In-memory cap on database-tool captured output (stdout and stderr each). */
15
- const DEFAULT_MAX_RESULT_CHARS = 2e4;
16
- /** Cap on one /query SQL text length (abuse guard; the wire body stays small). */
17
- const DEFAULT_MAX_QUERY_CHARS = 65536;
18
- /** Grace period for the subprocess terminate escalation. */
19
- const DEFAULT_GRACE_MS = 5e3;
20
- //#endregion
21
- export { DEFAULT_PRESET_ID as a, DEFAULT_MAX_RESULT_CHARS as i, DEFAULT_GRACE_MS as n, DEFAULT_QUERY_TIMEOUT_MS as o, DEFAULT_MAX_QUERY_CHARS as r, DEFAULT_CONNECT_TIMEOUT_MS as t };