import { type TaskInfo, type TaskResult, TaskRunner } from '../../../infra/task/index.js';
import type { ExceededInfo, WorkflowExecutionResult } from './types.js';
interface BuildTaskResultParams {
    task: TaskInfo;
    runResult: WorkflowExecutionResult;
    startedAt: string;
    completedAt: string;
    branch?: string;
    worktreePath?: string;
    prUrl?: string;
}
interface BuildBooleanTaskResultParams {
    task: TaskInfo;
    taskSuccess: boolean;
    startedAt: string;
    completedAt: string;
    successResponse: string;
    failureResponse: string;
    branch?: string;
    worktreePath?: string;
}
interface PersistTaskResultOptions {
    emitStatusLog?: boolean;
}
interface PersistTaskErrorOptions {
    emitStatusLog?: boolean;
    responsePrefix?: string;
}
export declare function buildTaskResult(params: BuildTaskResultParams): TaskResult;
export declare function buildBooleanTaskResult(params: BuildBooleanTaskResultParams): TaskResult;
export declare function persistPrFailedTaskResult(taskRunner: TaskRunner, taskResult: TaskResult, prError: string): void;
export declare function persistTaskResult(taskRunner: TaskRunner, taskResult: TaskResult, options?: PersistTaskResultOptions): void;
export declare function persistExceededTaskResult(taskRunner: TaskRunner, task: TaskInfo, exceeded: ExceededInfo, context?: {
    worktreePath?: string;
    branch?: string;
}): void;
export declare function persistTaskError(taskRunner: TaskRunner, task: TaskInfo, startedAt: string, completedAt: string, err: unknown, options?: PersistTaskErrorOptions): void;
export {};
//# sourceMappingURL=taskResultHandler.d.ts.map