SDI desktop application. Tauri 2 shell that bundles the SDI dashboard SPA,
spawns sdid as a sidecar child process, and points the WebView at the
daemon's HTTP origin so fetch and SSE land same-origin without an IPC relay.
Canonical spec: sdi-plugin/docs/PRD.md.
The desktop shell mirrors the daemon's resolved state into the OS-native chrome so the user can see L3 / L4 / L5 and the active CollaborationPattern at a glance without opening the SPA:
| Surface | Behavior |
|---|---|
| Window title | `SDI · L3 / L4 / L5 / — |
| Tray tooltip + menu | Same composite text plus a Circuit breaker (demote to L3) menu item that hits /autonomy_policies/circuit_breaker (D18). |
| Global shortcut | Cmd+Shift+L on macOS, Ctrl+Shift+L elsewhere — same circuit breaker, accessible regardless of which window has focus. |
| Direct-pattern marker | When any active pattern has kind = 'direct', the title and tooltip render a red direct ⚠ chip — the D23 / D27 anti-pattern badge surfaces all the way out to the OS. |
The pattern monitor hydrates once via GET /patterns/active on startup, then
listens to the /events SSE stream (pattern_created, pattern_lifecycle,
pattern_aborted, pattern_converged, pattern_dissensus) and falls back to
periodic HTTP polling if SSE drops.
All surfaces read state through the daemon's public HTTP API — no back-channel — so what the tray reports is exactly what the SPA and the CLI see.
scenario-driven/ # wrapper (not a git repo)
├── sdi-plugin/ # Claude Code plugin + Rust workspace (cli, daemon, mcp, core, db)
│ # plugin/web/ — dashboard SPA, bundled by this shell
├── sdi-desktop/ # this repo
└── sdi-docs/ # Astro/Starlight landing + bilingual guide site
One-way dependency:
sdi-desktop → sdid binary (resolved via SDI_DAEMON_BIN env, plugin layout, XDG, PATH — see src/daemon.rs)
sdi-desktop → sdi-plugin/plugin/web/dist (bundled at build time via tauri.conf.json `frontendDist`)
sdi-plugin ──nothing── sdi-desktop (no reverse dependency)
Prerequisites:
sdi-plugincloned as a sibling directory (../sdi-plugin); runpnpm install && pnpm buildinplugin/websoplugin/web/distexists.tauri-buildvalidatesfrontendDisteven forcargo check, so the dist must be present before any compile.sdidbinary available — either built fromsdi-plugin(cargo build -p sdi-daemon --release) or installed under~/.local/share/sdi/bin/, or on$PATH.
cargo check # structural check (requires the SPA dist; sdid not needed)
cargo tauri dev # spawns the SPA dev server (pnpm --dir ../sdi-plugin/plugin/web dev) + sdid sidecar
cargo tauri build # bundles ../sdi-plugin/plugin/web/dist into the desktop binaryOverride the daemon binary at runtime:
SDI_DAEMON_BIN=/custom/path/sdid cargo tauri dev
SDI_NO_AUTOSPAWN=1 cargo tauri dev # rely on an already-running daemonMIT.