/** * Widget feature switches — which affordances an embed exposes. * * Two inputs decide each switch, and both must agree for it to be on: * * 1. **The capability envelope** from `GET /deployments/:id/config`. CORE * already folds the deployment owner's `config.features` into it, so a * feature the owner turned off in the deployment wizard arrives here as * `enabled: false` — the server is the source of truth for a shipped embed. * 2. **Embed-time overrides** passed as `features` on `execute*` / the * previewer. Only `false` has an effect: an override can hide a control the * server would serve (the wizard preview relies on this to reflect toggles * before they are saved), but it can never switch on something CORE has not * advertised. * * Artifacts are read through the visitor's session, so they follow `sessions`. */ import type { DeploymentCapabilities } from './capabilities'; export declare const WIDGET_FEATURE_KEYS: readonly ["sessions", "newChat", "artifacts", "dynamicUi", "fileUploads", "speechToText", "textToSpeech", "feedback", "followUpPrompts"]; export type WidgetFeatureKey = (typeof WIDGET_FEATURE_KEYS)[number]; export type WidgetFeatureFlags = Record; /** What an embedder may pass. Only `false` is meaningful; see the module note. */ export type WidgetFeatureOverrides = Partial; /** * What the widget assumes before `/config` has answered: every long-standing * affordance on (so nothing flickers off and back), artifacts off until CORE * advertises them. Embed-time overrides still apply. */ export declare function provisionalWidgetFeatures(overrides?: WidgetFeatureOverrides): WidgetFeatureFlags; /** The effective switches once CORE has answered: capabilities ∩ overrides, with dependencies applied. */ export declare function resolveWidgetFeatures(overrides: WidgetFeatureOverrides | undefined, capabilities: DeploymentCapabilities): WidgetFeatureFlags;