@yejiming/dsh-data-agent 0.1.1 → 0.1.2
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 +35 -50
- package/README.md +35 -50
- package/dsh-plugin.json +1 -1
- package/lib/{catalog-DEJqOXRo.js → catalog-CbxIDQBG.js} +1 -1
- package/lib/client.js +145 -145
- package/lib/{command-CzzSPmag.js → command-scZcZG11.js} +1 -1
- package/lib/command.js +1 -1
- package/lib/{connections-CFXOZTHZ.js → connections-dGPjgsGg.js} +11 -10
- package/lib/index.js +4 -4
- package/lib/routes.js +2 -2
- package/lib/{tool-DNkywSph.js → tool-Du1EadNP.js} +1 -1
- package/lib/tool.js +1 -1
- package/lib/types/clients.d.ts +7 -7
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<p align="center">
|
|
28
28
|
|
|
29
|
-
[Project Overview](#project-overview) · [
|
|
29
|
+
[Project Overview](#project-overview) · [Features](#features) · [Quick Install](#quick-install) · [Web UI](#using-data-agent-in-the-web-ui) · [dsh-tui](#using-data-agent-in-dsh-tui) · [Security](#security) · [Local Development](#local-development) · [Ecosystem Status](#ecosystem-specification-status)
|
|
30
30
|
|
|
31
31
|
</p>
|
|
32
32
|
|
|
@@ -36,27 +36,10 @@ dsh-data-agent is a data analysis plugin for DeepSeek Harness (DSH). Connect a d
|
|
|
36
36
|
|
|
37
37
|

|
|
38
38
|
|
|
39
|
-
## Ecosystem Specification Status
|
|
40
|
-
|
|
41
|
-
This package includes an experimental declaration for the [DSH Ecosystem Specification](https://github.com/T-Auto/dsh-ecosystem-spec) Community v0.15. It does not replace or double-register the existing Cordis behavior. The native bundle, preset, commands, tools, routes, Web UI, TUI form, and connection storage remain the sole functional implementation.
|
|
42
|
-
|
|
43
|
-
| Item | Current status |
|
|
44
|
-
| --- | --- |
|
|
45
|
-
| Specification and stage | Community v0.15, Draft / Experimental |
|
|
46
|
-
| Pinned baseline | `dsh-ecosystem-spec@ec80a4be5d92bbb971655afd0f097bb5586a1a28`; `dsh-std@614dfa1ac168db79fcf4577cf0ebb34e2e3b944b` |
|
|
47
|
-
| Manifest | `dsh-plugin.json`, `manifestVersion: 0.15`, package identity `@yejiming/dsh-data-agent@0.1.1` |
|
|
48
|
-
| Admission decision | The repository's eligible fixture is `compatible`; this is not an admission result from a real dsh-TUI Host |
|
|
49
|
-
| Evidence level | `Parsed`; fixture negotiation is recorded only as `fixture-only` and does not become `Negotiated` evidence |
|
|
50
|
-
| Exercised environment | Offline parser/projector/definition validation; disposable local mount/unmount with `@dsh-std/adapter-dsh@0.1.0-rc3` |
|
|
51
|
-
| Artifact | The release identity is package name and version; a tarball SHA-256 is written only to an external sidecar after a real `npm pack`, never into the source manifest |
|
|
52
|
-
| Unverified | Real Host Descriptor, real Web/Desktop/dsh-tui, real TTY, database, remote, attach/detach, multiple Presentation, `Observed`, and `Attested` evidence |
|
|
53
|
-
|
|
54
|
-
Active restrictions include intentionally leaving `UserInteraction` undeclared because the pinned Community manifest cannot carry the requirement spec required by its dsh-std definition. Model tools, the agent preset, Cordis service, HTTP routes, Web slots, persistence domain, and local TTY remain native DSH behavior. During `@dsh-std/adapter-dsh` discovery, the ecosystem facet publishes only a degraded snapshot and no second Command, Tool, or UI handler.
|
|
55
|
-
|
|
56
|
-
The plugin remains **trusted in-process** and is not sandboxed. Manifest permissions are Host admission contracts; they do not provide OS, process, or realm isolation. These results are not official DSH certification, security approval, a vulnerability-free guarantee, or a universal Host compatibility claim.
|
|
57
|
-
|
|
58
39
|
## Features
|
|
59
40
|
|
|
41
|
+

|
|
42
|
+
|
|
60
43
|
- **Analyze data through conversation**: Describe your goal in natural language. DSH understands the question, breaks it into analysis steps, queries real data, and organizes the conclusions. You can keep asking follow-up questions to explore the same context in greater depth.
|
|
61
44
|
- **Discover business insights automatically**: Data Agent goes beyond returning query results. It helps compare trends, locate anomalies, identify valuable customers or products, and turn the data into explanations that support decisions.
|
|
62
45
|
- **AI-assisted data governance**: Scan a database with the AI model configured in the current DSH session. Using tables, fields, comments, and relations, it generates candidate business meanings for every table and field. Every AI-generated candidate requires human review, and users can also add business terms and metric definitions manually. During later queries and analysis, Data Agent automatically reads the relevant definitions through the built-in `catalog-search`, `catalog-get`, and `metric-get` tools, grounding SQL and conclusions in governed business context.
|
|
@@ -67,42 +50,23 @@ The plugin remains **trusted in-process** and is not sandboxed. Manifest permiss
|
|
|
67
50
|
- **Stay focused with Data Mode**: The session uses DSH's native `str_replace_editor` for files and keeps `sql-query`, `sql-write`, `sql-cmd`, `render-analysis`, `catalog-search`, `catalog-get`, and `metric-get`; Web, Desktop, dsh-tui, and headless profiles use the same eight-tool protocol. Host or community tools such as `describe_image` and `ssh_*` do not leak into Data Mode.
|
|
68
51
|
- **Work safely with real data**: Use read-only mode and a read-only database account when appropriate. TUI passwords are masked and are never restored as part of a form draft. You decide whether the session may modify data.
|
|
69
52
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
The Web UI also includes an on-demand database workbench. Click the database button in the top-right of the composer to use four tabs—Connection, Tables, Data Governance, and SQL—in one Modal. The Data Governance tab reads the independent persistent `data_agent_catalog@1` domain. Historical snapshots remain searchable after the live database disconnects; a new scan still requires a connection to the same stable profile.
|
|
73
|
-
|
|
74
|
-
The SQL tab renders read-query results as a structured table with a sticky header, 100-row pages, and local horizontal scrolling for wide datasets. The complete loaded result can be exported as Excel (`.xlsx`), UTF-8 CSV, or copied to the clipboard, with a hard limit of 50,000 rows per query. Write/administrative commands and errors remain text messages instead of being misparsed as tables.
|
|
75
|
-
|
|
76
|
-
### Data Catalog and metric governance
|
|
77
|
-
|
|
78
|
-
A Catalog scan is an explicit human action. Its first stage reads database system catalogs only: it does not read business rows, persist sample rows, or run full-table `COUNT(*)` queries for exact counts. Its second stage uses the model currently configured in the initiating DSH session to generate table-level and field-level business-meaning candidates, one table at a time. The model receives only bounded technical metadata—names, types, nullable flags, database comments, keys, and relations—not sample values, query results, or credentials. Web offers full-source, schema, and single-table scopes in the Data Governance tab, with an extra confirmation for full scans. `/database` and `/catalog` are registered only when the current Cordis composition actually loads `@deepseek-harness-tui/dsh-tui`; the profile label is not consulted, so installing Data Agent or merely naming a profile `dsh-tui` never exposes them. A normal Web composition uses the database workbench instead. dsh-tui uses:
|
|
53
|
+
### Database Workbench
|
|
79
54
|
|
|
80
|
-
|
|
55
|
+
The Web UI also includes an on-demand database workbench. Click the database button in the top-right of the composer to use four tabs—Connection, Tables, Data Governance, and SQL—in one Modal.
|
|
81
56
|
|
|
82
|
-
|
|
83
|
-
/catalog scan Choose a scope interactively; reconfirm a full scan
|
|
84
|
-
/catalog scan --all Explicit full-source scan
|
|
85
|
-
/catalog scan --schema sales Scan one schema
|
|
86
|
-
/catalog scan --schema sales --table orders
|
|
87
|
-
/catalog status [--run <run-id>]
|
|
88
|
-
/catalog cancel [--run <run-id>]
|
|
89
|
-
/catalog diff [--from <run-id> --to <run-id>]
|
|
90
|
-
/catalog view Open the read-only full-screen Catalog browser
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Scans run in the background, with at most one active run per source. When dsh-tui exposes its public extension services, a persistent line above the prompt follows the real “technical metadata → Catalog publish → AI business meanings” phases. Success, partial success, and failure remain visible until the next scan or `/catalog view`, instead of disappearing with a short notification. `/catalog view` opens a read-only full-screen scene: tables/views are paged on the left, while the selected table's summary, fields, and AI business meanings appear on the right. It supports search, independently scrolling panes, business-schema/all-schema switching, refresh, and Escape to return. Older dsh-tui versions without the public status/scene services keep the scan commands and explicitly fall back to `/catalog status` and the Web Catalog.
|
|
57
|
+

|
|
94
58
|
|
|
95
|
-
|
|
59
|
+
### Analyze Data Through Conversation
|
|
96
60
|
|
|
97
|
-
|
|
61
|
+
Choose “Data Mode” when creating a session, and DSH will use the data-analysis workflow for everything that follows.
|
|
98
62
|
|
|
99
|
-
|
|
63
|
+

|
|
100
64
|
|
|
101
|
-
|
|
65
|
+
### Data Catalog and Metric Governance
|
|
102
66
|
|
|
103
|
-
|
|
67
|
+
In Web, open Data Governance, choose a source and scan scope, then click Scan. Search or compare results, review AI meanings, and add terms or metrics. Full scans require confirmation.
|
|
104
68
|
|
|
105
|
-

|
|
106
70
|
|
|
107
71
|
## Quick Install
|
|
108
72
|
|
|
@@ -226,6 +190,8 @@ The plugin tries the active profile process PATH first. If that fails, it also c
|
|
|
226
190
|
|
|
227
191
|
MySQL and Doris invocations include `--default-character-set=utf8mb4` by default, preventing Windows code pages from corrupting Chinese database, table, column, or query-result text before it reaches DSH. You do not need to repeat this argument in the profile.
|
|
228
192
|
|
|
193
|
+
Schema and table names used for metadata browsing may contain Unicode letters, combining marks, numbers, `_`, and `$`; column names returned by the database are displayed unchanged. For example, a SQLite table named `中文表名` with a `姓名` column can be browsed directly in the workbench. To keep the metadata SQL boundary explicit, whitespace, controls, quotes, backticks, backslashes, semicolons, dots, hyphens, and other punctuation in schema or table inputs are still rejected before a database client starts.
|
|
194
|
+
|
|
229
195
|
SQL Server reads use T-SQL `TOP` or an existing `OFFSET ... FETCH` clause and never append `LIMIT`. To prevent `sqlcmd` scripting from crossing the SQL boundary, `GO`, `!!`, colon commands, and `$(...)` substitutions are rejected before the client starts. The plugin does not add `-C` or another trust-server-certificate option by default.
|
|
230
196
|
|
|
231
197
|
If a client lives in a company toolchain or another custom directory, add search directories to the current profile's `data-agent` config. Use an absolute command path when you need to pin one exact version, or use `args` for other CLI arguments. The current profile PATH always wins, and `searchPaths` is checked before platform defaults:
|
|
@@ -294,9 +260,24 @@ The prebuilt `lib/` directory is committed to the repository, so npm and GitHub
|
|
|
294
260
|
|
|
295
261
|
Upgrading the specification baseline requires an explicit update to both revisions and pinned digests in `conformance/dsh-ecosystem/baseline.json`, offline conformance against the matching local checkouts, review of inventory/restriction drift, and a complete build and test run. Generate release evidence with `pnpm conformance:artifact --output-dir <outside-worktree-directory>` so a real `npm pack` tarball produces an external sidecar. Documentation and claims must stay within the weakest verified evidence level in that sidecar.
|
|
296
262
|
|
|
297
|
-
##
|
|
263
|
+
## Ecosystem Specification Status
|
|
298
264
|
|
|
299
|
-
|
|
265
|
+
This package includes an experimental declaration for the [DSH Ecosystem Specification](https://github.com/T-Auto/dsh-ecosystem-spec) Community v0.15. It does not replace or double-register the existing Cordis behavior. The native bundle, preset, commands, tools, routes, Web UI, TUI form, and connection storage remain the sole functional implementation.
|
|
266
|
+
|
|
267
|
+
| Item | Current status |
|
|
268
|
+
| -------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
269
|
+
| Specification and stage | Community v0.15, Draft / Experimental |
|
|
270
|
+
| Pinned baseline | `dsh-ecosystem-spec@ec80a4be5d92bbb971655afd0f097bb5586a1a28`; `dsh-std@614dfa1ac168db79fcf4577cf0ebb34e2e3b944b` |
|
|
271
|
+
| Manifest | `dsh-plugin.json`, `manifestVersion: 0.15`, package identity `@yejiming/dsh-data-agent@0.1.2` |
|
|
272
|
+
| Admission decision | The repository's eligible fixture is `compatible`; this is not an admission result from a real dsh-TUI Host |
|
|
273
|
+
| Evidence level | `Parsed`; fixture negotiation is recorded only as `fixture-only` and does not become `Negotiated` evidence |
|
|
274
|
+
| Exercised environment | Offline parser/projector/definition validation; disposable local mount/unmount with `@dsh-std/adapter-dsh@0.1.0-rc3` |
|
|
275
|
+
| Artifact | The release identity is package name and version; a tarball SHA-256 is written only to an external sidecar after a real `npm pack`, never into the source manifest |
|
|
276
|
+
| Unverified | Real Host Descriptor, real Web/Desktop/dsh-tui, real TTY, database, remote, attach/detach, multiple Presentation, `Observed`, and `Attested` evidence |
|
|
277
|
+
|
|
278
|
+
Active restrictions include intentionally leaving `UserInteraction` undeclared because the pinned Community manifest cannot carry the requirement spec required by its dsh-std definition. Model tools, the agent preset, Cordis service, HTTP routes, Web slots, persistence domain, and local TTY remain native DSH behavior. During `@dsh-std/adapter-dsh` discovery, the ecosystem facet publishes only a degraded snapshot and no second Command, Tool, or UI handler.
|
|
279
|
+
|
|
280
|
+
The plugin remains **trusted in-process** and is not sandboxed. Manifest permissions are Host admission contracts; they do not provide OS, process, or realm isolation. These results are not official DSH certification, security approval, a vulnerability-free guarantee, or a universal Host compatibility claim.
|
|
300
281
|
|
|
301
282
|
## Related Links
|
|
302
283
|
|
|
@@ -304,3 +285,7 @@ MIT
|
|
|
304
285
|
- [dsh-web-ui](https://github.com/dsh-external/dsh-web-ui): An extensible Web UI for DeepSeek Harness, with browser-based interaction and a plugin and theme ecosystem
|
|
305
286
|
- [dsh-cc-tui](https://github.com/dsh-external/dsh-cc-tui): A keyboard-first, full-screen terminal interface for DeepSeek Harness, designed for efficient conversational development workflows
|
|
306
287
|
- [platonai/Browser4](https://github.com/platonai/Browser4): an AI-native browser engine for autonomous agents, intelligent extraction, and large-scale web automation.
|
|
288
|
+
|
|
289
|
+
## License
|
|
290
|
+
|
|
291
|
+
MIT
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<p align="center">
|
|
28
28
|
|
|
29
|
-
[项目简介](#项目简介) · [
|
|
29
|
+
[项目简介](#项目简介) · [主要功能](#主要功能) · [快速安装](#快速安装) · [Web UI](#在web-ui中使用) · [dsh-tui](#在dsh-tui中使用) · [安全说明](#安全说明) · [本地开发](#本地开发) · [生态规范状态](#生态规范状态)
|
|
30
30
|
|
|
31
31
|
</p>
|
|
32
32
|
|
|
@@ -36,27 +36,10 @@ dsh-data-agent是DeepSeek Harness(DSH)的数据分析插件。连接数据
|
|
|
36
36
|
|
|
37
37
|

|
|
38
38
|
|
|
39
|
-
## 生态规范状态
|
|
40
|
-
|
|
41
|
-
本包附带一层实验性的 [DSH Ecosystem Specification](https://github.com/T-Auto/dsh-ecosystem-spec) Community v0.15 声明。它不会替代或重复注册现有 Cordis 功能;原生 bundle、preset、命令、工具、路由、Web UI、TUI 表单和连接存储仍是唯一功能实现。
|
|
42
|
-
|
|
43
|
-
| 项目 | 当前状态 |
|
|
44
|
-
| --- | --- |
|
|
45
|
-
| 规范与阶段 | Community v0.15,Draft / Experimental |
|
|
46
|
-
| 固定基线 | `dsh-ecosystem-spec@ec80a4be5d92bbb971655afd0f097bb5586a1a28`;`dsh-std@614dfa1ac168db79fcf4577cf0ebb34e2e3b944b` |
|
|
47
|
-
| Manifest | `dsh-plugin.json`,`manifestVersion: 0.15`,包身份 `@yejiming/dsh-data-agent@0.1.1` |
|
|
48
|
-
| 准入结果 | 仓库内 eligible fixture 为 `compatible`;这不是实际 dsh-TUI Host 的准入结论 |
|
|
49
|
-
| 证据等级 | `Parsed`;fixture negotiation 只记录为 `fixture-only`,不提升为 `Negotiated` |
|
|
50
|
-
| 已执行环境 | 离线 parser/projector/definition 校验;`@dsh-std/adapter-dsh@0.1.0-rc3` 一次性本地 fixture 挂载/卸载 |
|
|
51
|
-
| Artifact | 发布物身份为包名和版本;tarball SHA-256 只在真实 `npm pack` 后写入工作树外 sidecar,不嵌入 source manifest |
|
|
52
|
-
| 未验证 | 真实 Host Descriptor、真实 Web/Desktop/dsh-tui、真实 TTY、数据库、remote、attach/detach、多 Presentation、`Observed`、`Attested` |
|
|
53
|
-
|
|
54
|
-
主要限制包括:`UserInteraction` 因固定 Community manifest 无法携带 dsh-std definition 所需 requirement spec 而暂不声明;模型工具、agent preset、Cordis service、HTTP routes、Web slots、持久化域和本地 TTY 仍由原生 DSH 路径拥有。安装 `@dsh-std/adapter-dsh` 进行发现时,生态 facet 只发布降级快照,不发布第二个 Command、Tool 或 UI handler。
|
|
55
|
-
|
|
56
|
-
该插件仍是 **trusted in-process**、非沙箱代码。Manifest permission 是 Host 的准入契约,不提供 OS、进程或 realm 隔离。上述结果不代表 DSH 官方认证、安全批准、无漏洞保证或对所有 Host 的普遍兼容承诺。
|
|
57
|
-
|
|
58
39
|
## 主要功能
|
|
59
40
|
|
|
41
|
+

|
|
42
|
+
|
|
60
43
|
- **通过对话完成数据分析**:直接用自然语言描述目标,DSH会理解问题、拆解分析步骤、查询真实数据并整理结论。你可以继续追问,分析会沿着当前上下文逐步深入。
|
|
61
44
|
- **自动寻找商业洞察**:不仅返回查询结果,还能帮助比较趋势、定位异常、识别高价值客户或商品,并把数据转化为便于业务决策的说明。
|
|
62
45
|
- **AI驱动的数据治理**:使用当前DSH会话配置的AI模型扫描数据库,根据库表、字段、注释和关系,为每张表及每个字段生成业务含义候选。所有AI候选都需要人工确认,用户也可以人工补充业务术语和指标定义。后续查询分析时,数据Agent会通过内置的`catalog-search`、`catalog-get`和`metric-get`工具自动读取相关业务定义,让SQL和分析结论基于经过治理的业务口径。
|
|
@@ -67,42 +50,23 @@ dsh-data-agent是DeepSeek Harness(DSH)的数据分析插件。连接数据
|
|
|
67
50
|
- **专注数据任务的数据模式**:会话使用DSH原生`str_replace_editor`处理文件,并保留`sql-query`、`sql-write`、`sql-cmd`、`render-analysis`、`catalog-search`、`catalog-get`与`metric-get`;Web、Desktop、dsh-tui和headless profile使用同一套八工具协议。`describe_image`、`ssh_*`等宿主或社区插件工具不会进入数据模式。
|
|
68
51
|
- **安全地使用真实数据**:支持只读模式和数据库只读账号;TUI密码会被隐藏,且不会作为表单草稿恢复。是否允许修改数据由你决定。
|
|
69
52
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Web UI还提供按需数据库工作台:点击输入框右上角的数据库按钮,即可在同一个Modal的“连接配置、库表、数据治理、SQL”四个页签中配置连接、浏览结构、治理口径或临时运行SQL。“数据治理”页读取独立的`data_agent_catalog@1`持久化域;只要存在历史snapshot,断开实时数据库后仍可搜索和查看,重新扫描则必须连接到同一个稳定Profile。
|
|
73
|
-
|
|
74
|
-
SQL命令页会把读查询结果显示为带固定表头的结构化表格,并按100行分页,宽表可在结果区内横向滚动。当前结果可导出为Excel(`.xlsx`)、UTF-8 CSV或复制到剪贴板;三种导出都包含已加载的完整结果,单次最多50,000行。写入/管理命令及错误仍显示为文本消息,不会被误解析成表格。
|
|
53
|
+
### 数据库工作台
|
|
75
54
|
|
|
76
|
-
|
|
55
|
+
Web UI还提供按需数据库工作台:点击输入框右上角的数据库按钮,即可在同一个Modal的“连接配置、库表、数据治理、SQL”四个页签中配置连接、浏览结构、治理口径或临时运行SQL。
|
|
77
56
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Catalog元数据查询使用独立的`catalogMaxResultChars`捕获上限(默认32 MiB),不会再受普通SQL工具较小的`maxResultChars`限制;超过Catalog专属上限时仍会安全失败,并提示缩小扫描范围或调整配置,不会发布被截断的snapshot。
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
/catalog scan 交互选择范围;选择全库时再次确认
|
|
84
|
-
/catalog scan --all 显式全库扫描
|
|
85
|
-
/catalog scan --schema sales 扫描一个Schema
|
|
86
|
-
/catalog scan --schema sales --table orders
|
|
87
|
-
/catalog status [--run <run-id>]
|
|
88
|
-
/catalog cancel [--run <run-id>]
|
|
89
|
-
/catalog diff [--from <run-id> --to <run-id>]
|
|
90
|
-
/catalog view 打开只读全屏目录浏览器
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
扫描在后台运行,同一个source同时只允许一个活动run。在提供公开扩展接口的dsh-tui中,输入框上方会持续显示“技术元数据采集 → 目录发布 → AI业务含义”的实际进度;成功、部分成功或失败终态会一直保留到下一次扫描或打开`/catalog view`,不再依赖短暂通知。`/catalog view`使用全屏只读场景:左侧按表/视图分页,右侧展示表级说明、字段类型与字段级AI业务含义,支持搜索、左右独立滚动、业务Schema/全部Schema切换和刷新;按Esc返回。旧版dsh-tui没有公开状态/scene服务时,扫描命令仍可用,并明确回退到`/catalog status`和Web“数据治理”页。
|
|
57
|
+

|
|
94
58
|
|
|
95
|
-
|
|
59
|
+
### 通过对话完成数据分析
|
|
96
60
|
|
|
97
|
-
|
|
61
|
+
创建会话时选择“数据模式”,DSH就会以数据分析工作流处理后续问题。
|
|
98
62
|
|
|
99
|
-
|
|
63
|
+

|
|
100
64
|
|
|
101
|
-
|
|
65
|
+
### 数据治理
|
|
102
66
|
|
|
103
|
-
|
|
67
|
+
在Web数据库工作台打开“数据治理”页,选择数据源和扫描范围(全库、Schema或单表),点击“扫描”;全库扫描需再次确认。完成后可搜索表、字段、术语或指标,查看版本变化,并逐项确认或删除AI生成的表/字段业务含义,也可人工新增业务术语和指标定义。后续分析会自动参考已保存的口径。
|
|
104
68
|
|
|
105
|
-

|
|
106
70
|
|
|
107
71
|
## 快速安装
|
|
108
72
|
|
|
@@ -225,6 +189,8 @@ DSH运行查询时需要本机能够访问目标数据库,并安装相应的
|
|
|
225
189
|
|
|
226
190
|
插件调用MySQL或Doris客户端时会内置`--default-character-set=utf8mb4`,确保Windows代码页不会使库名、表名、字段名或查询结果中的中文在进入DSH前乱码,无需在profile中重复配置该参数。
|
|
227
191
|
|
|
192
|
+
库表元数据浏览支持由Unicode字母、组合标记、数字以及`_`、`$`组成的schema和表名,数据库返回的字段名会原样展示。例如SQLite中的`中文表名`及其`姓名`字段可以直接在工作台中浏览。为保持元数据SQL边界明确,schema和表名中的空白、控制字符、引号、反引号、反斜杠、分号、点号、连字符及其他标点仍会在启动数据库客户端前被拒绝。
|
|
193
|
+
|
|
228
194
|
SQL Server查询使用T-SQL `TOP`或已有的`OFFSET ... FETCH`限行,绝不会追加`LIMIT`。为避免`sqlcmd`自身脚本能力绕过SQL边界,输入中的`GO`、`!!`、冒号命令和`$(...)`变量替换会在启动客户端前被拒绝。插件不会默认添加`-C`或其他“信任服务器证书”选项。
|
|
229
195
|
|
|
230
196
|
如果客户端安装在公司工具链或其他自定义目录,可在当前profile的`data-agent`配置中补充搜索目录;需要锁定具体版本时则直接填写绝对命令路径,也可通过`args`添加其他CLI参数。当前profile的PATH始终优先,`searchPaths`在系统常见目录之前:
|
|
@@ -293,9 +259,24 @@ pnpm conformance
|
|
|
293
259
|
|
|
294
260
|
升级规范基线必须显式更新`conformance/dsh-ecosystem/baseline.json`中的两个revision和固定digest,使用对应的本地checkout离线运行conformance,复核inventory/restriction漂移,并重新执行完整构建与测试。发布证据应运行`pnpm conformance:artifact --output-dir <工作树外目录>`,从真实`npm pack` tarball生成外部sidecar;文档和claim不得超过其中最弱的已验证证据等级。
|
|
295
261
|
|
|
296
|
-
##
|
|
262
|
+
## 生态规范状态
|
|
297
263
|
|
|
298
|
-
|
|
264
|
+
本包附带一层实验性的 [DSH Ecosystem Specification](https://github.com/T-Auto/dsh-ecosystem-spec) Community v0.15 声明。它不会替代或重复注册现有 Cordis 功能;原生 bundle、preset、命令、工具、路由、Web UI、TUI 表单和连接存储仍是唯一功能实现。
|
|
265
|
+
|
|
266
|
+
| 项目 | 当前状态 |
|
|
267
|
+
| --- | --- |
|
|
268
|
+
| 规范与阶段 | Community v0.15,Draft / Experimental |
|
|
269
|
+
| 固定基线 | `dsh-ecosystem-spec@ec80a4be5d92bbb971655afd0f097bb5586a1a28`;`dsh-std@614dfa1ac168db79fcf4577cf0ebb34e2e3b944b` |
|
|
270
|
+
| Manifest | `dsh-plugin.json`,`manifestVersion: 0.15`,包身份 `@yejiming/dsh-data-agent@0.1.2` |
|
|
271
|
+
| 准入结果 | 仓库内 eligible fixture 为 `compatible`;这不是实际 dsh-TUI Host 的准入结论 |
|
|
272
|
+
| 证据等级 | `Parsed`;fixture negotiation 只记录为 `fixture-only`,不提升为 `Negotiated` |
|
|
273
|
+
| 已执行环境 | 离线 parser/projector/definition 校验;`@dsh-std/adapter-dsh@0.1.0-rc3` 一次性本地 fixture 挂载/卸载 |
|
|
274
|
+
| Artifact | 发布物身份为包名和版本;tarball SHA-256 只在真实 `npm pack` 后写入工作树外 sidecar,不嵌入 source manifest |
|
|
275
|
+
| 未验证 | 真实 Host Descriptor、真实 Web/Desktop/dsh-tui、真实 TTY、数据库、remote、attach/detach、多 Presentation、`Observed`、`Attested` |
|
|
276
|
+
|
|
277
|
+
主要限制包括:`UserInteraction` 因固定 Community manifest 无法携带 dsh-std definition 所需 requirement spec 而暂不声明;模型工具、agent preset、Cordis service、HTTP routes、Web slots、持久化域和本地 TTY 仍由原生 DSH 路径拥有。安装 `@dsh-std/adapter-dsh` 进行发现时,生态 facet 只发布降级快照,不发布第二个 Command、Tool 或 UI handler。
|
|
278
|
+
|
|
279
|
+
该插件仍是 **trusted in-process**、非沙箱代码。Manifest permission 是 Host 的准入契约,不提供 OS、进程或 realm 隔离。上述结果不代表 DSH 官方认证、安全批准、无漏洞保证或对所有 Host 的普遍兼容承诺。
|
|
299
280
|
|
|
300
281
|
## 友情链接
|
|
301
282
|
|
|
@@ -303,3 +284,7 @@ MIT
|
|
|
303
284
|
- [dsh-web-ui](https://github.com/dsh-external/dsh-web-ui):DeepSeek Harness的可扩展Web UI,支持浏览器端交互以及插件与主题扩展
|
|
304
285
|
- [dsh-cc-tui](https://github.com/dsh-external/dsh-cc-tui):面向DeepSeek Harness的键盘优先全屏终端界面,适用于高效的对话式开发工作流
|
|
305
286
|
- [platonai/Browser4](https://github.com/platonai/Browser4):面向自主智能体、智能信息抽取与大规模Web自动化的AI原生浏览器引擎
|
|
287
|
+
|
|
288
|
+
## 许可
|
|
289
|
+
|
|
290
|
+
MIT
|
package/dsh-plugin.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as DATABASE_TYPES, r as redactSecretText } from "./connections-
|
|
1
|
+
import { b as DATABASE_TYPES, r as redactSecretText } from "./connections-dGPjgsGg.js";
|
|
2
2
|
import { a as catalogSemanticRevisionId, c as normalizeCatalogIdentifier, i as catalogSemanticId, l as normalizeCatalogText, n as catalogAssetId, o as catalogSourceId, r as catalogRevisionId, s as catalogTechnicalFingerprint, t as canonicalCatalogIdentity, u as stableJson } from "./catalog-identity-CVftmvQL.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { basename } from "node:path";
|
package/lib/client.js
CHANGED
|
@@ -1011,150 +1011,150 @@ window.__ModuleLoader__.load({
|
|
|
1011
1011
|
document.head.appendChild(tag);
|
|
1012
1012
|
}
|
|
1013
1013
|
var DataAgentWorkbench_module_css_default = {
|
|
1014
|
-
"
|
|
1015
|
-
"
|
|
1014
|
+
"workbench": "Sv3uVW_workbench",
|
|
1015
|
+
"connectionSummary": "Sv3uVW_connectionSummary",
|
|
1016
|
+
"shortcutHint": "Sv3uVW_shortcutHint",
|
|
1017
|
+
"catalogError": "Sv3uVW_catalogError",
|
|
1018
|
+
"catalogBadge_needs_review": "Sv3uVW_catalogBadge_needs_review",
|
|
1019
|
+
"catalogScanTimes": "Sv3uVW_catalogScanTimes",
|
|
1020
|
+
"treeIcon": "Sv3uVW_treeIcon",
|
|
1016
1021
|
"fieldGrid": "Sv3uVW_fieldGrid",
|
|
1022
|
+
"sqlResultToolbar": "Sv3uVW_sqlResultToolbar",
|
|
1023
|
+
"tree": "Sv3uVW_tree",
|
|
1017
1024
|
"modalColTitle": "Sv3uVW_modalColTitle",
|
|
1018
|
-
"
|
|
1025
|
+
"sqlResultEmpty": "Sv3uVW_sqlResultEmpty",
|
|
1026
|
+
"catalogSearchActions": "Sv3uVW_catalogSearchActions",
|
|
1027
|
+
"catalogSectionLabel": "Sv3uVW_catalogSectionLabel",
|
|
1028
|
+
"catalogCounts": "Sv3uVW_catalogCounts",
|
|
1029
|
+
"errorText": "Sv3uVW_errorText",
|
|
1030
|
+
"field": "Sv3uVW_field",
|
|
1031
|
+
"nullCell": "Sv3uVW_nullCell",
|
|
1032
|
+
"trigger": "Sv3uVW_trigger",
|
|
1019
1033
|
"treeNode": "Sv3uVW_treeNode",
|
|
1020
|
-
"
|
|
1021
|
-
"rememberHint": "Sv3uVW_rememberHint",
|
|
1022
|
-
"catalogScanBar": "Sv3uVW_catalogScanBar",
|
|
1023
|
-
"catalogDefinition": "Sv3uVW_catalogDefinition",
|
|
1024
|
-
"sqlTableScroll": "Sv3uVW_sqlTableScroll",
|
|
1025
|
-
"treeScroll": "Sv3uVW_treeScroll",
|
|
1026
|
-
"catalogMeaningSection": "Sv3uVW_catalogMeaningSection",
|
|
1027
|
-
"tabPanel": "Sv3uVW_tabPanel",
|
|
1028
|
-
"ghost": "Sv3uVW_ghost",
|
|
1034
|
+
"catalogLatestLabel": "Sv3uVW_catalogLatestLabel",
|
|
1029
1035
|
"catalogSearch": "Sv3uVW_catalogSearch",
|
|
1030
|
-
"
|
|
1031
|
-
"
|
|
1032
|
-
"
|
|
1033
|
-
"
|
|
1036
|
+
"catalogBadge_inferred": "Sv3uVW_catalogBadge_inferred",
|
|
1037
|
+
"catalogDetailTabActive": "Sv3uVW_catalogDetailTabActive",
|
|
1038
|
+
"catalogBusinessEmpty": "Sv3uVW_catalogBusinessEmpty",
|
|
1039
|
+
"catalogMeaningFields": "Sv3uVW_catalogMeaningFields",
|
|
1040
|
+
"catalogLatestRun": "Sv3uVW_catalogLatestRun",
|
|
1041
|
+
"sqlResultMeta": "Sv3uVW_sqlResultMeta",
|
|
1042
|
+
"ghost": "Sv3uVW_ghost",
|
|
1043
|
+
"triggerDot": "Sv3uVW_triggerDot",
|
|
1044
|
+
"catalogToolbar": "Sv3uVW_catalogToolbar",
|
|
1045
|
+
"input": "Sv3uVW_input",
|
|
1046
|
+
"catalogBadge_observed": "Sv3uVW_catalogBadge_observed",
|
|
1047
|
+
"rememberRow": "Sv3uVW_rememberRow",
|
|
1034
1048
|
"visuallyHidden": "Sv3uVW_visuallyHidden",
|
|
1049
|
+
"tab": "Sv3uVW_tab",
|
|
1050
|
+
"catalogBadge": "Sv3uVW_catalogBadge",
|
|
1051
|
+
"primary": "Sv3uVW_primary",
|
|
1052
|
+
"catalogProgress": "Sv3uVW_catalogProgress",
|
|
1053
|
+
"catalogScanBar": "Sv3uVW_catalogScanBar",
|
|
1054
|
+
"actions": "Sv3uVW_actions",
|
|
1055
|
+
"catalogDetailTitle": "Sv3uVW_catalogDetailTitle",
|
|
1056
|
+
"sqlResultTable": "Sv3uVW_sqlResultTable",
|
|
1057
|
+
"treeItem": "Sv3uVW_treeItem",
|
|
1035
1058
|
"connectionState": "Sv3uVW_connectionState",
|
|
1059
|
+
"sqlMessageError": "Sv3uVW_sqlMessageError",
|
|
1060
|
+
"catalogActions": "Sv3uVW_catalogActions",
|
|
1061
|
+
"catalogWorkspace": "Sv3uVW_catalogWorkspace",
|
|
1062
|
+
"colScroll": "Sv3uVW_colScroll",
|
|
1036
1063
|
"summaryDb": "Sv3uVW_summaryDb",
|
|
1037
|
-
"
|
|
1038
|
-
"
|
|
1039
|
-
"
|
|
1040
|
-
"
|
|
1041
|
-
"
|
|
1042
|
-
"
|
|
1043
|
-
"
|
|
1044
|
-
"catalogToolbar": "Sv3uVW_catalogToolbar",
|
|
1064
|
+
"treeScroll": "Sv3uVW_treeScroll",
|
|
1065
|
+
"catalogPanel": "Sv3uVW_catalogPanel",
|
|
1066
|
+
"catalogItem": "Sv3uVW_catalogItem",
|
|
1067
|
+
"catalogBadge_retired": "Sv3uVW_catalogBadge_retired",
|
|
1068
|
+
"tabActive": "Sv3uVW_tabActive",
|
|
1069
|
+
"sqlEmptyString": "Sv3uVW_sqlEmptyString",
|
|
1070
|
+
"catalogBadge_verified": "Sv3uVW_catalogBadge_verified",
|
|
1045
1071
|
"sqlActions": "Sv3uVW_sqlActions",
|
|
1046
|
-
"
|
|
1047
|
-
"
|
|
1048
|
-
"
|
|
1049
|
-
"
|
|
1050
|
-
"
|
|
1051
|
-
"
|
|
1052
|
-
"errorIcon": "Sv3uVW_errorIcon",
|
|
1053
|
-
"catalogHistoryItem": "Sv3uVW_catalogHistoryItem",
|
|
1072
|
+
"rememberHint": "Sv3uVW_rememberHint",
|
|
1073
|
+
"catalogBadge_changed": "Sv3uVW_catalogBadge_changed",
|
|
1074
|
+
"catalogStats": "Sv3uVW_catalogStats",
|
|
1075
|
+
"modalHint": "Sv3uVW_modalHint",
|
|
1076
|
+
"catalogRelations": "Sv3uVW_catalogRelations",
|
|
1077
|
+
"catalogDetailScroll": "Sv3uVW_catalogDetailScroll",
|
|
1054
1078
|
"catalogMeaningReview": "Sv3uVW_catalogMeaningReview",
|
|
1055
|
-
"
|
|
1056
|
-
"
|
|
1057
|
-
"
|
|
1058
|
-
"
|
|
1059
|
-
"
|
|
1060
|
-
"
|
|
1061
|
-
"
|
|
1079
|
+
"catalogMeaningField": "Sv3uVW_catalogMeaningField",
|
|
1080
|
+
"catalogMeaningCardCompact": "Sv3uVW_catalogMeaningCardCompact",
|
|
1081
|
+
"sqlExportButton": "Sv3uVW_sqlExportButton",
|
|
1082
|
+
"catalogHistoryItem": "Sv3uVW_catalogHistoryItem",
|
|
1083
|
+
"hint": "Sv3uVW_hint",
|
|
1084
|
+
"tabPanel": "Sv3uVW_tabPanel",
|
|
1085
|
+
"catalogDiffBar": "Sv3uVW_catalogDiffBar",
|
|
1062
1086
|
"catalogCheck": "Sv3uVW_catalogCheck",
|
|
1063
|
-
"
|
|
1064
|
-
"
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"
|
|
1087
|
+
"errorBar": "Sv3uVW_errorBar",
|
|
1088
|
+
"sqlTableEmpty": "Sv3uVW_sqlTableEmpty",
|
|
1089
|
+
"triggerSlot": "Sv3uVW_triggerSlot",
|
|
1090
|
+
"catalogDetailTabs": "Sv3uVW_catalogDetailTabs",
|
|
1091
|
+
"summaryType": "Sv3uVW_summaryType",
|
|
1092
|
+
"catalogListEmpty": "Sv3uVW_catalogListEmpty",
|
|
1093
|
+
"treeChildren": "Sv3uVW_treeChildren",
|
|
1094
|
+
"catalogDetailTab": "Sv3uVW_catalogDetailTab",
|
|
1095
|
+
"triggerActive": "Sv3uVW_triggerActive",
|
|
1096
|
+
"catalogConfirm": "Sv3uVW_catalogConfirm",
|
|
1068
1097
|
"schemaPanel": "Sv3uVW_schemaPanel",
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1072
|
-
"nullCell": "Sv3uVW_nullCell",
|
|
1073
|
-
"tabActive": "Sv3uVW_tabActive",
|
|
1074
|
-
"catalogNotice": "Sv3uVW_catalogNotice",
|
|
1098
|
+
"catalogList": "Sv3uVW_catalogList",
|
|
1099
|
+
"tabs": "Sv3uVW_tabs",
|
|
1100
|
+
"typeCell": "Sv3uVW_typeCell",
|
|
1075
1101
|
"catalogSourceName": "Sv3uVW_catalogSourceName",
|
|
1076
|
-
"
|
|
1077
|
-
"
|
|
1078
|
-
"
|
|
1079
|
-
"catalogSearchActions": "Sv3uVW_catalogSearchActions",
|
|
1080
|
-
"catalogDetailCounts": "Sv3uVW_catalogDetailCounts",
|
|
1081
|
-
"sqlResultLimit": "Sv3uVW_sqlResultLimit",
|
|
1082
|
-
"catalogActionGroup": "Sv3uVW_catalogActionGroup",
|
|
1102
|
+
"catalogControl": "Sv3uVW_catalogControl",
|
|
1103
|
+
"sqlExportActions": "Sv3uVW_sqlExportActions",
|
|
1104
|
+
"sqlNull": "Sv3uVW_sqlNull",
|
|
1083
1105
|
"catalogOverview": "Sv3uVW_catalogOverview",
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
"catalogBadge": "Sv3uVW_catalogBadge",
|
|
1087
|
-
"catalogTextArea": "Sv3uVW_catalogTextArea",
|
|
1106
|
+
"treeName": "Sv3uVW_treeName",
|
|
1107
|
+
"treeChevron": "Sv3uVW_treeChevron",
|
|
1088
1108
|
"catalogInlineNotice": "Sv3uVW_catalogInlineNotice",
|
|
1089
|
-
"
|
|
1090
|
-
"
|
|
1091
|
-
"catalogBadge_changed": "Sv3uVW_catalogBadge_changed",
|
|
1092
|
-
"hint": "Sv3uVW_hint",
|
|
1093
|
-
"errorBar": "Sv3uVW_errorBar",
|
|
1094
|
-
"open": "Sv3uVW_open",
|
|
1095
|
-
"catalogDetailTitle": "Sv3uVW_catalogDetailTitle",
|
|
1096
|
-
"catalogBadge_inferred": "Sv3uVW_catalogBadge_inferred",
|
|
1097
|
-
"sqlResultTable": "Sv3uVW_sqlResultTable",
|
|
1098
|
-
"catalogDetail": "Sv3uVW_catalogDetail",
|
|
1099
|
-
"errorHead": "Sv3uVW_errorHead",
|
|
1100
|
-
"catalogCounts": "Sv3uVW_catalogCounts",
|
|
1109
|
+
"sqlResultPanel": "Sv3uVW_sqlResultPanel",
|
|
1110
|
+
"catalogNotice": "Sv3uVW_catalogNotice",
|
|
1101
1111
|
"label": "Sv3uVW_label",
|
|
1102
|
-
"
|
|
1112
|
+
"sqlResultLimit": "Sv3uVW_sqlResultLimit",
|
|
1113
|
+
"catalogDetailCounts": "Sv3uVW_catalogDetailCounts",
|
|
1103
1114
|
"catalogBadge_restored": "Sv3uVW_catalogBadge_restored",
|
|
1115
|
+
"sqlInput": "Sv3uVW_sqlInput",
|
|
1116
|
+
"catalogMeaningMissing": "Sv3uVW_catalogMeaningMissing",
|
|
1117
|
+
"colCount": "Sv3uVW_colCount",
|
|
1118
|
+
"emptyStateIcon": "Sv3uVW_emptyStateIcon",
|
|
1104
1119
|
"catalogMeaningFieldMeta": "Sv3uVW_catalogMeaningFieldMeta",
|
|
1105
|
-
"catalogBadge_observed": "Sv3uVW_catalogBadge_observed",
|
|
1106
|
-
"sqlTableEmpty": "Sv3uVW_sqlTableEmpty",
|
|
1107
1120
|
"columnsTable": "Sv3uVW_columnsTable",
|
|
1108
|
-
"
|
|
1109
|
-
"
|
|
1110
|
-
"
|
|
1111
|
-
"
|
|
1112
|
-
"
|
|
1113
|
-
"
|
|
1114
|
-
"
|
|
1115
|
-
"
|
|
1116
|
-
"
|
|
1117
|
-
"sqlResultMeta": "Sv3uVW_sqlResultMeta",
|
|
1118
|
-
"catalogLatestError": "Sv3uVW_catalogLatestError",
|
|
1121
|
+
"sqlPageActions": "Sv3uVW_sqlPageActions",
|
|
1122
|
+
"catalogMeaningOrigin": "Sv3uVW_catalogMeaningOrigin",
|
|
1123
|
+
"treeCount": "Sv3uVW_treeCount",
|
|
1124
|
+
"catalogDetailHeader": "Sv3uVW_catalogDetailHeader",
|
|
1125
|
+
"emptyStateText": "Sv3uVW_emptyStateText",
|
|
1126
|
+
"catalogMeaningActions": "Sv3uVW_catalogMeaningActions",
|
|
1127
|
+
"catalogMeaningSection": "Sv3uVW_catalogMeaningSection",
|
|
1128
|
+
"active": "Sv3uVW_active",
|
|
1129
|
+
"sqlTableScroll": "Sv3uVW_sqlTableScroll",
|
|
1119
1130
|
"catalogScanFacts": "Sv3uVW_catalogScanFacts",
|
|
1120
1131
|
"catalogEditor": "Sv3uVW_catalogEditor",
|
|
1121
|
-
"treeItem": "Sv3uVW_treeItem",
|
|
1122
|
-
"catalogMeaningFields": "Sv3uVW_catalogMeaningFields",
|
|
1123
1132
|
"catalogFacts": "Sv3uVW_catalogFacts",
|
|
1124
|
-
"sqlExportButton": "Sv3uVW_sqlExportButton",
|
|
1125
|
-
"catalogDiffBar": "Sv3uVW_catalogDiffBar",
|
|
1126
|
-
"catalogRelations": "Sv3uVW_catalogRelations",
|
|
1127
|
-
"sqlResultEmpty": "Sv3uVW_sqlResultEmpty",
|
|
1128
|
-
"sqlResultPanel": "Sv3uVW_sqlResultPanel",
|
|
1129
|
-
"catalogStats": "Sv3uVW_catalogStats",
|
|
1130
|
-
"emptyStateIcon": "Sv3uVW_emptyStateIcon",
|
|
1131
|
-
"catalogWorkspace": "Sv3uVW_catalogWorkspace",
|
|
1132
|
-
"triggerActive": "Sv3uVW_triggerActive",
|
|
1133
|
-
"catalogList": "Sv3uVW_catalogList",
|
|
1134
|
-
"catalogScanTimes": "Sv3uVW_catalogScanTimes",
|
|
1135
|
-
"sqlPagination": "Sv3uVW_sqlPagination",
|
|
1136
|
-
"sqlMessageError": "Sv3uVW_sqlMessageError",
|
|
1137
|
-
"emptyState": "Sv3uVW_emptyState",
|
|
1138
|
-
"sqlPanel": "Sv3uVW_sqlPanel",
|
|
1139
|
-
"treeChevron": "Sv3uVW_treeChevron",
|
|
1140
|
-
"treeCount": "Sv3uVW_treeCount",
|
|
1141
|
-
"summaryType": "Sv3uVW_summaryType",
|
|
1142
|
-
"catalogPanel": "Sv3uVW_catalogPanel",
|
|
1143
|
-
"catalogConfirm": "Sv3uVW_catalogConfirm",
|
|
1144
|
-
"catalogItem": "Sv3uVW_catalogItem",
|
|
1145
|
-
"modalHint": "Sv3uVW_modalHint",
|
|
1146
|
-
"shortcutHint": "Sv3uVW_shortcutHint",
|
|
1147
|
-
"rememberRow": "Sv3uVW_rememberRow",
|
|
1148
|
-
"catalogBadge_verified": "Sv3uVW_catalogBadge_verified",
|
|
1149
|
-
"tab": "Sv3uVW_tab",
|
|
1150
1133
|
"catalogMeaningCard": "Sv3uVW_catalogMeaningCard",
|
|
1151
|
-
"
|
|
1152
|
-
"
|
|
1153
|
-
"
|
|
1134
|
+
"catalogTextArea": "Sv3uVW_catalogTextArea",
|
|
1135
|
+
"sqlPanel": "Sv3uVW_sqlPanel",
|
|
1136
|
+
"errorHead": "Sv3uVW_errorHead",
|
|
1137
|
+
"workbenchModal": "Sv3uVW_workbenchModal",
|
|
1138
|
+
"errorIcon": "Sv3uVW_errorIcon",
|
|
1139
|
+
"sqlMessage": "Sv3uVW_sqlMessage",
|
|
1140
|
+
"sqlPagination": "Sv3uVW_sqlPagination",
|
|
1141
|
+
"catalogLatestError": "Sv3uVW_catalogLatestError",
|
|
1142
|
+
"catalogDetail": "Sv3uVW_catalogDetail",
|
|
1154
1143
|
"catalogItemActive": "Sv3uVW_catalogItemActive",
|
|
1155
|
-
"
|
|
1156
|
-
"
|
|
1157
|
-
"
|
|
1144
|
+
"workbenchModalContent": "Sv3uVW_workbenchModalContent",
|
|
1145
|
+
"catalogActionGroup": "Sv3uVW_catalogActionGroup",
|
|
1146
|
+
"catalogResults": "Sv3uVW_catalogResults",
|
|
1147
|
+
"fieldRow2": "Sv3uVW_fieldRow2",
|
|
1148
|
+
"catalogBadge_unavailable": "Sv3uVW_catalogBadge_unavailable",
|
|
1149
|
+
"catalogDefinition": "Sv3uVW_catalogDefinition",
|
|
1150
|
+
"open": "Sv3uVW_open",
|
|
1151
|
+
"modalCol": "Sv3uVW_modalCol",
|
|
1152
|
+
"sqlPageButton": "Sv3uVW_sqlPageButton",
|
|
1153
|
+
"catalogItemHead": "Sv3uVW_catalogItemHead",
|
|
1154
|
+
"catalogBadge_missing": "Sv3uVW_catalogBadge_missing",
|
|
1155
|
+
"sqlFeedback": "Sv3uVW_sqlFeedback",
|
|
1156
|
+
"emptyState": "Sv3uVW_emptyState",
|
|
1157
|
+
"catalogSearchQuery": "Sv3uVW_catalogSearchQuery"
|
|
1158
1158
|
};
|
|
1159
1159
|
//#endregion
|
|
1160
1160
|
//#region src/client/QueryResultTable.tsx
|
|
@@ -45574,40 +45574,40 @@ window.__ModuleLoader__.load({
|
|
|
45574
45574
|
document.head.appendChild(tag);
|
|
45575
45575
|
}
|
|
45576
45576
|
var AnalysisDashboard_module_css_default = {
|
|
45577
|
-
"
|
|
45577
|
+
"modalShell": "_1tppBG_modalShell",
|
|
45578
|
+
"rowHead": "_1tppBG_rowHead",
|
|
45579
|
+
"preview": "_1tppBG_preview",
|
|
45580
|
+
"rowActions": "_1tppBG_rowActions",
|
|
45578
45581
|
"empty": "_1tppBG_empty",
|
|
45579
|
-
"
|
|
45582
|
+
"table": "_1tppBG_table",
|
|
45580
45583
|
"row": "_1tppBG_row",
|
|
45581
|
-
"
|
|
45584
|
+
"rowTitle": "_1tppBG_rowTitle",
|
|
45585
|
+
"emptyText": "_1tppBG_emptyText",
|
|
45586
|
+
"modalClose": "_1tppBG_modalClose",
|
|
45587
|
+
"rowInterrupted": "_1tppBG_rowInterrupted",
|
|
45588
|
+
"metricLabel": "_1tppBG_metricLabel",
|
|
45582
45589
|
"viewFull": "_1tppBG_viewFull",
|
|
45583
|
-
"viewHalf": "_1tppBG_viewHalf",
|
|
45584
|
-
"modal": "_1tppBG_modal",
|
|
45585
|
-
"viewTitle": "_1tppBG_viewTitle",
|
|
45586
|
-
"modalBody": "_1tppBG_modalBody",
|
|
45587
|
-
"modalSummary": "_1tppBG_modalSummary",
|
|
45588
|
-
"preview": "_1tppBG_preview",
|
|
45589
45590
|
"metricValue": "_1tppBG_metricValue",
|
|
45590
|
-
"
|
|
45591
|
-
"
|
|
45592
|
-
"chartCanvas": "_1tppBG_chartCanvas",
|
|
45593
|
-
"rowSummary": "_1tppBG_rowSummary",
|
|
45591
|
+
"modalTitle": "_1tppBG_modalTitle",
|
|
45592
|
+
"modal": "_1tppBG_modal",
|
|
45594
45593
|
"grid": "_1tppBG_grid",
|
|
45595
|
-
"
|
|
45594
|
+
"modalCount": "_1tppBG_modalCount",
|
|
45595
|
+
"modalSummary": "_1tppBG_modalSummary",
|
|
45596
|
+
"viewTitle": "_1tppBG_viewTitle",
|
|
45596
45597
|
"rowButton": "_1tppBG_rowButton",
|
|
45597
|
-
"modalShell": "_1tppBG_modalShell",
|
|
45598
|
-
"table": "_1tppBG_table",
|
|
45599
|
-
"emptyText": "_1tppBG_emptyText",
|
|
45600
|
-
"modalTitle": "_1tppBG_modalTitle",
|
|
45601
|
-
"metricLabel": "_1tppBG_metricLabel",
|
|
45602
|
-
"rowHead": "_1tppBG_rowHead",
|
|
45603
45598
|
"rowError": "_1tppBG_rowError",
|
|
45604
45599
|
"modalHeader": "_1tppBG_modalHeader",
|
|
45605
|
-
"
|
|
45600
|
+
"modalBody": "_1tppBG_modalBody",
|
|
45601
|
+
"view": "_1tppBG_view",
|
|
45602
|
+
"tableWrap": "_1tppBG_tableWrap",
|
|
45603
|
+
"modalTitleWrap": "_1tppBG_modalTitleWrap",
|
|
45604
|
+
"visuallyHidden": "_1tppBG_visuallyHidden",
|
|
45605
|
+
"rowSummary": "_1tppBG_rowSummary",
|
|
45606
45606
|
"metricBand": "_1tppBG_metricBand",
|
|
45607
|
-
"
|
|
45608
|
-
"modalCount": "_1tppBG_modalCount",
|
|
45607
|
+
"metric": "_1tppBG_metric",
|
|
45609
45608
|
"chart": "_1tppBG_chart",
|
|
45610
|
-
"
|
|
45609
|
+
"chartCanvas": "_1tppBG_chartCanvas",
|
|
45610
|
+
"viewHalf": "_1tppBG_viewHalf"
|
|
45611
45611
|
};
|
|
45612
45612
|
//#endregion
|
|
45613
45613
|
//#region src/client/AnalysisChart.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as isDatabaseType, S as defaultDatabasePort$1, b as DATABASE_TYPES, i as validatePasswordRef, r as redactSecretText, x as databaseTypeLabel$1 } from "./connections-
|
|
1
|
+
import { C as isDatabaseType, S as defaultDatabasePort$1, b as DATABASE_TYPES, i as validatePasswordRef, r as redactSecretText, x as databaseTypeLabel$1 } from "./connections-dGPjgsGg.js";
|
|
2
2
|
import { RUN_CODE_NAME } from "@deepseek-ai/dsh-tools";
|
|
3
3
|
//#region src/tui-connection-form.ts
|
|
4
4
|
/**
|
package/lib/command.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as executeDatabaseCommand, c as isDshTuiPluginLoaded, d as parseDatabaseAction, i as apply, l as name, n as DATA_AGENT_TOOL_NAMES, o as formatConnectionStatus, r as DSH_TUI_PLUGIN_RUNTIME_NAME, s as inject, t as DATABASE_COMMAND_USAGE, u as parseConnectArguments } from "./command-
|
|
1
|
+
import { a as executeDatabaseCommand, c as isDshTuiPluginLoaded, d as parseDatabaseAction, i as apply, l as name, n as DATA_AGENT_TOOL_NAMES, o as formatConnectionStatus, r as DSH_TUI_PLUGIN_RUNTIME_NAME, s as inject, t as DATABASE_COMMAND_USAGE, u as parseConnectArguments } from "./command-scZcZG11.js";
|
|
2
2
|
export { DATABASE_COMMAND_USAGE, DATA_AGENT_TOOL_NAMES, DSH_TUI_PLUGIN_RUNTIME_NAME, apply, executeDatabaseCommand, formatConnectionStatus, inject, isDshTuiPluginLoaded, name, parseConnectArguments, parseDatabaseAction };
|
|
@@ -807,16 +807,16 @@ function rewriteTopLevelLimit(sql, maxRows) {
|
|
|
807
807
|
}
|
|
808
808
|
return sql;
|
|
809
809
|
}
|
|
810
|
+
const METADATA_IDENTIFIER = /^[\p{L}\p{M}\p{N}_$]+$/u;
|
|
810
811
|
/**
|
|
811
812
|
* Validate and quote one schema/table identifier for a safe metadata query.
|
|
812
|
-
* Identifiers
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
* `"`, `.`, `-` are all refused).
|
|
813
|
+
* Identifiers accept Unicode letters, combining marks and numbers plus `_`/`$`
|
|
814
|
+
* without normalizing or case-folding the database-provided text. Each value is
|
|
815
|
+
* then wrapped for its dialect. Whitespace, controls, punctuation and quoting
|
|
816
|
+
* delimiters remain outside the deliberately narrow metadata-input boundary.
|
|
817
817
|
*/
|
|
818
818
|
function sanitizeIdentifier(type, identifier) {
|
|
819
|
-
if (
|
|
819
|
+
if (!METADATA_IDENTIFIER.test(identifier)) throw new Error(`标识符含非法字符(仅允许 Unicode 字母、组合标记、数字与 _ $):${identifier}`);
|
|
820
820
|
switch (type) {
|
|
821
821
|
case "mysql":
|
|
822
822
|
case "doris":
|
|
@@ -834,8 +834,8 @@ function sanitizeIdentifier(type, identifier) {
|
|
|
834
834
|
* interior `'` doubled). postgres/oracle metadata queries filter system
|
|
835
835
|
* catalogs by NAME (a string value), not by identifier, so those positions
|
|
836
836
|
* need a quoted literal — not {@link sanitizeIdentifier}'s identifier quoting.
|
|
837
|
-
* The whitelist
|
|
838
|
-
*
|
|
837
|
+
* The whitelist excludes `'`, so doubling is a defense-in-depth no-op here but
|
|
838
|
+
* keeps the helper correct for any future widened metadata-input boundary.
|
|
839
839
|
*/
|
|
840
840
|
function quoteStringLiteral(value) {
|
|
841
841
|
return "'" + value.replace(/'/g, "''") + "'";
|
|
@@ -1124,8 +1124,9 @@ function tableListingSql(type, connection) {
|
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
1126
|
/**
|
|
1127
|
-
* Metadata query per kind × type. `schema`/`table` are
|
|
1128
|
-
*
|
|
1127
|
+
* Metadata query per kind × type. `schema`/`table` are validated by the shared
|
|
1128
|
+
* connection service before they reach here; builders still quote identifier
|
|
1129
|
+
* positions or escape value positions rather than concatenating raw text.
|
|
1129
1130
|
*/
|
|
1130
1131
|
function metadataQuery(kind, type, schema, table) {
|
|
1131
1132
|
switch (kind) {
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as clientsSchema, b as DATABASE_TYPES, c as DEFAULT_CATALOG_MAX_RESULT_CHARS, d as DEFAULT_CONNECT_TIMEOUT_MS, f as DEFAULT_MAX_QUERY_CHARS, h as DEFAULT_QUERY_TIMEOUT_MS, l as DEFAULT_CATALOG_MAX_TEXT_CHARS, m as DEFAULT_PRESET_ID, p as DEFAULT_MAX_RESULT_CHARS, s as DEFAULT_CATALOG_MAX_ASSETS, t as createConnectionService, u as DEFAULT_CATALOG_QUERY_TIMEOUT_MS } from "./connections-
|
|
2
|
-
import { a as catalogDateTimeSchema, c as catalogRunSchema, f as catalogSemanticEntrySchema, i as catalogAssetRevisionSchema, m as catalogSourceSchema, n as createCatalogService, o as catalogObservationSchema, p as catalogSemanticRevisionSchema, r as catalogAssetHeadSchema, s as catalogRelationSchema, u as catalogSearchItemSchema } from "./catalog-
|
|
3
|
-
import { i as apply$1 } from "./command-
|
|
4
|
-
import { n as apply$2 } from "./tool-
|
|
1
|
+
import { _ as clientsSchema, b as DATABASE_TYPES, c as DEFAULT_CATALOG_MAX_RESULT_CHARS, d as DEFAULT_CONNECT_TIMEOUT_MS, f as DEFAULT_MAX_QUERY_CHARS, h as DEFAULT_QUERY_TIMEOUT_MS, l as DEFAULT_CATALOG_MAX_TEXT_CHARS, m as DEFAULT_PRESET_ID, p as DEFAULT_MAX_RESULT_CHARS, s as DEFAULT_CATALOG_MAX_ASSETS, t as createConnectionService, u as DEFAULT_CATALOG_QUERY_TIMEOUT_MS } from "./connections-dGPjgsGg.js";
|
|
2
|
+
import { a as catalogDateTimeSchema, c as catalogRunSchema, f as catalogSemanticEntrySchema, i as catalogAssetRevisionSchema, m as catalogSourceSchema, n as createCatalogService, o as catalogObservationSchema, p as catalogSemanticRevisionSchema, r as catalogAssetHeadSchema, s as catalogRelationSchema, u as catalogSearchItemSchema } from "./catalog-CbxIDQBG.js";
|
|
3
|
+
import { i as apply$1 } from "./command-scZcZG11.js";
|
|
4
|
+
import { n as apply$2 } from "./tool-Du1EadNP.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { access, cp, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
7
7
|
import { homedir } from "node:os";
|
package/lib/routes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as isDatabaseType, b as DATABASE_TYPES, d as DEFAULT_CONNECT_TIMEOUT_MS, f as DEFAULT_MAX_QUERY_CHARS, h as DEFAULT_QUERY_TIMEOUT_MS, p as DEFAULT_MAX_RESULT_CHARS } from "./connections-
|
|
2
|
-
import { d as catalogSearchRequestSchema, h as semanticDefinitionSchema, l as catalogScopeSchema, t as CatalogVersionConflictError } from "./catalog-
|
|
1
|
+
import { C as isDatabaseType, b as DATABASE_TYPES, d as DEFAULT_CONNECT_TIMEOUT_MS, f as DEFAULT_MAX_QUERY_CHARS, h as DEFAULT_QUERY_TIMEOUT_MS, p as DEFAULT_MAX_RESULT_CHARS } from "./connections-dGPjgsGg.js";
|
|
2
|
+
import { d as catalogSearchRequestSchema, h as semanticDefinitionSchema, l as catalogScopeSchema, t as CatalogVersionConflictError } from "./catalog-CbxIDQBG.js";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import z from "schemastery";
|
|
5
5
|
import { z as z$1 } from "zod";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as clientsSchema, a as parseStructuredQueryOutput, f as DEFAULT_MAX_QUERY_CHARS, g as classifyStatement, h as DEFAULT_QUERY_TIMEOUT_MS, n as redactQueryResult, o as runClientQuery, p as DEFAULT_MAX_RESULT_CHARS, r as redactSecretText, v as enforceReadRowLimit, y as assertSingleStatement } from "./connections-
|
|
1
|
+
import { _ as clientsSchema, a as parseStructuredQueryOutput, f as DEFAULT_MAX_QUERY_CHARS, g as classifyStatement, h as DEFAULT_QUERY_TIMEOUT_MS, n as redactQueryResult, o as runClientQuery, p as DEFAULT_MAX_RESULT_CHARS, r as redactSecretText, v as enforceReadRowLimit, y as assertSingleStatement } from "./connections-dGPjgsGg.js";
|
|
2
2
|
import { l as normalizeCatalogText } from "./catalog-identity-CVftmvQL.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { link, mkdir, unlink, writeFile } from "node:fs/promises";
|
package/lib/tool.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as name, n as apply, r as inject, t as Config } from "./tool-
|
|
1
|
+
import { i as name, n as apply, r as inject, t as Config } from "./tool-Du1EadNP.js";
|
|
2
2
|
export { Config, apply, inject, name };
|
package/lib/types/clients.d.ts
CHANGED
|
@@ -38,11 +38,10 @@ export declare function enforceReadRowLimit(sql: string, type: DatabaseType, max
|
|
|
38
38
|
export declare const SQLSERVER_COLUMN_SEPARATOR = "\u001F";
|
|
39
39
|
/**
|
|
40
40
|
* Validate and quote one schema/table identifier for a safe metadata query.
|
|
41
|
-
* Identifiers
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* `"`, `.`, `-` are all refused).
|
|
41
|
+
* Identifiers accept Unicode letters, combining marks and numbers plus `_`/`$`
|
|
42
|
+
* without normalizing or case-folding the database-provided text. Each value is
|
|
43
|
+
* then wrapped for its dialect. Whitespace, controls, punctuation and quoting
|
|
44
|
+
* delimiters remain outside the deliberately narrow metadata-input boundary.
|
|
46
45
|
*/
|
|
47
46
|
export declare function sanitizeIdentifier(type: DatabaseType, identifier: string): string;
|
|
48
47
|
/** One deployment override for a database type's CLI client. */
|
|
@@ -112,8 +111,9 @@ export declare function buildStructuredQueryTemplate(type: DatabaseType, connect
|
|
|
112
111
|
*/
|
|
113
112
|
export declare function tableListingSql(type: DatabaseType, connection?: DatabaseConnection): string;
|
|
114
113
|
/**
|
|
115
|
-
* Metadata query per kind × type. `schema`/`table` are
|
|
116
|
-
*
|
|
114
|
+
* Metadata query per kind × type. `schema`/`table` are validated by the shared
|
|
115
|
+
* connection service before they reach here; builders still quote identifier
|
|
116
|
+
* positions or escape value positions rather than concatenating raw text.
|
|
117
117
|
*/
|
|
118
118
|
export declare function metadataQuery(kind: 'schemas' | 'tables' | 'describe', type: DatabaseType, schema?: string, table?: string): string;
|
|
119
119
|
/**
|
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, versioned metadata Catalog governance, secure credentials, SQL and Catalog tools, and the data-agent preset",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|