import type { Config } from '../config/schema.js'; import type { SessionIndex } from '../session/index.js'; import { type TaskConversationState, type TaskHandoffSnapshot } from './task-conversation-repository.js'; import { type TaskAggregate } from './task-repository.js'; export interface TaskHandoffResult { task: TaskAggregate; conversation: TaskConversationState; snapshot: TaskHandoffSnapshot; fromAgentId?: string; toAgentId: string; activeSessionKey: string; assignmentEpoch: number; } export declare class TaskHandoffService { #private; private readonly deps; constructor(deps: { getConfig: () => Config; sessionIndex: SessionIndex; getActiveRunId: (sessionKey: string) => string | undefined; abortRun: (runId: string) => Promise; }); handoff(input: { taskId: string; toAgentId: string; expectedVersion: number; idempotencyKey: string; }): Promise; private performHandoff; private abortPreviousSession; }