Skip to content

Variable: VariantSchemas

Makaio Framework


Makaio Framework / contracts/variant / VariantSchemas

const VariantSchemas: object

Defined in: ../../../packages/contracts/src/variant/schemas.ts:48

Variant domain bus schemas.

Each key becomes a subject identifier as host:variant.<key>.

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)

request: ZodObject<{ }, $strip>

response: ZodObject<{ bundleCEF: ZodBoolean; defaultRenderer: ZodEnum<{ cef: "cef"; native: "native"; }>; variant: ZodEnum<{ base: "base"; cef: "cef"; }>; }, $strip>

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)

request: ZodObject<{ targetVariant: ZodEnum<{ base: "base"; cef: "cef"; }>; }, $strip>

response: ZodUnion<readonly [ZodObject<{ accepted: ZodLiteral<true>; downloadSizeBytes: ZodOptional<ZodNumber>; message: ZodOptional<ZodString>; }, $strip>, ZodObject<{ accepted: ZodLiteral<false>; message: ZodString; }, $strip>]>

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