/** Code-owned definitions. Publish changes through a versioned CMS migration. */ export declare const FEATURE_FLAGS: { readonly "copilot.native_tasks": { readonly displayName: "Native Copilot tasks"; readonly description: "Allow Copilot to delegate local work to native tasks on the same worker."; readonly defaultEnabled: false; readonly defaultAllowUserOverride: true; readonly requiredCapability: "copilot.native_tasks"; }; readonly "agents.base_v2": { readonly displayName: "Base Agent V2"; readonly description: "Use the discovery-first base instructions with native tasks. Requires Native Copilot tasks; package tools remain available in either mode."; readonly defaultEnabled: false; readonly defaultAllowUserOverride: true; readonly requiredCapability: "agents.base_v2"; }; }; export type FeatureKey = keyof typeof FEATURE_FLAGS; export type ResolveOptions = { fallback: boolean; required?: never; } | { required: true; fallback?: never; }; export interface FeatureOwner { provider: string; subject: string; } export interface FeatureDefinition { featureKey: string; displayName: string; description: string; defaultEnabled: boolean; defaultAllowUserOverride: boolean; requiredCapability: string | null; revision: string; } export interface FeatureSetting { settingId: string; featureKey: string; scope: "cluster" | "user"; userId: number | null; enabled: boolean; allowUserOverride: boolean | null; revision: string; updatedBy: string; updatedAt: string; owner?: FeatureOwner; } export interface FeatureSnapshot { definitions: FeatureDefinition[]; settings: FeatureSetting[]; } export interface FeatureDecision { enabled: boolean; source: "cluster" | "user" | "default" | "fallback"; revision: string | null; stale: boolean; reason?: "unknown_key" | "catalog_missing" | "cache_unavailable" | "requires_native_tasks"; } export declare class FeatureFlagError extends Error { readonly code: string; readonly status: number; constructor(code: string, message: string, status?: number); } export declare class FeatureFlagResolutionError extends FeatureFlagError { constructor(code: string, key: string); } export declare function isFeatureKey(key: string): key is FeatureKey; export declare function featureOwnerKey(owner: FeatureOwner): string; export declare function assertResolveOptions(options: ResolveOptions): void; export declare function unresolvedFeature(key: string, options: ResolveOptions, reason: FeatureDecision["reason"], stale?: boolean): FeatureDecision; export declare function resolveFeatureDefinition(definition: FeatureDefinition, cluster?: FeatureSetting, user?: FeatureSetting, stale?: boolean): FeatureDecision; /** A narrow prerequisite for the base prompt; saved preferences remain independent. */ export declare function applyBaseAgentPrerequisite(key: string, decision: FeatureDecision, native: FeatureDecision | undefined): FeatureDecision; //# sourceMappingURL=feature-flags.d.ts.map