electron — the Electron float runtime environment

Synopsis

The Electron float is a desktop runtime for SLICC that reuses the CLI server in --serve-only mode and injects an overlay shell into any Electron application's window. It combines the full capabilities of the CLI float (WebSocket CDP, unrestricted network, single shell context) with a native desktop app experience.

How It Works

When launched, the Electron float starts the CLI server with --serve-only and a --cdp-port flag. The server does not launch its own Chrome — instead it connects to the Electron app's CDP endpoint. The Electron main process creates a BrowserWindow, loads the target URL, and the overlay injector watches for page targets via CDP, injecting the SLICC overlay shell into each one.

The overlay is a custom element (<slicc-electron-overlay>) rendered inside a Shadow DOM. It provides a collapsible sidebar with tabbed access to chat, terminal, files, and memory — all powered by the CLI server's webapp UI loaded in an iframe.

Default Ports

When launched via Sliccstart, ports are dynamically allocated using a hash of the app path, so multiple Electron apps can run SLICC simultaneously without port conflicts.

Launch Commands

# Dev mode
npm run dev:electron -- /Applications/SomeApp.app

# Via CLI server flags
node dist/node-server/index.js --electron /path/to/app.app --kill --cdp-port=9223

# Via Sliccstart (native macOS GUI)
# Select an Electron app from the list and click "Launch with SLICC"

Overlay Shell Injection

The ElectronOverlayInjector polls CDP for inspectable page targets and connects to each one via WebSocket. For each target it:

  1. Enables Runtime and Page domains
  2. Bypasses CSP with Page.setBypassCSP
  3. Detects the app's theme (light/dark) from a screenshot
  4. Evaluates the overlay bootstrap script, which registers custom elements and injects the overlay

If the app's CSP blocks the overlay iframe, the injector reloads the page with CSP bypass active and re-injects. The overlay re-injects on every did-finish-load and did-navigate-in-page event to survive navigation.

Sliccstart Integration

Sliccstart is a native macOS SwiftUI launcher that can launch the Electron float. It scans for installed Electron apps, manages SLICC installation and updates, and handles debug build creation for apps that block remote debugging. Each app gets its own dynamically allocated port pair (serve + CDP), so multiple SLICC-attached apps run independently.

Differences from CLI Float

Differences from Extension Float

When to Use Electron Float

When to Use CLI Instead

When to Use Extension Instead

See Also

float(1) — overview of all runtime environments. cone(1) — the main agent. scoop(1) — sub-agent isolation.