dsh-data-insight 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +19 -1
  3. package/package.json +12 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/) 约定。
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.3] - 2026-09-06
8
+
9
+ ### 新增
10
+ - 固定 `@deepseek-ai/dsh@0.1.2-rc.1` 的 `npm run test:compat` 门禁及 Windows/Ubuntu Node 22.19 CI,覆盖隔离 profile 的 add、配置 dump 和有限时长启动。
11
+ - README 将依赖示例更新为 `^0.1.3`,并区分独立脚本与 DSH 宿主的 Node 兼容要求。
12
+ - `prepublishOnly` 钩子:npm 发布前自动运行测试门禁。
13
+
14
+ ## [0.1.2] - 2026-09-02
15
+
16
+ ### 新增
17
+ - `package.json` 补充 `repository` / `bugs` / `homepage` 元数据。
18
+ - GitHub Actions CI(`.github/workflows/ci.yml`):ubuntu + windows 矩阵运行 csv-profile 契约测试。
19
+ - `.editorconfig`:统一缩进 / 换行 / 编码基线(PowerShell 脚本保持 CRLF)。
20
+ - README「排障」章节:DuckDB 只读模式、CLI 缺失、GBK 编码、脏数据核对、Mermaid 本地渲染。
21
+ - `test/fixtures/README.md`:三个 fixture 的场景与验证点说明。
22
+
5
23
  ## [0.1.1] - 2026-08-16
6
24
 
7
25
  ### 修复
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # dsh-data-insight
2
2
 
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-plugin-4c1d95)](https://github.com/topics/dsh-plugin)
5
+ [![dsh-index](https://img.shields.io/badge/dsh--index-dsh--data--insight-blue)](https://dsh-index.xlings.org/packages/dsh-data-insight/)
6
+ [![version](https://img.shields.io/badge/version-0.1.3-green)](CHANGELOG.md)
7
+
3
8
  DSH(DeepSeek Harness)**数据洞察技能插件**:把原始数据变成「业务结论 + 指标数据 + 图表」的结构化 Markdown 分析报告。
4
9
 
5
10
  纯指令型技能插件,零依赖、零构建。计算由宿主已提供的文件 / Shell 工具驱动的 LLM 完成,包内附带一个零依赖的 CSV 探查脚本与完整图表 / 报告规范。
@@ -20,7 +25,7 @@ dsh plugin --profile web add dsh-data-insight
20
25
 
21
26
  或手动两步(在目标 profile 目录下):
22
27
 
23
- 1. `package.json` 的 `dependencies` 加 `"dsh-data-insight": "^0.1.1"`;
28
+ 1. `package.json` 的 `dependencies` 加 `"dsh-data-insight": "^0.1.3"`;
24
29
  2. `dsh.profile.bundles` 数组加 `"dsh-data-insight"`。
25
30
 
26
31
  重启 profile 后,技能 `data-insight-runbook` 出现在技能列表即可用。
@@ -65,6 +70,19 @@ duckdb -readonly -csv -c "SELECT ... LIMIT 5000" "$env:DATA_INSIGHT_DB_URL"
65
70
 
66
71
  安全红线:连接库一律 `-readonly`(写语句会被拦截);连接串走环境变量 `DATA_INSIGHT_DB_URL`;查询默认 `LIMIT 5000`。
67
72
 
73
+ ## 环境要求
74
+
75
+ - 独立 CSV / DuckDB 脚本:Node.js >= 18。
76
+ - DSH 0.1.2-rc.1 宿主:Node.js >= 22.19。
77
+
78
+ ## 排障
79
+
80
+ - **DuckDB 报 `Cannot launch in-memory database in read-only mode`**:无库文件查询(CSV/Parquet)不要加 `-readonly`,见上方示例;`-readonly` 仅用于库文件 / 远程库。
81
+ - **`duckdb: command not found`**:CLI 未安装或不在 PATH,运行对应平台安装脚本(`scripts/setup-duckdb.ps1` / `setup-duckdb.sh`)后重开终端。
82
+ - **CSV 中文乱码**:优先 UTF-8(带 BOM 也能正确处理);GBK 编码文件先用 `iconv -f GBK -t UTF-8` 转码再探查。
83
+ - **指标结论与预期不符**:先用 `node scripts/csv-profile.mjs <file>` 看探查报告里的缺失值 / 重复行 / 异常值分布——样例数据实测中发现过单行脏数据驱动整体暴增、重复行抬高计数、缺失值拉低均值三类问题,探查阶段都能暴露。
84
+ - **Mermaid 图在本地 Markdown 预览不渲染**:`file://` 协议下 CDN 加载的 mermaid.js 受同源策略限制,用 Typora 等本地渲染编辑器打开,或参考 `docs/chart-spec.md` 换用 Markdown 表格 / ASCII 条形图通道。
85
+
68
86
  ## 参考文档
69
87
 
70
88
  - `skills/data-insight-runbook/SKILL.md` — 完整流程与门槛
package/package.json CHANGED
@@ -1,11 +1,21 @@
1
1
  {
2
2
  "name": "dsh-data-insight",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "DSH (DeepSeek Harness) data-insight skill plugin: turn raw data (CSV / pasted table / SQL results / DuckDB) into a structured Markdown report with business conclusions, metrics and charts.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/duyanta123/dsh-data-insight.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/duyanta123/dsh-data-insight/issues"
13
+ },
14
+ "homepage": "https://github.com/duyanta123/dsh-data-insight#readme",
7
15
  "scripts": {
8
- "test": "node --test test/csv-profile.test.mjs"
16
+ "test": "node --test test/csv-profile.test.mjs",
17
+ "test:compat": "node test/dsh-compat.test.mjs",
18
+ "prepublishOnly": "npm test"
9
19
  },
10
20
  "main": "./plugin/index.js",
11
21
  "exports": {