@genesislcap/ai-assistant 15.95.0 → 15.95.1-TROWE-845.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 (2) hide show
  1. package/dist/custom-elements.json +966 -966
  2. package/package.json +17 -17
@@ -5289,6 +5289,237 @@
5289
5289
  }
5290
5290
  ]
5291
5291
  },
5292
+ {
5293
+ "kind": "javascript-module",
5294
+ "path": "src/config/config.ts",
5295
+ "declarations": [
5296
+ {
5297
+ "kind": "function",
5298
+ "name": "defineAgent",
5299
+ "description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
5300
+ }
5301
+ ],
5302
+ "exports": [
5303
+ {
5304
+ "kind": "js",
5305
+ "name": "CachePolicy",
5306
+ "declaration": {
5307
+ "name": "CachePolicy",
5308
+ "module": "src/config/config.ts"
5309
+ }
5310
+ },
5311
+ {
5312
+ "kind": "js",
5313
+ "name": "ChatFallback",
5314
+ "declaration": {
5315
+ "name": "ChatFallback",
5316
+ "module": "src/config/config.ts"
5317
+ }
5318
+ },
5319
+ {
5320
+ "kind": "js",
5321
+ "name": "ChatInputDuringExecutionMode",
5322
+ "declaration": {
5323
+ "name": "ChatInputDuringExecutionMode",
5324
+ "module": "src/config/config.ts"
5325
+ }
5326
+ },
5327
+ {
5328
+ "kind": "js",
5329
+ "name": "ChatThinkingPolicy",
5330
+ "declaration": {
5331
+ "name": "ChatThinkingPolicy",
5332
+ "module": "src/config/config.ts"
5333
+ }
5334
+ },
5335
+ {
5336
+ "kind": "js",
5337
+ "name": "ChatToolChoice",
5338
+ "declaration": {
5339
+ "name": "ChatToolChoice",
5340
+ "module": "src/config/config.ts"
5341
+ }
5342
+ },
5343
+ {
5344
+ "kind": "js",
5345
+ "name": "defineAgent",
5346
+ "declaration": {
5347
+ "name": "defineAgent",
5348
+ "module": "src/config/config.ts"
5349
+ }
5350
+ }
5351
+ ]
5352
+ },
5353
+ {
5354
+ "kind": "javascript-module",
5355
+ "path": "src/config/define-stateful-agent.ts",
5356
+ "declarations": [
5357
+ {
5358
+ "kind": "function",
5359
+ "name": "restoreMachine",
5360
+ "return": {
5361
+ "type": {
5362
+ "text": "void"
5363
+ }
5364
+ },
5365
+ "parameters": [
5366
+ {
5367
+ "name": "machine",
5368
+ "type": {
5369
+ "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
5370
+ },
5371
+ "description": "the machine to restore (already constructed/started)."
5372
+ },
5373
+ {
5374
+ "name": "restored",
5375
+ "type": {
5376
+ "text": "unknown"
5377
+ },
5378
+ "description": "the agent's serialized image (`ctx.restored` in `init`)."
5379
+ },
5380
+ {
5381
+ "name": "key",
5382
+ "default": "'machine'",
5383
+ "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
5384
+ }
5385
+ ],
5386
+ "description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
5387
+ },
5388
+ {
5389
+ "kind": "function",
5390
+ "name": "defineStatefulAgent",
5391
+ "return": {
5392
+ "type": {
5393
+ "text": "AgentConfig"
5394
+ }
5395
+ },
5396
+ "parameters": [
5397
+ {
5398
+ "name": "opts",
5399
+ "type": {
5400
+ "text": "StatefulAgentInit<S>"
5401
+ }
5402
+ }
5403
+ ],
5404
+ "description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
5405
+ },
5406
+ {
5407
+ "kind": "function",
5408
+ "name": "defineAutopilot",
5409
+ "return": {
5410
+ "type": {
5411
+ "text": "AutopilotConfig<S>"
5412
+ }
5413
+ },
5414
+ "parameters": [
5415
+ {
5416
+ "name": "config",
5417
+ "type": {
5418
+ "text": "AutopilotConfig<S>"
5419
+ }
5420
+ }
5421
+ ],
5422
+ "description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
5423
+ }
5424
+ ],
5425
+ "exports": [
5426
+ {
5427
+ "kind": "js",
5428
+ "name": "restoreMachine",
5429
+ "declaration": {
5430
+ "name": "restoreMachine",
5431
+ "module": "src/config/define-stateful-agent.ts"
5432
+ }
5433
+ },
5434
+ {
5435
+ "kind": "js",
5436
+ "name": "defineStatefulAgent",
5437
+ "declaration": {
5438
+ "name": "defineStatefulAgent",
5439
+ "module": "src/config/define-stateful-agent.ts"
5440
+ }
5441
+ },
5442
+ {
5443
+ "kind": "js",
5444
+ "name": "defineAutopilot",
5445
+ "declaration": {
5446
+ "name": "defineAutopilot",
5447
+ "module": "src/config/define-stateful-agent.ts"
5448
+ }
5449
+ }
5450
+ ]
5451
+ },
5452
+ {
5453
+ "kind": "javascript-module",
5454
+ "path": "src/config/fallback-agents.ts",
5455
+ "declarations": [
5456
+ {
5457
+ "kind": "variable",
5458
+ "name": "friendlyFallbackAgent",
5459
+ "type": {
5460
+ "text": "FallbackAgentConfig"
5461
+ },
5462
+ "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
5463
+ "description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
5464
+ },
5465
+ {
5466
+ "kind": "variable",
5467
+ "name": "strictFallbackAgent",
5468
+ "type": {
5469
+ "text": "FallbackAgentConfig"
5470
+ },
5471
+ "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
5472
+ "description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
5473
+ }
5474
+ ],
5475
+ "exports": [
5476
+ {
5477
+ "kind": "js",
5478
+ "name": "friendlyFallbackAgent",
5479
+ "declaration": {
5480
+ "name": "friendlyFallbackAgent",
5481
+ "module": "src/config/fallback-agents.ts"
5482
+ }
5483
+ },
5484
+ {
5485
+ "kind": "js",
5486
+ "name": "strictFallbackAgent",
5487
+ "declaration": {
5488
+ "name": "strictFallbackAgent",
5489
+ "module": "src/config/fallback-agents.ts"
5490
+ }
5491
+ }
5492
+ ]
5493
+ },
5494
+ {
5495
+ "kind": "javascript-module",
5496
+ "path": "src/config/index.ts",
5497
+ "declarations": [],
5498
+ "exports": [
5499
+ {
5500
+ "kind": "js",
5501
+ "name": "*",
5502
+ "declaration": {
5503
+ "name": "*",
5504
+ "package": "./config"
5505
+ }
5506
+ },
5507
+ {
5508
+ "kind": "js",
5509
+ "name": "*",
5510
+ "declaration": {
5511
+ "name": "*",
5512
+ "package": "./fallback-agents"
5513
+ }
5514
+ }
5515
+ ]
5516
+ },
5517
+ {
5518
+ "kind": "javascript-module",
5519
+ "path": "src/config/validate-providers.ts",
5520
+ "declarations": [],
5521
+ "exports": []
5522
+ },
5292
5523
  {
5293
5524
  "kind": "javascript-module",
5294
5525
  "path": "src/components/flowing-waves-indicator.ts",
@@ -5815,254 +6046,23 @@
5815
6046
  },
5816
6047
  {
5817
6048
  "kind": "javascript-module",
5818
- "path": "src/config/config.ts",
6049
+ "path": "src/genesis/calendar.ts",
6050
+ "declarations": [],
6051
+ "exports": []
6052
+ },
6053
+ {
6054
+ "kind": "javascript-module",
6055
+ "path": "src/genesis/config.ts",
5819
6056
  "declarations": [
5820
6057
  {
5821
- "kind": "function",
5822
- "name": "defineAgent",
5823
- "description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
5824
- }
5825
- ],
5826
- "exports": [
5827
- {
5828
- "kind": "js",
5829
- "name": "CachePolicy",
5830
- "declaration": {
5831
- "name": "CachePolicy",
5832
- "module": "src/config/config.ts"
5833
- }
5834
- },
5835
- {
5836
- "kind": "js",
5837
- "name": "ChatFallback",
5838
- "declaration": {
5839
- "name": "ChatFallback",
5840
- "module": "src/config/config.ts"
5841
- }
5842
- },
5843
- {
5844
- "kind": "js",
5845
- "name": "ChatInputDuringExecutionMode",
5846
- "declaration": {
5847
- "name": "ChatInputDuringExecutionMode",
5848
- "module": "src/config/config.ts"
5849
- }
5850
- },
5851
- {
5852
- "kind": "js",
5853
- "name": "ChatThinkingPolicy",
5854
- "declaration": {
5855
- "name": "ChatThinkingPolicy",
5856
- "module": "src/config/config.ts"
5857
- }
5858
- },
5859
- {
5860
- "kind": "js",
5861
- "name": "ChatToolChoice",
5862
- "declaration": {
5863
- "name": "ChatToolChoice",
5864
- "module": "src/config/config.ts"
5865
- }
5866
- },
5867
- {
5868
- "kind": "js",
5869
- "name": "defineAgent",
5870
- "declaration": {
5871
- "name": "defineAgent",
5872
- "module": "src/config/config.ts"
5873
- }
5874
- }
5875
- ]
5876
- },
5877
- {
5878
- "kind": "javascript-module",
5879
- "path": "src/config/define-stateful-agent.ts",
5880
- "declarations": [
5881
- {
5882
- "kind": "function",
5883
- "name": "restoreMachine",
5884
- "return": {
5885
- "type": {
5886
- "text": "void"
5887
- }
5888
- },
5889
- "parameters": [
5890
- {
5891
- "name": "machine",
5892
- "type": {
5893
- "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
5894
- },
5895
- "description": "the machine to restore (already constructed/started)."
5896
- },
5897
- {
5898
- "name": "restored",
5899
- "type": {
5900
- "text": "unknown"
5901
- },
5902
- "description": "the agent's serialized image (`ctx.restored` in `init`)."
5903
- },
5904
- {
5905
- "name": "key",
5906
- "default": "'machine'",
5907
- "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
5908
- }
5909
- ],
5910
- "description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
5911
- },
5912
- {
5913
- "kind": "function",
5914
- "name": "defineStatefulAgent",
5915
- "return": {
5916
- "type": {
5917
- "text": "AgentConfig"
5918
- }
5919
- },
5920
- "parameters": [
5921
- {
5922
- "name": "opts",
5923
- "type": {
5924
- "text": "StatefulAgentInit<S>"
5925
- }
5926
- }
5927
- ],
5928
- "description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
5929
- },
5930
- {
5931
- "kind": "function",
5932
- "name": "defineAutopilot",
5933
- "return": {
5934
- "type": {
5935
- "text": "AutopilotConfig<S>"
5936
- }
5937
- },
5938
- "parameters": [
5939
- {
5940
- "name": "config",
5941
- "type": {
5942
- "text": "AutopilotConfig<S>"
5943
- }
5944
- }
5945
- ],
5946
- "description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
5947
- }
5948
- ],
5949
- "exports": [
5950
- {
5951
- "kind": "js",
5952
- "name": "restoreMachine",
5953
- "declaration": {
5954
- "name": "restoreMachine",
5955
- "module": "src/config/define-stateful-agent.ts"
5956
- }
5957
- },
5958
- {
5959
- "kind": "js",
5960
- "name": "defineStatefulAgent",
5961
- "declaration": {
5962
- "name": "defineStatefulAgent",
5963
- "module": "src/config/define-stateful-agent.ts"
5964
- }
5965
- },
5966
- {
5967
- "kind": "js",
5968
- "name": "defineAutopilot",
5969
- "declaration": {
5970
- "name": "defineAutopilot",
5971
- "module": "src/config/define-stateful-agent.ts"
5972
- }
5973
- }
5974
- ]
5975
- },
5976
- {
5977
- "kind": "javascript-module",
5978
- "path": "src/config/fallback-agents.ts",
5979
- "declarations": [
5980
- {
5981
- "kind": "variable",
5982
- "name": "friendlyFallbackAgent",
5983
- "type": {
5984
- "text": "FallbackAgentConfig"
5985
- },
5986
- "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
5987
- "description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
5988
- },
5989
- {
5990
- "kind": "variable",
5991
- "name": "strictFallbackAgent",
5992
- "type": {
5993
- "text": "FallbackAgentConfig"
5994
- },
5995
- "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
5996
- "description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
5997
- }
5998
- ],
5999
- "exports": [
6000
- {
6001
- "kind": "js",
6002
- "name": "friendlyFallbackAgent",
6003
- "declaration": {
6004
- "name": "friendlyFallbackAgent",
6005
- "module": "src/config/fallback-agents.ts"
6006
- }
6007
- },
6008
- {
6009
- "kind": "js",
6010
- "name": "strictFallbackAgent",
6011
- "declaration": {
6012
- "name": "strictFallbackAgent",
6013
- "module": "src/config/fallback-agents.ts"
6014
- }
6015
- }
6016
- ]
6017
- },
6018
- {
6019
- "kind": "javascript-module",
6020
- "path": "src/config/index.ts",
6021
- "declarations": [],
6022
- "exports": [
6023
- {
6024
- "kind": "js",
6025
- "name": "*",
6026
- "declaration": {
6027
- "name": "*",
6028
- "package": "./config"
6029
- }
6030
- },
6031
- {
6032
- "kind": "js",
6033
- "name": "*",
6034
- "declaration": {
6035
- "name": "*",
6036
- "package": "./fallback-agents"
6037
- }
6038
- }
6039
- ]
6040
- },
6041
- {
6042
- "kind": "javascript-module",
6043
- "path": "src/config/validate-providers.ts",
6044
- "declarations": [],
6045
- "exports": []
6046
- },
6047
- {
6048
- "kind": "javascript-module",
6049
- "path": "src/genesis/calendar.ts",
6050
- "declarations": [],
6051
- "exports": []
6052
- },
6053
- {
6054
- "kind": "javascript-module",
6055
- "path": "src/genesis/config.ts",
6056
- "declarations": [
6057
- {
6058
- "kind": "variable",
6059
- "name": "DEFAULT_MAX_ROWS",
6060
- "type": {
6061
- "text": "number"
6062
- },
6063
- "default": "50",
6064
- "description": "The default read cap, and the ceiling the config may raise it to."
6065
- },
6058
+ "kind": "variable",
6059
+ "name": "DEFAULT_MAX_ROWS",
6060
+ "type": {
6061
+ "text": "number"
6062
+ },
6063
+ "default": "50",
6064
+ "description": "The default read cap, and the ceiling the config may raise it to."
6065
+ },
6066
6066
  {
6067
6067
  "kind": "variable",
6068
6068
  "name": "MAX_ROWS_CEILING",
@@ -9025,885 +9025,447 @@
9025
9025
  },
9026
9026
  {
9027
9027
  "kind": "javascript-module",
9028
- "path": "src/notifications/agent-notifications.ts",
9029
- "declarations": [
9030
- {
9031
- "kind": "variable",
9032
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9033
- "type": {
9034
- "text": "string"
9035
- },
9036
- "default": "'The assistant is ready for your next input'",
9037
- "description": "The notification's text when neither the app nor the widget gives one."
9038
- },
9039
- {
9040
- "kind": "function",
9041
- "name": "agentNotificationPermission",
9042
- "return": {
9043
- "type": {
9044
- "text": "AgentNotificationPermission"
9045
- }
9046
- },
9047
- "description": "Whether this page may show notifications. Safe to call anywhere, including Node."
9048
- },
9049
- {
9050
- "kind": "function",
9051
- "name": "requestAgentNotificationPermission",
9052
- "return": {
9053
- "type": {
9054
- "text": "Promise<AgentNotificationPermission>"
9055
- }
9056
- },
9057
- "description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
9058
- }
9059
- ],
9060
- "exports": [
9061
- {
9062
- "kind": "js",
9063
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9064
- "declaration": {
9065
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9066
- "module": "src/notifications/agent-notifications.ts"
9067
- }
9068
- },
9069
- {
9070
- "kind": "js",
9071
- "name": "agentNotificationPermission",
9072
- "declaration": {
9073
- "name": "agentNotificationPermission",
9074
- "module": "src/notifications/agent-notifications.ts"
9075
- }
9076
- },
9077
- {
9078
- "kind": "js",
9079
- "name": "requestAgentNotificationPermission",
9080
- "declaration": {
9081
- "name": "requestAgentNotificationPermission",
9082
- "module": "src/notifications/agent-notifications.ts"
9083
- }
9084
- }
9085
- ]
9028
+ "path": "src/main/attachment-controller.ts",
9029
+ "declarations": [],
9030
+ "exports": []
9086
9031
  },
9087
9032
  {
9088
9033
  "kind": "javascript-module",
9089
- "path": "src/notifications/agent-notifier.ts",
9034
+ "path": "src/main/budget-controller.ts",
9090
9035
  "declarations": [],
9091
9036
  "exports": []
9092
9037
  },
9093
9038
  {
9094
9039
  "kind": "javascript-module",
9095
- "path": "src/notifications/index.ts",
9040
+ "path": "src/main/composer-menu-controller.ts",
9041
+ "declarations": [],
9042
+ "exports": []
9043
+ },
9044
+ {
9045
+ "kind": "javascript-module",
9046
+ "path": "src/main/composer-resize-controller.ts",
9047
+ "declarations": [],
9048
+ "exports": []
9049
+ },
9050
+ {
9051
+ "kind": "javascript-module",
9052
+ "path": "src/main/context-gate-controller.ts",
9053
+ "declarations": [],
9054
+ "exports": []
9055
+ },
9056
+ {
9057
+ "kind": "javascript-module",
9058
+ "path": "src/main/cost-ledger-controller.ts",
9059
+ "declarations": [],
9060
+ "exports": []
9061
+ },
9062
+ {
9063
+ "kind": "javascript-module",
9064
+ "path": "src/main/index.ts",
9096
9065
  "declarations": [],
9097
9066
  "exports": [
9098
9067
  {
9099
9068
  "kind": "js",
9100
- "name": "agentNotificationPermission",
9101
- "declaration": {
9102
- "name": "agentNotificationPermission",
9103
- "module": "./agent-notifications"
9104
- }
9105
- },
9106
- {
9107
- "kind": "js",
9108
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9109
- "declaration": {
9110
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9111
- "module": "./agent-notifications"
9112
- }
9113
- },
9114
- {
9115
- "kind": "js",
9116
- "name": "requestAgentNotificationPermission",
9117
- "declaration": {
9118
- "name": "requestAgentNotificationPermission",
9119
- "module": "./agent-notifications"
9120
- }
9121
- },
9122
- {
9123
- "kind": "js",
9124
- "name": "type",
9125
- "declaration": {
9126
- "name": "type",
9127
- "module": "./agent-notifications"
9128
- }
9129
- },
9130
- {
9131
- "kind": "js",
9132
- "name": "AgentAttentionDetail",
9133
- "declaration": {
9134
- "name": "AgentAttentionDetail",
9135
- "module": "./agent-notifications"
9136
- }
9137
- },
9138
- {
9139
- "kind": "js",
9140
- "name": "type",
9141
- "declaration": {
9142
- "name": "type",
9143
- "module": "./agent-notifications"
9144
- }
9145
- },
9146
- {
9147
- "kind": "js",
9148
- "name": "AgentAttentionKind",
9149
- "declaration": {
9150
- "name": "AgentAttentionKind",
9151
- "module": "./agent-notifications"
9152
- }
9153
- },
9154
- {
9155
- "kind": "js",
9156
- "name": "type",
9157
- "declaration": {
9158
- "name": "type",
9159
- "module": "./agent-notifications"
9160
- }
9161
- },
9162
- {
9163
- "kind": "js",
9164
- "name": "AgentNotificationLevel",
9069
+ "name": "*",
9165
9070
  "declaration": {
9166
- "name": "AgentNotificationLevel",
9167
- "module": "./agent-notifications"
9071
+ "name": "*",
9072
+ "package": "./main.template"
9168
9073
  }
9169
9074
  },
9170
9075
  {
9171
9076
  "kind": "js",
9172
- "name": "type",
9077
+ "name": "*",
9173
9078
  "declaration": {
9174
- "name": "type",
9175
- "module": "./agent-notifications"
9079
+ "name": "*",
9080
+ "package": "./main"
9176
9081
  }
9177
9082
  },
9178
9083
  {
9179
9084
  "kind": "js",
9180
- "name": "AgentNotificationPermission",
9085
+ "name": "*",
9181
9086
  "declaration": {
9182
- "name": "AgentNotificationPermission",
9183
- "module": "./agent-notifications"
9087
+ "name": "*",
9088
+ "package": "./main.types"
9184
9089
  }
9185
9090
  }
9186
9091
  ]
9187
9092
  },
9188
9093
  {
9189
9094
  "kind": "javascript-module",
9190
- "path": "src/notifications/notification-level-picker.template.ts",
9191
- "declarations": [],
9192
- "exports": []
9193
- },
9194
- {
9195
- "kind": "javascript-module",
9196
- "path": "src/notifications/notification-settings.ts",
9197
- "declarations": [],
9198
- "exports": []
9199
- },
9200
- {
9201
- "kind": "javascript-module",
9202
- "path": "src/provider/ai-provider-switcher.ts",
9095
+ "path": "src/main/main.styles.ts",
9203
9096
  "declarations": [
9204
9097
  {
9205
9098
  "kind": "variable",
9206
- "name": "AIProviderSwitcher",
9207
- "description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
9099
+ "name": "styles",
9100
+ "default": "css`\n ${baseStyles}\n ${\n /* The session menu's rows. Same partial the agent picker imports into its own\n shadow root — the one thing that keeps the two menus looking alike. */ ''\n }\n ${menuItemStyles}\n ${settingsModalStyles}\n`"
9208
9101
  }
9209
9102
  ],
9210
9103
  "exports": [
9211
9104
  {
9212
9105
  "kind": "js",
9213
- "name": "AIProviderSwitcher",
9106
+ "name": "styles",
9214
9107
  "declaration": {
9215
- "name": "AIProviderSwitcher",
9216
- "module": "src/provider/ai-provider-switcher.ts"
9108
+ "name": "styles",
9109
+ "module": "src/main/main.styles.ts"
9217
9110
  }
9218
9111
  }
9219
9112
  ]
9220
9113
  },
9221
9114
  {
9222
9115
  "kind": "javascript-module",
9223
- "path": "src/provider/assistant-app-settings.ts",
9116
+ "path": "src/main/main.template.ts",
9224
9117
  "declarations": [
9225
9118
  {
9226
9119
  "kind": "variable",
9227
- "name": "AssistantAppSettingsProvider",
9228
- "description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
9120
+ "name": "messageTimestampTemplate",
9121
+ "default": "html<ChatMessage, FoundationAiAssistant>`\n <time\n class=\"message-timestamp\"\n part=\"message-timestamp\"\n datetime=\"${(m) => messageTimestampDateTime(m.timestamp)}\"\n >\n <span aria-hidden=\"true\">\n ${(m, c) => formatMessageTimestamp(m.timestamp, c.parent.timestampClock)}\n </span>\n <span class=\"visually-hidden\">${(m) => formatAbsoluteTimestamp(m.timestamp)}</span>\n </time>\n`",
9122
+ "description": "The timestamp shown beside the sender name (GENC-1257).\n\nTwo strings, not one. A screen reader announces a `<time>` element's TEXT — it has no\nimplicit ARIA role, and the `datetime` attribute is never surfaced to the user — so the\nrelative text is hidden from assistive tech and paired with a visually-hidden absolute\nstring. Otherwise AT would hear \"5 minutes ago\" with nothing to anchor it, and in\n`'hover'` mode would hear it for a timestamp sighted users never asked to see.\n`datetime` stays because it is correct HTML and useful to tooling, not for a11y.\n\nOnly the VISUAL reveal is hover-gated, in CSS — see `.message-timestamp`. `opacity: 0`\nleaves the element in the accessibility tree, so AT gets a time in both visible modes;\n`'off'` is the only mode that removes it.\n\nReads `timestampClock` rather than `Date.now()` so every row shares one invalidatable\nclock and a tick re-evaluates them all; see `FoundationAiAssistant.timestampClock`."
9123
+ },
9124
+ {
9125
+ "kind": "function",
9126
+ "name": "FoundationAiAssistantTemplate",
9127
+ "return": {
9128
+ "type": {
9129
+ "text": "ViewTemplate<FoundationAiAssistant>"
9130
+ }
9131
+ },
9132
+ "parameters": [
9133
+ {
9134
+ "name": "designSystemPrefix",
9135
+ "type": {
9136
+ "text": "string"
9137
+ }
9138
+ }
9139
+ ]
9229
9140
  }
9230
9141
  ],
9231
9142
  "exports": [
9232
9143
  {
9233
9144
  "kind": "js",
9234
- "name": "AssistantAppSettingsProvider",
9145
+ "name": "messageTimestampTemplate",
9235
9146
  "declaration": {
9236
- "name": "AssistantAppSettingsProvider",
9237
- "module": "src/provider/assistant-app-settings.ts"
9147
+ "name": "messageTimestampTemplate",
9148
+ "module": "src/main/main.template.ts"
9149
+ }
9150
+ },
9151
+ {
9152
+ "kind": "js",
9153
+ "name": "FoundationAiAssistantTemplate",
9154
+ "declaration": {
9155
+ "name": "FoundationAiAssistantTemplate",
9156
+ "module": "src/main/main.template.ts"
9238
9157
  }
9239
9158
  }
9240
9159
  ]
9241
9160
  },
9242
9161
  {
9243
9162
  "kind": "javascript-module",
9244
- "path": "src/provider/tiered-provider-switcher.ts",
9163
+ "path": "src/main/main.ts",
9245
9164
  "declarations": [
9165
+ {
9166
+ "kind": "variable",
9167
+ "name": "sparkleIconSvg",
9168
+ "default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
9169
+ "description": "Three-star AI \"sparkle\" mark — the conventional AI signifier; default assistant avatar."
9170
+ },
9171
+ {
9172
+ "kind": "variable",
9173
+ "name": "userIconSvg",
9174
+ "default": "`<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>`",
9175
+ "description": "Person silhouette — default user avatar."
9176
+ },
9177
+ {
9178
+ "kind": "variable",
9179
+ "name": "genesisIconSvg",
9180
+ "default": "`<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>`",
9181
+ "description": "Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark)."
9182
+ },
9246
9183
  {
9247
9184
  "kind": "class",
9248
- "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
9249
- "name": "TieredAIProviderSwitcher",
9185
+ "description": "Foundation AI Assistant component.",
9186
+ "name": "FoundationAiAssistant",
9250
9187
  "members": [
9251
9188
  {
9252
9189
  "kind": "field",
9253
- "name": "vendors",
9254
- "type": {
9255
- "text": "readonly AITierVendor[]"
9256
- },
9257
- "readonly": true
9190
+ "name": "composerResize",
9191
+ "privacy": "private",
9192
+ "readonly": true,
9193
+ "default": "new ComposerResizeController({\n enabled: () => this.chatConfig.ui?.resizableInput !== false,\n inputEl: () => this.chatInputEl,\n messagesEl: () => this.messagesEl,\n })"
9258
9194
  },
9259
9195
  {
9260
9196
  "kind": "field",
9261
- "name": "options",
9262
- "type": {
9263
- "text": "TieredAIProviderSwitcherOptions"
9264
- },
9197
+ "name": "composerMenus",
9265
9198
  "privacy": "private",
9266
9199
  "readonly": true,
9267
- "default": "options"
9200
+ "default": "new ComposerMenuController(this, {\n agentPickerOpen: this.accessor('agentPickerOpen'),\n sessionMenuOpen: this.accessor('sessionMenuOpen'),\n focusInput: () => this.chatInputEl?.focus(),\n resetSessionConfirmations: () => {\n this.confirmingClear = false;\n this.confirmingCompact = false;\n },\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
9268
9201
  },
9269
9202
  {
9270
9203
  "kind": "field",
9271
- "name": "defaultTier",
9272
- "type": {
9273
- "text": "AITierId"
9274
- },
9204
+ "name": "attachmentCtrl",
9275
9205
  "privacy": "private",
9276
- "readonly": true
9206
+ "readonly": true,
9207
+ "default": "new AttachmentController(this, {\n acceptedFiles: () => this.chatConfig.ui?.acceptedFiles,\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
9277
9208
  },
9278
9209
  {
9279
9210
  "kind": "field",
9280
- "name": "registry",
9281
- "type": {
9282
- "text": "MutableAIProviderRegistry"
9283
- },
9211
+ "name": "contextGateCtrl",
9284
9212
  "privacy": "private",
9285
- "readonly": true
9213
+ "readonly": true,
9214
+ "default": "new ContextGateController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n gateContextTokens: () => this._gateContextTokens,\n contextReserve: () => this.contextReserve,\n preambleTokens: () => this.driver?.getPreambleTokens?.(),\n compactionPlanFor: (options) => this.driver?.getCompactionPlan?.(options) ?? null,\n bannerVisible: () => this.bannerVisible,\n effectiveBlockedReason: () => this.effectiveBlockedReason,\n flowOwnerAgentName: () => this.flowOwnerAgentName,\n })",
9215
+ "description": "Pure derivation — owns no state. Reaches the driver only through the two\ncallbacks below, so it stays clear of the stateful-agent surface (§11.2\nconstraint 2) and of redux entirely."
9286
9216
  },
9287
9217
  {
9288
9218
  "kind": "field",
9289
- "name": "listeners",
9219
+ "name": "costLedger",
9290
9220
  "privacy": "private",
9291
9221
  "readonly": true,
9292
- "default": "new Set<(vendor: AITierVendor) => void>()"
9222
+ "default": "new CostLedgerController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n sessionUsage: () => this.sessionUsage,\n providerStatuses: () => this.providerStatuses,\n persistenceActive: () => this.persistenceActive,\n stateKey: () => this.getStateKey(),\n headerTitle: () => this.headerTitle,\n provider: () => this.persistence.provider,\n elementId: () => this.id,\n })",
9223
+ "description": "Cost accounting and the persisted build-history ledger (GENC-1475). Reads the live\nsession through callbacks and owns the rows, the load/write latches and the debounce\ntimer — the element keeps only the names the settings modal binds."
9293
9224
  },
9294
9225
  {
9295
9226
  "kind": "field",
9296
- "name": "_vendor",
9227
+ "name": "budget",
9228
+ "privacy": "private",
9229
+ "readonly": true,
9230
+ "default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
9231
+ "description": "The AI-spend budget: vendor walls, the derived composer lock, the banner copy\nand the settings meter (GENC-1464).\n\nTakes the session store itself rather than a callback per field — see\n`BudgetDeps` for why this one differs from its siblings."
9232
+ },
9233
+ {
9234
+ "kind": "field",
9235
+ "name": "settings",
9236
+ "privacy": "private",
9237
+ "readonly": true,
9238
+ "default": "new SettingsModalController({\n chatConfig: () => this.chatConfig,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n budgetUsageVisible: () => this.budget.settingsUsageVisible,\n costConfig: () => this.costLedger.config,\n costHistoryLength: () => this.costLedger.history.length,\n liveCostSessionTitle: () => this.costLedger.liveTitle,\n providerStatusCount: () => this.providerStatuses.length,\n sessionRef: () => this._sessionRef,\n stateKey: () => this.getStateKey(),\n popoutMode: () => this.popoutMode,\n headerTitle: () => this.headerTitle,\n appSettingsProvider: () => this.appSettingsProvider,\n modal: () => this.settingsModal,\n tabsEl: () => this.settingsTabsEl,\n requestBudgetRefresh: () => this.requestBudgetRefresh(),\n logMeta: (type, detail) => this.logMeta(type, detail),\n })",
9239
+ "description": "The settings modal (`docs/code-health.md` §3). Reaches the two design-system\nrefs through callbacks, because the template writes them by name — see\n`SettingsModalDeps`."
9240
+ },
9241
+ {
9242
+ "kind": "field",
9243
+ "name": "providerRegistry",
9297
9244
  "type": {
9298
- "text": "AITierVendor"
9245
+ "text": "AIProviderRegistry"
9246
+ }
9247
+ },
9248
+ {
9249
+ "kind": "field",
9250
+ "name": "appSettingsProvider",
9251
+ "type": {
9252
+ "text": "AssistantAppSettingsProvider"
9253
+ }
9254
+ },
9255
+ {
9256
+ "kind": "field",
9257
+ "name": "designSystemPrefix",
9258
+ "type": {
9259
+ "text": "string"
9299
9260
  },
9300
- "privacy": "private"
9261
+ "default": "'rapid'"
9301
9262
  },
9302
9263
  {
9303
9264
  "kind": "field",
9304
- "name": "vendor",
9265
+ "name": "headerTitle",
9305
9266
  "type": {
9306
- "text": "AITierVendor"
9267
+ "text": "string"
9307
9268
  },
9308
- "readonly": true
9269
+ "default": "'Genesis Assistant'"
9309
9270
  },
9310
9271
  {
9311
- "kind": "method",
9312
- "name": "switchTo",
9313
- "return": {
9314
- "type": {
9315
- "text": "void"
9316
- }
9272
+ "kind": "field",
9273
+ "name": "sessionKey",
9274
+ "type": {
9275
+ "text": "string | undefined"
9317
9276
  },
9318
- "parameters": [
9319
- {
9320
- "name": "vendor",
9321
- "type": {
9322
- "text": "string"
9323
- }
9324
- }
9325
- ],
9326
- "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
9277
+ "description": "Explicit session/persistence key (GENC-1351 §5.12). When set, this is the\nsession identity — the key for the driver/store/persister/diagnostics\nregistries and the `sessionKey` passed to the persistence provider — taking\nprecedence over the DOM `id`. A host that scopes persistence per-entity\n(e.g. one chat session per project) binds this to a stable per-entity id;\nchanging it on a **connected** element re-keys the session in place — tears\ndown the current conversation and restores the new key's — via\n`switchSession`. Falls back to `id` when unset,\nso existing consumers are unaffected."
9278
+ },
9279
+ {
9280
+ "kind": "field",
9281
+ "name": "imageSrc",
9282
+ "type": {
9283
+ "text": "string | undefined"
9284
+ }
9285
+ },
9286
+ {
9287
+ "kind": "field",
9288
+ "name": "userImageSrc",
9289
+ "type": {
9290
+ "text": "string | undefined"
9291
+ }
9292
+ },
9293
+ {
9294
+ "kind": "field",
9295
+ "name": "assistantIcon",
9296
+ "type": {
9297
+ "text": "string | undefined"
9298
+ },
9299
+ "description": "Inline SVG markup overriding the default assistant \"sparkle\" avatar. The\nmarkup is sanitized (SVG profile) before rendering and uses the avatar's\ntheme colour via `currentColor`. For a raster/photo avatar set `imageSrc`\ninstead, which takes precedence. Set to `genesisIconSvg` to restore the\nGenesis G-mark."
9300
+ },
9301
+ {
9302
+ "kind": "field",
9303
+ "name": "assistantIconSafe",
9304
+ "type": {
9305
+ "text": "string"
9306
+ },
9307
+ "default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
9308
+ "description": "Sanitized `assistantIcon`, or the default sparkle mark; bound into the template. @internal"
9327
9309
  },
9328
9310
  {
9329
9311
  "kind": "method",
9330
- "name": "adoptPersistedVendor",
9312
+ "name": "assistantIconChanged",
9313
+ "privacy": "protected",
9331
9314
  "return": {
9332
9315
  "type": {
9333
9316
  "text": "void"
9334
9317
  }
9318
+ }
9319
+ },
9320
+ {
9321
+ "kind": "field",
9322
+ "name": "userIcon",
9323
+ "type": {
9324
+ "text": "string | undefined"
9335
9325
  },
9336
- "parameters": [
9337
- {
9338
- "name": "vendor",
9339
- "type": {
9340
- "text": "string"
9341
- }
9342
- }
9343
- ],
9344
- "description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
9326
+ "description": "Inline SVG markup overriding the default user \"person\" avatar. The markup is\nsanitized (SVG profile) before rendering and uses the avatar's theme colour\nvia `currentColor`. For a raster/photo avatar set `userImageSrc` instead,\nwhich takes precedence."
9345
9327
  },
9346
9328
  {
9347
- "kind": "method",
9348
- "name": "subscribe",
9349
- "return": {
9350
- "type": {
9351
- "text": "() => void"
9352
- }
9329
+ "kind": "field",
9330
+ "name": "userIconSafe",
9331
+ "type": {
9332
+ "text": "string"
9353
9333
  },
9354
- "parameters": [
9355
- {
9356
- "name": "listener",
9357
- "type": {
9358
- "text": "(vendor: string) => void"
9359
- }
9360
- }
9361
- ]
9334
+ "default": "`<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>`",
9335
+ "description": "Sanitized `userIcon`, or the default person mark; bound into the template. @internal"
9362
9336
  },
9363
9337
  {
9364
9338
  "kind": "method",
9365
- "name": "apply",
9366
- "privacy": "private",
9339
+ "name": "userIconChanged",
9340
+ "privacy": "protected",
9367
9341
  "return": {
9368
9342
  "type": {
9369
9343
  "text": "void"
9370
9344
  }
9345
+ }
9346
+ },
9347
+ {
9348
+ "kind": "field",
9349
+ "name": "placeholder",
9350
+ "type": {
9351
+ "text": "string"
9371
9352
  },
9372
- "parameters": [
9373
- {
9374
- "name": "vendor",
9375
- "type": {
9376
- "text": "AITierVendor"
9377
- }
9378
- }
9379
- ],
9380
- "description": "The registry move both entry points share, and nothing else."
9353
+ "default": "'Message assistant...'"
9381
9354
  },
9382
9355
  {
9383
- "kind": "method",
9384
- "name": "build",
9385
- "privacy": "private",
9386
- "return": {
9387
- "type": {
9388
- "text": "Record<string, AIProvider>"
9389
- }
9356
+ "kind": "field",
9357
+ "name": "popoutMode",
9358
+ "type": {
9359
+ "text": "PopoutMode | undefined"
9390
9360
  },
9391
- "parameters": [
9392
- {
9393
- "name": "vendor",
9394
- "type": {
9395
- "text": "AITierVendor"
9396
- }
9397
- }
9398
- ]
9361
+ "description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change)."
9399
9362
  },
9400
9363
  {
9401
- "kind": "method",
9402
- "name": "isKnownVendor",
9403
- "privacy": "private",
9404
- "return": {
9405
- "type": {
9406
- "text": "vendor is AITierVendor"
9407
- }
9364
+ "kind": "field",
9365
+ "name": "closable",
9366
+ "type": {
9367
+ "text": "boolean"
9408
9368
  },
9409
- "parameters": [
9410
- {
9411
- "name": "vendor",
9412
- "type": {
9413
- "text": "string"
9414
- }
9415
- }
9416
- ]
9417
- }
9418
- ]
9419
- },
9420
- {
9421
- "kind": "function",
9422
- "name": "registerTieredAIProviders",
9423
- "return": {
9424
- "type": {
9425
- "text": "TieredAIProviderSwitcher"
9426
- }
9427
- },
9428
- "parameters": [
9369
+ "default": "false",
9370
+ "description": "Shows a Close button in the header, which fires `close-requested` and leaves the closing to\nwhatever holds the assistant. The chat bubble sets it while the assistant is in its dialog."
9371
+ },
9429
9372
  {
9430
- "name": "container",
9373
+ "kind": "field",
9374
+ "name": "agents",
9431
9375
  "type": {
9432
- "text": "Container"
9433
- }
9376
+ "text": "AgentConfig[] | undefined"
9377
+ },
9378
+ "description": "Agent configuration. Each user message is routed to the appropriate specialist\nbased on intent. With a single entry, orchestration is skipped."
9434
9379
  },
9435
9380
  {
9436
- "name": "options",
9381
+ "kind": "field",
9382
+ "name": "chatConfig",
9437
9383
  "type": {
9438
- "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
9439
- }
9440
- }
9441
- ],
9442
- "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
9443
- }
9444
- ],
9445
- "exports": [
9446
- {
9447
- "kind": "js",
9448
- "name": "TieredAIProviderSwitcher",
9449
- "declaration": {
9450
- "name": "TieredAIProviderSwitcher",
9451
- "module": "src/provider/tiered-provider-switcher.ts"
9452
- }
9453
- },
9454
- {
9455
- "kind": "js",
9456
- "name": "registerTieredAIProviders",
9457
- "declaration": {
9458
- "name": "registerTieredAIProviders",
9459
- "module": "src/provider/tiered-provider-switcher.ts"
9460
- }
9461
- }
9462
- ]
9463
- },
9464
- {
9465
- "kind": "javascript-module",
9466
- "path": "src/main/attachment-controller.ts",
9467
- "declarations": [],
9468
- "exports": []
9469
- },
9470
- {
9471
- "kind": "javascript-module",
9472
- "path": "src/main/budget-controller.ts",
9473
- "declarations": [],
9474
- "exports": []
9475
- },
9476
- {
9477
- "kind": "javascript-module",
9478
- "path": "src/main/composer-menu-controller.ts",
9479
- "declarations": [],
9480
- "exports": []
9481
- },
9482
- {
9483
- "kind": "javascript-module",
9484
- "path": "src/main/composer-resize-controller.ts",
9485
- "declarations": [],
9486
- "exports": []
9487
- },
9488
- {
9489
- "kind": "javascript-module",
9490
- "path": "src/main/context-gate-controller.ts",
9491
- "declarations": [],
9492
- "exports": []
9493
- },
9494
- {
9495
- "kind": "javascript-module",
9496
- "path": "src/main/cost-ledger-controller.ts",
9497
- "declarations": [],
9498
- "exports": []
9499
- },
9500
- {
9501
- "kind": "javascript-module",
9502
- "path": "src/main/index.ts",
9503
- "declarations": [],
9504
- "exports": [
9505
- {
9506
- "kind": "js",
9507
- "name": "*",
9508
- "declaration": {
9509
- "name": "*",
9510
- "package": "./main.template"
9511
- }
9512
- },
9513
- {
9514
- "kind": "js",
9515
- "name": "*",
9516
- "declaration": {
9517
- "name": "*",
9518
- "package": "./main"
9519
- }
9520
- },
9521
- {
9522
- "kind": "js",
9523
- "name": "*",
9524
- "declaration": {
9525
- "name": "*",
9526
- "package": "./main.types"
9527
- }
9528
- }
9529
- ]
9530
- },
9531
- {
9532
- "kind": "javascript-module",
9533
- "path": "src/main/main.styles.ts",
9534
- "declarations": [
9535
- {
9536
- "kind": "variable",
9537
- "name": "styles",
9538
- "default": "css`\n ${baseStyles}\n ${\n /* The session menu's rows. Same partial the agent picker imports into its own\n shadow root — the one thing that keeps the two menus looking alike. */ ''\n }\n ${menuItemStyles}\n ${settingsModalStyles}\n`"
9539
- }
9540
- ],
9541
- "exports": [
9542
- {
9543
- "kind": "js",
9544
- "name": "styles",
9545
- "declaration": {
9546
- "name": "styles",
9547
- "module": "src/main/main.styles.ts"
9548
- }
9549
- }
9550
- ]
9551
- },
9552
- {
9553
- "kind": "javascript-module",
9554
- "path": "src/main/main.template.ts",
9555
- "declarations": [
9556
- {
9557
- "kind": "variable",
9558
- "name": "messageTimestampTemplate",
9559
- "default": "html<ChatMessage, FoundationAiAssistant>`\n <time\n class=\"message-timestamp\"\n part=\"message-timestamp\"\n datetime=\"${(m) => messageTimestampDateTime(m.timestamp)}\"\n >\n <span aria-hidden=\"true\">\n ${(m, c) => formatMessageTimestamp(m.timestamp, c.parent.timestampClock)}\n </span>\n <span class=\"visually-hidden\">${(m) => formatAbsoluteTimestamp(m.timestamp)}</span>\n </time>\n`",
9560
- "description": "The timestamp shown beside the sender name (GENC-1257).\n\nTwo strings, not one. A screen reader announces a `<time>` element's TEXT — it has no\nimplicit ARIA role, and the `datetime` attribute is never surfaced to the user — so the\nrelative text is hidden from assistive tech and paired with a visually-hidden absolute\nstring. Otherwise AT would hear \"5 minutes ago\" with nothing to anchor it, and in\n`'hover'` mode would hear it for a timestamp sighted users never asked to see.\n`datetime` stays because it is correct HTML and useful to tooling, not for a11y.\n\nOnly the VISUAL reveal is hover-gated, in CSS — see `.message-timestamp`. `opacity: 0`\nleaves the element in the accessibility tree, so AT gets a time in both visible modes;\n`'off'` is the only mode that removes it.\n\nReads `timestampClock` rather than `Date.now()` so every row shares one invalidatable\nclock and a tick re-evaluates them all; see `FoundationAiAssistant.timestampClock`."
9561
- },
9562
- {
9563
- "kind": "function",
9564
- "name": "FoundationAiAssistantTemplate",
9565
- "return": {
9566
- "type": {
9567
- "text": "ViewTemplate<FoundationAiAssistant>"
9568
- }
9569
- },
9570
- "parameters": [
9384
+ "text": "ChatConfig"
9385
+ },
9386
+ "default": "{}"
9387
+ },
9571
9388
  {
9572
- "name": "designSystemPrefix",
9389
+ "kind": "field",
9390
+ "name": "persistence",
9573
9391
  "type": {
9574
- "text": "string"
9575
- }
9576
- }
9577
- ]
9578
- }
9579
- ],
9580
- "exports": [
9581
- {
9582
- "kind": "js",
9583
- "name": "messageTimestampTemplate",
9584
- "declaration": {
9585
- "name": "messageTimestampTemplate",
9586
- "module": "src/main/main.template.ts"
9587
- }
9588
- },
9589
- {
9590
- "kind": "js",
9591
- "name": "FoundationAiAssistantTemplate",
9592
- "declaration": {
9593
- "name": "FoundationAiAssistantTemplate",
9594
- "module": "src/main/main.template.ts"
9595
- }
9596
- }
9597
- ]
9598
- },
9599
- {
9600
- "kind": "javascript-module",
9601
- "path": "src/main/main.ts",
9602
- "declarations": [
9603
- {
9604
- "kind": "variable",
9605
- "name": "sparkleIconSvg",
9606
- "default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
9607
- "description": "Three-star AI \"sparkle\" mark — the conventional AI signifier; default assistant avatar."
9608
- },
9609
- {
9610
- "kind": "variable",
9611
- "name": "userIconSvg",
9612
- "default": "`<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>`",
9613
- "description": "Person silhouette — default user avatar."
9614
- },
9615
- {
9616
- "kind": "variable",
9617
- "name": "genesisIconSvg",
9618
- "default": "`<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>`",
9619
- "description": "Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark)."
9620
- },
9621
- {
9622
- "kind": "class",
9623
- "description": "Foundation AI Assistant component.",
9624
- "name": "FoundationAiAssistant",
9625
- "members": [
9392
+ "text": "SessionPersistenceConfig"
9393
+ },
9394
+ "default": "{}",
9395
+ "description": "Optional session persistence (GENC-1351). Off by default — set `enabled`\nand a `provider` (e.g. a `WebStorageSessionProvider`) to have the assistant\nautosave on idle and auto-restore the conversation on page reload. Exposed\nas a top-level property (like `agents`/`providerRegistry`) rather than via\n`chatConfig`, since the provider type lives in this package while\n`ChatConfig` lives in `foundation-ai`."
9396
+ },
9626
9397
  {
9627
9398
  "kind": "field",
9628
- "name": "composerResize",
9629
- "privacy": "private",
9630
- "readonly": true,
9631
- "default": "new ComposerResizeController({\n enabled: () => this.chatConfig.ui?.resizableInput !== false,\n inputEl: () => this.chatInputEl,\n messagesEl: () => this.messagesEl,\n })"
9399
+ "name": "aiServiceErrorMessages",
9400
+ "type": {
9401
+ "text": "Partial<Record<AIServiceRefusal, string>> | undefined"
9402
+ },
9403
+ "description": "Replaces the transcript sentence shown when the app's AI service refuses a request with one of\n`AI_SERVICE_ERROR_CODES`, or its router with one of `AI_SERVICE_ACCESS_REFUSALS` (GENC-1611), per\ncode; a code with no entry keeps\n`DEFAULT_AI_SERVICE_ERROR_MESSAGES`. Read when the driver is created, so set it before the\nelement connects."
9632
9404
  },
9633
9405
  {
9634
9406
  "kind": "field",
9635
- "name": "composerMenus",
9636
- "privacy": "private",
9637
- "readonly": true,
9638
- "default": "new ComposerMenuController(this, {\n agentPickerOpen: this.accessor('agentPickerOpen'),\n sessionMenuOpen: this.accessor('sessionMenuOpen'),\n focusInput: () => this.chatInputEl?.focus(),\n resetSessionConfirmations: () => {\n this.confirmingClear = false;\n this.confirmingCompact = false;\n },\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
9407
+ "name": "agentPicker",
9408
+ "type": {
9409
+ "text": "AgentPickerMode"
9410
+ },
9411
+ "description": "Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to\n`'disabled'`.",
9412
+ "readonly": true
9639
9413
  },
9640
9414
  {
9641
9415
  "kind": "field",
9642
- "name": "attachmentCtrl",
9643
- "privacy": "private",
9644
- "readonly": true,
9645
- "default": "new AttachmentController(this, {\n acceptedFiles: () => this.chatConfig.ui?.acceptedFiles,\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
9416
+ "name": "composerHiddenByConfig",
9417
+ "type": {
9418
+ "text": "boolean"
9419
+ },
9420
+ "description": "Whether the built-in composer (input row + attachment chips) is hidden by\nthe host's `chatConfig.ui.hideComposer` setting. Used by the template to\ngate those blocks. Marked `@volatile` because the `'while-splash'` branch\nreads `showingSplash` only conditionally, so FAST cannot rely on cached\ndependency tracking.",
9421
+ "readonly": true
9646
9422
  },
9647
9423
  {
9648
9424
  "kind": "field",
9649
- "name": "contextGateCtrl",
9650
- "privacy": "private",
9651
- "readonly": true,
9652
- "default": "new ContextGateController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n gateContextTokens: () => this._gateContextTokens,\n contextReserve: () => this.contextReserve,\n preambleTokens: () => this.driver?.getPreambleTokens?.(),\n compactionPlanFor: (options) => this.driver?.getCompactionPlan?.(options) ?? null,\n bannerVisible: () => this.bannerVisible,\n effectiveBlockedReason: () => this.effectiveBlockedReason,\n flowOwnerAgentName: () => this.flowOwnerAgentName,\n })",
9653
- "description": "Pure derivation — owns no state. Reaches the driver only through the two\ncallbacks below, so it stays clear of the stateful-agent surface (§11.2\nconstraint 2) and of redux entirely."
9425
+ "name": "debugStateFactory",
9426
+ "type": {
9427
+ "text": "() => unknown | undefined"
9428
+ }
9654
9429
  },
9655
9430
  {
9656
9431
  "kind": "field",
9657
- "name": "costLedger",
9658
- "privacy": "private",
9659
- "readonly": true,
9660
- "default": "new CostLedgerController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n sessionUsage: () => this.sessionUsage,\n providerStatuses: () => this.providerStatuses,\n persistenceActive: () => this.persistenceActive,\n stateKey: () => this.getStateKey(),\n headerTitle: () => this.headerTitle,\n provider: () => this.persistence.provider,\n elementId: () => this.id,\n })",
9661
- "description": "Cost accounting and the persisted build-history ledger (GENC-1475). Reads the live\nsession through callbacks and owns the rows, the load/write latches and the debounce\ntimer — the element keeps only the names the settings modal binds."
9432
+ "name": "debugRedux",
9433
+ "type": {
9434
+ "text": "boolean"
9435
+ },
9436
+ "default": "false",
9437
+ "description": "When set, enables Redux DevTools for this instance's session store."
9662
9438
  },
9663
9439
  {
9664
9440
  "kind": "field",
9665
- "name": "budget",
9441
+ "name": "_sessionRef",
9442
+ "type": {
9443
+ "text": "SessionStoreReturn | undefined"
9444
+ },
9666
9445
  "privacy": "private",
9667
- "readonly": true,
9668
- "default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
9669
- "description": "The AI-spend budget: vendor walls, the derived composer lock, the banner copy\nand the settings meter (GENC-1464).\n\nTakes the session store itself rather than a callback per field — see\n`BudgetDeps` for why this one differs from its siblings."
9446
+ "description": "Pointer to this session's redux store. `@observable` (GENC-1351 §5.12) so that\n**swapping** it — the in-place session switch/re-key (`switchSession`) —\nforces every store-backed getter binding to re-evaluate against the NEW store.\nWithout this, FAST's per-store slice tracking would leave the view subscribed\nto the old store after a swap and it wouldn't re-render. (A same-store reset via\nredux actions re-renders without this; a store *swap* needs it.)"
9670
9447
  },
9671
9448
  {
9672
9449
  "kind": "field",
9673
- "name": "settings",
9450
+ "name": "_gateContextTokens",
9451
+ "type": {
9452
+ "text": "number | undefined"
9453
+ },
9674
9454
  "privacy": "private",
9675
- "readonly": true,
9676
- "default": "new SettingsModalController({\n chatConfig: () => this.chatConfig,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n budgetUsageVisible: () => this.budget.settingsUsageVisible,\n costConfig: () => this.costLedger.config,\n costHistoryLength: () => this.costLedger.history.length,\n liveCostSessionTitle: () => this.costLedger.liveTitle,\n providerStatusCount: () => this.providerStatuses.length,\n sessionRef: () => this._sessionRef,\n stateKey: () => this.getStateKey(),\n popoutMode: () => this.popoutMode,\n headerTitle: () => this.headerTitle,\n appSettingsProvider: () => this.appSettingsProvider,\n modal: () => this.settingsModal,\n tabsEl: () => this.settingsTabsEl,\n requestBudgetRefresh: () => this.requestBudgetRefresh(),\n logMeta: (type, detail) => this.logMeta(type, detail),\n })",
9677
- "description": "The settings modal (`docs/code-health.md` §3). Reaches the two design-system\nrefs through callbacks, because the template writes them by name — see\n`SettingsModalDeps`."
9455
+ "description": "FoundationAiAssistant.contextTokens as of the last moment no turn was\nrunning — the figure FoundationAiAssistant.contextGate is judged\nagainst (GENC-1582).\n\n**Why the gate reads a held figure and the gauge does not.** They answer\ndifferent questions. The gauge is a meter: \"how much context is in play right\nnow\", and a build that momentarily fills 900k of a 1M window should say so.\nThe gate answers \"may the next turn START\", which is only meaningful when no\nturn is running — the composer is disabled by `busy` throughout one anyway, so\na warning raised mid-turn is unactionable by construction.\n\nReading the live figure meant the pill went amber part-way through every large\nbuild and cleared itself at the end, because a `condenseWhen` agent's context\npeaks mid-turn and is shed before the turn finishes. A signal that fires and\nwithdraws on its own each time teaches people to ignore it.\n\n**Held, not latched.** The distinction matters, because `contextGate` is\ndocumented as derived-never-latched and the reason is a real dead end: a figure\npinned to a conversation that has since shrunk blocks the user out of the very\nactions that would fix it. This holds only for the duration of a turn and is\nrefreshed the moment one settles, so no shrink can outlive it — a compaction\nruns under `compacting` rather than `busy` and therefore updates it as it goes,\nand Clear drops it outright. What it costs is one turn of lag: a turn that\nballoons the resting size does not warn until it ends, which is the same trade\nthe flow-owner soften already makes deliberately.\n\nUnset falls back to the live figure, which is correct wherever there is no held\nvalue yet — first paint, and a remount, both of which happen at rest."
9678
9456
  },
9679
9457
  {
9680
9458
  "kind": "field",
9681
- "name": "providerRegistry",
9459
+ "name": "messages",
9682
9460
  "type": {
9683
- "text": "AIProviderRegistry"
9461
+ "text": "ChatMessage[]"
9684
9462
  }
9685
9463
  },
9686
9464
  {
9687
9465
  "kind": "field",
9688
- "name": "appSettingsProvider",
9466
+ "name": "state",
9689
9467
  "type": {
9690
- "text": "AssistantAppSettingsProvider"
9691
- }
9692
- },
9693
- {
9694
- "kind": "field",
9695
- "name": "designSystemPrefix",
9696
- "type": {
9697
- "text": "string"
9698
- },
9699
- "default": "'rapid'"
9700
- },
9701
- {
9702
- "kind": "field",
9703
- "name": "headerTitle",
9704
- "type": {
9705
- "text": "string"
9706
- },
9707
- "default": "'Genesis Assistant'"
9708
- },
9709
- {
9710
- "kind": "field",
9711
- "name": "sessionKey",
9712
- "type": {
9713
- "text": "string | undefined"
9714
- },
9715
- "description": "Explicit session/persistence key (GENC-1351 §5.12). When set, this is the\nsession identity — the key for the driver/store/persister/diagnostics\nregistries and the `sessionKey` passed to the persistence provider — taking\nprecedence over the DOM `id`. A host that scopes persistence per-entity\n(e.g. one chat session per project) binds this to a stable per-entity id;\nchanging it on a **connected** element re-keys the session in place — tears\ndown the current conversation and restores the new key's — via\n`switchSession`. Falls back to `id` when unset,\nso existing consumers are unaffected."
9716
- },
9717
- {
9718
- "kind": "field",
9719
- "name": "imageSrc",
9720
- "type": {
9721
- "text": "string | undefined"
9722
- }
9723
- },
9724
- {
9725
- "kind": "field",
9726
- "name": "userImageSrc",
9727
- "type": {
9728
- "text": "string | undefined"
9729
- }
9730
- },
9731
- {
9732
- "kind": "field",
9733
- "name": "assistantIcon",
9734
- "type": {
9735
- "text": "string | undefined"
9736
- },
9737
- "description": "Inline SVG markup overriding the default assistant \"sparkle\" avatar. The\nmarkup is sanitized (SVG profile) before rendering and uses the avatar's\ntheme colour via `currentColor`. For a raster/photo avatar set `imageSrc`\ninstead, which takes precedence. Set to `genesisIconSvg` to restore the\nGenesis G-mark."
9738
- },
9739
- {
9740
- "kind": "field",
9741
- "name": "assistantIconSafe",
9742
- "type": {
9743
- "text": "string"
9744
- },
9745
- "default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
9746
- "description": "Sanitized `assistantIcon`, or the default sparkle mark; bound into the template. @internal"
9747
- },
9748
- {
9749
- "kind": "method",
9750
- "name": "assistantIconChanged",
9751
- "privacy": "protected",
9752
- "return": {
9753
- "type": {
9754
- "text": "void"
9755
- }
9756
- }
9757
- },
9758
- {
9759
- "kind": "field",
9760
- "name": "userIcon",
9761
- "type": {
9762
- "text": "string | undefined"
9763
- },
9764
- "description": "Inline SVG markup overriding the default user \"person\" avatar. The markup is\nsanitized (SVG profile) before rendering and uses the avatar's theme colour\nvia `currentColor`. For a raster/photo avatar set `userImageSrc` instead,\nwhich takes precedence."
9765
- },
9766
- {
9767
- "kind": "field",
9768
- "name": "userIconSafe",
9769
- "type": {
9770
- "text": "string"
9771
- },
9772
- "default": "`<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>`",
9773
- "description": "Sanitized `userIcon`, or the default person mark; bound into the template. @internal"
9774
- },
9775
- {
9776
- "kind": "method",
9777
- "name": "userIconChanged",
9778
- "privacy": "protected",
9779
- "return": {
9780
- "type": {
9781
- "text": "void"
9782
- }
9783
- }
9784
- },
9785
- {
9786
- "kind": "field",
9787
- "name": "placeholder",
9788
- "type": {
9789
- "text": "string"
9790
- },
9791
- "default": "'Message assistant...'"
9792
- },
9793
- {
9794
- "kind": "field",
9795
- "name": "popoutMode",
9796
- "type": {
9797
- "text": "PopoutMode | undefined"
9798
- },
9799
- "description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change)."
9800
- },
9801
- {
9802
- "kind": "field",
9803
- "name": "closable",
9804
- "type": {
9805
- "text": "boolean"
9806
- },
9807
- "default": "false",
9808
- "description": "Shows a Close button in the header, which fires `close-requested` and leaves the closing to\nwhatever holds the assistant. The chat bubble sets it while the assistant is in its dialog."
9809
- },
9810
- {
9811
- "kind": "field",
9812
- "name": "agents",
9813
- "type": {
9814
- "text": "AgentConfig[] | undefined"
9815
- },
9816
- "description": "Agent configuration. Each user message is routed to the appropriate specialist\nbased on intent. With a single entry, orchestration is skipped."
9817
- },
9818
- {
9819
- "kind": "field",
9820
- "name": "chatConfig",
9821
- "type": {
9822
- "text": "ChatConfig"
9823
- },
9824
- "default": "{}"
9825
- },
9826
- {
9827
- "kind": "field",
9828
- "name": "persistence",
9829
- "type": {
9830
- "text": "SessionPersistenceConfig"
9831
- },
9832
- "default": "{}",
9833
- "description": "Optional session persistence (GENC-1351). Off by default — set `enabled`\nand a `provider` (e.g. a `WebStorageSessionProvider`) to have the assistant\nautosave on idle and auto-restore the conversation on page reload. Exposed\nas a top-level property (like `agents`/`providerRegistry`) rather than via\n`chatConfig`, since the provider type lives in this package while\n`ChatConfig` lives in `foundation-ai`."
9834
- },
9835
- {
9836
- "kind": "field",
9837
- "name": "aiServiceErrorMessages",
9838
- "type": {
9839
- "text": "Partial<Record<AIServiceRefusal, string>> | undefined"
9840
- },
9841
- "description": "Replaces the transcript sentence shown when the app's AI service refuses a request with one of\n`AI_SERVICE_ERROR_CODES`, or its router with one of `AI_SERVICE_ACCESS_REFUSALS` (GENC-1611), per\ncode; a code with no entry keeps\n`DEFAULT_AI_SERVICE_ERROR_MESSAGES`. Read when the driver is created, so set it before the\nelement connects."
9842
- },
9843
- {
9844
- "kind": "field",
9845
- "name": "agentPicker",
9846
- "type": {
9847
- "text": "AgentPickerMode"
9848
- },
9849
- "description": "Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to\n`'disabled'`.",
9850
- "readonly": true
9851
- },
9852
- {
9853
- "kind": "field",
9854
- "name": "composerHiddenByConfig",
9855
- "type": {
9856
- "text": "boolean"
9857
- },
9858
- "description": "Whether the built-in composer (input row + attachment chips) is hidden by\nthe host's `chatConfig.ui.hideComposer` setting. Used by the template to\ngate those blocks. Marked `@volatile` because the `'while-splash'` branch\nreads `showingSplash` only conditionally, so FAST cannot rely on cached\ndependency tracking.",
9859
- "readonly": true
9860
- },
9861
- {
9862
- "kind": "field",
9863
- "name": "debugStateFactory",
9864
- "type": {
9865
- "text": "() => unknown | undefined"
9866
- }
9867
- },
9868
- {
9869
- "kind": "field",
9870
- "name": "debugRedux",
9871
- "type": {
9872
- "text": "boolean"
9873
- },
9874
- "default": "false",
9875
- "description": "When set, enables Redux DevTools for this instance's session store."
9876
- },
9877
- {
9878
- "kind": "field",
9879
- "name": "_sessionRef",
9880
- "type": {
9881
- "text": "SessionStoreReturn | undefined"
9882
- },
9883
- "privacy": "private",
9884
- "description": "Pointer to this session's redux store. `@observable` (GENC-1351 §5.12) so that\n**swapping** it — the in-place session switch/re-key (`switchSession`) —\nforces every store-backed getter binding to re-evaluate against the NEW store.\nWithout this, FAST's per-store slice tracking would leave the view subscribed\nto the old store after a swap and it wouldn't re-render. (A same-store reset via\nredux actions re-renders without this; a store *swap* needs it.)"
9885
- },
9886
- {
9887
- "kind": "field",
9888
- "name": "_gateContextTokens",
9889
- "type": {
9890
- "text": "number | undefined"
9891
- },
9892
- "privacy": "private",
9893
- "description": "FoundationAiAssistant.contextTokens as of the last moment no turn was\nrunning — the figure FoundationAiAssistant.contextGate is judged\nagainst (GENC-1582).\n\n**Why the gate reads a held figure and the gauge does not.** They answer\ndifferent questions. The gauge is a meter: \"how much context is in play right\nnow\", and a build that momentarily fills 900k of a 1M window should say so.\nThe gate answers \"may the next turn START\", which is only meaningful when no\nturn is running — the composer is disabled by `busy` throughout one anyway, so\na warning raised mid-turn is unactionable by construction.\n\nReading the live figure meant the pill went amber part-way through every large\nbuild and cleared itself at the end, because a `condenseWhen` agent's context\npeaks mid-turn and is shed before the turn finishes. A signal that fires and\nwithdraws on its own each time teaches people to ignore it.\n\n**Held, not latched.** The distinction matters, because `contextGate` is\ndocumented as derived-never-latched and the reason is a real dead end: a figure\npinned to a conversation that has since shrunk blocks the user out of the very\nactions that would fix it. This holds only for the duration of a turn and is\nrefreshed the moment one settles, so no shrink can outlive it — a compaction\nruns under `compacting` rather than `busy` and therefore updates it as it goes,\nand Clear drops it outright. What it costs is one turn of lag: a turn that\nballoons the resting size does not warn until it ends, which is the same trade\nthe flow-owner soften already makes deliberately.\n\nUnset falls back to the live figure, which is correct wherever there is no held\nvalue yet — first paint, and a remount, both of which happen at rest."
9894
- },
9895
- {
9896
- "kind": "field",
9897
- "name": "messages",
9898
- "type": {
9899
- "text": "ChatMessage[]"
9900
- }
9901
- },
9902
- {
9903
- "kind": "field",
9904
- "name": "state",
9905
- "type": {
9906
- "text": "AiAssistantState"
9468
+ "text": "AiAssistantState"
9907
9469
  }
9908
9470
  },
9909
9471
  {
@@ -13755,6 +13317,444 @@
13755
13317
  "declarations": [],
13756
13318
  "exports": []
13757
13319
  },
13320
+ {
13321
+ "kind": "javascript-module",
13322
+ "path": "src/notifications/agent-notifications.ts",
13323
+ "declarations": [
13324
+ {
13325
+ "kind": "variable",
13326
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13327
+ "type": {
13328
+ "text": "string"
13329
+ },
13330
+ "default": "'The assistant is ready for your next input'",
13331
+ "description": "The notification's text when neither the app nor the widget gives one."
13332
+ },
13333
+ {
13334
+ "kind": "function",
13335
+ "name": "agentNotificationPermission",
13336
+ "return": {
13337
+ "type": {
13338
+ "text": "AgentNotificationPermission"
13339
+ }
13340
+ },
13341
+ "description": "Whether this page may show notifications. Safe to call anywhere, including Node."
13342
+ },
13343
+ {
13344
+ "kind": "function",
13345
+ "name": "requestAgentNotificationPermission",
13346
+ "return": {
13347
+ "type": {
13348
+ "text": "Promise<AgentNotificationPermission>"
13349
+ }
13350
+ },
13351
+ "description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
13352
+ }
13353
+ ],
13354
+ "exports": [
13355
+ {
13356
+ "kind": "js",
13357
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13358
+ "declaration": {
13359
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13360
+ "module": "src/notifications/agent-notifications.ts"
13361
+ }
13362
+ },
13363
+ {
13364
+ "kind": "js",
13365
+ "name": "agentNotificationPermission",
13366
+ "declaration": {
13367
+ "name": "agentNotificationPermission",
13368
+ "module": "src/notifications/agent-notifications.ts"
13369
+ }
13370
+ },
13371
+ {
13372
+ "kind": "js",
13373
+ "name": "requestAgentNotificationPermission",
13374
+ "declaration": {
13375
+ "name": "requestAgentNotificationPermission",
13376
+ "module": "src/notifications/agent-notifications.ts"
13377
+ }
13378
+ }
13379
+ ]
13380
+ },
13381
+ {
13382
+ "kind": "javascript-module",
13383
+ "path": "src/notifications/agent-notifier.ts",
13384
+ "declarations": [],
13385
+ "exports": []
13386
+ },
13387
+ {
13388
+ "kind": "javascript-module",
13389
+ "path": "src/notifications/index.ts",
13390
+ "declarations": [],
13391
+ "exports": [
13392
+ {
13393
+ "kind": "js",
13394
+ "name": "agentNotificationPermission",
13395
+ "declaration": {
13396
+ "name": "agentNotificationPermission",
13397
+ "module": "./agent-notifications"
13398
+ }
13399
+ },
13400
+ {
13401
+ "kind": "js",
13402
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13403
+ "declaration": {
13404
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13405
+ "module": "./agent-notifications"
13406
+ }
13407
+ },
13408
+ {
13409
+ "kind": "js",
13410
+ "name": "requestAgentNotificationPermission",
13411
+ "declaration": {
13412
+ "name": "requestAgentNotificationPermission",
13413
+ "module": "./agent-notifications"
13414
+ }
13415
+ },
13416
+ {
13417
+ "kind": "js",
13418
+ "name": "type",
13419
+ "declaration": {
13420
+ "name": "type",
13421
+ "module": "./agent-notifications"
13422
+ }
13423
+ },
13424
+ {
13425
+ "kind": "js",
13426
+ "name": "AgentAttentionDetail",
13427
+ "declaration": {
13428
+ "name": "AgentAttentionDetail",
13429
+ "module": "./agent-notifications"
13430
+ }
13431
+ },
13432
+ {
13433
+ "kind": "js",
13434
+ "name": "type",
13435
+ "declaration": {
13436
+ "name": "type",
13437
+ "module": "./agent-notifications"
13438
+ }
13439
+ },
13440
+ {
13441
+ "kind": "js",
13442
+ "name": "AgentAttentionKind",
13443
+ "declaration": {
13444
+ "name": "AgentAttentionKind",
13445
+ "module": "./agent-notifications"
13446
+ }
13447
+ },
13448
+ {
13449
+ "kind": "js",
13450
+ "name": "type",
13451
+ "declaration": {
13452
+ "name": "type",
13453
+ "module": "./agent-notifications"
13454
+ }
13455
+ },
13456
+ {
13457
+ "kind": "js",
13458
+ "name": "AgentNotificationLevel",
13459
+ "declaration": {
13460
+ "name": "AgentNotificationLevel",
13461
+ "module": "./agent-notifications"
13462
+ }
13463
+ },
13464
+ {
13465
+ "kind": "js",
13466
+ "name": "type",
13467
+ "declaration": {
13468
+ "name": "type",
13469
+ "module": "./agent-notifications"
13470
+ }
13471
+ },
13472
+ {
13473
+ "kind": "js",
13474
+ "name": "AgentNotificationPermission",
13475
+ "declaration": {
13476
+ "name": "AgentNotificationPermission",
13477
+ "module": "./agent-notifications"
13478
+ }
13479
+ }
13480
+ ]
13481
+ },
13482
+ {
13483
+ "kind": "javascript-module",
13484
+ "path": "src/notifications/notification-level-picker.template.ts",
13485
+ "declarations": [],
13486
+ "exports": []
13487
+ },
13488
+ {
13489
+ "kind": "javascript-module",
13490
+ "path": "src/notifications/notification-settings.ts",
13491
+ "declarations": [],
13492
+ "exports": []
13493
+ },
13494
+ {
13495
+ "kind": "javascript-module",
13496
+ "path": "src/provider/ai-provider-switcher.ts",
13497
+ "declarations": [
13498
+ {
13499
+ "kind": "variable",
13500
+ "name": "AIProviderSwitcher",
13501
+ "description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
13502
+ }
13503
+ ],
13504
+ "exports": [
13505
+ {
13506
+ "kind": "js",
13507
+ "name": "AIProviderSwitcher",
13508
+ "declaration": {
13509
+ "name": "AIProviderSwitcher",
13510
+ "module": "src/provider/ai-provider-switcher.ts"
13511
+ }
13512
+ }
13513
+ ]
13514
+ },
13515
+ {
13516
+ "kind": "javascript-module",
13517
+ "path": "src/provider/assistant-app-settings.ts",
13518
+ "declarations": [
13519
+ {
13520
+ "kind": "variable",
13521
+ "name": "AssistantAppSettingsProvider",
13522
+ "description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
13523
+ }
13524
+ ],
13525
+ "exports": [
13526
+ {
13527
+ "kind": "js",
13528
+ "name": "AssistantAppSettingsProvider",
13529
+ "declaration": {
13530
+ "name": "AssistantAppSettingsProvider",
13531
+ "module": "src/provider/assistant-app-settings.ts"
13532
+ }
13533
+ }
13534
+ ]
13535
+ },
13536
+ {
13537
+ "kind": "javascript-module",
13538
+ "path": "src/provider/tiered-provider-switcher.ts",
13539
+ "declarations": [
13540
+ {
13541
+ "kind": "class",
13542
+ "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
13543
+ "name": "TieredAIProviderSwitcher",
13544
+ "members": [
13545
+ {
13546
+ "kind": "field",
13547
+ "name": "vendors",
13548
+ "type": {
13549
+ "text": "readonly AITierVendor[]"
13550
+ },
13551
+ "readonly": true
13552
+ },
13553
+ {
13554
+ "kind": "field",
13555
+ "name": "options",
13556
+ "type": {
13557
+ "text": "TieredAIProviderSwitcherOptions"
13558
+ },
13559
+ "privacy": "private",
13560
+ "readonly": true,
13561
+ "default": "options"
13562
+ },
13563
+ {
13564
+ "kind": "field",
13565
+ "name": "defaultTier",
13566
+ "type": {
13567
+ "text": "AITierId"
13568
+ },
13569
+ "privacy": "private",
13570
+ "readonly": true
13571
+ },
13572
+ {
13573
+ "kind": "field",
13574
+ "name": "registry",
13575
+ "type": {
13576
+ "text": "MutableAIProviderRegistry"
13577
+ },
13578
+ "privacy": "private",
13579
+ "readonly": true
13580
+ },
13581
+ {
13582
+ "kind": "field",
13583
+ "name": "listeners",
13584
+ "privacy": "private",
13585
+ "readonly": true,
13586
+ "default": "new Set<(vendor: AITierVendor) => void>()"
13587
+ },
13588
+ {
13589
+ "kind": "field",
13590
+ "name": "_vendor",
13591
+ "type": {
13592
+ "text": "AITierVendor"
13593
+ },
13594
+ "privacy": "private"
13595
+ },
13596
+ {
13597
+ "kind": "field",
13598
+ "name": "vendor",
13599
+ "type": {
13600
+ "text": "AITierVendor"
13601
+ },
13602
+ "readonly": true
13603
+ },
13604
+ {
13605
+ "kind": "method",
13606
+ "name": "switchTo",
13607
+ "return": {
13608
+ "type": {
13609
+ "text": "void"
13610
+ }
13611
+ },
13612
+ "parameters": [
13613
+ {
13614
+ "name": "vendor",
13615
+ "type": {
13616
+ "text": "string"
13617
+ }
13618
+ }
13619
+ ],
13620
+ "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
13621
+ },
13622
+ {
13623
+ "kind": "method",
13624
+ "name": "adoptPersistedVendor",
13625
+ "return": {
13626
+ "type": {
13627
+ "text": "void"
13628
+ }
13629
+ },
13630
+ "parameters": [
13631
+ {
13632
+ "name": "vendor",
13633
+ "type": {
13634
+ "text": "string"
13635
+ }
13636
+ }
13637
+ ],
13638
+ "description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
13639
+ },
13640
+ {
13641
+ "kind": "method",
13642
+ "name": "subscribe",
13643
+ "return": {
13644
+ "type": {
13645
+ "text": "() => void"
13646
+ }
13647
+ },
13648
+ "parameters": [
13649
+ {
13650
+ "name": "listener",
13651
+ "type": {
13652
+ "text": "(vendor: string) => void"
13653
+ }
13654
+ }
13655
+ ]
13656
+ },
13657
+ {
13658
+ "kind": "method",
13659
+ "name": "apply",
13660
+ "privacy": "private",
13661
+ "return": {
13662
+ "type": {
13663
+ "text": "void"
13664
+ }
13665
+ },
13666
+ "parameters": [
13667
+ {
13668
+ "name": "vendor",
13669
+ "type": {
13670
+ "text": "AITierVendor"
13671
+ }
13672
+ }
13673
+ ],
13674
+ "description": "The registry move both entry points share, and nothing else."
13675
+ },
13676
+ {
13677
+ "kind": "method",
13678
+ "name": "build",
13679
+ "privacy": "private",
13680
+ "return": {
13681
+ "type": {
13682
+ "text": "Record<string, AIProvider>"
13683
+ }
13684
+ },
13685
+ "parameters": [
13686
+ {
13687
+ "name": "vendor",
13688
+ "type": {
13689
+ "text": "AITierVendor"
13690
+ }
13691
+ }
13692
+ ]
13693
+ },
13694
+ {
13695
+ "kind": "method",
13696
+ "name": "isKnownVendor",
13697
+ "privacy": "private",
13698
+ "return": {
13699
+ "type": {
13700
+ "text": "vendor is AITierVendor"
13701
+ }
13702
+ },
13703
+ "parameters": [
13704
+ {
13705
+ "name": "vendor",
13706
+ "type": {
13707
+ "text": "string"
13708
+ }
13709
+ }
13710
+ ]
13711
+ }
13712
+ ]
13713
+ },
13714
+ {
13715
+ "kind": "function",
13716
+ "name": "registerTieredAIProviders",
13717
+ "return": {
13718
+ "type": {
13719
+ "text": "TieredAIProviderSwitcher"
13720
+ }
13721
+ },
13722
+ "parameters": [
13723
+ {
13724
+ "name": "container",
13725
+ "type": {
13726
+ "text": "Container"
13727
+ }
13728
+ },
13729
+ {
13730
+ "name": "options",
13731
+ "type": {
13732
+ "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
13733
+ }
13734
+ }
13735
+ ],
13736
+ "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
13737
+ }
13738
+ ],
13739
+ "exports": [
13740
+ {
13741
+ "kind": "js",
13742
+ "name": "TieredAIProviderSwitcher",
13743
+ "declaration": {
13744
+ "name": "TieredAIProviderSwitcher",
13745
+ "module": "src/provider/tiered-provider-switcher.ts"
13746
+ }
13747
+ },
13748
+ {
13749
+ "kind": "js",
13750
+ "name": "registerTieredAIProviders",
13751
+ "declaration": {
13752
+ "name": "registerTieredAIProviders",
13753
+ "module": "src/provider/tiered-provider-switcher.ts"
13754
+ }
13755
+ }
13756
+ ]
13757
+ },
13758
13758
  {
13759
13759
  "kind": "javascript-module",
13760
13760
  "path": "src/state/ai-assistant-slice.ts",