@yejiming/dsh-data-agent 0.0.12 → 0.1.0
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 +97 -16
- package/README.md +97 -16
- package/conformance/dsh-ecosystem/baseline.json +59 -0
- package/conformance/dsh-ecosystem/dependencies.json +41 -0
- package/conformance/dsh-ecosystem/fixtures/host-degraded.fixture.json +12 -0
- package/conformance/dsh-ecosystem/fixtures/host-eligible.fixture.json +13 -0
- package/conformance/dsh-ecosystem/fixtures/host-rejected.fixture.json +12 -0
- package/conformance/dsh-ecosystem/fixtures/profiles/native-only/package.json +8 -0
- package/conformance/dsh-ecosystem/fixtures/profiles/native-plus-adapter/package.json +9 -0
- package/conformance/dsh-ecosystem/inventory.json +100 -0
- package/conformance/dsh-ecosystem/restrictions.json +20 -0
- package/cordis.patch.yml +6 -3
- package/dsh-plugin.json +72 -0
- package/lib/catalog-DEJqOXRo.js +1944 -0
- package/lib/catalog-identity-CVftmvQL.js +96 -0
- package/lib/client.js +3465 -138
- package/lib/client.js.map +1 -1
- package/lib/command-CzzSPmag.js +1719 -0
- package/lib/command.js +2 -2
- package/lib/{connections-5sfdEDsG.js → connections-CFXOZTHZ.js} +964 -68
- package/lib/ecosystem.js +19 -0
- package/lib/index.js +392 -34
- package/lib/routes.js +260 -8
- package/lib/{tool-DgL0fBfj.js → tool-DNkywSph.js} +367 -168
- package/lib/tool.js +1 -1
- package/lib/types/catalog-adapters.d.ts +52 -0
- package/lib/types/catalog-ai.d.ts +49 -0
- package/lib/types/catalog-command.d.ts +28 -0
- package/lib/types/catalog-identity.d.ts +23 -0
- package/lib/types/catalog-storage.d.ts +265 -0
- package/lib/types/catalog-tools.d.ts +5 -0
- package/lib/types/catalog-tui.d.ts +18 -0
- package/lib/types/catalog-types.d.ts +1376 -0
- package/lib/types/catalog.d.ts +59 -0
- package/lib/types/client/CatalogPanel.d.ts +15 -0
- package/lib/types/client/DataAgentWorkbench.d.ts +1 -2
- package/lib/types/client/QueryResultTable.d.ts +13 -0
- package/lib/types/client/catalog-client.d.ts +57 -0
- package/lib/types/client/locales.d.ts +290 -0
- package/lib/types/client/persistence.d.ts +3 -1
- package/lib/types/client/query-export.d.ts +11 -0
- package/lib/types/client-discovery.d.ts +3 -4
- package/lib/types/clients.d.ts +14 -8
- package/lib/types/command.d.ts +16 -5
- package/lib/types/connections.d.ts +42 -4
- package/lib/types/database-types.d.ts +23 -0
- package/lib/types/defaults.d.ts +26 -0
- package/lib/types/ecosystem.d.ts +13 -0
- package/lib/types/index.d.ts +58 -15
- package/lib/types/query.d.ts +13 -11
- package/lib/types/sql.d.ts +9 -1
- package/lib/types/storage.d.ts +11 -1
- package/lib/types/structured-read.d.ts +2 -2
- package/lib/types/structured.d.ts +1 -1
- package/lib/types/tool.d.ts +5 -5
- package/lib/types/tui-connection-form.d.ts +21 -12
- package/package.json +30 -4
- package/preset/data-agent/agent.cordis.yml +13 -2
- package/lib/command-DuCpwVbl.js +0 -875
- package/lib/defaults-DP4RyRh1.js +0 -21
package/README.en.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<p align="center">
|
|
28
28
|
|
|
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)
|
|
29
|
+
[Project Overview](#project-overview) · [Ecosystem Status](#ecosystem-specification-status) · [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)
|
|
30
30
|
|
|
31
31
|
</p>
|
|
32
32
|
|
|
@@ -36,18 +36,64 @@ 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.0` |
|
|
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
|
+
|
|
39
58
|
## Features
|
|
40
59
|
|
|
41
60
|
- **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.
|
|
42
61
|
- **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.
|
|
43
62
|
- **Cross-surface HTML reports (render-analysis)**: In an ordinary tool call, the agent can choose to produce a single chart or a Dashboard-style report (metric/line/bar/pie/scatter/table views). Every successful call saves an offline HTML file under `analysis-reports/` in the current workspace. Web also shows an inline preview and a “View analysis” Modal; dsh-tui returns the file path. Whether to chart remains the agent's decision — schema exploration, single scalars, and queries without visual value are never forced into charts.
|
|
44
|
-
- **
|
|
45
|
-
- **Connect common business databases**: Supports MySQL, PostgreSQL, SQLite, Oracle, Hive, and
|
|
63
|
+
- **Shares the core path across Web UI and dsh-tui**: For a visual workflow, we recommend [zhu1090093659/dsh-web-ui](https://github.com/zhu1090093659/dsh-web-ui), where you can connect databases, browse schemas, and inspect results in the browser. For a keyboard-first workflow, we recommend [ccch1mneyyy/dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI), where you can use the same Data Mode, connect through `/database`, and move directly into conversational analysis. Both interfaces share the database service and tool protocol; validate the exact version and deployment separately.
|
|
64
|
+
- **Connect common business databases**: Supports MySQL, PostgreSQL, SQLite, Oracle, Hive, Impala, ClickHouse, Apache Doris, and SQL Server across application databases, analytics systems, local data files, and data warehouses.
|
|
46
65
|
- **Let DSH complete the analysis loop**: DSH inspects table structures, writes SQL, runs the query, and adjusts its approach based on errors or returned data instead of stopping at an unverified SQL draft.
|
|
47
|
-
- **Stay focused with Data Mode**: The session uses DSH's native `str_replace_editor` for files and keeps `sql-query`, `sql-write`, `sql-cmd`, and `
|
|
66
|
+
- **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.
|
|
48
67
|
- **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.
|
|
49
68
|
|
|
50
|
-
The Web UI also includes an on-demand database workbench. Click the database button in the top-right of the composer to
|
|
69
|
+
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 Catalog, and SQL—in one Modal. The Data Catalog 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.
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
|
|
73
|
+
### Data Catalog and metric governance
|
|
74
|
+
|
|
75
|
+
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 Catalog 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:
|
|
76
|
+
|
|
77
|
+
Catalog metadata queries use an independent `catalogMaxResultChars` capture bound (32 MiB by default), so they no longer inherit the smaller `maxResultChars` budget used by ordinary SQL tools. Exceeding the Catalog-specific bound still fails safely with guidance to narrow the scope or adjust the configuration; a truncated snapshot is never published.
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
/catalog scan Choose a scope interactively; reconfirm a full scan
|
|
81
|
+
/catalog scan --all Explicit full-source scan
|
|
82
|
+
/catalog scan --schema sales Scan one schema
|
|
83
|
+
/catalog scan --schema sales --table orders
|
|
84
|
+
/catalog status [--run <run-id>]
|
|
85
|
+
/catalog cancel [--run <run-id>]
|
|
86
|
+
/catalog diff [--from <run-id> --to <run-id>]
|
|
87
|
+
/catalog view Open the read-only full-screen Catalog browser
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
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.
|
|
91
|
+
|
|
92
|
+
Results are stored by stable profile, asset identity, and immutable revision. Unchanged assets do not duplicate revisions. Only a complete successful technical scan may mark absent objects `missing`, and only inside its exact scope. Table/schema scans do not alter out-of-scope assets or the last-full-scan time. Reappearing assets become `restored`. Failed, cancelled, interrupted, or permission-incomplete metadata runs never replace the previous successful snapshot, and ambiguous permission failures are not treated as deletions. AI enrichment has separate queued, running, succeeded, partial, failed, and cancelled states. Model output remains bounded; if a full-table response reaches the token limit, the same model configuration automatically retries smaller field batches and persists only after every field is complete. An AI failure does not erase a committed technical snapshot or publish an incomplete result for a table.
|
|
93
|
+
|
|
94
|
+
Database facts are `observed`; AI-generated table/field meanings and candidate business terms or metrics are `inferred`. Only human review in Web can verify the current version as `verified`. The Data Catalog groups meanings by table and lets a user confirm or delete each table or field candidate. Delete creates an auditable retired revision, hides it from the default detail, and prevents later scans from reviving or overwriting the human decision. Structural changes mark affected definitions `needs_review` without auto-verifying them. For business analysis, the agent first uses read-only `catalog-search`, then `catalog-get` for technical context or `metric-get` for an exact metric version; it falls back to live schema inspection when the Catalog has no match. AI candidates, database comments, human text, and formulas are always untrusted reference data.
|
|
95
|
+
|
|
96
|
+
The first release does not include scheduled scans, business-row sampling, AI auto-certification, external-catalog synchronization, complete lineage, Catalog-level RBAC, or physical deletion driven by a scan.
|
|
51
97
|
|
|
52
98
|

|
|
53
99
|
|
|
@@ -71,7 +117,7 @@ dsh plugin --profile web add @yejiming/dsh-data-agent
|
|
|
71
117
|
dsh plugin --profile web add github:omdsh-dev/dsh-data-agent
|
|
72
118
|
```
|
|
73
119
|
|
|
74
|
-
The plugin installs the Data Mode preset automatically and preloads its database tools
|
|
120
|
+
The plugin installs the Data Mode preset automatically and preloads its database tools on every surface when the profile starts. `/database` and `/catalog` are enabled only by an actually loaded `@deepseek-harness-tui/dsh-tui` runtime, regardless of the profile name. Selecting the preset no longer performs dynamic package-subpath imports. No local build is required.
|
|
75
121
|
|
|
76
122
|
## Using Data Agent in the Web UI
|
|
77
123
|
|
|
@@ -88,6 +134,8 @@ Then:
|
|
|
88
134
|
3. Once connected, ask an analysis question directly in the conversation.
|
|
89
135
|
4. Follow up on the first result and ask DSH to narrow the scope, compare dimensions, or summarize the conclusions.
|
|
90
136
|
|
|
137
|
+
A Web composition that does not load `@deepseek-harness-tui/dsh-tui` does not expose `/database` or `/catalog`; use the database workbench to connect, scan, cancel, and review Catalog content.
|
|
138
|
+
|
|
91
139
|
For example, ask: “Analyze order changes over the last 30 days, identify the regions and products with the largest revenue decline, and explain the main causes.” DSH will inspect the relevant tables, generate and run the queries, and complete the analysis from real results.
|
|
92
140
|
|
|
93
141
|
### Analysis reports and HTML artifacts
|
|
@@ -103,7 +151,7 @@ Data Mode provides the render-analysis tool on every surface. The agent first ex
|
|
|
103
151
|
|
|
104
152
|
## Using Data Agent in dsh-tui
|
|
105
153
|
|
|
106
|
-
Install Data Agent into the dsh-tui profile. `render-analysis` does not require a particular dsh-TUI version or scene capability:
|
|
154
|
+
Install Data Agent into the dsh-tui profile. `render-analysis` does not require a particular dsh-TUI version or scene capability. Persistent Catalog status and full-screen result browsing activate automatically when dsh-tui exposes its public `status`/`scene` extension services:
|
|
107
155
|
|
|
108
156
|
```sh
|
|
109
157
|
dsh plugin --profile dsh-tui add @yejiming/dsh-data-agent
|
|
@@ -122,7 +170,7 @@ In a blank session, switch to Data Mode and connect a database:
|
|
|
122
170
|
/database connect
|
|
123
171
|
```
|
|
124
172
|
|
|
125
|
-
The connection form displays all relevant fields together. Use Tab or Shift+Tab to move between fields. Press Enter on database type or read-only mode to show every option, use the arrow keys to select one, and press Enter again to confirm.
|
|
173
|
+
The connection form displays all relevant fields together. Use Tab or Shift+Tab to move between fields. Press Enter on database type, ClickHouse HTTPS, or read-only mode to show every option, use the arrow keys to select one, and press Enter again to confirm. For a network database, enter either a temporary password or a DSH credential reference, never both.
|
|
126
174
|
|
|
127
175
|
After connecting, return to the chat input and ask a business question. Other useful database commands include:
|
|
128
176
|
|
|
@@ -130,11 +178,17 @@ After connecting, return to the chat input and ask a business question. Other us
|
|
|
130
178
|
/database status Show the current connection
|
|
131
179
|
/database test Test the current connection
|
|
132
180
|
/database disconnect Disconnect the current database
|
|
181
|
+
/catalog scan Choose a scope and start a Catalog scan
|
|
182
|
+
/catalog status [--run <run-id>] Show the latest result or a specific run
|
|
183
|
+
/catalog diff Compare the latest two successful snapshots
|
|
184
|
+
/catalog view Open read-only Catalog results grouped by table
|
|
133
185
|
```
|
|
134
186
|
|
|
187
|
+
You do not need to repeat `/catalog status` after a scan starts: the line above the prompt follows technical collection and AI-enrichment progress, then retains the final success/failure state. After completion, run `/catalog view`; use arrows or `j/k` to select and scroll, Tab or ←/→ to switch panes, `/` to search, `a` to switch between the business schema and all schemas, `r` to refresh, and Escape to return. The TUI remains read-only; confirm or delete AI candidates one at a time from Web's Data Catalog.
|
|
188
|
+
|
|
135
189
|
After the agent generates a report, the tool card shows dataset, view, empty-data facts, and the absolute HTML path. TUI does not print a character Dashboard and does not register `/analysis`; open the HTML in a local browser to inspect all six view types and raw data. The file belongs to that tool call, and `/resume` does not re-query the database.
|
|
136
190
|
|
|
137
|
-
When you reopen the
|
|
191
|
+
When you reopen the form in the same session, it first restores that session's latest database type, host, port, user, database, ClickHouse HTTPS, and read-only mode, and restores the credential-reference name from its connected profile. A new session with no configuration uses the most recently connected non-secret profile as editable defaults, but remains disconnected until you confirm the connection. A temporary password always remains masked and is never restored.
|
|
138
192
|
|
|
139
193
|
## How to Ask Better Analysis Questions
|
|
140
194
|
|
|
@@ -161,10 +215,17 @@ DSH must be able to reach the target database from your machine, and the corresp
|
|
|
161
215
|
- MySQL requires the `mysql` client.
|
|
162
216
|
- PostgreSQL requires the `psql` client.
|
|
163
217
|
- Oracle, Hive, and Impala require their respective command-line clients.
|
|
218
|
+
- Apache Doris uses the MySQL protocol on port 9030 by default and requires a `mysql` client with `utf8mb4` support. The first release browses databases and tables in the current/internal catalog only.
|
|
219
|
+
- SQL Server uses port 1433 by default and requires Microsoft ODBC `sqlcmd` 18.x. The first release supports SQL Login only—not integrated/Windows/Entra authentication, DSNs, or named instances.
|
|
220
|
+
- ClickHouse does not require `clickhouse-client`. The plugin uses the bundled official `@clickhouse/client` 1.23.x HTTP adapter: HTTP defaults to 8123; selecting HTTPS defaults to 8443 and retains normal certificate verification. Validate the actual ClickHouse Server/Cloud combination with deployment smoke tests rather than inferring universal Cloud/TLS compatibility.
|
|
164
221
|
|
|
165
222
|
The plugin tries the active profile process PATH first. If that fails, it also checks client HOME environment variables and common Windows, macOS, and Linux installation locations, including Homebrew, MacPorts, Linuxbrew, Snap, Nix, WinGet Links, Scoop, Chocolatey, and versioned Program Files directories. The supplemental PATH used for discovery is also passed to the actual client process, so DSH Desktop launched from Finder normally needs no manual path override for Homebrew clients.
|
|
166
223
|
|
|
167
|
-
|
|
224
|
+
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.
|
|
225
|
+
|
|
226
|
+
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.
|
|
227
|
+
|
|
228
|
+
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:
|
|
168
229
|
|
|
169
230
|
```yaml
|
|
170
231
|
- id: data-agent
|
|
@@ -174,6 +235,14 @@ If a client lives in a company toolchain or another custom directory, add search
|
|
|
174
235
|
searchPaths:
|
|
175
236
|
- /opt/company/mysql/bin
|
|
176
237
|
# command: /opt/company/mysql/bin/mysql
|
|
238
|
+
# args:
|
|
239
|
+
# - --protocol=tcp
|
|
240
|
+
# Doris can override the shared mysql client location:
|
|
241
|
+
# doris:
|
|
242
|
+
# searchPaths: [/opt/company/mysql/bin]
|
|
243
|
+
# SQL Server can override the Microsoft ODBC sqlcmd location:
|
|
244
|
+
# sqlserver:
|
|
245
|
+
# searchPaths: [/opt/mssql-tools18/bin]
|
|
177
246
|
```
|
|
178
247
|
|
|
179
248
|
On Windows, a search path can be written as `C:\Program Files\MySQL\MySQL Server 9.0\bin`. The plugin does not download database clients, run a login shell, or scan the whole disk. A client in an unusual directory that is not on PATH still requires `searchPaths` or `command`.
|
|
@@ -186,9 +255,12 @@ If you see `failed to mount` or a missing `@yejiming/dsh-data-agent` package err
|
|
|
186
255
|
|
|
187
256
|
- Prefer a read-only database account and enable read-only mode in the connection form.
|
|
188
257
|
- Temporary passwords entered in the Web UI or dsh-tui are used only for the current connection. The TUI displays only `*` and never restores the password when the form is reopened.
|
|
189
|
-
- If authentication must be restored across processes,
|
|
258
|
+
- If authentication must be restored across processes, enter a DSH credential reference in the TUI form or pass it with `--password-ref`. The form restores the reference name, but never reads, displays, or persists its resolved password.
|
|
259
|
+
- MySQL/Doris and SQL Server passwords enter only `MYSQL_PWD` and `SQLCMDPASSWORD`, respectively. A ClickHouse password enters only the official HTTP client's authentication field—not the URL, argv, or persisted configuration.
|
|
260
|
+
- Catalog persistence contains only redacted source summaries, system metadata, versions, and human definitions. It never stores passwords, resolved credentials, client stdout/stderr, business query results, or sample rows.
|
|
190
261
|
- When read-only mode is disabled, Data Agent can run update or administrative statements at your request. Before connecting to a production database, review the account permissions and backup policy.
|
|
191
262
|
- Database connections are isolated by session, making it easier to keep different projects, customers, and analysis environments separate.
|
|
263
|
+
- The plugin and ecosystem adapter run inside the DSH process; neither is an OS, process, or realm sandbox. Ecosystem permissions support admission negotiation and do not replace database-account controls, network isolation, or runtime security policy.
|
|
192
264
|
|
|
193
265
|
## Uninstall and Rollback
|
|
194
266
|
|
|
@@ -196,10 +268,15 @@ If you see `failed to mount` or a missing `@yejiming/dsh-data-agent` package err
|
|
|
196
268
|
dsh plugin --profile web remove @yejiming/dsh-data-agent
|
|
197
269
|
dsh plugin --profile desktop remove @yejiming/dsh-data-agent
|
|
198
270
|
dsh plugin --profile dsh-tui remove @yejiming/dsh-data-agent
|
|
199
|
-
rm -rf $DSH_HOME/.agent-presets/data-agent
|
|
200
271
|
```
|
|
201
272
|
|
|
202
|
-
|
|
273
|
+
A normal uninstall removes the plugin from the selected profile and disposes runtime effects. It does not automatically delete the installed Data Mode preset or saved non-secret connection information. To remove the preset explicitly, first verify that `DSH_HOME` points to the intended profile data directory, then run:
|
|
274
|
+
|
|
275
|
+
```sh
|
|
276
|
+
rm -rf "$DSH_HOME/.agent-presets/data-agent"
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Purging connection storage is a separate destructive operation. Back it up first, then use the target DSH profile's storage-management path to remove the `data_agent_connections@1` records. Removing the ecosystem manifest or rolling back the adapter layer requires no data migration; any previously published ecosystem claim must be explicitly expired or revoked.
|
|
203
280
|
|
|
204
281
|
## Local Development
|
|
205
282
|
|
|
@@ -207,16 +284,20 @@ Uninstalling the plugin does not automatically delete saved non-secret connectio
|
|
|
207
284
|
pnpm install
|
|
208
285
|
pnpm build
|
|
209
286
|
pnpm test
|
|
287
|
+
pnpm conformance
|
|
210
288
|
```
|
|
211
289
|
|
|
212
290
|
The prebuilt `lib/` directory is committed to the repository, so npm and GitHub installations do not require a local build.
|
|
213
291
|
|
|
292
|
+
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.
|
|
293
|
+
|
|
214
294
|
## License
|
|
215
295
|
|
|
216
296
|
MIT
|
|
217
297
|
|
|
218
298
|
## Related Links
|
|
219
299
|
|
|
220
|
-
- [dshfind.com](https://dshfind.com): A Chinese
|
|
221
|
-
- [dsh-web-ui](https://github.com/dsh-external/dsh-web-ui):
|
|
222
|
-
- [dsh-cc-tui](https://github.com/dsh-external/dsh-cc-tui): A
|
|
300
|
+
- [dshfind.com](https://dshfind.com): A Chinese-language technical community for the DeepSeek Harness ecosystem, featuring project discovery, practical knowledge sharing, and developer collaboration
|
|
301
|
+
- [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
|
|
302
|
+
- [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
|
|
303
|
+
- [platonai/Browser4](https://github.com/platonai/Browser4): an AI-native browser engine for autonomous agents, intelligent extraction, and large-scale web automation.
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<p align="center">
|
|
28
28
|
|
|
29
|
-
[项目简介](#项目简介) · [主要功能](#主要功能) · [快速安装](#快速安装) · [Web UI](#在web-ui中使用) · [dsh-tui](#在dsh-tui中使用) · [安全说明](#安全说明)
|
|
29
|
+
[项目简介](#项目简介) · [生态规范状态](#生态规范状态) · [主要功能](#主要功能) · [快速安装](#快速安装) · [Web UI](#在web-ui中使用) · [dsh-tui](#在dsh-tui中使用) · [安全说明](#安全说明)
|
|
30
30
|
|
|
31
31
|
</p>
|
|
32
32
|
|
|
@@ -36,18 +36,64 @@ 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.0` |
|
|
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
|
+
|
|
39
58
|
## 主要功能
|
|
40
59
|
|
|
41
60
|
- **通过对话完成数据分析**:直接用自然语言描述目标,DSH会理解问题、拆解分析步骤、查询真实数据并整理结论。你可以继续追问,分析会沿着当前上下文逐步深入。
|
|
42
61
|
- **自动寻找商业洞察**:不仅返回查询结果,还能帮助比较趋势、定位异常、识别高价值客户或商品,并把数据转化为便于业务决策的说明。
|
|
43
62
|
- **跨界面HTML分析报告(render-analysis)**:Agent可在普通工具调用里自主生成单图或Dashboard式综合分析报告(metric/line/bar/pie/scatter/table视图)。每次成功调用都会在当前工作目录的`analysis-reports/`中保存一份离线可打开的HTML;Web同时提供内联预览与“查看分析”Modal,dsh-tui直接返回文件路径。是否画图由Agent按问题判断,schema探查、单标量等查询不会被强制生成图表。
|
|
44
|
-
-
|
|
45
|
-
- **连接常见业务数据库**:支持MySQL、PostgreSQL、SQLite、Oracle、Hive和
|
|
63
|
+
- **共享Web UI与dsh-tui核心路径**:喜欢可视化操作时,可以在Web界面连接数据库、浏览库表和查看结果,推荐使用[zhu1090093659/dsh-web-ui](https://github.com/zhu1090093659/dsh-web-ui);习惯键盘工作流时,可以在终端中使用同一“数据模式”,通过`/database`完成连接,然后直接开始对话分析,推荐使用[ccch1mneyyy/dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI)。两种界面共享数据Agent的数据库服务和工具协议;具体版本与部署仍应分别验证。
|
|
64
|
+
- **连接常见业务数据库**:支持MySQL、PostgreSQL、SQLite、Oracle、Hive、Impala、ClickHouse、Apache Doris和SQL Server,可用于业务系统、分析库、本地数据文件及数仓场景。
|
|
46
65
|
- **DSH自动完成分析闭环**:DSH会根据当前问题查看表结构、编写SQL、执行查询,并结合报错或返回结果继续调整,而不是只生成一段未经验证的SQL。
|
|
47
|
-
- **专注数据任务的数据模式**:会话使用DSH原生`str_replace_editor`处理文件,并保留`sql-query`、`sql-write`、`sql-cmd
|
|
66
|
+
- **专注数据任务的数据模式**:会话使用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_*`等宿主或社区插件工具不会进入数据模式。
|
|
48
67
|
- **安全地使用真实数据**:支持只读模式和数据库只读账号;TUI密码会被隐藏,且不会作为表单草稿恢复。是否允许修改数据由你决定。
|
|
49
68
|
|
|
50
|
-
Web UI还提供按需数据库工作台:点击输入框右上角的数据库按钮,即可在同一个Modal
|
|
69
|
+
Web UI还提供按需数据库工作台:点击输入框右上角的数据库按钮,即可在同一个Modal的“连接配置、库表、数据目录、SQL”四个页签中配置连接、浏览结构、治理口径或临时运行SQL。“数据目录”读取独立的`data_agent_catalog@1`持久化域;只要存在历史snapshot,断开实时数据库后仍可搜索和查看,重新扫描则必须连接到同一个稳定Profile。
|
|
70
|
+
|
|
71
|
+
SQL命令页会把读查询结果显示为带固定表头的结构化表格,并按100行分页,宽表可在结果区内横向滚动。当前结果可导出为Excel(`.xlsx`)、UTF-8 CSV或复制到剪贴板;三种导出都包含已加载的完整结果,单次最多50,000行。写入/管理命令及错误仍显示为文本消息,不会被误解析成表格。
|
|
72
|
+
|
|
73
|
+
### 数据目录与口径治理
|
|
74
|
+
|
|
75
|
+
Catalog扫描是显式人工动作。第一阶段只读取数据库系统目录,不读取业务明细、不保存样例行,也不会为精确行数执行全表`COUNT(*)`;第二阶段调用发起扫描的DSH会话当前配置模型,按表生成表级和字段级业务含义候选。发送给模型的只有表/字段名称、类型、nullable、数据库注释、键和关系等有界技术元数据,不包含样例值、查询结果或凭据。Web可在“数据目录”页选择全库、Schema或单表范围;全库扫描需要二次确认。`/database`和`/catalog`只在当前Cordis组合实际加载`@deepseek-harness-tui/dsh-tui`插件时注册;Profile名称不参与判断,仅安装Data Agent或把Profile命名为`dsh-tui`都不会暴露命令。普通Web组合不展示这两个命令,而是在数据库工作台中完成连接和扫描。dsh-tui使用:
|
|
76
|
+
|
|
77
|
+
Catalog元数据查询使用独立的`catalogMaxResultChars`捕获上限(默认32 MiB),不会再受普通SQL工具较小的`maxResultChars`限制;超过Catalog专属上限时仍会安全失败,并提示缩小扫描范围或调整配置,不会发布被截断的snapshot。
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
/catalog scan 交互选择范围;选择全库时再次确认
|
|
81
|
+
/catalog scan --all 显式全库扫描
|
|
82
|
+
/catalog scan --schema sales 扫描一个Schema
|
|
83
|
+
/catalog scan --schema sales --table orders
|
|
84
|
+
/catalog status [--run <run-id>]
|
|
85
|
+
/catalog cancel [--run <run-id>]
|
|
86
|
+
/catalog diff [--from <run-id> --to <run-id>]
|
|
87
|
+
/catalog view 打开只读全屏目录浏览器
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
扫描在后台运行,同一个source同时只允许一个活动run。在提供公开扩展接口的dsh-tui中,输入框上方会持续显示“技术元数据采集 → 目录发布 → AI业务含义”的实际进度;成功、部分成功或失败终态会一直保留到下一次扫描或打开`/catalog view`,不再依赖短暂通知。`/catalog view`使用全屏只读场景:左侧按表/视图分页,右侧展示表级说明、字段类型与字段级AI业务含义,支持搜索、左右独立滚动、业务Schema/全部Schema切换和刷新;按Esc返回。旧版dsh-tui没有公开状态/scene服务时,扫描命令仍可用,并明确回退到`/catalog status`和Web数据目录。
|
|
91
|
+
|
|
92
|
+
结果按稳定Profile、资产身份和不可变revision保存:未变化对象不复制revision;完整成功的技术扫描只在其精确范围内把消失对象标记为`missing`;单表/Schema扫描不会改动范围外对象,也不会更新最近全库扫描时间;对象重新出现时记录为`restored`。元数据失败、取消、中断或权限不完整的run不会覆盖上一份成功snapshot,权限不确定时也不会把对象误判为删除。AI阶段具有独立的排队、运行、成功、部分成功、失败和取消状态;模型输出保持有界,整表输出触及token上限时会沿用当前模型配置并自动按字段分批重试,只有整张表的字段结果齐全后才写入。AI失败不会抹掉已经成功提交的技术snapshot,也不会把不完整表结果写成候选。
|
|
93
|
+
|
|
94
|
+
数据库事实是`observed`,AI生成的表/字段业务含义以及候选业务术语/指标是`inferred`;只有Web中的人工审核可以基于当前version确认成`verified`。数据目录按表展示表级说明和每个字段说明,用户可以逐项确认或删除;删除会保留审计revision并从默认详情隐藏,后续扫描不会自动复活或覆盖已确认/已删除决策。结构变化会把受影响口径标为`needs_review`,不会自动确认。Agent分析业务问题时先用只读`catalog-search`查找目录,再用`catalog-get`读取技术上下文或`metric-get`读取精确指标版本;目录无命中时再回退到实时Schema探查。目录中的AI候选、数据库注释、人工说明和公式都按不可信参考文本处理。
|
|
95
|
+
|
|
96
|
+
首版不包含定时扫描、业务明细采样、AI自动认证、外部Catalog同步、完整血缘、Catalog级RBAC或扫描结果物理删除。
|
|
51
97
|
|
|
52
98
|

|
|
53
99
|
|
|
@@ -71,7 +117,7 @@ dsh plugin --profile web add @yejiming/dsh-data-agent
|
|
|
71
117
|
dsh plugin --profile web add github:omdsh-dev/dsh-data-agent
|
|
72
118
|
```
|
|
73
119
|
|
|
74
|
-
插件会自动安装“数据模式”预设,并在profile
|
|
120
|
+
插件会自动安装“数据模式”预设,并在profile启动时为所有界面预加载该预设的数据库工具;`/database`与`/catalog`仅由当前组合中实际加载的`@deepseek-harness-tui/dsh-tui`运行时启用,与Profile名称无关。选择预设时不再动态导入插件子路径,无需本地构建。
|
|
75
121
|
|
|
76
122
|
## 在Web UI中使用
|
|
77
123
|
|
|
@@ -88,6 +134,8 @@ dsh --profile web
|
|
|
88
134
|
3. 连接成功后,直接在对话框中提出分析问题。
|
|
89
135
|
4. 根据第一轮结果继续追问,让DSH缩小范围、比较维度或总结结论。
|
|
90
136
|
|
|
137
|
+
未加载`@deepseek-harness-tui/dsh-tui`的Web命令目录不会展示`/database`或`/catalog`;连接、扫描、取消和目录审核均从数据库工作台完成。
|
|
138
|
+
|
|
91
139
|
例如,输入“分析最近30天订单变化,找出销售额下降最明显的地区和商品,并解释主要原因”,DSH会自行查看相关表、生成并执行查询,再根据真实结果完成分析。
|
|
92
140
|
|
|
93
141
|
### 分析报告与HTML文件
|
|
@@ -103,7 +151,7 @@ dsh --profile web
|
|
|
103
151
|
|
|
104
152
|
## 在dsh-tui中使用
|
|
105
153
|
|
|
106
|
-
把Data Agent安装到dsh-tui profile即可;`render-analysis`不要求特定dsh-TUI版本或scene
|
|
154
|
+
把Data Agent安装到dsh-tui profile即可;`render-analysis`不要求特定dsh-TUI版本或scene能力。Catalog持续状态和全屏结果浏览会在dsh-tui提供公开`status`/`scene`扩展服务时自动启用:
|
|
107
155
|
|
|
108
156
|
```sh
|
|
109
157
|
dsh plugin --profile dsh-tui add @yejiming/dsh-data-agent
|
|
@@ -122,7 +170,7 @@ dsh --profile dsh-tui
|
|
|
122
170
|
/database connect
|
|
123
171
|
```
|
|
124
172
|
|
|
125
|
-
连接表单会一次展示所有相关字段。使用Tab或Shift+Tab
|
|
173
|
+
连接表单会一次展示所有相关字段。使用Tab或Shift+Tab切换输入项;数据库类型、ClickHouse HTTPS和只读模式按Enter展开选项,使用方向键选择并再次按Enter确认。网络数据库可以二选一填写临时密码或DSH凭据引用,不能同时填写。
|
|
126
174
|
|
|
127
175
|
连接成功后,回到聊天输入框直接提出业务问题即可。常用的数据库命令还有:
|
|
128
176
|
|
|
@@ -130,11 +178,17 @@ dsh --profile dsh-tui
|
|
|
130
178
|
/database status 查看当前连接
|
|
131
179
|
/database test 测试当前连接
|
|
132
180
|
/database disconnect 断开当前连接
|
|
181
|
+
/catalog scan 交互选择并启动Catalog扫描
|
|
182
|
+
/catalog status [--run <run-id>] 查看最近结果或指定run
|
|
183
|
+
/catalog diff 比较最近两个成功snapshot
|
|
184
|
+
/catalog view 打开按表组织的只读Catalog结果
|
|
133
185
|
```
|
|
134
186
|
|
|
187
|
+
扫描开始后无需反复执行`/catalog status`:输入框上方会持续显示技术采集和AI业务含义进度,并保留最终成功/失败状态。完成后执行`/catalog view`,使用↑↓或`j/k`选择表、Tab或←→切换左右区域、`/`搜索、`a`切换业务Schema/全部Schema、`r`刷新、Esc返回。TUI只提供读取;AI候选的确认与删除仍在Web“数据目录”中逐项完成。
|
|
188
|
+
|
|
135
189
|
Agent生成分析报告后,工具卡会显示数据集、视图、空数据摘要与HTML绝对路径。TUI不会输出字符Dashboard,也没有`/analysis`命令;直接在本机浏览器中打开该HTML即可查看六类视图和原始数据。文件来自本次工具调用,`/resume`不会重新查询数据库。
|
|
136
190
|
|
|
137
|
-
|
|
191
|
+
同一会话再次打开连接表单时,会优先恢复该会话最近填写的数据库类型、地址、端口、用户、数据库、ClickHouse HTTPS和只读模式,并从已连接profile恢复凭据引用。新会话没有自己的配置时,会用最近一次成功连接的非敏感profile作为表单默认值,但仍是未连接状态,必须确认连接后才能查询。临时密码始终隐藏且不会恢复。
|
|
138
192
|
|
|
139
193
|
## 推荐的提问方式
|
|
140
194
|
|
|
@@ -160,10 +214,17 @@ DSH运行查询时需要本机能够访问目标数据库,并安装相应的
|
|
|
160
214
|
- MySQL需要`mysql`客户端。
|
|
161
215
|
- PostgreSQL需要`psql`客户端。
|
|
162
216
|
- Oracle、Hive和Impala需要各自的命令行客户端。
|
|
217
|
+
- Apache Doris通过MySQL协议连接,默认端口9030,需要支持`utf8mb4`的`mysql`客户端;首版只浏览当前/internal catalog中的数据库和表。
|
|
218
|
+
- SQL Server默认端口1433,需要Microsoft ODBC `sqlcmd` 18.x;首版只支持SQL Login,不支持集成/Windows/Entra认证、DSN或命名实例。
|
|
219
|
+
- ClickHouse不需要`clickhouse-client`。插件使用随包安装的官方`@clickhouse/client` 1.23.x HTTP适配器:HTTP默认8123;勾选HTTPS后默认8443并正常验证服务器证书。实际ClickHouse Server/Cloud组合仍应通过部署侧冒烟验证,不能据此推断所有Cloud/TLS配置都兼容。
|
|
163
220
|
|
|
164
221
|
插件会先使用当前profile进程的PATH;找不到时,会继续检查客户端HOME环境变量以及Windows、macOS、Linux的常见安装位置,包括Homebrew、MacPorts、Linuxbrew、Snap、Nix、WinGet Links、Scoop、Chocolatey和Program Files下的版本目录。自动发现使用的补充PATH也会传给实际客户端进程,因此从Finder启动的DSH Desktop通常无需再为Homebrew客户端手工配置路径。
|
|
165
222
|
|
|
166
|
-
|
|
223
|
+
插件调用MySQL或Doris客户端时会内置`--default-character-set=utf8mb4`,确保Windows代码页不会使库名、表名、字段名或查询结果中的中文在进入DSH前乱码,无需在profile中重复配置该参数。
|
|
224
|
+
|
|
225
|
+
SQL Server查询使用T-SQL `TOP`或已有的`OFFSET ... FETCH`限行,绝不会追加`LIMIT`。为避免`sqlcmd`自身脚本能力绕过SQL边界,输入中的`GO`、`!!`、冒号命令和`$(...)`变量替换会在启动客户端前被拒绝。插件不会默认添加`-C`或其他“信任服务器证书”选项。
|
|
226
|
+
|
|
227
|
+
如果客户端安装在公司工具链或其他自定义目录,可在当前profile的`data-agent`配置中补充搜索目录;需要锁定具体版本时则直接填写绝对命令路径,也可通过`args`添加其他CLI参数。当前profile的PATH始终优先,`searchPaths`在系统常见目录之前:
|
|
167
228
|
|
|
168
229
|
```yaml
|
|
169
230
|
- id: data-agent
|
|
@@ -173,6 +234,14 @@ DSH运行查询时需要本机能够访问目标数据库,并安装相应的
|
|
|
173
234
|
searchPaths:
|
|
174
235
|
- /opt/company/mysql/bin
|
|
175
236
|
# command: /opt/company/mysql/bin/mysql
|
|
237
|
+
# args:
|
|
238
|
+
# - --protocol=tcp
|
|
239
|
+
# Doris也可覆盖mysql客户端位置:
|
|
240
|
+
# doris:
|
|
241
|
+
# searchPaths: [/opt/company/mysql/bin]
|
|
242
|
+
# SQL Server可覆盖Microsoft ODBC sqlcmd位置:
|
|
243
|
+
# sqlserver:
|
|
244
|
+
# searchPaths: [/opt/mssql-tools18/bin]
|
|
176
245
|
```
|
|
177
246
|
|
|
178
247
|
Windows路径可以写成`C:\Program Files\MySQL\MySQL Server 9.0\bin`。插件不会下载数据库客户端、执行登录shell或扫描整块磁盘;位于非常规目录且未进入PATH时,仍需使用`searchPaths`或`command`。
|
|
@@ -185,9 +254,12 @@ Windows路径可以写成`C:\Program Files\MySQL\MySQL Server 9.0\bin`。插件
|
|
|
185
254
|
|
|
186
255
|
- 推荐使用数据库只读账号,并在连接表单中开启只读模式。
|
|
187
256
|
- Web UI和dsh-tui中的临时密码只用于当前连接;TUI只显示`*`,重新打开表单时不会恢复密码。
|
|
188
|
-
-
|
|
257
|
+
- 需要跨进程恢复认证时,可以在TUI表单填写DSH credential reference,或通过`--password-ref`传入;表单会恢复引用名,但不会读取、显示或持久化解析后的密码。
|
|
258
|
+
- MySQL/Doris和SQL Server密码分别只传入`MYSQL_PWD`和`SQLCMDPASSWORD`;ClickHouse密码只进入官方HTTP客户端的认证字段,不进入URL、argv或持久化配置。
|
|
259
|
+
- Catalog仅持久化脱敏source摘要、系统元数据、版本与人工口径;不保存密码、credential解析值、客户端stdout/stderr、业务查询结果或样例行。
|
|
189
260
|
- 未开启只读模式时,数据Agent可以按你的要求执行更新或管理语句。连接生产数据库前,请先确认账号权限和数据备份策略。
|
|
190
261
|
- 不同会话的数据库连接相互隔离,便于分别处理不同项目、客户或分析环境。
|
|
262
|
+
- 插件及其生态适配器都运行在DSH进程内,不是OS、进程或realm沙箱;生态permission只能用于准入协商,不能替代数据库账号权限、网络隔离或运行环境安全策略。
|
|
191
263
|
|
|
192
264
|
## 卸载与回滚
|
|
193
265
|
|
|
@@ -195,10 +267,15 @@ Windows路径可以写成`C:\Program Files\MySQL\MySQL Server 9.0\bin`。插件
|
|
|
195
267
|
dsh plugin --profile web remove @yejiming/dsh-data-agent
|
|
196
268
|
dsh plugin --profile desktop remove @yejiming/dsh-data-agent
|
|
197
269
|
dsh plugin --profile dsh-tui remove @yejiming/dsh-data-agent
|
|
198
|
-
rm -rf $DSH_HOME/.agent-presets/data-agent
|
|
199
270
|
```
|
|
200
271
|
|
|
201
|
-
|
|
272
|
+
普通卸载只移除当前profile中的插件并释放运行时 effect,不会主动删除已安装的“数据模式”preset或已经保存的非敏感连接信息。若要显式清理preset,请在确认`DSH_HOME`指向目标profile数据目录后单独执行:
|
|
273
|
+
|
|
274
|
+
```sh
|
|
275
|
+
rm -rf "$DSH_HOME/.agent-presets/data-agent"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
连接存储的彻底清理是另一个破坏性 purge 操作:请先备份,并通过目标DSH profile的存储管理方式删除`data_agent_connections@1`记录。移除生态manifest或回滚适配层不需要迁移现有数据;任何先前发布的生态claim都应明确标记为过期或撤销。
|
|
202
279
|
|
|
203
280
|
## 本地开发
|
|
204
281
|
|
|
@@ -206,16 +283,20 @@ rm -rf $DSH_HOME/.agent-presets/data-agent
|
|
|
206
283
|
pnpm install
|
|
207
284
|
pnpm build
|
|
208
285
|
pnpm test
|
|
286
|
+
pnpm conformance
|
|
209
287
|
```
|
|
210
288
|
|
|
211
289
|
`lib/`已提交到仓库,因此通过npm或GitHub安装时无需自行构建。
|
|
212
290
|
|
|
291
|
+
升级规范基线必须显式更新`conformance/dsh-ecosystem/baseline.json`中的两个revision和固定digest,使用对应的本地checkout离线运行conformance,复核inventory/restriction漂移,并重新执行完整构建与测试。发布证据应运行`pnpm conformance:artifact --output-dir <工作树外目录>`,从真实`npm pack` tarball生成外部sidecar;文档和claim不得超过其中最弱的已验证证据等级。
|
|
292
|
+
|
|
213
293
|
## 许可
|
|
214
294
|
|
|
215
295
|
MIT
|
|
216
296
|
|
|
217
297
|
## 友情链接
|
|
218
298
|
|
|
219
|
-
- [dshfind.com](https://dshfind.com)
|
|
220
|
-
- [dsh-web-ui](https://github.com/dsh-external/dsh-web-ui):DeepSeek Harness
|
|
221
|
-
- [dsh-cc-tui](https://github.com/dsh-external/dsh-cc-tui)
|
|
299
|
+
- [dshfind.com](https://dshfind.com):面向DeepSeek Harness生态的中文技术社区,提供项目发现、实践分享与开发者交流
|
|
300
|
+
- [dsh-web-ui](https://github.com/dsh-external/dsh-web-ui):DeepSeek Harness的可扩展Web UI,支持浏览器端交互以及插件与主题扩展
|
|
301
|
+
- [dsh-cc-tui](https://github.com/dsh-external/dsh-cc-tui):面向DeepSeek Harness的键盘优先全屏终端界面,适用于高效的对话式开发工作流
|
|
302
|
+
- [platonai/Browser4](https://github.com/platonai/Browser4):面向自主智能体、智能信息抽取与大规模Web自动化的AI原生浏览器引擎
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"baselineVersion": "1",
|
|
3
|
+
"specification": {
|
|
4
|
+
"repository": "https://github.com/T-Auto/dsh-ecosystem-spec",
|
|
5
|
+
"revision": "ec80a4be5d92bbb971655afd0f097bb5586a1a28",
|
|
6
|
+
"specVersion": "community-v0.15",
|
|
7
|
+
"profileVersion": "tui-admission/0.15",
|
|
8
|
+
"manifestVersion": "0.15",
|
|
9
|
+
"suiteVersion": "dsh-data-agent-ecosystem/1"
|
|
10
|
+
},
|
|
11
|
+
"dshStd": {
|
|
12
|
+
"repository": "https://github.com/Yan-Zero/dsh-std",
|
|
13
|
+
"revision": "614dfa1ac168db79fcf4577cf0ebb34e2e3b944b",
|
|
14
|
+
"packages": {
|
|
15
|
+
"@dsh-std/sdk": {
|
|
16
|
+
"version": "0.1.0-rc1",
|
|
17
|
+
"integrity": "sha512-qWGGoJ5TZC8uckbpnFcg6mhXV3/YohPOoxCWVkoZPG/vRmmRUfAdG0l5Ci/XPljekHR9dko2747fhk81l6CBaw=="
|
|
18
|
+
},
|
|
19
|
+
"@dsh-std/manifest": {
|
|
20
|
+
"version": "0.1.0-rc1",
|
|
21
|
+
"integrity": "sha512-u4iaXOg8N03tPZYgwPwtrzvy7zODdjriQYolS6SyfYFCo5ojZCsACCPK0NZxQgHTVnQVZr8XMBHt/+GvQ++xmg=="
|
|
22
|
+
},
|
|
23
|
+
"@dsh-std/adapter-dsh": {
|
|
24
|
+
"version": "0.1.0-rc3",
|
|
25
|
+
"integrity": "sha512-FF7h4yXx7hdA5kPegfbTBtpYaQsshzVtMHRXLLKPkgbxqWb8jC9JXVGPsg76TGwIssHydAdZg2Yw3iIWdTHVcQ=="
|
|
26
|
+
},
|
|
27
|
+
"@dsh-std/command": {
|
|
28
|
+
"version": "0.1.0-rc2",
|
|
29
|
+
"integrity": "sha512-4kvnTxalYz+osXOh6EuPiJU7wCSV8CrXFeHCwfxaPqse0sWcQVQufXmxIhYdPq02KZzlppuwB9ZJmxhFF5eaKw=="
|
|
30
|
+
},
|
|
31
|
+
"@dsh-std/storage": {
|
|
32
|
+
"version": "0.1.0-rc1",
|
|
33
|
+
"integrity": "sha512-WXIb3v6Gc+6OIsVJS8Bg1PsjRTV5gsWautQRzAAbHh+E2l+ceIVlAH9Ujrvc7n5fQB1emXRHJmylsh2Mjt7PAw=="
|
|
34
|
+
},
|
|
35
|
+
"@dsh-std/presentation": {
|
|
36
|
+
"version": "0.1.0-rc1",
|
|
37
|
+
"integrity": "sha512-5yqXp+QJa/uSQm2IrfriqYGvf6EvmUCluWIRkH6hTJNNhYMcTUb3aFhLJCA8SlCt96912zy4LHinUbiYZqfH8A=="
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"sourceDigests": {
|
|
42
|
+
"manifestSchema": "sha256:78392a63585c202ca1fbd262aa17145a320ee99ba72f0a257f99daa752603b33",
|
|
43
|
+
"tuiRegistry": "sha256:c3090dd129aadb06f87b56ad148dfbcec2ce4eed2404dda5eed9cf1dbae51f54",
|
|
44
|
+
"permissionRegistry": "sha256:1e2cfeaa860936f1608cb8a8bffdf6343de6f513645eb98f6765d72157d5a1a7",
|
|
45
|
+
"requirements": "sha256:88afac254990f7278382b6d352d6a9b8c49df9172ca3f2eceea5a5c604c572e6",
|
|
46
|
+
"hostDescriptorSchema": "sha256:4b76c43de2d7f8d0b8e171dd96a7a5c9c7732775e0f552e7345074bf95f5755e",
|
|
47
|
+
"claimSchema": "sha256:447940843bd9324a8864a9cb0018a9a6bc1fd1834865d15419f1e6f85631834f",
|
|
48
|
+
"effectLedgerSchema": "sha256:bfa0ea159daa1ab801053a946eb4c8f902cb96f83851502f7c3ae314d1ee75aa"
|
|
49
|
+
},
|
|
50
|
+
"acceptedFacetApiVersions": ["v1alpha1"],
|
|
51
|
+
"acceptedContracts": [
|
|
52
|
+
"commands.dsh/v1alpha1#Command",
|
|
53
|
+
"storage.dsh/v1alpha1#LocalStorage",
|
|
54
|
+
"presentation.dsh/v1alpha1#UserInteraction"
|
|
55
|
+
],
|
|
56
|
+
"acceptedPermissions": {
|
|
57
|
+
"commands.invoke": "allow"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dependencyInventoryVersion": "1",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"packaged": [
|
|
5
|
+
"@clickhouse/client",
|
|
6
|
+
"@dsh-std/sdk",
|
|
7
|
+
"echarts",
|
|
8
|
+
"fflate",
|
|
9
|
+
"schemastery",
|
|
10
|
+
"zod"
|
|
11
|
+
],
|
|
12
|
+
"peerFamilies": [
|
|
13
|
+
"@deepseek-ai/cordis",
|
|
14
|
+
"@deepseek-ai/dsh-*",
|
|
15
|
+
"react"
|
|
16
|
+
],
|
|
17
|
+
"externalExecutables": {
|
|
18
|
+
"mysql": "mysql",
|
|
19
|
+
"postgres": "psql",
|
|
20
|
+
"sqlite": "sqlite3",
|
|
21
|
+
"oracle": "sqlplus",
|
|
22
|
+
"hive": "beeline",
|
|
23
|
+
"impala": "impala-shell",
|
|
24
|
+
"doris": "mysql",
|
|
25
|
+
"sqlserver": "sqlcmd"
|
|
26
|
+
},
|
|
27
|
+
"httpClients": {
|
|
28
|
+
"clickhouse": "@clickhouse/client"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"build": {
|
|
32
|
+
"commands": ["tsdown", "tsc -p tsconfig.build.json", "tsc -p tsconfig.client.json"],
|
|
33
|
+
"generated": ["lib/**"],
|
|
34
|
+
"patches": ["cordis.patch.yml"],
|
|
35
|
+
"nativeBuildPolicy": {
|
|
36
|
+
"@deepseek-ai/dsh-subprocess-local": false,
|
|
37
|
+
"esbuild": true,
|
|
38
|
+
"node-pty": false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "urn:dsh-tui:host-descriptor:0.15",
|
|
3
|
+
"hostId": "fixture.data-agent.degraded",
|
|
4
|
+
"hostVersion": "0.15-fixture",
|
|
5
|
+
"facetApiVersions": ["v1alpha1"],
|
|
6
|
+
"contracts": [
|
|
7
|
+
{ "apiVersion": "commands.dsh/v1alpha1", "kind": "Command", "definition": { "source": "dsh-std", "package": "@dsh-std/command" }, "permissions": ["commands.invoke"] }
|
|
8
|
+
],
|
|
9
|
+
"runtime": { "location": "local", "generationId": "fixture-degraded-1", "headless": true, "remoteAttach": false },
|
|
10
|
+
"trustLevel": "trusted-in-process",
|
|
11
|
+
"platform": { "os": "fixture", "arch": "fixture", "node": ">=22.19" }
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "urn:dsh-tui:host-descriptor:0.15",
|
|
3
|
+
"hostId": "fixture.data-agent.eligible",
|
|
4
|
+
"hostVersion": "0.15-fixture",
|
|
5
|
+
"facetApiVersions": ["v1alpha1"],
|
|
6
|
+
"contracts": [
|
|
7
|
+
{ "apiVersion": "commands.dsh/v1alpha1", "kind": "Command", "definition": { "source": "dsh-std", "package": "@dsh-std/command" }, "permissions": ["commands.invoke"] },
|
|
8
|
+
{ "apiVersion": "storage.dsh/v1alpha1", "kind": "LocalStorage", "definition": { "source": "dsh-std", "package": "@dsh-std/storage" }, "permissions": ["storage.local.read", "storage.local.write"] }
|
|
9
|
+
],
|
|
10
|
+
"runtime": { "location": "local", "generationId": "fixture-eligible-1", "headless": false, "remoteAttach": false },
|
|
11
|
+
"trustLevel": "trusted-in-process",
|
|
12
|
+
"platform": { "os": "fixture", "arch": "fixture", "node": ">=22.19" }
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "urn:dsh-tui:host-descriptor:0.15",
|
|
3
|
+
"hostId": "fixture.data-agent.rejected",
|
|
4
|
+
"hostVersion": "0.15-fixture",
|
|
5
|
+
"facetApiVersions": ["v1alpha1"],
|
|
6
|
+
"contracts": [
|
|
7
|
+
{ "apiVersion": "storage.dsh/v1alpha1", "kind": "LocalStorage", "definition": { "source": "dsh-std", "package": "@dsh-std/storage" }, "permissions": ["storage.local.read", "storage.local.write"] }
|
|
8
|
+
],
|
|
9
|
+
"runtime": { "location": "local", "generationId": "fixture-rejected-1", "headless": true, "remoteAttach": false },
|
|
10
|
+
"trustLevel": "trusted-in-process",
|
|
11
|
+
"platform": { "os": "fixture", "arch": "fixture", "node": ">=22.19" }
|
|
12
|
+
}
|