/** * Worker 系统 * 保留身份、配置、邮箱和 Agent 访问能力 */ import type { AgentExecutionInput, AgentExecutionResult } from '../agent/context.js'; import type { Task } from '../types/index.js'; import { Mailbox } from './mailbox.js'; import { TaskManager } from './task.js'; export declare function inferWorkerForTask(task: Task): string; export declare class Worker { private readonly id; private readonly basePath; private readonly taskManager; private readonly mailbox; private config; private agent; constructor(id: string, taskManager: TaskManager, basePath?: string); init(): Promise; claimTask(taskId: string): Promise; execute(input: AgentExecutionInput): Promise; executeTask(task: Task): Promise<{ success: boolean; output?: string; error?: string; }>; getId(): string; getName(): string; getRole(): string; getAdapterProvider(): string; getMailbox(): Mailbox; } export declare class WorkerManager { private readonly workers; private readonly taskManager; private readonly basePath; constructor(taskManager: TaskManager, basePath?: string); registerWorker(workerId: string): Promise; getWorker(id: string): Worker | undefined; getAllWorkers(): Worker[]; assignTasks(): Promise; executeRound(): Promise<{ completed: number; waitingReview: number; failed: number; }>; } export declare function reviewTaskDeliverables(taskId: string, basePath?: string): Promise; //# sourceMappingURL=worker.d.ts.map