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
server.py+10@@ -258,6 +258,16 @@ def _resolve_kicad_info_for_command(args: dict) -> tuple[dict, str | None]: def dispatch_command(command: str, args: dict) -> dict: handler = COMMAND_HANDLERS.get(command)+ # Be tolerant of how the host routes verbs: most strip the bridge's verb+ # prefix and send the bare command ("list_versions"), but some forward the+ # full prefixed verb ("kicad_list_versions" / "adomkicad_list_versions").+ # If the bare command isn't found, strip the leading "<prefix>_" once and+ # retry — so the bridge works no matter which name/prefix it's installed+ # under and no matter whether the host strips.+ if handler is None and "_" in command:+ tail = command.split("_", 1)[1]+ if tail in COMMAND_HANDLERS:+ command, handler = tail, COMMAND_HANDLERS[tail] if handler is None: return { "success": False,