import { z } from "zod/v3";
export declare const RHEI_PREMIUM_FEATURES: readonly ["premium_context_rerank", "premium_graph_expand", "premium_service_enrichment", "premium_drift_signals"];
export type RheiPremiumFeatureV1 = typeof RHEI_PREMIUM_FEATURES[number];
export type RheiPremiumModeV1 = "off" | "auto" | "required";
export type RheiSourceUploadModeV1 = "never" | "metadata_only" | "selected_slices";
export declare const RHEI_PREMIUM_MODE_VALUES: readonly ["off", "auto", "required"];
export declare const RHEI_SOURCE_UPLOAD_MODE_VALUES: readonly ["never", "metadata_only", "selected_slices"];
export declare const RheiPremiumFeatureV1Schema: z.ZodEnum<["premium_context_rerank", "premium_graph_expand", "premium_service_enrichment", "premium_drift_signals"]>;
export declare const RheiPremiumModeV1Schema: z.ZodEnum<["off", "auto", "required"]>;
export declare const RheiSourceUploadModeV1Schema: z.ZodEnum<["never", "metadata_only", "selected_slices"]>;
export declare const RheiLicenseStatusV1Schema: z.ZodObject<{
    kind: z.ZodLiteral<"RheiLicenseStatusV1">;
    schemaVersion: z.ZodLiteral<1>;
    status: z.ZodEnum<["anonymous", "authenticated_free", "entitled", "not_entitled", "expired", "rate_limited", "unreachable"]>;
    tenantId: z.ZodOptional<z.ZodString>;
    accountId: z.ZodOptional<z.ZodString>;
    enabledFeatures: z.ZodArray<z.ZodEnum<["premium_context_rerank", "premium_graph_expand", "premium_service_enrichment", "premium_drift_signals"]>, "many">;
    expiresAt: z.ZodOptional<z.ZodString>;
    checkedAt: z.ZodString;
    serverTraceId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "RheiLicenseStatusV1";
    schemaVersion: 1;
    status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
    checkedAt: string;
    enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
    expiresAt?: string | undefined;
    tenantId?: string | undefined;
    accountId?: string | undefined;
    serverTraceId?: string | undefined;
}, {
    kind: "RheiLicenseStatusV1";
    schemaVersion: 1;
    status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
    checkedAt: string;
    enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
    expiresAt?: string | undefined;
    tenantId?: string | undefined;
    accountId?: string | undefined;
    serverTraceId?: string | undefined;
}>;
export type RheiLicenseStatusV1 = z.infer<typeof RheiLicenseStatusV1Schema>;
export declare const RheiPremiumTrialStartResponseV1Schema: z.ZodObject<{
    kind: z.ZodLiteral<"RheiPremiumTrialStartResponseV1">;
    schemaVersion: z.ZodLiteral<1>;
    status: z.ZodEnum<["ok", "not_authenticated", "unavailable"]>;
    created: z.ZodOptional<z.ZodBoolean>;
    expiresAt: z.ZodOptional<z.ZodString>;
    license: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"RheiLicenseStatusV1">;
        schemaVersion: z.ZodLiteral<1>;
        status: z.ZodEnum<["anonymous", "authenticated_free", "entitled", "not_entitled", "expired", "rate_limited", "unreachable"]>;
        tenantId: z.ZodOptional<z.ZodString>;
        accountId: z.ZodOptional<z.ZodString>;
        enabledFeatures: z.ZodArray<z.ZodEnum<["premium_context_rerank", "premium_graph_expand", "premium_service_enrichment", "premium_drift_signals"]>, "many">;
        expiresAt: z.ZodOptional<z.ZodString>;
        checkedAt: z.ZodString;
        serverTraceId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    }, {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    }>>;
    serverTraceId: z.ZodOptional<z.ZodString>;
    advisoryOnly: z.ZodOptional<z.ZodLiteral<true>>;
    warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    kind: "RheiPremiumTrialStartResponseV1";
    schemaVersion: 1;
    status: "unavailable" | "ok" | "not_authenticated";
    advisoryOnly?: true | undefined;
    warnings?: string[] | undefined;
    created?: boolean | undefined;
    expiresAt?: string | undefined;
    serverTraceId?: string | undefined;
    license?: {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    } | undefined;
}, {
    kind: "RheiPremiumTrialStartResponseV1";
    schemaVersion: 1;
    status: "unavailable" | "ok" | "not_authenticated";
    advisoryOnly?: true | undefined;
    warnings?: string[] | undefined;
    created?: boolean | undefined;
    expiresAt?: string | undefined;
    serverTraceId?: string | undefined;
    license?: {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    } | undefined;
}>;
export type RheiPremiumTrialStartResponseV1 = z.infer<typeof RheiPremiumTrialStartResponseV1Schema>;
export declare const RheiPremiumContextPlanRequestV1Schema: z.ZodObject<{
    kind: z.ZodLiteral<"RheiPremiumContextPlanRequestV1">;
    schemaVersion: z.ZodLiteral<1>;
    feature: z.ZodEnum<["premium_context_rerank", "premium_graph_expand", "premium_service_enrichment", "premium_drift_signals"]>;
    client: z.ZodObject<{
        packageName: z.ZodEnum<["@rhei-team/rhei", "@rhei-team/mcp-server", "@rhei/mcp-server"]>;
        packageVersion: z.ZodString;
        commandRunner: z.ZodOptional<z.ZodEnum<["npm", "npx", "bunx", "pnpm", "pnpm_dlx", "local", "unknown"]>>;
        capabilities: z.ZodArray<z.ZodString, "many">;
    }, "strip", z.ZodTypeAny, {
        capabilities: string[];
        packageName: "@rhei-team/rhei" | "@rhei-team/mcp-server" | "@rhei/mcp-server";
        packageVersion: string;
        commandRunner?: "unknown" | "local" | "npm" | "npx" | "bunx" | "pnpm" | "pnpm_dlx" | undefined;
    }, {
        capabilities: string[];
        packageName: "@rhei-team/rhei" | "@rhei-team/mcp-server" | "@rhei/mcp-server";
        packageVersion: string;
        commandRunner?: "unknown" | "local" | "npm" | "npx" | "bunx" | "pnpm" | "pnpm_dlx" | undefined;
    }>;
    repo: z.ZodObject<{
        repoFingerprint: z.ZodString;
        sourceEpochHash: z.ZodOptional<z.ZodString>;
        indexFreshness: z.ZodOptional<z.ZodString>;
        localSqlSchemaVersion: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        repoFingerprint: string;
        indexFreshness?: string | undefined;
        sourceEpochHash?: string | undefined;
        localSqlSchemaVersion?: number | undefined;
    }, {
        repoFingerprint: string;
        indexFreshness?: string | undefined;
        sourceEpochHash?: string | undefined;
        localSqlSchemaVersion?: number | undefined;
    }>;
    privacy: z.ZodObject<{
        sourceUpload: z.ZodEnum<["never", "metadata_only", "selected_slices"]>;
        redactionPolicy: z.ZodEnum<["default_local", "none", "custom"]>;
        maxBytes: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        sourceUpload: "metadata_only" | "never" | "selected_slices";
        redactionPolicy: "none" | "custom" | "default_local";
        maxBytes: number;
    }, {
        sourceUpload: "metadata_only" | "never" | "selected_slices";
        redactionPolicy: "none" | "custom" | "default_local";
        maxBytes: number;
    }>;
    goal: z.ZodObject<{
        text: z.ZodOptional<z.ZodString>;
        responseType: z.ZodOptional<z.ZodString>;
        targetAgent: z.ZodOptional<z.ZodString>;
        tokenBudget: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        tokenBudget?: number | undefined;
        text?: string | undefined;
        responseType?: string | undefined;
        targetAgent?: string | undefined;
    }, {
        tokenBudget?: number | undefined;
        text?: string | undefined;
        responseType?: string | undefined;
        targetAgent?: string | undefined;
    }>;
    localCandidates: z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        contentHash: z.ZodOptional<z.ZodString>;
        language: z.ZodOptional<z.ZodString>;
        spans: z.ZodOptional<z.ZodArray<z.ZodObject<{
            startLine: z.ZodNumber;
            endLine: z.ZodNumber;
            text: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            startLine: number;
            endLine: number;
            text?: string | undefined;
        }, {
            startLine: number;
            endLine: number;
            text?: string | undefined;
        }>, "many">>;
        localReasonCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        language?: string | undefined;
        contentHash?: string | undefined;
        spans?: {
            startLine: number;
            endLine: number;
            text?: string | undefined;
        }[] | undefined;
        localReasonCodes?: string[] | undefined;
    }, {
        path: string;
        language?: string | undefined;
        contentHash?: string | undefined;
        spans?: {
            startLine: number;
            endLine: number;
            text?: string | undefined;
        }[] | undefined;
        localReasonCodes?: string[] | undefined;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    kind: "RheiPremiumContextPlanRequestV1";
    schemaVersion: 1;
    goal: {
        tokenBudget?: number | undefined;
        text?: string | undefined;
        responseType?: string | undefined;
        targetAgent?: string | undefined;
    };
    privacy: {
        sourceUpload: "metadata_only" | "never" | "selected_slices";
        redactionPolicy: "none" | "custom" | "default_local";
        maxBytes: number;
    };
    repo: {
        repoFingerprint: string;
        indexFreshness?: string | undefined;
        sourceEpochHash?: string | undefined;
        localSqlSchemaVersion?: number | undefined;
    };
    feature: "premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals";
    client: {
        capabilities: string[];
        packageName: "@rhei-team/rhei" | "@rhei-team/mcp-server" | "@rhei/mcp-server";
        packageVersion: string;
        commandRunner?: "unknown" | "local" | "npm" | "npx" | "bunx" | "pnpm" | "pnpm_dlx" | undefined;
    };
    localCandidates: {
        path: string;
        language?: string | undefined;
        contentHash?: string | undefined;
        spans?: {
            startLine: number;
            endLine: number;
            text?: string | undefined;
        }[] | undefined;
        localReasonCodes?: string[] | undefined;
    }[];
}, {
    kind: "RheiPremiumContextPlanRequestV1";
    schemaVersion: 1;
    goal: {
        tokenBudget?: number | undefined;
        text?: string | undefined;
        responseType?: string | undefined;
        targetAgent?: string | undefined;
    };
    privacy: {
        sourceUpload: "metadata_only" | "never" | "selected_slices";
        redactionPolicy: "none" | "custom" | "default_local";
        maxBytes: number;
    };
    repo: {
        repoFingerprint: string;
        indexFreshness?: string | undefined;
        sourceEpochHash?: string | undefined;
        localSqlSchemaVersion?: number | undefined;
    };
    feature: "premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals";
    client: {
        capabilities: string[];
        packageName: "@rhei-team/rhei" | "@rhei-team/mcp-server" | "@rhei/mcp-server";
        packageVersion: string;
        commandRunner?: "unknown" | "local" | "npm" | "npx" | "bunx" | "pnpm" | "pnpm_dlx" | undefined;
    };
    localCandidates: {
        path: string;
        language?: string | undefined;
        contentHash?: string | undefined;
        spans?: {
            startLine: number;
            endLine: number;
            text?: string | undefined;
        }[] | undefined;
        localReasonCodes?: string[] | undefined;
    }[];
}>;
export type RheiPremiumContextPlanRequestV1 = z.infer<typeof RheiPremiumContextPlanRequestV1Schema>;
export declare const RheiPremiumContextPlanResponseV1Schema: z.ZodObject<{
    kind: z.ZodLiteral<"RheiPremiumContextPlanResponseV1">;
    schemaVersion: z.ZodLiteral<1>;
    status: z.ZodEnum<["ok", "degraded", "not_authenticated", "not_entitled", "rate_limited", "unavailable"]>;
    license: z.ZodObject<{
        kind: z.ZodLiteral<"RheiLicenseStatusV1">;
        schemaVersion: z.ZodLiteral<1>;
        status: z.ZodEnum<["anonymous", "authenticated_free", "entitled", "not_entitled", "expired", "rate_limited", "unreachable"]>;
        tenantId: z.ZodOptional<z.ZodString>;
        accountId: z.ZodOptional<z.ZodString>;
        enabledFeatures: z.ZodArray<z.ZodEnum<["premium_context_rerank", "premium_graph_expand", "premium_service_enrichment", "premium_drift_signals"]>, "many">;
        expiresAt: z.ZodOptional<z.ZodString>;
        checkedAt: z.ZodString;
        serverTraceId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    }, {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    }>;
    serverTraceId: z.ZodString;
    advisoryOnly: z.ZodLiteral<true>;
    rankedRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        rank: z.ZodNumber;
        reasonCodes: z.ZodArray<z.ZodString, "many">;
        evidenceRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        reasonCodes: string[];
        rank: number;
        evidenceRefs?: string[] | undefined;
    }, {
        path: string;
        reasonCodes: string[];
        rank: number;
        evidenceRefs?: string[] | undefined;
    }>, "many">>;
    graphEvidence: z.ZodOptional<z.ZodUnknown>;
    warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    kind: "RheiPremiumContextPlanResponseV1";
    schemaVersion: 1;
    advisoryOnly: true;
    status: "unavailable" | "degraded" | "ok" | "not_entitled" | "rate_limited" | "not_authenticated";
    serverTraceId: string;
    license: {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    };
    warnings?: string[] | undefined;
    graphEvidence?: unknown;
    rankedRefs?: {
        path: string;
        reasonCodes: string[];
        rank: number;
        evidenceRefs?: string[] | undefined;
    }[] | undefined;
}, {
    kind: "RheiPremiumContextPlanResponseV1";
    schemaVersion: 1;
    advisoryOnly: true;
    status: "unavailable" | "degraded" | "ok" | "not_entitled" | "rate_limited" | "not_authenticated";
    serverTraceId: string;
    license: {
        kind: "RheiLicenseStatusV1";
        schemaVersion: 1;
        status: "not_entitled" | "expired" | "anonymous" | "authenticated_free" | "entitled" | "rate_limited" | "unreachable";
        checkedAt: string;
        enabledFeatures: ("premium_context_rerank" | "premium_graph_expand" | "premium_service_enrichment" | "premium_drift_signals")[];
        expiresAt?: string | undefined;
        tenantId?: string | undefined;
        accountId?: string | undefined;
        serverTraceId?: string | undefined;
    };
    warnings?: string[] | undefined;
    graphEvidence?: unknown;
    rankedRefs?: {
        path: string;
        reasonCodes: string[];
        rank: number;
        evidenceRefs?: string[] | undefined;
    }[] | undefined;
}>;
export type RheiPremiumContextPlanResponseV1 = z.infer<typeof RheiPremiumContextPlanResponseV1Schema>;
export type RheiAuthStateV1 = {
    kind: "RheiAuthStateV1";
    schemaVersion: 1;
    status: "signed_out" | "signed_in";
    source: "env" | "local_store" | "none";
    tokenPreview?: string;
};
export type RheiPremiumBoundaryV1 = {
    kind: "RheiPremiumBoundaryV1";
    schemaVersion: 1;
    mode: RheiPremiumModeV1;
    decision: "local_only" | "remote_allowed" | "blocked";
    reason: "premium_off" | "missing_auth" | "not_entitled" | "source_upload_disabled" | "server_unreachable" | "rate_limited" | "allowed";
    requestedFeature: RheiPremiumFeatureV1;
    licenseStatus?: RheiLicenseStatusV1["status"];
    serverTraceId?: string;
    checkedAt?: string;
    userMessage: string;
    advisoryOnly: true;
};
export type RheiPremiumContextPlanProjectionV1 = {
    kind: "RheiPremiumContextPlanProjectionV1";
    schemaVersion: 1;
    status: RheiPremiumContextPlanResponseV1["status"] | "skipped";
    decision: RheiPremiumBoundaryV1["decision"];
    reason: RheiPremiumBoundaryV1["reason"] | "premium_boundary_absent";
    requestedFeature?: RheiPremiumFeatureV1;
    serverTraceId?: string;
    rankedRefs?: RheiPremiumContextPlanResponseV1["rankedRefs"];
    warnings?: string[];
    advisoryOnly: true;
};