app
Altium - the Altium Bridge
Public Made by Adomby adom
Adom Bridge for Altium Designer: a resident DelphiScript agent gives the AI eval, the 1,100-command process launcher, all 8 EDA surfaces with screenshots, compile/ERC, DRC, OutJob outputs, native SchLib/PcbLib authoring with STEP 3D bodies, and dialog handling by PID.
← Commit history
skills: the runtime is Rust now — dev deploy loop is cargo cross-compile + send_files + bridge_kill (with the port-squat trap from the 0.2.0 swap); plan skill's bridge.json example shows spawn.kind exe
2 files changed
+24−13
skills/altium-bridge-dev/SKILL.md+18−10@@ -6,11 +6,11 @@ description: >- resident DelphiScript agent architecture (file-drop REPL, per-digest generations, stale-agent auto-restart), the dialog pre-emption doctrine (the debugger breaks on ANY exception, so a raise IS a modal), the transaction-hygiene rule (dangling PreProcess = "a- command is currently active"), the deploy loop (write_file into the bridge cache + agent_stop- before agent_start, bridge_kill to reload the Python), and the engine-halting identifier- list. Read before editing agent/AdomAgent.pas.tmpl or server.py. Trigger words — edit altium- bridge, altium agent template, delphiscript agent, deploy altium bridge, altium engine halt,- undeclared identifier altium.+ command is currently active"), the deploy loop (cross-compile bridge-rs + send_files the exe+ into the bridge cache + bridge_kill; agent_stop before agent_start for template changes), and+ the engine-halting identifier list. Read before editing agent/AdomAgent.pas.tmpl or+ bridge-rs/src/. Trigger words — edit altium bridge, altium agent template, delphiscript+ agent, deploy altium bridge, altium engine halt, undeclared identifier altium, bridge-rs. --- # altium-bridge-dev@@ -26,11 +26,19 @@ Everything you need to change the bridge without re-learning what this session p - **Per-digest generations**: the tmpl is rendered to `AdomAgent_<digest>.pas`; the digest is hashed from the RAW template (NOT the rendered source — that recursed and crashed the bridge once). The heartbeat carries `gen`; `agent_start` auto-restarts a stale in-Altium loop.-- **Deploy loop**: edit `src/agent/AdomAgent.pas.tmpl` or `src/server.py` → `write_file` into- `C:\Users\john\AppData\Local\Adom Bridge\bridges-cache\altium\` → to load NEW AGENT code,- `altium_agent_stop` THEN `altium_agent_start` (bridge_kill alone leaves the in-Altium loop- running old code); to load NEW PYTHON (server.py/handlers), `bridge_kill` (reloads the- process). Both often needed together.+- **The runtime is RUST (0.2.0+)**: `bridge-rs/` → `altium-bridge.exe`, `spawn.kind: "exe"`.+ `src/server.py` and `src/handlers/` are the retired Python reference — behaviour questions can+ still be answered there, but code changes go in `bridge-rs/src/` (verbs.rs KNOWN is the+ dispatch of record; scripts/release.py lints bridge.json against it and refuses drift).+- **Deploy loop**: edit `bridge-rs/src/` → `cargo test && cargo build --release --target+ x86_64-pc-windows-gnu` → `send_files` the exe into+ `C:\Users\john\AppData\Local\Adom Bridge\bridges-cache\altium\` → `bridge_kill` (respawns the+ exe). Template changes (`src/agent/AdomAgent.pas.tmpl`) additionally need+ `altium_agent_stop` THEN `altium_agent_start` — bridge_kill alone leaves the in-Altium loop+ running old code. TRAP from the 0.2.0 swap: after an in-place bridge_install, the OLD process+ can keep squatting the runtime port while reporting the NEW version (it re-reads+ BRIDGE_VERSION per request), so ab thinks the respawn happened — `process_list` for a+ `server.py`/stale exe on the bridge port and kill it if the reply shape looks wrong. ## Deploying a big template (measured 2026-08-31)
skills/altium-bridge-plan/SKILL.md+6−3@@ -172,14 +172,17 @@ every ab callback with `X-Adom-Caller-Delegate: altium`. ## 4. bridge.json essentials ```jsonc-{ "name":"altium", "displayName":"Altium Designer", "spawn":{"kind":"python","entrypoint":"server.py","port":0,"persistent":true},+{ "name":"altium", "displayName":"Altium Designer", "spawn":{"kind":"exe","entrypoint":"altium-bridge.exe","port":0,"persistent":true,"killImageName":"altium-bridge.exe"}, "verbPrefixes":["altium_"], "statusVerb":"altium_status", "uninstall":"altium_uninstall", "detect":{"hostApp":"Altium Designer","appPathsExe":"X2.EXE","paths":{"windows":["%ProgramFiles%\\Altium\\AD*\\X2.EXE"]}}, "timeouts":{"default":60,"verbs":{"launch":240,"run_outjob":600,"export_step":360,"demo":300}}, "docs":"https://wiki.adom.inc/adom/altium-bridge" } ```-Python binds `ADOM_BIND_HOST`; scratch under `%LOCALAPPDATA%\Adom Bridge\bridges-cache\altium\` with-the kicad retention rule (48 h / 300 files / oldest-first / 10-min rate limit).+Since 0.2.0 the runtime is Rust (`bridge-rs/` → `altium-bridge.exe`, cross-compiled+x86_64-pc-windows-gnu; it started as `spawn.kind:"python"` and the Python source remains in+`src/` as reference). The exe binds `ADOM_BIND_HOST` and takes `--port <n>`; scratch under+`%LOCALAPPDATA%\Adom Bridge\bridges-cache\altium\` with the kicad retention rule+(48 h / 300 files / oldest-first / 10-min rate limit). ## 5. Dialog doctrine for Altium (pre-empt, never sweep)