@genesislcap/ai-assistant 15.6.2 → 15.7.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.
Files changed (64) hide show
  1. package/dist/ai-assistant.api.json +391 -5
  2. package/dist/ai-assistant.d.ts +613 -6
  3. package/dist/chat-driver.cjs +285 -26
  4. package/dist/chat-driver.cjs.map +3 -3
  5. package/dist/chat-driver.mjs +285 -26
  6. package/dist/chat-driver.mjs.map +3 -3
  7. package/dist/custom-elements.json +254 -10
  8. package/dist/dts/channel/ai-activity-channel.d.ts +51 -1
  9. package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -1
  10. package/dist/dts/components/chat-driver/chat-driver.d.ts +99 -1
  11. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  12. package/dist/dts/components/chat-driver/chat-driver.test.d.ts.map +1 -1
  13. package/dist/dts/components/orchestrating-driver/orchestrating-driver.budget.test.d.ts +2 -0
  14. package/dist/dts/components/orchestrating-driver/orchestrating-driver.budget.test.d.ts.map +1 -0
  15. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +14 -0
  16. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  17. package/dist/dts/main/blocked-state.test.d.ts +2 -0
  18. package/dist/dts/main/blocked-state.test.d.ts.map +1 -0
  19. package/dist/dts/main/main.d.ts +394 -6
  20. package/dist/dts/main/main.d.ts.map +1 -1
  21. package/dist/dts/main/main.styles.d.ts.map +1 -1
  22. package/dist/dts/main/main.styles.test.d.ts +2 -0
  23. package/dist/dts/main/main.styles.test.d.ts.map +1 -0
  24. package/dist/dts/main/main.template.d.ts +53 -0
  25. package/dist/dts/main/main.template.d.ts.map +1 -1
  26. package/dist/dts/state/ai-assistant-slice.d.ts +162 -6
  27. package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
  28. package/dist/dts/state/debug-event-log.d.ts +6 -1
  29. package/dist/dts/state/debug-event-log.d.ts.map +1 -1
  30. package/dist/dts/state/session-store.d.ts +11 -0
  31. package/dist/dts/state/session-store.d.ts.map +1 -1
  32. package/dist/esm/components/chat-driver/chat-driver.js +263 -21
  33. package/dist/esm/components/chat-driver/chat-driver.test.js +464 -1
  34. package/dist/esm/components/orchestrating-driver/orchestrating-driver.budget.test.js +312 -0
  35. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +89 -4
  36. package/dist/esm/main/blocked-state.test.js +969 -0
  37. package/dist/esm/main/main.js +704 -16
  38. package/dist/esm/main/main.styles.js +47 -0
  39. package/dist/esm/main/main.styles.test.js +86 -0
  40. package/dist/esm/main/main.template.js +121 -4
  41. package/dist/esm/state/ai-assistant-slice.js +145 -7
  42. package/dist/esm/state/ai-assistant-slice.test.js +138 -1
  43. package/dist/esm/state/debug-event-log.js +7 -2
  44. package/dist/esm/state/debug-event-log.test.js +49 -1
  45. package/dist/esm/state/persistence/session-snapshot.test.js +18 -0
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/docs/migration-GENC-1464.md +562 -0
  48. package/docs/sub_agent.md +20 -3
  49. package/package.json +17 -17
  50. package/src/channel/ai-activity-channel.ts +56 -2
  51. package/src/components/chat-driver/chat-driver.test.ts +549 -0
  52. package/src/components/chat-driver/chat-driver.ts +324 -14
  53. package/src/components/orchestrating-driver/orchestrating-driver.budget.test.ts +438 -0
  54. package/src/components/orchestrating-driver/orchestrating-driver.ts +101 -6
  55. package/src/main/blocked-state.test.ts +1316 -0
  56. package/src/main/main.styles.test.ts +103 -0
  57. package/src/main/main.styles.ts +47 -0
  58. package/src/main/main.template.ts +131 -4
  59. package/src/main/main.ts +704 -10
  60. package/src/state/ai-assistant-slice.test.ts +215 -0
  61. package/src/state/ai-assistant-slice.ts +218 -8
  62. package/src/state/debug-event-log.test.ts +63 -0
  63. package/src/state/debug-event-log.ts +7 -2
  64. package/src/state/persistence/session-snapshot.test.ts +22 -0
@@ -1,4 +1,4 @@
1
- import type { AggregateUsage, AIProviderRegistryStatusEntry, ChatAttachment, ChatConfig, ChatInputDuringExecutionMode, ChatMessage } from '@genesislcap/foundation-ai';
1
+ import type { AggregateUsage, AIProviderRegistryStatusEntry, AIProviderType, ChatAttachment, ChatConfig, ChatDriverResult, ChatInputDuringExecutionMode, ChatMessage } from '@genesislcap/foundation-ai';
2
2
  import { AIProviderRegistry } from '@genesislcap/foundation-ai';
3
3
  import type { Modal } from '@genesislcap/rapid-design-system';
4
4
  import { GenesisElement } from '@genesislcap/web-core';
@@ -21,6 +21,23 @@ export declare const sparkleIconSvg = "<svg viewBox=\"0 0 24 24\" fill=\"none\"
21
21
  export declare const userIconSvg = "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" fill=\"currentColor\"/></svg>";
22
22
  /** Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark). */
23
23
  export declare const genesisIconSvg = "<svg viewBox=\"-4 0 30 26\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.7702 23.0437C18.7702 22.4675 18.8526 21.8089 19.0995 21.3149C19.3465 20.7386 19.6758 20.2447 20.0874 19.833C20.4991 19.4214 20.993 19.0921 21.5693 18.8451C22.1456 18.5982 22.7219 18.5158 23.2981 18.5158H25.9326V11.6828H19.1819V14.3172C19.1819 15.5521 18.6879 16.7047 17.8647 17.5279C17.0414 18.3512 15.8888 18.8451 14.7363 18.9275H6.7507V6.99025H16.4651V0.157227H3.54C2.63442 0.157227 1.72884 0.568855 1.07023 1.22746C0.411628 1.88606 0 2.79165 0 3.77955V22.2205C0 23.1261 0.411628 24.0316 1.07023 24.7726C1.72884 25.4312 2.63442 25.8428 3.54 25.8428H18.7702V23.0437Z\" fill=\"currentColor\"/></svg>";
24
+ /**
25
+ * Banner copy built from the figures a 402 actually reported, or `undefined`
26
+ * when the proxy sent none.
27
+ *
28
+ * `undefined` is the meaningful return, not a fallback: paired with the
29
+ * slice's "a re-latch without a reason keeps the existing explanation" rule, it
30
+ * makes a figureless driver latch leave a host-supplied reason intact rather
31
+ * than blanking it back to the default at the exact moment the wall is hit.
32
+ *
33
+ * Exported for the unit test that pins the formatting; not part of the element
34
+ * API.
35
+ *
36
+ * @internal
37
+ */
38
+ export declare function formatBlockedReason(budget?: Extract<ChatDriverResult, {
39
+ reason: 'done';
40
+ }>['budget'], vendor?: AIProviderType): string | undefined;
24
41
  /**
25
42
  * Foundation AI Assistant component.
26
43
  *
@@ -151,13 +168,22 @@ export declare class FoundationAiAssistant extends GenesisElement {
151
168
  get busy(): boolean;
152
169
  /**
153
170
  * True when a new send must be refused: a turn is running (`busy`), a page-reload
154
- * restore is loading history that would clobber it (`restoring`), or a manual
155
- * compaction is rewriting history (`compacting`). Mirrors the composer's
156
- * `?disabled` gate so a **programmatic** `send`/`submitMessage` (e.g. a host's
157
- * custom input while the built-in composer is hidden) can't slip past it and have
158
- * its message wiped when the restored/compacted history lands (GENC-1351 §6).
171
+ * restore is loading history that would clobber it (`restoring`), a manual
172
+ * compaction is rewriting history (`compacting`), or a backend condition has
173
+ * locked the assistant outright (`blocked` e.g. an exhausted AI budget).
174
+ * Mirrors the composer's `?disabled` gate so a **programmatic**
175
+ * `send`/`submitMessage` (e.g. a host's custom input while the built-in composer
176
+ * is hidden) can't slip past it and have its message wiped when the
177
+ * restored/compacted history lands (GENC-1351 §6).
159
178
  */
160
179
  private get sendBlocked();
180
+ /**
181
+ * Why a programmatic send was refused, for `submitMessage`'s `errors`. A
182
+ * backend block is called out distinctly because — unlike the transient
183
+ * "busy" cases — waiting and retrying will never clear it, and a caller
184
+ * looping on "Assistant is busy" would spin forever.
185
+ */
186
+ private sendRefusalReason;
161
187
  /**
162
188
  * Re-runs `agentsChanged` if the live `agents` array no longer matches the
163
189
  * fingerprint of the currently installed driver. Used to apply swaps that
@@ -228,6 +254,366 @@ export declare class FoundationAiAssistant extends GenesisElement {
228
254
  */
229
255
  get restoring(): boolean;
230
256
  set restoring(value: boolean);
257
+ /**
258
+ * Whether the assistant is blocked by a backend condition and cannot send —
259
+ * today, an exhausted AI-spend budget (GENC-1464). While true the composer is
260
+ * disabled, `send`/`submitMessage` refuse, suggestions stop being fetched, and
261
+ * a persistent banner (`part="blocked-banner"`) sits above the composer
262
+ * explaining why. The transcript stays visible and scrollable throughout —
263
+ * unlike `compacting` and `restoring`, this does not replace the conversation.
264
+ *
265
+ * **Latched.** Nothing in the element clears it: not a new turn, not "Clear"
266
+ * / "New chat", not a pop-in/out. It stays set until the host writes
267
+ * `false` — because nothing the user can do inside the assistant refills a
268
+ * budget. Hosts typically set it from their own pre-flight budget check on
269
+ * mount, and clear it once a later check shows headroom again.
270
+ *
271
+ * The driver also latches it automatically when a turn ends with the
272
+ * `'budget-exhausted'` failure reason — off the `tool-loop-end` activity bus
273
+ * (which also covers a sub-agent wall, a turn this element did not start, and
274
+ * an element swapped in mid-turn) and off the driver's return value (which
275
+ * covers a wall hit during multi-agent classification, where no tool loop ran
276
+ * and so no bus event fires). So a host that does no pre-flight at all still
277
+ * gets a correct locked UI the moment the first 402 lands. The bus topic is
278
+ * tab-scoped, so a wall hit in a popped-out window latches the main window
279
+ * too — correct for a shared spend cap.
280
+ *
281
+ * **Lifetime — read this before relying on it as your source of truth.** The
282
+ * latch is in-memory and per-`stateKey`:
283
+ *
284
+ * - It does **not** survive `switchSession`. Switching away tears the outgoing
285
+ * session's store down entirely, so switching back yields a fresh, unblocked
286
+ * store.
287
+ * - It does **not** survive a page reload. It is deliberately absent from the
288
+ * persisted session snapshot: the snapshot is long-lived, so a persisted
289
+ * latch would outlive an out-of-band budget raise with no in-element way to
290
+ * clear it — a stale lock is worse than re-deriving the state.
291
+ *
292
+ * The durable source of truth is therefore the **host's pre-flight**, which
293
+ * should run on mount and on every session switch. See
294
+ * `docs/migration-GENC-1464.md` §"How to adopt", Option B.
295
+ *
296
+ * @beta
297
+ */
298
+ get blocked(): boolean;
299
+ set blocked(value: boolean);
300
+ /**
301
+ * The distinct vendors the registry can currently reach, from the provider
302
+ * statuses this element already loads on connect and refreshes on every
303
+ * observable-registry change.
304
+ *
305
+ * This is the element's answer to "which vendor would the next turn use" — a
306
+ * question that has **no** correct answer and deliberately gets no API. The
307
+ * provider is resolved per turn AND per agent: `activeProviderInput` may be an
308
+ * async function of the turn's context, an orchestrated turn picks its agent
309
+ * with an LLM `classify()` call, and sub-agents resolve their own providers.
310
+ * Any pre-turn "peek" would therefore be a guess that is wrong precisely on the
311
+ * multi-agent hosts per-vendor budgets exist for.
312
+ *
313
+ * Asking instead which vendors are REACHABLE is answerable, synchronous, and
314
+ * free — and it is enough: the composer must stay live while any reachable
315
+ * vendor has headroom, and must lock when none does. It also makes vendor-switch
316
+ * recovery a derivation rather than a mutation: a host that swaps its registry
317
+ * to another vendor fires the observable, the statuses reload, the walled vendor
318
+ * drops out of this set, and `blocked` goes false with every latch left intact.
319
+ *
320
+ * @beta
321
+ */
322
+ get reachableVendors(): readonly AIProviderType[];
323
+ /**
324
+ * Vendors currently walled by the AI-spend budget, in the order they were
325
+ * walled. Empty for a host that never adopts the per-vendor API.
326
+ *
327
+ * May include a vendor this registry cannot reach — either because the registry
328
+ * moved on after the wall was latched, or because a 402's
329
+ * `otherVendorAvailable: false` walls every vendor the proxy meters (which is
330
+ * what that verdict is a statement about; see
331
+ * {@link FoundationAiAssistant.latchBlockedFrom}). Neither costs anything
332
+ * internally — {@link FoundationAiAssistant.blocked} asks only about the
333
+ * reachable set, and the banner reads the reachability-filtered
334
+ * {@link FoundationAiAssistant.relevantBlockedVendors} — but a host rendering
335
+ * this list itself should filter it against its own registry.
336
+ *
337
+ * Read-only on purpose: a settable array would let a host write a partial list
338
+ * and silently orphan the per-vendor banner copy.
339
+ * {@link FoundationAiAssistant.setVendorBlocked} is the write path.
340
+ *
341
+ * @beta
342
+ */
343
+ get blockedVendors(): readonly AIProviderType[];
344
+ /**
345
+ * Whether this specific vendor's budget is walled — regardless of whether any
346
+ * other vendor still has headroom.
347
+ *
348
+ * @beta
349
+ */
350
+ isVendorBlocked(vendor: AIProviderType): boolean;
351
+ /**
352
+ * Wall (or release) one vendor's budget, optionally with banner copy for it.
353
+ * The per-vendor mirror of {@link FoundationAiAssistant.setBlocked}.
354
+ *
355
+ * Walling a vendor does **not** on its own disable the composer: while another
356
+ * reachable vendor has headroom the assistant stays usable and the banner tells
357
+ * the user to switch. Only when every reachable vendor is walled does `blocked`
358
+ * become true.
359
+ *
360
+ * `reason` is composed into the banner sentence for that vendor, **however many
361
+ * vendors are walled** — see {@link FoundationAiAssistant.effectiveBlockedReason}.
362
+ * It is per-vendor copy, not a whole-banner override; {@link FoundationAiAssistant.blockedReason}
363
+ * is the override. Omitting it keeps whatever explanation that vendor already
364
+ * carried, so a driver latch landing after a host one cannot blank it.
365
+ *
366
+ * `'none'` is rejected with a warning rather than accepted: it is the "no
367
+ * provider configured" sentinel, not a vendor. Latching it would put the raw
368
+ * sentinel in the banner ("none's AI usage limit is reached") and could never
369
+ * be undone by derivation, because `'none'` never appears in
370
+ * {@link FoundationAiAssistant.reachableVendors} — so `blocked` could never
371
+ * become derivable from it either. Use {@link FoundationAiAssistant.setBlocked}
372
+ * for a vendor-agnostic block.
373
+ *
374
+ * @beta
375
+ */
376
+ /** Whether this vendor's wall came from the sweep alone — see the slice's `sweptVendors`. */
377
+ private isVendorSwept;
378
+ setVendorBlocked(vendor: AIProviderType, blocked: boolean, reason?: string | null): void;
379
+ /**
380
+ * The walled vendors the user can still be routed to — i.e.
381
+ * {@link FoundationAiAssistant.blockedVendors} narrowed to the reachable set,
382
+ * which is the only set the banner may name.
383
+ *
384
+ * A wall the registry can no longer reach is not news: it cannot be hit, and
385
+ * naming it puts a vendor in front of the user that is not theirs. The concrete
386
+ * failure this exists to stop: a host ships Anthropic-only, Anthropic walls, the
387
+ * host swaps its registry to Gemini, Gemini walls — and the banner reads "AI
388
+ * usage limits are reached for Anthropic and Gemini" to a user who has never
389
+ * had an Anthropic key. The spurious second name also flips the copy onto the
390
+ * plural branch, so even the closing sentence is wrong.
391
+ *
392
+ * When nothing is reachable YET (the statuses are still loading — the exact
393
+ * window the pre-flight and the cross-tab bus latch into), the fallback keeps
394
+ * every wall for LOCKING (`blocked` still derives true) but names only the
395
+ * vendors walled by a REFUSAL, dropping the ones the `otherVendorAvailable`
396
+ * sweep added. A refusal is a fact about a vendor this user just used; a sweep
397
+ * entry is the proxy's headroom verdict about a vendor the host may not even
398
+ * ship — naming it here reproduced the exact failure above from the other
399
+ * direction ("Gemini's AI usage limit is reached" to an Anthropic-only user),
400
+ * and flipped the copy onto the plural branch with it. Self-corrects when the
401
+ * statuses land: from then on reachability, not provenance, decides.
402
+ *
403
+ * @internal
404
+ */
405
+ private get relevantBlockedVendors();
406
+ /**
407
+ * Whether the blocked banner has anything to say — a vendor-agnostic block, OR
408
+ * at least one walled vendor the registry can still reach. Broader than
409
+ * {@link FoundationAiAssistant.blocked} on purpose: partial exhaustion leaves
410
+ * the composer live but still needs to be announced, because the next turn may
411
+ * route to the walled vendor and fail.
412
+ *
413
+ * Reads the reachability-filtered list for the same reason the copy does — a
414
+ * host that has swapped its registry away from the walled vendor has nothing
415
+ * left to announce, and would otherwise get a banner that falls through to the
416
+ * generic default copy over a perfectly usable composer.
417
+ *
418
+ * @internal
419
+ */
420
+ get bannerVisible(): boolean;
421
+ /**
422
+ * Whether a suggestions fetch would hit a wall.
423
+ *
424
+ * Unlike a chat turn, this one CAN be resolved exactly: both suggestion paths
425
+ * go to the registry **default** and never to a per-agent override
426
+ * (`ChatDriver.getSuggestions` calls `providerRegistry.default()`, and
427
+ * `OrchestratingDriver.getSuggestions` just delegates to it). So the vendor a
428
+ * suggestions call would use is knowable, and this is the one place in the
429
+ * feature where that is true.
430
+ *
431
+ * Same rationale as the guard it replaces: a doomed suggestions call burns a
432
+ * `suggestions.failed` meta event and parks a raw transport error in
433
+ * `suggestionsState` for hosts to find.
434
+ *
435
+ * @internal
436
+ */
437
+ get suggestionsBlocked(): boolean;
438
+ /**
439
+ * Explanation shown in the blocked banner, or `null` for the element's default
440
+ * copy. Only meaningful while {@link FoundationAiAssistant.blocked} is true;
441
+ * setting `blocked = false` clears it.
442
+ *
443
+ * Writable, and symmetric with every other store-backed accessor on this
444
+ * class: writing it re-latches with the CURRENT `blocked` value, so it changes
445
+ * the copy without disturbing the flag. Assigning `null` clears the
446
+ * explanation while staying blocked (the banner falls back to the default
447
+ * copy). {@link FoundationAiAssistant.setBlocked} remains the way to write
448
+ * both in one atomic action.
449
+ *
450
+ * @beta
451
+ */
452
+ get blockedReason(): string | null;
453
+ set blockedReason(value: string | null);
454
+ /**
455
+ * Latch the backend block off a turn outcome. The single decision point for
456
+ * both latch sites (the `tool-loop-end` bus subscription and `send()`'s
457
+ * return-value check), so the rule cannot diverge between them.
458
+ *
459
+ * Idempotent and one-way **per vendor**: it never unblocks, and it never
460
+ * re-writes an existing wall. That guard is load-bearing, not just an
461
+ * optimisation — the bus fires from the driver's `finally`, i.e. BEFORE
462
+ * `sendMessage()` resolves, so a host subscribed to `tool-loop-end` (what the
463
+ * migration guide's Option C recommends) sets its own detailed reason and the
464
+ * return-value latch would otherwise land a moment later and blank it.
465
+ *
466
+ * The guard being per-vendor rather than global is the whole difference. A
467
+ * single global "already blocked, do nothing" would swallow a second vendor's
468
+ * wall — so a session walled on Anthropic could never record that Gemini went
469
+ * too, and under a mixed registry an Anthropic-only wall would lock a composer
470
+ * that Gemini could still serve.
471
+ *
472
+ * **Which field is authoritative**, in order:
473
+ *
474
+ * 1. `budget.vendorLabel` — stamped by the transport that was actually refused,
475
+ * so it can never be stale. But it is a static per-transport string, so a
476
+ * white-labelled or multiplexing gateway fronting several upstreams leaves
477
+ * it unclaimed by any vendor.
478
+ * 2. `budget.vendor` — which the driver resolved from the label where it could,
479
+ * and otherwise from the proxy's own `vendor` field on the 402. It is
480
+ * therefore NOT simply `vendorLabel` normalised, and the two can disagree;
481
+ * that fallback is the only attribution on offer for the gateway case above.
482
+ * 3. `vendorHint` — the bus detail's top-level vendor, i.e. the driver's
483
+ * last-resolved provider. Last resort because it CAN be stale: an
484
+ * orchestrated turn classifies against the registry default, a provider the
485
+ * chat driver may never have resolved, so its last-resolved provider there is
486
+ * the previous turn's vendor or nothing at all.
487
+ *
488
+ * A wall that names no recognised vendor falls back to the vendor-agnostic
489
+ * block — fail-safe, and identical to the pre-per-vendor behaviour.
490
+ *
491
+ * **`otherVendorAvailable: false` is server-known truth and outranks every
492
+ * inference made here.** The proxy meters the pots, so only it can say whether
493
+ * anything else has headroom; this element can only observe which vendors the
494
+ * registry can REACH, which says nothing about their remaining spend. So when
495
+ * the proxy says no, every other *budgeted* vendor is walled in the same pass.
496
+ * That is what makes `blocked` derive true — locking the composer on the first
497
+ * response instead of after a second doomed turn — and what empties the "free"
498
+ * set the banner would otherwise have advised switching to.
499
+ *
500
+ * The sweep runs over `BUDGETED_VENDORS`, deliberately **not** over
501
+ * {@link FoundationAiAssistant.reachableVendors}. Reachability is loaded
502
+ * asynchronously (`activateSession` kicks off `loadProviderStatuses()` and does
503
+ * not await it), so a wall landing before the statuses resolve would have swept
504
+ * an empty set — silently discarding the one fact on the 402 the client cannot
505
+ * re-derive, with nothing to re-run it when the statuses arrived. Worse, it let
506
+ * the verdict effectively un-latch: the single wall derived `blocked` only
507
+ * while the reachable set was empty, so the moment the statuses landed the
508
+ * composer came back to life against a budget the proxy had already said was
509
+ * gone. Sweeping the metered vendor list instead makes the verdict independent
510
+ * of load order and of registry membership, which is exactly what it is: a
511
+ * statement about the proxy's pots, not about this user's registry.
512
+ *
513
+ * Walling a vendor the registry cannot reach costs nothing: `blocked` only asks
514
+ * whether every REACHABLE vendor is walled, and the banner reads
515
+ * {@link FoundationAiAssistant.relevantBlockedVendors}, which filters the walls
516
+ * back down to the reachable set before naming any of them.
517
+ *
518
+ * One boundary remains on the sweep: it walls only vendors the proxy meters,
519
+ * enforced structurally by iterating `BUDGETED_VENDORS` itself rather than
520
+ * filtering a wider set through a predicate. Chrome runs on-device with no pot
521
+ * to exhaust, so "no other vendor has budget" is not a statement about it, and
522
+ * "Switch to Chrome to keep going." stays honest advice.
523
+ *
524
+ * The sweep runs last but sits OUTSIDE the per-vendor idempotence guard, and
525
+ * both halves of that matter. Last, so the vendor that actually refused this
526
+ * turn heads the wall order the multi-vendor banner reads. Outside the guard,
527
+ * because the verdict can arrive on a LATER 402 for a vendor that is already
528
+ * walled — turn 1 walls Anthropic while Gemini still has headroom, turn 2 walls
529
+ * it again and reports that Gemini has since gone too — and an early return
530
+ * would drop exactly the news the second turn was there to deliver.
531
+ *
532
+ * @param reason - the turn's failure reason; anything but `'budget-exhausted'` is ignored.
533
+ * @param ref - session store to write through; defaults to the live one. `send()`
534
+ * passes the ref it captured before its awaits, since a lifecycle event during the
535
+ * turn may already have cleared `_sessionRef`.
536
+ * @param budget - what the 402 reported: figures when the proxy sent any, the
537
+ * refusing vendor, and its `otherVendorAvailable` verdict.
538
+ * @param vendorHint - the `tool-loop-end` detail's top-level vendor, used only
539
+ * when the budget payload names none.
540
+ *
541
+ * @internal
542
+ */
543
+ private latchBlockedFrom;
544
+ /**
545
+ * Block or unblock the assistant, optionally with custom banner copy.
546
+ * Equivalent to the {@link FoundationAiAssistant.blocked} setter, plus the
547
+ * reason in one atomic write.
548
+ *
549
+ * Blocking writes the **vendor-agnostic** block — what a host with one budget
550
+ * pot means — and does not populate
551
+ * {@link FoundationAiAssistant.blockedVendors}. Unblocking clears the
552
+ * per-vendor walls as well, so a host asserting "the wall is gone" after its
553
+ * own pre-flight cannot be silently overruled by a driver latch it never saw.
554
+ *
555
+ * @beta
556
+ */
557
+ setBlocked(blocked: boolean, reason?: string | null): void;
558
+ /**
559
+ * Copy shown in the blocked banner, in ascending specificity:
560
+ *
561
+ * 1. the host's `blockedReason` — a whole-banner override, unchanged;
562
+ * 2. copy composed from the walled vendors (their per-vendor reasons when set,
563
+ * otherwise their names) plus the action that is actually available;
564
+ * 3. the default budget-exhaustion message.
565
+ *
566
+ * The action clause is computed here rather than stored, because whether
567
+ * "switch vendor" or "contact your administrator" is honest depends on whether
568
+ * another reachable vendor still has headroom — which changes when the registry
569
+ * changes, long after the wall was latched. Telling a user to switch to a
570
+ * vendor that is also exhausted is worse than saying nothing.
571
+ *
572
+ * The `free` set is a client-side inference — "reachable and not known to be
573
+ * walled" — and it is only ever allowed to be one. Where the proxy has told us
574
+ * otherwise (`otherVendorAvailable: false`) the latch has already walled those
575
+ * vendors, so they are not in `free` here and no "switch to X" clause can be
576
+ * composed from them. Both lists are filtered by reachability, so the copy
577
+ * names only vendors this user's registry can actually route to.
578
+ *
579
+ * **Per-vendor copy is composed however many vendors are walled**, which is
580
+ * what {@link FoundationAiAssistant.setVendorBlocked} and
581
+ * `docs/migration-GENC-1464.md` both promise. It previously reached only the
582
+ * single-vendor branch, so a host that had carefully set copy for each of its
583
+ * vendors watched all of it vanish the moment a second one walled — replaced by
584
+ * generic copy, at the exact moment the situation got worse.
585
+ *
586
+ * The compact "AI usage limits are reached for A and B." list is kept for the
587
+ * case it was written for: NO walled vendor carries copy, so a statement per
588
+ * vendor would just repeat one boilerplate sentence per name. As soon as any of
589
+ * them does carry copy, the branch lists one statement per vendor instead —
590
+ * falling back to that same boilerplate for the ones that have none, so the
591
+ * sentence set stays complete rather than silently naming a subset.
592
+ *
593
+ * @internal
594
+ */
595
+ get effectiveBlockedReason(): string;
596
+ /**
597
+ * Copy the driver writes into the TRANSCRIPT when a turn hits the budget wall.
598
+ *
599
+ * A host-set `blockedReason` still wins, so a white-labelled host does not read
600
+ * its own explanation in the banner and the shipped default directly below it —
601
+ * that is the whole reason the driver takes this at all.
602
+ *
603
+ * What it deliberately is NOT is
604
+ * {@link FoundationAiAssistant.effectiveBlockedReason}. That getter
605
+ * composes advice — `"…Switch to Gemini to keep going."` — which is true only
606
+ * while that vendor has headroom, and the transcript is a permanent record. The
607
+ * driver reads this once at CONSTRUCTION, and `getOrCreateDriver` keys on the
608
+ * agents list, so an agents swap *after* a wall re-runs `createDriver` and would
609
+ * freeze that sentence into every later turn's bubble. Reading the latch's own
610
+ * copy instead is structurally incapable of carrying the advice: the only
611
+ * writer of `blockedReason` is the vendor-agnostic branch of
612
+ * `latchBlockedFrom`, whose `formatBlockedReason(budget)` form has no switch
613
+ * clause. Per-vendor copy lives in `blockedVendorReasons` and reaches the
614
+ * banner alone.
615
+ */
616
+ private get transcriptBudgetExhaustedMessage();
231
617
  /**
232
618
  * Name of the agent the user has pinned via the agent picker. `null` means
233
619
  * automatic routing (Auto). Persisted on the session store, so it survives
@@ -472,6 +858,8 @@ export declare class FoundationAiAssistant extends GenesisElement {
472
858
  private driverCleanup?;
473
859
  private loadingTimer;
474
860
  private unsubBus?;
861
+ /** Unsubscribe handle for the `tool-loop-end` budget latch (GENC-1464). */
862
+ private _unsubBudgetLatch?;
475
863
  /** Unsubscribe handle for the provider-registry change listener (observable registries only). */
476
864
  private unsubProviderRegistry?;
477
865
  /** Unsubscribe handle for {@link (AssistantAppSettingsProvider:interface).subscribe}. */
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC7B,cAAc,EACd,UAAU,EACV,4BAA4B,EAC5B,WAAW,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAkC,MAAM,4BAA4B,CAAC;AAGhG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAIL,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAc/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,4BAA4B,EAC5B,KAAK,2BAA2B,EAChC,KAAK,0BAA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;;;OAoBG;IACG,aAAa,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;YA0C7E,gBAAgB;IA6E9B;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB,CAAC,CAAS;YAEtB,IAAI;IA6DlB,qBAAqB,CAAC,CAAC,EAAE,UAAU;IAYnC,0BAA0B,CAAC,CAAC,EAAE,KAAK;IASnC;;;;;;OAMG;IACH,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAI5E;iFAC6E;IAC7E,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED;;;iCAG6B;IAC7B,IAAI,mBAAmB,IAAI,MAAM,CAIhC;IAED;iEAC6D;IAC7D,qBAAqB,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI;IAoB5C;;;qDAGiD;IACjD,oBAAoB,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI;IAS3C,yDAAyD;IACzD,mBAAmB,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI;CAI3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAmxBA,eAAO,MAAM,MAAM,iDAGlB,CAAC"}
1
+ {"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAk0BA,eAAO,MAAM,MAAM,iDAGlB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=main.styles.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.styles.test.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.test.ts"],"names":[],"mappings":""}
@@ -16,6 +16,59 @@
16
16
  */
17
17
  import { ViewTemplate } from '@genesislcap/web-core';
18
18
  import type { FoundationAiAssistant } from './main';
19
+ /**
20
+ * Class list for the banner below, joined rather than interpolated so an
21
+ * inapplicable modifier contributes nothing. Two interpolations directly in the
22
+ * attribute emitted `class="blocked-banner "` in the common (unblocked) case —
23
+ * harmless to the browser, but it shows up in every DOM snapshot and every
24
+ * innerHTML assertion a host writes against this element.
25
+ *
26
+ * The two modifiers name what they actually gate, which is why neither is
27
+ * `is-blocked`: `is-visible` means the banner has something to say, and that
28
+ * includes PARTIAL exhaustion — one vendor walled, composer still live, `blocked`
29
+ * false. `is-partial` then softens the treatment for exactly that case. Naming
30
+ * the first after `blocked` read as a contradiction beside the second, and made
31
+ * the styles say `.blocked-banner.is-blocked` to mean "visible".
32
+ *
33
+ * Exported for the unit test that pins the attribute; not part of the element
34
+ * API.
35
+ *
36
+ * @internal
37
+ */
38
+ export declare const blockedBannerClasses: (x: FoundationAiAssistant) => string;
39
+ /**
40
+ * Id of the blocked banner, referenced by the composer controls'
41
+ * `aria-describedby`. Shadow-DOM-scoped, so a fixed string cannot collide with
42
+ * the host page — and IDREF resolution is same-root, which is exactly where both
43
+ * ends of this reference live.
44
+ *
45
+ * @internal
46
+ */
47
+ export declare const BLOCKED_BANNER_ID = "blocked-banner";
48
+ /**
49
+ * `aria-describedby` for the composer's textarea, send button and attach button:
50
+ * the banner's id whenever the banner has something to say, otherwise `null` (so
51
+ * the attribute is omitted rather than emitted empty).
52
+ *
53
+ * Keyed on `bannerVisible`, NOT on `blocked`, and that is the point. The
54
+ * PARTIAL state — some vendor walled, composer still live — is the state this
55
+ * feature exists to create, and it was the one state with no accessible
56
+ * explanation at all: `aria-disabled` and `aria-label` bind only on `blocked`, and
57
+ * a live composer keeps the host's own placeholder, so a screen-reader user
58
+ * arriving at the textarea heard "Type a message" with no hint that the next turn
59
+ * might be refused. The banner's `role="status"` announces the text when it
60
+ * CHANGES; this is what makes the same explanation reachable afterwards, on
61
+ * demand, from the control it is about.
62
+ *
63
+ * Applied in the fully blocked state too, where it is additive: the `aria-label`
64
+ * there states the reason as the control's name, and this restates it as its
65
+ * description for the send/attach buttons, which carry neither.
66
+ *
67
+ * Exported for the unit test that pins it; not part of the element API.
68
+ *
69
+ * @internal
70
+ */
71
+ export declare const composerDescribedBy: (x: FoundationAiAssistant) => string | null;
19
72
  /** @internal */
20
73
  export declare const FoundationAiAssistantTemplate: (designSystemPrefix: string) => ViewTemplate<FoundationAiAssistant>;
21
74
  //# sourceMappingURL=main.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AA2PpD,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,GACxC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAygBpC,CAAC"}
1
+ {"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAyPpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAAI,GAAG,qBAAqB,KAAG,MAOlD,CAAC;AAEf;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,qBAAqB,KAAG,MAAM,GAAG,IAC5B,CAAC;AAoD7C,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,GACxC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAwhBpC,CAAC"}