import { type ChildSessionFactory, type SubagentExecutionRequest, type SubagentRunResult, type WorkerUsage, type SubagentExecutorOptions } from "./types.js"; /** @internal Test-only seam; the public executor always uses the guarded Pi factory. */ export declare function createSubagentExecutorForTesting(options: SubagentExecutorOptions, sessionFactory: ChildSessionFactory): SubagentExecutor; /** * Foreground child executor. Route selection and health remain M4 adapter * responsibilities; this layer only runs one exact route at a time. */ export declare class SubagentExecutor { private readonly routeAdapter; private readonly sessionFactory; private readonly clock; private readonly onProgress; private readonly resultProtocolFactory; private readonly safety; constructor(options: SubagentExecutorOptions); run(request: SubagentExecutionRequest, signal?: AbortSignal): Promise; private runValidated; private execute; private resolveExactRoute; private executeAttempt; private promptWithControl; private emit; } /** * Extract only the bounded numeric fields Pi exposes on an assistant message. * Pi's own compaction helper ignores error/aborted and all-zero usage; M8 uses * the same rule so failed turns do not masquerade as measured consumption. */ export declare function extractWorkerUsage(message: unknown): WorkerUsage | undefined; export { toolProfileForPool, isPotentiallyMutatingTool } from "./profiles.js"; export declare function createSubagentExecutor(options: SubagentExecutorOptions): SubagentExecutor;