@jchat/runtime 1.0.0-alpha.3 → 1.0.0-alpha.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,21 +1,27 @@
1
- import * as z from "zod";
1
+ import { APPLICATION_DISTRIBUTION, APPLICATION_DISTRIBUTIONS, ApplicationDistribution, IS_DEVELOPER_SANDBOX, isDeveloperSandbox, resolveApplicationDistribution } from "./distribution.mjs";
2
+ import { Elysia } from "elysia";
2
3
  //#region src/domain.d.ts
3
- type Plan = "standard" | "extended";
4
- type RoutingMode = "path" | "subdomain";
5
- type DomainScope = "current-host" | "parent-domain";
6
- type NormalizedDomain = {
4
+ export type Provider = "envato" | "jchat";
5
+ export type Plan = string;
6
+ export type RoutingMode = "path" | "subdomain";
7
+ export type DomainScope = "current-host" | "parent-domain";
8
+ export type NormalizedDomain = {
7
9
  host: string;
8
10
  isLocalhost: boolean;
9
11
  };
10
12
  /** Normalize the host used for instance binding; ports and www are not significant. */
11
- declare function normalizeDomain(value: string): NormalizedDomain;
12
- declare function isPublicDomain(value: string): boolean;
13
- declare function isAllowedConfiguredDomain(value: string): boolean;
14
- declare function resolveActivationDomain(host: string, plan: Plan, routingMode: RoutingMode, domainScope?: DomainScope): string;
13
+ export declare function normalizeDomain(value: string): NormalizedDomain;
14
+ export declare function isPublicDomain(value: string): boolean;
15
+ export declare function isAllowedConfiguredDomain(value: string): boolean;
16
+ export declare function isLocalhostDomain(value: string): boolean;
17
+ export declare function getRootDomain(value: string): string | null;
18
+ /** Checks if a request domain matches or is an authorized subdomain of the licensed domain. */
19
+ export declare function isMatchingDomain(requestHost: string, licensedDomain: string): boolean;
20
+ export declare function resolveActivationDomain(host: string, isMultiSite: boolean, routingMode: RoutingMode, domainScope?: DomainScope): string;
15
21
  //#endregion
16
22
  //#region src/audit.d.ts
17
- type AuditEvent = "check_success" | "check_unreachable" | "check_rejected";
18
- declare function recordAudit(event: AuditEvent, details: {
23
+ export type AuditEvent = "check_success" | "check_unreachable" | "check_rejected";
24
+ export declare function recordAudit(event: AuditEvent, details: {
19
25
  domain?: string;
20
26
  installationId?: string;
21
27
  reference?: string;
@@ -34,18 +40,14 @@ type CheckResult = {
34
40
  error: string;
35
41
  reference: string;
36
42
  };
37
- type RegistryProvider = "envato" | "jchat";
38
- type RegistryRoutingMode = "path" | "subdomain";
39
43
  type ActivationInput = {
40
44
  purchaseCode: string;
41
45
  domain: string;
42
46
  siteSlug?: string;
43
47
  domainScope?: "current-host" | "parent-domain";
44
- provider: RegistryProvider;
45
- routingMode: RegistryRoutingMode;
48
+ provider: Provider;
49
+ routingMode: RoutingMode;
46
50
  installationId: string;
47
- installationPublicKey: string;
48
- machineFingerprint: string;
49
51
  registryEndpoint?: string;
50
52
  fetchImpl?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
51
53
  };
@@ -58,58 +60,85 @@ type ActivationResult = {
58
60
  success: false;
59
61
  message: string;
60
62
  };
61
- declare function activateRegistry(input: ActivationInput): Promise<ActivationResult>;
63
+ export declare function activateRegistry(input: ActivationInput): Promise<ActivationResult>;
62
64
  type CheckInput = {
63
65
  token: string;
64
66
  domain: string;
65
- routingMode: RegistryRoutingMode;
67
+ routingMode: RoutingMode;
66
68
  installationId: string;
67
- machineFingerprint: string;
68
69
  registryEndpoint?: string;
69
70
  runtimeOptions?: RuntimeOptions;
70
71
  auditPath?: string;
72
+ lastSuccessfulCheckAt?: string;
73
+ gracePeriodDays?: number;
71
74
  fetchImpl?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
72
- localTokenValidator?: (token: string, domain: string, installationId: string, machineFingerprint: string) => boolean;
75
+ localTokenValidator?: (token: string, domain: string, installationId: string) => boolean;
73
76
  };
74
- declare function checkRegistry(input: CheckInput): Promise<CheckResult>;
77
+ //#endregion
78
+ //#region src/constants.d.ts
79
+ export declare const DEFAULT_LICENSE_SERVER_URL = "https://license.jchatcloud.com";
80
+ export declare const DEFAULT_LICENSE_ISSUER = "https://license.jchatcloud.com";
81
+ export declare const DEFAULT_LICENSE_AUDIENCE = "jchat-chat";
82
+ export declare function getOfficialSigningPublicKey(): string;
83
+ export declare const OFFICIAL_SIGNING_PUBLIC_KEY: string;
84
+ //#endregion
85
+ //#region src/feature-crypto.d.ts
86
+ export interface FeatureExecutionContext {
87
+ isValid: boolean;
88
+ featureKey: string;
89
+ stage?: FeatureStage;
90
+ siteId?: string;
91
+ executionToken?: string;
92
+ error?: string;
93
+ }
94
+ /**
95
+ * Derives a cryptographically bound HMAC-SHA256 secret for a specific feature using the verified
96
+ * signature of the instance license token. Throws an Error if the signature is invalid or the token
97
+ * cannot be verified.
98
+ */
99
+ export declare function deriveFeatureKey(token: string, featureKey: string, domain?: string, options?: RuntimeOptions): string;
100
+ /**
101
+ * Checks and returns the allowed feature stages (stable, beta, experimental) for the current
102
+ * instance. The license token MUST have a valid RS256 cryptographic signature against the vendor
103
+ * public key; otherwise, only "stable" is returned.
104
+ */
105
+ export declare function checkAllowedStages(domain?: string, options?: RuntimeOptions): FeatureStage[];
106
+ /**
107
+ * Checks and returns the release channel (stable, lts) for the current instance. Reverts to
108
+ * "stable" if the token has no valid cryptographic signature.
109
+ */
110
+ export declare function checkReleaseChannel(domain?: string, options?: RuntimeOptions): ReleaseChannel;
111
+ /** Verifies that the instance is cryptographically licensed to execute a feature at a given stage. */
112
+ export declare function verifyFeatureStageAccess(stage: FeatureStage, domain?: string, options?: RuntimeOptions): boolean;
113
+ /**
114
+ * Derives a full FeatureExecutionContext. If the feature's required stage is not licensed or the
115
+ * token signature is invalid, isValid is false with an appropriate error message.
116
+ */
117
+ export declare function deriveFeatureExecutionContext(featureKey: string, requiredStage?: FeatureStage, siteId?: string, domain?: string, options?: RuntimeOptions): FeatureExecutionContext;
75
118
  //#endregion
76
119
  //#region src/state.d.ts
77
120
  type LocalState = {
78
121
  version: 1;
79
122
  installationId: string;
80
- privateKeyPem: string;
81
- publicKeyPem: string;
82
- machineFingerprint: string;
83
123
  instanceToken: string;
124
+ domain?: string;
84
125
  lastSuccessfulCheckAt?: string;
85
126
  };
86
- declare const DEFAULT_STATE_PATH: string;
87
- declare function createMachineFingerprint(): string;
88
- declare function createIdentity(machineFingerprint?: string): {
89
- installationId: `${string}-${string}-${string}-${string}-${string}`;
90
- machineFingerprint: string;
91
- privateKeyPem: string;
92
- publicKeyPem: string;
93
- };
94
- declare function readTokenSync(filePath?: string): string;
95
- declare function readState(filePath?: string): Promise<LocalState | null>;
96
- declare function writeState(state: LocalState, filePath?: string): Promise<void>;
97
- declare function updateInstanceToken(instanceToken: string, statePath?: string): Promise<void>;
98
- declare function acquireProcessLock(statePath?: string): Promise<() => Promise<void>>;
99
- //#endregion
100
- //#region src/runtime.d.ts
101
- type RuntimeStatus$1 = "valid" | "unreachable-fallback" | "invalid" | "unavailable";
102
- declare function registerInvalidationHandler(handler: () => void): void;
103
- declare function setRuntimeStatus(status: RuntimeStatus$1, reference?: string): void;
104
- declare function getRuntimeStatus(): {
105
- status: RuntimeStatus$1;
106
- reference: string;
127
+ export declare function resolveDataDir(): string;
128
+ export declare function getDefaultStatePath(): string;
129
+ export declare const DEFAULT_STATE_PATH: string;
130
+ export declare function createIdentity(): {
131
+ installationId: string;
107
132
  };
108
- declare function isApplicationDisabled(): boolean;
133
+ export declare function readStateSync(filePath?: string): LocalState | null;
134
+ export declare function readTokenSync(filePath?: string): string;
135
+ export declare function readState(filePath?: string): Promise<LocalState | null>;
136
+ export declare function writeState(state: LocalState, filePath?: string): Promise<void>;
137
+ export declare function updateInstanceToken(instanceToken: string, statePath?: string): Promise<void>;
109
138
  //#endregion
110
139
  //#region src/install.d.ts
111
- type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
112
- type LicenseVerificationResult = {
140
+ export type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
141
+ export type LicenseVerificationResult = {
113
142
  valid: true;
114
143
  buyer: string;
115
144
  token: string;
@@ -119,99 +148,223 @@ type LicenseVerificationResult = {
119
148
  valid: false;
120
149
  error: string;
121
150
  };
122
- declare function installAndActivate(purchaseCode: string, domain: string, siteSlug: string | undefined, domainScope: DomainScope | undefined, routingMode: RoutingMode, provider?: PurchaseProvider, fetchImpl?: FetchLike): Promise<LicenseVerificationResult>;
151
+ export declare function installAndActivate(purchaseCode: string, domain: string, siteSlug: string | undefined, domainScope: DomainScope | undefined, routingMode: RoutingMode, provider?: Provider, fetchImpl?: FetchLike): Promise<LicenseVerificationResult>;
123
152
  //#endregion
124
153
  //#region src/paths.d.ts
125
154
  interface RuntimePathOptions {
126
155
  cwd?: string;
127
156
  env?: Record<string, string | undefined>;
128
157
  }
129
- declare function resolveRuntimePaths(options?: RuntimePathOptions): {
158
+ export declare function resolveRuntimePaths(options?: RuntimePathOptions): {
130
159
  repoRoot: string | null;
131
160
  runtimeRoot: string;
132
161
  uploadsDir: string;
133
162
  addonBundlesDir: string;
134
163
  addonSourceDir: string;
135
164
  migrationsDir: string;
165
+ dataDir: string;
136
166
  };
167
+ export declare function findRepoRoot(startDir: string): string | null;
137
168
  //#endregion
138
- //#region src/env.d.ts
139
- declare const ServerConfigSchema: z.ZodObject<{
140
- JCHAT_PORT: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
141
- JCHAT_COOKIE_SECRET: z.ZodString;
142
- JCHAT_DATABASE_URL: z.ZodURL;
143
- JCHAT_REDIS_DATABASE_URL: z.ZodURL;
144
- JCHAT_STORAGE_TYPE: z.ZodEnum<{
145
- readonly LOCAL: "LOCAL";
146
- readonly MINIO: "MINIO";
147
- readonly CLOUDFLARE_R2: "CLOUDFLARE_R2";
148
- readonly AWS_S3: "AWS_S3";
149
- readonly GCS: "GCS";
150
- }>;
151
- JCHAT_MINIO_ENDPOINT: z.ZodOptional<z.ZodString>;
152
- JCHAT_MINIO_BUCKET_NAME: z.ZodOptional<z.ZodString>;
153
- JCHAT_MINIO_ACCESS_KEY_ID: z.ZodOptional<z.ZodString>;
154
- JCHAT_MINIO_SECRET_ACCESS_KEY: z.ZodOptional<z.ZodString>;
155
- JCHAT_MINIO_PUBLIC_URL: z.ZodOptional<z.ZodString>;
156
- JCHAT_AWS_REGION: z.ZodOptional<z.ZodString>;
157
- JCHAT_AWS_BUCKET_NAME: z.ZodOptional<z.ZodString>;
158
- JCHAT_AWS_ACCESS_KEY_ID: z.ZodOptional<z.ZodString>;
159
- JCHAT_AWS_SECRET_ACCESS_KEY: z.ZodOptional<z.ZodString>;
160
- JCHAT_CLOUDFLARE_ACCOUNT_ID: z.ZodOptional<z.ZodString>;
161
- JCHAT_CLOUDFLARE_BUCKET_NAME: z.ZodOptional<z.ZodString>;
162
- JCHAT_CLOUDFLARE_ACCESS_KEY_ID: z.ZodOptional<z.ZodString>;
163
- JCHAT_CLOUDFLARE_SECRET_ACCESS_KEY: z.ZodOptional<z.ZodString>;
164
- JCHAT_CLOUDFLARE_PUBLIC_URL: z.ZodOptional<z.ZodString>;
165
- JCHAT_GCS_BUCKET_NAME: z.ZodOptional<z.ZodString>;
166
- JCHAT_GCS_PROJECT_ID: z.ZodOptional<z.ZodString>;
167
- JCHAT_GCS_CLIENT_EMAIL: z.ZodOptional<z.ZodString>;
168
- JCHAT_GCS_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
169
- JCHAT_GCS_KEY_FILE: z.ZodOptional<z.ZodString>;
170
- JCHAT_BOT_NAME: z.ZodString;
171
- JCHAT_BOT_EMAIL: z.ZodEmail;
172
- JCHAT_DOMAIN: z.ZodOptional<z.ZodString>;
173
- JCHAT_SITE_URL: z.ZodOptional<z.ZodURL>;
174
- JCHAT_ROUTING_MODE: z.ZodDefault<z.ZodEnum<{
175
- path: "path";
176
- subdomain: "subdomain";
177
- }>>;
178
- JCHAT_ADDON_ENCRYPTION_KEY: z.ZodString;
179
- NODE_ENV: z.ZodDefault<z.ZodEnum<{
180
- development: "development";
181
- production: "production";
182
- test: "test";
183
- }>>;
184
- SYSTEM_BOOTSTRAP_COMPLETE: z.ZodOptional<z.ZodBoolean>;
185
- }, z.core.$strip>;
186
- type ServerConfig = z.infer<typeof ServerConfigSchema>;
169
+ //#region src/runtime.d.ts
170
+ type RuntimeStatus$1 = "valid" | "unreachable-fallback" | "invalid" | "unavailable";
171
+ export declare function setRuntimeStatus(status: RuntimeStatus$1, reference?: string): void;
172
+ export declare function getRuntimeStatus(): {
173
+ status: RuntimeStatus$1;
174
+ reference: string;
175
+ };
176
+ //#endregion
177
+ //#region src/plugin.d.ts
178
+ export type RuntimePluginOptions = {
179
+ domain?: string;
180
+ routingMode?: RoutingMode;
181
+ checkIntervalDays?: number;
182
+ signingKey?: string;
183
+ isBootstrapComplete?: boolean;
184
+ isPrimaryWorker?: boolean;
185
+ allowedPaths?: Set<string>;
186
+ onInvalidate?: () => void;
187
+ getSiteCount?: () => Promise<number> | number;
188
+ token?: string;
189
+ };
190
+ export declare function jchatRuntime(options?: RuntimePluginOptions): Elysia<"", {
191
+ decorator: {};
192
+ store: {};
193
+ derive: {
194
+ readonly runtimeStatus: {
195
+ status: RuntimeStatus$1;
196
+ reference: string;
197
+ };
198
+ };
199
+ resolve: {};
200
+ }, {
201
+ typebox: {};
202
+ error: {};
203
+ }, {
204
+ schema: {};
205
+ standaloneSchema: {};
206
+ macro: {};
207
+ macroFn: {};
208
+ parser: {};
209
+ response: {
210
+ 200: {
211
+ status: string;
212
+ message: string;
213
+ reference: string;
214
+ };
215
+ };
216
+ }, {}, {
217
+ derive: {};
218
+ resolve: {};
219
+ schema: {};
220
+ standaloneSchema: {};
221
+ response: {};
222
+ }, {
223
+ derive: {};
224
+ resolve: {};
225
+ schema: {};
226
+ standaloneSchema: {};
227
+ response: {};
228
+ }>;
229
+ export declare class FeatureForbiddenError extends Error {
230
+ readonly status = 403;
231
+ readonly responseStatus: string;
232
+ readonly reference: string;
233
+ constructor(message: string, reference?: string, responseStatus?: string);
234
+ }
235
+ export interface FeatureGuardOptions {
236
+ feature: string;
237
+ stage?: FeatureStage;
238
+ domain?: string;
239
+ requiredEntitlement?: string;
240
+ resolveSiteId?: (context: {
241
+ headers: Record<string, string | undefined>;
242
+ authContext?: {
243
+ site?: {
244
+ id: string;
245
+ };
246
+ };
247
+ [key: string]: unknown;
248
+ }) => Promise<string | undefined> | string | undefined;
249
+ isSiteEnabled?: (siteId: string, feature: string) => Promise<boolean> | boolean;
250
+ }
251
+ /**
252
+ * Elysia guard plugin that verifies a feature is active and authorized for the site/instance.
253
+ * Checks cryptographic license stage access, token validity, and site-level overrides.
254
+ */
255
+ export declare function runtimeFeatureGuard(options: FeatureGuardOptions): Elysia<"", {
256
+ decorator: {};
257
+ store: {};
258
+ derive: {};
259
+ resolve: {};
260
+ }, {
261
+ typebox: {};
262
+ error: {};
263
+ }, {
264
+ schema: {};
265
+ standaloneSchema: {};
266
+ macro: {};
267
+ macroFn: {};
268
+ parser: {};
269
+ response: {};
270
+ }, {}, {
271
+ derive: {
272
+ readonly featureContext: FeatureExecutionContext;
273
+ };
274
+ resolve: {};
275
+ schema: {};
276
+ standaloneSchema: {};
277
+ response: {};
278
+ }, {
279
+ derive: {};
280
+ resolve: {};
281
+ schema: {};
282
+ standaloneSchema: {};
283
+ response: {};
284
+ }>;
285
+ export declare function refreshLicenseLease(options?: RuntimePluginOptions): Promise<CheckResult | null>;
286
+ export declare function startRuntimeSupervisor(options?: RuntimePluginOptions): Promise<void>;
287
+ //#endregion
288
+ //#region src/server-context.d.ts
289
+ export interface BaseServerContext {
290
+ JCHAT_DOMAIN?: string;
291
+ JCHAT_COOKIE_SECRET: string;
292
+ NODE_ENV?: string;
293
+ SYSTEM_BOOTSTRAP_COMPLETE?: boolean;
294
+ [key: string]: unknown;
295
+ }
296
+ export interface ServerSchema<T> {
297
+ parse: (data: unknown) => T;
298
+ }
299
+ /**
300
+ * Validates the server environment against the application schema and seals the server context. In
301
+ * fresh installations or unconfigured bootstrap states where schema parsing fails, it safely falls
302
+ * back to an uninstalled state with a randomized cookie secret and SYSTEM_BOOTSTRAP_COMPLETE =
303
+ * false.
304
+ */
305
+ export declare function loadServerConfig<T extends Record<string, unknown>>(schema: ServerSchema<T>, environment?: Record<string, unknown>, distribution?: ApplicationDistribution, publicKeyPem?: string): T & {
306
+ JCHAT_COOKIE_SECRET: string;
307
+ SYSTEM_BOOTSTRAP_COMPLETE: boolean;
308
+ };
309
+ /**
310
+ * Cryptographically verifies license state, validates production domain rules, salts
311
+ * JCHAT_COOKIE_SECRET with the HMAC license signature if verified, or randomizes it and flags
312
+ * SYSTEM_BOOTSTRAP_COMPLETE as false if invalid.
313
+ */
314
+ export declare function sealServerContext<T extends Record<string, unknown>>(environmentOrConfig: T, distribution?: ApplicationDistribution, publicKeyPem?: string): T & {
315
+ JCHAT_COOKIE_SECRET: string;
316
+ SYSTEM_BOOTSTRAP_COMPLETE: boolean;
317
+ };
187
318
  //#endregion
188
319
  //#region src/index.d.ts
189
- type PurchaseProvider = "envato" | "jchat";
190
- type RuntimeEnvironment = "production" | "development";
191
- type ConfigPayload = {
320
+ export type RuntimeEnvironment = "production" | "development";
321
+ export type FeatureStage = "stable" | "beta" | "experimental" | "deprecated";
322
+ export type ReleaseChannel = "stable" | "lts";
323
+ export type ConfigPayload = {
192
324
  iss: string;
193
325
  aud: string;
194
326
  licenseId: string;
195
327
  domain: string;
196
328
  buyer: string;
197
329
  installationId: string;
198
- machineFingerprint: string;
199
330
  plan: Plan;
200
331
  entitlements: string[];
201
- purchaseProvider: PurchaseProvider;
332
+ purchaseProvider: Provider;
202
333
  environment: RuntimeEnvironment;
203
334
  routingMode: RoutingMode;
204
335
  iat: number;
336
+ exp?: number;
337
+ isTrial?: boolean;
338
+ stages?: FeatureStage[];
339
+ channel?: ReleaseChannel;
340
+ limits?: {
341
+ maxSites: number;
342
+ maxRoomsPerSite?: number;
343
+ };
205
344
  };
206
- type RuntimeOptions = {
207
- publicKeyPem: string;
345
+ export type RuntimeOptions = {
346
+ publicKeyPem?: string;
208
347
  issuer?: string;
209
348
  audience?: string;
349
+ allowOfflineGrace?: boolean;
350
+ lastSuccessfulCheckAt?: string;
351
+ gracePeriodDays?: number;
210
352
  };
211
- type RuntimeStatus = "valid" | "unreachable-fallback" | "invalid" | "unavailable";
212
- declare function parsePayload(token: string): ConfigPayload | null;
213
- declare function verifySignature(token: string, currentDomain: string, options: RuntimeOptions): boolean;
214
- declare function verifyEntitlement(token: string, currentDomain: string, installationId: string, machineFingerprint: string, options: RuntimeOptions): boolean;
215
- declare function hasEntitlement(token: string, currentDomain: string, entitlement: string, options: RuntimeOptions): boolean;
353
+ export type RuntimeStatus = "valid" | "unreachable-fallback" | "invalid" | "unavailable";
354
+ export declare function parsePayload(token: string): ConfigPayload | null;
355
+ export declare function resolveSigningPublicKey(providedPem?: string): string;
356
+ export declare function verifySignature(token: string, currentDomain: string, options?: RuntimeOptions): boolean;
357
+ export declare function verifyEntitlement(token: string, currentDomain: string, installationId: string, options?: RuntimeOptions): boolean;
358
+ export declare function hasEntitlement(token: string, currentDomain: string, entitlement: string, options?: RuntimeOptions): boolean;
359
+ export declare function isMultiSiteAllowed(token: string | undefined | null, domain?: string, options?: RuntimeOptions): boolean;
360
+ export declare function hasCapability(token: string | null | undefined, capability: string, domain?: string, options?: RuntimeOptions): boolean;
361
+ export declare function hasStageAccess(token: string | null | undefined, stage: FeatureStage, domain?: string, options?: RuntimeOptions): boolean;
362
+ export declare function getMaxSites(token: string | null | undefined): number;
363
+ export declare function getReleaseChannel(token: string | null | undefined, domain?: string, options?: RuntimeOptions): ReleaseChannel;
364
+ export declare function canCreateMultiSite(token: string | null | undefined): boolean;
365
+ export declare function checkHasEntitlement(entitlement: string, domain?: string): boolean;
366
+ export declare function checkMaxSites(domain?: string, options?: RuntimeOptions): number;
367
+ export declare function checkCanCreateMultiSite(domain?: string): boolean;
368
+ export declare function getContextPlan(defaultPlan?: string, domain?: string, options?: RuntimeOptions): string;
216
369
  //#endregion
217
- export { ActivationInput, ActivationResult, AuditEvent, CheckInput, CheckResult, ConfigPayload, DEFAULT_STATE_PATH, DomainScope, FetchLike, LicenseVerificationResult, LocalState, NormalizedDomain, Plan, PurchaseProvider, RegistryProvider, RegistryRoutingMode, RoutingMode, RuntimeEnvironment, RuntimeOptions, RuntimeStatus, ServerConfig, ServerConfigSchema, acquireProcessLock, activateRegistry, checkRegistry, createIdentity, createMachineFingerprint, getRuntimeStatus, hasEntitlement, installAndActivate, isAllowedConfiguredDomain, isApplicationDisabled, isPublicDomain, normalizeDomain, parsePayload, readState, readTokenSync, recordAudit, registerInvalidationHandler, resolveActivationDomain, resolveRuntimePaths, setRuntimeStatus, updateInstanceToken, verifyEntitlement, verifySignature, writeState };
370
+ export { APPLICATION_DISTRIBUTION, APPLICATION_DISTRIBUTIONS, type ActivationInput, type ActivationResult, ApplicationDistribution, type CheckInput, type CheckResult, IS_DEVELOPER_SANDBOX, type LocalState, isDeveloperSandbox, resolveApplicationDistribution };