← Commit history

Update 40 file(s)

John Lauer ·cef39b94d1 ·1mo ago ·parent 31ec314
1 file changed +13
server.py+13
@@ -51,6 +51,7 @@ from handlers.bridge_client import handle_bridge_status, handle_bridge_call, han from handlers.launch import handle_launch from handlers.state import handle_state from handlers.uninstall import handle_uninstall+from handlers.pcm import handle_pcm_install, handle_pcm_list, handle_pcm_uninstall from handlers.netlist import (     handle_extract_netlist,     handle_trace_net,@@ -364,6 +365,15 @@ _VERB_CATALOG = {         "hint": "Adds a library to the selected KiCad version's lib table so its parts are usable. Footprint installs take modelsPath (a directory of STEP/WRL files) or auto-detect a 3dmodels/ sibling of the source .pretty (the Adom wiki library-bundle layout): models copy into 3dmodels/<lib>.3dshapes and the COPIED footprints' matching (model ...) refs are rewritten to the installed absolute paths, so 3D previews resolve.",         "related": ["kicad_install_symbol", "kicad_install_footprint", "kicad_list_versions"],         "pitfalls": ["each KiCad version has its OWN lib tables — install under every version the user needs", "restart/reload KiCad to see a newly-added library", "model-ref rewriting touches only the INSTALLED copy, never the source, and only refs whose basename matches an installed model (stock ${KICAD*_3DMODEL_DIR} refs stay)"]},+    "pcm_install": {"summary": "Install a package from a KiCad PCM repository on disk, exactly as the Plugin and Content Manager would (no dialog).", "long": True,+        "hint": "repositoryUrl (a repository.json) + identifier; optional version. Extracts to $KICAD_3RD_PARTY/<folder>/<pkgid>/ and records installed_packages.json. KiCad registers PCM_<lib> rows itself on next load, so a running KiCad must restart (reported, never done).",+        "related": ["kicad_pcm_list", "kicad_pcm_uninstall", "kicad_install_library_bundle"], "pitfalls": ["a RUNNING KiCad does not see the new libraries until restarted", "download is sha256-verified against the repository; a mismatch refuses"]},+    "pcm_list": {"summary": "Packages KiCad's PCM considers installed on this machine (read-only).", "long": False,+        "hint": "Reads installed_packages.json and checks the 3rdparty directories exist.",+        "related": ["kicad_pcm_install"], "pitfalls": []},+    "pcm_uninstall": {"summary": "Remove a PCM-installed package: its 3rdparty directories and its record.", "long": False,+        "hint": "KiCad drops the PCM_ library rows on next load when pcm.lib_auto_remove is on.",+        "related": ["kicad_pcm_install", "kicad_pcm_list"], "pitfalls": ["restart a running KiCad afterwards"]},     "install_library_bundle": {"summary": "Install an Adom wiki Cloud Library bundle zip (symbols + footprints + 3D models) in one call.", "long": False,         "hint": "Pass zipPath (staged on THIS machine via write_file / write_file_chunk) and optionally libraryName (defaults to the zip stem). Unpacks the bundle (<Lib>.kicad_sym + <Lib>.pretty/ + 3dmodels/), installs symbols and footprints, carries the 3D models with ref rewriting, and registers both lib tables. Returns {symbols, footprints, modelsInstalled, kicadRunning, restartNeeded}. capture:true additionally opens a BACKGROUND Symbol Editor on the new library, returns the `shot` frame (thumbnailDataUrl for browsers), and LEAVES the editor open on the library (tree filtered to its name, still behind the user's windows; closeEditor:true restores close-after); skipped with proofSkipped when KiCad was already running (its tables predate the install).",         "related": ["kicad_install_library", "kicad_lint_library", "kicad_open_symbol_editor"],@@ -813,6 +823,9 @@ COMMAND_HANDLERS = {     "enable_software_opengl": handle_enable_software_opengl,     "install_library": handle_install_library,     "install_library_bundle": handle_install_library_bundle,+    "pcm_install": handle_pcm_install,+    "pcm_list": handle_pcm_list,+    "pcm_uninstall": handle_pcm_uninstall,     "install_symbol": handle_install_symbol,     "install_footprint": handle_install_footprint,     "place_footprint": handle_place_footprint,