/** * Entitlement Seam * * Gates paid capabilities (the LLM/agentic analysis layer) behind a * subscription check. The agentic layer has real per-run Anthropic COGS, so * it cannot run unmetered for non-paying users. * * Phase 0 ships a permissive STUB whose interface is shaped for the chosen * enforcement model: **hosted-metered** (a Vaspera-hosted endpoint holds the * model key, verifies the subscription server-side, and meters spend). The * real backend replaces `resolveEntitlement` without changing call sites. * * Default posture is **not entitled** unless explicitly configured — this * preserves current behavior for unconfigured installs and makes the paid * boundary explicit. Internal/dogfood runs opt in via env. * * @module entitlement */ /** Features that require entitlement (paid tier). */ export type EntitledFeature = "agentic-analysis" | "runtime-proof"; export interface EntitlementContext { feature: EntitledFeature; projectPath: string; certificationId?: string; } export interface EntitlementResult { entitled: boolean; /** Human-readable explanation (shown to the user when not entitled). */ reason: string; /** Opaque metering token from the hosted backend; absent in the stub. */ meterToken?: string; /** Provenance of the decision, for audit. */ source: "hosted" | "env" | "stub"; } export declare class EntitlementError extends Error { readonly result: EntitlementResult; constructor(message: string, result: EntitlementResult); } /** * Check entitlement without throwing. Use when you want to skip a paid step * cleanly (e.g. continue a certification with only the free deterministic * layer). */ export declare function checkEntitlement(ctx: EntitlementContext): Promise; /** * Assert entitlement, throwing {@link EntitlementError} when not entitled. * Use at hard boundaries where the paid work must not proceed. */ export declare function assertEntitled(ctx: EntitlementContext): Promise; //# sourceMappingURL=index.d.ts.map