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.139: parking engages DURING handlers - windows are created before guards arm, so the dispatcher now marks GUI-verb-in-flight and the SHOW hook parks on either signal
6 files changed
+36−9
BRIDGE_VERSION+1−1@@ -1 +1 @@-0.9.138+0.9.139
adom-bridge-kicad-manifest.json+5−5@@ -1,15 +1,15 @@ { "manifest_version": 1, "name": "kicad",- "version": "0.9.138",- "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.138/adom-bridge-kicad-v0.9.138.zip",- "sha256": "7fc82b50e324030b7f99e2026a24b83fee155cfd8ccdde804e8bb5d87f82fe36",- "size": 417196,+ "version": "0.9.139",+ "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.139/adom-bridge-kicad-v0.9.139.zip",+ "sha256": "ffdbca6c6dc884697394d6707772775cee2fddfc9d5917651b0f02766b301b88",+ "size": 417374, "verbPrefixes": [ "kicad_" ], "healthEndpoint": "/status",- "released_at": "2026-08-17T14:19:28Z",+ "released_at": "2026-08-17T14:20:57Z", "hero": "https://wiki.adom.inc/blob/app/kicad-bridge/kicad-hero.png", "languages": [ "Python",
adom-bridge-kicad-v0.9.139.zipadded⋯ 1 unchanged line ⋯
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "kicad", "displayName": "KiCad EDA",- "version": "0.9.138",+ "version": "0.9.139", "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.",
handlers/win_focus.py+14−1@@ -343,6 +343,19 @@ def get_focus_events() -> list: # capture works off-screen; the user sees nothing appear. # --------------------------------------------------------------------------- _parked: dict = {} # hwnd -> (x, y)+_verb_inflight = 0+++def begin_gui_verb() -> None:+ """Dispatcher marks a GUI verb in flight so the SHOW hook parks windows+ created DURING the handler (guards only arm after it returns)."""+ global _verb_inflight+ _verb_inflight += 1+++def end_gui_verb() -> None:+ global _verb_inflight+ _verb_inflight = max(0, _verb_inflight - 1) def _park_offscreen(hwnd) -> None:@@ -410,7 +423,7 @@ def start_focus_event_hook() -> None: try: if id_object != OBJID_WINDOW or not hwnd: return- if _guard_count <= 0:+ if _guard_count <= 0 and _verb_inflight <= 0: return # bridge idle: the polling sentinel owns policy if _t.monotonic() < _expected_fg_until: return # sanctioned foreground in progress
server.py+15−1@@ -756,7 +756,21 @@ def dispatch_command(command: str, args: dict) -> dict: except Exception: _user_fg = None - result = handler(selected_info, args)+ try:+ if command not in _NO_GUI:+ from handlers import win_focus as _wfg+ _wfg.begin_gui_verb()+ except Exception:+ pass+ try:+ result = handler(selected_info, args)+ finally:+ try:+ if command not in _NO_GUI:+ from handlers import win_focus as _wfg+ _wfg.end_gui_verb()+ except Exception:+ pass # Stamp the version actually used so callers can see which install ran if isinstance(result, dict): result.setdefault("kicadVersionUsed", selected_info.get("version"))