@genesislcap/ai-assistant 15.77.0 → 15.78.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 (87) hide show
  1. package/dist/ai-assistant.api.json +796 -7
  2. package/dist/ai-assistant.d.ts +305 -12
  3. package/dist/chat-driver.cjs +28 -1
  4. package/dist/chat-driver.cjs.map +2 -2
  5. package/dist/chat-driver.mjs +28 -1
  6. package/dist/chat-driver.mjs.map +2 -2
  7. package/dist/custom-elements.json +1230 -468
  8. package/dist/dts/autopilot/autopilot-driver.d.ts +28 -0
  9. package/dist/dts/autopilot/autopilot-driver.d.ts.map +1 -1
  10. package/dist/dts/channel/ai-activity-channel.d.ts +20 -2
  11. package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -1
  12. package/dist/dts/components/chat-bubble/chat-bubble.d.ts +2 -0
  13. package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -1
  14. package/dist/dts/components/chat-driver/interaction-controller.d.ts.map +1 -1
  15. package/dist/dts/components/notification-level/index.d.ts +2 -0
  16. package/dist/dts/components/notification-level/index.d.ts.map +1 -0
  17. package/dist/dts/components/notification-level/notification-level.d.ts +51 -0
  18. package/dist/dts/components/notification-level/notification-level.d.ts.map +1 -0
  19. package/dist/dts/components/notification-level/notification-level.styles.d.ts +3 -0
  20. package/dist/dts/components/notification-level/notification-level.styles.d.ts.map +1 -0
  21. package/dist/dts/components/notification-level/notification-level.template.d.ts +5 -0
  22. package/dist/dts/components/notification-level/notification-level.template.d.ts.map +1 -0
  23. package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
  24. package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
  25. package/dist/dts/config/config.d.ts +2 -2
  26. package/dist/dts/config/define-stateful-agent.d.ts +1 -1
  27. package/dist/dts/index.d.ts +2 -0
  28. package/dist/dts/index.d.ts.map +1 -1
  29. package/dist/dts/main/main.d.ts +79 -6
  30. package/dist/dts/main/main.d.ts.map +1 -1
  31. package/dist/dts/notifications/agent-notifications.d.ts +139 -0
  32. package/dist/dts/notifications/agent-notifications.d.ts.map +1 -0
  33. package/dist/dts/notifications/agent-notifier.d.ts +58 -0
  34. package/dist/dts/notifications/agent-notifier.d.ts.map +1 -0
  35. package/dist/dts/notifications/index.d.ts +2 -0
  36. package/dist/dts/notifications/index.d.ts.map +1 -0
  37. package/dist/dts/notifications/notification-level-picker.template.d.ts +31 -0
  38. package/dist/dts/notifications/notification-level-picker.template.d.ts.map +1 -0
  39. package/dist/dts/notifications/notification-settings.d.ts +42 -0
  40. package/dist/dts/notifications/notification-settings.d.ts.map +1 -0
  41. package/dist/dts/react.d.ts +10 -0
  42. package/dist/dts/state/ai-assistant-slice.d.ts +12 -5
  43. package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
  44. package/dist/dts/state/interaction-context.d.ts +13 -0
  45. package/dist/dts/state/interaction-context.d.ts.map +1 -1
  46. package/dist/dts/state/persistence/session-persistence-provider.d.ts +5 -0
  47. package/dist/dts/state/persistence/session-persistence-provider.d.ts.map +1 -1
  48. package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
  49. package/dist/dts/state/persistence/session-snapshot.d.ts +19 -6
  50. package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
  51. package/dist/dts/state/session-store.d.ts +1 -0
  52. package/dist/dts/state/session-store.d.ts.map +1 -1
  53. package/dist/dts/types/interaction-context.d.ts +23 -0
  54. package/dist/dts/types/interaction-context.d.ts.map +1 -1
  55. package/dist/dts/utils/attachment-note.d.ts +18 -0
  56. package/dist/dts/utils/attachment-note.d.ts.map +1 -0
  57. package/dist/dts/utils/resolve-preference-baseline.d.ts +3 -0
  58. package/dist/dts/utils/resolve-preference-baseline.d.ts.map +1 -1
  59. package/dist/esm/autopilot/autopilot-driver.js +66 -3
  60. package/dist/esm/components/chat-bubble/chat-bubble.js +17 -3
  61. package/dist/esm/components/chat-driver/interaction-controller.js +5 -0
  62. package/dist/esm/components/notification-level/index.js +1 -0
  63. package/dist/esm/components/notification-level/notification-level.js +124 -0
  64. package/dist/esm/components/notification-level/notification-level.styles.js +20 -0
  65. package/dist/esm/components/notification-level/notification-level.template.js +11 -0
  66. package/dist/esm/components/settings-modal/settings-modal.styles.js +6 -0
  67. package/dist/esm/components/settings-modal/settings-modal.template.js +10 -1
  68. package/dist/esm/index.js +2 -0
  69. package/dist/esm/main/main.js +217 -27
  70. package/dist/esm/main/main.template.js +2 -2
  71. package/dist/esm/notifications/agent-notifications.js +172 -0
  72. package/dist/esm/notifications/agent-notifier.js +86 -0
  73. package/dist/esm/notifications/index.js +1 -0
  74. package/dist/esm/notifications/notification-level-picker.template.js +49 -0
  75. package/dist/esm/notifications/notification-settings.js +42 -0
  76. package/dist/esm/state/ai-assistant-slice.js +5 -0
  77. package/dist/esm/state/interaction-context.js +27 -0
  78. package/dist/esm/state/persistence/session-persister.js +24 -21
  79. package/dist/esm/state/persistence/session-snapshot.js +20 -7
  80. package/dist/esm/utils/attachment-note.js +19 -0
  81. package/dist/esm/utils/resolve-preference-baseline.js +9 -0
  82. package/dist/react.cjs +7 -0
  83. package/dist/react.mjs +6 -0
  84. package/docs/notifications.md +169 -0
  85. package/docs/styling.md +1 -1
  86. package/package.json +17 -17
  87. package/sandbox/fixtures.ts +3 -3
@@ -315,6 +315,159 @@
315
315
  "endIndex": 0
316
316
  }
317
317
  },
318
+ {
319
+ "kind": "Interface",
320
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionDetail:interface",
321
+ "docComment": "/**\n * The detail of the `agent-attention` activity-bus event: something in a session needs the person. Published whatever the person's level is; the assistant for that session decides whether to notify.\n *\n * @beta\n */\n",
322
+ "excerptTokens": [
323
+ {
324
+ "kind": "Content",
325
+ "text": "export interface AgentAttentionDetail "
326
+ }
327
+ ],
328
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
329
+ "releaseTag": "Beta",
330
+ "name": "AgentAttentionDetail",
331
+ "preserveMemberOrder": false,
332
+ "members": [
333
+ {
334
+ "kind": "PropertySignature",
335
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionDetail#interactionId:member",
336
+ "docComment": "/**\n * The interaction it is about, when there is one.\n */\n",
337
+ "excerptTokens": [
338
+ {
339
+ "kind": "Content",
340
+ "text": "readonly interactionId?: "
341
+ },
342
+ {
343
+ "kind": "Content",
344
+ "text": "string"
345
+ },
346
+ {
347
+ "kind": "Content",
348
+ "text": ";"
349
+ }
350
+ ],
351
+ "isReadonly": true,
352
+ "isOptional": true,
353
+ "releaseTag": "Beta",
354
+ "name": "interactionId",
355
+ "propertyTypeTokenRange": {
356
+ "startIndex": 1,
357
+ "endIndex": 2
358
+ }
359
+ },
360
+ {
361
+ "kind": "PropertySignature",
362
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionDetail#kind:member",
363
+ "docComment": "",
364
+ "excerptTokens": [
365
+ {
366
+ "kind": "Content",
367
+ "text": "readonly kind: "
368
+ },
369
+ {
370
+ "kind": "Reference",
371
+ "text": "AgentAttentionKind",
372
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionKind:type"
373
+ },
374
+ {
375
+ "kind": "Content",
376
+ "text": ";"
377
+ }
378
+ ],
379
+ "isReadonly": true,
380
+ "isOptional": false,
381
+ "releaseTag": "Beta",
382
+ "name": "kind",
383
+ "propertyTypeTokenRange": {
384
+ "startIndex": 1,
385
+ "endIndex": 2
386
+ }
387
+ },
388
+ {
389
+ "kind": "PropertySignature",
390
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionDetail#message:member",
391
+ "docComment": "/**\n * Text that replaces the default message for this one notification.\n */\n",
392
+ "excerptTokens": [
393
+ {
394
+ "kind": "Content",
395
+ "text": "readonly message?: "
396
+ },
397
+ {
398
+ "kind": "Content",
399
+ "text": "string"
400
+ },
401
+ {
402
+ "kind": "Content",
403
+ "text": ";"
404
+ }
405
+ ],
406
+ "isReadonly": true,
407
+ "isOptional": true,
408
+ "releaseTag": "Beta",
409
+ "name": "message",
410
+ "propertyTypeTokenRange": {
411
+ "startIndex": 1,
412
+ "endIndex": 2
413
+ }
414
+ },
415
+ {
416
+ "kind": "PropertySignature",
417
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionDetail#sessionKey:member",
418
+ "docComment": "/**\n * The session it happened in. A sub-agent's session is `<parent>::sub:<id>`.\n */\n",
419
+ "excerptTokens": [
420
+ {
421
+ "kind": "Content",
422
+ "text": "readonly sessionKey: "
423
+ },
424
+ {
425
+ "kind": "Content",
426
+ "text": "string"
427
+ },
428
+ {
429
+ "kind": "Content",
430
+ "text": ";"
431
+ }
432
+ ],
433
+ "isReadonly": true,
434
+ "isOptional": false,
435
+ "releaseTag": "Beta",
436
+ "name": "sessionKey",
437
+ "propertyTypeTokenRange": {
438
+ "startIndex": 1,
439
+ "endIndex": 2
440
+ }
441
+ }
442
+ ],
443
+ "extendsTokenRanges": []
444
+ },
445
+ {
446
+ "kind": "TypeAlias",
447
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionKind:type",
448
+ "docComment": "/**\n * What an agent notification is about.\n *\n * - `'widget-needs-input'` — a widget asked for the person's attention. - `'autopilot-handed-back'` — the autopilot handed something to the person. - `'autopilot-stopped'` — the autopilot stopped working: the flow ended, the turn ended with nothing left for it to answer, or it hit a wall such as the budget.\n *\n * @beta\n */\n",
449
+ "excerptTokens": [
450
+ {
451
+ "kind": "Content",
452
+ "text": "export type AgentAttentionKind = "
453
+ },
454
+ {
455
+ "kind": "Content",
456
+ "text": "'widget-needs-input' | 'autopilot-handed-back' | 'autopilot-stopped'"
457
+ },
458
+ {
459
+ "kind": "Content",
460
+ "text": ";"
461
+ }
462
+ ],
463
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
464
+ "releaseTag": "Beta",
465
+ "name": "AgentAttentionKind",
466
+ "typeTokenRange": {
467
+ "startIndex": 1,
468
+ "endIndex": 2
469
+ }
470
+ },
318
471
  {
319
472
  "kind": "TypeAlias",
320
473
  "canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type",
@@ -828,6 +981,34 @@
828
981
  "name": "AgenticActivityEvents",
829
982
  "preserveMemberOrder": false,
830
983
  "members": [
984
+ {
985
+ "kind": "PropertySignature",
986
+ "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents#\"agent-attention\":member",
987
+ "docComment": "/**\n * Something in a session needs the person (GENC-1676): a widget asked for their attention, or the autopilot handed back or stopped working. Published whatever the person's notification level is; the assistant for that session decides whether to show a browser notification, and an app can listen to drive its own UI. Tab-local: the window that owns the session's driver publishes it.\n */\n",
988
+ "excerptTokens": [
989
+ {
990
+ "kind": "Content",
991
+ "text": "'agent-attention': "
992
+ },
993
+ {
994
+ "kind": "Reference",
995
+ "text": "AgentAttentionDetail",
996
+ "canonicalReference": "@genesislcap/ai-assistant!AgentAttentionDetail:interface"
997
+ },
998
+ {
999
+ "kind": "Content",
1000
+ "text": ";"
1001
+ }
1002
+ ],
1003
+ "isReadonly": false,
1004
+ "isOptional": false,
1005
+ "releaseTag": "Beta",
1006
+ "name": "\"agent-attention\"",
1007
+ "propertyTypeTokenRange": {
1008
+ "startIndex": 1,
1009
+ "endIndex": 2
1010
+ }
1011
+ },
831
1012
  {
832
1013
  "kind": "PropertySignature",
833
1014
  "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents#\"autopilot-needs-user\":member",
@@ -858,7 +1039,7 @@
858
1039
  {
859
1040
  "kind": "PropertySignature",
860
1041
  "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents#\"autopilot-show-waiting\":member",
861
- "docComment": "/**\n * The person opened the collapsed assistant from its \"needs you\" badge: the assistant for `sessionKey` (any, when absent) brings what waits on them into view.\n */\n",
1042
+ "docComment": "/**\n * The person opened the collapsed assistant from its \"needs you\" badge, or clicked an agent notification (GENC-1676): the assistant for `sessionKey` (any, when absent) brings what waits on them into view, and a closed bubble holding it opens.\n */\n",
862
1043
  "excerptTokens": [
863
1044
  {
864
1045
  "kind": "Content",
@@ -1044,6 +1225,33 @@
1044
1225
  "endIndex": 2
1045
1226
  }
1046
1227
  },
1228
+ {
1229
+ "kind": "PropertySignature",
1230
+ "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents#\"notification-settings-changed\":member",
1231
+ "docComment": "/**\n * A session's agent notification settings may have changed (GENC-1676): the person's level, what the app offers, or which assistant on the page holds the session. A notification level picker for that session re-reads them. Tab-local.\n */\n",
1232
+ "excerptTokens": [
1233
+ {
1234
+ "kind": "Content",
1235
+ "text": "'notification-settings-changed': "
1236
+ },
1237
+ {
1238
+ "kind": "Content",
1239
+ "text": "{\n sessionKey: string;\n }"
1240
+ },
1241
+ {
1242
+ "kind": "Content",
1243
+ "text": ";"
1244
+ }
1245
+ ],
1246
+ "isReadonly": false,
1247
+ "isOptional": false,
1248
+ "releaseTag": "Beta",
1249
+ "name": "\"notification-settings-changed\"",
1250
+ "propertyTypeTokenRange": {
1251
+ "startIndex": 1,
1252
+ "endIndex": 2
1253
+ }
1254
+ },
1047
1255
  {
1048
1256
  "kind": "PropertySignature",
1049
1257
  "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents#\"tool-loop-end\":member",
@@ -1282,6 +1490,92 @@
1282
1490
  ],
1283
1491
  "extendsTokenRanges": []
1284
1492
  },
1493
+ {
1494
+ "kind": "TypeAlias",
1495
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationLevel:type",
1496
+ "docComment": "/**\n * How often the person wants a browser notification when the assistant needs them (GENC-1676). Each level includes the one before it.\n *\n * - `'off'` — never. The default, always: the browser makes the person grant permission, so nothing can switch it on for them. - `'autopilot'` — only when the autopilot hands back to the person or stops working. Offered only when the app sets `chatConfig.ui.notifications.autopilot`. - `'needs-input'` — every `'autopilot'` case, plus any widget that asks for the person's attention (`InteractionContext.requestAttention`).\n *\n * @beta\n */\n",
1497
+ "excerptTokens": [
1498
+ {
1499
+ "kind": "Content",
1500
+ "text": "export type AgentNotificationLevel = "
1501
+ },
1502
+ {
1503
+ "kind": "Content",
1504
+ "text": "'off' | 'autopilot' | 'needs-input'"
1505
+ },
1506
+ {
1507
+ "kind": "Content",
1508
+ "text": ";"
1509
+ }
1510
+ ],
1511
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
1512
+ "releaseTag": "Beta",
1513
+ "name": "AgentNotificationLevel",
1514
+ "typeTokenRange": {
1515
+ "startIndex": 1,
1516
+ "endIndex": 2
1517
+ }
1518
+ },
1519
+ {
1520
+ "kind": "Function",
1521
+ "canonicalReference": "@genesislcap/ai-assistant!agentNotificationPermission:function(1)",
1522
+ "docComment": "/**\n * Whether this page may show notifications. Safe to call anywhere, including Node.\n *\n * @beta\n */\n",
1523
+ "excerptTokens": [
1524
+ {
1525
+ "kind": "Content",
1526
+ "text": "export declare function agentNotificationPermission(): "
1527
+ },
1528
+ {
1529
+ "kind": "Reference",
1530
+ "text": "AgentNotificationPermission",
1531
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationPermission:type"
1532
+ },
1533
+ {
1534
+ "kind": "Content",
1535
+ "text": ";"
1536
+ }
1537
+ ],
1538
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
1539
+ "returnTypeTokenRange": {
1540
+ "startIndex": 1,
1541
+ "endIndex": 2
1542
+ },
1543
+ "releaseTag": "Beta",
1544
+ "overloadIndex": 1,
1545
+ "parameters": [],
1546
+ "name": "agentNotificationPermission"
1547
+ },
1548
+ {
1549
+ "kind": "TypeAlias",
1550
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationPermission:type",
1551
+ "docComment": "/**\n * Whether this page may show notifications: the browser's own `NotificationPermission`, or `'unsupported'` where there is no Notification API (an old browser, an insecure context, Node).\n *\n * @beta\n */\n",
1552
+ "excerptTokens": [
1553
+ {
1554
+ "kind": "Content",
1555
+ "text": "export type AgentNotificationPermission = "
1556
+ },
1557
+ {
1558
+ "kind": "Reference",
1559
+ "text": "NotificationPermission",
1560
+ "canonicalReference": "!NotificationPermission:type"
1561
+ },
1562
+ {
1563
+ "kind": "Content",
1564
+ "text": " | 'unsupported'"
1565
+ },
1566
+ {
1567
+ "kind": "Content",
1568
+ "text": ";"
1569
+ }
1570
+ ],
1571
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
1572
+ "releaseTag": "Beta",
1573
+ "name": "AgentNotificationPermission",
1574
+ "typeTokenRange": {
1575
+ "startIndex": 1,
1576
+ "endIndex": 3
1577
+ }
1578
+ },
1285
1579
  {
1286
1580
  "kind": "Interface",
1287
1581
  "canonicalReference": "@genesislcap/ai-assistant!AgentPersistenceContext:interface",
@@ -5649,8 +5943,207 @@
5649
5943
  "endIndex": 3
5650
5944
  }
5651
5945
  }
5652
- ],
5653
- "extendsTokenRanges": []
5946
+ ],
5947
+ "extendsTokenRanges": []
5948
+ },
5949
+ {
5950
+ "kind": "Class",
5951
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel:class",
5952
+ "docComment": "/**\n * The agent notification level picker on its own (GENC-1676), for an app or a widget's view to place wherever it invites the person to switch notifications on. The same control as the assistant's settings row, and the same behaviour: picking a level asks the browser for permission inside the click and snaps back if refused, the hint says when the browser blocks notifications, and the Autopilot level shows only when the app offers it.\n *\n * It works on the session in `session-key`, through the connected assistant that holds it, so the level is checked and saved as a settings change is. It renders nothing while no connected assistant holds that session, while the app turns notifications off, or where the browser has no notifications.\n *\n * In a widget, pass the interaction's session:\n * ```html\n * <foundation-ai-notification-level session-key=\"${(x) => x.interactionContext.sessionKey}\">\n * </foundation-ai-notification-level>\n * ```\n *\n * @beta\n */\n",
5953
+ "excerptTokens": [
5954
+ {
5955
+ "kind": "Content",
5956
+ "text": "export declare class AiNotificationLevel extends "
5957
+ },
5958
+ {
5959
+ "kind": "Reference",
5960
+ "text": "GenesisElement",
5961
+ "canonicalReference": "@microsoft/fast-element!FASTElement:interface"
5962
+ },
5963
+ {
5964
+ "kind": "Content",
5965
+ "text": " implements "
5966
+ },
5967
+ {
5968
+ "kind": "Reference",
5969
+ "text": "NotificationLevelPickerSource",
5970
+ "canonicalReference": "@genesislcap/ai-assistant!~NotificationLevelPickerSource:interface"
5971
+ },
5972
+ {
5973
+ "kind": "Content",
5974
+ "text": " "
5975
+ }
5976
+ ],
5977
+ "fileUrlPath": "src/components/notification-level/notification-level.ts",
5978
+ "releaseTag": "Beta",
5979
+ "isAbstract": false,
5980
+ "name": "AiNotificationLevel",
5981
+ "preserveMemberOrder": false,
5982
+ "members": [
5983
+ {
5984
+ "kind": "Method",
5985
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel#connectedCallback:member(1)",
5986
+ "docComment": "",
5987
+ "excerptTokens": [
5988
+ {
5989
+ "kind": "Content",
5990
+ "text": "connectedCallback(): "
5991
+ },
5992
+ {
5993
+ "kind": "Content",
5994
+ "text": "void"
5995
+ },
5996
+ {
5997
+ "kind": "Content",
5998
+ "text": ";"
5999
+ }
6000
+ ],
6001
+ "isStatic": false,
6002
+ "returnTypeTokenRange": {
6003
+ "startIndex": 1,
6004
+ "endIndex": 2
6005
+ },
6006
+ "releaseTag": "Beta",
6007
+ "isProtected": false,
6008
+ "overloadIndex": 1,
6009
+ "parameters": [],
6010
+ "isOptional": false,
6011
+ "isAbstract": false,
6012
+ "name": "connectedCallback"
6013
+ },
6014
+ {
6015
+ "kind": "Property",
6016
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel#designSystemPrefix:member",
6017
+ "docComment": "",
6018
+ "excerptTokens": [
6019
+ {
6020
+ "kind": "Content",
6021
+ "text": "designSystemPrefix: "
6022
+ },
6023
+ {
6024
+ "kind": "Content",
6025
+ "text": "string"
6026
+ },
6027
+ {
6028
+ "kind": "Content",
6029
+ "text": ";"
6030
+ }
6031
+ ],
6032
+ "isReadonly": false,
6033
+ "isOptional": false,
6034
+ "releaseTag": "Beta",
6035
+ "name": "designSystemPrefix",
6036
+ "propertyTypeTokenRange": {
6037
+ "startIndex": 1,
6038
+ "endIndex": 2
6039
+ },
6040
+ "isStatic": false,
6041
+ "isProtected": false,
6042
+ "isAbstract": false
6043
+ },
6044
+ {
6045
+ "kind": "Method",
6046
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel#disconnectedCallback:member(1)",
6047
+ "docComment": "",
6048
+ "excerptTokens": [
6049
+ {
6050
+ "kind": "Content",
6051
+ "text": "disconnectedCallback(): "
6052
+ },
6053
+ {
6054
+ "kind": "Content",
6055
+ "text": "void"
6056
+ },
6057
+ {
6058
+ "kind": "Content",
6059
+ "text": ";"
6060
+ }
6061
+ ],
6062
+ "isStatic": false,
6063
+ "returnTypeTokenRange": {
6064
+ "startIndex": 1,
6065
+ "endIndex": 2
6066
+ },
6067
+ "releaseTag": "Beta",
6068
+ "isProtected": false,
6069
+ "overloadIndex": 1,
6070
+ "parameters": [],
6071
+ "isOptional": false,
6072
+ "isAbstract": false,
6073
+ "name": "disconnectedCallback"
6074
+ },
6075
+ {
6076
+ "kind": "Property",
6077
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel#sessionKey:member",
6078
+ "docComment": "/**\n * The session whose level this picks: the assistant's `session-key` (or state key).\n */\n",
6079
+ "excerptTokens": [
6080
+ {
6081
+ "kind": "Content",
6082
+ "text": "sessionKey?: "
6083
+ },
6084
+ {
6085
+ "kind": "Content",
6086
+ "text": "string"
6087
+ },
6088
+ {
6089
+ "kind": "Content",
6090
+ "text": ";"
6091
+ }
6092
+ ],
6093
+ "isReadonly": false,
6094
+ "isOptional": true,
6095
+ "releaseTag": "Beta",
6096
+ "name": "sessionKey",
6097
+ "propertyTypeTokenRange": {
6098
+ "startIndex": 1,
6099
+ "endIndex": 2
6100
+ },
6101
+ "isStatic": false,
6102
+ "isProtected": false,
6103
+ "isAbstract": false
6104
+ },
6105
+ {
6106
+ "kind": "Method",
6107
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel#sessionKeyChanged:member(1)",
6108
+ "docComment": "",
6109
+ "excerptTokens": [
6110
+ {
6111
+ "kind": "Content",
6112
+ "text": "sessionKeyChanged(): "
6113
+ },
6114
+ {
6115
+ "kind": "Content",
6116
+ "text": "void"
6117
+ },
6118
+ {
6119
+ "kind": "Content",
6120
+ "text": ";"
6121
+ }
6122
+ ],
6123
+ "isStatic": false,
6124
+ "returnTypeTokenRange": {
6125
+ "startIndex": 1,
6126
+ "endIndex": 2
6127
+ },
6128
+ "releaseTag": "Beta",
6129
+ "isProtected": false,
6130
+ "overloadIndex": 1,
6131
+ "parameters": [],
6132
+ "isOptional": false,
6133
+ "isAbstract": false,
6134
+ "name": "sessionKeyChanged"
6135
+ }
6136
+ ],
6137
+ "extendsTokenRange": {
6138
+ "startIndex": 1,
6139
+ "endIndex": 2
6140
+ },
6141
+ "implementsTokenRanges": [
6142
+ {
6143
+ "startIndex": 3,
6144
+ "endIndex": 4
6145
+ }
6146
+ ]
5654
6147
  },
5655
6148
  {
5656
6149
  "kind": "Interface",
@@ -8705,6 +9198,34 @@
8705
9198
  "name": "AutopilotDriverOptions",
8706
9199
  "preserveMemberOrder": false,
8707
9200
  "members": [
9201
+ {
9202
+ "kind": "PropertySignature",
9203
+ "canonicalReference": "@genesislcap/ai-assistant!AutopilotDriverOptions#activityBus:member",
9204
+ "docComment": "/**\n * Where the driver reports that it handed back to the person or stopped working, as `agent-attention` (GENC-1676). Defaults to {@link NOOP_ACTIVITY_BUS}.\n */\n",
9205
+ "excerptTokens": [
9206
+ {
9207
+ "kind": "Content",
9208
+ "text": "readonly activityBus?: "
9209
+ },
9210
+ {
9211
+ "kind": "Reference",
9212
+ "text": "ActivityBus",
9213
+ "canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
9214
+ },
9215
+ {
9216
+ "kind": "Content",
9217
+ "text": ";"
9218
+ }
9219
+ ],
9220
+ "isReadonly": true,
9221
+ "isOptional": true,
9222
+ "releaseTag": "Beta",
9223
+ "name": "activityBus",
9224
+ "propertyTypeTokenRange": {
9225
+ "startIndex": 1,
9226
+ "endIndex": 2
9227
+ }
9228
+ },
8708
9229
  {
8709
9230
  "kind": "PropertySignature",
8710
9231
  "canonicalReference": "@genesislcap/ai-assistant!AutopilotDriverOptions#agents:member",
@@ -15884,6 +16405,33 @@
15884
16405
  ],
15885
16406
  "extendsTokenRanges": []
15886
16407
  },
16408
+ {
16409
+ "kind": "Variable",
16410
+ "canonicalReference": "@genesislcap/ai-assistant!DEFAULT_AGENT_NOTIFICATION_MESSAGE:var",
16411
+ "docComment": "/**\n * The notification's text when neither the app nor the widget gives one.\n *\n * @beta\n */\n",
16412
+ "excerptTokens": [
16413
+ {
16414
+ "kind": "Content",
16415
+ "text": "DEFAULT_AGENT_NOTIFICATION_MESSAGE = "
16416
+ },
16417
+ {
16418
+ "kind": "Content",
16419
+ "text": "\"The assistant is ready for your next input\""
16420
+ }
16421
+ ],
16422
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
16423
+ "initializerTokenRange": {
16424
+ "startIndex": 1,
16425
+ "endIndex": 2
16426
+ },
16427
+ "isReadonly": true,
16428
+ "releaseTag": "Beta",
16429
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
16430
+ "variableTypeTokenRange": {
16431
+ "startIndex": 0,
16432
+ "endIndex": 0
16433
+ }
16434
+ },
15887
16435
  {
15888
16436
  "kind": "Variable",
15889
16437
  "canonicalReference": "@genesislcap/ai-assistant!DEFAULT_DELEGATE_FRAMING:var",
@@ -16903,10 +17451,70 @@
16903
17451
  "isProtected": false,
16904
17452
  "isAbstract": false
16905
17453
  },
17454
+ {
17455
+ "kind": "Property",
17456
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#agentButtonColour:member",
17457
+ "docComment": "/**\n * The chip's glyph colour: the pin's tint, for the agent the chip shows.\n */\n",
17458
+ "excerptTokens": [
17459
+ {
17460
+ "kind": "Content",
17461
+ "text": "get agentButtonColour(): "
17462
+ },
17463
+ {
17464
+ "kind": "Content",
17465
+ "text": "string | undefined"
17466
+ },
17467
+ {
17468
+ "kind": "Content",
17469
+ "text": ";"
17470
+ }
17471
+ ],
17472
+ "isReadonly": true,
17473
+ "isOptional": false,
17474
+ "releaseTag": "Beta",
17475
+ "name": "agentButtonColour",
17476
+ "propertyTypeTokenRange": {
17477
+ "startIndex": 1,
17478
+ "endIndex": 2
17479
+ },
17480
+ "isStatic": false,
17481
+ "isProtected": false,
17482
+ "isAbstract": false
17483
+ },
17484
+ {
17485
+ "kind": "Property",
17486
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#agentButtonGlyph:member",
17487
+ "docComment": "/**\n * The chip's icon: orchestration's, or the pin for one agent getting every message.\n */\n",
17488
+ "excerptTokens": [
17489
+ {
17490
+ "kind": "Content",
17491
+ "text": "get agentButtonGlyph(): "
17492
+ },
17493
+ {
17494
+ "kind": "Content",
17495
+ "text": "'sitemap' | 'thumbtack'"
17496
+ },
17497
+ {
17498
+ "kind": "Content",
17499
+ "text": ";"
17500
+ }
17501
+ ],
17502
+ "isReadonly": true,
17503
+ "isOptional": false,
17504
+ "releaseTag": "Beta",
17505
+ "name": "agentButtonGlyph",
17506
+ "propertyTypeTokenRange": {
17507
+ "startIndex": 1,
17508
+ "endIndex": 2
17509
+ },
17510
+ "isStatic": false,
17511
+ "isProtected": false,
17512
+ "isAbstract": false
17513
+ },
16906
17514
  {
16907
17515
  "kind": "Property",
16908
17516
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#agentButtonLabel:member",
16909
- "docComment": "/**\n * Label beside the composer's agent glyph: the orchestration label (`Orchestration` unless the host renames it) while the orchestrator is routing, otherwise the pinned agent's name. The name is NOT shortened here — the button truncates with an ellipsis in CSS, so the full name stays available to a screen reader and to the `title` tooltip.\n */\n",
17517
+ "docComment": "/**\n * Label beside the composer's agent glyph: the orchestration label (`Orchestration` unless the host renames it) while the orchestrator is routing, otherwise the pinned agent's name. The name is NOT shortened here — the button truncates with an ellipsis in CSS, so the full name stays available to a screen reader and to the `title` tooltip.\n *\n * While a flow holds the picker, the flow owner is named instead: it gets every message.\n */\n",
16910
17518
  "excerptTokens": [
16911
17519
  {
16912
17520
  "kind": "Content",
@@ -19277,7 +19885,7 @@
19277
19885
  {
19278
19886
  "kind": "Property",
19279
19887
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#effectivePlaceholder:member",
19280
- "docComment": "/**\n * Placeholder shown in the chat input. Substitutes the pinned agent's name when one is selected so the user has a clearer signal of where their message will go; otherwise falls back to the host-provided placeholder.\n */\n",
19888
+ "docComment": "/**\n * Placeholder shown in the chat input. Substitutes the pinned agent's name when one is selected so the user has a clearer signal of where their message will go; otherwise falls back to the host-provided placeholder. While a flow holds the picker and the chip is shown, it names the flow owner, as the chip does.\n */\n",
19281
19889
  "excerptTokens": [
19282
19890
  {
19283
19891
  "kind": "Content",
@@ -20504,6 +21112,46 @@
20504
21112
  "isAbstract": false,
20505
21113
  "name": "noteDebugLogInput"
20506
21114
  },
21115
+ {
21116
+ "kind": "Property",
21117
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#notificationLevel:member",
21118
+ "docComment": "/**\n * The person's agent notification level (GENC-1676): `'off'` (always the default), `'autopilot'` or `'needs-input'`. Saved with the other settings.\n *\n * An app may set it, e.g. after its own \"Notify me\" invitation, once the person granted permission through `requestAgentNotificationPermission`. Ignored when the app does not offer the level (`chatConfig.ui.notifications`), and before the assistant has a session.\n */\n",
21119
+ "excerptTokens": [
21120
+ {
21121
+ "kind": "Content",
21122
+ "text": "get notificationLevel(): "
21123
+ },
21124
+ {
21125
+ "kind": "Reference",
21126
+ "text": "AgentNotificationLevel",
21127
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationLevel:type"
21128
+ },
21129
+ {
21130
+ "kind": "Content",
21131
+ "text": ";\n\nset notificationLevel(value: "
21132
+ },
21133
+ {
21134
+ "kind": "Reference",
21135
+ "text": "AgentNotificationLevel",
21136
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationLevel:type"
21137
+ },
21138
+ {
21139
+ "kind": "Content",
21140
+ "text": ");"
21141
+ }
21142
+ ],
21143
+ "isReadonly": false,
21144
+ "isOptional": false,
21145
+ "releaseTag": "Beta",
21146
+ "name": "notificationLevel",
21147
+ "propertyTypeTokenRange": {
21148
+ "startIndex": 1,
21149
+ "endIndex": 2
21150
+ },
21151
+ "isStatic": false,
21152
+ "isProtected": false,
21153
+ "isAbstract": false
21154
+ },
20507
21155
  {
20508
21156
  "kind": "Method",
20509
21157
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#onChatHeaderMouseDown:member(1)",
@@ -21315,7 +21963,7 @@
21315
21963
  {
21316
21964
  "kind": "Property",
21317
21965
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#pinnedAgentColour:member",
21318
- "docComment": "/**\n * Tint applied to the pin icon when an agent is pinned. Picked from the brand palette by agent position (modulo the palette length), so each agent gets a consistent colour across renders. `undefined` when nothing is pinned, the agent isn't in the current array, or the host has opted out via `chatConfig.picker.disablePinColours`.\n */\n",
21966
+ "docComment": "/**\n * The pinned agent's colour. Picked from the brand palette by agent position (modulo the palette length), so each agent gets a consistent colour across renders. `undefined` when nothing is pinned, the agent isn't in the current array, or the host has opted out via `chatConfig.picker.disablePinColours`. Kept for hosts; the chip's glyph uses {@link FoundationAiAssistant.agentButtonColour}, which follows the flow owner while it holds the picker.\n */\n",
21319
21967
  "excerptTokens": [
21320
21968
  {
21321
21969
  "kind": "Content",
@@ -26483,6 +27131,51 @@
26483
27131
  ],
26484
27132
  "name": "onSurfaceReady"
26485
27133
  },
27134
+ {
27135
+ "kind": "MethodSignature",
27136
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#requestAttention:member(1)",
27137
+ "docComment": "/**\n * Say this interaction needs the person to act (GENC-1676). If their notification level covers it and they are not looking at the page, they get a browser notification. Call it at the moment the widget starts waiting on the person — not before, if it has work to do first. A widget that only shows information never calls it.\n *\n * Safe to call from anywhere, the controller's constructor included: the platform reports it only once it has decided who holds the interaction, and drops it if a claimant (the autopilot) holds it then or when it is called — the claimant's own hand-back notifies instead. Only the first call counts, whatever happened to it; later ones do nothing, as do calls after the interaction ends.\n *\n * @param message - The notification's text for this case. Defaults to the app's `chatConfig.ui.notifications.message`, then to \"The assistant is ready for your next input\".\n */\n",
27138
+ "excerptTokens": [
27139
+ {
27140
+ "kind": "Content",
27141
+ "text": "requestAttention(message?: "
27142
+ },
27143
+ {
27144
+ "kind": "Content",
27145
+ "text": "string"
27146
+ },
27147
+ {
27148
+ "kind": "Content",
27149
+ "text": "): "
27150
+ },
27151
+ {
27152
+ "kind": "Content",
27153
+ "text": "void"
27154
+ },
27155
+ {
27156
+ "kind": "Content",
27157
+ "text": ";"
27158
+ }
27159
+ ],
27160
+ "isOptional": false,
27161
+ "returnTypeTokenRange": {
27162
+ "startIndex": 3,
27163
+ "endIndex": 4
27164
+ },
27165
+ "releaseTag": "Beta",
27166
+ "overloadIndex": 1,
27167
+ "parameters": [
27168
+ {
27169
+ "parameterName": "message",
27170
+ "parameterTypeTokenRange": {
27171
+ "startIndex": 1,
27172
+ "endIndex": 2
27173
+ },
27174
+ "isOptional": true
27175
+ }
27176
+ ],
27177
+ "name": "requestAttention"
27178
+ },
26486
27179
  {
26487
27180
  "kind": "MethodSignature",
26488
27181
  "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#resolve:member(1)",
@@ -26573,6 +27266,33 @@
26573
27266
  ],
26574
27267
  "name": "saveCheckpoint"
26575
27268
  },
27269
+ {
27270
+ "kind": "PropertySignature",
27271
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#sessionKey:member",
27272
+ "docComment": "/**\n * The session the interaction belongs to (GENC-1676) — plain data, the same in Node. A view passes it to anything that works per session, such as `<foundation-ai-notification-level session-key=\"...\">`. Empty for a context made outside a session (an inert fallback, a test).\n */\n",
27273
+ "excerptTokens": [
27274
+ {
27275
+ "kind": "Content",
27276
+ "text": "readonly sessionKey: "
27277
+ },
27278
+ {
27279
+ "kind": "Content",
27280
+ "text": "string"
27281
+ },
27282
+ {
27283
+ "kind": "Content",
27284
+ "text": ";"
27285
+ }
27286
+ ],
27287
+ "isReadonly": true,
27288
+ "isOptional": false,
27289
+ "releaseTag": "Beta",
27290
+ "name": "sessionKey",
27291
+ "propertyTypeTokenRange": {
27292
+ "startIndex": 1,
27293
+ "endIndex": 2
27294
+ }
27295
+ },
26576
27296
  {
26577
27297
  "kind": "PropertySignature",
26578
27298
  "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#state:member",
@@ -29887,6 +30607,48 @@
29887
30607
  "endIndex": 0
29888
30608
  }
29889
30609
  },
30610
+ {
30611
+ "kind": "Function",
30612
+ "canonicalReference": "@genesislcap/ai-assistant!requestAgentNotificationPermission:function(1)",
30613
+ "docComment": "/**\n * Ask the person for permission to show notifications, and resolve to the result. Call it from a click or key handler: browsers ignore or refuse a request that does not come from the person. Resolves straight away when permission is already decided or unsupported, since a browser only ever asks once.\n *\n * @beta\n */\n",
30614
+ "excerptTokens": [
30615
+ {
30616
+ "kind": "Content",
30617
+ "text": "export declare function requestAgentNotificationPermission(): "
30618
+ },
30619
+ {
30620
+ "kind": "Reference",
30621
+ "text": "Promise",
30622
+ "canonicalReference": "!Promise:interface"
30623
+ },
30624
+ {
30625
+ "kind": "Content",
30626
+ "text": "<"
30627
+ },
30628
+ {
30629
+ "kind": "Reference",
30630
+ "text": "AgentNotificationPermission",
30631
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationPermission:type"
30632
+ },
30633
+ {
30634
+ "kind": "Content",
30635
+ "text": ">"
30636
+ },
30637
+ {
30638
+ "kind": "Content",
30639
+ "text": ";"
30640
+ }
30641
+ ],
30642
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
30643
+ "returnTypeTokenRange": {
30644
+ "startIndex": 1,
30645
+ "endIndex": 5
30646
+ },
30647
+ "releaseTag": "Beta",
30648
+ "overloadIndex": 1,
30649
+ "parameters": [],
30650
+ "name": "requestAgentNotificationPermission"
30651
+ },
29890
30652
  {
29891
30653
  "kind": "Interface",
29892
30654
  "canonicalReference": "@genesislcap/ai-assistant!ResolvedDebugLogNoteConfig:interface",
@@ -31297,6 +32059,33 @@
31297
32059
  "endIndex": 2
31298
32060
  }
31299
32061
  },
32062
+ {
32063
+ "kind": "PropertySignature",
32064
+ "canonicalReference": "@genesislcap/ai-assistant!SessionPreferences#notificationLevel:member",
32065
+ "docComment": "/**\n * The agent notification level (`AgentNotificationLevel` values, as plain strings). Absent means `'off'`: unlike the other preferences, no config default can switch it on.\n */\n",
32066
+ "excerptTokens": [
32067
+ {
32068
+ "kind": "Content",
32069
+ "text": "notificationLevel?: "
32070
+ },
32071
+ {
32072
+ "kind": "Content",
32073
+ "text": "string"
32074
+ },
32075
+ {
32076
+ "kind": "Content",
32077
+ "text": ";"
32078
+ }
32079
+ ],
32080
+ "isReadonly": false,
32081
+ "isOptional": true,
32082
+ "releaseTag": "Public",
32083
+ "name": "notificationLevel",
32084
+ "propertyTypeTokenRange": {
32085
+ "startIndex": 1,
32086
+ "endIndex": 2
32087
+ }
32088
+ },
31300
32089
  {
31301
32090
  "kind": "PropertySignature",
31302
32091
  "canonicalReference": "@genesislcap/ai-assistant!SessionPreferences#showAgentSwitchIndicator:member",
@@ -32690,7 +33479,7 @@
32690
33479
  {
32691
33480
  "kind": "PropertySignature",
32692
33481
  "canonicalReference": "@genesislcap/ai-assistant!StatefulAgentInit#resumable:member",
32693
- "docComment": "/**\n * Whether the agent's current state is resumable — worth persisting so the session restores mid-flow (GENC-1351 §5.9). Receives the **live** state bag `S` (like the other per-turn resolvers), so a machine agent gates on its step directly: `resumable: ({ state }) => state.machine.state !== 'confirm'`. Return `false` for a point that shouldn't resume — the session isn't persisted, and on return the assistant shows {@link StatefulAgentInit.notResumableMessage} (or a default) and pre-fills the composer with the prompt that started the flow. Only consulted with persistence enabled; a thrown error is treated as `true` (fail-safe — never drop a resumable chat on a predicate bug).\n */\n",
33482
+ "docComment": "/**\n * Whether the agent's current state is resumable — worth persisting so the session restores mid-flow (GENC-1351 §5.9). Receives the **live** state bag `S` (like the other per-turn resolvers), so a machine agent gates on its step directly: `resumable: ({ state }) => state.machine.state !== 'confirm'`. Return `false` for a point that shouldn't resume — the session isn't persisted, and on return the assistant shows {@link StatefulAgentInit.notResumableMessage} (or a default) and pre-fills the composer with the user's last message. Only consulted with persistence enabled; a thrown error is treated as `true` (fail-safe — never drop a resumable chat on a predicate bug).\n */\n",
32694
33483
  "excerptTokens": [
32695
33484
  {
32696
33485
  "kind": "Content",