/** * New unified PolarisEngine class following the refactoring plan */ import { Agent } from "../agents/base/agent"; import { SentinelAgent } from "../sentinel/sentinel"; import { PolarisEngineTask } from "../types/task"; import { EngineOutput } from "../types/agent-output"; import { GameState } from "../domains/base/game-state"; import { Action } from "../domains/base/action"; import { LayerPipelineConfig } from "./layer-pipeline"; /** * Configuration for the PolarisEngine */ export interface PolarisEngineConfig { /** Task configuration */ task: PolarisEngineTask; /** Agents to use for inference */ agents: Agent[]; /** Optional sentinel agent for analysis */ sentinelAgent?: SentinelAgent; /** Engine-specific configuration */ engineConfig?: { /** Maximum inference iterations */ maxIterations?: number; /** Time limit for inference (ms) */ timeLimit?: number; /** Diversity threshold for agent outputs */ diversityThreshold?: number; /** Consensus threshold for decision making */ consensusThreshold?: number; /** Whether to run agents in parallel */ parallel?: boolean; /** Minimum number of successful agent outputs required */ minSuccessfulOutputs?: number; }; /** * Execution mode: * - "flat" (default): Standard multi-agent inference via runAgents() * - "pipeline": 4-layer Polaris Creativa pipeline via LayerPipeline */ mode?: "flat" | "pipeline"; /** Pipeline configuration (required when mode === "pipeline") */ pipelineConfig?: LayerPipelineConfig; /** Additional configuration */ metadata?: Record; } /** * Inference parameters for the engine */ export interface InferenceParams { /** Current game state to analyze */ state: GameState; /** Available actions (optional) */ actions?: Action[]; /** Specific agents to use (if not all) */ agentIds?: string[]; /** Override engine configuration for this inference */ configOverride?: Partial; /** Additional context */ context?: Record; } /** * Main PolarisEngine class for coordinating multi-agent inference */ export declare class PolarisEngine { private config; private agents; private sentinelAgent?; private logger; private sessionId; private cachedPipeline; constructor(config: PolarisEngineConfig); /** * Main inference method */ inference(params: InferenceParams): Promise; /** * Get engine configuration */ getConfig(): PolarisEngineConfig; /** * Update engine configuration */ updateConfig(updates: Partial): void; /** * Add an agent to the engine */ addAgent(agent: Agent): void; /** * Remove an agent from the engine */ removeAgent(agentId: string): boolean; /** * Get all agents */ getAgents(): Agent[]; /** * Get agent by ID */ getAgent(agentId: string): Agent | undefined; /** * Get session ID */ getSessionId(): string; /** * Clean up resources */ cleanup(): Promise; /** * Run inference in pipeline mode via LayerPipeline. * Converts PipelineResult into EngineOutput for a unified return type. */ private runPipelineMode; private validateAndRegisterAgents; private validateInferenceParams; private selectAgentsForInference; private runAgents; private runAgentsParallel; private runAgentsSequential; private buildMultiAgentOutput; private calculateDiversityMetrics; private calculateTextDiversity; private runSentinelAnalysis; private buildAgentPerformanceMap; private generateRecommendation; private estimateMemoryUsage; } //# sourceMappingURL=polaris-engine.d.ts.map