@yejiming/dsh-data-agent 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +2 -0
- package/README.md +2 -0
- package/dsh-plugin.json +1 -1
- package/lib/index.js +3 -1
- package/package.json +2 -1
- package/preset/data-agent/agent.cordis.yml +3 -1
package/README.en.md
CHANGED
|
@@ -69,6 +69,8 @@ dsh plugin --profile dsh-tui add @yejiming/dsh-data-agent
|
|
|
69
69
|
|
|
70
70
|
### 3. Start Analyzing
|
|
71
71
|
|
|
72
|
+
On the first start after a plugin upgrade, recognized, unmodified legacy `data-agent` presets are updated automatically to supply the `persona.config.prefix` required by newer DSH versions while retaining `text` for older hosts. Customized presets are never overwritten. If startup reports `$.prefix missing required value`, back up `$DSH_HOME/.agent-presets/data-agent/agent.cordis.yml` (`DSH_HOME` defaults to `~/.dsh`), give `prefix` the same prompt as the existing `text` in the persona config, and restart.
|
|
73
|
+
|
|
72
74
|
#### Method 1: Web Interface (Recommended)
|
|
73
75
|
Start the Web console, create a new session, and select **"Data Mode"**:
|
|
74
76
|
```bash
|
package/README.md
CHANGED
|
@@ -69,6 +69,8 @@ dsh plugin --profile dsh-tui add @yejiming/dsh-data-agent
|
|
|
69
69
|
|
|
70
70
|
### 3. 开始分析
|
|
71
71
|
|
|
72
|
+
升级插件后首次启动会自动更新已识别的原版 `data-agent` 预设,使其兼容新版 DSH 必填的 `persona.config.prefix`,同时保留旧版 DSH 使用的 `text`。自定义过的预设不会被覆盖;若启动报 `$.prefix missing required value`,请备份 `$DSH_HOME/.agent-presets/data-agent/agent.cordis.yml`(默认位于 `~/.dsh`),在 persona 的 config 中让 `prefix` 与原 `text` 使用相同提示词,再重启。
|
|
73
|
+
|
|
72
74
|
#### 方式一:Web 界面(推荐)
|
|
73
75
|
启动 Web 控制台后,新建会话并选择 **「数据模式」**:
|
|
74
76
|
```bash
|
package/dsh-plugin.json
CHANGED
package/lib/index.js
CHANGED
|
@@ -532,7 +532,9 @@ async function installPreset(ctx, presetId) {
|
|
|
532
532
|
const LEGACY_MANAGED_PRESET_SHA256 = /* @__PURE__ */ new Set([
|
|
533
533
|
"bae875a90d638ea78715030246b0f8a9f1a2c3359ca61febb6ceb59d0fcd930a",
|
|
534
534
|
"d3c6f4049580069eec1c6b7de101f12c7fb30482ad317434afb69afb08a91fc6",
|
|
535
|
-
"11c4b5ef62c5934d1dc7133950bd78622dd68dc4e1075b5f24d0789011d6da9d"
|
|
535
|
+
"11c4b5ef62c5934d1dc7133950bd78622dd68dc4e1075b5f24d0789011d6da9d",
|
|
536
|
+
"1e42e007ad4cac04af95a67a5af1b7a0b02cc0f78e21d2da35461309db8dc9db",
|
|
537
|
+
"2c5a8fc07dd49d0c10d6d10f0056da2d84575f47b47d4b28bc0e37f7d166413a"
|
|
536
538
|
]);
|
|
537
539
|
/** Public for regression tests of the non-destructive preset migration gate. */
|
|
538
540
|
function isLegacyManagedPreset(source) {
|
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.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -209,6 +209,7 @@
|
|
|
209
209
|
"@testing-library/react": "^16.3.2",
|
|
210
210
|
"@types/node": "^25.0.0",
|
|
211
211
|
"@types/react": "~18.3.1",
|
|
212
|
+
"js-yaml": "4.3.1",
|
|
212
213
|
"jsdom": "^30.0.1",
|
|
213
214
|
"lightningcss": "^1.32.0",
|
|
214
215
|
"react": "^18.2.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
- id: persona
|
|
24
24
|
name: '@deepseek-ai/dsh-persona'
|
|
25
25
|
config:
|
|
26
|
-
|
|
26
|
+
prefix: &data_agent_persona >-
|
|
27
27
|
你是数据工程师 Agent。工作目录 {{cwd}}。可用工具:sql-query(只读 SQL,返回结构化
|
|
28
28
|
JSON 结果)、sql-write(写/管理 SQL,单条自动提交)、sql-cmd(原始客户端输出,兼容
|
|
29
29
|
SHOW TABLES、DESCRIBE users 等命令)、catalog-search(搜索持久化数据目录)、catalog-get
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
不使用LIMIT,也不输出GO、冒号命令、!!或sqlcmd变量;ClickHouse、Doris等支持LIMIT的
|
|
50
50
|
数据库才使用LIMIT。Doris首版只按当前/internal catalog浏览,不臆造外部catalog层级;
|
|
51
51
|
未经真实部署验证,不宣称任意ClickHouse Cloud或TLS组合都可用。
|
|
52
|
+
# DSH before 0.1.3-alpha.2 reads text; both schemas share the same prompt.
|
|
53
|
+
text: *data_agent_persona
|
|
52
54
|
|
|
53
55
|
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
54
56
|
|