@burdenoff/website-sdk 2026.1104.3 → 2026.1105.1

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.
Files changed (48) hide show
  1. package/README.md +51 -6
  2. package/dist/avatar-live-view/index.d.mts +1 -1
  3. package/dist/avatar-live-view/index.d.ts +1 -1
  4. package/dist/avatar-live-view/index.js +482 -64
  5. package/dist/avatar-live-view/index.js.map +1 -1
  6. package/dist/avatar-live-view/index.mjs +476 -58
  7. package/dist/avatar-live-view/index.mjs.map +1 -1
  8. package/dist/avatar-mic/index.d.mts +193 -0
  9. package/dist/avatar-mic/index.d.ts +193 -0
  10. package/dist/avatar-mic/index.js +738 -0
  11. package/dist/avatar-mic/index.js.map +1 -0
  12. package/dist/avatar-mic/index.mjs +736 -0
  13. package/dist/avatar-mic/index.mjs.map +1 -0
  14. package/dist/{chunk-5JQGE3XI.mjs → chunk-7HE33NBS.mjs} +4 -111
  15. package/dist/chunk-7HE33NBS.mjs.map +1 -0
  16. package/dist/chunk-JZS6FQT6.mjs +127 -0
  17. package/dist/chunk-JZS6FQT6.mjs.map +1 -0
  18. package/dist/{chunk-22OT6E26.js → chunk-MBVXDFVC.js} +18 -127
  19. package/dist/chunk-MBVXDFVC.js.map +1 -0
  20. package/dist/{chunk-7MSB3EUI.mjs → chunk-MVNN6LLO.mjs} +4 -3
  21. package/dist/chunk-MVNN6LLO.mjs.map +1 -0
  22. package/dist/chunk-N7E6Z2GF.js +132 -0
  23. package/dist/chunk-N7E6Z2GF.js.map +1 -0
  24. package/dist/{chunk-WSEQ2I6I.js → chunk-XIZE37IB.js} +4 -3
  25. package/dist/chunk-XIZE37IB.js.map +1 -0
  26. package/dist/components/explore.d.mts +1 -1
  27. package/dist/components/explore.d.ts +1 -1
  28. package/dist/components/explore.js +20 -20
  29. package/dist/components/explore.mjs +2 -2
  30. package/dist/{explore-BV4dRwoC.d.ts → explore-Dfru4j4m.d.ts} +45 -31
  31. package/dist/{explore-avatar-live-config-DRpS-mqQ.d.ts → explore-avatar-live-config-C-OwXNje.d.ts} +8 -0
  32. package/dist/{explore-avatar-live-config-B6_p0q1c.d.mts → explore-avatar-live-config-OO0hvQCK.d.mts} +8 -0
  33. package/dist/{explore-BgEeGPvY.d.mts → explore-ei8uoko9.d.mts} +45 -31
  34. package/dist/index.d.mts +11 -6
  35. package/dist/index.d.ts +11 -6
  36. package/dist/index.js +70 -68
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +9 -6
  39. package/dist/index.mjs.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/chunk-22OT6E26.js.map +0 -1
  42. package/dist/chunk-5JQGE3XI.mjs.map +0 -1
  43. package/dist/chunk-7MSB3EUI.mjs.map +0 -1
  44. package/dist/chunk-O4GS3XPZ.js +0 -10
  45. package/dist/chunk-O4GS3XPZ.js.map +0 -1
  46. package/dist/chunk-TT3MHN42.mjs +0 -8
  47. package/dist/chunk-TT3MHN42.mjs.map +0 -1
  48. package/dist/chunk-WSEQ2I6I.js.map +0 -1
package/README.md CHANGED
@@ -63,8 +63,9 @@ in `tsup.config.ts`) and the package declares `"sideEffects": false`:
63
63
 
64
64
  The live-avatar guarantees are unchanged: `livekit-client` stays external to
65
65
  the `./avatar-live` entry alone, and the avatar's view remains a chunk of its
66
- own that only the root loads on demand (`scripts/validate-avatar-live.mjs`
67
- fails the build otherwise).
66
+ own that only the root loads on demand, as does the Avatar tab's mic, which
67
+ only the view loads (`scripts/validate-avatar-live.mjs` fails the build
68
+ otherwise).
68
69
 
69
70
  ## Quick Start
70
71
 
@@ -387,9 +388,38 @@ publishes audio, video or data, and it sends the avatar nothing to say.
387
388
  browser's own note of a session today, kept in `localStorage` as
388
389
  `boff.explore.avatarUsedOn`), the box asks ordinary questions, without
389
390
  `surface`, and the answer shows in the tab as text, with "Read the answer and
390
- sources in Chat". Pass `currentPath` to `ExplorePanel` (as
391
- `SiteAssistantDock` does) so a page change calls off a "Start when ready"
392
- at once; without it, the window's path is checked before the create.
391
+ sources in Chat". The text is the answer's words, not its markdown: the form
392
+ the chat's read-aloud says (`answerSpeechText`), so a link is its label, a
393
+ table its rows, and the marks of emphasis, headings and quotes go, and on
394
+ this screen list markers as well (each item keeps its own line); citation
395
+ markers such as `[1]` stay, as in the chat. Pass `currentPath` to
396
+ `ExplorePanel` (as `SiteAssistantDock` does) so a page change calls off a
397
+ "Start when ready" at once; without it, the window's path is checked before
398
+ the create.
399
+ - **A mic in the Avatar tab's box (BOFF-9797 Stage C, opt-in, dark).** With
400
+ `mic: true` on `avatar.live` (or `websiteAvatarLive({ …, mic: true })`; no
401
+ site sets it yet), the box gets a mic button beside Send, but only while the
402
+ last availability answer carries the gateway's mic offer (`stt: {token,
403
+ expiresAt}`, sent only while the gateway's website speech-to-text is on) and
404
+ the box takes the first question of a new chat. Tap to start, tap to stop,
405
+ thirty seconds at most (it stops by itself), with a recording dot, the time
406
+ against `0:30` and the words as they are recognised. The final text goes into
407
+ the box (after anything typed, within its 300 characters): the visitor
408
+ corrects it and presses Send. **Nothing is ever sent by itself.** The first
409
+ tap shows a mic notice of its own (versioned: the SDK shows and names
410
+ `web-mic-2026-11-05`, and the speech service takes a press only when that is
411
+ its `AVATAR_WEB_STT_NOTICE_VERSION`), then the browser's permission prompt; a
412
+ refused permission says so and the box stays for typing. The stream is the
413
+ gateway's `wss://…/api/web-avatar/v1/stt/stream` (subprotocols
414
+ `boff.web-stt.v1` and `offer.<token>`, `en-IN`, 16 kHz PCM); a refused
415
+ upgrade (4401) asks availability again and retries once. The microphone is
416
+ released on tap-stop, the limit, Stop, closing the panel, the Chat tab, a
417
+ hidden page, `pagehide`, the view going and any error. Its capture (ported
418
+ from fe-libs), stream and state machine are a chunk of their own,
419
+ `dist/avatar-mic/`, loaded from the view the first time the mic is used: a
420
+ site's main bundle and the view's chunk carry none of it. On alpha, a browser
421
+ WebSocket cannot carry Cloudflare Access service-token headers, so the
422
+ stream needs the Access cookie for the gateway host.
393
423
  - **One answer: the first, to a suggested question.** The avatar service
394
424
  accepts a conversation only when it holds exactly two messages: the first user
395
425
  message (a suggested question) and the first assistant answer, completed. The
@@ -421,7 +451,22 @@ publishes audio, video or data, and it sends the avatar nothing to say.
421
451
  back (Safari, iOS), a "Tap to turn on sound" button appears. A refusal (busy,
422
452
  limits, region, language, paused, a question the avatar cannot read) is one
423
453
  short sentence and "Continue in Chat". A network or CORS failure, or a route
424
- that is not there, shows the view as it was before.
454
+ that is not there, shows the view as it was before, until the create request
455
+ has been sent: from then on the server may have made the session, so a create
456
+ that gets no answer (its request failing on the way, its body cut off, or
457
+ nothing within 30 s) says "The live avatar couldn't start." with the way back
458
+ to Chat, never "Live avatar coming soon". The 30 s are a timer raced against
459
+ the request, so the view leaves "Connecting…" by then whatever the network
460
+ does. A create is never sent again by itself (the bot check's token is good
461
+ for one, and a second create could be paid twice), and a 201 that arrives
462
+ after the 30 s is never joined: its session is ended at once with its own
463
+ secret (reason `client_error`, or the visitor's own where they had stopped it
464
+ first). For that, only a request with no answer yet is aborted at 30 s: an
465
+ answer whose status is in by then is read to its end, so a 201 whose body is
466
+ still on its way keeps its secret. A request aborted with no answer at all
467
+ brings nothing back where the browser honours the abort, so a session the
468
+ server made for it is ended by the server's own deadlines (`no_show`). A 401,
469
+ 403, 404 or 405 answer is still the view as it was before.
425
470
  - **Ending.** Stop, closing the panel, leaving the page (`pagehide`), and the
426
471
  live avatar going off under a session (the panel's locale changing to one
427
472
  whose strings have not been reviewed) all end the session with a `keepalive`
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { E as ExplorePanelAvatarLive, a as ExploreLocale, A as AvatarConversation } from '../explore-avatar-live-config-B6_p0q1c.mjs';
3
+ import { E as ExplorePanelAvatarLive, a as ExploreLocale, A as AvatarConversation } from '../explore-avatar-live-config-OO0hvQCK.mjs';
4
4
  import '../types-CXqaLlNB.mjs';
5
5
  import '../use-explore-chat-CbfohA9O.mjs';
6
6
  import '../explore-types-Ol1Mm3dW.mjs';
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { E as ExplorePanelAvatarLive, a as ExploreLocale, A as AvatarConversation } from '../explore-avatar-live-config-DRpS-mqQ.js';
3
+ import { E as ExplorePanelAvatarLive, a as ExploreLocale, A as AvatarConversation } from '../explore-avatar-live-config-C-OwXNje.js';
4
4
  import '../types-CXqaLlNB.js';
5
5
  import '../use-explore-chat-B3dOOvJN.js';
6
6
  import '../explore-types-Ol1Mm3dW.js';