@genesislcap/ai-assistant 15.62.0 → 15.63.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.
@@ -4076,6 +4076,237 @@
4076
4076
  }
4077
4077
  ]
4078
4078
  },
4079
+ {
4080
+ "kind": "javascript-module",
4081
+ "path": "src/config/config.ts",
4082
+ "declarations": [
4083
+ {
4084
+ "kind": "function",
4085
+ "name": "defineAgent",
4086
+ "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```"
4087
+ }
4088
+ ],
4089
+ "exports": [
4090
+ {
4091
+ "kind": "js",
4092
+ "name": "CachePolicy",
4093
+ "declaration": {
4094
+ "name": "CachePolicy",
4095
+ "module": "src/config/config.ts"
4096
+ }
4097
+ },
4098
+ {
4099
+ "kind": "js",
4100
+ "name": "ChatFallback",
4101
+ "declaration": {
4102
+ "name": "ChatFallback",
4103
+ "module": "src/config/config.ts"
4104
+ }
4105
+ },
4106
+ {
4107
+ "kind": "js",
4108
+ "name": "ChatInputDuringExecutionMode",
4109
+ "declaration": {
4110
+ "name": "ChatInputDuringExecutionMode",
4111
+ "module": "src/config/config.ts"
4112
+ }
4113
+ },
4114
+ {
4115
+ "kind": "js",
4116
+ "name": "ChatThinkingPolicy",
4117
+ "declaration": {
4118
+ "name": "ChatThinkingPolicy",
4119
+ "module": "src/config/config.ts"
4120
+ }
4121
+ },
4122
+ {
4123
+ "kind": "js",
4124
+ "name": "ChatToolChoice",
4125
+ "declaration": {
4126
+ "name": "ChatToolChoice",
4127
+ "module": "src/config/config.ts"
4128
+ }
4129
+ },
4130
+ {
4131
+ "kind": "js",
4132
+ "name": "defineAgent",
4133
+ "declaration": {
4134
+ "name": "defineAgent",
4135
+ "module": "src/config/config.ts"
4136
+ }
4137
+ }
4138
+ ]
4139
+ },
4140
+ {
4141
+ "kind": "javascript-module",
4142
+ "path": "src/config/define-stateful-agent.ts",
4143
+ "declarations": [
4144
+ {
4145
+ "kind": "function",
4146
+ "name": "restoreMachine",
4147
+ "return": {
4148
+ "type": {
4149
+ "text": "void"
4150
+ }
4151
+ },
4152
+ "parameters": [
4153
+ {
4154
+ "name": "machine",
4155
+ "type": {
4156
+ "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
4157
+ },
4158
+ "description": "the machine to restore (already constructed/started)."
4159
+ },
4160
+ {
4161
+ "name": "restored",
4162
+ "type": {
4163
+ "text": "unknown"
4164
+ },
4165
+ "description": "the agent's serialized image (`ctx.restored` in `init`)."
4166
+ },
4167
+ {
4168
+ "name": "key",
4169
+ "default": "'machine'",
4170
+ "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
4171
+ }
4172
+ ],
4173
+ "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."
4174
+ },
4175
+ {
4176
+ "kind": "function",
4177
+ "name": "defineStatefulAgent",
4178
+ "return": {
4179
+ "type": {
4180
+ "text": "AgentConfig"
4181
+ }
4182
+ },
4183
+ "parameters": [
4184
+ {
4185
+ "name": "opts",
4186
+ "type": {
4187
+ "text": "StatefulAgentInit<S>"
4188
+ }
4189
+ }
4190
+ ],
4191
+ "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."
4192
+ },
4193
+ {
4194
+ "kind": "function",
4195
+ "name": "defineAutopilot",
4196
+ "return": {
4197
+ "type": {
4198
+ "text": "AutopilotConfig<S>"
4199
+ }
4200
+ },
4201
+ "parameters": [
4202
+ {
4203
+ "name": "config",
4204
+ "type": {
4205
+ "text": "AutopilotConfig<S>"
4206
+ }
4207
+ }
4208
+ ],
4209
+ "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."
4210
+ }
4211
+ ],
4212
+ "exports": [
4213
+ {
4214
+ "kind": "js",
4215
+ "name": "restoreMachine",
4216
+ "declaration": {
4217
+ "name": "restoreMachine",
4218
+ "module": "src/config/define-stateful-agent.ts"
4219
+ }
4220
+ },
4221
+ {
4222
+ "kind": "js",
4223
+ "name": "defineStatefulAgent",
4224
+ "declaration": {
4225
+ "name": "defineStatefulAgent",
4226
+ "module": "src/config/define-stateful-agent.ts"
4227
+ }
4228
+ },
4229
+ {
4230
+ "kind": "js",
4231
+ "name": "defineAutopilot",
4232
+ "declaration": {
4233
+ "name": "defineAutopilot",
4234
+ "module": "src/config/define-stateful-agent.ts"
4235
+ }
4236
+ }
4237
+ ]
4238
+ },
4239
+ {
4240
+ "kind": "javascript-module",
4241
+ "path": "src/config/fallback-agents.ts",
4242
+ "declarations": [
4243
+ {
4244
+ "kind": "variable",
4245
+ "name": "friendlyFallbackAgent",
4246
+ "type": {
4247
+ "text": "FallbackAgentConfig"
4248
+ },
4249
+ "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}",
4250
+ "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."
4251
+ },
4252
+ {
4253
+ "kind": "variable",
4254
+ "name": "strictFallbackAgent",
4255
+ "type": {
4256
+ "text": "FallbackAgentConfig"
4257
+ },
4258
+ "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}",
4259
+ "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."
4260
+ }
4261
+ ],
4262
+ "exports": [
4263
+ {
4264
+ "kind": "js",
4265
+ "name": "friendlyFallbackAgent",
4266
+ "declaration": {
4267
+ "name": "friendlyFallbackAgent",
4268
+ "module": "src/config/fallback-agents.ts"
4269
+ }
4270
+ },
4271
+ {
4272
+ "kind": "js",
4273
+ "name": "strictFallbackAgent",
4274
+ "declaration": {
4275
+ "name": "strictFallbackAgent",
4276
+ "module": "src/config/fallback-agents.ts"
4277
+ }
4278
+ }
4279
+ ]
4280
+ },
4281
+ {
4282
+ "kind": "javascript-module",
4283
+ "path": "src/config/index.ts",
4284
+ "declarations": [],
4285
+ "exports": [
4286
+ {
4287
+ "kind": "js",
4288
+ "name": "*",
4289
+ "declaration": {
4290
+ "name": "*",
4291
+ "package": "./config"
4292
+ }
4293
+ },
4294
+ {
4295
+ "kind": "js",
4296
+ "name": "*",
4297
+ "declaration": {
4298
+ "name": "*",
4299
+ "package": "./fallback-agents"
4300
+ }
4301
+ }
4302
+ ]
4303
+ },
4304
+ {
4305
+ "kind": "javascript-module",
4306
+ "path": "src/config/validate-providers.ts",
4307
+ "declarations": [],
4308
+ "exports": []
4309
+ },
4079
4310
  {
4080
4311
  "kind": "javascript-module",
4081
4312
  "path": "src/components/flowing-waves-indicator.ts",
@@ -4602,254 +4833,23 @@
4602
4833
  },
4603
4834
  {
4604
4835
  "kind": "javascript-module",
4605
- "path": "src/config/config.ts",
4836
+ "path": "src/genesis/calendar.ts",
4837
+ "declarations": [],
4838
+ "exports": []
4839
+ },
4840
+ {
4841
+ "kind": "javascript-module",
4842
+ "path": "src/genesis/config.ts",
4606
4843
  "declarations": [
4607
4844
  {
4608
- "kind": "function",
4609
- "name": "defineAgent",
4610
- "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```"
4611
- }
4612
- ],
4613
- "exports": [
4614
- {
4615
- "kind": "js",
4616
- "name": "CachePolicy",
4617
- "declaration": {
4618
- "name": "CachePolicy",
4619
- "module": "src/config/config.ts"
4620
- }
4621
- },
4622
- {
4623
- "kind": "js",
4624
- "name": "ChatFallback",
4625
- "declaration": {
4626
- "name": "ChatFallback",
4627
- "module": "src/config/config.ts"
4628
- }
4629
- },
4630
- {
4631
- "kind": "js",
4632
- "name": "ChatInputDuringExecutionMode",
4633
- "declaration": {
4634
- "name": "ChatInputDuringExecutionMode",
4635
- "module": "src/config/config.ts"
4636
- }
4637
- },
4638
- {
4639
- "kind": "js",
4640
- "name": "ChatThinkingPolicy",
4641
- "declaration": {
4642
- "name": "ChatThinkingPolicy",
4643
- "module": "src/config/config.ts"
4644
- }
4645
- },
4646
- {
4647
- "kind": "js",
4648
- "name": "ChatToolChoice",
4649
- "declaration": {
4650
- "name": "ChatToolChoice",
4651
- "module": "src/config/config.ts"
4652
- }
4653
- },
4654
- {
4655
- "kind": "js",
4656
- "name": "defineAgent",
4657
- "declaration": {
4658
- "name": "defineAgent",
4659
- "module": "src/config/config.ts"
4660
- }
4661
- }
4662
- ]
4663
- },
4664
- {
4665
- "kind": "javascript-module",
4666
- "path": "src/config/define-stateful-agent.ts",
4667
- "declarations": [
4668
- {
4669
- "kind": "function",
4670
- "name": "restoreMachine",
4671
- "return": {
4672
- "type": {
4673
- "text": "void"
4674
- }
4675
- },
4676
- "parameters": [
4677
- {
4678
- "name": "machine",
4679
- "type": {
4680
- "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
4681
- },
4682
- "description": "the machine to restore (already constructed/started)."
4683
- },
4684
- {
4685
- "name": "restored",
4686
- "type": {
4687
- "text": "unknown"
4688
- },
4689
- "description": "the agent's serialized image (`ctx.restored` in `init`)."
4690
- },
4691
- {
4692
- "name": "key",
4693
- "default": "'machine'",
4694
- "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
4695
- }
4696
- ],
4697
- "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."
4698
- },
4699
- {
4700
- "kind": "function",
4701
- "name": "defineStatefulAgent",
4702
- "return": {
4703
- "type": {
4704
- "text": "AgentConfig"
4705
- }
4706
- },
4707
- "parameters": [
4708
- {
4709
- "name": "opts",
4710
- "type": {
4711
- "text": "StatefulAgentInit<S>"
4712
- }
4713
- }
4714
- ],
4715
- "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."
4716
- },
4717
- {
4718
- "kind": "function",
4719
- "name": "defineAutopilot",
4720
- "return": {
4721
- "type": {
4722
- "text": "AutopilotConfig<S>"
4723
- }
4724
- },
4725
- "parameters": [
4726
- {
4727
- "name": "config",
4728
- "type": {
4729
- "text": "AutopilotConfig<S>"
4730
- }
4731
- }
4732
- ],
4733
- "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."
4734
- }
4735
- ],
4736
- "exports": [
4737
- {
4738
- "kind": "js",
4739
- "name": "restoreMachine",
4740
- "declaration": {
4741
- "name": "restoreMachine",
4742
- "module": "src/config/define-stateful-agent.ts"
4743
- }
4744
- },
4745
- {
4746
- "kind": "js",
4747
- "name": "defineStatefulAgent",
4748
- "declaration": {
4749
- "name": "defineStatefulAgent",
4750
- "module": "src/config/define-stateful-agent.ts"
4751
- }
4752
- },
4753
- {
4754
- "kind": "js",
4755
- "name": "defineAutopilot",
4756
- "declaration": {
4757
- "name": "defineAutopilot",
4758
- "module": "src/config/define-stateful-agent.ts"
4759
- }
4760
- }
4761
- ]
4762
- },
4763
- {
4764
- "kind": "javascript-module",
4765
- "path": "src/config/fallback-agents.ts",
4766
- "declarations": [
4767
- {
4768
- "kind": "variable",
4769
- "name": "friendlyFallbackAgent",
4770
- "type": {
4771
- "text": "FallbackAgentConfig"
4772
- },
4773
- "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}",
4774
- "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."
4775
- },
4776
- {
4777
- "kind": "variable",
4778
- "name": "strictFallbackAgent",
4779
- "type": {
4780
- "text": "FallbackAgentConfig"
4781
- },
4782
- "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}",
4783
- "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."
4784
- }
4785
- ],
4786
- "exports": [
4787
- {
4788
- "kind": "js",
4789
- "name": "friendlyFallbackAgent",
4790
- "declaration": {
4791
- "name": "friendlyFallbackAgent",
4792
- "module": "src/config/fallback-agents.ts"
4793
- }
4794
- },
4795
- {
4796
- "kind": "js",
4797
- "name": "strictFallbackAgent",
4798
- "declaration": {
4799
- "name": "strictFallbackAgent",
4800
- "module": "src/config/fallback-agents.ts"
4801
- }
4802
- }
4803
- ]
4804
- },
4805
- {
4806
- "kind": "javascript-module",
4807
- "path": "src/config/index.ts",
4808
- "declarations": [],
4809
- "exports": [
4810
- {
4811
- "kind": "js",
4812
- "name": "*",
4813
- "declaration": {
4814
- "name": "*",
4815
- "package": "./config"
4816
- }
4817
- },
4818
- {
4819
- "kind": "js",
4820
- "name": "*",
4821
- "declaration": {
4822
- "name": "*",
4823
- "package": "./fallback-agents"
4824
- }
4825
- }
4826
- ]
4827
- },
4828
- {
4829
- "kind": "javascript-module",
4830
- "path": "src/config/validate-providers.ts",
4831
- "declarations": [],
4832
- "exports": []
4833
- },
4834
- {
4835
- "kind": "javascript-module",
4836
- "path": "src/genesis/calendar.ts",
4837
- "declarations": [],
4838
- "exports": []
4839
- },
4840
- {
4841
- "kind": "javascript-module",
4842
- "path": "src/genesis/config.ts",
4843
- "declarations": [
4844
- {
4845
- "kind": "variable",
4846
- "name": "DEFAULT_MAX_ROWS",
4847
- "type": {
4848
- "text": "number"
4849
- },
4850
- "default": "50",
4851
- "description": "The default read cap, and the ceiling the config may raise it to."
4852
- },
4845
+ "kind": "variable",
4846
+ "name": "DEFAULT_MAX_ROWS",
4847
+ "type": {
4848
+ "text": "number"
4849
+ },
4850
+ "default": "50",
4851
+ "description": "The default read cap, and the ceiling the config may raise it to."
4852
+ },
4853
4853
  {
4854
4854
  "kind": "variable",
4855
4855
  "name": "MAX_ROWS_CEILING",
@@ -6014,270 +6014,6 @@
6014
6014
  "declarations": [],
6015
6015
  "exports": []
6016
6016
  },
6017
- {
6018
- "kind": "javascript-module",
6019
- "path": "src/provider/ai-provider-switcher.ts",
6020
- "declarations": [
6021
- {
6022
- "kind": "variable",
6023
- "name": "AIProviderSwitcher",
6024
- "description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
6025
- }
6026
- ],
6027
- "exports": [
6028
- {
6029
- "kind": "js",
6030
- "name": "AIProviderSwitcher",
6031
- "declaration": {
6032
- "name": "AIProviderSwitcher",
6033
- "module": "src/provider/ai-provider-switcher.ts"
6034
- }
6035
- }
6036
- ]
6037
- },
6038
- {
6039
- "kind": "javascript-module",
6040
- "path": "src/provider/assistant-app-settings.ts",
6041
- "declarations": [
6042
- {
6043
- "kind": "variable",
6044
- "name": "AssistantAppSettingsProvider",
6045
- "description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
6046
- }
6047
- ],
6048
- "exports": [
6049
- {
6050
- "kind": "js",
6051
- "name": "AssistantAppSettingsProvider",
6052
- "declaration": {
6053
- "name": "AssistantAppSettingsProvider",
6054
- "module": "src/provider/assistant-app-settings.ts"
6055
- }
6056
- }
6057
- ]
6058
- },
6059
- {
6060
- "kind": "javascript-module",
6061
- "path": "src/provider/tiered-provider-switcher.ts",
6062
- "declarations": [
6063
- {
6064
- "kind": "class",
6065
- "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
6066
- "name": "TieredAIProviderSwitcher",
6067
- "members": [
6068
- {
6069
- "kind": "field",
6070
- "name": "vendors",
6071
- "type": {
6072
- "text": "readonly AITierVendor[]"
6073
- },
6074
- "readonly": true
6075
- },
6076
- {
6077
- "kind": "field",
6078
- "name": "options",
6079
- "type": {
6080
- "text": "TieredAIProviderSwitcherOptions"
6081
- },
6082
- "privacy": "private",
6083
- "readonly": true,
6084
- "default": "options"
6085
- },
6086
- {
6087
- "kind": "field",
6088
- "name": "defaultTier",
6089
- "type": {
6090
- "text": "AITierId"
6091
- },
6092
- "privacy": "private",
6093
- "readonly": true
6094
- },
6095
- {
6096
- "kind": "field",
6097
- "name": "registry",
6098
- "type": {
6099
- "text": "MutableAIProviderRegistry"
6100
- },
6101
- "privacy": "private",
6102
- "readonly": true
6103
- },
6104
- {
6105
- "kind": "field",
6106
- "name": "listeners",
6107
- "privacy": "private",
6108
- "readonly": true,
6109
- "default": "new Set<(vendor: AITierVendor) => void>()"
6110
- },
6111
- {
6112
- "kind": "field",
6113
- "name": "_vendor",
6114
- "type": {
6115
- "text": "AITierVendor"
6116
- },
6117
- "privacy": "private"
6118
- },
6119
- {
6120
- "kind": "field",
6121
- "name": "vendor",
6122
- "type": {
6123
- "text": "AITierVendor"
6124
- },
6125
- "readonly": true
6126
- },
6127
- {
6128
- "kind": "method",
6129
- "name": "switchTo",
6130
- "return": {
6131
- "type": {
6132
- "text": "void"
6133
- }
6134
- },
6135
- "parameters": [
6136
- {
6137
- "name": "vendor",
6138
- "type": {
6139
- "text": "string"
6140
- }
6141
- }
6142
- ],
6143
- "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
6144
- },
6145
- {
6146
- "kind": "method",
6147
- "name": "adoptPersistedVendor",
6148
- "return": {
6149
- "type": {
6150
- "text": "void"
6151
- }
6152
- },
6153
- "parameters": [
6154
- {
6155
- "name": "vendor",
6156
- "type": {
6157
- "text": "string"
6158
- }
6159
- }
6160
- ],
6161
- "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."
6162
- },
6163
- {
6164
- "kind": "method",
6165
- "name": "subscribe",
6166
- "return": {
6167
- "type": {
6168
- "text": "() => void"
6169
- }
6170
- },
6171
- "parameters": [
6172
- {
6173
- "name": "listener",
6174
- "type": {
6175
- "text": "(vendor: string) => void"
6176
- }
6177
- }
6178
- ]
6179
- },
6180
- {
6181
- "kind": "method",
6182
- "name": "apply",
6183
- "privacy": "private",
6184
- "return": {
6185
- "type": {
6186
- "text": "void"
6187
- }
6188
- },
6189
- "parameters": [
6190
- {
6191
- "name": "vendor",
6192
- "type": {
6193
- "text": "AITierVendor"
6194
- }
6195
- }
6196
- ],
6197
- "description": "The registry move both entry points share, and nothing else."
6198
- },
6199
- {
6200
- "kind": "method",
6201
- "name": "build",
6202
- "privacy": "private",
6203
- "return": {
6204
- "type": {
6205
- "text": "Record<string, AIProvider>"
6206
- }
6207
- },
6208
- "parameters": [
6209
- {
6210
- "name": "vendor",
6211
- "type": {
6212
- "text": "AITierVendor"
6213
- }
6214
- }
6215
- ]
6216
- },
6217
- {
6218
- "kind": "method",
6219
- "name": "isKnownVendor",
6220
- "privacy": "private",
6221
- "return": {
6222
- "type": {
6223
- "text": "vendor is AITierVendor"
6224
- }
6225
- },
6226
- "parameters": [
6227
- {
6228
- "name": "vendor",
6229
- "type": {
6230
- "text": "string"
6231
- }
6232
- }
6233
- ]
6234
- }
6235
- ]
6236
- },
6237
- {
6238
- "kind": "function",
6239
- "name": "registerTieredAIProviders",
6240
- "return": {
6241
- "type": {
6242
- "text": "TieredAIProviderSwitcher"
6243
- }
6244
- },
6245
- "parameters": [
6246
- {
6247
- "name": "container",
6248
- "type": {
6249
- "text": "Container"
6250
- }
6251
- },
6252
- {
6253
- "name": "options",
6254
- "type": {
6255
- "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
6256
- }
6257
- }
6258
- ],
6259
- "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
6260
- }
6261
- ],
6262
- "exports": [
6263
- {
6264
- "kind": "js",
6265
- "name": "TieredAIProviderSwitcher",
6266
- "declaration": {
6267
- "name": "TieredAIProviderSwitcher",
6268
- "module": "src/provider/tiered-provider-switcher.ts"
6269
- }
6270
- },
6271
- {
6272
- "kind": "js",
6273
- "name": "registerTieredAIProviders",
6274
- "declaration": {
6275
- "name": "registerTieredAIProviders",
6276
- "module": "src/provider/tiered-provider-switcher.ts"
6277
- }
6278
- }
6279
- ]
6280
- },
6281
6017
  {
6282
6018
  "kind": "javascript-module",
6283
6019
  "path": "src/main/attachment-controller.ts",
@@ -10298,6 +10034,270 @@
10298
10034
  "declarations": [],
10299
10035
  "exports": []
10300
10036
  },
10037
+ {
10038
+ "kind": "javascript-module",
10039
+ "path": "src/provider/ai-provider-switcher.ts",
10040
+ "declarations": [
10041
+ {
10042
+ "kind": "variable",
10043
+ "name": "AIProviderSwitcher",
10044
+ "description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
10045
+ }
10046
+ ],
10047
+ "exports": [
10048
+ {
10049
+ "kind": "js",
10050
+ "name": "AIProviderSwitcher",
10051
+ "declaration": {
10052
+ "name": "AIProviderSwitcher",
10053
+ "module": "src/provider/ai-provider-switcher.ts"
10054
+ }
10055
+ }
10056
+ ]
10057
+ },
10058
+ {
10059
+ "kind": "javascript-module",
10060
+ "path": "src/provider/assistant-app-settings.ts",
10061
+ "declarations": [
10062
+ {
10063
+ "kind": "variable",
10064
+ "name": "AssistantAppSettingsProvider",
10065
+ "description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
10066
+ }
10067
+ ],
10068
+ "exports": [
10069
+ {
10070
+ "kind": "js",
10071
+ "name": "AssistantAppSettingsProvider",
10072
+ "declaration": {
10073
+ "name": "AssistantAppSettingsProvider",
10074
+ "module": "src/provider/assistant-app-settings.ts"
10075
+ }
10076
+ }
10077
+ ]
10078
+ },
10079
+ {
10080
+ "kind": "javascript-module",
10081
+ "path": "src/provider/tiered-provider-switcher.ts",
10082
+ "declarations": [
10083
+ {
10084
+ "kind": "class",
10085
+ "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
10086
+ "name": "TieredAIProviderSwitcher",
10087
+ "members": [
10088
+ {
10089
+ "kind": "field",
10090
+ "name": "vendors",
10091
+ "type": {
10092
+ "text": "readonly AITierVendor[]"
10093
+ },
10094
+ "readonly": true
10095
+ },
10096
+ {
10097
+ "kind": "field",
10098
+ "name": "options",
10099
+ "type": {
10100
+ "text": "TieredAIProviderSwitcherOptions"
10101
+ },
10102
+ "privacy": "private",
10103
+ "readonly": true,
10104
+ "default": "options"
10105
+ },
10106
+ {
10107
+ "kind": "field",
10108
+ "name": "defaultTier",
10109
+ "type": {
10110
+ "text": "AITierId"
10111
+ },
10112
+ "privacy": "private",
10113
+ "readonly": true
10114
+ },
10115
+ {
10116
+ "kind": "field",
10117
+ "name": "registry",
10118
+ "type": {
10119
+ "text": "MutableAIProviderRegistry"
10120
+ },
10121
+ "privacy": "private",
10122
+ "readonly": true
10123
+ },
10124
+ {
10125
+ "kind": "field",
10126
+ "name": "listeners",
10127
+ "privacy": "private",
10128
+ "readonly": true,
10129
+ "default": "new Set<(vendor: AITierVendor) => void>()"
10130
+ },
10131
+ {
10132
+ "kind": "field",
10133
+ "name": "_vendor",
10134
+ "type": {
10135
+ "text": "AITierVendor"
10136
+ },
10137
+ "privacy": "private"
10138
+ },
10139
+ {
10140
+ "kind": "field",
10141
+ "name": "vendor",
10142
+ "type": {
10143
+ "text": "AITierVendor"
10144
+ },
10145
+ "readonly": true
10146
+ },
10147
+ {
10148
+ "kind": "method",
10149
+ "name": "switchTo",
10150
+ "return": {
10151
+ "type": {
10152
+ "text": "void"
10153
+ }
10154
+ },
10155
+ "parameters": [
10156
+ {
10157
+ "name": "vendor",
10158
+ "type": {
10159
+ "text": "string"
10160
+ }
10161
+ }
10162
+ ],
10163
+ "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
10164
+ },
10165
+ {
10166
+ "kind": "method",
10167
+ "name": "adoptPersistedVendor",
10168
+ "return": {
10169
+ "type": {
10170
+ "text": "void"
10171
+ }
10172
+ },
10173
+ "parameters": [
10174
+ {
10175
+ "name": "vendor",
10176
+ "type": {
10177
+ "text": "string"
10178
+ }
10179
+ }
10180
+ ],
10181
+ "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."
10182
+ },
10183
+ {
10184
+ "kind": "method",
10185
+ "name": "subscribe",
10186
+ "return": {
10187
+ "type": {
10188
+ "text": "() => void"
10189
+ }
10190
+ },
10191
+ "parameters": [
10192
+ {
10193
+ "name": "listener",
10194
+ "type": {
10195
+ "text": "(vendor: string) => void"
10196
+ }
10197
+ }
10198
+ ]
10199
+ },
10200
+ {
10201
+ "kind": "method",
10202
+ "name": "apply",
10203
+ "privacy": "private",
10204
+ "return": {
10205
+ "type": {
10206
+ "text": "void"
10207
+ }
10208
+ },
10209
+ "parameters": [
10210
+ {
10211
+ "name": "vendor",
10212
+ "type": {
10213
+ "text": "AITierVendor"
10214
+ }
10215
+ }
10216
+ ],
10217
+ "description": "The registry move both entry points share, and nothing else."
10218
+ },
10219
+ {
10220
+ "kind": "method",
10221
+ "name": "build",
10222
+ "privacy": "private",
10223
+ "return": {
10224
+ "type": {
10225
+ "text": "Record<string, AIProvider>"
10226
+ }
10227
+ },
10228
+ "parameters": [
10229
+ {
10230
+ "name": "vendor",
10231
+ "type": {
10232
+ "text": "AITierVendor"
10233
+ }
10234
+ }
10235
+ ]
10236
+ },
10237
+ {
10238
+ "kind": "method",
10239
+ "name": "isKnownVendor",
10240
+ "privacy": "private",
10241
+ "return": {
10242
+ "type": {
10243
+ "text": "vendor is AITierVendor"
10244
+ }
10245
+ },
10246
+ "parameters": [
10247
+ {
10248
+ "name": "vendor",
10249
+ "type": {
10250
+ "text": "string"
10251
+ }
10252
+ }
10253
+ ]
10254
+ }
10255
+ ]
10256
+ },
10257
+ {
10258
+ "kind": "function",
10259
+ "name": "registerTieredAIProviders",
10260
+ "return": {
10261
+ "type": {
10262
+ "text": "TieredAIProviderSwitcher"
10263
+ }
10264
+ },
10265
+ "parameters": [
10266
+ {
10267
+ "name": "container",
10268
+ "type": {
10269
+ "text": "Container"
10270
+ }
10271
+ },
10272
+ {
10273
+ "name": "options",
10274
+ "type": {
10275
+ "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
10276
+ }
10277
+ }
10278
+ ],
10279
+ "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
10280
+ }
10281
+ ],
10282
+ "exports": [
10283
+ {
10284
+ "kind": "js",
10285
+ "name": "TieredAIProviderSwitcher",
10286
+ "declaration": {
10287
+ "name": "TieredAIProviderSwitcher",
10288
+ "module": "src/provider/tiered-provider-switcher.ts"
10289
+ }
10290
+ },
10291
+ {
10292
+ "kind": "js",
10293
+ "name": "registerTieredAIProviders",
10294
+ "declaration": {
10295
+ "name": "registerTieredAIProviders",
10296
+ "module": "src/provider/tiered-provider-switcher.ts"
10297
+ }
10298
+ }
10299
+ ]
10300
+ },
10301
10301
  {
10302
10302
  "kind": "javascript-module",
10303
10303
  "path": "src/state/ai-assistant-slice.ts",
@@ -10,13 +10,23 @@ import { type GenesisWriteOutcome } from './write-outcome';
10
10
  * reopen the gap the review exists to close: the user approves what they read, and anything
11
11
  * re-derived afterwards is something they did not.
12
12
  *
13
- * There is **no pre-write validation pass**. `VALIDATE: true` is accepted and ignored by a
14
- * Create-generated handler — it declares `onCommit` only, so the platform runs it as a plain
15
- * event handler and the row is COMMITTED. Asking for a dry run there would write every row the
16
- * user was still deciding about, then report it as merely checked. What the dry run was buying
17
- * is already done client-side, before anything is sent: required fields, types, enums, dates
18
- * and read-only fields are all checked against the same metadata the server's schema validation
19
- * reads.
13
+ * There is **no pre-write validation pass** — not because one would write, but because it would
14
+ * check nothing new. `VALIDATE: true` runs a handler's `onValidate` and stops there: `onCommit`
15
+ * runs only on a message that is not a validate, after `onValidate` acked (genesis-server
16
+ * 8.15.29, `TransactionalEventHandlerContainer`; the same from 7.2.28 to 10.0.0-beta4). A
17
+ * Create-generated handler declares `onCommit` alone, so its `onValidate` is the platform's
18
+ * default, which acks; on 10.0 a Spring `@EventCommit`-only handler acks a validate without
19
+ * running at all. Recorded on the showcase: `EVENT_COUNTERPARTY_INSERT`, which has no
20
+ * `onValidate`, ACKed a `VALIDATE` and wrote nothing.
21
+ *
22
+ * So on such a handler a dry run checks the payload's schema and nothing more, and that is
23
+ * already done client-side, before anything is sent: required fields, types, enums, dates and
24
+ * read-only fields are all checked against the same metadata the server's schema validation
25
+ * reads. Where a handler does declare an `onValidate`, the commit runs it first, and its refusal
26
+ * comes back as that row's answer; a dry run would only hear it before the user approves rather
27
+ * than after. A dry run is unsafe only on hand-written code that is handed the flag and ignores
28
+ * it — a class implementing a plain, non-validating `AsyncEventHandler` or `SyncEventHandler`, or
29
+ * a Spring method taking `@IsValidateOnly` — which nothing on the wire tells apart from the rest.
20
30
  */
21
31
  export interface GenesisWriteRow {
22
32
  /** Position in the model's original list, so an outcome can be matched back to its row. */
@@ -1 +1 @@
1
- {"version":3,"file":"write-commit.d.ts","sourceRoot":"","sources":["../../../src/genesis/write-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,eAAe;IAC9B,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,EAAE,EAAE,UAAU,CAAC;IACf,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf;AAmBD;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,SAAS,eAAe,EAAE,EAChC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,SAA6B,EAAE,EAAE,aAAa,GAC/E,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAyD7B"}
1
+ {"version":3,"file":"write-commit.d.ts","sourceRoot":"","sources":["../../../src/genesis/write-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,eAAe;IAC9B,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,EAAE,EAAE,UAAU,CAAC;IACf,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf;AAmBD;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,SAAS,eAAe,EAAE,EAChC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,SAA6B,EAAE,EAAE,aAAa,GAC/E,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAyD7B"}
@@ -145,8 +145,8 @@ export function mapWriteReply(reply, { mode, op }) {
145
145
  const warnings = warningsOf(message);
146
146
  if (type === 'EVENT_ACK') {
147
147
  // The mode is the whole difference. A dry run ACKs without writing anything, and on a
148
- // generated app it ACKs whatever it is given, so calling that "written" would be the lie
149
- // the review table is built to avoid.
148
+ // generated app it ACKs any payload that passes the schema, so calling that "written" would
149
+ // be the lie the review table is built to avoid.
150
150
  if (mode === 'validate') {
151
151
  return Object.assign({ status: 'checked', committed: false, message: 'Checked.' }, (warnings ? { warnings } : {}));
152
152
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/ai-assistant",
3
3
  "description": "Genesis AI Assistant micro-frontend",
4
- "version": "15.62.0",
4
+ "version": "15.63.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/ai-assistant.d.ts",
@@ -92,31 +92,31 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@genesislcap/foundation-comms": "15.62.0",
96
- "@genesislcap/foundation-testing": "15.62.0",
97
- "@genesislcap/genx": "15.62.0",
98
- "@genesislcap/ts-builder": "15.62.0",
99
- "@genesislcap/uvu-playwright-builder": "15.62.0",
100
- "@genesislcap/vite-builder": "15.62.0",
101
- "@genesislcap/webpack-builder": "15.62.0",
95
+ "@genesislcap/foundation-comms": "15.63.0",
96
+ "@genesislcap/foundation-testing": "15.63.0",
97
+ "@genesislcap/genx": "15.63.0",
98
+ "@genesislcap/ts-builder": "15.63.0",
99
+ "@genesislcap/uvu-playwright-builder": "15.63.0",
100
+ "@genesislcap/vite-builder": "15.63.0",
101
+ "@genesislcap/webpack-builder": "15.63.0",
102
102
  "@types/dompurify": "^3.0.5",
103
103
  "@types/marked": "^5.0.2",
104
104
  "esbuild": "0.25.12"
105
105
  },
106
106
  "dependencies": {
107
- "@genesislcap/foundation-ai": "15.62.0",
108
- "@genesislcap/foundation-logger": "15.62.0",
109
- "@genesislcap/foundation-notifications": "15.62.0",
110
- "@genesislcap/foundation-redux": "15.62.0",
111
- "@genesislcap/foundation-ui": "15.62.0",
112
- "@genesislcap/foundation-utils": "15.62.0",
113
- "@genesislcap/rapid-design-system": "15.62.0",
114
- "@genesislcap/web-core": "15.62.0",
107
+ "@genesislcap/foundation-ai": "15.63.0",
108
+ "@genesislcap/foundation-logger": "15.63.0",
109
+ "@genesislcap/foundation-notifications": "15.63.0",
110
+ "@genesislcap/foundation-redux": "15.63.0",
111
+ "@genesislcap/foundation-ui": "15.63.0",
112
+ "@genesislcap/foundation-utils": "15.63.0",
113
+ "@genesislcap/rapid-design-system": "15.63.0",
114
+ "@genesislcap/web-core": "15.63.0",
115
115
  "dompurify": "^3.3.1",
116
116
  "marked": "^17.0.3"
117
117
  },
118
118
  "peerDependencies": {
119
- "@genesislcap/foundation-comms": "^15.62.0"
119
+ "@genesislcap/foundation-comms": "^15.63.0"
120
120
  },
121
121
  "peerDependenciesMeta": {
122
122
  "@genesislcap/foundation-comms": {