@saar-ai/web-widget 0.3.0 → 0.4.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.
@@ -0,0 +1,220 @@
1
+ /**
2
+ * PANEL GEOMETRY — where the conversation's first row sits, as a FRACTION of
3
+ * the panel's height, and what that costs horizontally.
4
+ *
5
+ * Four CSS length expressions and the arithmetic behind them, used by
6
+ * `concierge-shell.tsx`'s `transcriptEdgeFade`. Their own module, and NOT
7
+ * re-exported from `index.ts`: `concierge-shell.geometry.test.tsx` has to read
8
+ * the exact strings the component ships (jsdom's CSS serializer mangles a
9
+ * `max()` containing a subtraction, so reading them back off a rendered element
10
+ * tests jsdom rather than this widget), while the package's public API stays
11
+ * the components themselves.
12
+ *
13
+ * One ratio ties the four lengths together, and it is the whole
14
+ * repair for a bug that shipped: the panel is an ellipse (`rounded-full` on a
15
+ * `w x 1.6w` box), so how much width it offers depends entirely on how far down
16
+ * you are. The clearances below scaled with `cqh` while the transcript's
17
+ * horizontal inset was a fixed 8px tuned for the oval's wide middle, so the
18
+ * taller the panel got the HIGHER the first message sat proportionally — into a
19
+ * narrower part of the curve, with no matching inset. Measured live in
20
+ * Storybook, first agent bubble's top-left corner against the curve at its own
21
+ * top edge: 14px inside the ellipse at a 582px panel, 37px at 720px, 62px at
22
+ * 920px (the 2000x1150 desktop it was reported on). `overflow-clip` on the
23
+ * surface then cut exactly that much off the bubble.
24
+ *
25
+ * 0.1924 is not chosen, it is READ OFF the short panel: 112px (the tuned
26
+ * clearance, see {@link TRANSCRIPT_FADE_TOP_LEN}) over 582px (the panel a
27
+ * 375x812 phone renders) is 0.19244. Holding that ratio at every size is what
28
+ * makes the geometry scale-invariant — every panel then presents the first row
29
+ * at the same point on the same curve, and ONE horizontal inset serves all of
30
+ * them ({@link TRANSCRIPT_INSET_X}). Expressed as `19.24cqh` in the lengths
31
+ * below; `cqh` is the panel's own height, via `[container-type:size]` on the
32
+ * panel div (verified live: `14cqh` resolved to 128.8px on a 920px panel).
33
+ *
34
+ * Not a JS constant that gets multiplied out — the panel's height is never
35
+ * known to JS, only to CSS, which is why every length here is an expression.
36
+ */
37
+ /**
38
+ * Top ramp when the transcript starts at the panel's top, under the floating
39
+ * orb — it has to span the orb, so a message is gone before it reaches it
40
+ * rather than sliding out from behind it half-visible.
41
+ *
42
+ * A CSS length EXPRESSION, not a bare number, since the aspect-ratio panel
43
+ * (`w-[min(97vw,50dvh)]` + `aspect-[5/8]`) ranges from ~582px tall (mobile,
44
+ * width-bound) to 800px+ (desktop, height-bound) — a fixed 112px clearance
45
+ * tuned for the OLD fixed-520px panel left too little air under the orb on a
46
+ * tall one and too much on a short one. `max(112px, 19.24cqh)` is a floor, not
47
+ * a fixed value: it stays exactly 112px (today's tuned figure) on a short
48
+ * panel, where 19.24cqh would fall below it, and grows with `cqh` — the query
49
+ * container's own height, established by `[container-type:size]` on the
50
+ * panel div below — once the panel is tall enough that 19.24% of it exceeds
51
+ * 112px. `cqh` rather than `dvh` specifically: the panel's real rendered
52
+ * height, not the viewport's, since the panel does not always fill the
53
+ * viewport (mobile: width-bound, height is `w / (8/5)`, shorter than 100dvh).
54
+ *
55
+ * 19.24, not the 14 this shipped with: 14cqh gave a TALL panel proportionally
56
+ * LESS clearance than the 112px floor gives a short one (14% against 19.24%),
57
+ * which pushed the first message up into the narrowing part of the ellipse —
58
+ * see the ratio's own note above for the measurements. The floor and the
59
+ * scaling term now agree at 582px (19.24% of 582 = 111.98), so the two meet
60
+ * without a step rather than crossing over at some unrelated height.
61
+ */
62
+ export declare const TRANSCRIPT_FADE_TOP_LEN = "max(112px, 19.24cqh)";
63
+ /**
64
+ * Top ramp when a `badge` sits above the transcript.
65
+ *
66
+ * A badge has ALREADY pushed the transcript clear of the orb, so reusing the
67
+ * orb-sized ramp charges for the same clearance twice: it left a 112px dead
68
+ * band directly under the badge and dissolved the opening message for no
69
+ * reason (measured in `WithABadgeAndNoVoice` — orb ends 565, badge 573-598,
70
+ * first message could not start above 710). At that point the fade is only
71
+ * doing its ordinary job of softening a scroll edge, so it wants an ordinary
72
+ * scroll-edge length. Same floor+`cqh` scheme as {@link TRANSCRIPT_FADE_TOP_LEN}
73
+ * above and for the same reason — this ramp needs to soften proportionally
74
+ * more of a tall panel's scroll edge than a short one's.
75
+ *
76
+ * The third arm is the ellipse, and it is what keeps this variant honest at
77
+ * sizes the badge's own fixed offsets stop covering. With a badge the first row
78
+ * is pushed down by chrome that does NOT scale — 1px surface border + 6px
79
+ * column padding + the badge wrapper's `mt-[104px]` + 4px list padding = 115px
80
+ * — so the row lands at `(115px + this ramp) / panelHeight`, a fraction that
81
+ * SHRINKS as the panel grows. `19.24cqh - 115px` is that equation solved for
82
+ * the ramp, so the row lands on the same point of the curve the no-badge
83
+ * variant does. It is inert on the panels this variant was tuned against
84
+ * (negative at 582px, 4.5px at 720px, so the other two arms win) and takes over
85
+ * only above ~745px, where the fixed 115px has stopped being enough.
86
+ *
87
+ * The badge's own height is counted as ZERO in that 115px, deliberately:
88
+ * `badge` is an arbitrary node from the host (`voice-widget.tsx` passes a
89
+ * one-line status pill, ~26px), and only the shortest-badge bound holds for
90
+ * every caller. A taller badge pushes the row further down, which is the safe
91
+ * direction.
92
+ */
93
+ export declare const TRANSCRIPT_FADE_TOP_WITH_BADGE_LEN = "max(28px, 4cqh, 19.24cqh - 115px)";
94
+ export declare const TRANSCRIPT_FADE_BOTTOM_LEN = "max(118px, 20.27cqh)";
95
+ /**
96
+ * The transcript's horizontal inset — the width the ellipse actually costs.
97
+ *
98
+ * `10.6cqw` is where the curve is at the first row's height: on an ellipse of
99
+ * width `w`, at the fraction 0.1924 of the way down (the ratio the clearances
100
+ * above hold at every size), the left edge lies `w * (1 - sqrt(1 - (2*0.1924 -
101
+ * 1)^2)) / 2` = `0.1058 * w` in from the bounding box. Rounded up to 10.6% so
102
+ * the rounding goes toward clearance rather than away from it.
103
+ *
104
+ * `- 11px` because 11px of that is already paid for by fixed chrome outside
105
+ * this element: the surface's 1px border plus the inner column's `px-2.5`. The
106
+ * inset is measured from the PANEL's box, which is where the curve is; this
107
+ * padding only has to make up the difference. Verified live: a 363.8px-wide
108
+ * panel put the first bubble's left edge at 19px = 11px chrome + the 8px this
109
+ * replaces.
110
+ *
111
+ * The `8px` floor is the value this shipped with, kept as a lower bound so a
112
+ * degenerately small panel can never end up with less padding than a plain
113
+ * scroll edge wants. It is inert at every real size (the formula gives 27.6px
114
+ * on the smallest panel the widget renders).
115
+ *
116
+ * Symmetric on purpose, and applied as `padding-inline` so it stays symmetric
117
+ * in RTL: the ellipse is symmetric, the visitor's own bubbles are `justify-end`
118
+ * against the other side of it, and either side is the first row's side
119
+ * depending on who spoke.
120
+ */
121
+ export declare const TRANSCRIPT_INSET_X = "max(8px, 10.6cqw - 11px)";
122
+ /**
123
+ * How far above the panel's BOTTOM the composer's text input ends, as a
124
+ * fraction of panel height — the composer's answer to
125
+ * {@link TRANSCRIPT_FADE_TOP_LEN}'s 19.24cqh, and the number
126
+ * {@link COMPOSER_MAX_WIDTH_LEN} is derived from.
127
+ *
128
+ * Read off the short panel exactly as the transcript's ratio was: 69px (the
129
+ * input's bottom edge on a 582px panel today — 1px surface border + the
130
+ * overlay's 6px `bottom-1.5` + the 62px microphone block) over 582px is
131
+ * 0.11856. Holding THAT ratio at every panel size is the whole repair: the
132
+ * composer's offsets are plain pixels (6px, and a 40px input over a 62px
133
+ * microphone block), so on a taller panel they place the input a SMALLER
134
+ * fraction of the way up from the tip — further into the narrowing curve — and
135
+ * no fixed width can be correct at two sizes at once. Pinned, one `cqw`
136
+ * expression serves every panel.
137
+ *
138
+ * Exported for the geometry test, which needs the fraction itself rather than
139
+ * either length below.
140
+ */
141
+ export declare const COMPOSER_ROW_FRACTION = 0.1186;
142
+ /**
143
+ * The composer overlay's bottom offset when the microphone is drawn.
144
+ *
145
+ * `11.86cqh` is {@link COMPOSER_ROW_FRACTION} as a length. `- 63px` is
146
+ * everything between this offset and the input's bottom edge that does NOT
147
+ * scale: the surface's 1px border (the overlay is positioned against the inner
148
+ * column's padding box, one border inside the panel) plus the 62px microphone
149
+ * block — a 10px `gap-2.5`, the row's 4px `mt-1`, and a 48px `size-12` button.
150
+ *
151
+ * `max(6px, …)` keeps the 6px this shipped with as a floor, and the two arms
152
+ * MEET at the panel it was tuned on rather than crossing somewhere unrelated:
153
+ * `11.86cqh - 63px` is 6.03px at 582px, so a phone renders what it rendered
154
+ * before to a hundredth of a pixel and only larger panels lift the composer.
155
+ */
156
+ export declare const COMPOSER_BOTTOM_LEN = "max(6px, 11.86cqh - 63px)";
157
+ /**
158
+ * The composer overlay's bottom offset when there is NO microphone.
159
+ *
160
+ * Same target row, minus only the 1px surface border: with `voice` omitted the
161
+ * overlay's last child IS the input, so the 62px the microphone block
162
+ * contributed above has to come from this offset instead. That is a real move —
163
+ * 6px to 68px on a phone — and it is the fix rather than a side effect. Left at
164
+ * 6px the input sits 7px off a `rounded-full` panel's bottom tip, where the
165
+ * ellipse offers 79px of width in total; no width cap can rescue that row, so
166
+ * the row itself has to come up to where the panel is wide enough to hold it.
167
+ *
168
+ * The band it moves into is the one the microphone would have occupied, which
169
+ * the transcript already clears ({@link TRANSCRIPT_FADE_BOTTOM_LEN} is sized
170
+ * for the input + microphone pair regardless of whether the pair is drawn), so
171
+ * nothing above has to move to make room.
172
+ */
173
+ export declare const COMPOSER_BOTTOM_NO_VOICE_LEN = "max(6px, 11.86cqh - 1px)";
174
+ /**
175
+ * The composer's width cap — what the ellipse actually offers at that row.
176
+ *
177
+ * On an ellipse of width `w`, at the fraction `1 - 0.1186` of the way down, the
178
+ * full chord is `w * sqrt(1 - (2*0.8814 - 1)^2)` = `0.6465 * w`. So `64.65cqw`
179
+ * is not a taste-tuned percentage, it is the panel's own width at the row the
180
+ * two offsets above pin the input to — where `w-[71%]`, the class this caps,
181
+ * was 6.4% of the panel too wide at EVERY size (10.8px of overhang on a phone,
182
+ * 52.0px on a 920px panel, because the row also drifts lower as the panel
183
+ * grows).
184
+ *
185
+ * `- 10px` is clearance, 5px each side, matching the 5px the transcript's rows
186
+ * clear the curve by — the panel paints a 1.5px gradient ring plus a 1px
187
+ * surface border at that edge, and the input's own rounding means the arc, not
188
+ * the corner, is what approaches the curve.
189
+ *
190
+ * Applied as `max-width` over the existing `w-[71%]`, not in place of it: 71%
191
+ * stays the upper bound the composer had, and this only ever tightens it (the
192
+ * ellipse term is below 71% for any panel, since 0.6465 < 0.71). The `160px`
193
+ * floor is the "cap it sensibly" arm — it stops a degenerately small panel from
194
+ * resolving the composer to a few dozen pixels of unusable input, and it is
195
+ * inert at every size the widget really renders (it binds only below a 248px
196
+ * panel; the narrowest phone in circulation, 320px, gives 310px).
197
+ */
198
+ export declare const COMPOSER_MAX_WIDTH_LEN = "max(160px, 64.65cqw - 10px)";
199
+ /**
200
+ * The opaque ground the composer sits on, which has to keep covering it.
201
+ *
202
+ * The transcript runs the panel's whole height and passes BEHIND this row, so
203
+ * this gradient is the only thing between a message and the input's own
204
+ * translucent chip fill. It was a fixed `h-[132px]`, tuned when the composer
205
+ * was pinned 6px off the bottom on every panel — and the moment the offsets
206
+ * above start lifting the composer on a tall panel, a fixed ground stops
207
+ * reaching its top edge (the composer's top is `11.86cqh + 40px` above the
208
+ * panel's bottom: 109px at 582px, but 149px at 920px, against 132px of ground).
209
+ *
210
+ * 22.68cqh is the same read-off-the-short-panel derivation as everything else
211
+ * here — 132/582 = 0.22680 — so a phone renders exactly the 132px it rendered
212
+ * before and the ground grows with the row it is under. It stays above the
213
+ * composer's own top at every size, and stays the same shade taller than the
214
+ * transcript's bottom clearance that it is today ({@link
215
+ * TRANSCRIPT_FADE_BOTTOM_LEN} is 20.27cqh against this 22.68cqh, exactly the
216
+ * 118:132 relationship the two were tuned at), so they still meet without a
217
+ * seam or a band of doubly-darkened panel.
218
+ */
219
+ export declare const COMPOSER_GROUND_LEN = "max(132px, 22.68cqh)";
220
+ //# sourceMappingURL=transcript-geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcript-geometry.d.ts","sourceRoot":"","sources":["../src/transcript-geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAC9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,kCAAkC,sCAAsC,CAAC;AAiBtF,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAqB7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAC5C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4BAA4B,6BAA6B,CAAC;AACvE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AACpE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { VisitorEventCollector } from '@saar-ai/widget-bridge';
2
+ import type { WidgetChatReport } from '@saar-ai/widget-protocol/chat';
2
3
  import { type ConciergePosition } from './position.js';
3
4
  /**
4
5
  * Text chat transport for the end-user widget: boots a session, sends typed
@@ -72,6 +73,27 @@ import { type ConciergePosition } from './position.js';
72
73
  * surface, so the fake-able seam is `fetchImpl`, an ordinary parameter, not a
73
74
  * port interface.
74
75
  *
76
+ * ## The chat token rotates in place; the conversation does not
77
+ *
78
+ * A widget chat token lives 30 minutes, under a hard 12-hour absolute cap
79
+ * enforced server-side. A shopper who is still reading — or still on a voice
80
+ * call — when minute 30 arrives used to simply lose the session: every REST
81
+ * call started 401ing and the socket's next reconnect handshake was refused,
82
+ * with nothing on screen to say why. So this hook keeps ONE timer per session
83
+ * that re-mints the token shortly before it lapses (`POST /widget/refresh`,
84
+ * authenticated by the token it is replacing) and swaps the new one into every
85
+ * place the old one was held — `chatTokenRef` (the REST calls), `chatToken`
86
+ * (the React state `host-widget.tsx` threads into the voice token fetcher),
87
+ * the socket's `extraHeaders` object, and `collector.setSession`.
88
+ *
89
+ * Nothing about the conversation changes across a rotation: same
90
+ * `visitorSessionId`, same transcript, same socket. The token is a credential
91
+ * with an expiry, not an identity.
92
+ *
93
+ * Refreshing is DELIBERATELY gated on the tab being visible — see
94
+ * `handleRefreshDue` for the full reasoning and the one edge it knowingly
95
+ * leaves open.
96
+ *
75
97
  * ## "Optimistic" append, precisely
76
98
  *
77
99
  * The caller turn is appended to `turns` the moment `POST /widget/chat`
@@ -334,20 +356,51 @@ export interface UseChatSessionResult {
334
356
  * Send a turn.
335
357
  *
336
358
  * `silent: true` omits the CALLER bubble from this client's transcript while
337
- * still sending the message — for a nudge the UI issued on the shopper's
338
- * behalf rather than something they typed (today: "what goes with the thing
339
- * they just added?"). Rendering it as a shopper line would put words in
340
- * their mouth; suppressing it entirely would leave the reply answering a
341
- * question nobody can see, which is why the nudge is phrased so the ANSWER
342
- * stands on its own.
359
+ * still sending the message — for a message the UI issued on the shopper's
360
+ * behalf rather than something they typed. The message is still recorded
361
+ * server-side, so the operator's transcript and the model's context both
362
+ * show it; this hides it in one place, on purpose, and does not rewrite
363
+ * history.
343
364
  *
344
- * The message is still recorded server-side, so the operator's transcript
345
- * and the model's context both show it — this hides it in one place, on
346
- * purpose, and does not rewrite history.
365
+ * **It has no caller left in this package.** The add-to-cart nudge was the
366
+ * one, and it is a typed {@link UseChatSessionResult.sendReport} now — a
367
+ * report is not prose the shopper could have typed, which is the thing
368
+ * `silent` could never express. The option stays because this is a
369
+ * published package and removing it would break a host that composes its
370
+ * own nudges; do not reach for it for another storefront event, add a
371
+ * report kind instead.
347
372
  */
348
373
  readonly send: (text: string, options?: {
349
374
  silent?: boolean;
350
375
  }) => Promise<boolean>;
376
+ /**
377
+ * Report something the STOREFRONT did — today, a completed add-to-cart —
378
+ * so the concierge can answer with something that goes WITH the item.
379
+ *
380
+ * A sibling of `send`, not an option on it, because it is not a message:
381
+ * it carries typed fields (`@saar-ai/widget-protocol`'s
382
+ * `WidgetChatReportSchema`) on the chat request INSTEAD of shopper text,
383
+ * and the sentence the model reads is composed SERVER-side
384
+ * (`WidgetChatService.composeStorefrontReportText`).
385
+ *
386
+ * This replaced `send('Added <title> to cart', { silent: true })`, which
387
+ * had the shopper's own channel carry a sentence the shopper never typed:
388
+ * a shopper who typed those words got the same treatment, the synthetic
389
+ * line persisted as shopper prose in the operator's transcript, and the
390
+ * server matched it by exact wording, so any change to how a card renders
391
+ * a title broke it silently.
392
+ *
393
+ * ALWAYS silent — no caller bubble, ever; the shopper asked for nothing.
394
+ * The reply streams into an agent turn exactly as `send`'s does. Resolves
395
+ * `false` (never throws) with no session, while a turn is already
396
+ * streaming, or on any network/HTTP failure — a follow-up that did not
397
+ * land is not worth telling the shopper about.
398
+ *
399
+ * The report is client-asserted, exactly as the sentence it replaced was —
400
+ * see `WidgetChatInput.report`'s doc comment (`apps/api`) for why
401
+ * cross-verifying it server-side is deliberately out of scope.
402
+ */
403
+ readonly sendReport: (report: WidgetChatReport) => Promise<boolean>;
351
404
  /**
352
405
  * `POST /widget/event` with the session's chatToken. Resolves `false` (never
353
406
  * throws) with no session or on a network/HTTP failure — browsing telemetry
@@ -393,6 +446,30 @@ export interface UseChatSessionResult {
393
446
  * show the visitor.
394
447
  */
395
448
  readonly sendAttachment: (file: File, message?: string) => Promise<boolean>;
449
+ /**
450
+ * Record a handoff this hook could not have learned about itself — flips
451
+ * `status` to `'escalated'` and appends the handoff transcript event,
452
+ * exactly as the SSE `escalated` frame does.
453
+ *
454
+ * **The one caller is the VOICE leg.** A shopper who asks for a person out
455
+ * loud escalates on a transport this hook does not own: the worker writes
456
+ * `{ type: 'escalated' }` to the LiveKit data channel, `useVoiceSession`
457
+ * parses it into `widgetEvents`, and `ConciergeWidget` (`host-widget.tsx`)
458
+ * forwards it here. Without that hop the handoff was invisible to every
459
+ * consumer of `status` — the microphone gate, the attach control, the
460
+ * transcript marker — until the shopper ALSO typed something.
461
+ *
462
+ * **Safe to call from an effect.** Idempotent by construction: a call made
463
+ * when the conversation is already escalated appends no second marker (see
464
+ * `markHandoffToHuman`'s own guard) and sets `status` to the value it
465
+ * already holds, which React bails out of. Its identity is stable for the
466
+ * life of the hook, so an effect keyed on it fires on the EVENT and not on
467
+ * every render.
468
+ *
469
+ * It does not, and cannot, undo an escalation: nothing in this widget
470
+ * de-escalates a conversation. See `ChatStatus`.
471
+ */
472
+ readonly markHandoffToHuman: () => void;
396
473
  }
397
474
  /** What the collapsed widget shows, as the tenant configured it. */
398
475
  export interface WidgetLauncherConfig {
@@ -1 +1 @@
1
- {"version":3,"file":"use-chat-session.d.ts","sourceRoot":"","sources":["../src/use-chat-session.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGpE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAEtE;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,CAAC;AAEvF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qKAAqK;IACrK,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ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AAE,EACzD,UAAU,CAAC,EAAE,MAAM,EACnB,oBAAoB,CAAC,EAAE,MAAM,KAC1B,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzC;;;;;;;;;OASG;IACH,QAAQ,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5E;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,IAAI,CAAC;CACzC;AA+MD,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AA8GD,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,CAqgDnF"}
@@ -193,6 +193,16 @@ export interface VoiceSession {
193
193
  readonly state: BotState;
194
194
  readonly phase: VoicePhase;
195
195
  readonly micOpen: boolean;
196
+ /**
197
+ * The browser is being asked for the microphone right now — see
198
+ * `VoiceSessionSnapshot.micPending`, which this publishes verbatim.
199
+ *
200
+ * A consumer drawing "the call is not usable yet" wants `phase ===
201
+ * 'connecting' || micPending`, not `phase` alone: the room reports itself
202
+ * connected BEFORE the permission prompt opens, so `phase` on its own says
203
+ * a call is live while the caller is still looking at a browser dialog.
204
+ */
205
+ readonly micPending: boolean;
196
206
  readonly error: string | null;
197
207
  /** Timestamped account of the call, oldest first. */
198
208
  readonly events: readonly SessionLogEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"use-voice-session.d.ts","sourceRoot":"","sources":["../src/use-voice-session.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,K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AAwF;IACxF,KAAK,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;AAiBD,MAAM,WAAW,8BAA8B;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,0HAA0H;IAC1H,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CACnC;AAqGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,8BAA8B,GACtC,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAyBnD;AA4ED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,YAAY,CAiYlF"}
@@ -12,6 +12,23 @@ export interface VoiceSessionSnapshot {
12
12
  readonly phase: VoicePhase;
13
13
  /** The caller's microphone track is published to the room. */
14
14
  readonly micPublished: boolean;
15
+ /**
16
+ * The browser has been asked for the microphone and has not answered yet —
17
+ * `getUserMedia` is still resolving, which in practice means the permission
18
+ * prompt is sitting open in front of the caller.
19
+ *
20
+ * It exists because `phase` cannot express this: LiveKit reports the room
21
+ * CONNECTED before the microphone is ever requested, so the whole prompt
22
+ * window looks like a live call from the outside. Deliberately NARROWER
23
+ * than "the microphone is closed" — a caller who mutes mid-call is not
24
+ * publishing either, and nothing about that is pending.
25
+ *
26
+ * Only ever true between `start()`'s press and the browser's answer
27
+ * (granted or refused). It is not set for a mute/unmute toggle: by then the
28
+ * browser has already answered once, and a spinner on an unmute would be
29
+ * reporting a wait that is not happening.
30
+ */
31
+ readonly micPending: boolean;
15
32
  /** An agent participant is in the room. */
16
33
  readonly agentPresent: boolean;
17
34
  /** The agent's audio is active right now. */
@@ -1 +1 @@
1
- {"version":3,"file":"voice-session-state.d.ts","sourceRoot":"","sources":["../src/voice-session-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEzF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,kDAAkD;IAClD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,yEAAyE;IACzE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,aAAa,EAAE,oBAO3B,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB,GAAG,QAAQ,CAOpE"}
1
+ {"version":3,"file":"voice-session-state.d.ts","sourceRoot":"","sources":["../src/voice-session-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEzF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,kDAAkD;IAClD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,yEAAyE;IACzE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,aAAa,EAAE,oBAQ3B,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB,GAAG,QAAQ,CAOpE"}
@@ -164,6 +164,25 @@ export interface VoiceWidgetProps {
164
164
  * subtler than these phrases is the model's job via a real handoff event.
165
165
  */
166
166
  export declare function readsAsCheckoutIntent(text: string): boolean;
167
+ /**
168
+ * Does this thread, as it stands, want to check out?
169
+ *
170
+ * The shopper's MOST RECENT line, not "any line ever": once they carry on
171
+ * shopping past the summary the basket should get out of the way again, and a
172
+ * sticky flag would leave it wedged at the bottom of every later answer.
173
+ *
174
+ * There is exactly ONE of these because two consumers ask the same question
175
+ * of the same transcript and must never disagree about the answer:
176
+ * `VoiceWidget` below draws the basket from it, and `ConciergeWidget`
177
+ * (`host-widget.tsx`) re-reads the HOST's cart from it, so the basket the
178
+ * shopper is about to check out with is the one that exists now. Two copies
179
+ * of the same `reverse().find()` is how those two quietly drift apart.
180
+ *
181
+ * Takes only what it reads, so a caller with its own merged turn shape (which
182
+ * `ConciergeWidget` has — typed turns plus spoken lines plus rendered cards)
183
+ * can pass it without conversion.
184
+ */
185
+ export declare function checkoutIntentFromTurns(turns: readonly Pick<WidgetTurn, 'speaker' | 'text'>[]): boolean;
167
186
  /**
168
187
  * The end-user agent widget: a launcher bubble that expands into a conversation
169
188
  * with both a microphone and a text box.
@@ -1 +1 @@
1
- {"version":3,"file":"voice-widget.d.ts","sourceRoot":"","sources":["../src/voice-widget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA4IlF,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/C,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,sEAAsE;IACtE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,WAAW,CAA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