/** * GitMem Tier Detection and Feature Flags * * Three tiers: * free — Local JSON storage, keyword search, zero config * pro — Supabase + embeddings, semantic search, cloud persistence, variants * dev — Everything in pro + compliance, transcripts, metrics * * Detection chain: * 1. GITMEM_TIER env var (explicit override — testing/dev) * 2. api_key in config.json or GITMEM_API_KEY env var: * a. Check license-cache.json → if valid + not expired (72h) → return cached tier * b. No cache → optimistic "pro" (validated async in runServer) * 3. No key + no SUPABASE_URL + no config.supabase_url → free * 4. No key + SUPABASE_URL set (env var) → pro (backward compat for us) */ export type GitMemTier = "free" | "pro" | "dev"; /** * Get the current tier (cached after first call) */ export declare function getTier(): GitMemTier; /** * Force-set tier (used by license validation on failure) */ export declare function setTier(tier: GitMemTier): void; /** * Reset tier detection (for testing) */ export declare function resetTier(): void; /** Whether Supabase is available for storage (pro, dev) */ export declare function hasSupabase(): boolean; /** Whether embedding generation is available (pro, dev) */ export declare function hasEmbeddings(): boolean; /** Whether session close compliance validation is active (dev only) */ export declare function hasCompliance(): boolean; /** Whether scar variant A/B testing is active (pro, dev — needs Supabase for assignment storage) */ export declare function hasVariants(): boolean; /** Whether transcript storage/retrieval is available (dev only) */ export declare function hasTranscripts(): boolean; /** Whether batch scar usage recording is available (dev only) */ export declare function hasBatchOperations(): boolean; /** Whether cache management tools are available (pro, dev) */ export declare function hasCacheManagement(): boolean; /** Whether Pro-tier insights (decay tags, analytics snippets, blindspots) are active (pro, dev) */ export declare function hasProInsights(): boolean; /** Whether detailed performance metrics recording is active (pro, dev — aligned with hasVariants) */ export declare function hasMetrics(): boolean; /** Whether advanced agent detection (5-agent matrix) is active (dev only) */ export declare function hasAdvancedAgentDetection(): boolean; /** Whether multi-project support is active (dev only) */ export declare function hasMultiProject(): boolean; /** Whether LLM-cooperative enforcement fields are generated (dev only) */ export declare function hasEnforcementFields(): boolean; /** * Get the table prefix for the current tier */ export declare function getTablePrefix(): string; /** * Get the fully-qualified table name for a base table name */ export declare function getTableName(baseName: string): string; /** Whether all tool aliases (gitmem-*, gm-*) should be advertised (default: false) */ export declare function hasFullAliases(): boolean; //# sourceMappingURL=tier.d.ts.map