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.
Releases 350
Standalone per-platform binaries to download and run, no tools needed. The newest is pinned on top.
Stable link for websites and docs: /download/adom/kicad-bridge/latest
All releases showing 121-140 of 350
Captions before a KiCad window appears now name the calling AI thread (John saw one on his laptop and could not tell which thread was opening the editor). The Symbol Editor close used by rescan goes through ab's desktop_close_window (ab 2.1.12+, graceful, never forced) with the local WM_CLOSE as fallback for older ab; responses say editorCloseVia. Bridge owns KiCad, AD owns Windows (wiki #74 item 3).
Wiki #71 (Ray, 0.9.286 run): (1) the posted Enter now goes FIRST to the window holding keyboard focus in KiCad's GUI thread (GetGUIThreadInfo), and wxDataView children count as tree candidates regardless of height, so a short Libraries pane no longer yields zero targets; (2) a navigation that ran out of the call budget returns navigation_unconfirmed_within_budget with the trace and _foreground instead of the 'still coming up' contract about an editor that was already driven; (3) an editor the bridge opened after the library file was last written is never judged stale again, so repeated calls stop re-opening it (staleVeto says so); (4) symbol_editor_did_not_open carries pathwaysTried; navigation_failed responses carry errorCode and resolved fields.
Z-order guard fix: the 0.9.285 guard read AD's window list with the wrong envelope shape and always saw nothing (field test reported 'no window was launched' during a real relaunch). Both the Symbol Editor launch guard and handlers/foreground_guard now read z-order through handlers.kicad_windows, the one parser of AD's desktop_list_windows.
Foreground etiquette on the Symbol Editor launch (wiki #71 field test): before opening or auto-rescan-relaunching the editor the bridge captions why a KiCad window is about to appear, remembers the user's front window, and the moment the new frame exists looks ONCE at the z-order; if the frame landed above a non-KiCad user window it slides the frame back behind it with SetWindowPos(NOACTIVATE) and then leaves the z-order alone for good (alt-tab and taskbar clicks stay the user's). show_library responses carry _foreground with what happened. kicad_install_symbol success now includes kicadParser (KiCad's verdict on the written file).
kicad_set_design_rules: response separates fabRuleViolations (DRC items citing one of the fab's rules by name) from otherViolations, and carries drcSummary; the copper layer count is read per layer entry, not per line, so a one-line (layers ...) block no longer infers 1 layer.
Wiki #73: kicad_list_design_rules and kicad_set_design_rules consume adom/pcb-design-rules at call time (fab, layers, process; layers defaults to the board's copper count; stages .kicad_dru with backup; runs DRC with it). Wiki #62: kicad_list_symbols (bridge inventory + kicadParser), and kicad_show_library resolves an MPN/file name to the real symbol name (exact, case-insensitive, unique prefix) reporting aliasedFrom/aliasHow. Navigation trace no longer implies the filter was not applied when wx answers WM_GETTEXT with ''. kicad-bridge-dev skill records the #71 lessons.
Wiki #71 (Ray's remaining case): on a fresh Symbol Editor the filtered tree lists the symbol but nothing is selected, so the posted Enter has nothing to activate and the posted double-click depends on row geometry (DPI). Ray measured select-then-real-Enter loads it. show_library now adds keyboard-only rounds: Down x1..3 posted to the tree candidates, then Enter, title-verified, still PostMessage only (no focus, no foreground). Success responses carry the navigation trace too, so a re-run shows which round landed.
Wiki #71: kicad_show_library failure responses now carry a per-step navigation trace (search Edit found, parent chain, filter text as read back, tree candidates with class and rect, editor title after Down, after posted Enter, after posted double-click). Ray measured on his box that the tree lists the symbol and a real Enter loads it while the bridge's posted Enter and double-click do not; the trace is how the next build finds which hwnd the Enter must reach.
kicad_install_symbol now passes errorCode (kicad_refuses_symbol), kicadParser and _hint through to the caller; 0.9.279 set them inside add_symbol but the verb wrapper dropped them, so the wire response had errorCode null.
Wiki #71 second cause, measured on ConfRoomROG with KiCad's own parser: one malformed symbol makes KiCad refuse a whole .kicad_sym (Symbol Editor lists the library EMPTY) while the bridge's structural reader called it clean. New handlers/kicad_parse_check.py runs kicad-cli sym export svg (read-only) as KiCad's verdict and inventory. kicad_install_symbol and kicad_install_library refuse a file KiCad refuses before writing (kicad_refuses_symbol / kicad_refuses_library); kicad_adom_library_status, kicad_lint_library and the kicad_show_library error carry kicadParser; kicad_adom_library_heal mode:prune drops the symbols KiCad refuses (dryRun names them, original kept as .pruned.bak). Lint's checkmark now says whether KiCad was consulted. Also measured: KiCad's library index is process-wide; a reopened editor frame keeps the old symbol set until kicad.exe fully restarts.
Wiki #72: kicad_install_library handed a single-part .kicad_sym now returns singlePartFile:true plus a hint naming kicad_install_symbol {filePath}, on both the fresh and already-registered success paths; a real multi-symbol library gets no hint. The verb still does what it did (registers the file as its own library); it just stops being silent about the shared Adom library being untouched.
kicad_adom_library_status: orphanedLibrary now means the orphan holds symbols the registered file lacks (unique-name compare; new orphanMissingFromRegistered and orphanMissingSample). A count compare kept flagging John's orphan after the 0.9.276 merge because its 122 lenient count included 28 duplicate copies. build_release.py refuses a non-semver first argument (a stray flag was once stamped in as the version).
heal merge reads a corrupt orphan tolerantly: the orphaned Adom library on a redirected box had 94 symbols inside the library plus 28 duplicate copies appended AFTER the closing paren (the old appender bug's fingerprint), so the strict gate refused the whole file. The heal SOURCE is now read block by block with a quote-aware depth scan, each block balance-checked on its own, duplicates deduped first-copy-wins and reported; the file WRITTEN still goes through the strict gate. Measured on the real file: 94 unique recoverable, 0 unparseable, 28 dupes.
kicad_adom_library_heal (wiki #71 follow-up, John's call: merge): reconcile a split Adom library by merging every symbol from the orphaned bridge-default file into the registered file KiCad reads, one quote-aware add behind the balance gate with a .bak; dryRun previews; repoint mode kept as the other answer. Never runs on its own. Idempotent, refuses an unbalanced source, never edits or deletes the orphan.
Wiki #71 root cause: on a OneDrive-redirected Documents the bridge used %USERPROFILE%/Documents while KiCad resolves the shell Documents folder, so the bridge wrote and reported symbols in a file KiCad never reads. Fix: kicad_detect resolves user_dir like KiCad (handlers/win_paths), the Adom symbol and footprint libraries are ROW-FIRST (install writes to the file sym-/fp-lib-table registers), adom_library_status reports registeredPath/bridgeDefaultPath/split/orphanedLibrary, and the library_cache_stale verdict is built from that measurement instead of a cache story (both prior explanations were disproved by Ray).
Adopt the insiders tier: bridge.json declares insidersManifestUrl, build_release ships to insiders by default and refuses to publish without a changelog, tools/promote.py moves the public manifest only on a human's attestation. Wiki #72 groundwork.
- Update 40 file(s) (John Lauer)
- Update 40 file(s) (John Lauer)
- Update 40 file(s) (John Lauer)
- Update 40 file(s) (John Lauer)
- Publish 1.0.109 (John Lauer)
- Update 40 file(s) (John Lauer)
- Update 40 file(s) (John Lauer)