/** * @gizmo-ai/server * * SSE server for Gizmo runtime - stream state updates to thin clients. * * Usage: * ```typescript * import { createRuntime } from "@gizmo-ai/runtime"; * import { createAgent } from "@gizmo-ai/agent-plugin"; * import { createServer, createServerPlugin } from "@gizmo-ai/server"; * * // 1. Create server plugin first * const serverPlugin = createServerPlugin({ slices: ["execution", "agent"] }); * * // 2. Create runtime with plugin * const runtime = createRuntime({ * plugins: [createAgent({ model, tools }), serverPlugin.plugin], * }); * * // 3. Create and start server * const server = createServer({ runtime, plugin: serverPlugin }); * server.listen(3000); * ``` */ // Factory functions export { createServer } from "./server.ts"; export { createServerPlugin } from "./plugin.ts"; export { startServer } from "./start-server.ts"; export type { StartServerConfig } from "./start-server.ts"; // Manifest Schema Types export type { JSONSchema, SliceUIMetadata, PluginCapabilities, PluginManifestSchema, } from "./manifest-schema.ts"; // Schema Registry export { createSchemaRegistry } from "./schema-registry.ts"; export type { SchemaRegistry } from "./schema-registry.ts"; // Routes (for advanced manual mounting) export { createAGUIEventsRoute, hasAGUIAdapter } from "./routes/ag-ui-events.ts"; // Utilities export { createEventBus } from "./lib/event-bus.ts"; export { safeSerialize, sanitizeAction } from "./lib/serialization.ts"; // Persistence export { createPersistenceStore } from "./persistence/index.ts"; export type { PersistenceStore, PersistenceConfig, RunRecord, ActionRecord, StateRecord, RunQueryOptions, } from "./persistence/index.ts"; // Types export type { // Server Routes ServerRoute, RouteContext, // SSE Events SSEEvent, StateUpdateEvent, InitialStateEvent, HeartbeatEvent, ExecutionStatusEvent, // Internal Events StateChangedEvent, ExecutionLifecycleEvent, BusEvents, // Configuration ServerPluginConfig, ServerPluginInstance, ServerConfig, Server, AuthConfig, // API InvokeRequest, InvokeResponse, ExecuteRequest, // @deprecated - use InvokeRequest ExecuteResponse, // @deprecated - use InvokeResponse AbortResponse, ErrorResponse, // Run History StoredRun, RunSummary, RunDetails, RunsResponse, // Manifest GizmoManifest, ManifestConfig, } from "./types.ts";