/** * Extension Task Handlers * Handles specialized tasks from the Chrome extension that don't need Claude: * - get_history — return local video history * - retry_video — re-queue a video for rendering * - generate_scene(s) — call Veo3 to create clips * - render_video — compose final video via Remotion * - list_characters — return character profiles with thumbnails * - create_character — create new character profile directory */ import { AgentWebSocketClient } from './ws-client.js'; export interface VideoRecord { id: string; title: string; niche: string; status: 'processing' | 'rendered' | 'failed'; progress: number; error?: string; createdAt: string; outputPath?: string; scenes?: Array<{ idx: number; videoUrl?: string; prompt: string; }>; aspectRatio?: string; } export declare function handleGetHistory(ws: AgentWebSocketClient, code: string, taskId: string): void; export interface AppContext { appName: string; appDesc: string; features: string[]; isWholeApp: boolean; allFeatures: string[]; } export declare function handleClaudePrompt(ws: AgentWebSocketClient, code: string, taskId: string, prompt: string, systemPrompt?: string, timeoutMs?: number): Promise; export declare function handleClaudePromptStream(ws: AgentWebSocketClient, code: string, taskId: string, prompt: string, systemPrompt?: string): Promise; export declare function handleGenerateIdeas(ws: AgentWebSocketClient, code: string, taskId: string, topic: string, styleName?: string, styleDesc?: string, language?: string, count?: number, ideasInstruction?: string, provider?: string, appContext?: AppContext): Promise; export declare function handleGenerateScript(ws: AgentWebSocketClient, code: string, taskId: string, idea: string, topic: string, style?: string, duration?: number, language?: string, styleName?: string, styleGuidance?: string, provider?: string): Promise; export declare function handleRetryVideo(ws: AgentWebSocketClient, code: string, taskId: string, videoId: string): void; export declare function handleGenerateScene(ws: AgentWebSocketClient, code: string, taskId: string, sceneIdx: number, prompt: string, aspectRatio: string): Promise; export declare function handleGenerateScenes(ws: AgentWebSocketClient, code: string, taskId: string, scenes: Array<{ idx: number; prompt: string; }>, aspectRatio: string): Promise; export declare function handleRenderVideo(ws: AgentWebSocketClient, code: string, taskId: string, payload: { scenes: Array<{ idx: number; videoUrl?: string; prompt: string; }>; script: string; title: string; aspectRatio: string; voiceId: string; subtitleStyle: string; }): Promise; export interface CharProfile { id: string; name: string; thumbnail: string; gender: string; age: string; ethnicity: string; vibe: string; suitableFor: string; poseCount: number; images?: string[]; } export declare function handleListCharacters(ws: AgentWebSocketClient, code: string, taskId: string): void; export declare function handleCreateCharacter(ws: AgentWebSocketClient, code: string, taskId: string, name: string, displayName: string, prompt: string, outputCount?: number, orientation?: string): Promise; export declare function handleSaveCharacterSelection(ws: AgentWebSocketClient, code: string, taskId: string, characterId: string, selectedImages: string[]): void; /** * Sync apps from the agent's knowledge base. * Searches all folders (2 levels deep) for the "App Info" document, * then parses the multi-app markdown format. */ export declare function handleSyncApps(ws: AgentWebSocketClient, code: string, taskId: string, apiUrl: string, agentToken: string, agentId: string): Promise;