@helpai/elements 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
- # Help AI Elements: the full SDK docs (@helpai/elements@1.11.0)
1
+ # Help AI Elements: the full SDK docs (@helpai/elements@1.12.0)
2
2
 
3
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/quickstart.md -->
3
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/quickstart.md -->
4
4
 
5
5
  # Quickstart
6
6
 
@@ -67,7 +67,7 @@ kebab-case `data-*` attribute. Common ones:
67
67
  ></script>
68
68
  ```
69
69
 
70
- Full list: [Installation § script data attributes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md#path-a--script-data--auto-boot).
70
+ Full list: [Installation § script data attributes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md#path-a--script-data--auto-boot).
71
71
 
72
72
  ---
73
73
 
@@ -149,7 +149,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
149
149
  ### Vue / Svelte / Angular / any bundler
150
150
 
151
151
  Call `init(...)` once on mount and `destroy()` on unmount, or use the `<web-ai-chat>` element (path D).
152
- Full framework-by-framework walkthrough: [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md).
152
+ Full framework-by-framework walkthrough: [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md).
153
153
 
154
154
  ---
155
155
 
@@ -186,20 +186,20 @@ round chat bubble with an accent color.
186
186
  - **Close the panel** → the bubble returns.
187
187
  - **Reload the page** → your chat history stays intact.
188
188
 
189
- Something not showing up? → [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md).
189
+ Something not showing up? → [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md).
190
190
 
191
191
  ---
192
192
 
193
193
  ## 4. Common next steps
194
194
 
195
- - **Match your brand** — [Theming](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md) has every color,
195
+ - **Match your brand** — [Theming](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md) has every color,
196
196
  radius, and font knob.
197
- - **Change the launcher label / icon** — [`launcher` options](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md#launcher).
197
+ - **Change the launcher label / icon** — [`launcher` options](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md#launcher).
198
198
  - **Know who the visitor is** — pass `userContext: { id, email, name }`
199
199
  (and `pageContext: { area }`) for personalization.
200
- - **Forward chat events to analytics** — [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md).
200
+ - **Forward chat events to analytics** — [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md).
201
201
  - **Add a second widget** (one for sales, one for support) — [Recipes
202
- § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#multiple-widgets-on-one-page).
202
+ § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#multiple-widgets-on-one-page).
203
203
 
204
204
  ---
205
205
 
@@ -230,15 +230,15 @@ the same deployment:
230
230
  | Remix | read from `window.ENV` |
231
231
  | Create React App | `REACT_APP_*` |
232
232
 
233
- Full security notes: [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md).
233
+ Full security notes: [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md).
234
234
 
235
235
  ---
236
236
 
237
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md -->
237
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md -->
238
238
 
239
239
  # Installation
240
240
 
241
- Deep-dive for every install path. See [Quickstart](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/quickstart.md)
241
+ Deep-dive for every install path. See [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/quickstart.md)
242
242
  for the 5-minute version.
243
243
 
244
244
  ---
@@ -250,7 +250,7 @@ for the 5-minute version.
250
250
  | [A. `<script data-*>` auto-boot](#path-a--script-data--auto-boot) | Static HTML, WordPress, no build step | CDN |
251
251
  | [B. Async loader snippet](#path-b--async-loader-snippet) | Tag managers, analytics pipelines | CDN |
252
252
  | [C. NPM package](#path-c--npm-package) | React, Next.js, Vue, Svelte, SolidJS, any bundler | NPM |
253
- | [React kit](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md#react) | React, Next.js, Remix: `<HelpAI />` + `useHelpAI()` | NPM |
253
+ | [React kit](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md#react) | React, Next.js, Remix: `<HelpAI />` + `useHelpAI()` | NPM |
254
254
  | [D. Web Component](#path-d--web-component) | Declarative tags in any framework | CDN or NPM |
255
255
 
256
256
  > ### CDN URL
@@ -271,9 +271,9 @@ for the 5-minute version.
271
271
  All four paths:
272
272
 
273
273
  - Load the same JS bundle.
274
- - Accept the same [configuration options](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md).
275
- - Emit the same [events](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md).
276
- - Respect the same [isolation guarantees](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#shadow-dom--iframe).
274
+ - Accept the same [configuration options](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md).
275
+ - Emit the same [events](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md).
276
+ - Respect the same [isolation guarantees](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#shadow-dom--iframe).
277
277
 
278
278
  You can combine them — e.g., a Next.js page can use path C, and a
279
279
  marketing landing can use path A, both pointing at the same deployment.
@@ -327,24 +327,24 @@ The zero-JavaScript path intentionally exposes a small, flat subset of
327
327
  | `data-page-context` | `pageContext` extras (JSON) | `'{"experiment":"b"}'` |
328
328
 
329
329
  Unknown attributes are ignored. Full option semantics:
330
- [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md).
330
+ [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md).
331
331
 
332
332
  > Explicit scalar attributes (`data-user-id`, `data-page-area`, …) win
333
333
  > over keys in the `data-user-context` / `data-page-context` JSON. For
334
334
  > SPAs where the visitor logs in after load or navigates between pages,
335
335
  > set context dynamically with
336
- > [`instance.setUserContext(...)` / `setPageContext(...)`](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md#setting-context-after-login--on-navigation).
336
+ > [`instance.setUserContext(...)` / `setPageContext(...)`](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md#setting-context-after-login--on-navigation).
337
337
  > The `data-user-*` / `data-page-*` attributes are reactive — updating
338
338
  > one re-handshakes with the same anonymous visitor/conversation. This
339
339
  > context is informational for the AI, never an auth credential.
340
340
 
341
- ### `data-no-autoboot`
341
+ ### Load without mounting
342
342
 
343
- Add this flag to load the bundle **without** automatically mounting.
344
- Useful when you want to `init()` later from JavaScript:
343
+ The script tag mounts the widget only when it carries `data-ai-agent-deployment-id`. Leave that attribute out to
344
+ load the bundle **without** mounting, then call `init()` from JavaScript when you're ready:
345
345
 
346
346
  ```html
347
- <script src="https://cdn.help.ai/sdk/js/elements/latest/elements.js" data-no-autoboot></script>
347
+ <script src="https://cdn.help.ai/sdk/js/elements/latest/elements.js"></script>
348
348
  <script>
349
349
  // Mount later, conditionally
350
350
  document.addEventListener('DOMContentLoaded', () => {
@@ -436,7 +436,7 @@ arrays or objects to it before the bundle arrives:
436
436
  </script>
437
437
  ```
438
438
 
439
- Full details: [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md#global-lifecycle-hooks).
439
+ Full details: [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md#global-lifecycle-hooks).
440
440
 
441
441
  ### After boot
442
442
 
@@ -458,7 +458,7 @@ window.HelpAI.brand // { id, displayName, cdnUrl, ... }
458
458
  ## Path C — NPM package
459
459
 
460
460
  For sites with a bundler. Full framework-specific walkthroughs:
461
- [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md).
461
+ [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md).
462
462
 
463
463
  ### Install
464
464
 
@@ -650,7 +650,7 @@ declare module 'react' {
650
650
 
651
651
  **Angular** — add `CUSTOM_ELEMENTS_SCHEMA` to your module.
652
652
 
653
- Framework-by-framework details: [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md).
653
+ Framework-by-framework details: [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md).
654
654
 
655
655
  ---
656
656
 
@@ -858,14 +858,14 @@ weigh chunking (see [Caching, versioning & self-hosting](#caching-versioning--se
858
858
 
859
859
  ## Next
860
860
 
861
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) — every option explained with examples.
862
- - [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md) — matching your brand.
863
- - [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md) — framework-specific recipes.
864
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md) — "my widget isn't showing up".
861
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) — every option explained with examples.
862
+ - [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md) — matching your brand.
863
+ - [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md) — framework-specific recipes.
864
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md) — "my widget isn't showing up".
865
865
 
866
866
  ---
867
867
 
868
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md -->
868
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md -->
869
869
 
870
870
  # Framework integrations
871
871
 
@@ -954,12 +954,12 @@ function PricingHelp() {
954
954
  }
955
955
  ```
956
956
 
957
- - **`<HelpAI {...options} />`** takes every [widget option](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) as a prop; `aiAgentDeploymentId` is
957
+ - **`<HelpAI {...options} />`** takes every [widget option](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) as a prop; `aiAgentDeploymentId` is
958
958
  required. It renders nothing itself: the widget mounts once the page is in the browser, a prop change re-configures
959
959
  the live widget without a remount, and unmounting removes it. Callback props (`onOpen`, `onMessage`, …) can be new
960
960
  functions on every render; the widget always calls the latest one.
961
961
  - **`useHelpAI(widgetId?)`** returns `{ state, ask, open, close, reset, track }`. `state` is
962
- [`{ open, ready, unread, conversationId? }`](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md#state-and-ready) and re-renders the component when it changes;
962
+ [`{ open, ready, unread, conversationId? }`](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md#state-and-ready) and re-renders the component when it changes;
963
963
  the server render sees the initial state. The commands are stable across renders and do nothing until the widget
964
964
  has mounted (`state.ready`). `ask(text)` fills the composer; `ask(text, { send: true })` sends it. Call `reset()`
965
965
  when your user logs out.
@@ -967,10 +967,10 @@ function PricingHelp() {
967
967
  from `@helpai/elements/react`; the package's other entries are separate copies with their own widgets.
968
968
  - **Two widgets** on one page: give each `<HelpAI widgetId='support' … />` and read it with `useHelpAI('support')`.
969
969
  - **Page tools:** `useHelpAITool(tool)` gives the agent a tool while the component is mounted, or pass
970
- `<HelpAI tools={[...]} />` ([Page tools](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md)). `execute` can be a new function on every render; the
970
+ `<HelpAI tools={[...]} />` ([Page tools](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md)). `execute` can be a new function on every render; the
971
971
  agent's call runs the latest one, and only a changed definition registers or configures anything again.
972
972
  - **Signed-in users:** pass `userToken`, a function that fetches the token your server signs
973
- ([Verified users](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#verified-users-usertoken)). Keep it stable for one user (a module function, or
973
+ ([Verified users](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#verified-users-usertoken)). Keep it stable for one user (a module function, or
974
974
  `useCallback` keyed on your user id): a different function signs in afresh, and dropping it signs out.
975
975
 
976
976
  The kit bundles the widget and imports only React from your app, so you don't need Preact installed.
@@ -993,7 +993,7 @@ function Chat() {
993
993
  `import type {} from '@helpai/elements/jsx/react';` once (in your entry file or a `.d.ts`) registers `<web-ai-chat>`
994
994
  in React 19's JSX: every attribute the element reads autocompletes, `ai-agent-deployment-id` is required, and a `ref`
995
995
  is the typed element with `ask`, `open`, `state`, `ready` and `reset`. Vue and Svelte have `@helpai/elements/jsx/vue`
996
- and `@helpai/elements/jsx/svelte` ([JSX typings](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md#jsx-typings)).
996
+ and `@helpai/elements/jsx/svelte` ([JSX typings](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md#jsx-typings)).
997
997
 
998
998
  ```tsx
999
999
  import { useRef } from 'react';
@@ -1502,21 +1502,21 @@ sometimes mounts duplicate instances. Always pair your `useEffect` /
1502
1502
 
1503
1503
  **CSP blocks the widget** — the widget inlines styles inside a shadow
1504
1504
  root (requires `style-src 'unsafe-inline'` or a nonce pattern). See
1505
- [Security & privacy § CSP](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#content-security-policy).
1505
+ [Security & privacy § CSP](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#content-security-policy).
1506
1506
 
1507
- More: [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md).
1507
+ More: [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md).
1508
1508
 
1509
1509
  ---
1510
1510
 
1511
1511
  ## Next
1512
1512
 
1513
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md) — programmatic control patterns.
1514
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) — analytics integration.
1515
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) — every option in detail.
1513
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md) — programmatic control patterns.
1514
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) — analytics integration.
1515
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) — every option in detail.
1516
1516
 
1517
1517
  ---
1518
1518
 
1519
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md -->
1519
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md -->
1520
1520
 
1521
1521
  # Configuration reference
1522
1522
 
@@ -1524,7 +1524,7 @@ Every option you can pass to `init(...)` / `mount(...)` / set via
1524
1524
  `data-*` attributes / set via web-component attributes.
1525
1525
 
1526
1526
  Group-by-group walkthrough with realistic examples. For an at-a-glance
1527
- lookup, see [API reference](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md).
1527
+ lookup, see [API reference](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md).
1528
1528
 
1529
1529
  ---
1530
1530
 
@@ -1609,7 +1609,7 @@ init({ widgetId: 'support', publicKey: SUPPORT_KEY, aiAgentDeploymentId: SUPPORT
1609
1609
  init({ widgetId: 'sales', publicKey: SALES_KEY, aiAgentDeploymentId: SALES_DEPLOYMENT_ID });
1610
1610
  ```
1611
1611
 
1612
- See [Recipes § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#multiple-widgets-on-one-page).
1612
+ See [Recipes § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#multiple-widgets-on-one-page).
1613
1613
 
1614
1614
  ### `baseUrl`
1615
1615
 
@@ -1629,7 +1629,7 @@ Override if you use:
1629
1629
  Signs the visitor in as your logged-in user: a JWT your server signs with the deployment's secret key, or a function
1630
1630
  returning a fresh one. Their conversations then follow them to any device, and the AI gets their name and email as
1631
1631
  verified facts. Runtime-only: not an attribute or `data-*` option, so the token stays out of the page's markup. See
1632
- [Security → Verified users](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#verified-users-usertoken) for signing it.
1632
+ [Security → Verified users](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#verified-users-usertoken) for signing it.
1633
1633
 
1634
1634
  ```ts
1635
1635
  init({ publicKey: 'agent_pk_...', aiAgentDeploymentId: '01900000-0000-7000-8000-000000000000', userToken: () => fetch('/api/help-ai-token').then((res) => res.text()) });
@@ -1643,7 +1643,7 @@ Tools the AI agent can use on your page, in the WebMCP tool shape: a name, a des
1643
1643
  and an `execute` function the widget runs in the visitor's browser when the agent calls it
1644
1644
  (`annotations: { consequentialHint: true }` asks the visitor first). Runtime-only, like `userToken`;
1645
1645
  `chat.update({ tools })` replaces them. `chat.registerTool(tool)` adds one for every widget on the page instead. Full
1646
- guide: [Page tools](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md).
1646
+ guide: [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md).
1647
1647
 
1648
1648
  ```ts
1649
1649
  init({
@@ -1772,8 +1772,8 @@ widget.clearUserContext();
1772
1772
  ```
1773
1773
 
1774
1774
  You can also seed context at load time via `data-user-*` /
1775
- `data-page-*` tag attributes — see [Installation](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md) and
1776
- the framework recipes in [`frameworks.md`](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md).
1775
+ `data-page-*` tag attributes — see [Installation](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md) and
1776
+ the framework recipes in [`frameworks.md`](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md).
1777
1777
 
1778
1778
  ---
1779
1779
 
@@ -1828,7 +1828,7 @@ init({ presentation: { mode: 'floating', iframe: true }, publicKey: 'agent_pk_..
1828
1828
  ```
1829
1829
 
1830
1830
  Composes with any `mode`. Default is `false` — shadow DOM alone is
1831
- enough for 95% of deployments. [Security § Iframe isolation](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#iframe-isolation).
1831
+ enough for 95% of deployments. [Security § Iframe isolation](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#iframe-isolation).
1832
1832
 
1833
1833
  ### `presentation.position`
1834
1834
 
@@ -1893,7 +1893,7 @@ mode via the header picker regardless of palette overrides.
1893
1893
  End users can flip the theme via the header picker. Their choice is
1894
1894
  persisted per device + synced cross-device.
1895
1895
 
1896
- Full customization guide: [Theming](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md).
1896
+ Full customization guide: [Theming](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md).
1897
1897
 
1898
1898
  ---
1899
1899
 
@@ -1993,7 +1993,7 @@ init({
1993
1993
  ```
1994
1994
 
1995
1995
  Variants + callout fully explained in
1996
- [Theming § Launcher](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md#launcher).
1996
+ [Theming § Launcher](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md#launcher).
1997
1997
 
1998
1998
  ### `launcher.hidden`
1999
1999
 
@@ -2232,7 +2232,7 @@ Full behavior + wire contract:
2232
2232
  `boolean` · default: `false`
2233
2233
 
2234
2234
  Turn OFF the 👍/👎 feedback controls under each rateable reply (AI or operator) — unset/`false` shows them (default). While
2235
- shown, a choice fires the [`messageFeedback`](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) event and is sent to the backend.
2235
+ shown, a choice fires the [`messageFeedback`](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) event and is sent to the backend.
2236
2236
 
2237
2237
  ```ts
2238
2238
  init({ behavior: { disableMessageFeedback: true } }); // hide the controls
@@ -2321,7 +2321,7 @@ init({
2321
2321
  });
2322
2322
  ```
2323
2323
 
2324
- Full key list: [i18n](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md#internationalization) or
2324
+ Full key list: [i18n](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md#internationalization) or
2325
2325
  `src/i18n/strings.ts` in the source.
2326
2326
 
2327
2327
  ---
@@ -2404,7 +2404,7 @@ init({
2404
2404
  });
2405
2405
  ```
2406
2406
 
2407
- For richer event handling, see [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md).
2407
+ For richer event handling, see [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md).
2408
2408
 
2409
2409
  ---
2410
2410
 
@@ -2440,7 +2440,7 @@ The widget itself does not include drafts in Help AI network requests before
2440
2440
  Send. Use an encrypted adapter when same-origin plaintext storage is not
2441
2441
  acceptable; an in-memory adapter disables reload restoration.
2442
2442
 
2443
- Full adapter contract: [Security & privacy § custom storage](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#custom-storage).
2443
+ Full adapter contract: [Security & privacy § custom storage](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#custom-storage).
2444
2444
 
2445
2445
  ---
2446
2446
 
@@ -2546,14 +2546,14 @@ const chat = init({
2546
2546
 
2547
2547
  ## Not covered here
2548
2548
 
2549
- - **Events** → [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md)
2550
- - **Theming deep-dive** → [Theming](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md)
2551
- - **Framework-specific wiring** → [Frameworks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md)
2549
+ - **Events** → [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md)
2550
+ - **Theming deep-dive** → [Theming](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md)
2551
+ - **Framework-specific wiring** → [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md)
2552
2552
  - **Backend API** → Backend contract (internal)
2553
2553
 
2554
2554
  ---
2555
2555
 
2556
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/options.md -->
2556
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/options.md -->
2557
2557
 
2558
2558
  # Configuration — `ChatWidgetOptions`
2559
2559
 
@@ -2881,13 +2881,13 @@ Pass `footer: { poweredBy: { text: "" } }` to opt out of the brand attribution.
2881
2881
 
2882
2882
  ---
2883
2883
 
2884
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md -->
2884
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md -->
2885
2885
 
2886
2886
  # API reference
2887
2887
 
2888
2888
  Compact lookup for the SDK's exported functions, types, and events.
2889
- For explanations + examples, see the [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md)
2890
- and [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) guides.
2889
+ For explanations + examples, see the [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md)
2890
+ and [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) guides.
2891
2891
 
2892
2892
  ---
2893
2893
 
@@ -2938,7 +2938,7 @@ import {
2938
2938
  } from '@helpai/elements/react';
2939
2939
  ```
2940
2940
 
2941
- See [Frameworks → React](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md#react).
2941
+ See [Frameworks → React](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md#react).
2942
2942
 
2943
2943
  ---
2944
2944
 
@@ -3054,7 +3054,7 @@ interface ChatWidgetInstance {
3054
3054
  ## `ChatWidgetOptions`
3055
3055
 
3056
3056
  The generated, schema-backed field reference is
3057
- [`docs/api/configuration.md`](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/options.md); it is authoritative.
3057
+ [`docs/api/configuration.md`](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/options.md); it is authoritative.
3058
3058
  The public input keeps embed identity, context, endpoint overrides, storage,
3059
3059
  and callbacks at the top level. Serializable widget settings use focused
3060
3060
  nested sections. `mount()` and `init()` require `aiAgentDeploymentId`; the
@@ -3094,11 +3094,11 @@ init({
3094
3094
  ```
3095
3095
 
3096
3096
  The complete type also exposes `features`, `forms`, `modules`, and `tracking`.
3097
- See [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) for behavior and examples.
3097
+ See [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) for behavior and examples.
3098
3098
 
3099
3099
  ### `ModelContextTool`
3100
3100
 
3101
- A tool the agent can use on your page, in the WebMCP tool shape ([Page tools](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md)). On `<web-ai-chat>`
3101
+ A tool the agent can use on your page, in the WebMCP tool shape ([Page tools](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md)). On `<web-ai-chat>`
3102
3102
  it's the `tools` property or `registerTool()`, since functions can't be attributes.
3103
3103
 
3104
3104
  ```ts
@@ -3252,7 +3252,7 @@ reconnects as that user: their conversations on this browser move to them, and t
3252
3252
  device where they're signed in. Call `reset()` when they sign out; switching to another user's token starts over the
3253
3253
  same way. Also `HelpAI('login', userToken)`, `element.login(userToken)` on `<web-ai-chat>` (not an attribute, so the
3254
3254
  token stays out of the DOM), the `userToken` option at `init()`, and `<HelpAI userToken={…} />`. Signing and the
3255
- guarantees: [Security → Verified users](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#verified-users-usertoken).
3255
+ guarantees: [Security → Verified users](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#verified-users-usertoken).
3256
3256
 
3257
3257
  ```ts
3258
3258
  chat.login(() => fetch('/api/help-ai-token').then((res) => res.text()));
@@ -3264,7 +3264,7 @@ chat.login(() => fetch('/api/help-ai-token').then((res) => res.text()));
3264
3264
 
3265
3265
  Gives the agent a tool on this page, for every widget on it: the latest registration of a name wins, and aborting
3266
3266
  `options.signal` removes it. Also `HelpAI('registerTool', tool)` (queued before the script loads),
3267
- `element.registerTool(tool)` and the React kit's `useHelpAITool(tool)`. Details: [Page tools](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md).
3267
+ `element.registerTool(tool)` and the React kit's `useHelpAITool(tool)`. Details: [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md).
3268
3268
 
3269
3269
  ```ts
3270
3270
  chat.registerTool({ name: 'open_booking', description: 'Open the booking form. Use it whenever the visitor wants to book a call.', execute: () => bookingForm.open() });
@@ -3278,7 +3278,7 @@ Reports something the visitor did on your site, outside the chat. It sends a `ho
3278
3278
  (not when tracking is off), and the widget keeps the last 10 for the agent, which reads them with the visitor's next
3279
3279
  message. The name is 1–64 characters; the data is flat (strings, numbers, booleans; 256 characters of JSON at most).
3280
3280
  Also `HelpAI('track', name, data)`, `element.track(name, data)` and `useHelpAI().track`. Details:
3281
- [Analytics → Your own events](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/analytics.md#your-own-events-chattrack).
3281
+ [Analytics → Your own events](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/analytics.md#your-own-events-chattrack).
3282
3282
 
3283
3283
  ```ts
3284
3284
  chat.track('plan_viewed', { plan: 'pro' });
@@ -3361,10 +3361,10 @@ The auto-boot parser exposes the documented flat `data-*` subset.
3361
3361
  ></script>
3362
3362
  ```
3363
3363
 
3364
- Full attribute list: [Installation § script data attributes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md#attributes).
3364
+ Full attribute list: [Installation § script data attributes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md#attributes).
3365
3365
 
3366
- `data-no-autoboot` — loads the bundle but doesn't auto-mount. For
3367
- deferred init via JS.
3366
+ Leave out `data-ai-agent-deployment-id` to load the bundle without mounting, then call
3367
+ `HelpAI.init({ … })` from JavaScript ([Installation § Load without mounting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md#load-without-mounting)).
3368
3368
 
3369
3369
  ---
3370
3370
 
@@ -3568,14 +3568,14 @@ Or use `/v1/` for the latest 1.x.x (auto-patches, no major breaks).
3568
3568
 
3569
3569
  ## See also
3570
3570
 
3571
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) — options with examples + context.
3572
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) — event handling deep-dive.
3573
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md) — copy-paste scenarios.
3574
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md) — when things go wrong.
3571
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) — options with examples + context.
3572
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) — event handling deep-dive.
3573
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md) — copy-paste scenarios.
3574
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md) — when things go wrong.
3575
3575
 
3576
3576
  ---
3577
3577
 
3578
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md -->
3578
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md -->
3579
3579
 
3580
3580
  # Events & lifecycle hooks
3581
3581
 
@@ -3601,7 +3601,7 @@ Both deliver the same event stream. Both are safe to mix.
3601
3601
  | ----------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
3602
3602
  | `open` | Panel opens (floating mode) | `void` |
3603
3603
  | `close` | Panel closes | `void` |
3604
- | `message` | User sends a message + assistant finishes a reply | `{ role: "user" \| "assistant"; text: string }` |
3604
+ | `message` | User sends a message, or a reply from the AI agent or a team member finishes | `{ role: "user" \| "assistant" \| "operator"; text: string }` |
3605
3605
  | `error` | Transport error or mid-stream error | `unknown` (error object or message) |
3606
3606
  | `expand` | Expanded tier toggled (⤢) | `boolean` (new state) |
3607
3607
  | `fullscreen` | Fullscreen tier toggled (⛶) | `boolean` (new state) |
@@ -3609,7 +3609,7 @@ Both deliver the same event stream. Both are safe to mix.
3609
3609
  | `localeChange` | User picks a different language | `string` (new BCP-47 tag) |
3610
3610
  | `messageFeedback` | User rates a reply 👍/👎 (or clears it) | `{ messageId: string; value: "up" \| "down" \| null }` |
3611
3611
  | `hostEvent` | Your page calls `chat.track(name, data)` | `{ name: string; data?: Record<string, scalar> }` |
3612
- | `toolResult` | A [page tool](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md) call settles, or the visitor answers a question card | `{ toolCallId: string; name?: string; status?: "completed" \| "failed" \| "declined" \| "stopped" \| "interrupted"; durationMs?: number }` |
3612
+ | `toolResult` | A [page tool](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md) call settles, or the visitor answers a question card | `{ toolCallId: string; name?: string; status?: "completed" \| "failed" \| "declined" \| "stopped" \| "interrupted"; durationMs?: number }` |
3613
3613
 
3614
3614
  ---
3615
3615
 
@@ -4051,21 +4051,21 @@ explicit `off()` is belt-and-suspenders. Either way works.
4051
4051
  | No events at all | `.on()` called before the instance was fully constructed. Use `init()`'s return value or a pre-boot hook |
4052
4052
  | Pre-boot hook never fires | Widget never mounted — check the public-key/deployment-id pair |
4053
4053
 
4054
- [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md) has the full diagnostic
4054
+ [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md) has the full diagnostic
4055
4055
  checklist.
4056
4056
 
4057
4057
  ---
4058
4058
 
4059
4059
  ## Next
4060
4060
 
4061
- - [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/analytics.md) — GA4, Mixpanel, Segment, Amplitude, PostHog, Sentry, multi-provider
4062
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md) — copy-paste scenarios
4063
- - [API reference § events](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md#events) — compact lookup
4064
- - [Configuration § callbacks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md#callbacks-shortcut-for-events)
4061
+ - [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/analytics.md) — GA4, Mixpanel, Segment, Amplitude, PostHog, Sentry, multi-provider
4062
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md) — copy-paste scenarios
4063
+ - [API reference § events](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md#events) — compact lookup
4064
+ - [Configuration § callbacks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md#callbacks-shortcut-for-events)
4065
4065
 
4066
4066
  ---
4067
4067
 
4068
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md -->
4068
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md -->
4069
4069
 
4070
4070
  # Page tools
4071
4071
 
@@ -4264,7 +4264,7 @@ on the `dev/page-tools.html` playground, with a real model or the mock backend.
4264
4264
 
4265
4265
  ---
4266
4266
 
4267
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md -->
4267
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md -->
4268
4268
 
4269
4269
  # Theming & customization
4270
4270
 
@@ -4591,7 +4591,7 @@ init({
4591
4591
 
4592
4592
  ## Header actions
4593
4593
 
4594
- See [Configuration § Header actions](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md#header-actions)
4594
+ See [Configuration § Header actions](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md#header-actions)
4595
4595
  for the full semantics. Quick customization examples:
4596
4596
 
4597
4597
  ### Minimal chrome
@@ -4798,7 +4798,7 @@ are for what tokens don't cover (shadows, corners, borders).
4798
4798
 
4799
4799
  For truly bespoke designs (e.g., replacing the launcher with your
4800
4800
  own component), use `launcher.hidden: true` + custom trigger, or a
4801
- [no-script trigger](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md#no-script-triggers).
4801
+ [no-script trigger](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md#no-script-triggers).
4802
4802
 
4803
4803
  ---
4804
4804
 
@@ -4830,16 +4830,16 @@ can always override.
4830
4830
 
4831
4831
  ## Next
4832
4832
 
4833
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) — listening to chat
4833
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) — listening to chat
4834
4834
  interactions, integrating with analytics.
4835
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md) — copy-paste examples for common
4835
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md) — copy-paste examples for common
4836
4836
  customization scenarios.
4837
- - [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) — the full option
4837
+ - [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) — the full option
4838
4838
  table.
4839
4839
 
4840
4840
  ---
4841
4841
 
4842
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md -->
4842
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md -->
4843
4843
 
4844
4844
  # Recipes
4845
4845
 
@@ -5563,13 +5563,13 @@ brand accent set in the dashboard.
5563
5563
 
5564
5564
  ## Next
5565
5565
 
5566
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) — full event API
5567
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) — every option
5568
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md) — when things go wrong
5566
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) — full event API
5567
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) — every option
5568
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md) — when things go wrong
5569
5569
 
5570
5570
  ---
5571
5571
 
5572
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/analytics.md -->
5572
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/analytics.md -->
5573
5573
 
5574
5574
  # Analytics integration
5575
5575
 
@@ -5601,8 +5601,13 @@ internal event bus, and you subscribe as many listeners as you want.
5601
5601
  <!-- 2. Load the widget -->
5602
5602
  <script src="https://cdn.help.ai/sdk/js/elements/latest/elements.js" data-public-key="agent_pk_..." data-ai-agent-deployment-id="01900000-0000-7000-8000-000000000000" defer></script>
5603
5603
 
5604
- <!-- 3. Subscribe to every widget event with one wildcard hook -->
5604
+ <!-- 3. Subscribe to every widget event with one wildcard hook. The stub queues the call until the deferred script runs. -->
5605
5605
  <script>
5606
+ window.HelpAI =
5607
+ window.HelpAI ||
5608
+ function () {
5609
+ (HelpAI.q = HelpAI.q || []).push(arguments);
5610
+ };
5606
5611
  HelpAI('hook', 'default', '*', (chat, event, payload) => {
5607
5612
  gtag('event', `chat_${event}`, flatten(payload));
5608
5613
  });
@@ -5625,7 +5630,7 @@ event.
5625
5630
 
5626
5631
  Every interactive action emits one event with a typed payload. Subscribe
5627
5632
  via `chat.on(name, fn)` (instance) or `HelpAI.hook(widgetId, name, fn)`
5628
- (global, pre-boot-safe). Full schema in [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md).
5633
+ (global, pre-boot-safe). Full schema in [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md).
5629
5634
 
5630
5635
  | Category | Event | Payload |
5631
5636
  | ---------------- | --------------------- | -------------------------------------------------- |
@@ -6145,14 +6150,14 @@ yourself — see the snippets above.
6145
6150
 
6146
6151
  ## See also
6147
6152
 
6148
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) — full event reference, payload shapes, pre-boot queue semantics
6149
- - [API reference](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md) — `ChatWidgetInstance` shape
6150
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md) — other end-to-end snippets
6151
- - [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md) — what data flows where
6153
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) — full event reference, payload shapes, pre-boot queue semantics
6154
+ - [API reference](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md) — `ChatWidgetInstance` shape
6155
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md) — other end-to-end snippets
6156
+ - [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md) — what data flows where
6152
6157
 
6153
6158
  ---
6154
6159
 
6155
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md -->
6160
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md -->
6156
6161
 
6157
6162
  # Security & privacy
6158
6163
 
@@ -6344,7 +6349,7 @@ unsent text values in addition to identity and UI state, so adapter code owns
6344
6349
  their storage destination, retention, and privacy behavior. Use cases include
6345
6350
  encrypted `localStorage`, `sessionStorage`, and in-memory consent fallbacks.
6346
6351
 
6347
- [Recipes § Custom storage](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#custom-storage-adapter).
6352
+ [Recipes § Custom storage](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#custom-storage-adapter).
6348
6353
 
6349
6354
  ---
6350
6355
 
@@ -6643,10 +6648,13 @@ and anyone can base64url-decode it. Never put a secret in context.
6643
6648
 
6644
6649
  ### Key rotation
6645
6650
 
6646
- - **public keys** — rotate from the dashboard. Old keys are deactivated
6647
- instantly; update your embeds.
6648
- - **secret key** — user tokens signed with a replaced secret key stop verifying, so every verified user is signed out
6649
- until your server signs new ones with the new key.
6651
+ The dashboard has no key rotation today.
6652
+
6653
+ - **public key** — public by design: it only names the deployment. Limit where it works with the deployment's
6654
+ **Allowed websites**.
6655
+ - **secret key** — keep it on your server. If it leaks, create a new deployment (it gets new keys), move your embed
6656
+ and your token signing to it, and delete the old one. User tokens signed with the old key stop verifying, so every
6657
+ verified user is signed out until your server signs new ones.
6650
6658
 
6651
6659
  ---
6652
6660
 
@@ -6793,7 +6801,7 @@ We respond within 24 hours and coordinate disclosure on your schedule.
6793
6801
 
6794
6802
  ---
6795
6803
 
6796
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/browser-support.md -->
6804
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/browser-support.md -->
6797
6805
 
6798
6806
  # Browser support
6799
6807
 
@@ -7100,7 +7108,7 @@ with:
7100
7108
 
7101
7109
  ---
7102
7110
 
7103
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md -->
7111
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md -->
7104
7112
 
7105
7113
  # Troubleshooting
7106
7114
 
@@ -7196,7 +7204,7 @@ for (const k of Object.keys(localStorage)) {
7196
7204
  3. **Any CSP errors in the console?** — `"Refused to connect to
7197
7205
  https://help.ai/api/agent because it violates the following Content
7198
7206
  Security Policy…"` means you need to add `help.ai` to your
7199
- `connect-src`. See [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#content-security-policy).
7207
+ `connect-src`. See [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#content-security-policy).
7200
7208
 
7201
7209
  ---
7202
7210
 
@@ -7279,7 +7287,7 @@ first.
7279
7287
  ### Symptom: widget ignores my CSS
7280
7288
 
7281
7289
  That's by design. The widget lives inside a shadow root — your page
7282
- CSS can't reach inside. Use the [theming options](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md)
7290
+ CSS can't reach inside. Use the [theming options](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md)
7283
7291
  instead.
7284
7292
 
7285
7293
  For advanced customization, override CSS custom properties on the
@@ -7544,7 +7552,7 @@ font-src 'self' https:;
7544
7552
  media-src 'self' blob:; # For voice recording
7545
7553
  ```
7546
7554
 
7547
- Full CSP guide: [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#content-security-policy).
7555
+ Full CSP guide: [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#content-security-policy).
7548
7556
 
7549
7557
  ---
7550
7558
 
@@ -7609,7 +7617,7 @@ provide `i18n.availableLocales` and include `language` in `header.actions`.
7609
7617
 
7610
7618
  ## Getting more help
7611
7619
 
7612
- 1. **Read the [FAQ](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/faq.md)** — most common questions answered
7620
+ 1. **Read the [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/faq.md)** — most common questions answered
7613
7621
  there.
7614
7622
 
7615
7623
  2. **Check our GitHub issues**: [github.com/help-ai/elements](https://github.com/help-ai/elements/issues).
@@ -7628,7 +7636,7 @@ provide `i18n.availableLocales` and include `language` in `header.actions`.
7628
7636
 
7629
7637
  ---
7630
7638
 
7631
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/faq.md -->
7639
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/faq.md -->
7632
7640
 
7633
7641
  # FAQ
7634
7642
 
@@ -7668,7 +7676,7 @@ own builds. Your public key gates the backend, not the frontend.
7668
7676
  ### What browsers are supported?
7669
7677
 
7670
7678
  Chrome/Edge 100+, Safari 15+, Firefox 100+, iOS Safari 15+. No IE11.
7671
- See [Browser support](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/browser-support.md).
7679
+ See [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/browser-support.md).
7672
7680
 
7673
7681
  ---
7674
7682
 
@@ -7687,11 +7695,11 @@ yourself) and serve it from your CDN. Point your `<script src>` at your hosted
7687
7695
  URL. Self-hosting is also what unlocks **chunked delivery** (only changed code
7688
7696
  re-downloads across releases) behind a single stable URL the customer never has
7689
7697
  to change — see
7690
- [Caching, versioning & self-hosting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md#caching-versioning--self-hosting).
7698
+ [Caching, versioning & self-hosting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md#caching-versioning--self-hosting).
7691
7699
 
7692
7700
  ### Can I use this with a tag manager (GTM)?
7693
7701
 
7694
- Yes. Use the async loader snippet ([Path B](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md#path-b--async-loader-snippet))
7702
+ Yes. Use the async loader snippet ([Path B](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md#path-b--async-loader-snippet))
7695
7703
  inside a Custom HTML tag. All `HelpAI(...)` calls queue until the
7696
7704
  bundle lands.
7697
7705
 
@@ -7699,7 +7707,7 @@ bundle lands.
7699
7707
 
7700
7708
  Yes — and there's an optional `presentation.iframe: true` flag that wraps the
7701
7709
  widget in its OWN iframe for extra isolation. See
7702
- [Configuration § presentation.iframe](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md#presentationiframe).
7710
+ [Configuration § presentation.iframe](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md#presentationiframe).
7703
7711
 
7704
7712
  ### Does it work in shadow DOM?
7705
7713
 
@@ -7709,15 +7717,15 @@ custom element on your page). Everything just works.
7709
7717
 
7710
7718
  ### Does it work with React / Next.js?
7711
7719
 
7712
- Yes. Full walkthrough: [Framework integrations § Next.js](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md#nextjs).
7720
+ Yes. Full walkthrough: [Framework integrations § Next.js](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md#nextjs).
7713
7721
 
7714
7722
  ### Does it work with Vue / Svelte / SolidJS / Angular?
7715
7723
 
7716
- Yes. See [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md).
7724
+ Yes. See [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md).
7717
7725
 
7718
7726
  ### Does it work with WordPress / Shopify / Webflow / Squarespace?
7719
7727
 
7720
- Yes. [Framework integrations § CMS](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md#wordpress).
7728
+ Yes. [Framework integrations § CMS](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md#wordpress).
7721
7729
 
7722
7730
  ---
7723
7731
 
@@ -7726,12 +7734,12 @@ Yes. [Framework integrations § CMS](https://cdn.help.ai/sdk/js/elements/1.11.0/
7726
7734
  ### Can I change the launcher icon?
7727
7735
 
7728
7736
  Yes. Pick from presets (`chat`, `spark`, `message`, `help`, `wand`)
7729
- or pass raw SVG. See [Theming § Icons](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md#icons).
7737
+ or pass raw SVG. See [Theming § Icons](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md#icons).
7730
7738
 
7731
7739
  ### Can I match my brand colors?
7732
7740
 
7733
7741
  Yes. Set `theme.accent`, `theme.accentText`, `theme.radius`,
7734
- `theme.fontFamily`. See [Theming § Colors](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md#color-overrides).
7742
+ `theme.fontFamily`. See [Theming § Colors](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md#color-overrides).
7735
7743
 
7736
7744
  ### Can I change the font?
7737
7745
 
@@ -7741,7 +7749,7 @@ respects any CSS font stack you provide.
7741
7749
  ### Can I hide the launcher and open the widget from my own button?
7742
7750
 
7743
7751
  Yes. Set `launcher: { hidden: true }`, then call `chat.open()` from
7744
- your button's click handler. [Recipes § Custom launcher](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#custom-launcher-button).
7752
+ your button's click handler. [Recipes § Custom launcher](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#custom-launcher-button).
7745
7753
 
7746
7754
  ### Can I change the welcome message?
7747
7755
 
@@ -7750,24 +7758,24 @@ widget just renders what the backend sends.
7750
7758
 
7751
7759
  ### Can I override UI strings?
7752
7760
 
7753
- Yes, per-locale or flat. See [Theming § Strings](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md#strings-overrides).
7761
+ Yes, per-locale or flat. See [Theming § Strings](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md#strings-overrides).
7754
7762
 
7755
7763
  ### Can I have multiple widgets on one page?
7756
7764
 
7757
7765
  Yes — with distinct `widgetId` values. Each gets its own chat
7758
- thread, storage, and events. [Recipes § Multi-widget](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#multiple-widgets-on-one-page).
7766
+ thread, storage, and events. [Recipes § Multi-widget](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#multiple-widgets-on-one-page).
7759
7767
 
7760
7768
  ### Can I show the widget only on certain pages?
7761
7769
 
7762
7770
  Yes — just skip the `init()` call on pages where you don't want it.
7763
7771
  Or conditionally mount/unmount based on the URL.
7764
- [Recipes § Conditional show](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#conditionally-show-based-on-url).
7772
+ [Recipes § Conditional show](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#conditionally-show-based-on-url).
7765
7773
 
7766
7774
  ### Can I use it in a specific language?
7767
7775
 
7768
7776
  Yes. Force via `i18n.locale: 'fr-CA'`. Let users switch via
7769
7777
  `i18n.availableLocales: ['en', 'fr', 'es']`. Full details: [Theming §
7770
- Internationalization](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md#internationalization).
7778
+ Internationalization](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md#internationalization).
7771
7779
 
7772
7780
  ### Can I change the widget's position on mobile?
7773
7781
 
@@ -7804,7 +7812,7 @@ allowlisted event metadata through 1×1 pixel requests; it never sends message
7804
7812
  text or form values and can be disabled with `tracking.enabled: false`. GPC and
7805
7813
  DNT disable it automatically. No cookies or fingerprinting.
7806
7814
 
7807
- Full breakdown: [Security & privacy § data collected](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md#what-data-the-widget-collects).
7815
+ Full breakdown: [Security & privacy § data collected](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md#what-data-the-widget-collects).
7808
7816
 
7809
7817
  ### Does the widget use cookies?
7810
7818
 
@@ -7824,7 +7832,7 @@ Help AI API + your deployment's configured model provider.
7824
7832
  It stores data about identified users (when you pass `user.id`) or
7825
7833
  anonymous visitors. Your DPA (Data Processing Agreement) with Help
7826
7834
  AI covers the processing terms. For consent management, see
7827
- [Recipes § Gate behind consent](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#gate-the-widget-behind-consent).
7835
+ [Recipes § Gate behind consent](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#gate-the-widget-behind-consent).
7828
7836
 
7829
7837
  ### Can visitors delete their chat history?
7830
7838
 
@@ -7839,7 +7847,7 @@ Yes — pass a custom in-memory storage adapter. Adapter-managed identity,
7839
7847
  conversation, draft, preference, and UI state then evaporates on reload. The
7840
7848
  optional logger debug level is separate: calling `setDebug` persists
7841
7849
  `helpai.debug` directly in `localStorage` until the host clears it.
7842
- [Recipes § Custom storage adapter](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#custom-storage-adapter).
7850
+ [Recipes § Custom storage adapter](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#custom-storage-adapter).
7843
7851
 
7844
7852
  ### Does the widget track visitors across sites?
7845
7853
 
@@ -7864,7 +7872,7 @@ init({
7864
7872
  not an auth credential. Browser public access uses the matching
7865
7873
  `publicKey` + `aiAgentDeploymentId` pair, or the deployment ID alone for
7866
7874
  intentional guest mode.
7867
- See [Recipes § Logged-in user personalization](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#logged-in-user-personalization).
7875
+ See [Recipes § Logged-in user personalization](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#logged-in-user-personalization).
7868
7876
 
7869
7877
  ### How do I integrate with my analytics (GA / Segment / Mixpanel)?
7870
7878
 
@@ -7883,7 +7891,7 @@ One-line pre-boot hook forwards every event:
7883
7891
  </script>
7884
7892
  ```
7885
7893
 
7886
- Full examples: [Recipes § Analytics forwarding](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md#analytics-forwarding).
7894
+ Full examples: [Recipes § Analytics forwarding](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md#analytics-forwarding).
7887
7895
 
7888
7896
  ### How do I capture errors in Sentry / Datadog?
7889
7897
 
@@ -8068,7 +8076,7 @@ table.
8068
8076
 
8069
8077
  ---
8070
8078
 
8071
- <!-- https://cdn.help.ai/sdk/js/elements/1.11.0/docs/README.md -->
8079
+ <!-- https://cdn.help.ai/sdk/js/elements/1.12.0/docs/README.md -->
8072
8080
 
8073
8081
  # Help AI Elements — SDK Documentation
8074
8082
 
@@ -8097,7 +8105,7 @@ it → the panel opens → they can chat.
8097
8105
  Get the public key and deployment ID from [help.ai](https://help.ai) →
8098
8106
  **Dashboard → Deployments**.
8099
8107
 
8100
- [**Continue with the quickstart →**](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/quickstart.md)
8108
+ [**Continue with the quickstart →**](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/quickstart.md)
8101
8109
 
8102
8110
  ---
8103
8111
 
@@ -8105,20 +8113,20 @@ Get the public key and deployment ID from [help.ai](https://help.ai) →
8105
8113
 
8106
8114
  | You want to… | Read |
8107
8115
  | ----------------------------------------------------------- | --------------------------------------------- |
8108
- | Install the widget end-to-end | [**Quickstart**](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/quickstart.md) |
8109
- | See every install method (NPM, Web Component, React) | [Installation](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md) |
8110
- | Customize every option | [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md) |
8111
- | Match my brand colors and typography | [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md) |
8112
- | Send chat events to my analytics | [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/events-and-hooks.md) |
8113
- | Wire GA4 / Mixpanel / Segment / multi-provider | [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/analytics.md) |
8114
- | Integrate with Next.js / Vue / Svelte / WordPress / Shopify | [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/frameworks.md) |
8115
- | Copy a working example | [Recipes](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/recipes.md) |
8116
- | Let the AI agent act on my page | [Page tools](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/page-tools.md) |
8117
- | Diagnose "why isn't this working" | [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/troubleshooting.md) |
8118
- | Quick answer to a common question | [FAQ](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/faq.md) |
8119
- | Compact API reference for lookup | [API reference](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/api-reference.md) |
8120
- | Understand what data the widget sees | [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/security-privacy.md) |
8121
- | Check browser compatibility | [Browser support](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/browser-support.md) |
8116
+ | Install the widget end-to-end | [**Quickstart**](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/quickstart.md) |
8117
+ | See every install method (NPM, Web Component, React) | [Installation](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md) |
8118
+ | Customize every option | [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md) |
8119
+ | Match my brand colors and typography | [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md) |
8120
+ | Send chat events to my analytics | [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/events-and-hooks.md) |
8121
+ | Wire GA4 / Mixpanel / Segment / multi-provider | [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/analytics.md) |
8122
+ | Integrate with Next.js / Vue / Svelte / WordPress / Shopify | [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/frameworks.md) |
8123
+ | Copy a working example | [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/recipes.md) |
8124
+ | Let the AI agent act on my page | [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/page-tools.md) |
8125
+ | Diagnose "why isn't this working" | [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/troubleshooting.md) |
8126
+ | Quick answer to a common question | [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/faq.md) |
8127
+ | Compact API reference for lookup | [API reference](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/api-reference.md) |
8128
+ | Understand what data the widget sees | [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/security-privacy.md) |
8129
+ | Check browser compatibility | [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/browser-support.md) |
8122
8130
 
8123
8131
  ---
8124
8132
 
@@ -8180,7 +8188,7 @@ Five ways to install. Pick whichever fits your site:
8180
8188
  | **ESM via CDN** | Plain HTML, sandboxes, MDX — no build, no NPM install | `import { mount } from 'https://cdn.jsdelivr.net/npm/@helpai/elements@<version>/elements.esm.js'` |
8181
8189
 
8182
8190
  All five use the same underlying library. Same options, same events,
8183
- same behavior. Full comparison: [Installation](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/installation.md).
8191
+ same behavior. Full comparison: [Installation](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/installation.md).
8184
8192
 
8185
8193
  ---
8186
8194
 
@@ -8235,14 +8243,14 @@ fuller example showing the most common options in one place:
8235
8243
  </script>
8236
8244
  ```
8237
8245
 
8238
- Every option explained in [Configuration](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/configuration.md). Every
8239
- customization path in [Theming](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/theming.md).
8246
+ Every option explained in [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/configuration.md). Every
8247
+ customization path in [Theming](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/theming.md).
8240
8248
 
8241
8249
  ---
8242
8250
 
8243
8251
  ## Support
8244
8252
 
8245
- - **Questions?** [FAQ](https://cdn.help.ai/sdk/js/elements/1.11.0/docs/faq.md) — common answers first. [support@help.ai](mailto:support@help.ai) for anything else.
8253
+ - **Questions?** [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.0/docs/faq.md) — common answers first. [support@help.ai](mailto:support@help.ai) for anything else.
8246
8254
  - **Found a bug?** File an issue at [github.com/help-ai/elements](https://github.com/help-ai/elements/issues).
8247
8255
  - **Need a feature?** Same place — we read every request.
8248
8256
  - **Status page:** [help.ai/status](https://help.ai/status).