@windypro-rourou/dsh-eda 0.1.2 → 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.
- package/README.md +11 -9
- package/cordis.patch.yml +4 -4
- package/lib/index.js +477 -73
- package/package.json +1 -1
- package/skill/INDEX.md +2 -0
- package/src/json-gen.js +197 -0
- package/src/nl-to-design.js +140 -5
- package/src/validate.js +24 -9
package/README.md
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
## 安装(开箱即用,三步)
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
# 1) 安装到 DSH web profile
|
|
11
|
-
cd ~/.dsh/profiles/web
|
|
10
|
+
# 1) 安装到 DSH web profile(全部 GitHub 源,公开仓库匿名 clone)
|
|
11
|
+
cd ~/.dsh/profiles/web
|
|
12
|
+
git clone https://github.com/WindyPro-rourou/JCL-EDA.git node_modules/@windypro-rourou/dsh-eda
|
|
12
13
|
|
|
13
14
|
# 2) 在 profile 的 cordis.patch.yml 追加一行(已有则跳过)
|
|
14
15
|
- insert:
|
|
@@ -51,38 +52,39 @@ cd ~/.dsh/profiles/web && npm i github:WindyPro-rourou/JCL-EDA
|
|
|
51
52
|
└─ package.json ← @windypro-rourou/dsh-eda(files 含 lib/src/patch;npm i github:… 即装)
|
|
52
53
|
```
|
|
53
54
|
|
|
54
|
-
## 已注册的 agent 工具(
|
|
55
|
+
## 已注册的 agent 工具(21 个)
|
|
55
56
|
|
|
56
57
|
| 工具 | 用途 |
|
|
57
58
|
|---|---|
|
|
58
59
|
| `eda_status` | 插件/官方桥状态(装没装 / 端口 / 是否就绪) |
|
|
59
60
|
| `eda_template_list` / `eda_translate_request` | 模板卡目录 / 中文需求→结构化草稿(离线兜底用) |
|
|
60
|
-
| `eda_generate_schematic_json` | **离线兜底**:需求/模板 → 可导入标准版原理图 JSON +
|
|
61
|
+
| `eda_generate_schematic_json` | **离线兜底**:需求/模板 → 可导入标准版原理图 JSON + 结构/连通性校验(**9 种符号**:电阻/LED/电容/二极管/开关/电感/晶振/电池/保险丝 + 网络标签) |
|
|
61
62
|
| `eda_bridge_install` / `eda_backend_connect` | 一键安装官方桥 / 启动·连接官方桥 |
|
|
62
63
|
| `eda_exec` | **云端实时生成的双手**:执行任意官方 `eda.*` 代码(需已连接;自动记录新建图元→可撤回) |
|
|
63
|
-
| `
|
|
64
|
+
| `eda_place` / `eda_wire` / `eda_netflag` / `eda_save` | **确定性封装**:搜索+定位+放置一体(返回引脚坐标)/ 引脚级连线(自动校验)/ 电源地网络标志 / 保存当前文档 |
|
|
65
|
+
| `eda_pick_spot` | **框内定位**:读页面尺寸+已有图元 → 返回互不冲突的框内网格空位(sch/pcb 双模式) |
|
|
64
66
|
| `eda_capabilities` | **能力清单**:官方 eda.* API 结构化目录(域/方法/用法/坑/实测片段)——agent 主动查询 |
|
|
65
67
|
| `eda_board_overview` | **画板全览**:当前文档图元/网络/页面尺寸摘要(agent 的眼睛,画前画后都可用) |
|
|
66
68
|
| `eda_trace` | **现场截图**:缩放适配 → PNG 存 `~/.dsh/eda/shots/`(效果确认/视觉留档) |
|
|
67
69
|
| `eda_snapshot` | **紧急保存**:画板现场(`.epro2`+SVG 预览+网表/BOM)+ 动作日志 → `~/.dsh/eda/snapshots/` |
|
|
68
70
|
| `eda_verify` | **一键验收**:DRC + 网表 + BOM 一次返回(画完即验) |
|
|
69
|
-
| `eda_skill_read` | **官方 skill 全库查阅**:读 SKILL.md / references/classes/*.md / guide 等官方文档(写 eda.*
|
|
71
|
+
| `eda_skill_read` | **官方 skill 全库查阅**:读 SKILL.md / references/classes/*.md / guide 等官方文档(写 eda.* 前必查;线上镜像 prodocs.easyeda.com) |
|
|
70
72
|
| `eda_sch_drc` / `eda_get_netlist` / `eda_get_bom` | DRC(verbose)/ 网表(File.text)/ BOM(二进制 xlsx→base64) |
|
|
71
73
|
|
|
72
74
|
**生命周期**:插件加载时若检测到官方桥已安装,**自动启动并自动连接**(无需人工);面板实时显示 装没装 / 端口 / 是否就绪。
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
**限制(诚实说明)**:离线生成器支持 **9 种符号 + 6 个模板**(LED 点亮/分压/RC 延时/二极管续流/电池开关 LED/去耦/开关演示),更复杂符号(三极管/IC 等)待扩展;云端实时生成能力以官方 `eda.*` API 为准(**已知边界见 `docs/eda-conversation-skill.md` 附五缺陷速查表**:importChanges/setNetlist 不可靠、板框无 API、getNetlist('EasyEDA') 挂起、getAll 间歇失败等)。
|
|
75
77
|
|
|
76
78
|
## 如何运行 / 开发
|
|
77
79
|
|
|
78
|
-
> 见上方「安装(开箱即用,三步)」。开发自检:`npm run test:all
|
|
80
|
+
> 见上方「安装(开箱即用,三步)」。开发自检:`npm run test:all`(插件 60+ 例 + 生成器 14 例 + 自检)与 `npm run check`;发布:`node scripts/publish.mjs [--dry]`(需 `$env:NPM_TOKEN`);**发版**:`node scripts/release.mjs --version=<新版本>`(自动 bump → npm publish → git commit+tag+push;push 走系统凭据管理器 + 自动探测代理;打 tag 后 CI 自动发布)。插件规范详见 `docs/plugin-spec.md` 与 `docs/plugin.md`。
|
|
79
81
|
|
|
80
82
|
## 当前进度
|
|
81
83
|
|
|
82
84
|
- [x] DSH 插件规范 + 官方桥(easyeda-api-skill)安装/启动/连接/自愈
|
|
83
85
|
- [x] 云端实时全流程真机验证(esp32_multitool):14 大类放置(原理图+PCB)、引脚级连线、焊盘级布线、DRC/网表/BOM、PCB 元件/过孔/走线、截图、紧急保存(详见 `docs/verification-report.md`)
|
|
84
86
|
- [x] 面板记录式时间线(持久化/撤回/清空)+ 紧急保存 + 框内定位 + 能力清单
|
|
85
|
-
- [x] 安装发布链路:`
|
|
87
|
+
- [x] 安装发布链路:`git clone https://github.com/WindyPro-rourou/JCL-EDA.git`(GitHub 源开箱即用)· npm registry 仅作发布镜像;版本随 release 脚本一致(tag v* 自动发布)
|
|
86
88
|
|
|
87
89
|
**测试(全部通过)**:插件 52/52、生成器 14/14、自检 OK、v6 样本 62/62 + 13/13。
|
|
88
90
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @windypro-rourou/dsh-eda bundle patch: inserts the JCL-EDA plugin row into
|
|
2
2
|
# the web profile roster. Applied as a profile bundle layer over dsh-base.
|
|
3
|
-
# Install
|
|
4
|
-
# into the profile's node_modules, then insert the row
|
|
5
|
-
# DSH Web GUI. The node half (exports ".") runs in the host
|
|
6
|
-
# (/api/dsh-eda routes, agent tools, system-prompt section); the `dsh.client`
|
|
3
|
+
# Install (GitHub 源): git clone https://github.com/WindyPro-rourou/JCL-EDA.git
|
|
4
|
+
# into the profile's node_modules/@windypro-rourou/dsh-eda, then insert the row
|
|
5
|
+
# below and restart the DSH Web GUI. The node half (exports ".") runs in the host
|
|
6
|
+
# process (/api/dsh-eda routes, agent tools, system-prompt section); the `dsh.client`
|
|
7
7
|
# declaration in package.json makes the browser half (exports "./client",
|
|
8
8
|
# served at /plugins/@windypro-rourou/dsh-eda/client.js) load in the web GUI.
|
|
9
9
|
- insert:
|