import type { Provider, ThinkingLevel } from "@kenkaiiii/gg-ai";
import type { AgentDefinition } from "../core/agents.js";
export declare const SUB_AGENT_MAX_TURNS = 50;
/**
 * Sub-agents get at most ONE turn-budget extension. A child's extensions run
 * inside a single parent turn, so a child extending itself twice multiplies
 * against the parent's own budget.
 */
export declare const SUB_AGENT_MAX_TURN_EXTENSIONS = 1;
export declare const SUB_AGENT_MAX_OUTPUT_CHARS = 100000;
export declare const SUB_AGENT_MAX_OUTPUT_LINES = 500;
export declare const SUB_AGENT_MAX_STDERR_CHARS = 10000;
export declare const SUB_AGENT_TIMEOUT_MS: number;
export declare const SUB_AGENT_DEPTH_ENV = "GG_SUBAGENT_DEPTH";
export declare const MAX_BLOCKING_SUBAGENT_DEPTH = 3;
export interface SubAgentTokenUsage {
    /** Fresh, non-cached input reported by the normalized provider adapter. */
    input: number;
    output: number;
    cacheRead?: number;
    /** Fresh input written into the provider cache (separate on Anthropic). */
    cacheWrite?: number;
}
export interface SubAgentSelection {
    agentDef?: AgentDefinition;
    provider: Provider;
    parentModel: string;
    model: string;
}
export declare function resolveAgentDefinition(agents: AgentDefinition[], requestedName?: string): AgentDefinition | undefined;
export declare function selectSubAgent(agents: AgentDefinition[], requestedName: string | undefined, provider: Provider, parentModel: string): SubAgentSelection;
export declare function childThinkingLevel(level: ThinkingLevel | undefined): ThinkingLevel | undefined;
export declare function subAgentCacheKey(parentCacheKey: string | undefined, model: string, agentName?: string): string | undefined;
export declare function currentSubAgentDepth(env?: NodeJS.ProcessEnv): number;
export declare function childSubAgentEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
export declare function resolveSubAgentCliEntry(env?: NodeJS.ProcessEnv): string;
export declare function boundSubAgentOutput(raw: string): string;
//# sourceMappingURL=subagent-shared.d.ts.map