export type PlanTier = 'free' | 'pro' | 'team' | 'enterprise';
export type SkillProfile = 'foundation' | 'all-builtin' | 'all-custom' | 'all-registry';
export type DarwinScope = 'off' | 'solo' | 'team' | 'fleet';
export type TrialPhase = 'grace' | 'activation' | 'expired';
export interface PlanCaps {
    maxProjects: number;
    maxMemoryEntries: number;
    maxOperatives: number;
    skillProfile: SkillProfile;
    darwinEnabled: boolean;
    darwinScope: DarwinScope;
}
/** JWT payload embedded in a signed license key */
export interface LicenseClaims {
    plan: PlanTier;
    seats: number;
    expires: number;
    features: string[];
    orgId: string | null;
    caps: PlanCaps;
    iat: number;
}
export interface LicenseStatus {
    valid: boolean;
    tier: PlanTier;
    caps: PlanCaps;
    expiresAt: number | null;
    orgId: string | null;
    /** True when the active status is the auto-issued local trial. */
    trial?: boolean;
    /** Trial phase for PLG surfaces. First three days are quiet grace; the rest of the trial uses soft activation prompts. */
    trialPhase?: TrialPhase;
    trialIssuedAt?: number;
    trialGraceEndsAt?: number;
    trialDaysElapsed?: number;
    trialDaysRemaining?: number;
    activationRequired?: boolean;
    activationMotion?: {
        phase: TrialPhase;
        required: boolean;
        title: string;
        message: string;
        action: string;
        url: string;
        command: string;
    };
    /** Reason a license is degraded; absent when status is valid. */
    degradedReason?: 'expired' | 'signature-invalid' | 'malformed' | 'not-activated' | 'activation-required' | 'trial-expired';
}
export type CapType = 'memory_entries' | 'projects' | 'operatives';
export interface CapCheckResult {
    exceeded: boolean;
    warning: boolean;
    current: number;
    limit: number;
    tier: PlanTier;
    upgradeUrl: string;
}
