@substrat-run/control-plane-api 0.153.0 → 0.155.0

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.
@@ -24,6 +24,6 @@ export const PLATFORM_ENTRY_ALS_FALLBACK = "const AsyncLocalStorage = undefined;
24
24
  * re-exports its class, when a vertical declares schedules and brings no sweeper of its own.
25
25
  */
26
26
  export const PLATFORM_SWEEPER_MODULE = 'substrat-platform-sweeper.js';
27
- /** The sweeper itself — 10096 bytes of ESM. */
28
- export const PLATFORM_SWEEPER_SOURCE = "// packages/adapter-cloudflare/src/scope-sweeper-do.ts\nimport { DurableObject } from \"cloudflare:workers\";\nvar SWEEPER_ID = /^[0-9A-HJKMNP-TV-Z]{26}$/;\nfunction parseId(value, what) {\n if (typeof value !== \"string\" || !SWEEPER_ID.test(value)) {\n throw new TypeError(`${what} must be a ULID, got ${JSON.stringify(value)}`);\n }\n return value;\n}\nvar ROSTER_PREFIX = \"scope:\";\nvar JOB_START_PREFIX = \"job-start:\";\nfunction defineScopeSweeperDO(config) {\n return class ScopeSweeperDO extends DurableObject {\n /** The in-flight pass, when one is running — the overlap guard. */\n #pass = null;\n async noteScope(tenantId, scopeId) {\n const t = parseId(tenantId, \"tenantId\");\n const s = parseId(scopeId, \"scopeId\");\n await this.ctx.storage.put(`${ROSTER_PREFIX}${s}`, t);\n await this.ensureArmed();\n return { scopes: await this.#rosterSize() };\n }\n async forgetScope(scopeId) {\n const s = parseId(scopeId, \"scopeId\");\n await this.ctx.storage.delete([`${ROSTER_PREFIX}${s}`, `${JOB_START_PREFIX}${s}`]);\n return { scopes: await this.#rosterSize() };\n }\n /**\n * Arm the loop if it is not armed. Idempotent: an already-set alarm is left\n * exactly where it is, so this is safe to call on every request.\n */\n async ensureArmed() {\n const existing = await this.ctx.storage.getAlarm();\n if (existing !== null) return { armed: false, alarmAt: existing };\n const alarmAt = Date.now() + config.intervalMs;\n await this.ctx.storage.setAlarm(alarmAt);\n return { armed: true, alarmAt };\n }\n /**\n * Run a pass NOW (a manual kick, a just-provisioned scope's first tick, a\n * test). Joins the in-flight pass if one is running — never a second one —\n * and re-arms afterwards while scopes remain.\n */\n async sweepNow() {\n return this.#run();\n }\n /** The loop: one pass, then re-arm. Never throws (see the class doc). */\n async alarm() {\n await this.#run();\n }\n async #rosterSize() {\n return (await this.ctx.storage.list({ prefix: ROSTER_PREFIX })).size;\n }\n async #run() {\n if (this.#pass) return this.#pass;\n this.#pass = (async () => {\n try {\n const report = await this.#sweep();\n config.onPass?.(report, this.env);\n return report;\n } catch (err) {\n const outcome = { error: err instanceof Error ? err.message : String(err) };\n config.onPass?.(outcome, this.env);\n return outcome;\n }\n })();\n try {\n return await this.#pass;\n } finally {\n this.#pass = null;\n if (await this.#rosterSize() > 0) {\n await this.ctx.storage.setAlarm(Date.now() + config.intervalMs);\n }\n }\n }\n /** One pass over the roster: drain + due schedules per scope, errors contained. */\n async #sweep() {\n const host = config.host(this.env);\n const roster = await this.ctx.storage.list({ prefix: ROSTER_PREFIX });\n const report = {\n scopes: roster.size,\n drainTotals: { attempted: 0, delivered: 0, retrying: 0, deadLettered: 0 },\n schedules: { scopes: 0, fired: 0, skipped: 0, failed: 0 },\n ...config.runJobs ? { jobs: { attempted: 0, advanced: 0, completed: 0, retrying: 0, failed: 0 } } : {},\n errors: []\n };\n const registrations = host.registeredSchedules().filter((r) => r.schedules.length > 0);\n const entries = [...roster].map(([key, tenant]) => ({\n scopeId: key.slice(ROSTER_PREFIX.length),\n tenantId: tenant\n }));\n const concurrency = config.concurrency ?? 8;\n let next = 0;\n const worker = async () => {\n while (next < entries.length) {\n const { tenantId, scopeId } = entries[next++];\n if (host.lifecycleHeld) {\n try {\n if (await host.lifecycleHeld(scopeId)) {\n report.held = (report.held ?? 0) + 1;\n continue;\n }\n } catch (err) {\n report.errors.push({ kind: \"lifecycle\", id: scopeId, error: message(err) });\n continue;\n }\n }\n if (config.drainRetries !== false) {\n try {\n const r = await host.drainDue(tenantId, scopeId);\n report.drainTotals.attempted += r.attempted;\n report.drainTotals.delivered += r.delivered;\n report.drainTotals.retrying += r.retrying;\n report.drainTotals.deadLettered += r.deadLettered;\n } catch (err) {\n report.errors.push({ kind: \"drain\", id: scopeId, error: message(err) });\n }\n }\n if (config.runJobs) {\n if (config.startJobs) {\n try {\n const key = `${JOB_START_PREFIX}${scopeId}`;\n const last = await this.ctx.storage.get(key);\n const now = Date.now();\n if (last === void 0 || now - last >= (config.jobStartIntervalMs ?? config.intervalMs)) {\n await config.startJobs(host, tenantId, scopeId);\n await this.ctx.storage.put(key, now);\n }\n } catch (err) {\n report.errors.push({ kind: \"job\", id: `${scopeId}:start`, error: message(err) });\n }\n }\n try {\n const r = await host.runDueJobs(tenantId, scopeId);\n const totals = report.jobs;\n totals.attempted += r.attempted;\n totals.advanced += r.advanced;\n totals.completed += r.completed;\n totals.retrying += r.retrying;\n totals.failed += r.failed;\n for (const error of r.errors) {\n report.errors.push({ kind: \"job\", id: `${scopeId}:${error.runId}`, error: error.error });\n }\n } catch (err) {\n report.errors.push({ kind: \"job\", id: scopeId, error: message(err) });\n }\n }\n let touched = false;\n const passAt = (/* @__PURE__ */ new Date()).toISOString();\n const passRuns = [];\n for (const reg of registrations) {\n try {\n const r = await host.runDueSchedules(reg.moduleId, tenantId, scopeId);\n if (r.fired > 0 || r.failed > 0) touched = true;\n report.schedules.fired += r.fired;\n report.schedules.skipped += r.skipped;\n report.schedules.failed += r.failed;\n if (r.platformRequests) {\n report.schedules.platformRequests = (report.schedules.platformRequests ?? 0) + r.platformRequests;\n }\n for (const e of r.errors) {\n report.errors.push({\n kind: \"schedule\",\n id: `${scopeId}:${e.operation}`,\n error: e.error\n });\n }\n for (const run of r.runs ?? []) {\n passRuns.push({\n kind: \"schedule\",\n operation: run.operation,\n outcome: run.outcome,\n at: passAt,\n ...run.outcome === \"failed\" ? { error: r.errors.find((e) => e.operation === run.operation)?.error ?? null } : {}\n });\n }\n } catch (err) {\n report.errors.push({\n kind: \"schedule\",\n id: `${scopeId}:${reg.moduleId}`,\n error: message(err)\n });\n }\n }\n if (touched) report.schedules.scopes += 1;\n if (host.registeredFreshness && host.checkFreshness) {\n const freshRegs = host.registeredFreshness().filter((r) => r.freshness.length > 0);\n if (freshRegs.length > 0) {\n try {\n const r = await host.checkFreshness(freshRegs[0].moduleId, tenantId, scopeId);\n for (const check of r.checks) {\n passRuns.push({\n kind: \"freshness\",\n eventType: check.eventType,\n outcome: check.outcome,\n at: passAt,\n observedAt: check.observedAt\n });\n }\n } catch (err) {\n report.errors.push({ kind: \"freshness\", id: scopeId, error: message(err) });\n }\n }\n }\n if (passRuns.length > 0 && host.enqueueSweepRuns) {\n try {\n await host.enqueueSweepRuns(scopeId, {\n version: config.versionId?.(this.env) ?? null,\n // The payload caps its batch; a pathological schedule count truncates\n // rather than refusing the whole report.\n entries: passRuns.slice(0, 64)\n });\n } catch {\n }\n }\n }\n };\n await Promise.all(\n Array.from({ length: Math.max(1, Math.min(concurrency, entries.length)) }, worker)\n );\n return report;\n }\n };\n}\nvar message = (err) => err instanceof Error ? err.message : String(err);\n\n// packages/vertical-host/src/scope-sweep-host.ts\nvar SCOPE_SWEEP_HOST_KEY = \"substrat.scope-sweep-host\";\nfunction slot() {\n return globalThis;\n}\nfunction registeredScopeSweepHost() {\n return slot()[Symbol.for(SCOPE_SWEEP_HOST_KEY)];\n}\n\n// substrat-platform-sweeper.ts\nvar SweeperDO = defineScopeSweeperDO({\n intervalMs: 12e4,\n versionId: (env) => env.SUBSTRAT_VERSION_ID ?? null,\n host(env) {\n const hostFor = registeredScopeSweepHost();\n if (!hostFor) {\n throw new Error(\"this bundle registered no scope host for the platform sweeper: mount mountPlatformSurface from a current @substrat-run/vertical-host\");\n }\n return hostFor(env);\n },\n onPass(outcome) {\n if (\"error\" in outcome || outcome.errors.length > 0) {\n console.error(JSON.stringify({ substrat: \"scope-sweep\", ...outcome }));\n } else if (outcome.schedules.platformRequests) {\n console.log(JSON.stringify({ substrat: \"scope-sweep\", scopes: outcome.scopes, schedules: outcome.schedules }));\n }\n }\n});\nexport {\n SweeperDO\n};\n";
27
+ /** The sweeper itself — 9925 bytes of ESM. */
28
+ export const PLATFORM_SWEEPER_SOURCE = "// packages/adapter-cloudflare/src/scope-sweeper-do.ts\nimport { DurableObject } from \"cloudflare:workers\";\nvar SWEEPER_ID = /^[0-9A-HJKMNP-TV-Z]{26}$/;\nfunction parseId(value, what) {\n if (typeof value !== \"string\" || !SWEEPER_ID.test(value)) {\n throw new TypeError(`${what} must be a ULID, got ${JSON.stringify(value)}`);\n }\n return value;\n}\nvar ROSTER_PREFIX = \"scope:\";\nvar JOB_START_PREFIX = \"job-start:\";\nfunction defineScopeSweeperDO(config) {\n return class ScopeSweeperDO extends DurableObject {\n /** The in-flight pass, when one is running — the overlap guard. */\n #pass = null;\n async noteScope(tenantId, scopeId) {\n const t = parseId(tenantId, \"tenantId\");\n const s = parseId(scopeId, \"scopeId\");\n await this.ctx.storage.put(`${ROSTER_PREFIX}${s}`, t);\n await this.ensureArmed();\n return { scopes: await this.#rosterSize() };\n }\n async forgetScope(scopeId) {\n const s = parseId(scopeId, \"scopeId\");\n await this.ctx.storage.delete([`${ROSTER_PREFIX}${s}`, `${JOB_START_PREFIX}${s}`]);\n return { scopes: await this.#rosterSize() };\n }\n /**\n * Arm the loop if it is not armed. Idempotent: an already-set alarm is left\n * exactly where it is, so this is safe to call on every request.\n */\n async ensureArmed() {\n const existing = await this.ctx.storage.getAlarm();\n if (existing !== null) return { armed: false, alarmAt: existing };\n const alarmAt = Date.now() + config.intervalMs;\n await this.ctx.storage.setAlarm(alarmAt);\n return { armed: true, alarmAt };\n }\n /**\n * Run a pass NOW (a manual kick, a just-provisioned scope's first tick, a\n * test). Joins the in-flight pass if one is running — never a second one —\n * and re-arms afterwards while scopes remain.\n */\n async sweepNow() {\n return this.#run();\n }\n /** The loop: one pass, then re-arm. Never throws (see the class doc). */\n async alarm() {\n await this.#run();\n }\n async #rosterSize() {\n return (await this.ctx.storage.list({ prefix: ROSTER_PREFIX })).size;\n }\n async #run() {\n if (this.#pass) return this.#pass;\n this.#pass = (async () => {\n try {\n const report = await this.#sweep();\n config.onPass?.(report, this.env);\n return report;\n } catch (err) {\n const outcome = { error: err instanceof Error ? err.message : String(err) };\n config.onPass?.(outcome, this.env);\n return outcome;\n }\n })();\n try {\n return await this.#pass;\n } finally {\n this.#pass = null;\n if (await this.#rosterSize() > 0) {\n await this.ctx.storage.setAlarm(Date.now() + config.intervalMs);\n }\n }\n }\n /** One pass over the roster: drain + due schedules per scope, errors contained. */\n async #sweep() {\n const host = config.host(this.env);\n const roster = await this.ctx.storage.list({ prefix: ROSTER_PREFIX });\n const report = {\n scopes: roster.size,\n drainTotals: { attempted: 0, delivered: 0, retrying: 0, deadLettered: 0 },\n schedules: { scopes: 0, fired: 0, skipped: 0, failed: 0 },\n ...config.runJobs ? { jobs: { attempted: 0, advanced: 0, completed: 0, retrying: 0, failed: 0 } } : {},\n errors: []\n };\n const registrations = host.registeredSchedules().filter((r) => r.schedules.length > 0);\n const entries = [...roster].map(([key, tenant]) => ({\n scopeId: key.slice(ROSTER_PREFIX.length),\n tenantId: tenant\n }));\n const concurrency = config.concurrency ?? 8;\n let next = 0;\n const worker = async () => {\n while (next < entries.length) {\n const { tenantId, scopeId } = entries[next++];\n if (host.lifecycleHeld) {\n try {\n if (await host.lifecycleHeld(scopeId)) {\n report.held = (report.held ?? 0) + 1;\n continue;\n }\n } catch (err) {\n report.errors.push({ kind: \"lifecycle\", id: scopeId, error: message(err) });\n continue;\n }\n }\n if (config.drainRetries !== false) {\n try {\n const r = await host.drainDue(tenantId, scopeId);\n report.drainTotals.attempted += r.attempted;\n report.drainTotals.delivered += r.delivered;\n report.drainTotals.retrying += r.retrying;\n report.drainTotals.deadLettered += r.deadLettered;\n } catch (err) {\n report.errors.push({ kind: \"drain\", id: scopeId, error: message(err) });\n }\n }\n if (config.runJobs) {\n if (config.startJobs) {\n try {\n const key = `${JOB_START_PREFIX}${scopeId}`;\n const last = await this.ctx.storage.get(key);\n const now = Date.now();\n if (last === void 0 || now - last >= (config.jobStartIntervalMs ?? config.intervalMs)) {\n await config.startJobs(host, tenantId, scopeId);\n await this.ctx.storage.put(key, now);\n }\n } catch (err) {\n report.errors.push({ kind: \"job\", id: `${scopeId}:start`, error: message(err) });\n }\n }\n try {\n const r = await host.runDueJobs(tenantId, scopeId);\n const totals = report.jobs;\n totals.attempted += r.attempted;\n totals.advanced += r.advanced;\n totals.completed += r.completed;\n totals.retrying += r.retrying;\n totals.failed += r.failed;\n for (const error of r.errors) {\n report.errors.push({ kind: \"job\", id: `${scopeId}:${error.runId}`, error: error.error });\n }\n } catch (err) {\n report.errors.push({ kind: \"job\", id: scopeId, error: message(err) });\n }\n }\n let touched = false;\n const passAt = (/* @__PURE__ */ new Date()).toISOString();\n const passRuns = [];\n for (const reg of registrations) {\n try {\n const r = await host.runDueSchedules(reg.moduleId, tenantId, scopeId);\n if (r.fired > 0 || r.failed > 0) touched = true;\n report.schedules.fired += r.fired;\n report.schedules.skipped += r.skipped;\n report.schedules.failed += r.failed;\n if (r.platformRequests) {\n report.schedules.platformRequests = (report.schedules.platformRequests ?? 0) + r.platformRequests;\n }\n for (const e of r.errors) {\n report.errors.push({\n kind: \"schedule\",\n id: `${scopeId}:${e.operation}`,\n error: e.error\n });\n }\n for (const run of r.runs ?? []) {\n passRuns.push({\n kind: \"schedule\",\n operation: run.operation,\n outcome: run.outcome,\n at: passAt,\n ...run.outcome === \"failed\" ? { error: r.errors.find((e) => e.operation === run.operation)?.error ?? null } : {}\n });\n }\n } catch (err) {\n report.errors.push({\n kind: \"schedule\",\n id: `${scopeId}:${reg.moduleId}`,\n error: message(err)\n });\n }\n }\n if (touched) report.schedules.scopes += 1;\n if (host.registeredFreshness && host.checkFreshness) {\n const freshRegs = host.registeredFreshness().filter((r) => r.freshness.length > 0);\n if (freshRegs.length > 0) {\n try {\n const r = await host.checkFreshness(freshRegs[0].moduleId, tenantId, scopeId);\n for (const check of r.checks) {\n passRuns.push({\n kind: \"freshness\",\n eventType: check.eventType,\n outcome: check.outcome,\n at: passAt,\n observedAt: check.observedAt\n });\n }\n } catch (err) {\n report.errors.push({ kind: \"freshness\", id: scopeId, error: message(err) });\n }\n }\n }\n if (passRuns.length > 0 && host.enqueueSweepRuns) {\n try {\n await host.enqueueSweepRuns(scopeId, {\n version: config.versionId?.(this.env) ?? null,\n // The payload caps its batch; a pathological schedule count truncates\n // rather than refusing the whole report.\n entries: passRuns.slice(0, 64)\n });\n } catch {\n }\n }\n }\n };\n await Promise.all(\n Array.from({ length: Math.max(1, Math.min(concurrency, entries.length)) }, worker)\n );\n return report;\n }\n };\n}\nvar message = (err) => err instanceof Error ? err.message : String(err);\n\n// packages/vertical-host/src/scope-sweep-host.ts\nvar SCOPE_SWEEP_HOST_KEY = \"substrat.scope-sweep-host\";\nfunction slot() {\n return globalThis;\n}\nfunction registeredScopeSweepHost() {\n return slot()[Symbol.for(SCOPE_SWEEP_HOST_KEY)];\n}\n\n// substrat-platform-sweeper.ts\nvar SweeperDO = defineScopeSweeperDO({\n intervalMs: 12e4,\n versionId: (env) => env.SUBSTRAT_VERSION_ID ?? null,\n host(env) {\n const hostFor = registeredScopeSweepHost();\n if (!hostFor) {\n throw new Error(\"this bundle registered no scope host for the platform sweeper: mount mountPlatformSurface from a current @substrat-run/vertical-host\");\n }\n return hostFor(env);\n },\n onPass(outcome) {\n if (\"error\" in outcome || outcome.errors.length > 0) {\n console.error(JSON.stringify({ substrat: \"scope-sweep\", ...outcome }));\n }\n }\n});\nexport {\n SweeperDO\n};\n";
29
29
  //# sourceMappingURL=platform-entry.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-entry.generated.js","sourceRoot":"","sources":["../src/platform-entry.generated.ts"],"names":[],"mappings":"AAAA,8KAA8K;AAC9K,sEAAsE;AAEtE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAElE,gFAAgF;AAChF,MAAM,CAAC,MAAM,0BAA0B,GAAG,6BAA6B,CAAC;AAExE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAW,81sBAA81sB,CAAC;AAE54sB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,yDAAyD,CAAC;AACnG,MAAM,CAAC,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAElF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAEtE,+CAA+C;AAC/C,MAAM,CAAC,MAAM,uBAAuB,GAAW,iqUAAiqU,CAAC"}
1
+ {"version":3,"file":"platform-entry.generated.js","sourceRoot":"","sources":["../src/platform-entry.generated.ts"],"names":[],"mappings":"AAAA,8KAA8K;AAC9K,sEAAsE;AAEtE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAElE,gFAAgF;AAChF,MAAM,CAAC,MAAM,0BAA0B,GAAG,6BAA6B,CAAC;AAExE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAW,81sBAA81sB,CAAC;AAE54sB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,yDAAyD,CAAC;AACnG,MAAM,CAAC,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAElF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAEtE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,uBAAuB,GAAW,k/TAAk/T,CAAC"}
@@ -0,0 +1,115 @@
1
+ import { type SocialRelayProvider } from '@substrat-run/contracts';
2
+ import type { CustomHostnameProvisioner, FetchFn } from './custom-hostnames.js';
3
+ /**
4
+ * Platform-provided social sign-in (#1544): the reconciler that keeps one Auth Server install's
5
+ * client at the platform's social relay (`apps/social-relay`, id.substrat.net) in step with the
6
+ * providers the relay serves and the hostnames the install answers on.
7
+ *
8
+ * One install, one call, safe to repeat. It:
9
+ *
10
+ * 1. reads the providers the relay can serve right now (`GET /providers`);
11
+ * 2. builds the redirect URIs from the install's ACTIVE hostnames — the platform's own record
12
+ * of them, never anything the install says — one per provider per hostname;
13
+ * 3. ensures the install's relay client under the platform's key for it (`scope:<scope id>`),
14
+ * which creates it the first time and otherwise replaces its redirect URIs;
15
+ * 4. delivers `substrat:social-relay` to the install, which turns it into switched-off
16
+ * provider rows (`demos/auth-server/src/social-relay.ts`).
17
+ *
18
+ * The relay hands a client's secret out only when it creates the client, so an ordinary run
19
+ * delivers none and the install keeps the one it holds. An install that holds none answers
20
+ * `SOCIAL_RELAY_SECRET_NEEDED`; only then is the secret rotated and the entry sent again. Rotating
21
+ * on every run would let two runs that overlap — an install binds several hostnames back to back,
22
+ * each one a trigger — deliver their secrets out of order and leave the stale one in place.
23
+ *
24
+ * Triggers (#1544): a hostname of an Auth Server install becoming active, which covers install
25
+ * time and every custom domain; and a staff-run pass over every install after a provider change.
26
+ */
27
+ /** How the control plane reaches the relay: its public origin (issuers derive from it) and a fetch. */
28
+ export interface SocialRelayOptions {
29
+ /** The relay's public origin, e.g. `https://id.substrat.net`. Every URL is built from it. */
30
+ origin: string;
31
+ /** A service binding's fetch in production; any fetch in a test. */
32
+ fetch: FetchFn;
33
+ /** Gates the relay's `/internal/*` surface. */
34
+ platformSecret: string;
35
+ }
36
+ /** Is this vertical one the reconciler registers at the relay? Exact slugs only. */
37
+ export declare function isSocialRelayVertical(vertical: string | null | undefined): boolean;
38
+ /** The platform's key for an install's relay client. */
39
+ export declare function relayClientRef(scopeId: string): string;
40
+ /** Every redirect URI an install needs: each live provider's callback on each active hostname. */
41
+ export declare function relayRedirectUris(hostnames: readonly string[], providers: readonly SocialRelayProvider[]): string[];
42
+ export type SocialRelayOutcome = {
43
+ status: 'delivered';
44
+ clientId: string;
45
+ /** The relay client was created on this run. */
46
+ created: boolean;
47
+ /** The install held no secret, so one was rotated and delivered. */
48
+ rotated: boolean;
49
+ /** The relay client is switched off at the relay (the kill switch); delivered all the same. */
50
+ disabled: boolean;
51
+ providers: string[];
52
+ hostnames: string[];
53
+ } | {
54
+ status: 'skipped';
55
+ reason: string;
56
+ };
57
+ export interface ReconcileInput {
58
+ tenantId: string;
59
+ scopeId: string;
60
+ /** The install's hostnames whose status is `active`. */
61
+ hostnames: readonly string[];
62
+ /** Deliver config entries to the install (`VerticalClient.configureInstance`). */
63
+ configure(entries: {
64
+ key: string;
65
+ value: string;
66
+ }[]): Promise<void>;
67
+ }
68
+ export declare function reconcileSocialRelay(relay: SocialRelayOptions, input: ReconcileInput): Promise<SocialRelayOutcome>;
69
+ /**
70
+ * The hostnames an install may have a relay callback on: every active PLATFORM hostname, and a
71
+ * custom domain only once Cloudflare itself reports it verified, asked now.
72
+ *
73
+ * Not the row's own `status` alone: a tenant may set its hostname's status by hand
74
+ * (`PATCH /hostnames/:h/status`), and a callback on a domain nobody verified is a way to run the
75
+ * platform's shared sign-in — the platform's name on the consent screen — on a site that is not
76
+ * on the platform at all. A platform hostname is the platform's by construction. Without a
77
+ * provisioner (dev, self-host) no custom domain is verified, so none is registered.
78
+ */
79
+ export declare function relayHostnames(rows: readonly {
80
+ hostname: string;
81
+ status: string;
82
+ customHostnameId: string | null;
83
+ }[], verify: {
84
+ isCustom(hostname: string): boolean;
85
+ provisioner?: CustomHostnameProvisioner | undefined;
86
+ }): Promise<string[]>;
87
+ /** What reconciling one install by its ids needs: the directory, and a way to reach its deployment. */
88
+ export interface ScopeReconcileDeps<S extends {
89
+ vertical: string | null;
90
+ }> {
91
+ relay: SocialRelayOptions;
92
+ getScope(tenantId: string, scopeId: string): Promise<S | null | undefined>;
93
+ /** The hostnames a callback may be registered on — `relayHostnames` over the install's rows. */
94
+ activeHostnames(scopeId: string): Promise<string[]>;
95
+ /** The install's running deployment, or undefined when it has none to deliver to. */
96
+ deploymentOf(scope: S): Promise<{
97
+ configureInstance(input: {
98
+ tenantId: string;
99
+ scopeId: string;
100
+ entries: {
101
+ key: string;
102
+ value: string;
103
+ }[];
104
+ }): Promise<void>;
105
+ } | undefined>;
106
+ }
107
+ /**
108
+ * Reconcile one install named by its ids — what every trigger calls. Skips, never throws for, an
109
+ * install the relay is not for (unknown, not an Auth Server, or nothing deployed to deliver to);
110
+ * a relay or delivery failure does throw, so the caller can report it.
111
+ */
112
+ export declare function reconcileScopeSocialRelay<S extends {
113
+ vertical: string | null;
114
+ }>(deps: ScopeReconcileDeps<S>, tenantId: string, scopeId: string): Promise<SocialRelayOutcome>;
115
+ //# sourceMappingURL=social-relay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social-relay.d.ts","sourceRoot":"","sources":["../src/social-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,uGAAuG;AACvG,MAAM,WAAW,kBAAkB;IACjC,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,KAAK,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAElF;AAED,wDAAwD;AACxD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,SAAS,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAGnH;AAED,MAAM,MAAM,kBAAkB,GAC1B;IACE,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,EAAE,OAA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AG,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC3E,gGAAgG;IAChG,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,qFAAqF;IACrF,YAAY,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAC7B;QAAE,iBAAiB,CAAC,KAAK,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE;gBAAE,GAAG,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,GAAG,SAAS,CAC1I,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACnF,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC3B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,CAY7B"}
@@ -0,0 +1,118 @@
1
+ import { PLATFORM_SECRET_HEADER, SOCIAL_RELAY_CONFIG_KEY, SOCIAL_RELAY_SECRET_NEEDED, SOCIAL_RELAY_VERTICALS, relayCallbackPath, socialRelayProviders, } from '@substrat-run/contracts';
2
+ import { ControlPlaneError } from '@substrat-run/control-plane-client';
3
+ /** Is this vertical one the reconciler registers at the relay? Exact slugs only. */
4
+ export function isSocialRelayVertical(vertical) {
5
+ return vertical !== null && vertical !== undefined && SOCIAL_RELAY_VERTICALS.includes(vertical);
6
+ }
7
+ /** The platform's key for an install's relay client. */
8
+ export function relayClientRef(scopeId) {
9
+ return `scope:${scopeId}`;
10
+ }
11
+ /** Every redirect URI an install needs: each live provider's callback on each active hostname. */
12
+ export function relayRedirectUris(hostnames, providers) {
13
+ const hosts = [...new Set(hostnames.map((h) => h.toLowerCase()))].sort();
14
+ return hosts.flatMap((host) => providers.map((p) => `https://${host}${relayCallbackPath(p.id)}`));
15
+ }
16
+ export async function reconcileSocialRelay(relay, input) {
17
+ const origin = relay.origin.replace(/\/+$/, '');
18
+ const { providers } = socialRelayProviders.parse(await relayJson(relay, 'GET', `${origin}/providers`));
19
+ if (providers.length === 0)
20
+ return { status: 'skipped', reason: 'the relay serves no provider' };
21
+ if (input.hostnames.length === 0)
22
+ return { status: 'skipped', reason: 'the install has no active hostname' };
23
+ const redirectUris = relayRedirectUris(input.hostnames, providers);
24
+ const ensured = (await relayJson(relay, 'PUT', `${origin}/internal/clients/by-ref/${encodeURIComponent(relayClientRef(input.scopeId))}`, { name: `${input.tenantId}/${input.scopeId}`, redirectUris }));
25
+ const deliver = (clientSecret) => {
26
+ const value = {
27
+ clientId: ensured.clientId,
28
+ ...(clientSecret ? { clientSecret } : {}),
29
+ providers,
30
+ };
31
+ return input.configure([{ key: SOCIAL_RELAY_CONFIG_KEY, value: JSON.stringify(value) }]);
32
+ };
33
+ let rotated = false;
34
+ try {
35
+ await deliver(ensured.clientSecret);
36
+ }
37
+ catch (e) {
38
+ if (!(e instanceof ControlPlaneError && e.status === 409 && e.message === SOCIAL_RELAY_SECRET_NEEDED))
39
+ throw e;
40
+ const { clientSecret } = (await relayJson(relay, 'POST', `${origin}/internal/clients/${encodeURIComponent(ensured.clientId)}/secret`));
41
+ await deliver(clientSecret);
42
+ rotated = true;
43
+ }
44
+ return {
45
+ status: 'delivered',
46
+ clientId: ensured.clientId,
47
+ created: ensured.created,
48
+ rotated,
49
+ disabled: ensured.disabled,
50
+ providers: providers.map((p) => p.id),
51
+ hostnames: [...new Set(input.hostnames.map((h) => h.toLowerCase()))].sort(),
52
+ };
53
+ }
54
+ /**
55
+ * The hostnames an install may have a relay callback on: every active PLATFORM hostname, and a
56
+ * custom domain only once Cloudflare itself reports it verified, asked now.
57
+ *
58
+ * Not the row's own `status` alone: a tenant may set its hostname's status by hand
59
+ * (`PATCH /hostnames/:h/status`), and a callback on a domain nobody verified is a way to run the
60
+ * platform's shared sign-in — the platform's name on the consent screen — on a site that is not
61
+ * on the platform at all. A platform hostname is the platform's by construction. Without a
62
+ * provisioner (dev, self-host) no custom domain is verified, so none is registered.
63
+ */
64
+ export async function relayHostnames(rows, verify) {
65
+ const out = [];
66
+ for (const row of rows) {
67
+ if (row.status !== 'active')
68
+ continue;
69
+ if (!verify.isCustom(row.hostname)) {
70
+ out.push(row.hostname);
71
+ continue;
72
+ }
73
+ if (!verify.provisioner || !row.customHostnameId)
74
+ continue;
75
+ const issuance = await verify.provisioner.check(row.customHostnameId).catch(() => null);
76
+ if (issuance?.status === 'active')
77
+ out.push(row.hostname);
78
+ }
79
+ return out;
80
+ }
81
+ /**
82
+ * Reconcile one install named by its ids — what every trigger calls. Skips, never throws for, an
83
+ * install the relay is not for (unknown, not an Auth Server, or nothing deployed to deliver to);
84
+ * a relay or delivery failure does throw, so the caller can report it.
85
+ */
86
+ export async function reconcileScopeSocialRelay(deps, tenantId, scopeId) {
87
+ const scope = await deps.getScope(tenantId, scopeId);
88
+ if (!scope)
89
+ return { status: 'skipped', reason: 'unknown scope' };
90
+ if (!isSocialRelayVertical(scope.vertical))
91
+ return { status: 'skipped', reason: 'not an Auth Server install' };
92
+ const deployment = await deps.deploymentOf(scope);
93
+ if (!deployment)
94
+ return { status: 'skipped', reason: 'no deployment to deliver to' };
95
+ return reconcileSocialRelay(deps.relay, {
96
+ tenantId,
97
+ scopeId,
98
+ hostnames: await deps.activeHostnames(scopeId),
99
+ configure: (entries) => deployment.configureInstance({ tenantId, scopeId, entries }),
100
+ });
101
+ }
102
+ /** One call to the relay, refused loudly: a reconcile that half-ran must say which half. */
103
+ async function relayJson(relay, method, url, body) {
104
+ const res = await relay.fetch(url, {
105
+ method,
106
+ headers: {
107
+ ...(body === undefined ? {} : { 'content-type': 'application/json' }),
108
+ ...(url.includes('/internal/') ? { [PLATFORM_SECRET_HEADER]: relay.platformSecret } : {}),
109
+ },
110
+ ...(body === undefined ? {} : { body: JSON.stringify(body) }),
111
+ });
112
+ if (!res.ok) {
113
+ const detail = (await res.text().catch(() => '')).slice(0, 300);
114
+ throw new Error(`social relay refused ${method} ${new URL(url).pathname} (${res.status}): ${detail}`);
115
+ }
116
+ return res.json();
117
+ }
118
+ //# sourceMappingURL=social-relay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social-relay.js","sourceRoot":"","sources":["../src/social-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAsCvE,oFAAoF;AACpF,MAAM,UAAU,qBAAqB,CAAC,QAAmC;IACvE,OAAO,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,IAAI,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAClG,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,SAAS,OAAO,EAAE,CAAC;AAC5B,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,iBAAiB,CAAC,SAA4B,EAAE,SAAyC;IACvG,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACzE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,IAAI,GAAG,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACpG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C;IACxG,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EntityGrantShape, AttachmentRecord, ScopeLineage, ConnectionId, EntityRef, EntitlementGrant, ModuleId, PermissionKey, PlatformActorId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestId, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, MintedPreviewClient, PreviewClientCheck, PreviewClientClaim, PreviewClientMint, PreviewClientRetire, PrincipalId, RetiredPreviewClients, PeerGrantsEntry, PeerSwitchOutcome, SystemSwitchOutcome, SystemScheduleEntry, ConnectionGrantRecord, ProjectedConnectionGrant, ProjectedConnectionKey, ProjectedIdentityLink, OwnerSeat, OwnerClaimLink, OwnerTransferResult, QueryScopeInput, ReadScopeTableInput, EntityHistoryInput, EventFacetInput, EventCauseInput, EventEffectsInput, EffectsTree, InvocationEventsInput, InvocationEvents, DeadLettersInput, DeadLetter, LifecycleFlowInput, LifecycleFlowResult, OperationSeriesInput, OperationSeriesResult, CauseChain, EventFacetResult, HistoryEntry, Page, ScopeDumpTable, ScopeId, ScopeQueryResult, DenialFilter, DenialSummary, PermissionDenial, ScopeTable, ScopeTablePage, TenantId, TenantStoreHandle, Visibility } from '@substrat-run/contracts';
1
+ import type { EntityGrantShape, AttachmentRecord, ScopeLineage, ConnectionId, EntityRef, EntitlementGrant, ModuleId, PermissionKey, PlatformActorId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestId, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, MintedPreviewClient, PreviewClientCheck, PreviewClientClaim, PreviewClientMint, PreviewClientRetire, PrincipalId, RetiredPreviewClients, PeerGrantsEntry, PeerSwitchOutcome, SystemSwitchOutcome, SystemScheduleEntry, ConnectionGrantRecord, ProjectedConnectionGrant, ProjectedConnectionKey, ProjectedIdentityLink, OwnerSeat, OwnerClaimLink, OwnerTransferResult, QueryScopeInput, ReadScopeTableInput, EntityHistoryInput, EventFacetInput, EventCauseInput, EventEffectsInput, EffectsTree, InvocationEventsInput, InvocationEvents, DeadLettersInput, DeadLetter, LifecycleFlowInput, LifecycleFlowResult, OperationSeriesInput, OperationSeriesResult, CauseChain, EventFacetResult, HistoryEntry, Page, ScopeDumpTable, ScopeId, ScopeQueryResult, DenialFilter, DenialSummary, PermissionDenial, ScopeTable, ScopeTablePage, ScopeDumpPage, TenantId, TenantStoreHandle, Visibility } from '@substrat-run/contracts';
2
2
  import { type CapabilityFilter, type CapabilityPage, type CapabilityRecord, type CapabilityRevokeRequest, type MemberInviteLink, type MemberRemoval, type ScopeMembers, type LifecycleDelivery, type ScopeLifecycle, type SwitchedOffInUnit, type ImportCursorMoveAt, type ImportCursorMoved, type ExportReadInput, type ExportedBatch, type ImportBatch, type ImportResult, type ImportState, type VerticalCaller } from '@substrat-run/contracts';
3
3
  import type { CopyRestoreFence, KeptCopy, LoadMarker, OpenedAttachment, OrphanSweepReport, SubjectRedactionCounts, UndrainedEvents } from '@substrat-run/kernel';
4
4
  import { ControlPlaneError } from '@substrat-run/control-plane-client';
@@ -668,7 +668,9 @@ export declare class VerticalClient {
668
668
  * but no role definitions, and without the repair every check denies while /me
669
669
  * still names the role. A vertical that predates the field ignores it.
670
670
  */
671
- restoreScope(tenantId: TenantId, scopeId: ScopeId, tables: ScopeDumpTable[],
671
+ restoreScope(tenantId: TenantId, scopeId: ScopeId,
672
+ /** The dump, or (#2450) the stage it was loaded into here a page at a time (`transferScope`). */
673
+ tables: ScopeDumpTable[] | StagedDump,
672
674
  /** #1742: the recorded-off modules, switched off on THIS scope in the restore's own event.
673
675
  * #1869: `sourceScopeId`, the scope the tables were captured from, so the vertical re-points
674
676
  * exactly that scope's grants, and `exact` when the platform exported them itself. A
@@ -696,6 +698,26 @@ export declare class VerticalClient {
696
698
  tables: number;
697
699
  switchedOff?: SwitchedOffInUnit[];
698
700
  }>;
701
+ /**
702
+ * One page of the export (#2450): `exportScopeStamped` a page at a time with `stamp`, and
703
+ * `exportScope` without. `'predates'` from a deployment built before the paged verbs (a 404, or
704
+ * its own 501), which exports whole.
705
+ */
706
+ exportScopePage(scopeId: ScopeId, cursor: string | null, opts?: {
707
+ stamp?: boolean;
708
+ }): Promise<ScopeDumpPage | 'predates'>;
709
+ /**
710
+ * Stage one page of a dump into `scopeId` here (#2450), for a `restoreScope` of the stage.
711
+ * `'predates'` from a deployment that restores only whole. A page already staged answers
712
+ * `staged: false`, so a retry is harmless.
713
+ */
714
+ stageScopePage(scopeId: ScopeId, stageId: string, seq: number, tables: ScopeDumpTable[]): Promise<{
715
+ staged: boolean;
716
+ } | 'predates'>;
717
+ /** Drop a stage a carry gave up on (#2450). Best effort: the next stage replaces it anyway. */
718
+ discardStagedScope(scopeId: ScopeId, stageId: string): Promise<void>;
719
+ /** A platform-authenticated JSON POST, its response unread, for `routeAnswer`. */
720
+ private postRaw;
699
721
  /**
700
722
  * Wipe the copy a carry left in this deployment (#1722), only if nothing was loaded into the
701
723
  * scope since `expectLoadStamp` (null: a store no load has stamped). `wiped: false` is the
@@ -1003,4 +1025,45 @@ export declare class VerticalClient {
1003
1025
  /** `getInternal`'s request, answering the response itself, for a caller that reads a header too. */
1004
1026
  private getInternalResponse;
1005
1027
  }
1028
+ /** #2450: a dump loaded into a destination's stage a page at a time, named instead of carried. */
1029
+ export type StagedDump = {
1030
+ readonly stageId: string;
1031
+ };
1032
+ /** What `transferScope` moved, and what the export read: as `exportScopeStamped` answers it. */
1033
+ export interface TransferredScope {
1034
+ /** The whole dump, or the stage it is waiting in at the destination (`restoreScope` takes both). */
1035
+ dump: ScopeDumpTable[] | StagedDump;
1036
+ loadStamp: string | null;
1037
+ revision: string | null;
1038
+ /** The dump's `_substrat_meta` rows, for `dumpMetaValue`: the one table read beside the move. */
1039
+ meta: ScopeDumpTable[];
1040
+ }
1041
+ /** How many times a copy is restarted because the source took a write while it was read (#2450). */
1042
+ export declare const TRANSFER_ATTEMPTS = 3;
1043
+ /**
1044
+ * Move a scope's data out of `source` and into `dest`'s stage, a page at a time (#2450), so no
1045
+ * single call carries the whole scope: a Durable Object RPC message holds 32 MiB, and an isolate
1046
+ * 128 MB. Nothing here holds more than one page, and the destination commits from its stage in
1047
+ * `restoreScope`, in the one transaction a whole restore runs.
1048
+ *
1049
+ * A scope that fits in one page, or a source that predates the paged verbs, moves whole, exactly as
1050
+ * before. A destination that predates them gets the pages merged into one dump, which is the old
1051
+ * ceiling, and only there.
1052
+ *
1053
+ * Each page is read in one turn of the source, so it is consistent on its own; the pages are one
1054
+ * consistent read only while the source's write revision stays where the first page read it. When
1055
+ * it moves the copy starts again, up to `TRANSFER_ATTEMPTS` times, and is then refused (409) with
1056
+ * nothing moved: a carry's later fences assume a copy that was true at one moment.
1057
+ */
1058
+ export declare function transferScope(source: Pick<VerticalClient, 'exportScope' | 'exportScopeStamped' | 'exportScopePage'>, dest: Pick<VerticalClient, 'stageScopePage' | 'discardStagedScope'>,
1059
+ /** The scope read at `source`, and (a fork, #2450) the scope `dest` stages into, when another. */
1060
+ scope: {
1061
+ from: ScopeId;
1062
+ to?: ScopeId;
1063
+ }, opts?: {
1064
+ retry?: <T>(run: () => Promise<T>) => Promise<T>;
1065
+ attempts?: number;
1066
+ /** A carry's export: the source mints its load stamp (`exportScopeStamped`). A fork's is not. */
1067
+ stamp?: boolean;
1068
+ }): Promise<TransferredScope>;
1006
1069
  //# sourceMappingURL=vertical-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertical-client.d.ts","sourceRoot":"","sources":["../src/vertical-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EAEZ,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EACl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AAgB,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,kBAAkB,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAI1H;IAED;;;OAGG;YACW,iBAAiB;IA+B/B,6FAA6F;YAC/E,YAAY;IAqB1B,4EAA4E;YAC9D,WAAW;IAIzB,oGAAoG;YACtF,mBAAmB;CAUlC"}
1
+ {"version":3,"file":"vertical-client.d.ts","sourceRoot":"","sources":["../src/vertical-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EAEZ,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACX,MAAM,yB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