import type { FleetConfig } from '../types/config.js'; import type { SubagentConfig, SubagentRunner, TaskSpec } from '../types/multi-agent.js'; import type { WorktreeManager } from '../worktree/worktree-manager.js'; export type FleetWorktreePolicy = NonNullable; export type WorktreeIsolationDecision = 'off' | 'optional' | 'required'; export interface WorktreeTaskStateUpdate { taskId: string; subagentId: string; handleId: string; dir: string; branch: string; baseBranch: string; status: 'allocated' | 'fallback' | 'committed' | 'merged' | 'kept' | 'released' | 'conflict' | 'failed'; commitSha?: string | undefined; conflictFiles?: string[] | undefined; error?: string | undefined; } export interface WorktreeTaskRunnerOptions { runner: SubagentRunner; worktrees?: WorktreeManager | undefined; policy?: FleetWorktreePolicy | undefined; conflictResolver?: ((info: { task: TaskSpec; config: SubagentConfig; conflictFiles: string[]; cwd: string; }) => Promise) | undefined; onUpdate?: ((update: WorktreeTaskStateUpdate) => void) | undefined; } export declare class WorktreeIntegrationError extends Error { readonly taskId: string; readonly subagentId: string; readonly branch?: string | undefined; readonly conflictFiles?: string[] | undefined; constructor(message: string, opts: { taskId: string; subagentId: string; branch?: string | undefined; conflictFiles?: string[] | undefined; }); } export declare function subagentNeedsWorktree(config: SubagentConfig): boolean; export declare function resolveSubagentWorktreeDecision(config: SubagentConfig, policy?: FleetWorktreePolicy | undefined): WorktreeIsolationDecision; export declare function wrapSubagentRunnerWithWorktrees(opts: WorktreeTaskRunnerOptions): SubagentRunner; //# sourceMappingURL=worktree-task-runner.d.ts.map