import type { TAPBaseToolCapabilityDescriptor, TAPGuardFromBaseResult, TAPTransferBoundary, TAPTransferGate, TAPTransferTrace } from "./TAP_guard_fromBase.js";
export type TAPMigratorFromBaseRequest = {
    transferId?: string;
    capability?: TAPBaseToolCapabilityDescriptor;
    tapNamespace?: string;
    targetCapabilityId?: string;
    guard?: TAPGuardFromBaseResult;
    contract?: TAPTransferGate;
    governance?: TAPTransferGate;
    dryRun?: boolean;
    trace?: TAPTransferTrace;
};
export type TAPMigratorFromBaseErrorCode = "MISSING_TRANSFER_ID" | "MISSING_CAPABILITY" | "MISSING_CAPABILITY_ID" | "MISSING_BASE_TOOL_NAME" | "GUARD_NOT_ALLOWED" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "REAL_MIGRATION_BLOCKED";
export type TAPMigratorFromBaseError = {
    code: TAPMigratorFromBaseErrorCode;
    message: string;
    boundary: TAPTransferBoundary;
    publicSafe: true;
};
export type TAPReusableInvocationEnvelope = {
    mode: "dry-run";
    dryRun: true;
    baseToolExecutionPlanned: false;
    unsafeSideEffects: false;
};
export type TAPMigratedBaseCapability = {
    transferId: string;
    tapCapabilityId: string;
    tapNamespace: string;
    sourceCapabilityId: string;
    sourceBaseToolName: string;
    capabilityName?: string;
    description?: string;
    requestedScopes: readonly string[];
    requiredPermissions: readonly string[];
    observableState: NonNullable<TAPBaseToolCapabilityDescriptor["observableState"]>;
    invocationEnvelope: TAPReusableInvocationEnvelope;
    guardDecision: TAPGuardFromBaseResult["decision"] | "not-provided";
    trace: TAPTransferTrace;
};
export type TAPMigratorFromBaseResult = {
    ok: true;
    migrated: TAPMigratedBaseCapability;
    events: readonly string[];
} | {
    ok: false;
    error: TAPMigratorFromBaseError;
    events: readonly string[];
};
export declare function migrateBaseToolCapabilityToTAP(request?: TAPMigratorFromBaseRequest): TAPMigratorFromBaseResult;
