/** * @smooai/chat-widget — an embeddable chat widget for the smooth-operator * protocol. Framework-light web component that speaks the schema-driven WebSocket * protocol via `@smooai/smooth-operator`. * * ESM library entry. For bundler-based hosts: * * ```ts * import { defineChatWidget, mountChatWidget } from '@smooai/chat-widget'; * * // Declarative: register the element, then drop in markup. * defineChatWidget(); * * // Or programmatic: * const widget = mountChatWidget({ endpoint: 'wss://…/ws', agentId: '…' }); * widget.openChat(); * ``` * * For a plain `