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
v0.9.177 HOTFIX: 0.9.176 defined the progress phase map INSIDE the dispatcher after its first use, so every verb raised 'cannot access local variable _PHASES'. Hoisted to module scope
5 files changed
+28−27
BRIDGE_VERSION+1−1@@ -1 +1 @@-0.9.176+0.9.177
adom-bridge-kicad-manifest.json+5−5@@ -1,15 +1,15 @@ { "manifest_version": 1, "name": "kicad",- "version": "0.9.176",- "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.176/adom-bridge-kicad-v0.9.176.zip",- "sha256": "a8cae402c5799a8a05cd0e897b30715be40623c90db3b0d7b811bdce27062774",- "size": 452195,+ "version": "0.9.177",+ "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.177/adom-bridge-kicad-v0.9.177.zip",+ "sha256": "a365efe23c514019617723f8a62885da2feaf26243b52463074231cf84d4da1a",+ "size": 452257, "verbPrefixes": [ "kicad_" ], "healthEndpoint": "/status",- "released_at": "2026-08-19T09:05:16Z",+ "released_at": "2026-08-19T09:21:23Z", "hero": "https://wiki.adom.inc/blob/app/kicad-bridge/kicad-hero.png", "languages": [ "Python",
adom-bridge-kicad-v0.9.177.zipadded⋯ 1 unchanged line ⋯
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "kicad", "displayName": "KiCad EDA",- "version": "0.9.176",+ "version": "0.9.177", "description": "Reverse bridge for KiCad \u2014 board/schematic introspection, lint via kicad-cli, plugin install, multi-instance probe, in-process DRC.", "homepage": "https://wiki.adom.inc/adom/adom-bridge", "author": "Adom Inc.",
server.py+21−20@@ -96,6 +96,27 @@ def _read_bridge_version() -> str: BRIDGE_VERSION = _read_bridge_version() +# ---- #32: MEASURED PROGRESS ON EVERY SLOW VERB ----------------------+# Instrumented centrally rather than per handler: a rule enforced in one+# place cannot be forgotten by the next verb someone adds. The dispatcher+# already knows the verb name and owns the clock, so it stamps the terminal+# progress frame (percent 100 + the real elapsed) and feeds this machine's+# rolling history, which is what makes later estimates "measured".+_PHASES = {+ "launch": "cold_start", "show_symbol": "show_symbol",+ "show_footprint": "show_footprint", "show_3d_chip": "show_3d_chip",+ "show_library": "show_library", "show_schematic": "show_schematic",+ "show_2d_board": "show_2d_board", "show_3d_board": "show_3d_board",+ "show_project": "show_project", "open_symbol_editor": "show_symbol",+ "open_footprint_editor": "show_footprint", "open_3d_viewer": "show_3d_chip",+ "open_board": "show_2d_board", "open_schematic": "show_schematic",+ "install_plugin": "install_plugin", "upgrade": "upgrade",+ "export_gerber": "export", "export_gerbers": "export", "export_step": "export",+ "export_pdf": "export", "export_svg": "export", "export_part": "export",+ "make_part_project": "export", "demo": "demo",+}++ # Populated at startup kicad_info = None # default kicad_info (newest installed) all_kicad_versions: list = [] # every installed version, newest first@@ -823,26 +844,6 @@ def dispatch_command(command: str, args: dict) -> dict: _wfg.end_gui_verb() except Exception: pass- # ---- #32: MEASURED PROGRESS ON EVERY SLOW VERB ----------------------- # Instrumented centrally rather than per handler: a rule enforced in one- # place cannot be forgotten by the next verb someone adds. The dispatcher- # already knows the verb name and owns the clock, so it stamps the terminal- # progress frame (percent 100 + the real elapsed) and feeds this machine's- # rolling history, which is what makes later estimates "measured".- _PHASES = {- "launch": "cold_start", "show_symbol": "show_symbol",- "show_footprint": "show_footprint", "show_3d_chip": "show_3d_chip",- "show_library": "show_library", "show_schematic": "show_schematic",- "show_2d_board": "show_2d_board", "show_3d_board": "show_3d_board",- "show_project": "show_project", "open_symbol_editor": "show_symbol",- "open_footprint_editor": "show_footprint", "open_3d_viewer": "show_3d_chip",- "open_board": "show_2d_board", "open_schematic": "show_schematic",- "install_plugin": "install_plugin", "upgrade": "upgrade",- "export_gerber": "export", "export_gerbers": "export", "export_step": "export",- "export_pdf": "export", "export_svg": "export", "export_part": "export",- "make_part_project": "export", "demo": "demo",- }- # Stamp the version actually used so callers can see which install ran, and # OUR OWN version — 0.9.159: BRIDGE_VERSION only ever reached /health, so no # caller (the dashboard included) could ask which bridge code is running, and