host:variant
host:variant
Section titled “host:variant”| Field | Value |
|---|---|
| Prefix | host:variant |
| Namespace constant | VariantNamespace |
| Subjects constant | VariantSubjects |
| Kind | bus |
| Schema record | VariantSchemas |
| Tier | framework |
| Package | @makaio/contracts |
| Defined in | packages/contracts/src/variant/namespace.ts |
Subjects
Section titled “Subjects”| Key | Wire | Type | Schema |
|---|---|---|---|
getInfo | host:variant.getInfo | rpc | schemas.ts |
requestUpgrade | host:variant.requestUpgrade | rpc | schemas.ts |
upgradeProgress | host:variant.upgradeProgress | event | schemas.ts |
Subject Details
Section titled “Subject Details”host:variant.getInfo (rpc)
Section titled “host:variant.getInfo (rpc)”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:
Empty object.
Response:
| Field | Type | Required |
|---|---|---|
bundleCEF | boolean | yes |
defaultRenderer | "cef" | "native" | yes |
variant | "base" | "cef" | yes |
host:variant.requestUpgrade (rpc)
Section titled “host:variant.requestUpgrade (rpc)”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:
| Field | Type | Required |
|---|---|---|
targetVariant | "base" | "cef" | yes |
Response:
| Field | Type | Required |
|---|---|---|
accepted | boolean | yes |
message | string | undefined | no |
host:variant.upgradeProgress (event)
Section titled “host:variant.upgradeProgress (event)”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
| Field | Type | Required |
|---|---|---|
message | string | undefined | no |
percent | number | undefined | no |
status | "error" | "complete" | "progress" | "downloading" | "applying" | yes |
Auto-generated by yarn docs:bus. Do not edit manually.