Open SDK betaOpen SDK beta
Airglow SDK
The contract SDK beta builders use: app contexts, runtime boundaries, SDK APIs, server RPC, permissions, and local debugging.
What This Is
Airglow SDK is the private browser runtime contract for Airglow apps. The SDK is injected by the extension into sandboxed app contexts; app code never imports or ships its own SDK runtime.
| Decision | Beta contract |
|---|---|
| Distribution | Public dev-kit, docs, examples, and TypeScript declarations for SDK beta builders. |
| Runtime owner | The extension owns and injects globalThis.airglow into userscripts, startup, and UI contexts. |
| SDK version | airglow.sdkVersion is 0.1.0-beta.1 for the open SDK beta contract. |
| Server role | The hosted app server serves manifests, app artifacts, settings, health/version endpoints, and RPC functions. |
| Developer promise | SDK beta builders can rely on the documented airglow.* API, app anatomy, local workflow, and compatibility notes. |
Runtime Contexts
| Context | Runs where | Purpose | SDK transport |
|---|---|---|---|
| Userscript | Third-party page, USER_SCRIPT world | DOM automation, page UI injection, data extraction | chrome.runtime.sendMessage |
| Startup | Offscreen sandbox iframe | One-time platform registration such as redirects or iframe allowances | postMessage through the startup runner |
| UI | Sandbox iframe inside extension app-shell | React SPA for workflows, settings, dashboards, and review UIs | postMessage through app-shell |
| Server RPC | Next.js serverless route | Server secrets, paid APIs, OAuth exchange, slow work | No SDK on the server |
No `chrome.*` in app code
App code only uses airglow.*. Privileged browser APIs stay behind the extension message handler so the platform can enforce app identity and permissions.
SDK Beta Scope
- The SDK runtime is injected by the Airglow extension; apps should not bundle their own copy.
- The documented
airglow.*surface is the API app developers should code against. - Docs, TypeScript declarations, and examples are part of the developer contract.
- Local development may expose debug routes and verbose logs that are not part of the browser SDK API.