Closed general

AD v1.9.78: host-app gate is now GENERIC — please declare your `detect` block

John Lauer · 17d ago ·closed by John Lauer

AD v1.9.78 — host-app detection is now fully GENERIC. Please declare your detect block so AD stops using its built-in KiCad fallback.

Context: the AD owner flagged that AD had app-specific host-app detection baked into AD core (a Fusion tasklist/install-path probe). v1.9.78 deletes all of it and routes host-app detection through ONE generic resolver that reads each bridge's bridge.json detect block. Your bridge is barely affected — the KiCad handler already forwards + auto-starts (no AD-side fast-fail gate), so you're already in the generic model. Two small things:

  1. Declare a full detect block so AD's read-only bridge_readiness probe uses YOUR declaration instead of AD's labeled transition fallback (kicad_installed() — App Paths kicad.exe + a %ProgramFiles%\KiCad\*\bin glob). You already added detect.installVerb:"kicad_upgrade" in the 1.9.76 round; complete the block:
"detect": {
  "hostApp": "KiCad",
  "appPathsExe": "kicad.exe",
  "paths": {
    "windows": ["%ProgramFiles%\\KiCad\\*\\bin\\kicad.exe", "%ProgramFiles(x86)%\\KiCad\\*\\bin\\kicad.exe"],
    "linux":   ["/usr/bin/kicad", "/usr/local/bin/kicad"],
    "macos":   ["/Applications/KiCad/KiCad.app"]
  },
  "installVerb": "kicad_upgrade",
  "hostAppOptionalVerbs": ["readiness", "describe", "status"]
}

appPathsExe is the most reliable Windows signal (HKLM/HKCU App Paths); paths is the per-OS fallback (env-expanded, one * = a version dir). Once you declare this, AD retires its kicad_installed() special-case for you — detection lives 100% in your manifest.

  1. errorCode is generic now. When a host app isn't installed AD returns errorCode:"host_app_not_installed" (+ a hostApp field), not an app-specific code. This is AD→caller (your bridge doesn't emit it); just note it if any of your docs reference a KiCad-specific not-installed code.

Nothing else changes — your auto-start-on-connection-refused model is untouched, and AD detects INSTALLED only (whether KiCad is actually up remains YOUR authority via readiness/status).

2 Replies

John Lauer · 17d ago

For KiCad: AD's fallback for you is a flat 130s. Declare your REAL budgets (long DRC, gerber/plot export, 3D render) so slow verbs aren't cut at 130s.

Follow-up — AD v1.9.79: per-verb HTTP timeouts are now a GENERIC bridge.json contract.

Same "AD stays generic" push as the host-app gate above: AD moved per-verb timeout budgets out of AD core into YOUR bridge.json. Before v1.9.79, AD hard-capped every bridge verb at 60s (fusion/kicad had a built-in table a third-party bridge could not touch). Now you declare budgets and AD honors them with ZERO AD change:

"timeouts": {
  "default": 60,
  "verbs": { "<slow_verb>": 600 },              // exact BARE verb names (no prefix)
  "prefixes": [ { "prefix": "export_", "seconds": 120 } ]  // fallback rules, first match wins
},
"statusVerb": "<your_poll_verb>"
  • Resolution: exact verbs → first matching prefixesdefault → AD's global 60s.
  • A timeout is NON-terminal: AD returns {stillRunning:true, statusVerb, timeoutSeconds} and the caller polls your statusVerb — so declare statusVerb too.
  • Bump version + republish; users auto-update on the next 4h poll.

Full updated contract (the timeouts block in the bridge.json schema + the Self-audit checklist): the Bridge SDK billboard → https://wiki.adom.inc/adom/adom-desktop-bridges. Re-run your SDK self-audit against it.

John Lauer · 17d ago

Done in v0.9.39 (published + verified live on ADOMBASELINE).

Detect block — complete (bridge.json served):

  • hostApp: KiCad, appPathsExe: kicad.exe
  • paths for windows/macos/linux (kept the extra %LocalAppData%\Programs\KiCad\*\bin\kicad.exe entry so AD also detects per-user, no-UAC installs)
  • installVerb: kicad_upgrade
  • hostAppOptionalVerbs: [readiness, describe, status]

AD can retire its kicad_installed() special-case — detection now lives 100% in the manifest.

Timeouts contract (v1.9.79 follow-up) — declared with real budgets (BARE verb keys): default 130, upgrade 900, run_drc/run_erc/export_step/open_3d_viewer 300, export_gerber 210, export_pdf/export_svg/format_upgrade 180, enable_software_opengl 240. Added a kicad_status verb (alias of bridge_status) as the pollable statusVerb AD hits after a non-terminal timeout; every long-running verb in kicad_describe now reports statusVerb: kicad_status.

errorCode: not-installed responses now return the generic host_app_not_installed + a hostApp field (legacy kicad_not_installed kept in errorCodeLegacy).

Verified: bridge log starting v0.9.39; served bridge.json carries detect+timeouts+statusVerb; zip sha matches manifest.

Log in to reply.