import type { ManagedSettingsData } from "./policy.js"; export interface IQuotaSnapshotData { readonly overage_count: number; readonly overage_entitlement: number; readonly overage_permitted: boolean; readonly credits_used?: number; readonly percent_remaining: number; readonly unlimited: boolean; readonly quota_reset_at?: number; readonly token_based_billing?: boolean; readonly entitlement?: string; readonly quota_remaining?: number; readonly has_quota?: boolean; } export interface ILegacyQuotaSnapshotData { readonly limited_user_quotas?: { readonly chat: number; readonly completions: number; }; readonly monthly_quotas?: { readonly chat: number; readonly completions: number; }; } export interface IEntitlementsData extends ILegacyQuotaSnapshotData { readonly access_type_sku: string; readonly chat_enabled: boolean; readonly assigned_date: string; readonly can_signup_for_limited: boolean; readonly copilot_plan: string; readonly organization_login_list: string[]; readonly is_staff?: boolean; readonly analytics_tracking_id: string; readonly limited_user_reset_date?: string; readonly quota_reset_date?: string; readonly quota_reset_date_utc?: string; readonly token_based_billing?: boolean; readonly can_upgrade_plan?: boolean; readonly cloud_session_storage_enabled?: boolean; readonly quota_snapshots?: { chat?: IQuotaSnapshotData; completions?: IQuotaSnapshotData; premium_interactions?: IQuotaSnapshotData; }; readonly endpoints?: Record; } export interface IPolicyData { readonly mcp?: boolean; readonly chat_preview_features_enabled?: boolean; readonly chat_agent_enabled?: boolean; readonly cloud_session_storage_enabled?: boolean; readonly mcpRegistryUrl?: string; readonly mcpAccess?: "allow_all" | "registry_only"; /** * Normalized enterprise-managed settings, keyed by dot-separated managed-settings * paths such as `permissions.disableBypassPermissionsMode`. This is the single * channel for enterprise-managed configuration: server-delivered settings and * native MDM settings both project into this bag, so policy `value()` callbacks * behave identically regardless of source. Structured settings (e.g. * `enabledPlugins`, `extraKnownMarketplaces`) are carried as canonical JSON strings. */ readonly managedSettings?: ManagedSettingsData; /** * Whether at least one managed-settings delivery channel currently contributes governance. * The Local-only `vscode.temporaryAllowLocalHarness` key does not contribute to this flag; * other settings retain presence-based governance. * * Unlike {@link managedSettings}, this also reflects structured runtime-owned keys that the * policy projection does not retain. */ readonly managedSettingsActive?: boolean; } export interface ICopilotTokenInfo { readonly sn?: string; readonly fcv1?: string; } export interface IDefaultAccountAuthenticationProvider { readonly id: string; readonly name: string; readonly enterprise: boolean; } export interface IDefaultAccount { readonly authenticationProvider: IDefaultAccountAuthenticationProvider; readonly accountName: string; readonly sessionId: string; readonly enterprise: boolean; readonly entitlementsData?: IEntitlementsData | null; }