import { ExportJobs } from "./exportJobs.js"; import { AgentSessionProvider } from "./agentSessions.js"; import { SourceProjectRuntime } from "./sourceProjects.js"; import { WorkspaceStorage } from "./workspace.js"; import { AgentSessionRuntime } from "./agentSessionRuntime.js"; import { AgentSessionDomainTools } from "./agentSessionDomainTools.js"; import { AssetStore } from "./assetStore.js"; import { MediaCatalog } from "./mediaCatalog.js"; import { ReferenceLibrary } from "./referenceLibrary.js"; import { CompositionStore } from "./compositionStore.js"; import { DemoPolicy } from "./demo.js"; import { DemoChatProvider, DemoChatRuntime, WorkspaceChatRuntime } from "./demoChat.js"; import { WorkspaceEditor } from "./workspaceEditor.js"; import { IncomingMessage, ServerResponse } from "node:http"; import { NextFunction } from "connect"; //#region src/ai-editor/http.d.ts interface EditorContext { snapshotId: string; timeMs: number; selectedIds: string[]; } type SessionBrowserIdentity = { sessionId: string; compositionId: string; snapshotId: string; rendererId?: string; }; type SessionBrowserCommand = { sessionId: string; snapshotId: string; type: "capture-frame" | "export-video"; timeMs?: number; jobId?: string; }; type BrowserCommand = { type: "capture-frame"; timeMs: number; revisionId: string; html?: string; } | { type: "export-video"; revisionId: string; html?: string; }; interface AiEditorRuntime { composition: CompositionStore; demo?: DemoPolicy; demoChat?: DemoChatRuntime; references?: ReferenceLibrary; sourceProjects?: SourceProjectRuntime; workspace: WorkspaceEditor; workspaceChat: WorkspaceChatRuntime; workspaceReady: Promise; agentSessions: AgentSessionRuntime; agentSessionDomainTools?: AgentSessionDomainTools; assets: AssetStore; projectRoot: string; opencodeUrl: string | null; opencodeError?: string; publish(event: unknown): void; subscribe(listener: (event: unknown) => void): () => void; getContext(): EditorContext | null; setContext(context: EditorContext, authorize?: () => void): Promise; jobs: ExportJobs; requestSessionBrowser(command: SessionBrowserCommand, options?: { authorize?: () => void; signal?: AbortSignal; timeoutMs?: number; }): Promise; claimSessionBrowser(requestId: string, identity: SessionBrowserIdentity): string | undefined; requestBrowser(command: BrowserCommand, options?: { timeoutMs?: number; }): Promise; resolveBrowser(requestId: string, result?: unknown, error?: string, identity?: { ownerId?: string; runId?: string; snapshotId: string; sessionId?: string; compositionId?: string; rendererId?: string; }): void; dispose(): void; } declare function createAiEditorRuntime(options: { root: string; demo?: { bootstrapToken: string; chat?: DemoChatProvider; agentSessions?: { provider: AgentSessionProvider; endpoint?: string | (() => string); toolCommand?: string; mcpCommand?: string; elementsRoot?: string; }; agentSessionDomainTools?: AgentSessionDomainTools; catalog?: MediaCatalog; references?: ReferenceLibrary; sourceProjects?: SourceProjectRuntime; }; workspace?: { storage?: WorkspaceStorage; }; projectRoot?: string; opencodeUrl?: string | null; opencodeError?: string; browserTimeoutMs?: number; }): AiEditorRuntime; declare function assertLocalRequest(req: IncomingMessage): void; /** * Vite's HTML fallback would otherwise 200 the app shell for * `/.ef-session/media/*`. Serve the real bytes from the composition root. */ declare function createSessionMediaMiddleware(root: string): (req: IncomingMessage, res: ServerResponse, next: NextFunction) => Promise; declare function createAiEditorMiddleware(runtime: AiEditorRuntime): (req: IncomingMessage, res: ServerResponse, next: NextFunction) => Promise; //#endregion export { AiEditorRuntime, BrowserCommand, EditorContext, assertLocalRequest, createAiEditorMiddleware, createAiEditorRuntime, createSessionMediaMiddleware }; //# sourceMappingURL=http.d.ts.map