Fundamentals

Host Adapters

How OXP integrates with VS Code, JetBrains, Cursor, Windsurf, and other IDEs through host adapters.

A host adapter is a small module that bridges OXP into a specific IDE. It knows how to install, activate, render, and manage OXP extensions using that IDE's own APIs. The adapter is the only OXP-specific code an IDE needs.

Supported Hosts

HostStatusTierNotes
VS Code✅ ShippedL0hosts/vscode/ — reference implementation
Cursor✅ WorksL0VS Code fork; uses the same adapter
Windsurf✅ WorksL0VS Code fork; uses the same adapter
VS Code Insiders✅ WorksL0VS Code fork; uses the same adapter
VSCodium✅ WorksL0VS Code fork; uses the same adapter
JetBrains family🔄 In progressL1hosts/jetbrains/ — IntelliJ Platform plugin
Piye IDE🔄 In progressL2 (native)hosts/piye/ — GPUI-based native renderer
Zed📋 Planned
Theia📋 Planned

---

The VS Code Family Host

The VS Code host adapter (hosts/vscode/) is a standard VS Code extension. Because Cursor, Windsurf, VS Code Insiders, and VSCodium are all forks of VS Code, **the same .vsix package works in all of them**.

The adapter:

  1. Discovers OXP extensions from the shared store (~/.oxp/host-store/)
  2. Activates them by instantiating the WASI component via the jco backend
  3. Renders UI trees using @oxprotocol/ui/dom in a sandboxed webview panel
  4. Mediates host calls through the capability broker
  5. Enforces CSP with per-render nonces (default-src 'none')

Commands

CommandDescription
OXP: Install Extension…Install from the registry
OXP: Show Installed ExtensionsList installed OXP extensions
OXP: Open Extension…Open an installed extension's panel
OXP: Uninstall Extension…Remove an OXP extension
OXP: Attach to Dev Server…Connect to oxp dev for hot-reload
OXP: Reload Installed ExtensionsRe-scan and reload all
OXP: Restart Dev SessionDispose + reconnect (dev mode only)
OXP: Reload BundleRe-instantiate from current dev bundle
OXP: Detach Dev SessionDisconnect dev server, leave window open

Settings

SettingDefaultDescription
oxp.registryhttps://oxp.shRegistry base URL
oxp.useSharedStoretrueUse ~/.oxp/host-store/ so one oxp install works across all IDEs

---

The JetBrains Host

The JetBrains host (hosts/jetbrains/) is an IntelliJ Platform plugin that works across the entire JetBrains family: IntelliJ IDEA, PyCharm, WebStorm, GoLand, Rider, CLion, PhpStorm, DataGrip, and more.

The plugin:

  1. Discovers OXP extensions from the same shared store (~/.oxp/host-store/)
  2. Activates them via the WASI runtime
  3. Renders UI trees in a right-side Tool Window (equivalent to VS Code's sidebar)
  4. Mediates host calls through the same capability broker interface
  5. Exposes commands via Help → Find Action (Ctrl+Shift+A / Cmd+Shift+A)

Because the OXP wire protocol is identical across IDE families, **the same .oxp bundle runs in VS Code and JetBrains without any changes**. The manifest, WIT contract, UI tree, and RPC calls are bit-equivalent.

VS Code Family vs JetBrains Comparison

BehaviorVS Code / Cursor / WindsurfJetBrains (any IntelliJ-Platform IDE)
Extension UI locationActivity bar → Sidebar panelRight tool window, OXP stripe button
Dev EDH spawncode --new-window <workspace>idea / pycharm / … via runtime-bin launcher
Command accessCommand Palette (Ctrl+Shift+P)Find Action (Ctrl+Shift+A)
Output channelOutput panel → OXP Dev HostOXP Dev Host tool window (bottom dock)
Hot-reload mechanismWebSocket → Extension.dispose() + re-instantiateWebSocket → coroutine cancel + re-instantiate
Detach gestureOXP: Detach Dev Session commandTools → OXP → Detach

---

The Shared Store

oxp install places extensions in ~/.oxp/host-store/. Every host adapter — VS Code family and JetBrains — reads from this same directory. A single install makes the extension available everywhere.

~/.oxp/host-store/
└── @publisher/
    └── slug/
        └── 1.0.0/
            ├── oxp.json
            ├── ui/...
            └── .oxp/
                ├── integrity.json
                └── SIGNATURE

---

MCP Client Detection

When oxp install encounters an MCP server registry entry, it writes the server config into each detected MCP-aware client's config file. Clients are detected by checking whether their config parent directory exists:

ClientConfig fileKey
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonmcpServers
Cursor~/.cursor/mcp.jsonmcpServers
VS Code (Copilot)~/Library/Application Support/Code/User/mcp.jsonservers
VS Code Insiders~/Library/Application Support/Code - Insiders/User/mcp.jsonservers
Windsurf~/.codeium/windsurf/mcp_config.jsonmcpServers

All paths follow platform conventions: %APPDATA%\Roaming on Windows, $XDG_CONFIG_HOME on Linux.

---

Integration Tiers

L0 — Sideload (works today)

The IDE does nothing special. OXP installs as a regular extension via the IDE's CLI or extension directory. The VS Code and JetBrains adapters handle everything from within the IDE.

L1 — Registry Adapter

The IDE surfaces oxp.sh results in its built-in extension search. Users discover and install OXP extensions natively. The IDE calls the OXP resolve/install APIs behind the scenes. *(JetBrains target.)*

L2 — Native Renderer

The IDE implements the @oxprotocol/ui component set in its native toolkit — GPUI for Piye, Swing for a future JetBrains L2. The same .oxp bundle gets 120fps native rendering without any webview overhead.

---

Building a Host Adapter

A host adapter needs to:

  1. **Import @oxprotocol/host-core** for the install/verify/activate pipeline
  2. **Import @oxprotocol/host-runtime** for the WASI component runtime
  3. **Import @oxprotocol/ui/dom** (or implement native rendering) for UI
  4. Wire the IDE's command palette, panel system, and settings to OXP's APIs
  5. Provide storage, filesystem, and other host capabilities through the broker