import type { CliContainer } from "../cli/container.js"; import type { SpawnResult } from "./types.js"; import type { SpawnCommandOptions } from "../providers/spawn-options.js"; import { type McpSpawnConfig, type SpawnMode } from "../../packages/agent-spawn/dist/index.js"; import type { HookBridgeOptions } from "./types.js"; export interface SpawnCoreOptions { /** The prompt to send to the provider */ prompt: string; /** Working directory or workspace locator for the service CLI */ cwd?: string; /** Model identifier override */ model?: string; /** Permission mode: yolo | auto | edit | read */ mode?: SpawnMode; /** Additional arguments forwarded to the CLI */ args?: string[]; /** Environment overrides applied only to this spawned run. */ env?: Record; /** MCP servers passed at spawn time */ mcpServers?: McpSpawnConfig; /** Skill references to bridge into the spawned agent for this run. */ skills?: string[]; /** Hooks to bridge from another agent configuration for this run. */ hooks?: HookBridgeOptions; /** Resume a prior provider thread/session before sending the prompt. */ resumeThreadId?: string; /** Whether prompt was read from stdin */ useStdin?: boolean; } export interface SpawnCoreFlags { dryRun: boolean; verbose: boolean; } /** * Core spawn implementation used by both SDK and CLI. * Accepts an existing container to avoid creating a new one. */ export declare function spawnCore(container: CliContainer, service: string, options: SpawnCoreOptions, flags?: SpawnCoreFlags): Promise; /** * Agents disagree on thread id format (UUIDs, `thr_`/`ses_` prefixes), so only the * shapes no agent can accept are rejected here. Left unchecked, these reach the * agent's own `--resume` and come back as its usage text about a flag the user * never typed. */ export declare function assertUsableThreadId(threadId: string): void; export declare function resolveConfiguredModel(_container: Pick, _service: string, model?: string, _options?: { readOnly?: boolean; }): Promise; export declare function formatSpawnDryRunMessage(label: string, options: SpawnCommandOptions): string;