@helpai/elements 1.9.0 → 1.10.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.9.0)
1
+ # Help AI Elements: the full SDK docs (@helpai/elements@1.10.0)
2
2
 
3
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/quickstart.md -->
3
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.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.9.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.10.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.9.0/docs/frameworks.md).
152
+ Full framework-by-framework walkthrough: [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/troubleshooting.md).
189
+ Something not showing up? → [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/theming.md) has every color,
195
+ - **Match your brand** — [Theming](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/configuration.md#launcher).
197
+ - **Change the launcher label / icon** — [`launcher` options](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/events-and-hooks.md).
200
+ - **Forward chat events to analytics** — [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/recipes.md#multiple-widgets-on-one-page).
202
+ § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/security-privacy.md).
233
+ Full security notes: [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md).
234
234
 
235
235
  ---
236
236
 
237
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md -->
237
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/quickstart.md)
241
+ Deep-dive for every install path. See [Quickstart](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/frameworks.md#react) | React, Next.js, Remix: `<HelpAI />` + `useHelpAI()` | NPM |
253
+ | [React kit](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/configuration.md).
275
- - Emit the same [events](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md).
276
- - Respect the same [isolation guarantees](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#shadow-dom--iframe).
274
+ - Accept the same [configuration options](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md).
275
+ - Emit the same [events](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md).
276
+ - Respect the same [isolation guarantees](https://cdn.help.ai/sdk/js/elements/1.10.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,13 +327,13 @@ 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.9.0/docs/configuration.md).
330
+ [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/configuration.md#setting-context-after-login--on-navigation).
336
+ > [`instance.setUserContext(...)` / `setPageContext(...)`](https://cdn.help.ai/sdk/js/elements/1.10.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.
@@ -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.9.0/docs/events-and-hooks.md#global-lifecycle-hooks).
439
+ Full details: [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/frameworks.md).
461
+ [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/frameworks.md).
653
+ Framework-by-framework details: [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/configuration.md) — every option explained with examples.
862
- - [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md) — matching your brand.
863
- - [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md) — framework-specific recipes.
864
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md) — "my widget isn't showing up".
861
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) — every option explained with examples.
862
+ - [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md) — matching your brand.
863
+ - [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md) — framework-specific recipes.
864
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.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.9.0/docs/frameworks.md -->
868
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md -->
869
869
 
870
870
  # Framework integrations
871
871
 
@@ -954,18 +954,21 @@ function PricingHelp() {
954
954
  }
955
955
  ```
956
956
 
957
- - **`<HelpAI {...options} />`** takes every [widget option](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) as a prop; `aiAgentDeploymentId` is
957
+ - **`<HelpAI {...options} />`** takes every [widget option](https://cdn.help.ai/sdk/js/elements/1.10.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 }`. `state` is
962
- [`{ open, ready, unread, conversationId? }`](https://cdn.help.ai/sdk/js/elements/1.9.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.10.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.
966
966
  - **One import path.** The kit carries the whole widget API (`getInstance`, `hook`, the types), so import everything
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
+ - **Signed-in users:** pass `userToken`, a function that fetches the token your server signs
970
+ ([Verified users](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#verified-users-usertoken)). Keep it stable for one user (a module function, or
971
+ `useCallback` keyed on your user id): a different function signs in afresh, and dropping it signs out.
969
972
 
970
973
  The kit bundles the widget and imports only React from your app, so you don't need Preact installed.
971
974
 
@@ -987,7 +990,7 @@ function Chat() {
987
990
  `import type {} from '@helpai/elements/jsx/react';` once (in your entry file or a `.d.ts`) registers `<web-ai-chat>`
988
991
  in React 19's JSX: every attribute the element reads autocompletes, `ai-agent-deployment-id` is required, and a `ref`
989
992
  is the typed element with `ask`, `open`, `state`, `ready` and `reset`. Vue and Svelte have `@helpai/elements/jsx/vue`
990
- and `@helpai/elements/jsx/svelte` ([JSX typings](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md#jsx-typings)).
993
+ and `@helpai/elements/jsx/svelte` ([JSX typings](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md#jsx-typings)).
991
994
 
992
995
  ```tsx
993
996
  import { useRef } from 'react';
@@ -1496,21 +1499,21 @@ sometimes mounts duplicate instances. Always pair your `useEffect` /
1496
1499
 
1497
1500
  **CSP blocks the widget** — the widget inlines styles inside a shadow
1498
1501
  root (requires `style-src 'unsafe-inline'` or a nonce pattern). See
1499
- [Security & privacy § CSP](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#content-security-policy).
1502
+ [Security & privacy § CSP](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#content-security-policy).
1500
1503
 
1501
- More: [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md).
1504
+ More: [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/troubleshooting.md).
1502
1505
 
1503
1506
  ---
1504
1507
 
1505
1508
  ## Next
1506
1509
 
1507
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md) — programmatic control patterns.
1508
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) — analytics integration.
1509
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) — every option in detail.
1510
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md) — programmatic control patterns.
1511
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) — analytics integration.
1512
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) — every option in detail.
1510
1513
 
1511
1514
  ---
1512
1515
 
1513
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md -->
1516
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md -->
1514
1517
 
1515
1518
  # Configuration reference
1516
1519
 
@@ -1518,7 +1521,7 @@ Every option you can pass to `init(...)` / `mount(...)` / set via
1518
1521
  `data-*` attributes / set via web-component attributes.
1519
1522
 
1520
1523
  Group-by-group walkthrough with realistic examples. For an at-a-glance
1521
- lookup, see [API reference](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md).
1524
+ lookup, see [API reference](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md).
1522
1525
 
1523
1526
  ---
1524
1527
 
@@ -1603,7 +1606,7 @@ init({ widgetId: 'support', publicKey: SUPPORT_KEY, aiAgentDeploymentId: SUPPORT
1603
1606
  init({ widgetId: 'sales', publicKey: SALES_KEY, aiAgentDeploymentId: SALES_DEPLOYMENT_ID });
1604
1607
  ```
1605
1608
 
1606
- See [Recipes § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#multiple-widgets-on-one-page).
1609
+ See [Recipes § Multiple widgets](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#multiple-widgets-on-one-page).
1607
1610
 
1608
1611
  ### `baseUrl`
1609
1612
 
@@ -1616,6 +1619,19 @@ Override if you use:
1616
1619
  - A custom domain (`your-company.com`).
1617
1620
  - A local dev backend.
1618
1621
 
1622
+ ### `userToken`
1623
+
1624
+ `string | () => string | Promise<string>` · default: none (anonymous)
1625
+
1626
+ Signs the visitor in as your logged-in user: a JWT your server signs with the deployment's secret key, or a function
1627
+ returning a fresh one. Their conversations then follow them to any device, and the AI gets their name and email as
1628
+ verified facts. Runtime-only: not an attribute or `data-*` option, so the token stays out of the page's markup. See
1629
+ [Security → Verified users](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#verified-users-usertoken) for signing it.
1630
+
1631
+ ```ts
1632
+ init({ publicKey: 'agent_pk_...', aiAgentDeploymentId: '01900000-0000-7000-8000-000000000000', userToken: () => fetch('/api/help-ai-token').then((res) => res.text()) });
1633
+ ```
1634
+
1619
1635
  ### `userContext`
1620
1636
 
1621
1637
  `object | undefined`
@@ -1735,8 +1751,8 @@ widget.clearUserContext();
1735
1751
  ```
1736
1752
 
1737
1753
  You can also seed context at load time via `data-user-*` /
1738
- `data-page-*` tag attributes — see [Installation](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md) and
1739
- the framework recipes in [`frameworks.md`](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md).
1754
+ `data-page-*` tag attributes — see [Installation](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/installation.md) and
1755
+ the framework recipes in [`frameworks.md`](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md).
1740
1756
 
1741
1757
  ---
1742
1758
 
@@ -1791,7 +1807,7 @@ init({ presentation: { mode: 'floating', iframe: true }, publicKey: 'agent_pk_..
1791
1807
  ```
1792
1808
 
1793
1809
  Composes with any `mode`. Default is `false` — shadow DOM alone is
1794
- enough for 95% of deployments. [Security § Iframe isolation](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#iframe-isolation).
1810
+ enough for 95% of deployments. [Security § Iframe isolation](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#iframe-isolation).
1795
1811
 
1796
1812
  ### `presentation.position`
1797
1813
 
@@ -1856,7 +1872,7 @@ mode via the header picker regardless of palette overrides.
1856
1872
  End users can flip the theme via the header picker. Their choice is
1857
1873
  persisted per device + synced cross-device.
1858
1874
 
1859
- Full customization guide: [Theming](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md).
1875
+ Full customization guide: [Theming](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md).
1860
1876
 
1861
1877
  ---
1862
1878
 
@@ -1956,7 +1972,7 @@ init({
1956
1972
  ```
1957
1973
 
1958
1974
  Variants + callout fully explained in
1959
- [Theming § Launcher](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md#launcher).
1975
+ [Theming § Launcher](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md#launcher).
1960
1976
 
1961
1977
  ### `launcher.hidden`
1962
1978
 
@@ -2195,7 +2211,7 @@ Full behavior + wire contract:
2195
2211
  `boolean` · default: `false`
2196
2212
 
2197
2213
  Turn OFF the 👍/👎 feedback controls under each rateable reply (AI or operator) — unset/`false` shows them (default). While
2198
- shown, a choice fires the [`messageFeedback`](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) event and is sent to the backend.
2214
+ shown, a choice fires the [`messageFeedback`](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) event and is sent to the backend.
2199
2215
 
2200
2216
  ```ts
2201
2217
  init({ behavior: { disableMessageFeedback: true } }); // hide the controls
@@ -2284,7 +2300,7 @@ init({
2284
2300
  });
2285
2301
  ```
2286
2302
 
2287
- Full key list: [i18n](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md#internationalization) or
2303
+ Full key list: [i18n](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md#internationalization) or
2288
2304
  `src/i18n/strings.ts` in the source.
2289
2305
 
2290
2306
  ---
@@ -2367,7 +2383,7 @@ init({
2367
2383
  });
2368
2384
  ```
2369
2385
 
2370
- For richer event handling, see [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md).
2386
+ For richer event handling, see [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md).
2371
2387
 
2372
2388
  ---
2373
2389
 
@@ -2403,7 +2419,7 @@ The widget itself does not include drafts in Help AI network requests before
2403
2419
  Send. Use an encrypted adapter when same-origin plaintext storage is not
2404
2420
  acceptable; an in-memory adapter disables reload restoration.
2405
2421
 
2406
- Full adapter contract: [Security & privacy § custom storage](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#custom-storage).
2422
+ Full adapter contract: [Security & privacy § custom storage](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#custom-storage).
2407
2423
 
2408
2424
  ---
2409
2425
 
@@ -2509,14 +2525,14 @@ const chat = init({
2509
2525
 
2510
2526
  ## Not covered here
2511
2527
 
2512
- - **Events** → [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md)
2513
- - **Theming deep-dive** → [Theming](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md)
2514
- - **Framework-specific wiring** → [Frameworks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md)
2528
+ - **Events** → [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md)
2529
+ - **Theming deep-dive** → [Theming](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md)
2530
+ - **Framework-specific wiring** → [Frameworks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md)
2515
2531
  - **Backend API** → Backend contract (internal)
2516
2532
 
2517
2533
  ---
2518
2534
 
2519
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/options.md -->
2535
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/options.md -->
2520
2536
 
2521
2537
  # Configuration — `ChatWidgetOptions`
2522
2538
 
@@ -2844,13 +2860,13 @@ Pass `footer: { poweredBy: { text: "" } }` to opt out of the brand attribution.
2844
2860
 
2845
2861
  ---
2846
2862
 
2847
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md -->
2863
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md -->
2848
2864
 
2849
2865
  # API reference
2850
2866
 
2851
2867
  Compact lookup for the SDK's exported functions, types, and events.
2852
- For explanations + examples, see the [Configuration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md)
2853
- and [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) guides.
2868
+ For explanations + examples, see the [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md)
2869
+ and [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) guides.
2854
2870
 
2855
2871
  ---
2856
2872
 
@@ -2900,7 +2916,7 @@ import {
2900
2916
  } from '@helpai/elements/react';
2901
2917
  ```
2902
2918
 
2903
- See [Frameworks → React](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md#react).
2919
+ See [Frameworks → React](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md#react).
2904
2920
 
2905
2921
  ---
2906
2922
 
@@ -2987,6 +3003,7 @@ interface ChatWidgetInstance {
2987
3003
 
2988
3004
  // Lifecycle
2989
3005
  reset(): void; // start over as a new anonymous visitor (on logout)
3006
+ login(userToken: UserTokenSource): void; // sign the visitor in as your logged-in user (a signed token, or a function returning one)
2990
3007
  destroy(): void;
2991
3008
 
2992
3009
  // Events
@@ -3013,7 +3030,7 @@ interface ChatWidgetInstance {
3013
3030
  ## `ChatWidgetOptions`
3014
3031
 
3015
3032
  The generated, schema-backed field reference is
3016
- [`docs/api/configuration.md`](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/options.md); it is authoritative.
3033
+ [`docs/api/configuration.md`](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/options.md); it is authoritative.
3017
3034
  The public input keeps embed identity, context, endpoint overrides, storage,
3018
3035
  and callbacks at the top level. Serializable widget settings use focused
3019
3036
  nested sections. `mount()` and `init()` require `aiAgentDeploymentId`; the
@@ -3053,7 +3070,7 @@ init({
3053
3070
  ```
3054
3071
 
3055
3072
  The complete type also exposes `features`, `forms`, `modules`, and `tracking`.
3056
- See [Configuration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) for behavior and examples.
3073
+ See [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) for behavior and examples.
3057
3074
 
3058
3075
  ### `ActionName`
3059
3076
 
@@ -3180,6 +3197,20 @@ visitor, their current conversation (draft and queued messages included), prefer
3180
3197
  `setUserContext`, then reconnects as a first visit. Listeners added with `on()` stay, and the handle keeps working.
3181
3198
  On `<web-ai-chat>`, also remove a `user-context` attribute you set.
3182
3199
 
3200
+ ### `login(userToken)`
3201
+
3202
+ Signs the visitor in as your logged-in user. `userToken` is a JWT your server signs with the deployment's secret key,
3203
+ or a function returning a fresh one (called again when the server rejects the current token as expired). The widget
3204
+ reconnects as that user: their conversations on this browser move to them, and they reach their conversations on any
3205
+ device where they're signed in. Call `reset()` when they sign out; switching to another user's token starts over the
3206
+ same way. Also `HelpAI('login', userToken)`, `element.login(userToken)` on `<web-ai-chat>` (not an attribute, so the
3207
+ token stays out of the DOM), the `userToken` option at `init()`, and `<HelpAI userToken={…} />`. Signing and the
3208
+ guarantees: [Security → Verified users](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#verified-users-usertoken).
3209
+
3210
+ ```ts
3211
+ chat.login(() => fetch('/api/help-ai-token').then((res) => res.text()));
3212
+ ```
3213
+
3183
3214
  ---
3184
3215
 
3185
3216
  ## Events
@@ -3257,7 +3288,7 @@ The auto-boot parser exposes the documented flat `data-*` subset.
3257
3288
  ></script>
3258
3289
  ```
3259
3290
 
3260
- Full attribute list: [Installation § script data attributes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md#attributes).
3291
+ Full attribute list: [Installation § script data attributes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/installation.md#attributes).
3261
3292
 
3262
3293
  `data-no-autoboot` — loads the bundle but doesn't auto-mount. For
3263
3294
  deferred init via JS.
@@ -3464,14 +3495,14 @@ Or use `/v1/` for the latest 1.x.x (auto-patches, no major breaks).
3464
3495
 
3465
3496
  ## See also
3466
3497
 
3467
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) — options with examples + context.
3468
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) — event handling deep-dive.
3469
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md) — copy-paste scenarios.
3470
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md) — when things go wrong.
3498
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) — options with examples + context.
3499
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) — event handling deep-dive.
3500
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md) — copy-paste scenarios.
3501
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/troubleshooting.md) — when things go wrong.
3471
3502
 
3472
3503
  ---
3473
3504
 
3474
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md -->
3505
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md -->
3475
3506
 
3476
3507
  # Events & lifecycle hooks
3477
3508
 
@@ -3945,21 +3976,21 @@ explicit `off()` is belt-and-suspenders. Either way works.
3945
3976
  | No events at all | `.on()` called before the instance was fully constructed. Use `init()`'s return value or a pre-boot hook |
3946
3977
  | Pre-boot hook never fires | Widget never mounted — check the public-key/deployment-id pair |
3947
3978
 
3948
- [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md) has the full diagnostic
3979
+ [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/troubleshooting.md) has the full diagnostic
3949
3980
  checklist.
3950
3981
 
3951
3982
  ---
3952
3983
 
3953
3984
  ## Next
3954
3985
 
3955
- - [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/analytics.md) — GA4, Mixpanel, Segment, Amplitude, PostHog, Sentry, multi-provider
3956
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md) — copy-paste scenarios
3957
- - [API reference § events](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md#events) — compact lookup
3958
- - [Configuration § callbacks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md#callbacks-shortcut-for-events)
3986
+ - [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/analytics.md) — GA4, Mixpanel, Segment, Amplitude, PostHog, Sentry, multi-provider
3987
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md) — copy-paste scenarios
3988
+ - [API reference § events](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md#events) — compact lookup
3989
+ - [Configuration § callbacks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md#callbacks-shortcut-for-events)
3959
3990
 
3960
3991
  ---
3961
3992
 
3962
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md -->
3993
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md -->
3963
3994
 
3964
3995
  # Theming & customization
3965
3996
 
@@ -4286,7 +4317,7 @@ init({
4286
4317
 
4287
4318
  ## Header actions
4288
4319
 
4289
- See [Configuration § Header actions](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md#header-actions)
4320
+ See [Configuration § Header actions](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md#header-actions)
4290
4321
  for the full semantics. Quick customization examples:
4291
4322
 
4292
4323
  ### Minimal chrome
@@ -4493,7 +4524,7 @@ are for what tokens don't cover (shadows, corners, borders).
4493
4524
 
4494
4525
  For truly bespoke designs (e.g., replacing the launcher with your
4495
4526
  own component), use `launcher.hidden: true` + custom trigger, or a
4496
- [no-script trigger](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md#no-script-triggers).
4527
+ [no-script trigger](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md#no-script-triggers).
4497
4528
 
4498
4529
  ---
4499
4530
 
@@ -4525,16 +4556,16 @@ can always override.
4525
4556
 
4526
4557
  ## Next
4527
4558
 
4528
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) — listening to chat
4559
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) — listening to chat
4529
4560
  interactions, integrating with analytics.
4530
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md) — copy-paste examples for common
4561
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md) — copy-paste examples for common
4531
4562
  customization scenarios.
4532
- - [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) — the full option
4563
+ - [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) — the full option
4533
4564
  table.
4534
4565
 
4535
4566
  ---
4536
4567
 
4537
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md -->
4568
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md -->
4538
4569
 
4539
4570
  # Recipes
4540
4571
 
@@ -5258,13 +5289,13 @@ brand accent set in the dashboard.
5258
5289
 
5259
5290
  ## Next
5260
5291
 
5261
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) — full event API
5262
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) — every option
5263
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md) — when things go wrong
5292
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) — full event API
5293
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) — every option
5294
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/troubleshooting.md) — when things go wrong
5264
5295
 
5265
5296
  ---
5266
5297
 
5267
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/analytics.md -->
5298
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/analytics.md -->
5268
5299
 
5269
5300
  # Analytics integration
5270
5301
 
@@ -5320,7 +5351,7 @@ event.
5320
5351
 
5321
5352
  Every interactive action emits one event with a typed payload. Subscribe
5322
5353
  via `chat.on(name, fn)` (instance) or `HelpAI.hook(widgetId, name, fn)`
5323
- (global, pre-boot-safe). Full schema in [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md).
5354
+ (global, pre-boot-safe). Full schema in [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md).
5324
5355
 
5325
5356
  | Category | Event | Payload |
5326
5357
  | ---------------- | --------------------- | -------------------------------------------------- |
@@ -5813,14 +5844,14 @@ yourself — see the snippets above.
5813
5844
 
5814
5845
  ## See also
5815
5846
 
5816
- - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) — full event reference, payload shapes, pre-boot queue semantics
5817
- - [API reference](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md) — `ChatWidgetInstance` shape
5818
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md) — other end-to-end snippets
5819
- - [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md) — what data flows where
5847
+ - [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) — full event reference, payload shapes, pre-boot queue semantics
5848
+ - [API reference](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md) — `ChatWidgetInstance` shape
5849
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md) — other end-to-end snippets
5850
+ - [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md) — what data flows where
5820
5851
 
5821
5852
  ---
5822
5853
 
5823
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md -->
5854
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md -->
5824
5855
 
5825
5856
  # Security & privacy
5826
5857
 
@@ -6012,7 +6043,7 @@ unsent text values in addition to identity and UI state, so adapter code owns
6012
6043
  their storage destination, retention, and privacy behavior. Use cases include
6013
6044
  encrypted `localStorage`, `sessionStorage`, and in-memory consent fallbacks.
6014
6045
 
6015
- [Recipes § Custom storage](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#custom-storage-adapter).
6046
+ [Recipes § Custom storage](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#custom-storage-adapter).
6016
6047
 
6017
6048
  ---
6018
6049
 
@@ -6164,7 +6195,8 @@ the pinned version URL (`/v1.2.0/`) supports SRI — the floating URL
6164
6195
  ## Authentication
6165
6196
 
6166
6197
  Browser access is scoped by `aiAgentDeploymentId`; a `publicKey` adds
6167
- workspace authorization. There is **no per-end-user token.**
6198
+ workspace authorization. Visitors are anonymous unless your server signs a
6199
+ [user token](#verified-users-usertoken) for your logged-in user.
6168
6200
 
6169
6201
  ### public key (default)
6170
6202
 
@@ -6189,6 +6221,64 @@ What your public key does NOT grant:
6189
6221
  Omit `publicKey` but keep `aiAgentDeploymentId`; the widget connects to
6190
6222
  that public deployment as a guest without an auth header.
6191
6223
 
6224
+ ### Verified users (`userToken`)
6225
+
6226
+ To show a logged-in user their own conversations on any device, and to let the AI rely on who they are, your
6227
+ server signs a short-lived JWT for them with the deployment's **secret key** (on the deployment's Install page;
6228
+ never put it in the browser):
6229
+
6230
+ | Claim | Required | What it is |
6231
+ | ------- | -------- | ---------------------------------------------------------- |
6232
+ | `sub` | yes | Your own id for the user (a string, up to 255 characters) |
6233
+ | `exp` | yes | Expiry, in seconds since the epoch; keep it short (1 hour) |
6234
+ | `name` | no | Their name, given to the AI as a verified fact |
6235
+ | `email` | no | Their email, given to the AI as a verified fact |
6236
+
6237
+ Sign it with HS256:
6238
+
6239
+ ```js
6240
+ // Node (jose)
6241
+ import { SignJWT } from 'jose';
6242
+
6243
+ const secret = new TextEncoder().encode(process.env.HELPAI_SECRET_KEY);
6244
+ const userToken = await new SignJWT({ name: user.name, email: user.email }).setProtectedHeader({ alg: 'HS256' }).setSubject(String(user.id)).setExpirationTime('1h').sign(secret);
6245
+ ```
6246
+
6247
+ ```python
6248
+ # Python (PyJWT)
6249
+ import os, time, jwt
6250
+
6251
+ user_token = jwt.encode({"sub": str(user.id), "exp": int(time.time()) + 3600, "name": user.name, "email": user.email}, os.environ["HELPAI_SECRET_KEY"], algorithm="HS256")
6252
+ ```
6253
+
6254
+ ```php
6255
+ // PHP (firebase/php-jwt)
6256
+ use Firebase\JWT\JWT;
6257
+
6258
+ $userToken = JWT::encode(['sub' => (string) $user->id, 'exp' => time() + 3600, 'name' => $user->name, 'email' => $user->email], getenv('HELPAI_SECRET_KEY'), 'HS256');
6259
+ ```
6260
+
6261
+ Serve it from an endpoint only your signed-in user can reach, and hand the widget a function that fetches it:
6262
+
6263
+ ```ts
6264
+ const userToken = () => fetch('/api/help-ai-token').then((res) => res.text());
6265
+
6266
+ init({ publicKey: 'agent_pk_...', aiAgentDeploymentId: '01900000-0000-7000-8000-000000000000', userToken }); // signed in at load
6267
+ chat.login(userToken); // or after your sign-in (`HelpAI('login', userToken)`, `<HelpAI userToken={userToken} />`)
6268
+ chat.reset(); // on sign-out (`HelpAI('reset')`)
6269
+ ```
6270
+
6271
+ - The widget sends the token only to the agent API, as the `x-user-token` header. The function is called when a token
6272
+ is first needed and again when the server answers `401 USER_TOKEN_INVALID` (expired or rejected); the request is
6273
+ then sent once more. A fixed string can't be refreshed, so an expired one fails until you call `login()` again.
6274
+ - A token the server can't verify is refused; it never falls back to an anonymous visitor.
6275
+ - Signing in moves the visitor's conversations on that browser to the user. From then on they reach them on any device
6276
+ where they're signed in, and nobody else does, the signed-out browser included.
6277
+ - Signing out (`reset()`, or dropping the token) or switching to another user starts over as a new visitor: nothing of
6278
+ the previous user stays in the browser.
6279
+ - Keep the function's identity stable for one user (a module function, or `useCallback` keyed on your user id): a
6280
+ different function counts as a different user.
6281
+
6192
6282
  ### user / page context is NOT auth
6193
6283
 
6194
6284
  ```ts
@@ -6230,13 +6320,13 @@ flowchart TB
6230
6320
  direction TB
6231
6321
  B1["Authenticates the HOST's agent deployment<br/>(NOT the end user)"]
6232
6322
  B2["Treats userContext / pageContext as<br/>informational + untrusted"]
6233
- B3["Never registers / authenticates end users"]
6323
+ B3["Never registers end users; verifies a signed userToken when the host sends one"]
6234
6324
  end
6235
6325
 
6236
6326
  Host -->|"context (untrusted)"| Widget
6237
6327
  Widget -->|"HTTPS/TLS + headers + context field"| Backend
6238
6328
 
6239
- note["publicKey + aiAgentDeploymentId auth the host's agent, NOT the end user — no end-user token anywhere."]
6329
+ note["publicKey + aiAgentDeploymentId auth the host's agent; only a userToken signed by the host's server identifies the end user."]
6240
6330
  Backend -.-> note
6241
6331
  ```
6242
6332
 
@@ -6254,6 +6344,8 @@ and anyone can base64url-decode it. Never put a secret in context.
6254
6344
 
6255
6345
  - **public keys** — rotate from the dashboard. Old keys are deactivated
6256
6346
  instantly; update your embeds.
6347
+ - **secret key** — user tokens signed with a replaced secret key stop verifying, so every verified user is signed out
6348
+ until your server signs new ones with the new key.
6257
6349
 
6258
6350
  ---
6259
6351
 
@@ -6400,7 +6492,7 @@ We respond within 24 hours and coordinate disclosure on your schedule.
6400
6492
 
6401
6493
  ---
6402
6494
 
6403
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/browser-support.md -->
6495
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/browser-support.md -->
6404
6496
 
6405
6497
  # Browser support
6406
6498
 
@@ -6707,7 +6799,7 @@ with:
6707
6799
 
6708
6800
  ---
6709
6801
 
6710
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md -->
6802
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/troubleshooting.md -->
6711
6803
 
6712
6804
  # Troubleshooting
6713
6805
 
@@ -6803,7 +6895,7 @@ for (const k of Object.keys(localStorage)) {
6803
6895
  3. **Any CSP errors in the console?** — `"Refused to connect to
6804
6896
  https://help.ai/api/agent because it violates the following Content
6805
6897
  Security Policy…"` means you need to add `help.ai` to your
6806
- `connect-src`. See [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#content-security-policy).
6898
+ `connect-src`. See [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#content-security-policy).
6807
6899
 
6808
6900
  ---
6809
6901
 
@@ -6886,7 +6978,7 @@ first.
6886
6978
  ### Symptom: widget ignores my CSS
6887
6979
 
6888
6980
  That's by design. The widget lives inside a shadow root — your page
6889
- CSS can't reach inside. Use the [theming options](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md)
6981
+ CSS can't reach inside. Use the [theming options](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md)
6890
6982
  instead.
6891
6983
 
6892
6984
  For advanced customization, override CSS custom properties on the
@@ -7151,7 +7243,7 @@ font-src 'self' https:;
7151
7243
  media-src 'self' blob:; # For voice recording
7152
7244
  ```
7153
7245
 
7154
- Full CSP guide: [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#content-security-policy).
7246
+ Full CSP guide: [Security § CSP](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#content-security-policy).
7155
7247
 
7156
7248
  ---
7157
7249
 
@@ -7216,7 +7308,7 @@ provide `i18n.availableLocales` and include `language` in `header.actions`.
7216
7308
 
7217
7309
  ## Getting more help
7218
7310
 
7219
- 1. **Read the [FAQ](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/faq.md)** — most common questions answered
7311
+ 1. **Read the [FAQ](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/faq.md)** — most common questions answered
7220
7312
  there.
7221
7313
 
7222
7314
  2. **Check our GitHub issues**: [github.com/help-ai/elements](https://github.com/help-ai/elements/issues).
@@ -7235,7 +7327,7 @@ provide `i18n.availableLocales` and include `language` in `header.actions`.
7235
7327
 
7236
7328
  ---
7237
7329
 
7238
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/faq.md -->
7330
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/faq.md -->
7239
7331
 
7240
7332
  # FAQ
7241
7333
 
@@ -7275,7 +7367,7 @@ own builds. Your public key gates the backend, not the frontend.
7275
7367
  ### What browsers are supported?
7276
7368
 
7277
7369
  Chrome/Edge 100+, Safari 15+, Firefox 100+, iOS Safari 15+. No IE11.
7278
- See [Browser support](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/browser-support.md).
7370
+ See [Browser support](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/browser-support.md).
7279
7371
 
7280
7372
  ---
7281
7373
 
@@ -7294,11 +7386,11 @@ yourself) and serve it from your CDN. Point your `<script src>` at your hosted
7294
7386
  URL. Self-hosting is also what unlocks **chunked delivery** (only changed code
7295
7387
  re-downloads across releases) behind a single stable URL the customer never has
7296
7388
  to change — see
7297
- [Caching, versioning & self-hosting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md#caching-versioning--self-hosting).
7389
+ [Caching, versioning & self-hosting](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/installation.md#caching-versioning--self-hosting).
7298
7390
 
7299
7391
  ### Can I use this with a tag manager (GTM)?
7300
7392
 
7301
- Yes. Use the async loader snippet ([Path B](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md#path-b--async-loader-snippet))
7393
+ Yes. Use the async loader snippet ([Path B](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/installation.md#path-b--async-loader-snippet))
7302
7394
  inside a Custom HTML tag. All `HelpAI(...)` calls queue until the
7303
7395
  bundle lands.
7304
7396
 
@@ -7306,7 +7398,7 @@ bundle lands.
7306
7398
 
7307
7399
  Yes — and there's an optional `presentation.iframe: true` flag that wraps the
7308
7400
  widget in its OWN iframe for extra isolation. See
7309
- [Configuration § presentation.iframe](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md#presentationiframe).
7401
+ [Configuration § presentation.iframe](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md#presentationiframe).
7310
7402
 
7311
7403
  ### Does it work in shadow DOM?
7312
7404
 
@@ -7316,15 +7408,15 @@ custom element on your page). Everything just works.
7316
7408
 
7317
7409
  ### Does it work with React / Next.js?
7318
7410
 
7319
- Yes. Full walkthrough: [Framework integrations § Next.js](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md#nextjs).
7411
+ Yes. Full walkthrough: [Framework integrations § Next.js](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md#nextjs).
7320
7412
 
7321
7413
  ### Does it work with Vue / Svelte / SolidJS / Angular?
7322
7414
 
7323
- Yes. See [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md).
7415
+ Yes. See [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md).
7324
7416
 
7325
7417
  ### Does it work with WordPress / Shopify / Webflow / Squarespace?
7326
7418
 
7327
- Yes. [Framework integrations § CMS](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md#wordpress).
7419
+ Yes. [Framework integrations § CMS](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md#wordpress).
7328
7420
 
7329
7421
  ---
7330
7422
 
@@ -7333,12 +7425,12 @@ Yes. [Framework integrations § CMS](https://cdn.help.ai/sdk/js/elements/1.9.0/d
7333
7425
  ### Can I change the launcher icon?
7334
7426
 
7335
7427
  Yes. Pick from presets (`chat`, `spark`, `message`, `help`, `wand`)
7336
- or pass raw SVG. See [Theming § Icons](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md#icons).
7428
+ or pass raw SVG. See [Theming § Icons](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md#icons).
7337
7429
 
7338
7430
  ### Can I match my brand colors?
7339
7431
 
7340
7432
  Yes. Set `theme.accent`, `theme.accentText`, `theme.radius`,
7341
- `theme.fontFamily`. See [Theming § Colors](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md#color-overrides).
7433
+ `theme.fontFamily`. See [Theming § Colors](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md#color-overrides).
7342
7434
 
7343
7435
  ### Can I change the font?
7344
7436
 
@@ -7348,7 +7440,7 @@ respects any CSS font stack you provide.
7348
7440
  ### Can I hide the launcher and open the widget from my own button?
7349
7441
 
7350
7442
  Yes. Set `launcher: { hidden: true }`, then call `chat.open()` from
7351
- your button's click handler. [Recipes § Custom launcher](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#custom-launcher-button).
7443
+ your button's click handler. [Recipes § Custom launcher](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#custom-launcher-button).
7352
7444
 
7353
7445
  ### Can I change the welcome message?
7354
7446
 
@@ -7357,24 +7449,24 @@ widget just renders what the backend sends.
7357
7449
 
7358
7450
  ### Can I override UI strings?
7359
7451
 
7360
- Yes, per-locale or flat. See [Theming § Strings](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md#strings-overrides).
7452
+ Yes, per-locale or flat. See [Theming § Strings](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md#strings-overrides).
7361
7453
 
7362
7454
  ### Can I have multiple widgets on one page?
7363
7455
 
7364
7456
  Yes — with distinct `widgetId` values. Each gets its own chat
7365
- thread, storage, and events. [Recipes § Multi-widget](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#multiple-widgets-on-one-page).
7457
+ thread, storage, and events. [Recipes § Multi-widget](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#multiple-widgets-on-one-page).
7366
7458
 
7367
7459
  ### Can I show the widget only on certain pages?
7368
7460
 
7369
7461
  Yes — just skip the `init()` call on pages where you don't want it.
7370
7462
  Or conditionally mount/unmount based on the URL.
7371
- [Recipes § Conditional show](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#conditionally-show-based-on-url).
7463
+ [Recipes § Conditional show](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#conditionally-show-based-on-url).
7372
7464
 
7373
7465
  ### Can I use it in a specific language?
7374
7466
 
7375
7467
  Yes. Force via `i18n.locale: 'fr-CA'`. Let users switch via
7376
7468
  `i18n.availableLocales: ['en', 'fr', 'es']`. Full details: [Theming §
7377
- Internationalization](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md#internationalization).
7469
+ Internationalization](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md#internationalization).
7378
7470
 
7379
7471
  ### Can I change the widget's position on mobile?
7380
7472
 
@@ -7411,7 +7503,7 @@ allowlisted event metadata through 1×1 pixel requests; it never sends message
7411
7503
  text or form values and can be disabled with `tracking.enabled: false`. GPC and
7412
7504
  DNT disable it automatically. No cookies or fingerprinting.
7413
7505
 
7414
- Full breakdown: [Security & privacy § data collected](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md#what-data-the-widget-collects).
7506
+ Full breakdown: [Security & privacy § data collected](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md#what-data-the-widget-collects).
7415
7507
 
7416
7508
  ### Does the widget use cookies?
7417
7509
 
@@ -7431,7 +7523,7 @@ Help AI API + your deployment's configured model provider.
7431
7523
  It stores data about identified users (when you pass `user.id`) or
7432
7524
  anonymous visitors. Your DPA (Data Processing Agreement) with Help
7433
7525
  AI covers the processing terms. For consent management, see
7434
- [Recipes § Gate behind consent](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#gate-the-widget-behind-consent).
7526
+ [Recipes § Gate behind consent](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#gate-the-widget-behind-consent).
7435
7527
 
7436
7528
  ### Can visitors delete their chat history?
7437
7529
 
@@ -7446,7 +7538,7 @@ Yes — pass a custom in-memory storage adapter. Adapter-managed identity,
7446
7538
  conversation, draft, preference, and UI state then evaporates on reload. The
7447
7539
  optional logger debug level is separate: calling `setDebug` persists
7448
7540
  `helpai.debug` directly in `localStorage` until the host clears it.
7449
- [Recipes § Custom storage adapter](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#custom-storage-adapter).
7541
+ [Recipes § Custom storage adapter](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#custom-storage-adapter).
7450
7542
 
7451
7543
  ### Does the widget track visitors across sites?
7452
7544
 
@@ -7471,7 +7563,7 @@ init({
7471
7563
  not an auth credential. Browser public access uses the matching
7472
7564
  `publicKey` + `aiAgentDeploymentId` pair, or the deployment ID alone for
7473
7565
  intentional guest mode.
7474
- See [Recipes § Logged-in user personalization](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#logged-in-user-personalization).
7566
+ See [Recipes § Logged-in user personalization](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#logged-in-user-personalization).
7475
7567
 
7476
7568
  ### How do I integrate with my analytics (GA / Segment / Mixpanel)?
7477
7569
 
@@ -7490,7 +7582,7 @@ One-line pre-boot hook forwards every event:
7490
7582
  </script>
7491
7583
  ```
7492
7584
 
7493
- Full examples: [Recipes § Analytics forwarding](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md#analytics-forwarding).
7585
+ Full examples: [Recipes § Analytics forwarding](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md#analytics-forwarding).
7494
7586
 
7495
7587
  ### How do I capture errors in Sentry / Datadog?
7496
7588
 
@@ -7675,7 +7767,7 @@ table.
7675
7767
 
7676
7768
  ---
7677
7769
 
7678
- <!-- https://cdn.help.ai/sdk/js/elements/1.9.0/docs/README.md -->
7770
+ <!-- https://cdn.help.ai/sdk/js/elements/1.10.0/docs/README.md -->
7679
7771
 
7680
7772
  # Help AI Elements — SDK Documentation
7681
7773
 
@@ -7704,7 +7796,7 @@ it → the panel opens → they can chat.
7704
7796
  Get the public key and deployment ID from [help.ai](https://help.ai) →
7705
7797
  **Dashboard → Deployments**.
7706
7798
 
7707
- [**Continue with the quickstart →**](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/quickstart.md)
7799
+ [**Continue with the quickstart →**](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/quickstart.md)
7708
7800
 
7709
7801
  ---
7710
7802
 
@@ -7712,19 +7804,19 @@ Get the public key and deployment ID from [help.ai](https://help.ai) →
7712
7804
 
7713
7805
  | You want to… | Read |
7714
7806
  | ----------------------------------------------------------- | --------------------------------------------- |
7715
- | Install the widget end-to-end | [**Quickstart**](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/quickstart.md) |
7716
- | See every install method (NPM, Web Component, React) | [Installation](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md) |
7717
- | Customize every option | [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md) |
7718
- | Match my brand colors and typography | [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md) |
7719
- | Send chat events to my analytics | [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/events-and-hooks.md) |
7720
- | Wire GA4 / Mixpanel / Segment / multi-provider | [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/analytics.md) |
7721
- | Integrate with Next.js / Vue / Svelte / WordPress / Shopify | [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/frameworks.md) |
7722
- | Copy a working example | [Recipes](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/recipes.md) |
7723
- | Diagnose "why isn't this working" | [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/troubleshooting.md) |
7724
- | Quick answer to a common question | [FAQ](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/faq.md) |
7725
- | Compact API reference for lookup | [API reference](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/api-reference.md) |
7726
- | Understand what data the widget sees | [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/security-privacy.md) |
7727
- | Check browser compatibility | [Browser support](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/browser-support.md) |
7807
+ | Install the widget end-to-end | [**Quickstart**](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/quickstart.md) |
7808
+ | See every install method (NPM, Web Component, React) | [Installation](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/installation.md) |
7809
+ | Customize every option | [Configuration reference](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md) |
7810
+ | Match my brand colors and typography | [Theming & customization](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md) |
7811
+ | Send chat events to my analytics | [Events & hooks](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/events-and-hooks.md) |
7812
+ | Wire GA4 / Mixpanel / Segment / multi-provider | [Analytics integration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/analytics.md) |
7813
+ | Integrate with Next.js / Vue / Svelte / WordPress / Shopify | [Framework integrations](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/frameworks.md) |
7814
+ | Copy a working example | [Recipes](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/recipes.md) |
7815
+ | Diagnose "why isn't this working" | [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/troubleshooting.md) |
7816
+ | Quick answer to a common question | [FAQ](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/faq.md) |
7817
+ | Compact API reference for lookup | [API reference](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/api-reference.md) |
7818
+ | Understand what data the widget sees | [Security & privacy](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/security-privacy.md) |
7819
+ | Check browser compatibility | [Browser support](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/browser-support.md) |
7728
7820
 
7729
7821
  ---
7730
7822
 
@@ -7786,7 +7878,7 @@ Five ways to install. Pick whichever fits your site:
7786
7878
  | **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'` |
7787
7879
 
7788
7880
  All five use the same underlying library. Same options, same events,
7789
- same behavior. Full comparison: [Installation](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/installation.md).
7881
+ same behavior. Full comparison: [Installation](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/installation.md).
7790
7882
 
7791
7883
  ---
7792
7884
 
@@ -7841,14 +7933,14 @@ fuller example showing the most common options in one place:
7841
7933
  </script>
7842
7934
  ```
7843
7935
 
7844
- Every option explained in [Configuration](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/configuration.md). Every
7845
- customization path in [Theming](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/theming.md).
7936
+ Every option explained in [Configuration](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/configuration.md). Every
7937
+ customization path in [Theming](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/theming.md).
7846
7938
 
7847
7939
  ---
7848
7940
 
7849
7941
  ## Support
7850
7942
 
7851
- - **Questions?** [FAQ](https://cdn.help.ai/sdk/js/elements/1.9.0/docs/faq.md) — common answers first. [support@help.ai](mailto:support@help.ai) for anything else.
7943
+ - **Questions?** [FAQ](https://cdn.help.ai/sdk/js/elements/1.10.0/docs/faq.md) — common answers first. [support@help.ai](mailto:support@help.ai) for anything else.
7852
7944
  - **Found a bug?** File an issue at [github.com/help-ai/elements](https://github.com/help-ai/elements/issues).
7853
7945
  - **Need a feature?** Same place — we read every request.
7854
7946
  - **Status page:** [help.ai/status](https://help.ai/status).