@astermind/astermind-synth
Version:
OmegaSynth - Label-Conditioned Synthetic Data Generator for AsterMind ELM/KELM Pipelines
46 lines (45 loc) • 1.83 kB
TypeScript
/**
* License management for OmegaSynth
* Wraps @astermindai/license-runtime with convenience functions
*/
import { type LicenseState } from '@astermindai/license-runtime';
/**
* Initialize the license runtime singleton.
* Must be called before any other license functions.
* Automatically loads token from ASTERMIND_LICENSE_TOKEN environment variable if present.
*
* PROFESSIONAL LICENSING APPROACH:
* - Always requires a valid license key (strict mode)
* - Trial keys are obtained from the license server and have expiration dates
* - No "eval mode" bypass - all usage requires a valid key
* - For testing, use a test/dev key or mock the license runtime
*
* This follows industry best practices where:
* 1. All users (including evaluators) must obtain a trial key
* 2. License validation happens server-side via JWT verification
* 3. Trial keys expire after a set period (e.g., 30 days)
* 4. No environment-based bypasses are possible
*/
export declare function initializeLicense(): void;
export declare function requireLicense(): void;
/**
* Check if license is valid and feature is available (non-blocking).
* @returns true if astermind-synth feature is available
*/
export declare function checkLicense(): boolean;
/**
* Get detailed license status.
* @returns LicenseState object with status, reason, payload, etc.
*/
export declare function getLicenseStatus(): LicenseState;
/**
* Set license token from a string.
* Useful for dynamic token loading from backend services or user input.
* @param token The license token string (JWT format)
*/
export declare function setLicenseTokenFromString(token: string): Promise<void>;
/**
* Check if license runtime has been initialized.
* @returns true if initializeLicense() has been called
*/
export declare function isLicenseInitialized(): boolean;