/* * SysDeck — shared bridge.js * * Provides the `bridge` and `EventBus` objects that each SysDeck Cockpit * plugin imports. Wraps cockpit.spawn() calls to the Python bridge helpers * under /usr/lib/sysdeck/bridge/ (invoked as `python3 -m sysdeck.bridge.`). * * COCKPIT.JS LOADING CONTRACT (verified from cockpit source code): * - pkg/base1/cockpit.js is a UMD/IIFE script that sets `window.cockpit` * as a global. It is NOT an ES module — it has no `export` statements. * - Plugins load it via `` in * their index.html (see pkg/systemd/index.html for the reference pattern). * - At build time, cockpit's esbuild plugin (build.js:71-83) rewrites * `import cockpit from "cockpit"` in plugin source to * `module.exports = cockpit` — i.e., a reference to the global. * - SysDeck plugins don't go through esbuild, so we access the global * `window.cockpit` directly. The index.html already loads cockpit.js * via