/** * Plan codes for AsterMind licenses */ export type PlanCode = 'free' | 'pro' | 'business' | 'enterprise' | 'eval'; /** * License status states */ export type LicenseStatus = 'valid' | 'invalid' | 'expired' | 'missing' | 'eval'; /** * JWT License payload structure */ export interface LicensePayload { /** Issuer - should be 'astermind' */ iss: string; /** Subject - the license key ID */ sub: string; /** Audience - product identifier (e.g., 'cybernetic-chatbot') */ aud: string; /** Issued at timestamp (Unix seconds) */ iat: number; /** Expiration timestamp (Unix seconds) */ exp: number; /** Plan code */ plan: PlanCode; /** Organization name (optional) */ org?: string; /** Number of seats/users allowed */ seats: number; /** Enabled feature flags */ features: string[]; /** Grace period end timestamp (optional) */ graceUntil?: number; /** License version for compatibility */ licenseVersion: number; } /** * License state after verification */ export interface LicenseState { /** Current license status */ status: LicenseStatus; /** Decoded license payload (null if invalid/missing) */ payload: LicensePayload | null; /** Error message if verification failed */ error?: string; /** Whether we're in grace period */ inGracePeriod: boolean; /** Days until expiration (negative if expired) */ daysRemaining: number | null; } /** * Environment detection result */ export type Environment = 'development' | 'production' | 'unknown'; /** * License enforcement mode */ export type EnforcementMode = 'soft' | 'hard'; /** * License configuration */ export interface LicenseConfig { /** License key (JWT token) */ licenseKey?: string; /** Public key for verification (PEM format) */ publicKey?: string; /** Override environment detection */ environment?: Environment; /** Callback when license status changes */ onStatusChange?: (state: LicenseState) => void; } //# sourceMappingURL=types.d.ts.map