Read runtime context
const context = await host.getContext();
The returned AppHostContext contains:
| Field | Meaning |
|---|---|
protocolVersion | Host protocol version; currently 1 |
installationId | Current account-scoped app installation |
appKey, appVersion | Installed app identity |
surfaceKey | Frontend Page surface currently open |
locale, timezone | Organization/user rendering context |
capabilities | Available semantic operations |
bindings.dataWorkspaces | Resolved Data Workspace binding aliases |
bindings.workflows | Resolved workflow binding aliases |
theme | App color and light or dark scheme |
if (context.capabilities.includes('workflow.run')) {
enableGenerateButton();
}
document.documentElement.dataset.theme = context.theme.colorScheme;
Bindings contain only IDs explicitly mapped by the Frontend Page resource. Do not cache them across installations.