@zaflun/lumio-protocol
v0.1.1
Published
Wire-format types for Lumio extension iframe-to-host communication
Readme
@zaflun/lumio-protocol
Wire-format types for the Lumio Extension Platform. Defines message schemas, event types, action types, and component node types used for communication between extension iframes and the Lumio host.
Installation
npm install @zaflun/lumio-protocolWhat's included
- 49 Event Types — Twitch, YouTube, Kick, Trovo, Spotify, StreamElements, Chat
- 21 Action Types — Chat, OBS, Spotify, Events, Overlay
- Message Schemas — JSON-RPC 2.0 wire format (Zod validated)
- Component Types —
LumioComponentNodefor serialized UI trees
Usage
import { LUMIO_EVENT_TYPES, lumioEventTypeSchema } from "@zaflun/lumio-protocol";
import type { LumioEventType, LumioComponentNode } from "@zaflun/lumio-protocol";
// Validate an event type
const result = lumioEventTypeSchema.safeParse("twitch:follower");
// Type-safe event handling
const eventType: LumioEventType = "twitch:cheer";Documentation
License
MIT © Zaflun
