import type { AgentService } from '../../agent/service.js'; import type { Config } from '../../config/schema.js'; import type { NotesService } from '../../notes/index.js'; import { ProjectService } from '../../projects/index.js'; import type { RealtimeRuntime } from '../../realtime/runtime.js'; import type { SessionIndex } from '../../session/index.js'; import { TaskConversationRepository } from '../../tasks/task-conversation-repository.js'; import { TaskRunDispatcher } from '../../tasks/task-run-dispatcher.js'; import type { VoiceRealtimeRuntime } from '../../voice/realtime/runtime.js'; import type { WorkDiscoveryService } from '../../work-discovery/service.js'; import type { GatewayAgentRunner } from './agent-runner.js'; export declare function ensureGatewayTaskConversation(host: { config: Config; projects?: ProjectService; }, taskId: string, options?: { runId?: string; requestedAgentId?: string; }): Promise<{ conversationId: string; agentId: string; created: boolean; conversation: ReturnType; }>; export interface GatewayTaskRunDispatcherDeps { ensureTaskConversation: (taskId: string, options?: { runId?: string; requestedAgentId?: string; }) => Promise<{ conversationId: string; }>; getConfig: () => Config; getAgentService: () => AgentService; sessionIndex: SessionIndex; agentRunner: GatewayAgentRunner; } export declare function createGatewayTaskRunDispatcher(deps: GatewayTaskRunDispatcherDeps): TaskRunDispatcher; export interface TaskRunBackgroundDeps { resumePendingMcpSetup: () => Promise; notesService: NotesService; projects: ProjectService; getWorkDiscovery: () => WorkDiscoveryService | undefined; dispatchTaskEvents: () => void; agentRunner: GatewayAgentRunner; isStopping: () => boolean; getTaskRunDispatcher: () => TaskRunDispatcher; } export declare function createTaskRunDispatchTask(deps: TaskRunBackgroundDeps): () => void; export interface TaskMainUpdateBackgroundDeps { agentRunner: GatewayAgentRunner; voiceRealtime: VoiceRealtimeRuntime; } export declare function createTaskMainUpdateDispatchTask(deps: TaskMainUpdateBackgroundDeps): () => void; export interface TaskResultBackgroundDeps { realtime: RealtimeRuntime; emit: (type: string, payload: unknown) => void; isStopping: () => boolean; agentRunner: GatewayAgentRunner; voiceRealtime: VoiceRealtimeRuntime; } export declare function createTaskResultDispatchTask(deps: TaskResultBackgroundDeps): () => void;