export declare const MAX_FARM_BRANCHES = 16; export declare const FARM_MANIFEST_SCHEMA_VERSION: 3; export type WorktreeErrorCode = 'unsupported-schema' | 'not-found' | 'invalid'; export declare class WorktreeError extends Error { readonly cause?: unknown; readonly code?: WorktreeErrorCode; constructor(message: string, cause?: unknown, code?: WorktreeErrorCode); } export interface CreatedBranch { index: number; label?: string; path: string; branch: string; } export interface FarmManifest { schemaVersion: 1 | 2 | 3; taskId: string; taskSlug: string; taskName: string; repoRoot: string; baseRef: string; baseBranch?: string; farmDir: string; createdAt: string; branches: CreatedBranch[]; human_decision?: 'approved' | 'rejected' | 'edited_then_merged'; decidedAt?: string; memoryFactId?: number; respawnedAt?: string; respawnedAs?: string; prUrl?: string; prCreatedAt?: string; } export interface CreateFarmOptions { taskName: string; count: number; labels?: string[]; cwd?: string; baseRef?: string; taskSlug?: string; now?: () => Date; randomSuffix?: () => string; } export declare function buildFarmSlug(taskName: string, opts?: { now?: () => Date; randomSuffix?: () => string; }): string; export declare function createFarm(opts: CreateFarmOptions): Promise; export declare function loadFarm(taskSlug: string): Promise; export declare function listFarms(): Promise; export declare function removeBranch(taskSlug: string, index: number): Promise; export declare function removeFarm(taskSlug: string): Promise; export declare function recordHumanDecision(taskSlug: string, decision: 'approved' | 'rejected' | 'edited_then_merged'): Promise; export declare function recordRespawn(taskSlug: string, respawnedAs: string): Promise; export declare function setFarmMemoryFactId(taskSlug: string, factId: number): Promise; export declare function recordPrCreated(taskSlug: string, prUrl: string): Promise;