/** * Council Engine * * Parses council_plan blocks from Conductor responses, * validates agent availability, and executes multi-round * discussions among existing named agents. * * Unlike WorkflowEngine (ephemeral agents, DAG execution), * CouncilEngine reuses existing agents and runs sequential rounds * with full history accumulation. */ import { EventEmitter } from 'events'; import type { CouncilPlan, CouncilConfig, CouncilRoundResult, CouncilExecution } from './workflow-types.js'; export type CouncilStepExecutor = (agentId: string, prompt: string, timeoutMs: number) => Promise; /** * CouncilEngine * * Events: * - 'progress': CouncilProgressEvent */ export declare class CouncilEngine extends EventEmitter { private config; private activeExecutions; constructor(config: CouncilConfig); isEnabled(): boolean; /** * Parse a council_plan JSON block from Conductor's response. */ parseCouncilPlan(response: string): CouncilPlan | null; /** * Extract text content outside the council_plan block. */ extractNonPlanContent(response: string): string; /** * Validate plan against available agents and config limits. * Returns error message or null if valid. */ validatePlan(plan: CouncilPlan, availableAgentIds: string[]): string | null; /** * Execute a council discussion plan. */ execute(plan: CouncilPlan, executeStep: CouncilStepExecutor, agentDisplayNames: Map): Promise<{ result: string; execution: CouncilExecution; }>; /** * Cancel a running council execution. */ cancel(executionId: string): boolean; /** * Build prompt for a specific round + agent, including all previous responses. */ buildRoundPrompt(topic: string, previousResults: CouncilRoundResult[], currentRound: number, currentAgentId: string, currentDisplayName: string): string; /** * Build final combined result from all rounds. */ private buildFinalResult; private emitProgress; } //# sourceMappingURL=council-engine.d.ts.map