Fundamentals

Host Adapters

How OXP integrates with VS Code, Cursor, 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

HostStatusTierPackage
VS Code✅ ShippedL0@oxprotocol/host-vscode
Cursor✅ Works (VS Code fork)L0Same as VS Code
Windsurf✅ Works (VS Code fork)L0Same as VS Code
VSCodium✅ Works (VS Code fork)L0Same as VS Code
Piye IDE🔄 In progressL2 (native)hosts/piye/
JetBrains📋 Planned
Zed📋 Planned
Theia📋 Planned

The VS Code Host

The VS Code host adapter (hosts/vscode/) is a standard VS Code extension that:

  1. Discovers installed 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 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

Settings

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

The Shared Store

By default, oxp install places extensions in ~/.oxp/host-store/. Every host adapter reads from this directory. This means a single install command makes the extension available in VS Code, Cursor, Windsurf, and any other host on the machine.

The directory structure is:

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

Integration Tiers

L0 — Sideload (works today)

The IDE does nothing special. OXP installs as a regular extension via the IDE's own CLI or extension directory. The VS Code adapter handles everything.

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.

L2 — Native Renderer

The IDE implements the @oxprotocol/ui component set in its native toolkit (e.g., GPUI for Zed, Swing for JetBrains). 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