/** * Worker Mode * * Enables background task processing via Claude Code subagents. * Workers claim tasks, execute them via AgentRouter, and loop until done. */ import type { Logger } from "../observability/logger.js"; import type { WorkerConfig, WorkerState } from "../types.js"; export declare class WorkerMode { private state; private config; private logger; private lastActivityTime; constructor(config: WorkerConfig, logger: Logger); /** * Generate instructions for the subagent on how to claim and execute tasks. * Returns markdown that tells the subagent the worker claim protocol. */ generateClaimInstructions(): string; /** * Update worker state. */ updateState(updates: Partial): void; /** * Get current worker status. */ getStatus(): WorkerState; /** * Mark that the worker is starting work on a task. */ markTaskStarted(taskId: string): void; /** * Mark that the worker completed a task successfully. */ markTaskCompleted(taskId: string): void; /** * Mark that the worker failed a task. */ markTaskFailed(taskId: string, error?: Error): void; /** * Add a task ID to the exclusion list (e.g., after failed claim due to race). */ excludeTask(taskId: string): void; /** * Record a heartbeat (keeps the worker alive). */ heartbeat(): void; /** * Check if the worker should shut down due to idle timeout. */ shouldShutdown(): boolean; /** * Mark the worker as shut down. */ shutdown(): void; /** * Get the worker name. */ getName(): string; /** * Check if the worker is currently working. */ isWorking(): boolean; } //# sourceMappingURL=worker-mode.d.ts.map