import type { Provider } from "@prestyj/ai";
export declare const DEFAULT_GOAL_WORKER_TIMEOUT_MS: number;
export interface GoalWorkerRecord {
    id: string;
    pid: number;
    goalRunId: string;
    goalTaskId: string;
    cwd: string;
    provider: Provider;
    model: string;
    startedAt: string;
    logFile: string;
    status: "running" | "done" | "failed" | "stopped";
    exitCode: number | null;
    currentActivity?: string;
}
export interface GoalWorkerToolUse {
    name: string;
    ok: boolean;
}
export interface GoalWorkerCompletion {
    worker: GoalWorkerRecord;
    summary: string;
    status: "done" | "failed";
    exitCode: number;
    toolsUsed: GoalWorkerToolUse[];
    reason?: "exit" | "spawn_error" | "timeout";
}
export type GoalWorkerCompletionListener = (completion: GoalWorkerCompletion) => void;
export interface GoalWorkerContext {
    cwd: string;
    goalRunId: string;
    goalTaskId: string;
    taskTitle?: string;
}
export interface StartGoalWorkerOptions extends GoalWorkerContext {
    provider: Provider;
    model: string;
    prompt: string;
    systemPrompt?: string;
    parentCacheKey?: string;
    maxTurns?: number;
    timeoutMs?: number;
    onComplete?: (completion: GoalWorkerCompletion) => void;
}
export declare function buildGoalWorkerSystemPrompt(context: GoalWorkerContext): string;
export declare function subscribeGoalWorkerCompletions(listener: GoalWorkerCompletionListener, projectPath?: string): () => void;
export declare function startGoalWorker(options: StartGoalWorkerOptions): Promise<GoalWorkerRecord>;
export declare function listGoalWorkers(projectPath?: string): GoalWorkerRecord[];
export declare function stopGoalWorker(workerId: string): Promise<string>;
export declare function shutdownGoalWorkers(projectPath?: string): void;
export declare function hasGoalWorkerLog(record: GoalWorkerRecord): boolean;
//# sourceMappingURL=goal-worker.d.ts.map