@genesislcap/ai-assistant 14.495.0 → 14.496.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.
- package/dist/ai-assistant.api.json +576 -211
- package/dist/ai-assistant.d.ts +128 -5
- package/dist/chat-driver.cjs +5608 -0
- package/dist/chat-driver.cjs.map +7 -0
- package/dist/chat-driver.mjs +5566 -0
- package/dist/chat-driver.mjs.map +7 -0
- package/dist/custom-elements.json +306 -2
- package/dist/dts/channel/ai-activity-bus.d.ts +36 -0
- package/dist/dts/channel/ai-activity-bus.d.ts.map +1 -1
- package/dist/dts/chat-driver-node.d.ts +28 -0
- package/dist/dts/chat-driver-node.d.ts.map +1 -0
- package/dist/dts/components/chat-driver/chat-driver.d.ts +49 -5
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +3 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/config/config.d.ts +37 -2
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/esm/channel/ai-activity-bus.js +48 -12
- package/dist/esm/chat-driver-node.js +33 -0
- package/dist/esm/components/chat-driver/chat-driver.js +28 -14
- package/dist/esm/components/chat-driver/chat-driver.test.js +32 -40
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +7 -1
- package/dist/esm/main/main.js +8 -1
- package/dist/esm/main/popout-interaction-gate.test.js +6 -10
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -19
- package/scripts/build-chat-driver-node.mjs +42 -0
- package/src/channel/ai-activity-bus.ts +64 -10
- package/src/chat-driver-node.ts +54 -0
- package/src/components/chat-driver/chat-driver.test.ts +36 -62
- package/src/components/chat-driver/chat-driver.ts +96 -28
- package/src/components/orchestrating-driver/orchestrating-driver.ts +10 -11
- package/src/config/config.ts +40 -1
- package/src/main/main.ts +8 -11
- 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",
|
|
@@ -4047,75 +4184,12 @@
|
|
|
4047
4184
|
},
|
|
4048
4185
|
{
|
|
4049
4186
|
"kind": "Content",
|
|
4050
|
-
"text": ",
|
|
4051
|
-
},
|
|
4052
|
-
{
|
|
4053
|
-
"kind": "Reference",
|
|
4054
|
-
"text": "ToolHandlersInput",
|
|
4055
|
-
"canonicalReference": "@genesislcap/ai-assistant!ToolHandlersInput:type"
|
|
4056
|
-
},
|
|
4057
|
-
{
|
|
4058
|
-
"kind": "Content",
|
|
4059
|
-
"text": ", toolDefinitions?: "
|
|
4060
|
-
},
|
|
4061
|
-
{
|
|
4062
|
-
"kind": "Reference",
|
|
4063
|
-
"text": "ToolDefinitionsInput",
|
|
4064
|
-
"canonicalReference": "@genesislcap/ai-assistant!ToolDefinitionsInput:type"
|
|
4065
|
-
},
|
|
4066
|
-
{
|
|
4067
|
-
"kind": "Content",
|
|
4068
|
-
"text": ", systemPrompt?: "
|
|
4069
|
-
},
|
|
4070
|
-
{
|
|
4071
|
-
"kind": "Reference",
|
|
4072
|
-
"text": "SystemPromptInput",
|
|
4073
|
-
"canonicalReference": "@genesislcap/ai-assistant!SystemPromptInput:type"
|
|
4074
|
-
},
|
|
4075
|
-
{
|
|
4076
|
-
"kind": "Content",
|
|
4077
|
-
"text": ", primerHistory?: "
|
|
4187
|
+
"text": ", config?: "
|
|
4078
4188
|
},
|
|
4079
4189
|
{
|
|
4080
4190
|
"kind": "Reference",
|
|
4081
|
-
"text": "
|
|
4082
|
-
"canonicalReference": "@genesislcap/
|
|
4083
|
-
},
|
|
4084
|
-
{
|
|
4085
|
-
"kind": "Content",
|
|
4086
|
-
"text": "[]"
|
|
4087
|
-
},
|
|
4088
|
-
{
|
|
4089
|
-
"kind": "Content",
|
|
4090
|
-
"text": ", maxToolIterations?: "
|
|
4091
|
-
},
|
|
4092
|
-
{
|
|
4093
|
-
"kind": "Content",
|
|
4094
|
-
"text": "number"
|
|
4095
|
-
},
|
|
4096
|
-
{
|
|
4097
|
-
"kind": "Content",
|
|
4098
|
-
"text": ", maxFoldOperations?: "
|
|
4099
|
-
},
|
|
4100
|
-
{
|
|
4101
|
-
"kind": "Content",
|
|
4102
|
-
"text": "number"
|
|
4103
|
-
},
|
|
4104
|
-
{
|
|
4105
|
-
"kind": "Content",
|
|
4106
|
-
"text": ", maxTurnSnapshots?: "
|
|
4107
|
-
},
|
|
4108
|
-
{
|
|
4109
|
-
"kind": "Content",
|
|
4110
|
-
"text": "number"
|
|
4111
|
-
},
|
|
4112
|
-
{
|
|
4113
|
-
"kind": "Content",
|
|
4114
|
-
"text": ", \n sessionKey?: "
|
|
4115
|
-
},
|
|
4116
|
-
{
|
|
4117
|
-
"kind": "Content",
|
|
4118
|
-
"text": "string"
|
|
4191
|
+
"text": "ChatDriverConfig",
|
|
4192
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig:interface"
|
|
4119
4193
|
},
|
|
4120
4194
|
{
|
|
4121
4195
|
"kind": "Content",
|
|
@@ -4135,68 +4209,12 @@
|
|
|
4135
4209
|
"isOptional": false
|
|
4136
4210
|
},
|
|
4137
4211
|
{
|
|
4138
|
-
"parameterName": "
|
|
4212
|
+
"parameterName": "config",
|
|
4139
4213
|
"parameterTypeTokenRange": {
|
|
4140
4214
|
"startIndex": 3,
|
|
4141
4215
|
"endIndex": 4
|
|
4142
4216
|
},
|
|
4143
4217
|
"isOptional": true
|
|
4144
|
-
},
|
|
4145
|
-
{
|
|
4146
|
-
"parameterName": "toolDefinitions",
|
|
4147
|
-
"parameterTypeTokenRange": {
|
|
4148
|
-
"startIndex": 5,
|
|
4149
|
-
"endIndex": 6
|
|
4150
|
-
},
|
|
4151
|
-
"isOptional": true
|
|
4152
|
-
},
|
|
4153
|
-
{
|
|
4154
|
-
"parameterName": "systemPrompt",
|
|
4155
|
-
"parameterTypeTokenRange": {
|
|
4156
|
-
"startIndex": 7,
|
|
4157
|
-
"endIndex": 8
|
|
4158
|
-
},
|
|
4159
|
-
"isOptional": true
|
|
4160
|
-
},
|
|
4161
|
-
{
|
|
4162
|
-
"parameterName": "primerHistory",
|
|
4163
|
-
"parameterTypeTokenRange": {
|
|
4164
|
-
"startIndex": 9,
|
|
4165
|
-
"endIndex": 11
|
|
4166
|
-
},
|
|
4167
|
-
"isOptional": true
|
|
4168
|
-
},
|
|
4169
|
-
{
|
|
4170
|
-
"parameterName": "maxToolIterations",
|
|
4171
|
-
"parameterTypeTokenRange": {
|
|
4172
|
-
"startIndex": 12,
|
|
4173
|
-
"endIndex": 13
|
|
4174
|
-
},
|
|
4175
|
-
"isOptional": true
|
|
4176
|
-
},
|
|
4177
|
-
{
|
|
4178
|
-
"parameterName": "maxFoldOperations",
|
|
4179
|
-
"parameterTypeTokenRange": {
|
|
4180
|
-
"startIndex": 14,
|
|
4181
|
-
"endIndex": 15
|
|
4182
|
-
},
|
|
4183
|
-
"isOptional": true
|
|
4184
|
-
},
|
|
4185
|
-
{
|
|
4186
|
-
"parameterName": "maxTurnSnapshots",
|
|
4187
|
-
"parameterTypeTokenRange": {
|
|
4188
|
-
"startIndex": 16,
|
|
4189
|
-
"endIndex": 17
|
|
4190
|
-
},
|
|
4191
|
-
"isOptional": true
|
|
4192
|
-
},
|
|
4193
|
-
{
|
|
4194
|
-
"parameterName": "sessionKey",
|
|
4195
|
-
"parameterTypeTokenRange": {
|
|
4196
|
-
"startIndex": 18,
|
|
4197
|
-
"endIndex": 19
|
|
4198
|
-
},
|
|
4199
|
-
"isOptional": true
|
|
4200
4218
|
}
|
|
4201
4219
|
]
|
|
4202
4220
|
},
|
|
@@ -5269,153 +5287,423 @@
|
|
|
5269
5287
|
"isOptional": true
|
|
5270
5288
|
}
|
|
5271
5289
|
],
|
|
5272
|
-
"isOptional": false,
|
|
5273
|
-
"isAbstract": false,
|
|
5274
|
-
"name": "sendMessage"
|
|
5290
|
+
"isOptional": false,
|
|
5291
|
+
"isAbstract": false,
|
|
5292
|
+
"name": "sendMessage"
|
|
5293
|
+
},
|
|
5294
|
+
{
|
|
5295
|
+
"kind": "Method",
|
|
5296
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriver#setHostInteractionRequester:member(1)",
|
|
5297
|
+
"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",
|
|
5298
|
+
"excerptTokens": [
|
|
5299
|
+
{
|
|
5300
|
+
"kind": "Content",
|
|
5301
|
+
"text": "setHostInteractionRequester(fn: "
|
|
5302
|
+
},
|
|
5303
|
+
{
|
|
5304
|
+
"kind": "Content",
|
|
5305
|
+
"text": "<T>(componentName: string, data: any, options?: "
|
|
5306
|
+
},
|
|
5307
|
+
{
|
|
5308
|
+
"kind": "Reference",
|
|
5309
|
+
"text": "InteractionRequestOptions",
|
|
5310
|
+
"canonicalReference": "@genesislcap/foundation-ai!InteractionRequestOptions:interface"
|
|
5311
|
+
},
|
|
5312
|
+
{
|
|
5313
|
+
"kind": "Content",
|
|
5314
|
+
"text": ") => "
|
|
5315
|
+
},
|
|
5316
|
+
{
|
|
5317
|
+
"kind": "Reference",
|
|
5318
|
+
"text": "Promise",
|
|
5319
|
+
"canonicalReference": "!Promise:interface"
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
"kind": "Content",
|
|
5323
|
+
"text": "<T>"
|
|
5324
|
+
},
|
|
5325
|
+
{
|
|
5326
|
+
"kind": "Content",
|
|
5327
|
+
"text": "): "
|
|
5328
|
+
},
|
|
5329
|
+
{
|
|
5330
|
+
"kind": "Content",
|
|
5331
|
+
"text": "void"
|
|
5332
|
+
},
|
|
5333
|
+
{
|
|
5334
|
+
"kind": "Content",
|
|
5335
|
+
"text": ";"
|
|
5336
|
+
}
|
|
5337
|
+
],
|
|
5338
|
+
"isStatic": false,
|
|
5339
|
+
"returnTypeTokenRange": {
|
|
5340
|
+
"startIndex": 7,
|
|
5341
|
+
"endIndex": 8
|
|
5342
|
+
},
|
|
5343
|
+
"releaseTag": "Beta",
|
|
5344
|
+
"isProtected": false,
|
|
5345
|
+
"overloadIndex": 1,
|
|
5346
|
+
"parameters": [
|
|
5347
|
+
{
|
|
5348
|
+
"parameterName": "fn",
|
|
5349
|
+
"parameterTypeTokenRange": {
|
|
5350
|
+
"startIndex": 1,
|
|
5351
|
+
"endIndex": 6
|
|
5352
|
+
},
|
|
5353
|
+
"isOptional": false
|
|
5354
|
+
}
|
|
5355
|
+
],
|
|
5356
|
+
"isOptional": false,
|
|
5357
|
+
"isAbstract": false,
|
|
5358
|
+
"name": "setHostInteractionRequester"
|
|
5359
|
+
},
|
|
5360
|
+
{
|
|
5361
|
+
"kind": "Method",
|
|
5362
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriver#setProviderHistoryTransform:member(1)",
|
|
5363
|
+
"docComment": "/**\n * Optional transform applied to conversation history immediately before each LLM request. Cleared when `undefined`. Does not alter stored history.\n */\n",
|
|
5364
|
+
"excerptTokens": [
|
|
5365
|
+
{
|
|
5366
|
+
"kind": "Content",
|
|
5367
|
+
"text": "setProviderHistoryTransform(transform?: "
|
|
5368
|
+
},
|
|
5369
|
+
{
|
|
5370
|
+
"kind": "Content",
|
|
5371
|
+
"text": "(history: "
|
|
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": "Reference",
|
|
5384
|
+
"text": "ChatMessage",
|
|
5385
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
|
|
5386
|
+
},
|
|
5387
|
+
{
|
|
5388
|
+
"kind": "Content",
|
|
5389
|
+
"text": "[]"
|
|
5390
|
+
},
|
|
5391
|
+
{
|
|
5392
|
+
"kind": "Content",
|
|
5393
|
+
"text": "): "
|
|
5394
|
+
},
|
|
5395
|
+
{
|
|
5396
|
+
"kind": "Content",
|
|
5397
|
+
"text": "void"
|
|
5398
|
+
},
|
|
5399
|
+
{
|
|
5400
|
+
"kind": "Content",
|
|
5401
|
+
"text": ";"
|
|
5402
|
+
}
|
|
5403
|
+
],
|
|
5404
|
+
"isStatic": false,
|
|
5405
|
+
"returnTypeTokenRange": {
|
|
5406
|
+
"startIndex": 7,
|
|
5407
|
+
"endIndex": 8
|
|
5408
|
+
},
|
|
5409
|
+
"releaseTag": "Beta",
|
|
5410
|
+
"isProtected": false,
|
|
5411
|
+
"overloadIndex": 1,
|
|
5412
|
+
"parameters": [
|
|
5413
|
+
{
|
|
5414
|
+
"parameterName": "transform",
|
|
5415
|
+
"parameterTypeTokenRange": {
|
|
5416
|
+
"startIndex": 1,
|
|
5417
|
+
"endIndex": 6
|
|
5418
|
+
},
|
|
5419
|
+
"isOptional": true
|
|
5420
|
+
}
|
|
5421
|
+
],
|
|
5422
|
+
"isOptional": false,
|
|
5423
|
+
"isAbstract": false,
|
|
5424
|
+
"name": "setProviderHistoryTransform"
|
|
5425
|
+
}
|
|
5426
|
+
],
|
|
5427
|
+
"extendsTokenRange": {
|
|
5428
|
+
"startIndex": 1,
|
|
5429
|
+
"endIndex": 2
|
|
5430
|
+
},
|
|
5431
|
+
"implementsTokenRanges": [
|
|
5432
|
+
{
|
|
5433
|
+
"startIndex": 3,
|
|
5434
|
+
"endIndex": 4
|
|
5435
|
+
}
|
|
5436
|
+
]
|
|
5437
|
+
},
|
|
5438
|
+
{
|
|
5439
|
+
"kind": "Interface",
|
|
5440
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig:interface",
|
|
5441
|
+
"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",
|
|
5442
|
+
"excerptTokens": [
|
|
5443
|
+
{
|
|
5444
|
+
"kind": "Content",
|
|
5445
|
+
"text": "export interface ChatDriverConfig "
|
|
5446
|
+
}
|
|
5447
|
+
],
|
|
5448
|
+
"fileUrlPath": "src/components/chat-driver/chat-driver.ts",
|
|
5449
|
+
"releaseTag": "Beta",
|
|
5450
|
+
"name": "ChatDriverConfig",
|
|
5451
|
+
"preserveMemberOrder": false,
|
|
5452
|
+
"members": [
|
|
5453
|
+
{
|
|
5454
|
+
"kind": "PropertySignature",
|
|
5455
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#activityBus:member",
|
|
5456
|
+
"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",
|
|
5457
|
+
"excerptTokens": [
|
|
5458
|
+
{
|
|
5459
|
+
"kind": "Content",
|
|
5460
|
+
"text": "activityBus?: "
|
|
5461
|
+
},
|
|
5462
|
+
{
|
|
5463
|
+
"kind": "Reference",
|
|
5464
|
+
"text": "ActivityBus",
|
|
5465
|
+
"canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
|
|
5466
|
+
},
|
|
5467
|
+
{
|
|
5468
|
+
"kind": "Content",
|
|
5469
|
+
"text": ";"
|
|
5470
|
+
}
|
|
5471
|
+
],
|
|
5472
|
+
"isReadonly": false,
|
|
5473
|
+
"isOptional": true,
|
|
5474
|
+
"releaseTag": "Beta",
|
|
5475
|
+
"name": "activityBus",
|
|
5476
|
+
"propertyTypeTokenRange": {
|
|
5477
|
+
"startIndex": 1,
|
|
5478
|
+
"endIndex": 2
|
|
5479
|
+
}
|
|
5480
|
+
},
|
|
5481
|
+
{
|
|
5482
|
+
"kind": "PropertySignature",
|
|
5483
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#maxFoldOperations:member",
|
|
5484
|
+
"docComment": "/**\n * Hard cap on fold operations. Default `5`.\n */\n",
|
|
5485
|
+
"excerptTokens": [
|
|
5486
|
+
{
|
|
5487
|
+
"kind": "Content",
|
|
5488
|
+
"text": "maxFoldOperations?: "
|
|
5489
|
+
},
|
|
5490
|
+
{
|
|
5491
|
+
"kind": "Content",
|
|
5492
|
+
"text": "number"
|
|
5493
|
+
},
|
|
5494
|
+
{
|
|
5495
|
+
"kind": "Content",
|
|
5496
|
+
"text": ";"
|
|
5497
|
+
}
|
|
5498
|
+
],
|
|
5499
|
+
"isReadonly": false,
|
|
5500
|
+
"isOptional": true,
|
|
5501
|
+
"releaseTag": "Beta",
|
|
5502
|
+
"name": "maxFoldOperations",
|
|
5503
|
+
"propertyTypeTokenRange": {
|
|
5504
|
+
"startIndex": 1,
|
|
5505
|
+
"endIndex": 2
|
|
5506
|
+
}
|
|
5507
|
+
},
|
|
5508
|
+
{
|
|
5509
|
+
"kind": "PropertySignature",
|
|
5510
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#maxToolIterations:member",
|
|
5511
|
+
"docComment": "/**\n * Hard cap on tool-loop iterations. Default `50`.\n */\n",
|
|
5512
|
+
"excerptTokens": [
|
|
5513
|
+
{
|
|
5514
|
+
"kind": "Content",
|
|
5515
|
+
"text": "maxToolIterations?: "
|
|
5516
|
+
},
|
|
5517
|
+
{
|
|
5518
|
+
"kind": "Content",
|
|
5519
|
+
"text": "number"
|
|
5520
|
+
},
|
|
5521
|
+
{
|
|
5522
|
+
"kind": "Content",
|
|
5523
|
+
"text": ";"
|
|
5524
|
+
}
|
|
5525
|
+
],
|
|
5526
|
+
"isReadonly": false,
|
|
5527
|
+
"isOptional": true,
|
|
5528
|
+
"releaseTag": "Beta",
|
|
5529
|
+
"name": "maxToolIterations",
|
|
5530
|
+
"propertyTypeTokenRange": {
|
|
5531
|
+
"startIndex": 1,
|
|
5532
|
+
"endIndex": 2
|
|
5533
|
+
}
|
|
5275
5534
|
},
|
|
5276
5535
|
{
|
|
5277
|
-
"kind": "
|
|
5278
|
-
"canonicalReference": "@genesislcap/ai-assistant!
|
|
5279
|
-
"docComment": "/**\n *
|
|
5536
|
+
"kind": "PropertySignature",
|
|
5537
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#maxTurnSnapshots:member",
|
|
5538
|
+
"docComment": "/**\n * Ring-buffer size for per-turn snapshots. Default `400`.\n */\n",
|
|
5280
5539
|
"excerptTokens": [
|
|
5281
5540
|
{
|
|
5282
5541
|
"kind": "Content",
|
|
5283
|
-
"text": "
|
|
5542
|
+
"text": "maxTurnSnapshots?: "
|
|
5284
5543
|
},
|
|
5285
5544
|
{
|
|
5286
5545
|
"kind": "Content",
|
|
5287
|
-
"text": "
|
|
5546
|
+
"text": "number"
|
|
5288
5547
|
},
|
|
5289
5548
|
{
|
|
5290
|
-
"kind": "
|
|
5291
|
-
"text": "
|
|
5292
|
-
|
|
5293
|
-
|
|
5549
|
+
"kind": "Content",
|
|
5550
|
+
"text": ";"
|
|
5551
|
+
}
|
|
5552
|
+
],
|
|
5553
|
+
"isReadonly": false,
|
|
5554
|
+
"isOptional": true,
|
|
5555
|
+
"releaseTag": "Beta",
|
|
5556
|
+
"name": "maxTurnSnapshots",
|
|
5557
|
+
"propertyTypeTokenRange": {
|
|
5558
|
+
"startIndex": 1,
|
|
5559
|
+
"endIndex": 2
|
|
5560
|
+
}
|
|
5561
|
+
},
|
|
5562
|
+
{
|
|
5563
|
+
"kind": "PropertySignature",
|
|
5564
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#primerHistory:member",
|
|
5565
|
+
"docComment": "/**\n * Primer history prepended to the conversation.\n */\n",
|
|
5566
|
+
"excerptTokens": [
|
|
5294
5567
|
{
|
|
5295
5568
|
"kind": "Content",
|
|
5296
|
-
"text": "
|
|
5569
|
+
"text": "primerHistory?: "
|
|
5297
5570
|
},
|
|
5298
5571
|
{
|
|
5299
5572
|
"kind": "Reference",
|
|
5300
|
-
"text": "
|
|
5301
|
-
"canonicalReference": "!
|
|
5573
|
+
"text": "ChatMessage",
|
|
5574
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
|
|
5302
5575
|
},
|
|
5303
5576
|
{
|
|
5304
5577
|
"kind": "Content",
|
|
5305
|
-
"text": "
|
|
5578
|
+
"text": "[]"
|
|
5306
5579
|
},
|
|
5307
5580
|
{
|
|
5308
5581
|
"kind": "Content",
|
|
5309
|
-
"text": "
|
|
5582
|
+
"text": ";"
|
|
5583
|
+
}
|
|
5584
|
+
],
|
|
5585
|
+
"isReadonly": false,
|
|
5586
|
+
"isOptional": true,
|
|
5587
|
+
"releaseTag": "Beta",
|
|
5588
|
+
"name": "primerHistory",
|
|
5589
|
+
"propertyTypeTokenRange": {
|
|
5590
|
+
"startIndex": 1,
|
|
5591
|
+
"endIndex": 3
|
|
5592
|
+
}
|
|
5593
|
+
},
|
|
5594
|
+
{
|
|
5595
|
+
"kind": "PropertySignature",
|
|
5596
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#sessionKey:member",
|
|
5597
|
+
"docComment": "/**\n * Session identity used to file meta events onto the shared debug-log timeline.\n */\n",
|
|
5598
|
+
"excerptTokens": [
|
|
5599
|
+
{
|
|
5600
|
+
"kind": "Content",
|
|
5601
|
+
"text": "sessionKey?: "
|
|
5310
5602
|
},
|
|
5311
5603
|
{
|
|
5312
5604
|
"kind": "Content",
|
|
5313
|
-
"text": "
|
|
5605
|
+
"text": "string"
|
|
5314
5606
|
},
|
|
5315
5607
|
{
|
|
5316
5608
|
"kind": "Content",
|
|
5317
5609
|
"text": ";"
|
|
5318
5610
|
}
|
|
5319
5611
|
],
|
|
5320
|
-
"
|
|
5321
|
-
"
|
|
5322
|
-
"startIndex": 7,
|
|
5323
|
-
"endIndex": 8
|
|
5324
|
-
},
|
|
5612
|
+
"isReadonly": false,
|
|
5613
|
+
"isOptional": true,
|
|
5325
5614
|
"releaseTag": "Beta",
|
|
5326
|
-
"
|
|
5327
|
-
"
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
"parameterTypeTokenRange": {
|
|
5332
|
-
"startIndex": 1,
|
|
5333
|
-
"endIndex": 6
|
|
5334
|
-
},
|
|
5335
|
-
"isOptional": false
|
|
5336
|
-
}
|
|
5337
|
-
],
|
|
5338
|
-
"isOptional": false,
|
|
5339
|
-
"isAbstract": false,
|
|
5340
|
-
"name": "setHostInteractionRequester"
|
|
5615
|
+
"name": "sessionKey",
|
|
5616
|
+
"propertyTypeTokenRange": {
|
|
5617
|
+
"startIndex": 1,
|
|
5618
|
+
"endIndex": 2
|
|
5619
|
+
}
|
|
5341
5620
|
},
|
|
5342
5621
|
{
|
|
5343
|
-
"kind": "
|
|
5344
|
-
"canonicalReference": "@genesislcap/ai-assistant!
|
|
5345
|
-
"docComment": "/**\n *
|
|
5622
|
+
"kind": "PropertySignature",
|
|
5623
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#systemPrompt:member",
|
|
5624
|
+
"docComment": "/**\n * Initial system prompt (string or per-turn resolver).\n */\n",
|
|
5346
5625
|
"excerptTokens": [
|
|
5347
5626
|
{
|
|
5348
5627
|
"kind": "Content",
|
|
5349
|
-
"text": "
|
|
5350
|
-
},
|
|
5351
|
-
{
|
|
5352
|
-
"kind": "Content",
|
|
5353
|
-
"text": "(history: "
|
|
5628
|
+
"text": "systemPrompt?: "
|
|
5354
5629
|
},
|
|
5355
5630
|
{
|
|
5356
5631
|
"kind": "Reference",
|
|
5357
|
-
"text": "
|
|
5358
|
-
"canonicalReference": "@genesislcap/
|
|
5632
|
+
"text": "SystemPromptInput",
|
|
5633
|
+
"canonicalReference": "@genesislcap/ai-assistant!SystemPromptInput:type"
|
|
5359
5634
|
},
|
|
5360
5635
|
{
|
|
5361
5636
|
"kind": "Content",
|
|
5362
|
-
"text": "
|
|
5637
|
+
"text": ";"
|
|
5638
|
+
}
|
|
5639
|
+
],
|
|
5640
|
+
"isReadonly": false,
|
|
5641
|
+
"isOptional": true,
|
|
5642
|
+
"releaseTag": "Beta",
|
|
5643
|
+
"name": "systemPrompt",
|
|
5644
|
+
"propertyTypeTokenRange": {
|
|
5645
|
+
"startIndex": 1,
|
|
5646
|
+
"endIndex": 2
|
|
5647
|
+
}
|
|
5648
|
+
},
|
|
5649
|
+
{
|
|
5650
|
+
"kind": "PropertySignature",
|
|
5651
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#toolDefinitions:member",
|
|
5652
|
+
"docComment": "/**\n * Initial tool definitions (static array or per-turn factory). Default `[]`.\n */\n",
|
|
5653
|
+
"excerptTokens": [
|
|
5654
|
+
{
|
|
5655
|
+
"kind": "Content",
|
|
5656
|
+
"text": "toolDefinitions?: "
|
|
5363
5657
|
},
|
|
5364
5658
|
{
|
|
5365
5659
|
"kind": "Reference",
|
|
5366
|
-
"text": "
|
|
5367
|
-
"canonicalReference": "@genesislcap/
|
|
5660
|
+
"text": "ToolDefinitionsInput",
|
|
5661
|
+
"canonicalReference": "@genesislcap/ai-assistant!ToolDefinitionsInput:type"
|
|
5368
5662
|
},
|
|
5369
5663
|
{
|
|
5370
5664
|
"kind": "Content",
|
|
5371
|
-
"text": "
|
|
5372
|
-
}
|
|
5665
|
+
"text": ";"
|
|
5666
|
+
}
|
|
5667
|
+
],
|
|
5668
|
+
"isReadonly": false,
|
|
5669
|
+
"isOptional": true,
|
|
5670
|
+
"releaseTag": "Beta",
|
|
5671
|
+
"name": "toolDefinitions",
|
|
5672
|
+
"propertyTypeTokenRange": {
|
|
5673
|
+
"startIndex": 1,
|
|
5674
|
+
"endIndex": 2
|
|
5675
|
+
}
|
|
5676
|
+
},
|
|
5677
|
+
{
|
|
5678
|
+
"kind": "PropertySignature",
|
|
5679
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#toolHandlers:member",
|
|
5680
|
+
"docComment": "/**\n * Initial tool handlers (static map or per-turn factory). Default `{}`.\n */\n",
|
|
5681
|
+
"excerptTokens": [
|
|
5373
5682
|
{
|
|
5374
5683
|
"kind": "Content",
|
|
5375
|
-
"text": "
|
|
5684
|
+
"text": "toolHandlers?: "
|
|
5376
5685
|
},
|
|
5377
5686
|
{
|
|
5378
|
-
"kind": "
|
|
5379
|
-
"text": "
|
|
5687
|
+
"kind": "Reference",
|
|
5688
|
+
"text": "ToolHandlersInput",
|
|
5689
|
+
"canonicalReference": "@genesislcap/ai-assistant!ToolHandlersInput:type"
|
|
5380
5690
|
},
|
|
5381
5691
|
{
|
|
5382
5692
|
"kind": "Content",
|
|
5383
5693
|
"text": ";"
|
|
5384
5694
|
}
|
|
5385
5695
|
],
|
|
5386
|
-
"
|
|
5387
|
-
"
|
|
5388
|
-
"startIndex": 7,
|
|
5389
|
-
"endIndex": 8
|
|
5390
|
-
},
|
|
5696
|
+
"isReadonly": false,
|
|
5697
|
+
"isOptional": true,
|
|
5391
5698
|
"releaseTag": "Beta",
|
|
5392
|
-
"
|
|
5393
|
-
"
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
"parameterTypeTokenRange": {
|
|
5398
|
-
"startIndex": 1,
|
|
5399
|
-
"endIndex": 6
|
|
5400
|
-
},
|
|
5401
|
-
"isOptional": true
|
|
5402
|
-
}
|
|
5403
|
-
],
|
|
5404
|
-
"isOptional": false,
|
|
5405
|
-
"isAbstract": false,
|
|
5406
|
-
"name": "setProviderHistoryTransform"
|
|
5699
|
+
"name": "toolHandlers",
|
|
5700
|
+
"propertyTypeTokenRange": {
|
|
5701
|
+
"startIndex": 1,
|
|
5702
|
+
"endIndex": 2
|
|
5703
|
+
}
|
|
5407
5704
|
}
|
|
5408
5705
|
],
|
|
5409
|
-
"
|
|
5410
|
-
"startIndex": 1,
|
|
5411
|
-
"endIndex": 2
|
|
5412
|
-
},
|
|
5413
|
-
"implementsTokenRanges": [
|
|
5414
|
-
{
|
|
5415
|
-
"startIndex": 3,
|
|
5416
|
-
"endIndex": 4
|
|
5417
|
-
}
|
|
5418
|
-
]
|
|
5706
|
+
"extendsTokenRanges": []
|
|
5419
5707
|
},
|
|
5420
5708
|
{
|
|
5421
5709
|
"kind": "Interface",
|
|
@@ -12549,6 +12837,30 @@
|
|
|
12549
12837
|
],
|
|
12550
12838
|
"extendsTokenRanges": []
|
|
12551
12839
|
},
|
|
12840
|
+
{
|
|
12841
|
+
"kind": "Variable",
|
|
12842
|
+
"canonicalReference": "@genesislcap/ai-assistant!NOOP_ACTIVITY_BUS:var",
|
|
12843
|
+
"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",
|
|
12844
|
+
"excerptTokens": [
|
|
12845
|
+
{
|
|
12846
|
+
"kind": "Content",
|
|
12847
|
+
"text": "NOOP_ACTIVITY_BUS: "
|
|
12848
|
+
},
|
|
12849
|
+
{
|
|
12850
|
+
"kind": "Reference",
|
|
12851
|
+
"text": "ActivityBus",
|
|
12852
|
+
"canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
|
|
12853
|
+
}
|
|
12854
|
+
],
|
|
12855
|
+
"fileUrlPath": "src/channel/ai-activity-bus.ts",
|
|
12856
|
+
"isReadonly": true,
|
|
12857
|
+
"releaseTag": "Beta",
|
|
12858
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
12859
|
+
"variableTypeTokenRange": {
|
|
12860
|
+
"startIndex": 1,
|
|
12861
|
+
"endIndex": 2
|
|
12862
|
+
}
|
|
12863
|
+
},
|
|
12552
12864
|
{
|
|
12553
12865
|
"kind": "Class",
|
|
12554
12866
|
"canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver:class",
|
|
@@ -12616,7 +12928,16 @@
|
|
|
12616
12928
|
},
|
|
12617
12929
|
{
|
|
12618
12930
|
"kind": "Content",
|
|
12619
|
-
"text": "{\n sessionKey?: string;\n maxHandoffs?: number;\n classifierHistoryLength?: number;\n classifierRetries?: number;\n maxToolIterations?: number;\n maxFoldOperations?: number;\n maxTurnSnapshots?: number;\n
|
|
12931
|
+
"text": "{\n sessionKey?: string;\n maxHandoffs?: number;\n classifierHistoryLength?: number;\n classifierRetries?: number;\n maxToolIterations?: number;\n maxFoldOperations?: number;\n maxTurnSnapshots?: number;\n activityBus?: "
|
|
12932
|
+
},
|
|
12933
|
+
{
|
|
12934
|
+
"kind": "Reference",
|
|
12935
|
+
"text": "ActivityBus",
|
|
12936
|
+
"canonicalReference": "@genesislcap/ai-assistant!ActivityBus:interface"
|
|
12937
|
+
},
|
|
12938
|
+
{
|
|
12939
|
+
"kind": "Content",
|
|
12940
|
+
"text": ";\n }"
|
|
12620
12941
|
},
|
|
12621
12942
|
{
|
|
12622
12943
|
"kind": "Content",
|
|
@@ -12647,7 +12968,7 @@
|
|
|
12647
12968
|
"parameterName": "options",
|
|
12648
12969
|
"parameterTypeTokenRange": {
|
|
12649
12970
|
"startIndex": 6,
|
|
12650
|
-
"endIndex":
|
|
12971
|
+
"endIndex": 9
|
|
12651
12972
|
},
|
|
12652
12973
|
"isOptional": true
|
|
12653
12974
|
}
|
|
@@ -14159,6 +14480,50 @@
|
|
|
14159
14480
|
"endIndex": 0
|
|
14160
14481
|
}
|
|
14161
14482
|
},
|
|
14483
|
+
{
|
|
14484
|
+
"kind": "TypeAlias",
|
|
14485
|
+
"canonicalReference": "@genesislcap/ai-assistant!ResponseSchemaInput:type",
|
|
14486
|
+
"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",
|
|
14487
|
+
"excerptTokens": [
|
|
14488
|
+
{
|
|
14489
|
+
"kind": "Content",
|
|
14490
|
+
"text": "export type ResponseSchemaInput = "
|
|
14491
|
+
},
|
|
14492
|
+
{
|
|
14493
|
+
"kind": "Content",
|
|
14494
|
+
"text": "object | ((ctx: "
|
|
14495
|
+
},
|
|
14496
|
+
{
|
|
14497
|
+
"kind": "Reference",
|
|
14498
|
+
"text": "SystemPromptContext",
|
|
14499
|
+
"canonicalReference": "@genesislcap/ai-assistant!SystemPromptContext:interface"
|
|
14500
|
+
},
|
|
14501
|
+
{
|
|
14502
|
+
"kind": "Content",
|
|
14503
|
+
"text": ") => object | undefined | "
|
|
14504
|
+
},
|
|
14505
|
+
{
|
|
14506
|
+
"kind": "Reference",
|
|
14507
|
+
"text": "Promise",
|
|
14508
|
+
"canonicalReference": "!Promise:interface"
|
|
14509
|
+
},
|
|
14510
|
+
{
|
|
14511
|
+
"kind": "Content",
|
|
14512
|
+
"text": "<object | undefined>)"
|
|
14513
|
+
},
|
|
14514
|
+
{
|
|
14515
|
+
"kind": "Content",
|
|
14516
|
+
"text": ";"
|
|
14517
|
+
}
|
|
14518
|
+
],
|
|
14519
|
+
"fileUrlPath": "src/config/config.ts",
|
|
14520
|
+
"releaseTag": "Beta",
|
|
14521
|
+
"name": "ResponseSchemaInput",
|
|
14522
|
+
"typeTokenRange": {
|
|
14523
|
+
"startIndex": 1,
|
|
14524
|
+
"endIndex": 6
|
|
14525
|
+
}
|
|
14526
|
+
},
|
|
14162
14527
|
{
|
|
14163
14528
|
"kind": "Function",
|
|
14164
14529
|
"canonicalReference": "@genesislcap/ai-assistant!restoreMachine:function(1)",
|