import { AgentInstance } from "@myycontext/core/src/types/agent-orchestration";
import { AgentRegistry, AgentMatch } from "./AgentRegistry";
import { MessageBus } from "./MessageBus";
/**
 * Task decomposition result
 */
export interface DecomposedTask {
    subtasks: SubTask[];
    estimatedDurationMs: number;
    totalContextBudgetKB: number;
    riskLevel: "low" | "medium" | "high";
    warnings: string[];
}
/**
 * Individual subtask
 */
export interface SubTask {
    id: string;
    type: string;
    description: string;
    requiredContext: string[];
    estimatedDurationMs: number;
    priority: "critical" | "high" | "medium" | "low";
    dependencies: string[];
}
/**
 * Spawn plan - sequential execution plan
 */
export interface SpawnPlan {
    steps: SpawnStep[];
    totalDurationMs: number;
    totalContextBudgetKB: number;
    canRunInParallel: boolean;
    warnings: string[];
}
/**
 * Individual spawn step
 */
export interface SpawnStep {
    stepId: string;
    agentType: string;
    taskType: string;
    description: string;
    agentMatch: AgentMatch;
    contextBudgetKB: number;
    estimatedDurationMs: number;
    dependencies: string[];
}
/**
 * Spawner configuration
 */
export interface SpawnerConfig {
    maxConcurrentAgents?: number;
    maxTotalContextBudgetKB?: number;
    preferParallel?: boolean;
    allowNetworkAgents?: boolean;
    maxTaskDurationMs?: number;
}
/**
 * AgentSpawner
 *
 * Minimal version focused on:
 * - Simple task decomposition
 * - Agent matching via registry
 * - Context budget allocation
 * - Sequential execution planning (parallel comes later)
 */
export declare class AgentSpawner {
    private registry;
    private messageBus;
    private config;
    private activeInstances;
    constructor(registry: AgentRegistry, messageBus: MessageBus, config?: SpawnerConfig);
    /**
     * Analyze a task and create spawn plan
     */
    analyzeAndPlan(taskDescription: string, context?: Record<string, unknown>): Promise<SpawnPlan>;
    /**
     * Spawn agents based on plan (sequential execution)
     */
    spawnAgents(plan: SpawnPlan): Promise<AgentInstance[]>;
    /**
     * Decompose task into subtasks (simple version)
     */
    private decomposeTask;
    /**
     * Simple task decomposition (heuristic-based)
     */
    private simpleDecomposition;
    /**
     * Create spawn plan from decomposed task
     */
    private createSpawnPlan;
    /**
     * Validate spawn plan
     */
    private validatePlan;
    /**
     * Create agent instance from spawn step
     */
    private createAgentInstance;
    /**
     * Check if dependencies are satisfied
     */
    private checkDependencies;
    /**
     * Assess risk level
     */
    private assessRisk;
    /**
     * Get active instances
     */
    getActiveInstances(): AgentInstance[];
    /**
     * Get instance by ID
     */
    getInstance(instanceId: string): AgentInstance | undefined;
    /**
     * Update instance status
     */
    updateInstanceStatus(instanceId: string, updates: Partial<AgentInstance>): void;
    /**
     * Remove completed instance
     */
    removeInstance(instanceId: string): boolean;
    /**
     * Get statistics
     */
    getStats(): {
        activeInstances: number;
        totalContextUsedKB: number;
        averageProgressPercent: number;
    };
}
//# sourceMappingURL=AgentSpawner.d.ts.map