/** * Per-iteration decider that picks Todo tasks to start and acts on the * picks. Stateless across iterations. The Board adapter owns its own writeback * caches (e.g., Linear's team-state cache lives in `src/lib/adapters/linear/writeback.ts`). * * Pure verdict logic lives in `eligibility.ts`; this module is responsible * for telemetry, writeback via Board, and side-effecting setupWorkspace calls. */ import type { Board } from "../lib/board.ts"; import type { ResolvedConfig } from "../lib/config.ts"; import { type BoardState, type Issue } from "../lib/taskSource.ts"; import type { UsageByAgent } from "../lib/usage.ts"; import type { WorktreeEntry } from "../lib/worktrees.ts"; interface DispatcherDeps { config: ResolvedConfig; board: Board; } export interface Dispatcher { runOnce: (arguments_: { state: BoardState; worktreeEntries: readonly WorktreeEntry[]; /** Lazy so dispatcher can early-return on idle ticks without paying the codexbar shell-out. */ usage: (signal?: AbortSignal) => Promise; dryRun: boolean; signal?: AbortSignal; /** * Appended to the dispatcher's idle-branch log lines so the watch loop * can fold its `next poll in Xs` heartbeat into the same line instead of * printing a second line per tick. */ idleSuffix?: string; }) => Promise; } export declare function createDispatcher(deps: DispatcherDeps): Dispatcher; export declare function formatActiveSlotList(active: readonly Issue[]): string; export {}; //# sourceMappingURL=dispatcher.d.ts.map