import type { Tool } from '../tools/tool-types.js'; import type { Model, StreamFunction, ThinkingLevel } from '../../provider/pi-ai-types.js'; import type { AgentLoopPlatformConfig } from '../loop/agent-loop-types.js'; import type { LLMSystemPromptParts } from '../llm/llm-provider.js'; import type { SubAgentConfig, SubAgentRunner } from './subagent-orchestrator.js'; import type { SpawnProfileRegistry } from './spawn-profile.js'; export interface SubAgentRunnerDeps { parentTools: Tool[]; streamFn: StreamFunction; modelDef: Model; systemPrompt: string; systemPromptParts?: LLMSystemPromptParts; maxOutputTokens: number; contextTokens: number; temperature?: number; reasoning?: ThinkingLevel; platform?: AgentLoopPlatformConfig; maxSpawnDepth?: number; toolHooks?: import('../tools/tool-hooks.js').ToolHookRegistry; spawnRegistry?: SpawnProfileRegistry; workspaceDir?: string; /** * Optional host completion gate (e.g. CLI coding gates). When set, child * agent loops inherit the same end-of-turn honesty checks as the parent * so fan_out_subagents / create_subagent cannot false-complete coding work. */ completionGate?: import('../loop/agent-loop-types.js').AgentLoopExtensions['completionGate']; } /** * Resolve the model definition a sub-agent run will use. If `config.model` is * set, clone the parent's modelDef with the overridden id/name — the provider's * stream function routes by `model.id` (see llm-provider-stream-adapter.ts: * `request.model = model.id`), so the sub-agent actually runs on the * overridden model. Without an override, the parent's modelDef is used as-is. * * Context-window re-detection for the override is a known follow-up — the * parent's contextTokens is used as a fallback, which is wrong if the * overridden model has a different window, but the model swap itself works. * @internal */ export declare function resolveSubagentModelDef(deps: SubAgentRunnerDeps, config: SubAgentConfig): Model; export declare function createSubAgentRunner(deps: SubAgentRunnerDeps): SubAgentRunner; //# sourceMappingURL=subagent-runner.d.ts.map