@genesislcap/ai-assistant 14.492.1 → 14.493.0-GENC-1461.2

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 (36) hide show
  1. package/dist/ai-assistant.api.json +576 -211
  2. package/dist/ai-assistant.d.ts +128 -5
  3. package/dist/chat-driver.cjs +5576 -0
  4. package/dist/chat-driver.cjs.map +7 -0
  5. package/dist/chat-driver.mjs +5534 -0
  6. package/dist/chat-driver.mjs.map +7 -0
  7. package/dist/custom-elements.json +348 -44
  8. package/dist/dts/channel/ai-activity-bus.d.ts +36 -0
  9. package/dist/dts/channel/ai-activity-bus.d.ts.map +1 -1
  10. package/dist/dts/chat-driver-node.d.ts +28 -0
  11. package/dist/dts/chat-driver-node.d.ts.map +1 -0
  12. package/dist/dts/components/chat-driver/chat-driver.d.ts +49 -5
  13. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  14. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +3 -0
  15. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  16. package/dist/dts/config/config.d.ts +37 -2
  17. package/dist/dts/config/config.d.ts.map +1 -1
  18. package/dist/dts/main/main.d.ts.map +1 -1
  19. package/dist/esm/channel/ai-activity-bus.js +48 -12
  20. package/dist/esm/chat-driver-node.js +33 -0
  21. package/dist/esm/components/chat-driver/chat-driver.js +28 -14
  22. package/dist/esm/components/chat-driver/chat-driver.test.js +19 -35
  23. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +7 -1
  24. package/dist/esm/main/main.js +8 -1
  25. package/dist/esm/main/popout-interaction-gate.test.js +6 -10
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +29 -19
  28. package/scripts/build-chat-driver-node.mjs +42 -0
  29. package/src/channel/ai-activity-bus.ts +64 -10
  30. package/src/chat-driver-node.ts +54 -0
  31. package/src/components/chat-driver/chat-driver.test.ts +23 -49
  32. package/src/components/chat-driver/chat-driver.ts +96 -28
  33. package/src/components/orchestrating-driver/orchestrating-driver.ts +10 -11
  34. package/src/config/config.ts +40 -1
  35. package/src/main/main.ts +8 -11
  36. package/src/main/popout-interaction-gate.test.ts +6 -11
@@ -178,6 +178,116 @@
178
178
  "name": "",
179
179
  "preserveMemberOrder": false,
180
180
  "members": [
181
+ {
182
+ "kind": "Interface",
183
+ "canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface",
184
+ "docComment": "/**\n * Minimal activity-bus surface the drivers depend on. `ChatDriver`/`OrchestratingDriver` only ever *publish* — accepting this narrow interface (rather than importing the module singleton) lets a headless/server or unit-test host omit the bus entirely, so no live `BroadcastChannel` is ever opened on that path. See {@link NOOP_ACTIVITY_BUS}.\n *\n * @beta\n */\n",
185
+ "excerptTokens": [
186
+ {
187
+ "kind": "Content",
188
+ "text": "export interface ActivityBus "
189
+ }
190
+ ],
191
+ "fileUrlPath": "src/channel/ai-activity-bus.ts",
192
+ "releaseTag": "Beta",
193
+ "name": "ActivityBus",
194
+ "preserveMemberOrder": false,
195
+ "members": [
196
+ {
197
+ "kind": "MethodSignature",
198
+ "canonicalReference": "@genesislcap/ai-assistant!ActivityBus#publish:member(1)",
199
+ "docComment": "",
200
+ "excerptTokens": [
201
+ {
202
+ "kind": "Content",
203
+ "text": "publish<K extends "
204
+ },
205
+ {
206
+ "kind": "Content",
207
+ "text": "keyof "
208
+ },
209
+ {
210
+ "kind": "Reference",
211
+ "text": "AgenticActivityEvents",
212
+ "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents:interface"
213
+ },
214
+ {
215
+ "kind": "Content",
216
+ "text": ">(type: "
217
+ },
218
+ {
219
+ "kind": "Content",
220
+ "text": "K"
221
+ },
222
+ {
223
+ "kind": "Content",
224
+ "text": ", detail: "
225
+ },
226
+ {
227
+ "kind": "Reference",
228
+ "text": "AgenticActivityEvents",
229
+ "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents:interface"
230
+ },
231
+ {
232
+ "kind": "Content",
233
+ "text": "[K]"
234
+ },
235
+ {
236
+ "kind": "Content",
237
+ "text": "): "
238
+ },
239
+ {
240
+ "kind": "Content",
241
+ "text": "void"
242
+ },
243
+ {
244
+ "kind": "Content",
245
+ "text": ";"
246
+ }
247
+ ],
248
+ "isOptional": false,
249
+ "returnTypeTokenRange": {
250
+ "startIndex": 9,
251
+ "endIndex": 10
252
+ },
253
+ "releaseTag": "Beta",
254
+ "overloadIndex": 1,
255
+ "parameters": [
256
+ {
257
+ "parameterName": "type",
258
+ "parameterTypeTokenRange": {
259
+ "startIndex": 4,
260
+ "endIndex": 5
261
+ },
262
+ "isOptional": false
263
+ },
264
+ {
265
+ "parameterName": "detail",
266
+ "parameterTypeTokenRange": {
267
+ "startIndex": 6,
268
+ "endIndex": 8
269
+ },
270
+ "isOptional": false
271
+ }
272
+ ],
273
+ "typeParameters": [
274
+ {
275
+ "typeParameterName": "K",
276
+ "constraintTokenRange": {
277
+ "startIndex": 1,
278
+ "endIndex": 3
279
+ },
280
+ "defaultTypeTokenRange": {
281
+ "startIndex": 0,
282
+ "endIndex": 0
283
+ }
284
+ }
285
+ ],
286
+ "name": "publish"
287
+ }
288
+ ],
289
+ "extendsTokenRanges": []
290
+ },
181
291
  {
182
292
  "kind": "Variable",
183
293
  "canonicalReference": "@genesislcap/ai-assistant!AGENT_PICKER_AUTO_VALUE:var",
@@ -637,6 +747,33 @@
637
747
  "endIndex": 2
638
748
  }
639
749
  },
750
+ {
751
+ "kind": "PropertySignature",
752
+ "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityBusConfig#channelNameFactory:member",
753
+ "docComment": "/**\n * Lazy alternative to {@link AgenticActivityBusConfig.channelName}: called the first time a cross-tab channel is actually needed, in a browser only. Deferring the name computation keeps side effects (e.g. `sessionStorage` reads) out of module-eval and off the non-browser path. Ignored if `channelName` is also set.\n */\n",
754
+ "excerptTokens": [
755
+ {
756
+ "kind": "Content",
757
+ "text": "channelNameFactory?: "
758
+ },
759
+ {
760
+ "kind": "Content",
761
+ "text": "() => string"
762
+ },
763
+ {
764
+ "kind": "Content",
765
+ "text": ";"
766
+ }
767
+ ],
768
+ "isReadonly": false,
769
+ "isOptional": true,
770
+ "releaseTag": "Beta",
771
+ "name": "channelNameFactory",
772
+ "propertyTypeTokenRange": {
773
+ "startIndex": 1,
774
+ "endIndex": 2
775
+ }
776
+ },
640
777
  {
641
778
  "kind": "PropertySignature",
642
779
  "canonicalReference": "@genesislcap/ai-assistant!AgenticActivityBusConfig#crossTabEvents:member",
@@ -4038,75 +4175,12 @@
4038
4175
  },
4039
4176
  {
4040
4177
  "kind": "Content",
4041
- "text": ", toolHandlers?: "
4042
- },
4043
- {
4044
- "kind": "Reference",
4045
- "text": "ToolHandlersInput",
4046
- "canonicalReference": "@genesislcap/ai-assistant!ToolHandlersInput:type"
4047
- },
4048
- {
4049
- "kind": "Content",
4050
- "text": ", toolDefinitions?: "
4051
- },
4052
- {
4053
- "kind": "Reference",
4054
- "text": "ToolDefinitionsInput",
4055
- "canonicalReference": "@genesislcap/ai-assistant!ToolDefinitionsInput:type"
4056
- },
4057
- {
4058
- "kind": "Content",
4059
- "text": ", systemPrompt?: "
4060
- },
4061
- {
4062
- "kind": "Reference",
4063
- "text": "SystemPromptInput",
4064
- "canonicalReference": "@genesislcap/ai-assistant!SystemPromptInput:type"
4065
- },
4066
- {
4067
- "kind": "Content",
4068
- "text": ", primerHistory?: "
4178
+ "text": ", config?: "
4069
4179
  },
4070
4180
  {
4071
4181
  "kind": "Reference",
4072
- "text": "ChatMessage",
4073
- "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
4074
- },
4075
- {
4076
- "kind": "Content",
4077
- "text": "[]"
4078
- },
4079
- {
4080
- "kind": "Content",
4081
- "text": ", maxToolIterations?: "
4082
- },
4083
- {
4084
- "kind": "Content",
4085
- "text": "number"
4086
- },
4087
- {
4088
- "kind": "Content",
4089
- "text": ", maxFoldOperations?: "
4090
- },
4091
- {
4092
- "kind": "Content",
4093
- "text": "number"
4094
- },
4095
- {
4096
- "kind": "Content",
4097
- "text": ", maxTurnSnapshots?: "
4098
- },
4099
- {
4100
- "kind": "Content",
4101
- "text": "number"
4102
- },
4103
- {
4104
- "kind": "Content",
4105
- "text": ", \n sessionKey?: "
4106
- },
4107
- {
4108
- "kind": "Content",
4109
- "text": "string"
4182
+ "text": "ChatDriverConfig",
4183
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig:interface"
4110
4184
  },
4111
4185
  {
4112
4186
  "kind": "Content",
@@ -4126,68 +4200,12 @@
4126
4200
  "isOptional": false
4127
4201
  },
4128
4202
  {
4129
- "parameterName": "toolHandlers",
4203
+ "parameterName": "config",
4130
4204
  "parameterTypeTokenRange": {
4131
4205
  "startIndex": 3,
4132
4206
  "endIndex": 4
4133
4207
  },
4134
4208
  "isOptional": true
4135
- },
4136
- {
4137
- "parameterName": "toolDefinitions",
4138
- "parameterTypeTokenRange": {
4139
- "startIndex": 5,
4140
- "endIndex": 6
4141
- },
4142
- "isOptional": true
4143
- },
4144
- {
4145
- "parameterName": "systemPrompt",
4146
- "parameterTypeTokenRange": {
4147
- "startIndex": 7,
4148
- "endIndex": 8
4149
- },
4150
- "isOptional": true
4151
- },
4152
- {
4153
- "parameterName": "primerHistory",
4154
- "parameterTypeTokenRange": {
4155
- "startIndex": 9,
4156
- "endIndex": 11
4157
- },
4158
- "isOptional": true
4159
- },
4160
- {
4161
- "parameterName": "maxToolIterations",
4162
- "parameterTypeTokenRange": {
4163
- "startIndex": 12,
4164
- "endIndex": 13
4165
- },
4166
- "isOptional": true
4167
- },
4168
- {
4169
- "parameterName": "maxFoldOperations",
4170
- "parameterTypeTokenRange": {
4171
- "startIndex": 14,
4172
- "endIndex": 15
4173
- },
4174
- "isOptional": true
4175
- },
4176
- {
4177
- "parameterName": "maxTurnSnapshots",
4178
- "parameterTypeTokenRange": {
4179
- "startIndex": 16,
4180
- "endIndex": 17
4181
- },
4182
- "isOptional": true
4183
- },
4184
- {
4185
- "parameterName": "sessionKey",
4186
- "parameterTypeTokenRange": {
4187
- "startIndex": 18,
4188
- "endIndex": 19
4189
- },
4190
- "isOptional": true
4191
4209
  }
4192
4210
  ]
4193
4211
  },
@@ -5260,153 +5278,423 @@
5260
5278
  "isOptional": true
5261
5279
  }
5262
5280
  ],
5263
- "isOptional": false,
5264
- "isAbstract": false,
5265
- "name": "sendMessage"
5281
+ "isOptional": false,
5282
+ "isAbstract": false,
5283
+ "name": "sendMessage"
5284
+ },
5285
+ {
5286
+ "kind": "Method",
5287
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#setHostInteractionRequester:member(1)",
5288
+ "docComment": "/**\n * Wire a parent driver as the host for this driver's interactions. When set, `requestInteraction` delegates upward so the widget renders in (and resolves through) the parent's history and pending map. Calls chain naturally: a grandchild → child → root.\n */\n",
5289
+ "excerptTokens": [
5290
+ {
5291
+ "kind": "Content",
5292
+ "text": "setHostInteractionRequester(fn: "
5293
+ },
5294
+ {
5295
+ "kind": "Content",
5296
+ "text": "<T>(componentName: string, data: any, options?: "
5297
+ },
5298
+ {
5299
+ "kind": "Reference",
5300
+ "text": "InteractionRequestOptions",
5301
+ "canonicalReference": "@genesislcap/foundation-ai!InteractionRequestOptions:interface"
5302
+ },
5303
+ {
5304
+ "kind": "Content",
5305
+ "text": ") => "
5306
+ },
5307
+ {
5308
+ "kind": "Reference",
5309
+ "text": "Promise",
5310
+ "canonicalReference": "!Promise:interface"
5311
+ },
5312
+ {
5313
+ "kind": "Content",
5314
+ "text": "<T>"
5315
+ },
5316
+ {
5317
+ "kind": "Content",
5318
+ "text": "): "
5319
+ },
5320
+ {
5321
+ "kind": "Content",
5322
+ "text": "void"
5323
+ },
5324
+ {
5325
+ "kind": "Content",
5326
+ "text": ";"
5327
+ }
5328
+ ],
5329
+ "isStatic": false,
5330
+ "returnTypeTokenRange": {
5331
+ "startIndex": 7,
5332
+ "endIndex": 8
5333
+ },
5334
+ "releaseTag": "Beta",
5335
+ "isProtected": false,
5336
+ "overloadIndex": 1,
5337
+ "parameters": [
5338
+ {
5339
+ "parameterName": "fn",
5340
+ "parameterTypeTokenRange": {
5341
+ "startIndex": 1,
5342
+ "endIndex": 6
5343
+ },
5344
+ "isOptional": false
5345
+ }
5346
+ ],
5347
+ "isOptional": false,
5348
+ "isAbstract": false,
5349
+ "name": "setHostInteractionRequester"
5350
+ },
5351
+ {
5352
+ "kind": "Method",
5353
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#setProviderHistoryTransform:member(1)",
5354
+ "docComment": "/**\n * Optional transform applied to conversation history immediately before each LLM request. Cleared when `undefined`. Does not alter stored history.\n */\n",
5355
+ "excerptTokens": [
5356
+ {
5357
+ "kind": "Content",
5358
+ "text": "setProviderHistoryTransform(transform?: "
5359
+ },
5360
+ {
5361
+ "kind": "Content",
5362
+ "text": "(history: "
5363
+ },
5364
+ {
5365
+ "kind": "Reference",
5366
+ "text": "ChatMessage",
5367
+ "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
5368
+ },
5369
+ {
5370
+ "kind": "Content",
5371
+ "text": "[]) => "
5372
+ },
5373
+ {
5374
+ "kind": "Reference",
5375
+ "text": "ChatMessage",
5376
+ "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
5377
+ },
5378
+ {
5379
+ "kind": "Content",
5380
+ "text": "[]"
5381
+ },
5382
+ {
5383
+ "kind": "Content",
5384
+ "text": "): "
5385
+ },
5386
+ {
5387
+ "kind": "Content",
5388
+ "text": "void"
5389
+ },
5390
+ {
5391
+ "kind": "Content",
5392
+ "text": ";"
5393
+ }
5394
+ ],
5395
+ "isStatic": false,
5396
+ "returnTypeTokenRange": {
5397
+ "startIndex": 7,
5398
+ "endIndex": 8
5399
+ },
5400
+ "releaseTag": "Beta",
5401
+ "isProtected": false,
5402
+ "overloadIndex": 1,
5403
+ "parameters": [
5404
+ {
5405
+ "parameterName": "transform",
5406
+ "parameterTypeTokenRange": {
5407
+ "startIndex": 1,
5408
+ "endIndex": 6
5409
+ },
5410
+ "isOptional": true
5411
+ }
5412
+ ],
5413
+ "isOptional": false,
5414
+ "isAbstract": false,
5415
+ "name": "setProviderHistoryTransform"
5416
+ }
5417
+ ],
5418
+ "extendsTokenRange": {
5419
+ "startIndex": 1,
5420
+ "endIndex": 2
5421
+ },
5422
+ "implementsTokenRanges": [
5423
+ {
5424
+ "startIndex": 3,
5425
+ "endIndex": 4
5426
+ }
5427
+ ]
5428
+ },
5429
+ {
5430
+ "kind": "Interface",
5431
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig:interface",
5432
+ "docComment": "/**\n * Construction-time configuration for {@link ChatDriver}. Everything except the provider registry is optional — most fields are also settable per-agent via `applyAgent`, so a bare `new ChatDriver(registry)` is valid. Mirrors the `(registry, options)` shape of `OrchestratingDriver`.\n *\n * @beta\n */\n",
5433
+ "excerptTokens": [
5434
+ {
5435
+ "kind": "Content",
5436
+ "text": "export interface ChatDriverConfig "
5437
+ }
5438
+ ],
5439
+ "fileUrlPath": "src/components/chat-driver/chat-driver.ts",
5440
+ "releaseTag": "Beta",
5441
+ "name": "ChatDriverConfig",
5442
+ "preserveMemberOrder": false,
5443
+ "members": [
5444
+ {
5445
+ "kind": "PropertySignature",
5446
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#activityBus:member",
5447
+ "docComment": "/**\n * Activity bus for lifecycle/halo/tool-loop events. Injected by the browser host (the shared cross-tab singleton); omitted off-browser (Node, tests, headless), where it defaults to {@link NOOP_ACTIVITY_BUS} so no `BroadcastChannel` is ever opened.\n */\n",
5448
+ "excerptTokens": [
5449
+ {
5450
+ "kind": "Content",
5451
+ "text": "activityBus?: "
5452
+ },
5453
+ {
5454
+ "kind": "Reference",
5455
+ "text": "ActivityBus",
5456
+ "canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
5457
+ },
5458
+ {
5459
+ "kind": "Content",
5460
+ "text": ";"
5461
+ }
5462
+ ],
5463
+ "isReadonly": false,
5464
+ "isOptional": true,
5465
+ "releaseTag": "Beta",
5466
+ "name": "activityBus",
5467
+ "propertyTypeTokenRange": {
5468
+ "startIndex": 1,
5469
+ "endIndex": 2
5470
+ }
5471
+ },
5472
+ {
5473
+ "kind": "PropertySignature",
5474
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#maxFoldOperations:member",
5475
+ "docComment": "/**\n * Hard cap on fold operations. Default `5`.\n */\n",
5476
+ "excerptTokens": [
5477
+ {
5478
+ "kind": "Content",
5479
+ "text": "maxFoldOperations?: "
5480
+ },
5481
+ {
5482
+ "kind": "Content",
5483
+ "text": "number"
5484
+ },
5485
+ {
5486
+ "kind": "Content",
5487
+ "text": ";"
5488
+ }
5489
+ ],
5490
+ "isReadonly": false,
5491
+ "isOptional": true,
5492
+ "releaseTag": "Beta",
5493
+ "name": "maxFoldOperations",
5494
+ "propertyTypeTokenRange": {
5495
+ "startIndex": 1,
5496
+ "endIndex": 2
5497
+ }
5498
+ },
5499
+ {
5500
+ "kind": "PropertySignature",
5501
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#maxToolIterations:member",
5502
+ "docComment": "/**\n * Hard cap on tool-loop iterations. Default `50`.\n */\n",
5503
+ "excerptTokens": [
5504
+ {
5505
+ "kind": "Content",
5506
+ "text": "maxToolIterations?: "
5507
+ },
5508
+ {
5509
+ "kind": "Content",
5510
+ "text": "number"
5511
+ },
5512
+ {
5513
+ "kind": "Content",
5514
+ "text": ";"
5515
+ }
5516
+ ],
5517
+ "isReadonly": false,
5518
+ "isOptional": true,
5519
+ "releaseTag": "Beta",
5520
+ "name": "maxToolIterations",
5521
+ "propertyTypeTokenRange": {
5522
+ "startIndex": 1,
5523
+ "endIndex": 2
5524
+ }
5266
5525
  },
5267
5526
  {
5268
- "kind": "Method",
5269
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#setHostInteractionRequester:member(1)",
5270
- "docComment": "/**\n * Wire a parent driver as the host for this driver's interactions. When set, `requestInteraction` delegates upward so the widget renders in (and resolves through) the parent's history and pending map. Calls chain naturally: a grandchild → child → root.\n */\n",
5527
+ "kind": "PropertySignature",
5528
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#maxTurnSnapshots:member",
5529
+ "docComment": "/**\n * Ring-buffer size for per-turn snapshots. Default `400`.\n */\n",
5271
5530
  "excerptTokens": [
5272
5531
  {
5273
5532
  "kind": "Content",
5274
- "text": "setHostInteractionRequester(fn: "
5533
+ "text": "maxTurnSnapshots?: "
5275
5534
  },
5276
5535
  {
5277
5536
  "kind": "Content",
5278
- "text": "<T>(componentName: string, data: any, options?: "
5537
+ "text": "number"
5279
5538
  },
5280
5539
  {
5281
- "kind": "Reference",
5282
- "text": "InteractionRequestOptions",
5283
- "canonicalReference": "@genesislcap/foundation-ai!InteractionRequestOptions:interface"
5284
- },
5540
+ "kind": "Content",
5541
+ "text": ";"
5542
+ }
5543
+ ],
5544
+ "isReadonly": false,
5545
+ "isOptional": true,
5546
+ "releaseTag": "Beta",
5547
+ "name": "maxTurnSnapshots",
5548
+ "propertyTypeTokenRange": {
5549
+ "startIndex": 1,
5550
+ "endIndex": 2
5551
+ }
5552
+ },
5553
+ {
5554
+ "kind": "PropertySignature",
5555
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#primerHistory:member",
5556
+ "docComment": "/**\n * Primer history prepended to the conversation.\n */\n",
5557
+ "excerptTokens": [
5285
5558
  {
5286
5559
  "kind": "Content",
5287
- "text": ") => "
5560
+ "text": "primerHistory?: "
5288
5561
  },
5289
5562
  {
5290
5563
  "kind": "Reference",
5291
- "text": "Promise",
5292
- "canonicalReference": "!Promise:interface"
5564
+ "text": "ChatMessage",
5565
+ "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
5293
5566
  },
5294
5567
  {
5295
5568
  "kind": "Content",
5296
- "text": "<T>"
5569
+ "text": "[]"
5297
5570
  },
5298
5571
  {
5299
5572
  "kind": "Content",
5300
- "text": "): "
5573
+ "text": ";"
5574
+ }
5575
+ ],
5576
+ "isReadonly": false,
5577
+ "isOptional": true,
5578
+ "releaseTag": "Beta",
5579
+ "name": "primerHistory",
5580
+ "propertyTypeTokenRange": {
5581
+ "startIndex": 1,
5582
+ "endIndex": 3
5583
+ }
5584
+ },
5585
+ {
5586
+ "kind": "PropertySignature",
5587
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#sessionKey:member",
5588
+ "docComment": "/**\n * Session identity used to file meta events onto the shared debug-log timeline.\n */\n",
5589
+ "excerptTokens": [
5590
+ {
5591
+ "kind": "Content",
5592
+ "text": "sessionKey?: "
5301
5593
  },
5302
5594
  {
5303
5595
  "kind": "Content",
5304
- "text": "void"
5596
+ "text": "string"
5305
5597
  },
5306
5598
  {
5307
5599
  "kind": "Content",
5308
5600
  "text": ";"
5309
5601
  }
5310
5602
  ],
5311
- "isStatic": false,
5312
- "returnTypeTokenRange": {
5313
- "startIndex": 7,
5314
- "endIndex": 8
5315
- },
5603
+ "isReadonly": false,
5604
+ "isOptional": true,
5316
5605
  "releaseTag": "Beta",
5317
- "isProtected": false,
5318
- "overloadIndex": 1,
5319
- "parameters": [
5320
- {
5321
- "parameterName": "fn",
5322
- "parameterTypeTokenRange": {
5323
- "startIndex": 1,
5324
- "endIndex": 6
5325
- },
5326
- "isOptional": false
5327
- }
5328
- ],
5329
- "isOptional": false,
5330
- "isAbstract": false,
5331
- "name": "setHostInteractionRequester"
5606
+ "name": "sessionKey",
5607
+ "propertyTypeTokenRange": {
5608
+ "startIndex": 1,
5609
+ "endIndex": 2
5610
+ }
5332
5611
  },
5333
5612
  {
5334
- "kind": "Method",
5335
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#setProviderHistoryTransform:member(1)",
5336
- "docComment": "/**\n * Optional transform applied to conversation history immediately before each LLM request. Cleared when `undefined`. Does not alter stored history.\n */\n",
5613
+ "kind": "PropertySignature",
5614
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#systemPrompt:member",
5615
+ "docComment": "/**\n * Initial system prompt (string or per-turn resolver).\n */\n",
5337
5616
  "excerptTokens": [
5338
5617
  {
5339
5618
  "kind": "Content",
5340
- "text": "setProviderHistoryTransform(transform?: "
5341
- },
5342
- {
5343
- "kind": "Content",
5344
- "text": "(history: "
5619
+ "text": "systemPrompt?: "
5345
5620
  },
5346
5621
  {
5347
5622
  "kind": "Reference",
5348
- "text": "ChatMessage",
5349
- "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
5623
+ "text": "SystemPromptInput",
5624
+ "canonicalReference": "@genesislcap/ai-assistant!SystemPromptInput:type"
5350
5625
  },
5351
5626
  {
5352
5627
  "kind": "Content",
5353
- "text": "[]) => "
5628
+ "text": ";"
5629
+ }
5630
+ ],
5631
+ "isReadonly": false,
5632
+ "isOptional": true,
5633
+ "releaseTag": "Beta",
5634
+ "name": "systemPrompt",
5635
+ "propertyTypeTokenRange": {
5636
+ "startIndex": 1,
5637
+ "endIndex": 2
5638
+ }
5639
+ },
5640
+ {
5641
+ "kind": "PropertySignature",
5642
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#toolDefinitions:member",
5643
+ "docComment": "/**\n * Initial tool definitions (static array or per-turn factory). Default `[]`.\n */\n",
5644
+ "excerptTokens": [
5645
+ {
5646
+ "kind": "Content",
5647
+ "text": "toolDefinitions?: "
5354
5648
  },
5355
5649
  {
5356
5650
  "kind": "Reference",
5357
- "text": "ChatMessage",
5358
- "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
5651
+ "text": "ToolDefinitionsInput",
5652
+ "canonicalReference": "@genesislcap/ai-assistant!ToolDefinitionsInput:type"
5359
5653
  },
5360
5654
  {
5361
5655
  "kind": "Content",
5362
- "text": "[]"
5363
- },
5656
+ "text": ";"
5657
+ }
5658
+ ],
5659
+ "isReadonly": false,
5660
+ "isOptional": true,
5661
+ "releaseTag": "Beta",
5662
+ "name": "toolDefinitions",
5663
+ "propertyTypeTokenRange": {
5664
+ "startIndex": 1,
5665
+ "endIndex": 2
5666
+ }
5667
+ },
5668
+ {
5669
+ "kind": "PropertySignature",
5670
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#toolHandlers:member",
5671
+ "docComment": "/**\n * Initial tool handlers (static map or per-turn factory). Default `{}`.\n */\n",
5672
+ "excerptTokens": [
5364
5673
  {
5365
5674
  "kind": "Content",
5366
- "text": "): "
5675
+ "text": "toolHandlers?: "
5367
5676
  },
5368
5677
  {
5369
- "kind": "Content",
5370
- "text": "void"
5678
+ "kind": "Reference",
5679
+ "text": "ToolHandlersInput",
5680
+ "canonicalReference": "@genesislcap/ai-assistant!ToolHandlersInput:type"
5371
5681
  },
5372
5682
  {
5373
5683
  "kind": "Content",
5374
5684
  "text": ";"
5375
5685
  }
5376
5686
  ],
5377
- "isStatic": false,
5378
- "returnTypeTokenRange": {
5379
- "startIndex": 7,
5380
- "endIndex": 8
5381
- },
5687
+ "isReadonly": false,
5688
+ "isOptional": true,
5382
5689
  "releaseTag": "Beta",
5383
- "isProtected": false,
5384
- "overloadIndex": 1,
5385
- "parameters": [
5386
- {
5387
- "parameterName": "transform",
5388
- "parameterTypeTokenRange": {
5389
- "startIndex": 1,
5390
- "endIndex": 6
5391
- },
5392
- "isOptional": true
5393
- }
5394
- ],
5395
- "isOptional": false,
5396
- "isAbstract": false,
5397
- "name": "setProviderHistoryTransform"
5690
+ "name": "toolHandlers",
5691
+ "propertyTypeTokenRange": {
5692
+ "startIndex": 1,
5693
+ "endIndex": 2
5694
+ }
5398
5695
  }
5399
5696
  ],
5400
- "extendsTokenRange": {
5401
- "startIndex": 1,
5402
- "endIndex": 2
5403
- },
5404
- "implementsTokenRanges": [
5405
- {
5406
- "startIndex": 3,
5407
- "endIndex": 4
5408
- }
5409
- ]
5697
+ "extendsTokenRanges": []
5410
5698
  },
5411
5699
  {
5412
5700
  "kind": "Interface",
@@ -12540,6 +12828,30 @@
12540
12828
  ],
12541
12829
  "extendsTokenRanges": []
12542
12830
  },
12831
+ {
12832
+ "kind": "Variable",
12833
+ "canonicalReference": "@genesislcap/ai-assistant!NOOP_ACTIVITY_BUS:var",
12834
+ "docComment": "/**\n * No-op {@link ActivityBus}. The default when no bus is injected (Node, tests, headless server use) — publishing goes nowhere and nothing is left open to tear down.\n *\n * @beta\n */\n",
12835
+ "excerptTokens": [
12836
+ {
12837
+ "kind": "Content",
12838
+ "text": "NOOP_ACTIVITY_BUS: "
12839
+ },
12840
+ {
12841
+ "kind": "Reference",
12842
+ "text": "ActivityBus",
12843
+ "canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
12844
+ }
12845
+ ],
12846
+ "fileUrlPath": "src/channel/ai-activity-bus.ts",
12847
+ "isReadonly": true,
12848
+ "releaseTag": "Beta",
12849
+ "name": "NOOP_ACTIVITY_BUS",
12850
+ "variableTypeTokenRange": {
12851
+ "startIndex": 1,
12852
+ "endIndex": 2
12853
+ }
12854
+ },
12543
12855
  {
12544
12856
  "kind": "Class",
12545
12857
  "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver:class",
@@ -12607,7 +12919,16 @@
12607
12919
  },
12608
12920
  {
12609
12921
  "kind": "Content",
12610
- "text": "{\n sessionKey?: string;\n maxHandoffs?: number;\n classifierHistoryLength?: number;\n classifierRetries?: number;\n maxToolIterations?: number;\n maxFoldOperations?: number;\n maxTurnSnapshots?: number;\n }"
12922
+ "text": "{\n sessionKey?: string;\n maxHandoffs?: number;\n classifierHistoryLength?: number;\n classifierRetries?: number;\n maxToolIterations?: number;\n maxFoldOperations?: number;\n maxTurnSnapshots?: number;\n activityBus?: "
12923
+ },
12924
+ {
12925
+ "kind": "Reference",
12926
+ "text": "ActivityBus",
12927
+ "canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
12928
+ },
12929
+ {
12930
+ "kind": "Content",
12931
+ "text": ";\n }"
12611
12932
  },
12612
12933
  {
12613
12934
  "kind": "Content",
@@ -12638,7 +12959,7 @@
12638
12959
  "parameterName": "options",
12639
12960
  "parameterTypeTokenRange": {
12640
12961
  "startIndex": 6,
12641
- "endIndex": 7
12962
+ "endIndex": 9
12642
12963
  },
12643
12964
  "isOptional": true
12644
12965
  }
@@ -14150,6 +14471,50 @@
14150
14471
  "endIndex": 0
14151
14472
  }
14152
14473
  },
14474
+ {
14475
+ "kind": "TypeAlias",
14476
+ "canonicalReference": "@genesislcap/ai-assistant!ResponseSchemaInput:type",
14477
+ "docComment": "/**\n * Structured-output schema for an agent. When set, the model's final (non-tool) answer is constrained to this JSON Schema instead of free text. Either a static schema or a function resolved each tool-loop iteration — return the schema on the turn(s) it should apply and `undefined` otherwise, so \"whole-loop\" vs \"finalize-turn\" enforcement is just what the resolver returns (e.g. `({ state }) => state.machine.matches('finalizing') ? schema : undefined`).\n *\n * Orthogonal to {@link ToolChoiceInput}: an agent can carry both `tools` and a `responseSchema`. Each provider applies it natively where possible (Anthropic `output_config.format`, Gemini JSON mode) and degrades gracefully otherwise. The schema is a plain JSON Schema object; keep to the portable subset providers share (`additionalProperties: false`, explicit `required`, enums, `anyOf` for nullables — no numeric/string constraints or recursion).\n *\n * @beta\n */\n",
14478
+ "excerptTokens": [
14479
+ {
14480
+ "kind": "Content",
14481
+ "text": "export type ResponseSchemaInput = "
14482
+ },
14483
+ {
14484
+ "kind": "Content",
14485
+ "text": "object | ((ctx: "
14486
+ },
14487
+ {
14488
+ "kind": "Reference",
14489
+ "text": "SystemPromptContext",
14490
+ "canonicalReference": "@genesislcap/ai-assistant!SystemPromptContext:interface"
14491
+ },
14492
+ {
14493
+ "kind": "Content",
14494
+ "text": ") => object | undefined | "
14495
+ },
14496
+ {
14497
+ "kind": "Reference",
14498
+ "text": "Promise",
14499
+ "canonicalReference": "!Promise:interface"
14500
+ },
14501
+ {
14502
+ "kind": "Content",
14503
+ "text": "<object | undefined>)"
14504
+ },
14505
+ {
14506
+ "kind": "Content",
14507
+ "text": ";"
14508
+ }
14509
+ ],
14510
+ "fileUrlPath": "src/config/config.ts",
14511
+ "releaseTag": "Beta",
14512
+ "name": "ResponseSchemaInput",
14513
+ "typeTokenRange": {
14514
+ "startIndex": 1,
14515
+ "endIndex": 6
14516
+ }
14517
+ },
14153
14518
  {
14154
14519
  "kind": "Function",
14155
14520
  "canonicalReference": "@genesislcap/ai-assistant!restoreMachine:function(1)",