@genesislcap/ai-assistant 14.444.1 → 14.445.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 (47) hide show
  1. package/dist/ai-assistant.api.json +312 -41
  2. package/dist/ai-assistant.d.ts +105 -8
  3. package/dist/dts/components/ai-driver/ai-driver.d.ts +7 -0
  4. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  5. package/dist/dts/components/chat-driver/chat-driver.d.ts +37 -3
  6. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  7. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +5 -3
  8. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  9. package/dist/dts/config/config.d.ts +31 -0
  10. package/dist/dts/config/config.d.ts.map +1 -1
  11. package/dist/dts/config/define-stateful-agent.d.ts +9 -0
  12. package/dist/dts/config/define-stateful-agent.d.ts.map +1 -1
  13. package/dist/dts/config/validate-providers.d.ts +25 -0
  14. package/dist/dts/config/validate-providers.d.ts.map +1 -0
  15. package/dist/dts/config/validate-providers.test.d.ts +2 -0
  16. package/dist/dts/config/validate-providers.test.d.ts.map +1 -0
  17. package/dist/dts/main/main.d.ts +17 -5
  18. package/dist/dts/main/main.d.ts.map +1 -1
  19. package/dist/dts/main/main.styles.d.ts.map +1 -1
  20. package/dist/dts/main/main.template.d.ts.map +1 -1
  21. package/dist/dts/state/ai-assistant-slice.d.ts +14 -1
  22. package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
  23. package/dist/dts/state/session-store.d.ts +2 -0
  24. package/dist/dts/state/session-store.d.ts.map +1 -1
  25. package/dist/esm/components/chat-driver/chat-driver.js +84 -15
  26. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +23 -4
  27. package/dist/esm/config/define-stateful-agent.js +12 -0
  28. package/dist/esm/config/validate-providers.js +47 -0
  29. package/dist/esm/config/validate-providers.test.js +100 -0
  30. package/dist/esm/main/main.js +57 -10
  31. package/dist/esm/main/main.styles.js +52 -0
  32. package/dist/esm/main/main.template.js +36 -1
  33. package/dist/esm/state/ai-assistant-slice.js +8 -0
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/docs/migration-GENC-1262.md +219 -0
  36. package/package.json +16 -16
  37. package/src/components/ai-driver/ai-driver.ts +8 -0
  38. package/src/components/chat-driver/chat-driver.ts +96 -14
  39. package/src/components/orchestrating-driver/orchestrating-driver.ts +29 -4
  40. package/src/config/config.ts +32 -0
  41. package/src/config/define-stateful-agent.ts +28 -0
  42. package/src/config/validate-providers.test.ts +148 -0
  43. package/src/config/validate-providers.ts +58 -0
  44. package/src/main/main.styles.ts +52 -0
  45. package/src/main/main.template.ts +50 -2
  46. package/src/main/main.ts +51 -7
  47. package/src/state/ai-assistant-slice.ts +24 -1
@@ -1993,6 +1993,34 @@
1993
1993
  ],
1994
1994
  "name": "continueFromHistory"
1995
1995
  },
1996
+ {
1997
+ "kind": "MethodSignature",
1998
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getActiveProviderName:member(1)",
1999
+ "docComment": "/**\n * Name of the AI provider used on the most recent turn. Falls back to the registry's default name when no turn has run yet.\n *\n * @beta\n */\n",
2000
+ "excerptTokens": [
2001
+ {
2002
+ "kind": "Content",
2003
+ "text": "getActiveProviderName(): "
2004
+ },
2005
+ {
2006
+ "kind": "Content",
2007
+ "text": "string"
2008
+ },
2009
+ {
2010
+ "kind": "Content",
2011
+ "text": ";"
2012
+ }
2013
+ ],
2014
+ "isOptional": false,
2015
+ "returnTypeTokenRange": {
2016
+ "startIndex": 1,
2017
+ "endIndex": 2
2018
+ },
2019
+ "releaseTag": "Beta",
2020
+ "overloadIndex": 1,
2021
+ "parameters": [],
2022
+ "name": "getActiveProviderName"
2023
+ },
1996
2024
  {
1997
2025
  "kind": "MethodSignature",
1998
2026
  "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getRawHistory:member(1)",
@@ -2471,12 +2499,12 @@
2471
2499
  "excerptTokens": [
2472
2500
  {
2473
2501
  "kind": "Content",
2474
- "text": "constructor(aiProvider: "
2502
+ "text": "constructor(providerRegistry: "
2475
2503
  },
2476
2504
  {
2477
2505
  "kind": "Reference",
2478
- "text": "AIProvider",
2479
- "canonicalReference": "@genesislcap/foundation-ai!AIProvider:interface"
2506
+ "text": "AIProviderRegistry",
2507
+ "canonicalReference": "@genesislcap/foundation-ai!AIProviderRegistry:interface"
2480
2508
  },
2481
2509
  {
2482
2510
  "kind": "Content",
@@ -2552,7 +2580,7 @@
2552
2580
  "overloadIndex": 1,
2553
2581
  "parameters": [
2554
2582
  {
2555
- "parameterName": "aiProvider",
2583
+ "parameterName": "providerRegistry",
2556
2584
  "parameterTypeTokenRange": {
2557
2585
  "startIndex": 1,
2558
2586
  "endIndex": 2
@@ -2764,6 +2792,37 @@
2764
2792
  "isAbstract": false,
2765
2793
  "name": "getActiveFoldNames"
2766
2794
  },
2795
+ {
2796
+ "kind": "Method",
2797
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getActiveProviderName:member(1)",
2798
+ "docComment": "/**\n * Returns the most recently resolved provider name. Falls back to the registry's default when no per-turn resolution has happened yet.\n */\n",
2799
+ "excerptTokens": [
2800
+ {
2801
+ "kind": "Content",
2802
+ "text": "getActiveProviderName(): "
2803
+ },
2804
+ {
2805
+ "kind": "Content",
2806
+ "text": "string"
2807
+ },
2808
+ {
2809
+ "kind": "Content",
2810
+ "text": ";"
2811
+ }
2812
+ ],
2813
+ "isStatic": false,
2814
+ "returnTypeTokenRange": {
2815
+ "startIndex": 1,
2816
+ "endIndex": 2
2817
+ },
2818
+ "releaseTag": "Beta",
2819
+ "isProtected": false,
2820
+ "overloadIndex": 1,
2821
+ "parameters": [],
2822
+ "isOptional": false,
2823
+ "isAbstract": false,
2824
+ "name": "getActiveProviderName"
2825
+ },
2767
2826
  {
2768
2827
  "kind": "Method",
2769
2828
  "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getAgentReleaseRequested:member(1)",
@@ -3946,7 +4005,7 @@
3946
4005
  {
3947
4006
  "kind": "Class",
3948
4007
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant:class",
3949
- "docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Inject an `AIProvider` through the DI container. Pass agent configuration via the `agents` property. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * @fires chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed; `detail`: `{ clientX, clientY }`.\n *\n * @beta\n */\n",
4008
+ "docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * @fires chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed; `detail`: `{ clientX, clientY }`.\n *\n * @beta\n */\n",
3950
4009
  "excerptTokens": [
3951
4010
  {
3952
4011
  "kind": "Content",
@@ -4051,6 +4110,36 @@
4051
4110
  "isProtected": false,
4052
4111
  "isAbstract": false
4053
4112
  },
4113
+ {
4114
+ "kind": "Property",
4115
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#activeProviderName:member",
4116
+ "docComment": "/**\n * Name of the AI provider used on the most recent turn.\n */\n",
4117
+ "excerptTokens": [
4118
+ {
4119
+ "kind": "Content",
4120
+ "text": "get activeProviderName(): "
4121
+ },
4122
+ {
4123
+ "kind": "Content",
4124
+ "text": "string | undefined"
4125
+ },
4126
+ {
4127
+ "kind": "Content",
4128
+ "text": ";\n\nset activeProviderName(value: string | undefined);"
4129
+ }
4130
+ ],
4131
+ "isReadonly": false,
4132
+ "isOptional": false,
4133
+ "releaseTag": "Beta",
4134
+ "name": "activeProviderName",
4135
+ "propertyTypeTokenRange": {
4136
+ "startIndex": 1,
4137
+ "endIndex": 2
4138
+ },
4139
+ "isStatic": false,
4140
+ "isProtected": false,
4141
+ "isAbstract": false
4142
+ },
4054
4143
  {
4055
4144
  "kind": "Property",
4056
4145
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#agentPicker:member",
@@ -4238,37 +4327,6 @@
4238
4327
  "isProtected": false,
4239
4328
  "isAbstract": false
4240
4329
  },
4241
- {
4242
- "kind": "Property",
4243
- "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#aiProvider:member",
4244
- "docComment": "",
4245
- "excerptTokens": [
4246
- {
4247
- "kind": "Content",
4248
- "text": "aiProvider: "
4249
- },
4250
- {
4251
- "kind": "Reference",
4252
- "text": "AIProvider",
4253
- "canonicalReference": "@genesislcap/foundation-ai!AIProvider:interface"
4254
- },
4255
- {
4256
- "kind": "Content",
4257
- "text": ";"
4258
- }
4259
- ],
4260
- "isReadonly": false,
4261
- "isOptional": false,
4262
- "releaseTag": "Beta",
4263
- "name": "aiProvider",
4264
- "propertyTypeTokenRange": {
4265
- "startIndex": 1,
4266
- "endIndex": 2
4267
- },
4268
- "isStatic": false,
4269
- "isProtected": false,
4270
- "isAbstract": false
4271
- },
4272
4330
  {
4273
4331
  "kind": "Property",
4274
4332
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#attachmentErrors:member",
@@ -4880,6 +4938,15 @@
4880
4938
  "text": "SystemPromptInput",
4881
4939
  "canonicalReference": "@genesislcap/ai-assistant!SystemPromptInput:type"
4882
4940
  },
4941
+ {
4942
+ "kind": "Content",
4943
+ "text": ";\n provider?: import(\"../config/config\")."
4944
+ },
4945
+ {
4946
+ "kind": "Reference",
4947
+ "text": "ProviderInput",
4948
+ "canonicalReference": "@genesislcap/ai-assistant!ProviderInput:type"
4949
+ },
4883
4950
  {
4884
4951
  "kind": "Content",
4885
4952
  "text": ";\n primerHistory?: "
@@ -4943,6 +5010,15 @@
4943
5010
  "text": "SystemPromptInput",
4944
5011
  "canonicalReference": "@genesislcap/ai-assistant!SystemPromptInput:type"
4945
5012
  },
5013
+ {
5014
+ "kind": "Content",
5015
+ "text": ";\n provider?: import(\"../config/config\")."
5016
+ },
5017
+ {
5018
+ "kind": "Reference",
5019
+ "text": "ProviderInput",
5020
+ "canonicalReference": "@genesislcap/ai-assistant!ProviderInput:type"
5021
+ },
4946
5022
  {
4947
5023
  "kind": "Content",
4948
5024
  "text": ";\n primerHistory?: "
@@ -5009,7 +5085,7 @@
5009
5085
  "isStatic": false,
5010
5086
  "returnTypeTokenRange": {
5011
5087
  "startIndex": 1,
5012
- "endIndex": 36
5088
+ "endIndex": 40
5013
5089
  },
5014
5090
  "releaseTag": "Beta",
5015
5091
  "isProtected": false,
@@ -5795,6 +5871,81 @@
5795
5871
  "isProtected": false,
5796
5872
  "isAbstract": false
5797
5873
  },
5874
+ {
5875
+ "kind": "Property",
5876
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#providerRegistry:member",
5877
+ "docComment": "",
5878
+ "excerptTokens": [
5879
+ {
5880
+ "kind": "Content",
5881
+ "text": "providerRegistry: "
5882
+ },
5883
+ {
5884
+ "kind": "Reference",
5885
+ "text": "AIProviderRegistry",
5886
+ "canonicalReference": "@genesislcap/foundation-ai!AIProviderRegistry:interface"
5887
+ },
5888
+ {
5889
+ "kind": "Content",
5890
+ "text": ";"
5891
+ }
5892
+ ],
5893
+ "isReadonly": false,
5894
+ "isOptional": false,
5895
+ "releaseTag": "Beta",
5896
+ "name": "providerRegistry",
5897
+ "propertyTypeTokenRange": {
5898
+ "startIndex": 1,
5899
+ "endIndex": 2
5900
+ },
5901
+ "isStatic": false,
5902
+ "isProtected": false,
5903
+ "isAbstract": false
5904
+ },
5905
+ {
5906
+ "kind": "Property",
5907
+ "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#providerStatuses:member",
5908
+ "docComment": "/**\n * Per-provider status snapshot used by the settings panel.\n */\n",
5909
+ "excerptTokens": [
5910
+ {
5911
+ "kind": "Content",
5912
+ "text": "get providerStatuses(): "
5913
+ },
5914
+ {
5915
+ "kind": "Reference",
5916
+ "text": "AIProviderRegistryStatusEntry",
5917
+ "canonicalReference": "@genesislcap/foundation-ai!AIProviderRegistryStatusEntry:interface"
5918
+ },
5919
+ {
5920
+ "kind": "Content",
5921
+ "text": "[]"
5922
+ },
5923
+ {
5924
+ "kind": "Content",
5925
+ "text": ";\n\nset providerStatuses(value: "
5926
+ },
5927
+ {
5928
+ "kind": "Reference",
5929
+ "text": "AIProviderRegistryStatusEntry",
5930
+ "canonicalReference": "@genesislcap/foundation-ai!AIProviderRegistryStatusEntry:interface"
5931
+ },
5932
+ {
5933
+ "kind": "Content",
5934
+ "text": "[]);"
5935
+ }
5936
+ ],
5937
+ "isReadonly": false,
5938
+ "isOptional": false,
5939
+ "releaseTag": "Beta",
5940
+ "name": "providerStatuses",
5941
+ "propertyTypeTokenRange": {
5942
+ "startIndex": 1,
5943
+ "endIndex": 3
5944
+ },
5945
+ "isStatic": false,
5946
+ "isProtected": false,
5947
+ "isAbstract": false
5948
+ },
5798
5949
  {
5799
5950
  "kind": "Method",
5800
5951
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#removeAttachment:member(1)",
@@ -7162,12 +7313,12 @@
7162
7313
  "excerptTokens": [
7163
7314
  {
7164
7315
  "kind": "Content",
7165
- "text": "constructor(aiProvider: "
7316
+ "text": "constructor(providerRegistry: "
7166
7317
  },
7167
7318
  {
7168
7319
  "kind": "Reference",
7169
- "text": "AIProvider",
7170
- "canonicalReference": "@genesislcap/foundation-ai!AIProvider:interface"
7320
+ "text": "AIProviderRegistry",
7321
+ "canonicalReference": "@genesislcap/foundation-ai!AIProviderRegistry:interface"
7171
7322
  },
7172
7323
  {
7173
7324
  "kind": "Content",
@@ -7200,7 +7351,7 @@
7200
7351
  "overloadIndex": 1,
7201
7352
  "parameters": [
7202
7353
  {
7203
- "parameterName": "aiProvider",
7354
+ "parameterName": "providerRegistry",
7204
7355
  "parameterTypeTokenRange": {
7205
7356
  "startIndex": 1,
7206
7357
  "endIndex": 2
@@ -7359,6 +7510,37 @@
7359
7510
  "isAbstract": false,
7360
7511
  "name": "dispose"
7361
7512
  },
7513
+ {
7514
+ "kind": "Method",
7515
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getActiveProviderName:member(1)",
7516
+ "docComment": "/**\n * Currently active provider name from the underlying ChatDriver.\n */\n",
7517
+ "excerptTokens": [
7518
+ {
7519
+ "kind": "Content",
7520
+ "text": "getActiveProviderName(): "
7521
+ },
7522
+ {
7523
+ "kind": "Content",
7524
+ "text": "string"
7525
+ },
7526
+ {
7527
+ "kind": "Content",
7528
+ "text": ";"
7529
+ }
7530
+ ],
7531
+ "isStatic": false,
7532
+ "returnTypeTokenRange": {
7533
+ "startIndex": 1,
7534
+ "endIndex": 2
7535
+ },
7536
+ "releaseTag": "Beta",
7537
+ "isProtected": false,
7538
+ "overloadIndex": 1,
7539
+ "parameters": [],
7540
+ "isOptional": false,
7541
+ "isAbstract": false,
7542
+ "name": "getActiveProviderName"
7543
+ },
7362
7544
  {
7363
7545
  "kind": "Method",
7364
7546
  "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getRawHistory:member(1)",
@@ -7920,6 +8102,50 @@
7920
8102
  "endIndex": 2
7921
8103
  }
7922
8104
  },
8105
+ {
8106
+ "kind": "TypeAlias",
8107
+ "canonicalReference": "@genesislcap/ai-assistant!ProviderInput:type",
8108
+ "docComment": "/**\n * Names which registered `AIProviderRegistry` entry an agent uses. Either a static string (resolved once at agent registration) or a function resolved each tool-loop iteration — pick the function form to vary the provider by current state (e.g. a stateful agent that switches providers between machine states).\n *\n * Unknown provider names hard-error: static names at agent registration time, function-resolved names on first resolution.\n *\n * @beta\n */\n",
8109
+ "excerptTokens": [
8110
+ {
8111
+ "kind": "Content",
8112
+ "text": "export type ProviderInput = "
8113
+ },
8114
+ {
8115
+ "kind": "Content",
8116
+ "text": "string | ((ctx: "
8117
+ },
8118
+ {
8119
+ "kind": "Reference",
8120
+ "text": "SystemPromptContext",
8121
+ "canonicalReference": "@genesislcap/ai-assistant!SystemPromptContext:interface"
8122
+ },
8123
+ {
8124
+ "kind": "Content",
8125
+ "text": ") => string | "
8126
+ },
8127
+ {
8128
+ "kind": "Reference",
8129
+ "text": "Promise",
8130
+ "canonicalReference": "!Promise:interface"
8131
+ },
8132
+ {
8133
+ "kind": "Content",
8134
+ "text": "<string>)"
8135
+ },
8136
+ {
8137
+ "kind": "Content",
8138
+ "text": ";"
8139
+ }
8140
+ ],
8141
+ "fileUrlPath": "src/config/config.ts",
8142
+ "releaseTag": "Beta",
8143
+ "name": "ProviderInput",
8144
+ "typeTokenRange": {
8145
+ "startIndex": 1,
8146
+ "endIndex": 6
8147
+ }
8148
+ },
7923
8149
  {
7924
8150
  "kind": "Variable",
7925
8151
  "canonicalReference": "@genesislcap/ai-assistant!REQUEST_CONTINUATION_TOOL:var",
@@ -8463,6 +8689,51 @@
8463
8689
  "endIndex": 3
8464
8690
  }
8465
8691
  },
8692
+ {
8693
+ "kind": "PropertySignature",
8694
+ "canonicalReference": "@genesislcap/ai-assistant!StatefulAgentInit#provider:member",
8695
+ "docComment": "/**\n * Which registered AI provider this agent uses, by name. Either a static string or a function resolved each tool-loop iteration with the current `state` — pick the function form to vary provider per machine state (e.g. swap to a heavier model only for the planning step).\n *\n * Omit to use the registry's default provider. Unknown names hard-error.\n */\n",
8696
+ "excerptTokens": [
8697
+ {
8698
+ "kind": "Content",
8699
+ "text": "provider?: "
8700
+ },
8701
+ {
8702
+ "kind": "Content",
8703
+ "text": "string | ((ctx: "
8704
+ },
8705
+ {
8706
+ "kind": "Reference",
8707
+ "text": "StatefulAgentContext",
8708
+ "canonicalReference": "@genesislcap/ai-assistant!StatefulAgentContext:type"
8709
+ },
8710
+ {
8711
+ "kind": "Content",
8712
+ "text": "<S>) => string | "
8713
+ },
8714
+ {
8715
+ "kind": "Reference",
8716
+ "text": "Promise",
8717
+ "canonicalReference": "!Promise:interface"
8718
+ },
8719
+ {
8720
+ "kind": "Content",
8721
+ "text": "<string>)"
8722
+ },
8723
+ {
8724
+ "kind": "Content",
8725
+ "text": ";"
8726
+ }
8727
+ ],
8728
+ "isReadonly": false,
8729
+ "isOptional": true,
8730
+ "releaseTag": "Beta",
8731
+ "name": "provider",
8732
+ "propertyTypeTokenRange": {
8733
+ "startIndex": 1,
8734
+ "endIndex": 6
8735
+ }
8736
+ },
8466
8737
  {
8467
8738
  "kind": "PropertySignature",
8468
8739
  "canonicalReference": "@genesislcap/ai-assistant!StatefulAgentInit#subAgents:member",