@genesislcap/ai-assistant 15.76.1-alpha-aff9783af4.0 → 15.78.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 (74) hide show
  1. package/dist/ai-assistant.api.json +753 -24
  2. package/dist/ai-assistant.d.ts +273 -3
  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 +900 -266
  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/index.d.ts +2 -0
  26. package/dist/dts/index.d.ts.map +1 -1
  27. package/dist/dts/main/main.d.ts +56 -1
  28. package/dist/dts/main/main.d.ts.map +1 -1
  29. package/dist/dts/notifications/agent-notifications.d.ts +139 -0
  30. package/dist/dts/notifications/agent-notifications.d.ts.map +1 -0
  31. package/dist/dts/notifications/agent-notifier.d.ts +58 -0
  32. package/dist/dts/notifications/agent-notifier.d.ts.map +1 -0
  33. package/dist/dts/notifications/index.d.ts +2 -0
  34. package/dist/dts/notifications/index.d.ts.map +1 -0
  35. package/dist/dts/notifications/notification-level-picker.template.d.ts +31 -0
  36. package/dist/dts/notifications/notification-level-picker.template.d.ts.map +1 -0
  37. package/dist/dts/notifications/notification-settings.d.ts +42 -0
  38. package/dist/dts/notifications/notification-settings.d.ts.map +1 -0
  39. package/dist/dts/react.d.ts +10 -0
  40. package/dist/dts/state/ai-assistant-slice.d.ts +8 -0
  41. package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
  42. package/dist/dts/state/interaction-context.d.ts +13 -0
  43. package/dist/dts/state/interaction-context.d.ts.map +1 -1
  44. package/dist/dts/state/persistence/session-persistence-provider.d.ts +5 -0
  45. package/dist/dts/state/persistence/session-persistence-provider.d.ts.map +1 -1
  46. package/dist/dts/state/session-store.d.ts +1 -0
  47. package/dist/dts/state/session-store.d.ts.map +1 -1
  48. package/dist/dts/types/interaction-context.d.ts +23 -0
  49. package/dist/dts/types/interaction-context.d.ts.map +1 -1
  50. package/dist/dts/utils/resolve-preference-baseline.d.ts +3 -0
  51. package/dist/dts/utils/resolve-preference-baseline.d.ts.map +1 -1
  52. package/dist/esm/autopilot/autopilot-driver.js +66 -3
  53. package/dist/esm/components/chat-bubble/chat-bubble.js +17 -3
  54. package/dist/esm/components/chat-driver/interaction-controller.js +5 -0
  55. package/dist/esm/components/notification-level/index.js +1 -0
  56. package/dist/esm/components/notification-level/notification-level.js +124 -0
  57. package/dist/esm/components/notification-level/notification-level.styles.js +20 -0
  58. package/dist/esm/components/notification-level/notification-level.template.js +11 -0
  59. package/dist/esm/components/settings-modal/settings-modal.styles.js +6 -0
  60. package/dist/esm/components/settings-modal/settings-modal.template.js +10 -1
  61. package/dist/esm/index.js +2 -0
  62. package/dist/esm/main/main.js +159 -12
  63. package/dist/esm/notifications/agent-notifications.js +172 -0
  64. package/dist/esm/notifications/agent-notifier.js +86 -0
  65. package/dist/esm/notifications/index.js +1 -0
  66. package/dist/esm/notifications/notification-level-picker.template.js +49 -0
  67. package/dist/esm/notifications/notification-settings.js +42 -0
  68. package/dist/esm/state/ai-assistant-slice.js +5 -0
  69. package/dist/esm/state/interaction-context.js +27 -0
  70. package/dist/esm/utils/resolve-preference-baseline.js +9 -0
  71. package/dist/react.cjs +7 -0
  72. package/dist/react.mjs +6 -0
  73. package/docs/notifications.md +169 -0
  74. package/package.json +17 -17
@@ -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",
@@ -5601,7 +5895,195 @@
5601
5895
  },
5602
5896
  {
5603
5897
  "kind": "Content",
5604
- "text": "<unknown>"
5898
+ "text": "<unknown>"
5899
+ },
5900
+ {
5901
+ "kind": "Content",
5902
+ "text": ";"
5903
+ }
5904
+ ],
5905
+ "isReadonly": false,
5906
+ "isOptional": false,
5907
+ "releaseTag": "Beta",
5908
+ "name": "\"sub-agent-start\"",
5909
+ "propertyTypeTokenRange": {
5910
+ "startIndex": 1,
5911
+ "endIndex": 3
5912
+ }
5913
+ },
5914
+ {
5915
+ "kind": "PropertySignature",
5916
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriverEventMap#\"sub-agent-stop\":member",
5917
+ "docComment": "/**\n * A sub-agent run ended.\n */\n",
5918
+ "excerptTokens": [
5919
+ {
5920
+ "kind": "Content",
5921
+ "text": "'sub-agent-stop': "
5922
+ },
5923
+ {
5924
+ "kind": "Reference",
5925
+ "text": "CustomEvent",
5926
+ "canonicalReference": "!CustomEvent:interface"
5927
+ },
5928
+ {
5929
+ "kind": "Content",
5930
+ "text": "<unknown>"
5931
+ },
5932
+ {
5933
+ "kind": "Content",
5934
+ "text": ";"
5935
+ }
5936
+ ],
5937
+ "isReadonly": false,
5938
+ "isOptional": false,
5939
+ "releaseTag": "Beta",
5940
+ "name": "\"sub-agent-stop\"",
5941
+ "propertyTypeTokenRange": {
5942
+ "startIndex": 1,
5943
+ "endIndex": 3
5944
+ }
5945
+ }
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"
5605
6087
  },
5606
6088
  {
5607
6089
  "kind": "Content",
@@ -5609,48 +6091,59 @@
5609
6091
  }
5610
6092
  ],
5611
6093
  "isReadonly": false,
5612
- "isOptional": false,
6094
+ "isOptional": true,
5613
6095
  "releaseTag": "Beta",
5614
- "name": "\"sub-agent-start\"",
6096
+ "name": "sessionKey",
5615
6097
  "propertyTypeTokenRange": {
5616
6098
  "startIndex": 1,
5617
- "endIndex": 3
5618
- }
6099
+ "endIndex": 2
6100
+ },
6101
+ "isStatic": false,
6102
+ "isProtected": false,
6103
+ "isAbstract": false
5619
6104
  },
5620
6105
  {
5621
- "kind": "PropertySignature",
5622
- "canonicalReference": "@genesislcap/ai-assistant!AiDriverEventMap#\"sub-agent-stop\":member",
5623
- "docComment": "/**\n * A sub-agent run ended.\n */\n",
6106
+ "kind": "Method",
6107
+ "canonicalReference": "@genesislcap/ai-assistant!AiNotificationLevel#sessionKeyChanged:member(1)",
6108
+ "docComment": "",
5624
6109
  "excerptTokens": [
5625
6110
  {
5626
6111
  "kind": "Content",
5627
- "text": "'sub-agent-stop': "
5628
- },
5629
- {
5630
- "kind": "Reference",
5631
- "text": "CustomEvent",
5632
- "canonicalReference": "!CustomEvent:interface"
6112
+ "text": "sessionKeyChanged(): "
5633
6113
  },
5634
6114
  {
5635
6115
  "kind": "Content",
5636
- "text": "<unknown>"
6116
+ "text": "void"
5637
6117
  },
5638
6118
  {
5639
6119
  "kind": "Content",
5640
6120
  "text": ";"
5641
6121
  }
5642
6122
  ],
5643
- "isReadonly": false,
5644
- "isOptional": false,
5645
- "releaseTag": "Beta",
5646
- "name": "\"sub-agent-stop\"",
5647
- "propertyTypeTokenRange": {
6123
+ "isStatic": false,
6124
+ "returnTypeTokenRange": {
5648
6125
  "startIndex": 1,
5649
- "endIndex": 3
5650
- }
6126
+ "endIndex": 2
6127
+ },
6128
+ "releaseTag": "Beta",
6129
+ "isProtected": false,
6130
+ "overloadIndex": 1,
6131
+ "parameters": [],
6132
+ "isOptional": false,
6133
+ "isAbstract": false,
6134
+ "name": "sessionKeyChanged"
5651
6135
  }
5652
6136
  ],
5653
- "extendsTokenRanges": []
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",
@@ -20504,6 +21052,46 @@
20504
21052
  "isAbstract": false,
20505
21053
  "name": "noteDebugLogInput"
20506
21054
  },
21055
+ {
21056
+ "kind": "Property",
21057
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#notificationLevel:member",
21058
+ "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",
21059
+ "excerptTokens": [
21060
+ {
21061
+ "kind": "Content",
21062
+ "text": "get notificationLevel(): "
21063
+ },
21064
+ {
21065
+ "kind": "Reference",
21066
+ "text": "AgentNotificationLevel",
21067
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationLevel:type"
21068
+ },
21069
+ {
21070
+ "kind": "Content",
21071
+ "text": ";\n\nset notificationLevel(value: "
21072
+ },
21073
+ {
21074
+ "kind": "Reference",
21075
+ "text": "AgentNotificationLevel",
21076
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationLevel:type"
21077
+ },
21078
+ {
21079
+ "kind": "Content",
21080
+ "text": ");"
21081
+ }
21082
+ ],
21083
+ "isReadonly": false,
21084
+ "isOptional": false,
21085
+ "releaseTag": "Beta",
21086
+ "name": "notificationLevel",
21087
+ "propertyTypeTokenRange": {
21088
+ "startIndex": 1,
21089
+ "endIndex": 2
21090
+ },
21091
+ "isStatic": false,
21092
+ "isProtected": false,
21093
+ "isAbstract": false
21094
+ },
20507
21095
  {
20508
21096
  "kind": "Method",
20509
21097
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#onChatHeaderMouseDown:member(1)",
@@ -26483,6 +27071,51 @@
26483
27071
  ],
26484
27072
  "name": "onSurfaceReady"
26485
27073
  },
27074
+ {
27075
+ "kind": "MethodSignature",
27076
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#requestAttention:member(1)",
27077
+ "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",
27078
+ "excerptTokens": [
27079
+ {
27080
+ "kind": "Content",
27081
+ "text": "requestAttention(message?: "
27082
+ },
27083
+ {
27084
+ "kind": "Content",
27085
+ "text": "string"
27086
+ },
27087
+ {
27088
+ "kind": "Content",
27089
+ "text": "): "
27090
+ },
27091
+ {
27092
+ "kind": "Content",
27093
+ "text": "void"
27094
+ },
27095
+ {
27096
+ "kind": "Content",
27097
+ "text": ";"
27098
+ }
27099
+ ],
27100
+ "isOptional": false,
27101
+ "returnTypeTokenRange": {
27102
+ "startIndex": 3,
27103
+ "endIndex": 4
27104
+ },
27105
+ "releaseTag": "Beta",
27106
+ "overloadIndex": 1,
27107
+ "parameters": [
27108
+ {
27109
+ "parameterName": "message",
27110
+ "parameterTypeTokenRange": {
27111
+ "startIndex": 1,
27112
+ "endIndex": 2
27113
+ },
27114
+ "isOptional": true
27115
+ }
27116
+ ],
27117
+ "name": "requestAttention"
27118
+ },
26486
27119
  {
26487
27120
  "kind": "MethodSignature",
26488
27121
  "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#resolve:member(1)",
@@ -26573,6 +27206,33 @@
26573
27206
  ],
26574
27207
  "name": "saveCheckpoint"
26575
27208
  },
27209
+ {
27210
+ "kind": "PropertySignature",
27211
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#sessionKey:member",
27212
+ "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",
27213
+ "excerptTokens": [
27214
+ {
27215
+ "kind": "Content",
27216
+ "text": "readonly sessionKey: "
27217
+ },
27218
+ {
27219
+ "kind": "Content",
27220
+ "text": "string"
27221
+ },
27222
+ {
27223
+ "kind": "Content",
27224
+ "text": ";"
27225
+ }
27226
+ ],
27227
+ "isReadonly": true,
27228
+ "isOptional": false,
27229
+ "releaseTag": "Beta",
27230
+ "name": "sessionKey",
27231
+ "propertyTypeTokenRange": {
27232
+ "startIndex": 1,
27233
+ "endIndex": 2
27234
+ }
27235
+ },
26576
27236
  {
26577
27237
  "kind": "PropertySignature",
26578
27238
  "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#state:member",
@@ -29887,6 +30547,48 @@
29887
30547
  "endIndex": 0
29888
30548
  }
29889
30549
  },
30550
+ {
30551
+ "kind": "Function",
30552
+ "canonicalReference": "@genesislcap/ai-assistant!requestAgentNotificationPermission:function(1)",
30553
+ "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",
30554
+ "excerptTokens": [
30555
+ {
30556
+ "kind": "Content",
30557
+ "text": "export declare function requestAgentNotificationPermission(): "
30558
+ },
30559
+ {
30560
+ "kind": "Reference",
30561
+ "text": "Promise",
30562
+ "canonicalReference": "!Promise:interface"
30563
+ },
30564
+ {
30565
+ "kind": "Content",
30566
+ "text": "<"
30567
+ },
30568
+ {
30569
+ "kind": "Reference",
30570
+ "text": "AgentNotificationPermission",
30571
+ "canonicalReference": "@genesislcap/ai-assistant!AgentNotificationPermission:type"
30572
+ },
30573
+ {
30574
+ "kind": "Content",
30575
+ "text": ">"
30576
+ },
30577
+ {
30578
+ "kind": "Content",
30579
+ "text": ";"
30580
+ }
30581
+ ],
30582
+ "fileUrlPath": "src/notifications/agent-notifications.ts",
30583
+ "returnTypeTokenRange": {
30584
+ "startIndex": 1,
30585
+ "endIndex": 5
30586
+ },
30587
+ "releaseTag": "Beta",
30588
+ "overloadIndex": 1,
30589
+ "parameters": [],
30590
+ "name": "requestAgentNotificationPermission"
30591
+ },
29890
30592
  {
29891
30593
  "kind": "Interface",
29892
30594
  "canonicalReference": "@genesislcap/ai-assistant!ResolvedDebugLogNoteConfig:interface",
@@ -31297,6 +31999,33 @@
31297
31999
  "endIndex": 2
31298
32000
  }
31299
32001
  },
32002
+ {
32003
+ "kind": "PropertySignature",
32004
+ "canonicalReference": "@genesislcap/ai-assistant!SessionPreferences#notificationLevel:member",
32005
+ "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",
32006
+ "excerptTokens": [
32007
+ {
32008
+ "kind": "Content",
32009
+ "text": "notificationLevel?: "
32010
+ },
32011
+ {
32012
+ "kind": "Content",
32013
+ "text": "string"
32014
+ },
32015
+ {
32016
+ "kind": "Content",
32017
+ "text": ";"
32018
+ }
32019
+ ],
32020
+ "isReadonly": false,
32021
+ "isOptional": true,
32022
+ "releaseTag": "Public",
32023
+ "name": "notificationLevel",
32024
+ "propertyTypeTokenRange": {
32025
+ "startIndex": 1,
32026
+ "endIndex": 2
32027
+ }
32028
+ },
31300
32029
  {
31301
32030
  "kind": "PropertySignature",
31302
32031
  "canonicalReference": "@genesislcap/ai-assistant!SessionPreferences#showAgentSwitchIndicator:member",