import type { ZodType } from 'zod'; import type { CanUseTool } from '../types/sdk-types.js'; import type { WorkspaceStore } from '../workspace/workspace-store.js'; import type { HookRegistry } from '../hooks.js'; import type { AgentConfig, IAgentSession } from '../types.js'; import type { SubagentProgressSink, OutputEvent } from '../types/session-types.js'; import type { TraceSink } from '../trace/index.js'; import type { Surface } from '../awareness/types.js'; import type { PhaseRole } from '../tools/nesting.js'; export interface ForkParent { sessionId?: string; id?: string; } export interface ForkSubagentOptions { parent: Pick & Partial>; config: AgentConfig; idPrefix?: string; outputSchema?: ZodType; agentType: string; resolvedAgentType?: string; parentId?: string; promptHead?: string; denyElicitations?: boolean; progressEvents?: boolean; phaseRole?: PhaseRole; } export interface SubagentManagerOptions { canUseTool?: CanUseTool; parentAbortSignal?: AbortSignal; hookRegistry?: HookRegistry; progressSink?: SubagentProgressSink; apiKey?: string; baseUrl?: string; parentModel?: string; cwd?: string; parentReadRoots?: string[]; traceWriter?: TraceSink; surface?: Surface; onSubagentSucceeded?: (usage: import('./result.js').SubagentTrace['usage'], costUsd: number | undefined) => void; workspaceStore?: WorkspaceStore; sessionLabel?: string; outputEventSink?: (event: OutputEvent) => void; }