import type { Context } from 'telegraf'; import { loadFarm, recordHumanDecision, recordPrCreated, recordRespawn } from '../../agent/worktree.js'; import { checkGhReady, type CreatePrOpts, type ExecFn, type GhReadiness } from '../../agent/gh.js'; import { writeFarmDecisionFact } from '../../skills/score/memory-write.js'; import { resolveWinnerBranch } from '../../skills/score/winner.js'; type LogFn = (...args: unknown[]) => void; export interface FarmCallbackDeps { loadFarm?: typeof loadFarm; recordHumanDecision?: typeof recordHumanDecision; writeFarmDecisionFact?: typeof writeFarmDecisionFact; resolveWinnerBranch?: typeof resolveWinnerBranch; execGit?: (cwd: string, args: string[]) => Promise<{ stdout: string; stderr: string; }>; log?: LogFn; recordRespawn?: typeof recordRespawn; spawnFarm?: (args: string[]) => void; _now?: () => Date; _randomSuffix?: () => string; checkGhReady?: (opts?: Parameters[0]) => Promise; createPr?: (opts: CreatePrOpts, execFn?: ExecFn) => Promise; recordPrCreated?: typeof recordPrCreated; } export declare function handleFarmCallback(ctx: Context, deps?: FarmCallbackDeps): Promise; export {};