/** Role a sub-agent can fulfil within a multi-agent pipeline. */
export type AgentRole = 'planner' | 'implementer' | 'reviewer' | 'tester' | 'researcher';
/** Model tier to assign to an agent based on task complexity. */
export type ModelTier = 'haiku' | 'sonnet' | 'opus';
/** Declared capability of a registered agent. */
export interface AgentCapability {
    /** Unique identifier for this agent instance. */
    agentId: string;
    /** Primary role this agent fulfils. */
    role: AgentRole;
    /** Ecosystems the agent can work with (e.g. ["typescript", "python"]). */
    ecosystems: string[];
    /** Glob-style file patterns the agent owns (e.g. ["src/engine/**"]). */
    filePatterns: string[];
    /** Maximum number of tasks the agent can handle concurrently. */
    maxConcurrency: number;
    /** Preferred model tier for this agent. */
    preferredModel: ModelTier;
}
/** Routing decision for a single task. */
export interface TaskRoute {
    /** Unique task identifier. */
    taskId: string;
    /** Agent assigned to handle this task. */
    assignedAgent: string;
    /** Model tier recommended for the task. */
    model: ModelTier;
    /** Confidence score in the range [0, 1]. */
    confidence: number;
    /** Sub-routes if the task was decomposed into multiple sub-tasks. */
    decomposition?: TaskRoute[];
}
/** Structured context passed from one agent to the next at a handoff boundary. */
export interface HandoffContext {
    /** Agent ID handing off work. */
    fromAgent: string;
    /** Agent ID receiving the work. */
    toAgent: string;
    /** Short descriptions of work that was completed. */
    completedWork: string[];
    /** Architectural and implementation decisions made during the session. */
    decisions: {
        decision: string;
        rationale: string;
    }[];
    /** Map of file path → agent ID that last modified it. */
    fileOwnershipMap: Record<string, string>;
    /** Unfinished tasks with enough context for the next agent to continue. */
    pendingWork: {
        task: string;
        context: string;
    }[];
    /** One-paragraph summary of the entire session. */
    sessionSummary: string;
}
/** Report produced by the conflict detector when two agents share file ownership. */
export interface AgentConflictReport {
    /** Whether any conflicts were found. */
    hasConflicts: boolean;
    /** Individual file-level conflicts with resolution suggestions. */
    conflicts: {
        /** File path that is claimed by more than one agent. */
        file: string;
        /** IDs of agents that claim ownership of this file. */
        agents: string[];
        /** Suggested resolution strategy. */
        resolution: 'sequential' | 'partition' | 'merge';
        /** Human-readable suggestion for resolving the conflict. */
        suggestion: string;
    }[];
}
/** Plan submitted by a single agent prior to execution — used for conflict detection. */
export interface AgentPlan {
    /** ID of the agent submitting this plan. */
    agentId: string;
    /** Files this agent intends to write or modify. */
    ownedFiles: string[];
}
/** A single criterion assigned to a worker in a supervisor/worker triad. */
export interface WorkerAssignment {
    /** ID of the agent assigned as the worker. */
    agentId: string;
    /** Subset of spec criteria assigned to this worker. */
    criteria: string[];
    /** Files the worker is allowed to modify. */
    fileOwnership: string[];
    /** IDs of other worker assignments that must complete before this one can start. */
    dependencies: string[];
}
/** Result returned by a single worker after completing its assignment. */
export interface WorkerResult {
    /** ID of the agent that produced this result. */
    agentId: string;
    /** Criteria that were implemented/verified. */
    coveredCriteria: string[];
    /** Files that were actually modified. */
    modifiedFiles: string[];
}
/** Validation result produced by the triad supervisor after all workers report in. */
export interface TriadValidation {
    /** Whether the triad completed without gaps or ownership conflicts. */
    isValid: boolean;
    /** Criteria that were not covered by any worker. */
    uncoveredCriteria: string[];
    /** Files claimed by more than one worker. */
    ownershipConflicts: string[];
    /** Human-readable summary of the validation outcome. */
    summary: string;
}
/** Input required to generate a HandoffContext. */
export interface SessionContext {
    fromAgent: string;
    toAgent: string;
    completedWork: string[];
    decisions: {
        decision: string;
        rationale: string;
    }[];
    fileOwnershipMap: Record<string, string>;
    pendingWork: {
        task: string;
        context: string;
    }[];
}
/** Internal catalog role definition (read from agent-capabilities-catalog.json). */
export interface CatalogRole {
    keywords: string[];
    model: ModelTier;
}
/** Shape of agent-capabilities-catalog.json. */
export interface AgentCapabilitiesCatalog {
    standardRoles: Record<string, CatalogRole>;
    filePatternRoles: Record<string, string>;
}
/** Subtask spec used internally during task decomposition. */
export interface SubtaskSpec {
    role: string;
    model: ModelTier;
}
export type OrchestrateAgentsAction = 'register-agent' | 'list-agents' | 'route-task' | 'decompose-spec' | 'handoff' | 'conflict-check';
/** Input for the orchestrate_agents MCP tool. */
export interface OrchestrateAgentsInput {
    action: OrchestrateAgentsAction;
    projectId?: string;
    /** register-agent: unique identifier for the agent */
    agentId?: string;
    /** register-agent: primary role */
    role?: AgentRole;
    /** register-agent: package ecosystems handled (e.g. ["typescript", "python"]) */
    ecosystems?: string[];
    /** register-agent: glob file patterns owned by the agent */
    filePatterns?: string[];
    /** register-agent: max concurrent tasks */
    maxConcurrency?: number;
    /** register-agent: preferred model tier */
    preferredModel?: ModelTier;
    /** route-task / decompose-spec: natural-language task description */
    taskDescription?: string;
    /** decompose-spec: acceptance criteria to distribute across agents */
    specCriteria?: string[];
    /** decompose-spec: agent IDs available for assignment */
    availableAgents?: string[];
    /** handoff: context object for the handoff */
    sessionContext?: SessionContext;
    /** conflict-check: per-agent plans with owned-file lists */
    agentPlans?: AgentPlan[];
}
//# sourceMappingURL=multi-agent.d.ts.map