import type { ActivityObserverConfig } from "#channel/types.js";
import type { LocalDevRequestProvenance } from "#context/keys.js";
import type { ActivityWorkIdentityV1 } from "#protocol/activity.js";
import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
import type { DynamicRemoteAgentConfig } from "#runtime/subagents/dynamic-remote-agent-config.js";
import type { CompiledBundle } from "#runtime/sessions/runtime-context-keys.js";
import type { RuntimeRemoteAgentDispatchRequest, RuntimeSubagentDispatchRequest } from "#shared/action-types.js";
import type { DispatchOutcome, RuntimeSession } from "#subagents/handle-dispatch.js";
import { buildSubagentRunInput, type SubagentInputSource } from "#subagents/tool.js";
import type { AgentChildTraceDispatch } from "#tracing/agent-invocation-coordinator.js";
export type SubagentStartTarget = {
    readonly kind: "local";
    readonly action: RuntimeSubagentDispatchRequest;
    readonly dynamicSubagentAgentConfig?: DynamicSubagentAgentConfig;
    readonly source: SubagentInputSource;
} | {
    readonly kind: "remote";
    readonly action: RuntimeRemoteAgentDispatchRequest;
    readonly dynamicRemoteAgent?: DynamicRemoteAgentConfig;
};
/** Starts one planned fresh child against its local or remote target. */
export declare function startSubagent(input: {
    readonly auth: Parameters<typeof buildSubagentRunInput>[0]["auth"];
    readonly batchEvent: {
        readonly sequence: number;
        readonly turnId: string;
    };
    readonly bundle: CompiledBundle;
    readonly callbackBaseUrl: string | undefined;
    readonly capabilities: Parameters<typeof buildSubagentRunInput>[0]["capabilities"];
    readonly channelMetadata: Parameters<typeof buildSubagentRunInput>[0]["channelMetadata"];
    readonly currentSession: RuntimeSession;
    readonly fanoutSize: number;
    readonly initiatorAuth: Parameters<typeof buildSubagentRunInput>[0]["initiatorAuth"];
    readonly localDevRequest?: LocalDevRequestProvenance;
    readonly parentContinuationToken: string | undefined;
    readonly activityObserver?: ActivityObserverConfig & {
        readonly workIdentity: ActivityWorkIdentityV1;
    };
    readonly sandboxSessionId: string;
    readonly session: RuntimeSession;
    readonly taskId?: string;
    readonly target: SubagentStartTarget;
    readonly trace: AgentChildTraceDispatch;
}): Promise<DispatchOutcome>;
