import { type ModuleGovernanceBridgeRequest, type ModuleGovernanceBridgePlan } from "../runtime.governancePlane/moduleGovernanceBridge.js";
export type TapRuntimeBridgeBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope";
export type TapRuntimeBridgeChannel = "tool" | "approval" | "execution";
export type TapRuntimeBridgeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_TAP_MODULE_ID" | "MISSING_TOOL_ACTION" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_BRIDGE_FAILED" | "GOVERNANCE_DENIED" | "CHANNEL_UNAVAILABLE";
export type TapRuntimeBridgeChannelAvailability = Partial<Record<TapRuntimeBridgeChannel, boolean>>;
export type TapRuntimeBridgeRequest = {
    runtimeId?: string;
    tapModuleId?: string;
    toolAction?: string;
    toolName?: string;
    requestedScopes?: readonly string[];
    allowedModuleScopes?: readonly string[];
    rules?: ModuleGovernanceBridgeRequest["rules"];
    runtimeReady?: boolean;
    contract?: ModuleGovernanceBridgeRequest["contract"];
    channelAvailability?: TapRuntimeBridgeChannelAvailability;
    traceId?: string;
};
export type TapRuntimeBridgeChannelPlan = {
    channel: TapRuntimeBridgeChannel;
    ready: true;
    dispatch: "dry-run";
};
export type TapRuntimeBridgePlan = {
    runtimeId: string;
    tapModuleId: string;
    moduleKind: "TAP";
    toolAction: string;
    toolName?: string;
    traceId?: string;
    governance: ModuleGovernanceBridgePlan["decision"];
    approvalRequired: boolean;
    channelPlan: readonly TapRuntimeBridgeChannelPlan[];
    outcome: "ready" | "awaiting-approval";
    dispatch: "dry-run";
    mockableEnvelope: true;
    tapStrategyImplemented: false;
    unsafeSideEffects: false;
};
export type TapRuntimeBridgeError = {
    code: TapRuntimeBridgeErrorCode;
    message: string;
    boundary: TapRuntimeBridgeBoundary;
    publicSafe: true;
};
export type TapRuntimeBridgeResult = {
    ok: true;
    plan: TapRuntimeBridgePlan;
    events: readonly string[];
} | {
    ok: false;
    error: TapRuntimeBridgeError;
    events: readonly string[];
};
export declare function createTapRuntimeBridge(request?: TapRuntimeBridgeRequest): TapRuntimeBridgeResult;
