"use strict";
/**
 * OAuth trace event taxonomy.
 *
 * Single source of truth for phase IDs that flow through the OAuth pipeline.
 * Additive only — never remove or renumber.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.OAuthTracePhase = void 0;
var OAuthTracePhase;
(function (OAuthTracePhase) {
    // Pre-flight
    OAuthTracePhase["PreflightStart"] = "preflight.start";
    OAuthTracePhase["PreflightOk"] = "preflight.ok";
    OAuthTracePhase["PreflightPortBlocked"] = "preflight.port_blocked";
    // Binary process lifecycle (CLIProxyAPI Go binary)
    OAuthTracePhase["BinarySpawn"] = "binary.spawn";
    OAuthTracePhase["BinaryStdout"] = "binary.stdout";
    OAuthTracePhase["BinaryStderr"] = "binary.stderr";
    OAuthTracePhase["BinaryExit"] = "binary.exit";
    // Browser / URL flow (Authorization Code)
    OAuthTracePhase["AuthUrlDisplayed"] = "auth.url_displayed";
    OAuthTracePhase["BrowserOpened"] = "browser.opened";
    OAuthTracePhase["CallbackObservedHeuristic"] = "callback.observed_heuristic";
    // Paste-callback (CCS-owned end-to-end)
    OAuthTracePhase["PasteCallbackPrompted"] = "paste.prompted";
    OAuthTracePhase["PasteCallbackReceived"] = "paste.received";
    OAuthTracePhase["PasteCallbackInvalid"] = "paste.invalid";
    OAuthTracePhase["PasteCallbackSubmitted"] = "paste.submitted";
    // Token exchange + persistence
    OAuthTracePhase["TokenExchangePending"] = "token.exchange_pending";
    OAuthTracePhase["TokenFileAppeared"] = "token.file_appeared";
    OAuthTracePhase["TokenFileMissing"] = "token.file_missing";
    // Provider-specific gates (Phase 4/5 extend)
    OAuthTracePhase["ProjectSelectionPrompted"] = "project.selection_prompted";
    OAuthTracePhase["ProjectSelectionResolved"] = "project.selection_resolved";
    OAuthTracePhase["AgyResponsibilityPrompted"] = "agy.responsibility_prompted";
    OAuthTracePhase["AgyResponsibilityResolved"] = "agy.responsibility_resolved";
    // Terminal states
    OAuthTracePhase["Timeout"] = "timeout";
    OAuthTracePhase["Cancelled"] = "cancelled";
    OAuthTracePhase["Error"] = "error";
})(OAuthTracePhase || (exports.OAuthTracePhase = OAuthTracePhase = {}));
//# sourceMappingURL=trace-events.js.map