import { type TeamStatePaths } from "./state-paths.js"; import { type TmuxApi } from "./tmux.js"; import { type NudgeAttempt, type NudgeConfig, type NudgeSummaryEntry } from "./idle-nudge.js"; import { loadTeamConfig } from "./config.js"; import type { Task, TeamConfig, WorkerRole } from "./types.js"; export declare function resolveWorkerBin(role: WorkerRole): string; export interface StartTeamOptions { cwd?: string; name: string; role: WorkerRole; workerCount: number; task: string; tmux?: TmuxApi; workerBinOverride?: string; } export interface StartTeamResult { ok: boolean; config: TeamConfig; tmuxSession: string; paths: TeamStatePaths; } export declare function startTeam(opts: StartTeamOptions): Promise; export interface MonitorOptions { cwd?: string; name: string; tmux?: TmuxApi; pollIntervalMs?: number; timeoutMs?: number; onTick?: (snapshot: MonitorSnapshot) => void; maxTicks?: number; nudge?: Partial & { enabled?: boolean; }; } export interface WorkerSnapshot { name: string; paneId?: string; paneDead: boolean; heartbeatStale: boolean; outboxNewCount: number; } export interface MonitorSnapshot { tasks: Task[]; workers: WorkerSnapshot[]; allDone: boolean; } export interface MonitorResult { ok: boolean; finalSnapshot: MonitorSnapshot; reason: "all-done" | "timeout" | "shutdown"; ticks: number; nudges: NudgeSummaryEntry[]; nudgeAttempts: NudgeAttempt[]; } export { loadTeamConfig }; export interface PollSnapshotOptions { consumeOutbox?: boolean; } export declare function pollSnapshot(paths: TeamStatePaths, config: TeamConfig, tmux: TmuxApi, options?: PollSnapshotOptions): MonitorSnapshot; /** * Resolve whether idle-nudge should run for this monitor session. * OFF by default. ON when explicitly enabled (the `/team` orchestration monitor * passes `nudge: { enabled: true }`) OR when a loop mode (ralph/ultrawork/ultraqa) * is active. Read-only polling (`team status`) passes neither signal → OFF. */ export declare function resolveNudgeEnabled(opts: MonitorOptions, cwd: string): boolean; export declare function monitorTeam(opts: MonitorOptions): Promise; export interface ShutdownOptions { cwd?: string; name: string; tmux?: TmuxApi; } export interface ShutdownResult { ok: boolean; killedPanes: number; killedSession: boolean; clearedLocks: number; } export declare function shutdownTeam(opts: ShutdownOptions): Promise; export interface StatusOptions { cwd?: string; name: string; tmux?: TmuxApi; } export interface StatusReport { ok: boolean; config?: TeamConfig; snapshot?: MonitorSnapshot; reason?: string; } export declare function statusTeam(opts: StatusOptions): StatusReport; export declare function formatStatus(report: StatusReport): string;