/** * Vorion Feature Flag Registry * * Centralized feature flag definitions for the entire platform. * All feature flags MUST be defined here - no inline flag strings. * * Usage: * import { FLAGS, type FeatureFlag } from '@vorionsys/contracts'; * if (isEnabled(FLAGS.TRUST_EDGE_CACHE)) { ... } * * @packageDocumentation */ /** * Feature flag registry - single source of truth */ export declare const FLAGS: { /** Enable edge caching for trust score lookups */ readonly TRUST_EDGE_CACHE: "trust_edge_cache"; /** Enable async trust score recalculation */ readonly TRUST_ASYNC_RECALC: "trust_async_recalc"; /** Enable v2 velocity calculation algorithm */ readonly TRUST_VELOCITY_V2: "trust_velocity_v2"; /** Enable trust score decay over time */ readonly TRUST_DECAY_ENABLED: "trust_decay_enabled"; /** Enable multi-dimensional trust scoring */ readonly TRUST_MULTIDIMENSIONAL: "trust_multidimensional"; /** Enable async proof signing */ readonly PROOF_ASYNC_SIGNING: "proof_async_signing"; /** Enable multi-party proof attestation */ readonly PROOF_MULTI_PARTY: "proof_multi_party"; /** Enable proof compression for storage */ readonly PROOF_COMPRESSION: "proof_compression"; /** Enable real-time proof streaming */ readonly PROOF_STREAMING: "proof_streaming"; /** Enable policy playground for testing */ readonly POLICY_PLAYGROUND: "policy_playground"; /** Enable v2 enforce response format */ readonly ENFORCE_V2_RESPONSE: "enforce_v2_response"; /** Enable council decision workflows */ readonly COUNCIL_DECISIONS: "council_decisions"; /** Enable semantic policy matching */ readonly SEMANTIC_POLICY: "semantic_policy"; /** Enable dark mode UI */ readonly DARK_MODE: "dark_mode"; /** Enable new user onboarding flow */ readonly NEW_ONBOARDING: "new_onboarding"; /** Enable advanced analytics dashboard */ readonly ADVANCED_ANALYTICS: "advanced_analytics"; /** Enable real-time notifications */ readonly REALTIME_NOTIFICATIONS: "realtime_notifications"; /** Enable A2A protocol v2 */ readonly A2A_V2: "a2a_v2"; /** Enable GraphQL API */ readonly GRAPHQL_API: "graphql_api"; /** Enable webhook delivery */ readonly WEBHOOKS: "webhooks"; /** Enable SDK telemetry collection */ readonly SDK_TELEMETRY: "sdk_telemetry"; /** Enable request batching */ readonly REQUEST_BATCHING: "request_batching"; /** Enable connection pooling */ readonly CONNECTION_POOLING: "connection_pooling"; /** Enable response caching */ readonly RESPONSE_CACHE: "response_cache"; /** Enable distributed tracing */ readonly DISTRIBUTED_TRACING: "distributed_tracing"; /** Enable Merkle tree proof aggregation */ readonly MERKLE_PROOFS: "merkle_proofs"; /** Enable zero-knowledge proof generation */ readonly ZK_PROOFS: "zk_proofs"; /** Enable advanced trust decay algorithms */ readonly ADVANCED_TRUST_DECAY: "advanced_trust_decay"; /** Enable Trusted Execution Environment support */ readonly TEE_SUPPORT: "tee_support"; /** Enable DPoP (Demonstration of Proof-of-Possession) tokens */ readonly DPOP_TOKENS: "dpop_tokens"; /** Enable Hardware Security Module integration */ readonly HSM_INTEGRATION: "hsm_integration"; /** Enable multi-tenant architecture */ readonly MULTI_TENANT: "multi_tenant"; /** Enable enterprise SSO integration */ readonly ENTERPRISE_SSO: "enterprise_sso"; /** Enable verbose logging for debugging */ readonly VERBOSE_LOGGING: "verbose_logging"; /** Enable experimental API endpoints */ readonly EXPERIMENTAL_API: "experimental_api"; /** Enable legacy compatibility mode */ readonly LEGACY_COMPAT: "legacy_compat"; }; /** * Feature flag type - ensures type safety when referencing flags */ export type FeatureFlag = (typeof FLAGS)[keyof typeof FLAGS]; /** * Feature flag metadata for documentation and UI */ export interface FeatureFlagMeta { flag: FeatureFlag; name: string; description: string; category: 'trust' | 'proof' | 'governance' | 'platform' | 'api' | 'performance' | 'crypto' | 'security' | 'enterprise' | 'debug'; defaultEnabled: boolean; phase?: number; owner?: string; expiresAt?: string; deprecatedAt?: string; } /** * Flag metadata registry for documentation and admin UI */ export declare const FLAG_METADATA: Record; /** * Get all flags in a category */ export declare function getFlagsByCategory(category: FeatureFlagMeta['category']): FeatureFlag[]; /** * Get flag metadata */ export declare function getFlagMeta(flag: FeatureFlag): FeatureFlagMeta; /** * Check if a feature flag is enabled * @param flag - The feature flag to check * @param overrides - Optional overrides for testing */ export declare function isFeatureEnabled(flag: FeatureFlag, overrides?: Partial>): boolean; /** * Get all enabled feature flags * @param overrides - Optional overrides for testing */ export declare function getEnabledFeatures(overrides?: Partial>): FeatureFlag[]; /** * Get all flags belonging to a specific implementation phase * @param phase - The phase number (7, 8, 9, etc.) */ export declare function getFlagsByPhase(phase: number): FeatureFlag[]; /** * Legacy alias for FLAGS constant * @deprecated Use FLAGS instead */ export declare const FeatureFlags: { /** Enable edge caching for trust score lookups */ readonly TRUST_EDGE_CACHE: "trust_edge_cache"; /** Enable async trust score recalculation */ readonly TRUST_ASYNC_RECALC: "trust_async_recalc"; /** Enable v2 velocity calculation algorithm */ readonly TRUST_VELOCITY_V2: "trust_velocity_v2"; /** Enable trust score decay over time */ readonly TRUST_DECAY_ENABLED: "trust_decay_enabled"; /** Enable multi-dimensional trust scoring */ readonly TRUST_MULTIDIMENSIONAL: "trust_multidimensional"; /** Enable async proof signing */ readonly PROOF_ASYNC_SIGNING: "proof_async_signing"; /** Enable multi-party proof attestation */ readonly PROOF_MULTI_PARTY: "proof_multi_party"; /** Enable proof compression for storage */ readonly PROOF_COMPRESSION: "proof_compression"; /** Enable real-time proof streaming */ readonly PROOF_STREAMING: "proof_streaming"; /** Enable policy playground for testing */ readonly POLICY_PLAYGROUND: "policy_playground"; /** Enable v2 enforce response format */ readonly ENFORCE_V2_RESPONSE: "enforce_v2_response"; /** Enable council decision workflows */ readonly COUNCIL_DECISIONS: "council_decisions"; /** Enable semantic policy matching */ readonly SEMANTIC_POLICY: "semantic_policy"; /** Enable dark mode UI */ readonly DARK_MODE: "dark_mode"; /** Enable new user onboarding flow */ readonly NEW_ONBOARDING: "new_onboarding"; /** Enable advanced analytics dashboard */ readonly ADVANCED_ANALYTICS: "advanced_analytics"; /** Enable real-time notifications */ readonly REALTIME_NOTIFICATIONS: "realtime_notifications"; /** Enable A2A protocol v2 */ readonly A2A_V2: "a2a_v2"; /** Enable GraphQL API */ readonly GRAPHQL_API: "graphql_api"; /** Enable webhook delivery */ readonly WEBHOOKS: "webhooks"; /** Enable SDK telemetry collection */ readonly SDK_TELEMETRY: "sdk_telemetry"; /** Enable request batching */ readonly REQUEST_BATCHING: "request_batching"; /** Enable connection pooling */ readonly CONNECTION_POOLING: "connection_pooling"; /** Enable response caching */ readonly RESPONSE_CACHE: "response_cache"; /** Enable distributed tracing */ readonly DISTRIBUTED_TRACING: "distributed_tracing"; /** Enable Merkle tree proof aggregation */ readonly MERKLE_PROOFS: "merkle_proofs"; /** Enable zero-knowledge proof generation */ readonly ZK_PROOFS: "zk_proofs"; /** Enable advanced trust decay algorithms */ readonly ADVANCED_TRUST_DECAY: "advanced_trust_decay"; /** Enable Trusted Execution Environment support */ readonly TEE_SUPPORT: "tee_support"; /** Enable DPoP (Demonstration of Proof-of-Possession) tokens */ readonly DPOP_TOKENS: "dpop_tokens"; /** Enable Hardware Security Module integration */ readonly HSM_INTEGRATION: "hsm_integration"; /** Enable multi-tenant architecture */ readonly MULTI_TENANT: "multi_tenant"; /** Enable enterprise SSO integration */ readonly ENTERPRISE_SSO: "enterprise_sso"; /** Enable verbose logging for debugging */ readonly VERBOSE_LOGGING: "verbose_logging"; /** Enable experimental API endpoints */ readonly EXPERIMENTAL_API: "experimental_api"; /** Enable legacy compatibility mode */ readonly LEGACY_COMPAT: "legacy_compat"; };