Skip to content

feat(kicad): add Huaqiu edition and verified live IPC - #154

Open
fxp wants to merge 8 commits into
zai-org:mainfrom
fxp:feat/kicad-huaqiu
Open

fxp wants to merge 8 commits into
zai-org:mainfrom
fxp:feat/kicad-huaqiu

Conversation

@fxp

@fxp fxp commented Nov 3, 2026 •

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
  • Standard plugin / 普通插件(非 UI) — does not provide MCP Apps interactive pages / 不提供 MCP Apps 交互页面
  • Not applicable / 不适用 — repository-only changes; no plugin content changed / 仅仓库级改动,不涉及插件内容

Affected plugin name(s) / 涉及的插件名称:kicad (UI Plugin)

What / 改动内容

  • Add auto, standard, and huaqiu edition selection, including strict explicit-path handling and structured capability diagnostics.
  • Reuse Huaqiu KiCad's normalized public-part library through bounded, read-only ZCode tools without starting DSH as a second harness.
  • Launch the exact selected PCB Editor child, match its process socket, and separately verify that the requested session board is really open.
  • Add live status/snapshot tools and one deliberately narrow unsaved write: moving a single footprint as an undoable KiCad step.
  • Eagerly load the KiCad MCP server so a fresh chat receives all 25 KiCad tools on its first model request, including models without ToolSearch; kicad_capabilities now reports plugin_version.
  • Refresh the board panel when an external/model tool creates, replaces, or closes the KiCad edit session, avoiding a stale edit-path banner when board view and editor open run in parallel.
  • Add hermetic coverage for official/Huaqiu discovery, Huaqiu part/model adapters, locked-board false positives, live IPC, launch diagnostics, fresh-session registration, and edit-session refresh.

The plugin version is bumped to 0.12.3 in the plugin manifest, UI package, and marketplace.json.

Runtime verification / 运行时验证

  • Basic live snapshot, 0.25 mm move, immediate read-back, and restoring move passed on official KiCad 10.0.6 and Huaqiu KiCad 10.0.7 on macOS without saving.
  • Fresh-chat regression passed: before the fix the first request had 68 total / 0 KiCad tools and no ToolSearch; after the fix it had 94 total / 25 KiCad tools, and the first call returned plugin_version=0.12.3.
  • A new ZCode-only composite task read three examples, verified NE555D/74HC595/AP2112K pins and footprints, and synthesized a 70 × 48 mm dual-supply clock/shift/LED controller.
  • Final board: 31 parts plus 4 mounting holes, 27 nets, 269 tracks, 49 vias, 2 zones, 98 pads, 875.51 mm total trace length.
  • Spec converged 10 errors → 1 → 0; routing converged 2 unrouted → 1 → 0; final DRC was 0 errors / 0 unconnected / 0 unrouted.
  • Copper-inclusive GLB covered 31/31 electrical parts; only H1–H4 mounting holes lacked 3D models. Fabrication returned ready_to_order=true, blocking_problems=[] and exported 11 files.
  • Real IPC moved R3 from (14.0, 22.0) to (14.25, 22.0), changed the signature, restored the original position/signature, and kept saved=false. Source and edit-board SHA-256 stayed identical.

Full evidence:

Harness observation / Harness 观察

The same composite prompt was tried twice with GLM-5.3 Max. Both attempts spent 148 s / 139 s planning before the first tool and made zero calls, even after a steering message explicitly required kicad_capabilities first. GLM-5.3 Low called the required first tool in about 12 s and completed 30 KiCad calls in 8m26s. The report preserves this as model/harness data rather than treating it as a plugin failure.

Verification commands / 验证命令

  • pnpm install --frozen-lockfile — passed
  • pnpm --dir ui-plugins/kicad build — passed
  • pnpm --dir ui-plugins/kicad test — 22/22 passed
  • pnpm build — passed
  • python3 scripts/validate.py — 52 plugins validated
  • python3 scripts/build_dist.py — passed; KiCad ZIP SHA-256 prefix 18d4cf4f3a4d
  • git diff --check — clean
  • Existing branch checks: pnpm test, pnpm typecheck, and pnpm lint passed (one pre-existing craft-runtime lint warning).

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/<name>/; existing fixes retain ownership / 插件名唯一且 kebab-case,外部新增插件位于 external_plugins/<name>/,已有插件修复保留原归属
  • Usage category is set independently of publisher ownership / 用途分类 category 已填写,与维护归属分开
  • Plugin type and affected names are declared above / 已在上方声明插件类型与涉及的插件名称
  • version bumped in BOTH plugin.json and marketplace.json (artifacts are immutable) / plugin.json 与 marketplace.json 两处版本号已同步升级(制品不可变)
  • README.md (EN) and README_CN.md (中文) both updated and equivalent / 中英文 README 均已更新且语义一致
  • description_i18n has both en and zh-CN / description_i18n 包含 en 与 zh-CN
  • No secrets, machine-specific paths, or private dependencies / 不含密钥、机器专属路径或私有依赖
  • Model/API/network dependencies documented / 模型、API、网络依赖已写明
  • python3 scripts/validate.py and python3 scripts/build_dist.py pass locally / 本地校验与构建均通过

@panda920

panda920 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

@panda920

panda920 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

@panda920

panda920 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants