import { z } from "zod";
import type { AgentTool } from "@kenkaiiii/gg-agent";
import { type AgentDefinition } from "../core/agents.js";
import { type SubAgentTokenUsage } from "./subagent-shared.js";
/** Only retry errors that specifically mean the selected model cannot be used. */
export declare function isModelUnavailableError(stderr: string): boolean;
declare const SubAgentParams: z.ZodObject<{
    task: z.ZodString;
    agent: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export interface SubAgentUpdate {
    toolUseCount: number;
    tokenUsage: SubAgentTokenUsage;
    currentActivity?: string;
}
export interface SubAgentDetails {
    toolUseCount: number;
    tokenUsage: SubAgentTokenUsage;
    durationMs: number;
}
export declare function createSubAgentTool(cwd: string, agents: AgentDefinition[], getParentProvider: () => string, getParentModel: () => string, getParentCacheKey?: () => string | undefined, planModeRef?: {
    current: boolean;
}): AgentTool<typeof SubAgentParams>;
export {};
//# sourceMappingURL=subagent.d.ts.map