/**
 * Sub-agent orchestration for skills.
 *
 * Spawns independent agent sessions with isolated context for skill execution.
 * The sub-agent receives ONLY:
 *   - Skill instructions (from skill definition)
 *   - Context passed explicitly (e.g. branch names, repo path)
 *   - AGENTS.md from the working directory (for project knowledge)
 *
 * It does NOT receive the parent session's conversation history (for full isolation).
 *
 * Simplified from workflows/sub-agent.ts — no phase tracking, no workflow tool.
 */
import type { Skill } from "./types.js";
export interface SkillInvocationRequest {
    /** Unique id for tracking */
    id: string;
    /** The skill to execute */
    skill: Skill;
    /** Working directory (same as parent session) */
    cwd: string;
    /** Extra context key-values passed to the sub-agent */
    context?: Record<string, string>;
    /** Parent session ID (for namespacing) */
    parentSessionId: string;
    /** Path to the agent CLI (optional, auto-resolved if omitted) */
    agentCliPath?: string;
}
export interface SkillInvocationResult {
    id: string;
    skillId: string;
    status: "completed" | "failed" | "timeout";
    /** The sub-agent's final output */
    output: string;
    /** Duration in ms */
    durationMs: number;
    /** Error message if failed */
    error?: string;
}
/**
 * Run a skill in an independent sub-agent process.
 *
 * Spawns a new agent, sends a kickoff prompt, waits for completion,
 * and collects the conversation output.
 */
export declare function runSkillAgent(request: SkillInvocationRequest): Promise<SkillInvocationResult>;
/**
 * Run multiple skills in parallel as independent sub-agents.
 */
export declare function runSkillAgentsParallel(requests: SkillInvocationRequest[]): Promise<SkillInvocationResult[]>;
/**
 * Build a skill invocation request.
 */
export declare function createSkillRequest(skill: Skill, parentSessionId: string, cwd: string, context?: Record<string, string>, agentCliPath?: string): SkillInvocationRequest;
//# sourceMappingURL=sub-agent.d.ts.map