import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { SubagentBackend, SubagentProfile, SubagentTelemetry, SubagentToolDetails, SubagentUsage } from "../types.js"; import type { WorkflowSubagentRunner } from "./types.js"; export interface WorkflowSubagentRunnerOptions { profiles: Map; ctx: ExtensionContext; thinkingLevel?: string; timeoutMs: number; allowedBackends?: readonly SubagentBackend[]; onUsage?: (index: number, usage: SubagentUsage, telemetry: SubagentTelemetry) => void; onProgress?: (index: number, details: SubagentToolDetails, usage?: SubagentUsage) => void; } /** Canonical profile-aware runner shared by the interactive tool and headless API. */ export declare function createWorkflowSubagentRunner(options: WorkflowSubagentRunnerOptions): { runSubagent: WorkflowSubagentRunner; serializeSubagent: (sessionKey: string | undefined, task: () => Promise, signal?: AbortSignal) => Promise; };