import type { AgentIdentity, AgentSpecialization, AgentCapability, TrustLevel, BoundaryArtifact, AgentMessage } from './types.js'; import type { MessageBus } from './message-bus.js'; export interface TaskAssignmentPayload { readonly taskId: string; readonly goal: string; readonly constraints: readonly string[]; readonly dependencies: readonly string[]; readonly contextRefs: readonly { summary: string; content?: string; }[]; } export interface TaskResultPayload { readonly taskId: string; readonly status: 'completed' | 'blocked' | 'failed'; readonly artifacts: readonly BoundaryArtifact[]; readonly summary: string; readonly claimsAboutArtifacts: readonly string[]; readonly blockers?: readonly string[]; } export interface FindingPayload { readonly severity: 'critical' | 'high' | 'medium' | 'low'; readonly category: string; readonly description: string; readonly evidence: string; readonly suggestedFix?: string; readonly affectedFiles: readonly string[]; } export declare abstract class SpecializedAgent { readonly identity: AgentIdentity; protected messageBus: MessageBus; protected modelId: string; constructor(name: string, specialization: AgentSpecialization, capabilities: AgentCapability[], messageBus: MessageBus, opts?: { model?: string; initialTrust?: TrustLevel; }); /** Handle an incoming message. Subclasses override for specific behavior. */ protected abstract onMessage(message: AgentMessage): void; /** * Execute a task assignment. Returns the result as artifacts. * Each agent role implements this differently. */ abstract executeTask(task: TaskAssignmentPayload): Promise; /** Get the agent's identity. */ getIdentity(): AgentIdentity; /** * Call Claude with a system prompt and user prompt. * Returns the raw response text and token usage. */ protected callClaude(systemPrompt: string, userPrompt: string): Promise<{ content: string; inputTokens: number; outputTokens: number; }>; /** Send a task result back to the coordinator. */ protected sendResult(result: TaskResultPayload, threadId: string): void; /** Send a finding to another agent or coordinator. */ protected sendFinding(recipient: string, finding: FindingPayload, threadId: string): void; /** Send an escalation to the coordinator. */ protected sendEscalation(reason: string, context: string, attemptsMade: string[], threadId: string): void; /** Create a BoundaryArtifact from produced output. */ protected makeArtifact(type: BoundaryArtifact['type'], content: string, opts?: { path?: string; language?: string; metadata?: Record; }): BoundaryArtifact; } export declare function checkModelDiversity(agents: AgentIdentity[]): { diverse: boolean; providers: Map; recommendation: string | null; };