/**
 * OAuth trace event taxonomy.
 *
 * Single source of truth for phase IDs that flow through the OAuth pipeline.
 * Additive only — never remove or renumber.
 */
export declare enum OAuthTracePhase {
    PreflightStart = "preflight.start",
    PreflightOk = "preflight.ok",
    PreflightPortBlocked = "preflight.port_blocked",
    BinarySpawn = "binary.spawn",
    BinaryStdout = "binary.stdout",
    BinaryStderr = "binary.stderr",
    BinaryExit = "binary.exit",
    AuthUrlDisplayed = "auth.url_displayed",
    BrowserOpened = "browser.opened",
    CallbackObservedHeuristic = "callback.observed_heuristic",
    PasteCallbackPrompted = "paste.prompted",
    PasteCallbackReceived = "paste.received",
    PasteCallbackInvalid = "paste.invalid",
    PasteCallbackSubmitted = "paste.submitted",
    TokenExchangePending = "token.exchange_pending",
    TokenFileAppeared = "token.file_appeared",
    TokenFileMissing = "token.file_missing",
    ProjectSelectionPrompted = "project.selection_prompted",
    ProjectSelectionResolved = "project.selection_resolved",
    AgyResponsibilityPrompted = "agy.responsibility_prompted",
    AgyResponsibilityResolved = "agy.responsibility_resolved",
    Timeout = "timeout",
    Cancelled = "cancelled",
    Error = "error"
}
/** A single OAuth trace event. `data` MUST be redacted before construction. */
export interface OAuthTraceEvent {
    sessionId: string;
    provider: string;
    phase: OAuthTracePhase;
    ts: number;
    elapsedMs: number;
    data?: Record<string, unknown>;
    error?: {
        code?: string;
        message: string;
    };
}
/** Sink interface — accept events that have already been redacted. */
export interface OAuthTraceSink {
    write(event: OAuthTraceEvent): void;
    flush?(): Promise<void>;
}
//# sourceMappingURL=trace-events.d.ts.map