import { normalizeSpecialistRequirements } from '@xopcai/gateway-contract'; import { type MatchingContext, type SpecialistAssessment } from '../agent-matching/service.js'; import { type TaskContractPlanner } from './task-contract-planner.js'; import { type ExecutionCapability } from './task-execution-capabilities.js'; export declare const TASK_ALLOCATOR_ACTOR_ID = "task-allocator"; /** * Deterministic executor selection (0 LLM calls). * * Personal Agent already sees the live Specialists catalog in its context and selects * `requirements.requestedAgentId` directly when a specialist is clearly best suited; * the host verifies eligibility and otherwise picks the best deterministic match or `main`. */ export declare function selectDeterministicExecutor(candidates: readonly SpecialistAssessment[], requirements: ReturnType, needs: ReadonlyArray<{ capability: ExecutionCapability; }>, zh: boolean): { agent: SpecialistAssessment; reason: string; } | undefined; export declare class TaskAllocationDispatcher { #private; private readonly deps; constructor(deps: { context: (conversationId: string, projectId?: string) => MatchingContext & { getAgentRegisteredToolNames?: (agentId: string) => string[]; }; planner?: TaskContractPlanner; wake: () => void; }); dispatch(): void; stop(): void; drain(): Promise; private drainSlot; private allocate; private cancel; private finishFailure; }