/**
 * License validation for EE features.
 *
 * Validation is delegated to the Mastra license server via `LicenseClient`
 * (POST {MASTRA_LICENSE_URL}/validate). The client validates in the
 * background and caches the result; the synchronous helpers in this module
 * read the cached state:
 *
 * - No license key configured → EE features disabled.
 * - Key configured, validation pending → fail open (features enabled) until
 *   the first server response settles the state.
 * - Server says invalid/revoked/expired → EE features disabled.
 * - Server unreachable → fail open with a 72h grace period for previously
 *   validated licenses.
 *
 * `MASTRA_LICENSE_KEY` is the primary env var; `MASTRA_EE_LICENSE` is a
 * supported legacy alias.
 */
/**
 * License information.
 */
export interface LicenseInfo {
    /** Whether the license is valid */
    valid: boolean;
    /** License expiration date */
    expiresAt?: Date;
    /** Features enabled by this license */
    features?: string[];
    /** Organization name */
    organization?: string;
    /** License plan tier (e.g. 'teams', 'enterprise') */
    tier?: string;
}
export interface SafeLicenseSummary {
    valid: boolean;
    isDevEnvironment: boolean;
    licenseHash?: string;
    anonymousId?: string;
    features?: string[];
    tier?: string;
}
/**
 * Start license validation against the license server.
 *
 * Safe to call multiple times — the underlying client caches results and
 * schedules its own background revalidation. Resolves to whether the license
 * is currently considered valid.
 */
export declare function startLicenseValidation(): Promise<boolean>;
/**
 * Validate the configured license and return license information.
 *
 * Reflects the current server-backed validation state. The actual network
 * validation happens in the background via `LicenseClient`, and only the
 * configured key (env var) is ever validated — passing any other key
 * returns invalid.
 *
 * @param licenseKey - Optional key to check; must match the configured key.
 * @returns License information
 */
export declare function validateLicense(licenseKey?: string): LicenseInfo;
/**
 * Check if EE features are enabled (valid or pending server validation).
 *
 * @returns True if EE features should be enabled
 */
export declare function isLicenseValid(): boolean;
/**
 * @deprecated Use `isLicenseValid()` instead. This alias is provided for backward compatibility.
 */
export declare const isEELicenseValid: typeof isLicenseValid;
/**
 * Check if a specific EE feature is enabled by the license entitlements.
 *
 * @param feature - Feature name to check (e.g. 'rbac', 'fga', 'sso')
 * @returns True if the feature is enabled
 */
export declare function isFeatureEnabled(feature: string): boolean;
/**
 * Get the current license information.
 *
 * @returns License info or null if no license key is configured
 */
export declare function getLicenseInfo(): LicenseInfo | null;
export declare function getSafeLicenseSummary(): SafeLicenseSummary;
export declare function warnIfDevEENeedsLicense(): void;
/**
 * Clear the license cache (useful for testing).
 * Resets the shared client so the next check re-reads env vars.
 */
export declare function clearLicenseCache(): void;
/**
 * Check if running in a development/testing environment.
 * In dev, EE features work without a license per the ee/LICENSE terms.
 */
export declare function isDevEnvironment(): boolean;
/**
 * Check if EE features should be active.
 * Returns true if running in dev/test environment (always allowed) or if a valid license is present.
 */
export declare function isEEEnabled(): boolean;
//# sourceMappingURL=license.d.ts.map