import type { PluginManifest } from '@@/plugins/manifest'; // Desktop — this machine's physical screen, mirrored into the browser. // // Extracted from the platform on 2026-08-21, having been switched off since 2026-08-13: the websocket // was commented out in server.tsx, the router in hono.ts, and no `officer-vnc` process was running on // any machine. So this is dormant code moved out of the platform, not a working feature relocated. // // sidecar/ x11vnc against display :0, and the whole VNC contract // api/ one route — the password the UI needs before it can open the socket // web/ the noVNC panel, its header and the wrapper // setup/ the host setup this cannot do for itself — see PLUGIN.md // // ── It mirrors ONE screen, and it is the owner's ── // // x11vnc attaches to the single physical display the owner is logged into. There is no per-user session // here and there cannot be: two accounts granted this would see the SAME screen, which is the owner's, // including whatever is open on it. That is why the permission below is owner-only at every path rather // than merely grantable — the honest answer to "may a member have this" is no, and it is a property of // what the plugin does rather than a policy anyone should be able to relax. export const manifest: PluginManifest = { publisher: 'officerdev', version: '1.0.0', platform: '>=1.0.0', label: 'Desktop', summary: 'Mirror this machine’s display in the browser — the real session, not a second one', icon: 'MonitorSmartphone', color: '#ec4899', permissions: [ { key: 'desktop', label: 'Desktop', description: "The server owner's physical screen, mirrored in the browser", // The whole surface, because every path here reaches the owner's own screen. `/` matches everything // under the plugin's prefix — see `isOwnerOnlyRoute`. // // This is what `kind: 'execution'` said while it was a core permission: "runs as the server owner // and cannot be shared". A plugin permission has no `kind` and deliberately never will, so the // property is expressed as paths instead. The registry entry it replaces is deleted, not both. ownerOnly: ['/'], }, ], // x11vnc is the mirror itself. Declared so a machine without it refuses the install rather than // starting a sidecar that spawns a binary that is not there — and `dbus-x11` because the session it // attaches to needs one. // // NOT declared here: ubuntu-desktop, gdm3, the Xorg switch and auto-login. Those are not a package // check, they are a host reconfiguration that ends in a reboot, and `osDependencies` cannot express // one. `setup/setup-desktop.sh` does it and the owner runs it by hand. See BLOCKERS.md. // // `scope` is deliberately absent, meaning owner: x11vnc is spawned by this plugin's own sidecar, which // runs as the owner. No member ever invokes it, and there is nothing here a member could use. osDependencies: [ { binary: 'x11vnc', reason: 'Mirrors the physical display. Without it the desktop cannot start at all.', packages: { apt: 'x11vnc', dnf: 'x11vnc', pacman: 'x11vnc' }, }, ], };