import { SubagentManager } from '../../subagent.js'; import type { ReadScopeInputs } from '../../subagent-read-scope.js'; import type { ModelProvider } from '../../provider.js'; import type { AgentModelInput } from '../../types.js'; import type { AgentConfig } from '../../types/config-types.js'; import { createStubParentSession, type ChildProviderFactoryArgs } from '../nesting.js'; import type { RegisteredAgent } from '../../agents/index.js'; import type { AgentRegistry } from '../../agents/index.js'; import type { SkillExecutor } from '../skill-executor.js'; import type { Surface } from '../../awareness/types.js'; import type { TraceSink } from '../../trace/index.js'; import type { SubagentExecutor, SubagentExecutorContext } from '../subagent-executor.js'; import type { AgentInput } from './input-parse.js'; export type ChildParentSession = ReturnType & { sessionId: string | undefined; }; export interface BuildChildConfigArgs { parsed: AgentInput; namedAgent: RegisteredAgent | undefined; depth: number; maxDepth: number; currentCwd: string | undefined; childInheritedReadRoots?: string[]; signal: AbortSignal; defaultConfig: Pick; resolveApiKeyForModel?: (model: string) => string | undefined; defaultSubagentModel: AgentModelInput; childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider; childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string) => SkillExecutor; surface?: Surface; allowedTools?: string[]; readOnlyBash?: boolean; agentRegistry?: AgentRegistry; parentModel?: AgentModelInput; traceWriter?: TraceSink; workspaceStore?: import('../../workspace/index.js').WorkspaceStore; delegationBudget?: import('../../tools/delegation-budget.js').DelegationBudget; createChildExecutor: (ctx: SubagentExecutorContext) => SubagentExecutor; } export interface BuildChildConfigResult { childConfig: AgentConfig; childParentSession: ChildParentSession | undefined; childManager: SubagentManager | undefined; childWriteCapable: boolean; childSideEffectFree: boolean; } export declare function buildChildConfig(args: BuildChildConfigArgs): BuildChildConfigResult;