import type { ManagedSettingsChannel } from "./copilotManagedSettings.js"; /** Lifecycle of the `forceRemoteSettingsRefresh` fail-closed gate. */ export declare enum ManagedSettingsFreshnessState { /** The control is not effective. */ NotRequired = "notRequired", /** A fresh response is required and the request has not completed. */ Pending = "pending", /** A fresh response, including a fresh 404, was received for the current scope. */ Satisfied = "satisfied", /** The required refresh failed. */ Blocked = "blocked" } /** Failure categories that require distinct remediation or diagnostics. */ export declare enum ManagedSettingsFreshnessFailure { NoUrl = "noUrl", NoToken = "noToken", Network = "network", RateLimited = "rateLimited", HttpError = "httpError", /** JSON parsing failed; runtime-owned schema validation is not duplicated here. */ Malformed = "malformed", UpdateRequired = "updateRequired" } /** Account, provider, and endpoint for which freshness was attempted or satisfied. */ export interface IManagedSettingsFreshnessScope { readonly accountId: string; readonly authenticationProviderId: string; readonly endpointOrigin: string; } interface IManagedSettingsFreshnessEffective { readonly source: ManagedSettingsChannel; readonly scope?: IManagedSettingsFreshnessScope; readonly lastAttemptAt?: number; } type ManagedSettingsFreshnessBlocked = IManagedSettingsFreshnessEffective & { readonly state: ManagedSettingsFreshnessState.Blocked; } & ({ readonly failure: ManagedSettingsFreshnessFailure.HttpError; readonly httpStatus: number; } | { readonly failure: Exclude; }); /** Observable freshness state shared by fetching, gating, and diagnostics. */ export type IManagedSettingsFreshness = { readonly state: ManagedSettingsFreshnessState.NotRequired; } | (IManagedSettingsFreshnessEffective & { readonly state: ManagedSettingsFreshnessState.Pending; }) | (IManagedSettingsFreshnessEffective & { readonly state: ManagedSettingsFreshnessState.Satisfied; readonly scope: IManagedSettingsFreshnessScope; readonly satisfiedAt: number; }) | ManagedSettingsFreshnessBlocked; export declare const MANAGED_SETTINGS_FRESHNESS_NOT_REQUIRED: IManagedSettingsFreshness; /** Whether AI functionality must be withheld until freshness is established. */ export declare function isManagedSettingsFreshnessBlocking(freshness: IManagedSettingsFreshness): boolean; /** Whether the satisfied result belongs to `scope`. */ export declare function isManagedSettingsFreshnessSatisfiedFor(freshness: IManagedSettingsFreshness, scope: IManagedSettingsFreshnessScope): boolean; export {};