RustDesk Bridge — DEV skill (source-only; NOT named SKILL.md)

For whoever edits this bridge. The AI never reads this file — it reads your verb OUTPUT.

THE ONE RULE: rich hints in every verb's output

Every verb MUST return an actionable _hint (+ _next/related/pitfalls where useful) and a stable errorCode on machine-actionable failures. The hint IS the UI.

Architecture

  • server.py — stdlib HTTP server. GET /health + /status → status chip; POST /command {command,args} → dispatch. AD spawns python server.py --port <ephemeral>; parse --port.
  • Verbs wrap the rustdesk.exe CLI (--connect <id> [--password <pw>]) + Windows tasklist/taskkill for session discovery.
  • Cold start: the client is a self-downloaded runtime. rustdesk_prewarm kicks off a background thread; rustdesk_readiness is READ-ONLY (never downloads). No verb blocks on the ~24 MB fetch.
  • bridge.json: port:0, healthEndpoint:/health inside spawn, persistent:true, NO detect (we bring our own runtime; AD infers Python from spawn.kind).

Test locally

python server.py --port 9999, then curl /health + POST /command.