import type { TAPBaseToolCapabilityDescriptor, TAPGuardFromBaseResult, TAPTransferBoundary, TAPTransferTrace } from "./TAP_guard_fromBase.js";
import type { TAPInvokerFromBaseResult } from "./TAP_invoker_fromBase.js";
import type { TAPMigratorFromBaseResult } from "./TAP_migrator_fromBase.js";
export type TAPTransferDetectedStatus = "ready" | "pending-approval" | "blocked" | "degraded" | "unavailable" | "unknown";
export type TAPStatusDetectorRequest = {
    transferId?: string;
    capability?: TAPBaseToolCapabilityDescriptor;
    guard?: TAPGuardFromBaseResult;
    migration?: TAPMigratorFromBaseResult;
    invocation?: TAPInvokerFromBaseResult;
    runtimeReady?: boolean;
    expectedScopes?: readonly string[];
    observedScopes?: readonly string[];
    observedState?: TAPTransferDetectedStatus;
    trace?: TAPTransferTrace;
};
export type TAPStatusDetectorErrorCode = "MISSING_TRANSFER_ID" | "MISSING_CAPABILITY_ID";
export type TAPStatusDetectorError = {
    code: TAPStatusDetectorErrorCode;
    message: string;
    boundary: TAPTransferBoundary;
    publicSafe: true;
};
export type TAPTransferStatusReport = {
    transferId: string;
    capabilityId: string;
    baseToolName?: string;
    status: TAPTransferDetectedStatus;
    reasons: readonly string[];
    expectedScopes: readonly string[];
    observedScopes: readonly string[];
    missingScopes: readonly string[];
    trace: TAPTransferTrace;
    dryRun: true;
    unsafeSideEffects: false;
};
export type TAPStatusDetectorResult = {
    ok: true;
    report: TAPTransferStatusReport;
    events: readonly string[];
} | {
    ok: false;
    error: TAPStatusDetectorError;
    events: readonly string[];
};
export declare function detectTAPTransferStatus(request?: TAPStatusDetectorRequest): TAPStatusDetectorResult;
