Neon Pilot Download

Desktop API Boundary

Neon Pilot's desktop app uses three process boundaries with one clear ownership rule:

> Product APIs do not use Electron IPC. IPC is a native capability adapter. HTTP is the product data plane. WebSocket is the realtime plane.

Protocol split

HTTP: product data and mutations

Use HTTP for renderer, companion, extension, and future remote clients that request product data or perform bounded mutations.

Examples:

HTTP responses must be bounded, paginated, or streamed. Large binary/text payloads should flow as bytes/streams instead of deeply nested objects.

WebSocket: realtime events and control

Use WebSocket for long-lived realtime flows and bidirectional control. The desktop realtime endpoint is /api/realtime; clients send typed subscribe / unsubscribe messages for stream paths and receive small stream, app_event, subscribed, unsubscribed, and error messages. When the Electron renderer is loaded through the neon-pilot://app custom protocol, Chromium cannot resolve ws://app; the shell uses the desktop protocol's text/event-stream adapter for stream subscriptions instead of opening that WebSocket URL.

Examples:

WebSocket messages should be small deltas, invalidations, or control messages. Do not routinely broadcast full sessions lists, transcripts, logs, artifacts, or other large snapshots over WebSocket.

Electron IPC: native/bootstrap only

Use IPC only when the renderer needs Electron or OS capability, or to bootstrap HTTP/WebSocket access.

Allowed IPC surfaces:

IPC payloads should be small. Do not send sessions, transcripts, search results, logs, artifacts, runs/task lists, or app-event snapshots through IPC.

Renderer client rule

Renderer product code should depend on typed clients:

Do not add new product-data methods to the Electron preload bridge. If product data is only available through an internal module, expose it through an HTTP route or WebSocket event/control message instead.

Extension API rule

Extensions should use the public @neon-pilot/extensions SDK and host-provided clients/capabilities. Extension code must not import desktop internals or depend on Electron IPC channels.

Extension frontend code should treat host APIs as product HTTP/realtime capabilities surfaced through the SDK. Extension backend code should use backend context capabilities and shared server modules through stable SDK seams. When an extension needs a missing host capability, add a reusable SDK primitive rather than adding an extension-specific IPC channel.

Performance guardrails

Migration policy

When touching a desktop renderer API method:

  1. If it is product data or a bounded mutation, route it through HTTP.
  2. If it is realtime stream/control, route it through WebSocket.
  3. If it is native OS/Electron functionality, keep it in IPC.
  4. Delete obsolete IPC product handlers and preload bridge methods.
  5. Add/keep tests that enforce payload size and protocol ownership where practical.

The desired end state is a renderer with no Electron IPC dependency for product APIs. IPC remains a small native adapter and bootstrap seam.