app
KiCad - the KiCad Bridge
Public Made by Adomby adom
Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.
← Commit history
capabilities.py+20−22@@ -15,12 +15,15 @@ public KiCad IPC-API roadmap): * KiCad < 9.0 → no IPC API at all. Only kicad-cli (headless convert/ lint/erc/drc) + GUI launch. Symbol/footprint *delivery* works (file + lib-table), but nothing can be driven on the canvas.- * KiCad 9.0 / 10.x → IPC API present but **PCB-editor-focused**. The- board can be driven deterministically (open pcbnew → get_board() →- place). The schematic/symbol editor exposes **no** document/board- handler yet (GetOpenDocuments → "no handler available"), so opening a- *symbol* on the canvas is NOT deterministic — it falls back to- assisted automation.+ * KiCad 9.0 / 10.x → IPC API present and **board automation WORKS**+ (get_board() → place via create_items()+push_commit()). CRITICAL gotcha+ (measured 10.0.1, 2026-06-25): KiCad exposes ONE API socket, owned by+ whichever instance bound it. If the PROJECT MANAGER (kicad.exe) owns it,+ board commands return "no handler available". When **pcbnew is the+ API-owning instance**, get_board() works. So deterministic footprint+ placement requires routing IPC to a pcbnew that owns the socket.+ The schematic/symbol editor has NO IPC handler yet, so opening a+ *symbol* on the canvas stays assisted (Win32) automation. * KiCad 11 (when it ships) → SWIG bindings removed; IPC is the only Python path and is expected to broaden to the schematic/symbol editor. When it does, symbol delivery flips from "assisted" to "ipc" with no@@ -80,23 +83,18 @@ def capability_for_version(info: dict) -> dict: api_enabled = _api_server_enabled(info.get("config_dir")) # What can each artifact kind be driven by, on THIS version?- # "ipc" → deterministic via the IPC API (best path; no AI)- # "assisted" → IPC can't do it yet; needs assisted/AI automation+ # "ipc" → deterministic via the IPC API (best path; no AI). Verified+ # working on 10.0.1 — get_board()+create_items()+push_commit,+ # PROVIDED pcbnew (not the project manager) owns the API socket.+ # "assisted" → IPC can't do it; needs assisted/Win32 automation # "cli" → only file delivery + headless kicad-cli; no canvas drive- if ipc_supported:- automation = {- "footprint": "ipc", # open pcbnew → get_board() → place- "board": "ipc",- "symbol": "assisted", # no schematic/symbol IPC handler yet- "schematic": "assisted",- }- else:- automation = {- "footprint": "cli",- "board": "cli",- "symbol": "cli",- "schematic": "cli",- }+ fp_board = "ipc" if ipc_supported else "cli"+ automation = {+ "footprint": fp_board,+ "board": fp_board,+ "symbol": "assisted", # no schematic/symbol IPC handler yet+ "schematic": "assisted",+ } # Upgrade guidance — the "hey, your KiCad doesn't have the automation # APIs, let's upgrade you" message the user asked for.