@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
|
@@ -2,6 +2,205 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/chat-driver-node.ts",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "js",
|
|
12
|
+
"name": "*",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "*",
|
|
15
|
+
"package": "./components/chat-driver"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "js",
|
|
20
|
+
"name": "*",
|
|
21
|
+
"declaration": {
|
|
22
|
+
"name": "*",
|
|
23
|
+
"package": "./components/orchestrating-driver"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "js",
|
|
28
|
+
"name": "*",
|
|
29
|
+
"declaration": {
|
|
30
|
+
"name": "*",
|
|
31
|
+
"package": "./channel/ai-activity-channel"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "js",
|
|
36
|
+
"name": "*",
|
|
37
|
+
"declaration": {
|
|
38
|
+
"name": "*",
|
|
39
|
+
"package": "./channel/ai-activity-bus"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "js",
|
|
44
|
+
"name": "*",
|
|
45
|
+
"declaration": {
|
|
46
|
+
"name": "*",
|
|
47
|
+
"package": "./config/config"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "js",
|
|
52
|
+
"name": "*",
|
|
53
|
+
"declaration": {
|
|
54
|
+
"name": "*",
|
|
55
|
+
"package": "./config/define-stateful-agent"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "js",
|
|
60
|
+
"name": "*",
|
|
61
|
+
"declaration": {
|
|
62
|
+
"name": "*",
|
|
63
|
+
"package": "./config/fallback-agents"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"kind": "js",
|
|
68
|
+
"name": "AnthropicProvider",
|
|
69
|
+
"declaration": {
|
|
70
|
+
"name": "AnthropicProvider",
|
|
71
|
+
"package": "@genesislcap/foundation-ai"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"kind": "js",
|
|
76
|
+
"name": "AnthropicTransport",
|
|
77
|
+
"declaration": {
|
|
78
|
+
"name": "AnthropicTransport",
|
|
79
|
+
"package": "@genesislcap/foundation-ai"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "js",
|
|
84
|
+
"name": "GeminiProvider",
|
|
85
|
+
"declaration": {
|
|
86
|
+
"name": "GeminiProvider",
|
|
87
|
+
"package": "@genesislcap/foundation-ai"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"kind": "js",
|
|
92
|
+
"name": "GeminiTransport",
|
|
93
|
+
"declaration": {
|
|
94
|
+
"name": "GeminiTransport",
|
|
95
|
+
"package": "@genesislcap/foundation-ai"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "js",
|
|
100
|
+
"name": "MutableAIProviderRegistry",
|
|
101
|
+
"declaration": {
|
|
102
|
+
"name": "MutableAIProviderRegistry",
|
|
103
|
+
"package": "@genesislcap/foundation-ai"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"kind": "js",
|
|
108
|
+
"name": "isObservableAIProviderRegistry",
|
|
109
|
+
"declaration": {
|
|
110
|
+
"name": "isObservableAIProviderRegistry",
|
|
111
|
+
"package": "@genesislcap/foundation-ai"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "js",
|
|
116
|
+
"name": "AIProvider",
|
|
117
|
+
"declaration": {
|
|
118
|
+
"name": "AIProvider",
|
|
119
|
+
"package": "@genesislcap/foundation-ai"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"kind": "js",
|
|
124
|
+
"name": "AIProviderRegistry",
|
|
125
|
+
"declaration": {
|
|
126
|
+
"name": "AIProviderRegistry",
|
|
127
|
+
"package": "@genesislcap/foundation-ai"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "js",
|
|
132
|
+
"name": "AnthropicModelId",
|
|
133
|
+
"declaration": {
|
|
134
|
+
"name": "AnthropicModelId",
|
|
135
|
+
"package": "@genesislcap/foundation-ai"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"kind": "js",
|
|
140
|
+
"name": "CachePolicy",
|
|
141
|
+
"declaration": {
|
|
142
|
+
"name": "CachePolicy",
|
|
143
|
+
"package": "@genesislcap/foundation-ai"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"kind": "js",
|
|
148
|
+
"name": "ChatFallback",
|
|
149
|
+
"declaration": {
|
|
150
|
+
"name": "ChatFallback",
|
|
151
|
+
"package": "@genesislcap/foundation-ai"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"kind": "js",
|
|
156
|
+
"name": "ChatMessage",
|
|
157
|
+
"declaration": {
|
|
158
|
+
"name": "ChatMessage",
|
|
159
|
+
"package": "@genesislcap/foundation-ai"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"kind": "js",
|
|
164
|
+
"name": "ChatRequestOptions",
|
|
165
|
+
"declaration": {
|
|
166
|
+
"name": "ChatRequestOptions",
|
|
167
|
+
"package": "@genesislcap/foundation-ai"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"kind": "js",
|
|
172
|
+
"name": "ChatToolChoice",
|
|
173
|
+
"declaration": {
|
|
174
|
+
"name": "ChatToolChoice",
|
|
175
|
+
"package": "@genesislcap/foundation-ai"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "js",
|
|
180
|
+
"name": "ChatToolDefinition",
|
|
181
|
+
"declaration": {
|
|
182
|
+
"name": "ChatToolDefinition",
|
|
183
|
+
"package": "@genesislcap/foundation-ai"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"kind": "js",
|
|
188
|
+
"name": "ChatToolHandlers",
|
|
189
|
+
"declaration": {
|
|
190
|
+
"name": "ChatToolHandlers",
|
|
191
|
+
"package": "@genesislcap/foundation-ai"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"kind": "js",
|
|
196
|
+
"name": "GeminiModelId",
|
|
197
|
+
"declaration": {
|
|
198
|
+
"name": "GeminiModelId",
|
|
199
|
+
"package": "@genesislcap/foundation-ai"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
5
204
|
{
|
|
6
205
|
"kind": "javascript-module",
|
|
7
206
|
"path": "src/index.ts",
|
|
@@ -229,6 +428,15 @@
|
|
|
229
428
|
"kind": "javascript-module",
|
|
230
429
|
"path": "src/channel/ai-activity-bus.ts",
|
|
231
430
|
"declarations": [
|
|
431
|
+
{
|
|
432
|
+
"kind": "variable",
|
|
433
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
434
|
+
"type": {
|
|
435
|
+
"text": "ActivityBus"
|
|
436
|
+
},
|
|
437
|
+
"default": "{ publish: () => {} }",
|
|
438
|
+
"description": "No-op ActivityBus. The default when no bus is injected (Node, tests, headless\nserver use) — publishing goes nowhere and nothing is left open to tear down."
|
|
439
|
+
},
|
|
232
440
|
{
|
|
233
441
|
"kind": "class",
|
|
234
442
|
"description": "Typed in-process event bus for AI assistant activity events.\n\nDispatches events synchronously to all local subscribers in the same JS module instance\n(i.e. the same browser tab). Events listed in `crossTabEvents` are additionally forwarded\nvia a shared `BroadcastChannel` so that other tabs on the same origin receive them.",
|
|
@@ -251,6 +459,15 @@
|
|
|
251
459
|
"readonly": true,
|
|
252
460
|
"default": "new Set(config?.crossTabEvents ?? [])"
|
|
253
461
|
},
|
|
462
|
+
{
|
|
463
|
+
"kind": "field",
|
|
464
|
+
"name": "channelNameFactory",
|
|
465
|
+
"type": {
|
|
466
|
+
"text": "() => string | undefined"
|
|
467
|
+
},
|
|
468
|
+
"privacy": "private",
|
|
469
|
+
"readonly": true
|
|
470
|
+
},
|
|
254
471
|
{
|
|
255
472
|
"kind": "field",
|
|
256
473
|
"name": "channel",
|
|
@@ -259,6 +476,26 @@
|
|
|
259
476
|
},
|
|
260
477
|
"privacy": "private"
|
|
261
478
|
},
|
|
479
|
+
{
|
|
480
|
+
"kind": "field",
|
|
481
|
+
"name": "channelInitialised",
|
|
482
|
+
"type": {
|
|
483
|
+
"text": "boolean"
|
|
484
|
+
},
|
|
485
|
+
"privacy": "private",
|
|
486
|
+
"default": "false"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"kind": "method",
|
|
490
|
+
"name": "ensureChannel",
|
|
491
|
+
"privacy": "private",
|
|
492
|
+
"return": {
|
|
493
|
+
"type": {
|
|
494
|
+
"text": "void"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"description": "Lazily open the cross-tab `BroadcastChannel` on first use. Deferred (rather than\ncreated in the constructor) so that importing this module, or constructing the bus\noff-browser (Node, tests, headless server), never opens a live channel or reads\n`sessionStorage` — both would keep a Node event loop alive and hang the process.\nCross-tab forwarding is inherently browser-only, so channel creation is gated on a\nbrowser environment; elsewhere the bus stays purely in-process."
|
|
498
|
+
},
|
|
262
499
|
{
|
|
263
500
|
"kind": "method",
|
|
264
501
|
"name": "subscribe",
|
|
@@ -364,11 +601,19 @@
|
|
|
364
601
|
{
|
|
365
602
|
"kind": "variable",
|
|
366
603
|
"name": "agenticActivityBus",
|
|
367
|
-
"default": "new AgenticActivityBus({\n crossTabEvents: ['halo-start', 'halo-stop', 'tool-loop-start', 'tool-loop-end'],\n
|
|
604
|
+
"default": "new AgenticActivityBus({\n crossTabEvents: ['halo-start', 'halo-stop', 'tool-loop-start', 'tool-loop-end'],\n // Lazy: the tab-scoped name (and its `sessionStorage` read) is computed on first\n // cross-tab use in a browser, not at module-eval — so importing this module is\n // side-effect-free and Node/test-safe.\n channelNameFactory: () => getTabScopedChannelName('foundation-ai-activity'),\n})",
|
|
368
605
|
"description": "Pre-instantiated singleton event bus for AI assistant activity.\n\n- `halo-start` / `halo-stop` are forwarded via a tab-scoped `BroadcastChannel` so that\n popout windows opened from this tab show halo animations, while remaining isolated from\n unrelated tabs on the same origin (tab-scoped channel name).\n- `tool-loop-start` / `tool-loop-end` are cross-tab for the same reason: they describe the\n assistant's lifecycle (a turn beginning / ending), and the most common subscribers\n (workspace transitions, post-turn deferred recomputation, UI gates tied to the assistant\n being idle) need the event regardless of whether the user is interacting with the chat\n in the main tab or a popout window. Tab-local-only telemetry can subscribe and filter.\n- `chat-popout` / `chat-popin` are in-memory only — they must only affect the tab where the\n user clicked."
|
|
369
606
|
}
|
|
370
607
|
],
|
|
371
608
|
"exports": [
|
|
609
|
+
{
|
|
610
|
+
"kind": "js",
|
|
611
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
612
|
+
"declaration": {
|
|
613
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
614
|
+
"module": "src/channel/ai-activity-bus.ts"
|
|
615
|
+
}
|
|
616
|
+
},
|
|
372
617
|
{
|
|
373
618
|
"kind": "js",
|
|
374
619
|
"name": "AgenticActivityBus",
|
|
@@ -892,6 +1137,14 @@
|
|
|
892
1137
|
"module": "src/config/config.ts"
|
|
893
1138
|
}
|
|
894
1139
|
},
|
|
1140
|
+
{
|
|
1141
|
+
"kind": "js",
|
|
1142
|
+
"name": "ChatFallback",
|
|
1143
|
+
"declaration": {
|
|
1144
|
+
"name": "ChatFallback",
|
|
1145
|
+
"module": "src/config/config.ts"
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
895
1148
|
{
|
|
896
1149
|
"kind": "js",
|
|
897
1150
|
"name": "ChatInputDuringExecutionMode",
|
|
@@ -6787,6 +7040,24 @@
|
|
|
6787
7040
|
"privacy": "private",
|
|
6788
7041
|
"description": "Active agent's tail-context selector (static value or per-turn resolver). The driver frames\nthe resolved string in a `<system-reminder>` marker and injects it at the message tail."
|
|
6789
7042
|
},
|
|
7043
|
+
{
|
|
7044
|
+
"kind": "field",
|
|
7045
|
+
"name": "activeResponseSchemaInput",
|
|
7046
|
+
"type": {
|
|
7047
|
+
"text": "ResponseSchemaInput | undefined"
|
|
7048
|
+
},
|
|
7049
|
+
"privacy": "private",
|
|
7050
|
+
"description": "Active agent's structured-output schema selector (static value or per-turn resolver).\nWhen it resolves to a schema, the model's final answer is constrained to it this turn."
|
|
7051
|
+
},
|
|
7052
|
+
{
|
|
7053
|
+
"kind": "field",
|
|
7054
|
+
"name": "activeFallbacks",
|
|
7055
|
+
"type": {
|
|
7056
|
+
"text": "ChatFallback[] | undefined"
|
|
7057
|
+
},
|
|
7058
|
+
"privacy": "private",
|
|
7059
|
+
"description": "Active agent's refusal-fallback chain (static). Passed through to the provider so a refused\nturn (e.g. Fable 5) is re-run on the next model server-side."
|
|
7060
|
+
},
|
|
6790
7061
|
{
|
|
6791
7062
|
"kind": "field",
|
|
6792
7063
|
"name": "activeOnUnresolvedTool",
|
|
@@ -6855,6 +7126,39 @@
|
|
|
6855
7126
|
"privacy": "private",
|
|
6856
7127
|
"description": "Unsubscribe handle for the provider-registry change listener (only set when\nthe injected registry is observable). Called in `dispose` so the long-lived\nregistry doesn't retain this driver — see the constructor and the sub-agent\nteardown in `runSubAgent`."
|
|
6857
7128
|
},
|
|
7129
|
+
{
|
|
7130
|
+
"kind": "field",
|
|
7131
|
+
"name": "maxToolIterations",
|
|
7132
|
+
"type": {
|
|
7133
|
+
"text": "number"
|
|
7134
|
+
},
|
|
7135
|
+
"privacy": "private",
|
|
7136
|
+
"readonly": true,
|
|
7137
|
+
"description": "Hard cap on tool-loop iterations.",
|
|
7138
|
+
"default": "maxToolIterations"
|
|
7139
|
+
},
|
|
7140
|
+
{
|
|
7141
|
+
"kind": "field",
|
|
7142
|
+
"name": "sessionKey",
|
|
7143
|
+
"type": {
|
|
7144
|
+
"text": "string"
|
|
7145
|
+
},
|
|
7146
|
+
"privacy": "private",
|
|
7147
|
+
"readonly": true,
|
|
7148
|
+
"description": "Session identity used to file meta events onto the shared debug-log timeline.",
|
|
7149
|
+
"default": "sessionKey"
|
|
7150
|
+
},
|
|
7151
|
+
{
|
|
7152
|
+
"kind": "field",
|
|
7153
|
+
"name": "activityBus",
|
|
7154
|
+
"type": {
|
|
7155
|
+
"text": "ActivityBus"
|
|
7156
|
+
},
|
|
7157
|
+
"privacy": "private",
|
|
7158
|
+
"readonly": true,
|
|
7159
|
+
"description": "Injected activity bus; defaults to a no-op off-browser (Node/tests/headless).",
|
|
7160
|
+
"default": "activityBus"
|
|
7161
|
+
},
|
|
6858
7162
|
{
|
|
6859
7163
|
"kind": "method",
|
|
6860
7164
|
"name": "dispose",
|
|
@@ -8174,7 +8478,7 @@
|
|
|
8174
8478
|
},
|
|
8175
8479
|
"privacy": "private",
|
|
8176
8480
|
"readonly": true,
|
|
8177
|
-
"default": "new ChatDriver(
|
|
8481
|
+
"default": "new ChatDriver(providerRegistry, {\n maxToolIterations: options.maxToolIterations,\n maxFoldOperations: options.maxFoldOperations,\n maxTurnSnapshots: options.maxTurnSnapshots,\n sessionKey: this.sessionKey,\n activityBus: options.activityBus,\n })"
|
|
8178
8482
|
},
|
|
8179
8483
|
{
|
|
8180
8484
|
"kind": "field",
|
|
@@ -9,7 +9,32 @@ export interface AgenticActivityBusConfig {
|
|
|
9
9
|
crossTabEvents?: (keyof AgenticActivityEvents)[];
|
|
10
10
|
/** BroadcastChannel name. Only used when crossTabEvents is non-empty. */
|
|
11
11
|
channelName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Lazy alternative to {@link AgenticActivityBusConfig.channelName}: called the first
|
|
14
|
+
* time a cross-tab channel is actually needed, in a browser only. Deferring the name
|
|
15
|
+
* computation keeps side effects (e.g. `sessionStorage` reads) out of module-eval and
|
|
16
|
+
* off the non-browser path. Ignored if `channelName` is also set.
|
|
17
|
+
*/
|
|
18
|
+
channelNameFactory?: () => string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Minimal activity-bus surface the drivers depend on. `ChatDriver`/`OrchestratingDriver`
|
|
22
|
+
* only ever *publish* — accepting this narrow interface (rather than importing the module
|
|
23
|
+
* singleton) lets a headless/server or unit-test host omit the bus entirely, so no live
|
|
24
|
+
* `BroadcastChannel` is ever opened on that path. See {@link NOOP_ACTIVITY_BUS}.
|
|
25
|
+
*
|
|
26
|
+
* @beta
|
|
27
|
+
*/
|
|
28
|
+
export interface ActivityBus {
|
|
29
|
+
publish<K extends keyof AgenticActivityEvents>(type: K, detail: AgenticActivityEvents[K]): void;
|
|
12
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* No-op {@link ActivityBus}. The default when no bus is injected (Node, tests, headless
|
|
33
|
+
* server use) — publishing goes nowhere and nothing is left open to tear down.
|
|
34
|
+
*
|
|
35
|
+
* @beta
|
|
36
|
+
*/
|
|
37
|
+
export declare const NOOP_ACTIVITY_BUS: ActivityBus;
|
|
13
38
|
/**
|
|
14
39
|
* Typed in-process event bus for AI assistant activity events.
|
|
15
40
|
*
|
|
@@ -27,12 +52,23 @@ export interface AgenticActivityBusConfig {
|
|
|
27
52
|
export declare class AgenticActivityBus {
|
|
28
53
|
private readonly subscribers;
|
|
29
54
|
private readonly crossTabEvents;
|
|
55
|
+
private readonly channelNameFactory?;
|
|
30
56
|
private channel?;
|
|
57
|
+
private channelInitialised;
|
|
31
58
|
/**
|
|
32
59
|
* @param config - Optional configuration. Omit to create an in-memory-only bus.
|
|
33
60
|
* @beta
|
|
34
61
|
*/
|
|
35
62
|
constructor(config?: AgenticActivityBusConfig);
|
|
63
|
+
/**
|
|
64
|
+
* Lazily open the cross-tab `BroadcastChannel` on first use. Deferred (rather than
|
|
65
|
+
* created in the constructor) so that importing this module, or constructing the bus
|
|
66
|
+
* off-browser (Node, tests, headless server), never opens a live channel or reads
|
|
67
|
+
* `sessionStorage` — both would keep a Node event loop alive and hang the process.
|
|
68
|
+
* Cross-tab forwarding is inherently browser-only, so channel creation is gated on a
|
|
69
|
+
* browser environment; elsewhere the bus stays purely in-process.
|
|
70
|
+
*/
|
|
71
|
+
private ensureChannel;
|
|
36
72
|
/**
|
|
37
73
|
* Subscribe to an event. Returns an unsubscribe function — call it in
|
|
38
74
|
* `disconnectedCallback` to avoid memory leaks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-activity-bus.d.ts","sourceRoot":"","sources":["../../../src/channel/ai-activity-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,CAAC,MAAM,qBAAqB,CAAC,EAAE,CAAC;IACjD,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-activity-bus.d.ts","sourceRoot":"","sources":["../../../src/channel/ai-activity-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,CAAC,MAAM,qBAAqB,CAAC,EAAE,CAAC;IACjD,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,MAAM,CA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ai-assistant/chat-driver`).
|
|
3
|
+
*
|
|
4
|
+
* Re-exports ONLY the framework-agnostic pieces — {@link ChatDriver}, `OrchestratingDriver`, the
|
|
5
|
+
* agent-config surface (`defineAgent`, `defineStatefulAgent`, and the config/input types), and the
|
|
6
|
+
* activity-bus types/`NOOP_ACTIVITY_BUS` — WITHOUT the DOM/FAST component layer that the package's
|
|
7
|
+
* main entry (`.`) pulls in via `main/main`. This lets a Node / CommonJS host (server, unit tests,
|
|
8
|
+
* benches) construct and drive `ChatDriver` over `foundation-ai` providers with no jsdom and no
|
|
9
|
+
* custom-element registration.
|
|
10
|
+
*
|
|
11
|
+
* Every module re-exported here is DOM-clean at import time (no `window`/`document`/`sessionStorage`
|
|
12
|
+
* eval-time access, no `@genesislcap/web-core`). The activity bus is imported for its types and the
|
|
13
|
+
* no-op default; its cross-tab `BroadcastChannel` is created lazily and only in a browser, so
|
|
14
|
+
* pulling this entry into Node opens nothing.
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
* @beta
|
|
18
|
+
*/
|
|
19
|
+
export * from './components/chat-driver';
|
|
20
|
+
export * from './components/orchestrating-driver';
|
|
21
|
+
export * from './channel/ai-activity-channel';
|
|
22
|
+
export * from './channel/ai-activity-bus';
|
|
23
|
+
export * from './config/config';
|
|
24
|
+
export * from './config/define-stateful-agent';
|
|
25
|
+
export * from './config/fallback-agents';
|
|
26
|
+
export { AnthropicProvider, AnthropicTransport, GeminiProvider, GeminiTransport, MutableAIProviderRegistry, isObservableAIProviderRegistry, } from '@genesislcap/foundation-ai';
|
|
27
|
+
export type { AIProvider, AIProviderRegistry, AnthropicModelId, CachePolicy, ChatFallback, ChatMessage, ChatRequestOptions, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, GeminiModelId, } from '@genesislcap/foundation-ai';
|
|
28
|
+
//# sourceMappingURL=chat-driver-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-driver-node.d.ts","sourceRoot":"","sources":["../../src/chat-driver-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AASzC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,GACd,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AIProviderRegistry, ChatAttachment, ChatDriverResult, ChatMessage, ChatToolChoice, InteractionRequestOptions, SubAgentFailureReason } from '@genesislcap/foundation-ai';
|
|
2
|
+
import { type ActivityBus } from '../../channel/ai-activity-bus';
|
|
2
3
|
import type { AgentConfig, SystemPromptInput, ToolDefinitionsInput, ToolHandlersInput } from '../../config/config';
|
|
3
4
|
import type { InteractionContext } from '../../types/interaction-context';
|
|
4
5
|
import type { AiDriver, AllAgentSummary } from '../ai-driver/ai-driver';
|
|
@@ -73,6 +74,38 @@ export interface TurnSnapshot {
|
|
|
73
74
|
/** Agent-supplied snapshot — machine state/context for stateful agents, undefined otherwise. */
|
|
74
75
|
agentSnapshot?: unknown;
|
|
75
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Construction-time configuration for {@link ChatDriver}. Everything except the provider
|
|
79
|
+
* registry is optional — most fields are also settable per-agent via `applyAgent`, so a
|
|
80
|
+
* bare `new ChatDriver(registry)` is valid. Mirrors the `(registry, options)` shape of
|
|
81
|
+
* `OrchestratingDriver`.
|
|
82
|
+
*
|
|
83
|
+
* @beta
|
|
84
|
+
*/
|
|
85
|
+
export interface ChatDriverConfig {
|
|
86
|
+
/** Initial tool handlers (static map or per-turn factory). Default `{}`. */
|
|
87
|
+
toolHandlers?: ToolHandlersInput;
|
|
88
|
+
/** Initial tool definitions (static array or per-turn factory). Default `[]`. */
|
|
89
|
+
toolDefinitions?: ToolDefinitionsInput;
|
|
90
|
+
/** Initial system prompt (string or per-turn resolver). */
|
|
91
|
+
systemPrompt?: SystemPromptInput;
|
|
92
|
+
/** Primer history prepended to the conversation. */
|
|
93
|
+
primerHistory?: ChatMessage[];
|
|
94
|
+
/** Hard cap on tool-loop iterations. Default `50`. */
|
|
95
|
+
maxToolIterations?: number;
|
|
96
|
+
/** Hard cap on fold operations. Default `5`. */
|
|
97
|
+
maxFoldOperations?: number;
|
|
98
|
+
/** Ring-buffer size for per-turn snapshots. Default `400`. */
|
|
99
|
+
maxTurnSnapshots?: number;
|
|
100
|
+
/** Session identity used to file meta events onto the shared debug-log timeline. */
|
|
101
|
+
sessionKey?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Activity bus for lifecycle/halo/tool-loop events. Injected by the browser host
|
|
104
|
+
* (the shared cross-tab singleton); omitted off-browser (Node, tests, headless), where
|
|
105
|
+
* it defaults to {@link NOOP_ACTIVITY_BUS} so no `BroadcastChannel` is ever opened.
|
|
106
|
+
*/
|
|
107
|
+
activityBus?: ActivityBus;
|
|
108
|
+
}
|
|
76
109
|
/**
|
|
77
110
|
* Plain TS class that drives a multi-turn chat conversation, including the tool-call loop.
|
|
78
111
|
* Owned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.
|
|
@@ -85,9 +118,6 @@ export interface TurnSnapshot {
|
|
|
85
118
|
*/
|
|
86
119
|
export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
87
120
|
private readonly providerRegistry;
|
|
88
|
-
private readonly maxToolIterations;
|
|
89
|
-
/** Session identity used to file meta events onto the shared debug-log timeline. */
|
|
90
|
-
private readonly sessionKey;
|
|
91
121
|
private history;
|
|
92
122
|
private busy;
|
|
93
123
|
/** Epoch ms when the current turn loop began — drives the `turn.end` duration. */
|
|
@@ -315,6 +345,16 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
315
345
|
* the resolved string in a `<system-reminder>` marker and injects it at the message tail.
|
|
316
346
|
*/
|
|
317
347
|
private activeTailContextInput?;
|
|
348
|
+
/**
|
|
349
|
+
* Active agent's structured-output schema selector (static value or per-turn resolver).
|
|
350
|
+
* When it resolves to a schema, the model's final answer is constrained to it this turn.
|
|
351
|
+
*/
|
|
352
|
+
private activeResponseSchemaInput?;
|
|
353
|
+
/**
|
|
354
|
+
* Active agent's refusal-fallback chain (static). Passed through to the provider so a refused
|
|
355
|
+
* turn (e.g. Fable 5) is re-run on the next model server-side.
|
|
356
|
+
*/
|
|
357
|
+
private activeFallbacks?;
|
|
318
358
|
/**
|
|
319
359
|
* Active agent's unresolved-tool hook, captured from `applyAgent`. Consulted
|
|
320
360
|
* only when a tool call cannot be dispatched (a stale or hallucinated name);
|
|
@@ -359,9 +399,13 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
359
399
|
* teardown in `runSubAgent`.
|
|
360
400
|
*/
|
|
361
401
|
private unsubscribeRegistry?;
|
|
362
|
-
|
|
402
|
+
/** Hard cap on tool-loop iterations. */
|
|
403
|
+
private readonly maxToolIterations;
|
|
363
404
|
/** Session identity used to file meta events onto the shared debug-log timeline. */
|
|
364
|
-
sessionKey
|
|
405
|
+
private readonly sessionKey;
|
|
406
|
+
/** Injected activity bus; defaults to a no-op off-browser (Node/tests/headless). */
|
|
407
|
+
private readonly activityBus;
|
|
408
|
+
constructor(providerRegistry: AIProviderRegistry, config?: ChatDriverConfig);
|
|
365
409
|
/**
|
|
366
410
|
* Tear down the driver: aborts the lifecycle signal so any in-flight provider
|
|
367
411
|
* request (and prompt/tool factories awaiting it) cancels instead of running
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAGlB,cAAc,EACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAGlB,cAAc,EACd,gBAAgB,EAEhB,WAAW,EAGX,cAAc,EAKd,yBAAyB,EAEzB,qBAAqB,EAGtB,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EACV,WAAW,EAKX,iBAAiB,EAIjB,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAC;AAe7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAU1E,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AA8CxE,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAMhE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AAE9E;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EA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S,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmD/F;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,mBAAmB;IA8F3B;;;;;OAKG;YACW,cAAc;IA+M5B;;;OAGG;IACG,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiDrF,wFAAwF;IACxF,OAAO,CAAC,OAAO;IAKf;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;;;;;;;;OASG;IACH,OAAO,CAAC,cAAc;IAMtB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA+BxB,uFAAuF;IACvF,OAAO,CAAC,QAAQ;IAsChB,OAAO,CAAC,aAAa;IAQrB,8EAA8E;IAC9E,OAAO,CAAC,SAAS;IAWjB,mFAAmF;IACnF,OAAO,CAAC,2BAA2B;YAkCrB,WAAW;IAszBzB,OAAO,CAAC,eAAe;CAoBxB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AIProviderRegistry, ChatAttachment, ChatDriverResult, ChatMessage } from '@genesislcap/foundation-ai';
|
|
2
|
+
import type { ActivityBus } from '../../channel/ai-activity-bus';
|
|
2
3
|
import type { AgentConfig } from '../../config/config';
|
|
3
4
|
import type { InteractionContext } from '../../types/interaction-context';
|
|
4
5
|
import type { AiDriver, AllAgentSummary } from '../ai-driver/ai-driver';
|
|
@@ -62,6 +63,8 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
62
63
|
maxToolIterations?: number;
|
|
63
64
|
maxFoldOperations?: number;
|
|
64
65
|
maxTurnSnapshots?: number;
|
|
66
|
+
/** Activity bus passed through to the inner ChatDriver (browser host injects the singleton). */
|
|
67
|
+
activityBus?: ActivityBus;
|
|
65
68
|
});
|
|
66
69
|
resolveInteraction(interactionId: string, result: unknown): void;
|
|
67
70
|
getInteractionContext(interactionId: string): InteractionContext | undefined;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AGP,gBAAgB,EAAE,kBAAkB,EACpC,MAAM,EAAE,WAAW,EAAE,EACtC,OAAO,GAAE;QACP,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;KACtB;
|
|
1
|
+
{"version":3,"file":"orchestrating-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/orchestrating-driver/orchestrating-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EACV,WAAW,EAKZ,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,4BAA4B,CAAC;AAoDpC;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,WAAY,YAAW,QAAQ;IA8CpE,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM;IA9CzB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0B;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAsB;IAChD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAS;I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