Variable: VariantSchemas
Makaio Framework / contracts/variant / VariantSchemas
Variable: VariantSchemas
Section titled “Variable: VariantSchemas”
constVariantSchemas:object
Defined in: ../../../packages/contracts/src/variant/schemas.ts:48
Variant domain bus schemas.
Each key becomes a subject identifier as host:variant.<key>.
Type Declaration
Section titled “Type Declaration”getInfo
Section titled “getInfo”getInfo:
object
Query the current variant configuration from the host.
Request: empty — the handler reads the resolved variant at startup. Response: full variant info — identifier, CEF-bundle flag, and default renderer.
Subject: host:variant.getInfo
Type: Request (RPC)
getInfo.request
Section titled “getInfo.request”request:
ZodObject<{ },$strip>
getInfo.response
Section titled “getInfo.response”response:
ZodObject<{bundleCEF:ZodBoolean;defaultRenderer:ZodEnum<{cef:"cef";native:"native"; }>;variant:ZodEnum<{base:"base";cef:"cef"; }>; },$strip>
requestUpgrade
Section titled “requestUpgrade”requestUpgrade:
object
Request a variant switch on the host.
The host may accept or decline the request. When accepted it may report
the estimated download size so the caller can display a confirmation UI.
A declined response must include a human-readable message explaining why.
Subject: host:variant.requestUpgrade
Type: Request (RPC)
requestUpgrade.request
Section titled “requestUpgrade.request”request:
ZodObject<{targetVariant:ZodEnum<{base:"base";cef:"cef"; }>; },$strip>
requestUpgrade.response
Section titled “requestUpgrade.response”response:
ZodUnion<readonly [ZodObject<{accepted:ZodLiteral<true>;downloadSizeBytes:ZodOptional<ZodNumber>;message:ZodOptional<ZodString>; },$strip>,ZodObject<{accepted:ZodLiteral<false>;message:ZodString; },$strip>]>
upgradeProgress
Section titled “upgradeProgress”upgradeProgress:
ZodObject<{message:ZodOptional<ZodString>;percent:ZodOptional<ZodNumber>;status:ZodEnum<{applying:"applying";complete:"complete";downloading:"downloading";error:"error";progress:"progress"; }>; },$strip>
Emitted by the host while a variant upgrade is in progress.
Consumers subscribe to track download and apply progress for display in the UI (e.g. a progress bar).
Subject: host:variant.upgradeProgress
Type: Event