/** * Server Plugin * * Creates a RuntimePlugin that broadcasts state changes to an internal event bus. * The event bus is then consumed by SSE routes to stream updates to clients. */ import type { Action } from "@gizmo-ai/runtime"; import type { ServerPluginConfig, ServerPluginInstance } from "./types.ts"; /** * Create the server plugin * * This creates a RuntimePlugin that: * 1. Intercepts all actions and checks for state slice changes * 2. Emits state.changed events to the internal bus when slices change * 3. Emits execution.lifecycle events for RUNTIME_EXECUTION_* actions * * Usage: * ```typescript * const serverPlugin = createServerPlugin({ slices: ["execution", "agent"] }); * const runtime = createRuntime({ plugins: [agent, serverPlugin.plugin] }); * const server = createServer({ runtime, plugin: serverPlugin }); * ``` */ export declare function createServerPlugin = Record, A extends Action = Action>(config?: ServerPluginConfig): ServerPluginInstance; //# sourceMappingURL=plugin.d.ts.map