@genesislcap/ai-assistant 14.494.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 +588 -214
- package/dist/ai-assistant.d.ts +157 -6
- 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 +713 -333
- 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/channel/ai-activity-channel.d.ts +10 -1
- package/dist/dts/channel/ai-activity-channel.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 +66 -5
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.test.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/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/state/debug-event-log.d.ts +8 -12
- package/dist/dts/state/debug-event-log.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 +77 -25
- package/dist/esm/components/chat-driver/chat-driver.test.js +160 -36
- 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/channel/ai-activity-channel.ts +9 -1
- package/src/chat-driver-node.ts +54 -0
- package/src/components/chat-driver/chat-driver.test.ts +237 -50
- package/src/components/chat-driver/chat-driver.ts +151 -39
- package/src/components/orchestrating-driver/orchestrating-driver.ts +10 -11
- package/src/config/config.ts +40 -1
- package/src/index.ts +1 -0
- package/src/main/main.ts +8 -11
- package/src/main/popout-interaction-gate.test.ts +6 -11
- package/src/state/debug-event-log.ts +9 -18
|
@@ -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",
|
|
@@ -151,6 +350,14 @@
|
|
|
151
350
|
"package": "./utils/tool-fold"
|
|
152
351
|
}
|
|
153
352
|
},
|
|
353
|
+
{
|
|
354
|
+
"kind": "js",
|
|
355
|
+
"name": "TurnFailureReason",
|
|
356
|
+
"declaration": {
|
|
357
|
+
"name": "TurnFailureReason",
|
|
358
|
+
"module": "./state/debug-event-log"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
154
361
|
{
|
|
155
362
|
"kind": "js",
|
|
156
363
|
"name": "TimelineMessage",
|
|
@@ -221,6 +428,15 @@
|
|
|
221
428
|
"kind": "javascript-module",
|
|
222
429
|
"path": "src/channel/ai-activity-bus.ts",
|
|
223
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
|
+
},
|
|
224
440
|
{
|
|
225
441
|
"kind": "class",
|
|
226
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.",
|
|
@@ -243,6 +459,15 @@
|
|
|
243
459
|
"readonly": true,
|
|
244
460
|
"default": "new Set(config?.crossTabEvents ?? [])"
|
|
245
461
|
},
|
|
462
|
+
{
|
|
463
|
+
"kind": "field",
|
|
464
|
+
"name": "channelNameFactory",
|
|
465
|
+
"type": {
|
|
466
|
+
"text": "() => string | undefined"
|
|
467
|
+
},
|
|
468
|
+
"privacy": "private",
|
|
469
|
+
"readonly": true
|
|
470
|
+
},
|
|
246
471
|
{
|
|
247
472
|
"kind": "field",
|
|
248
473
|
"name": "channel",
|
|
@@ -251,6 +476,26 @@
|
|
|
251
476
|
},
|
|
252
477
|
"privacy": "private"
|
|
253
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
|
+
},
|
|
254
499
|
{
|
|
255
500
|
"kind": "method",
|
|
256
501
|
"name": "subscribe",
|
|
@@ -356,11 +601,19 @@
|
|
|
356
601
|
{
|
|
357
602
|
"kind": "variable",
|
|
358
603
|
"name": "agenticActivityBus",
|
|
359
|
-
"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})",
|
|
360
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."
|
|
361
606
|
}
|
|
362
607
|
],
|
|
363
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
|
+
},
|
|
364
617
|
{
|
|
365
618
|
"kind": "js",
|
|
366
619
|
"name": "AgenticActivityBus",
|
|
@@ -867,44 +1120,241 @@
|
|
|
867
1120
|
},
|
|
868
1121
|
{
|
|
869
1122
|
"kind": "javascript-module",
|
|
870
|
-
"path": "src/
|
|
871
|
-
"declarations": [
|
|
1123
|
+
"path": "src/config/config.ts",
|
|
1124
|
+
"declarations": [
|
|
1125
|
+
{
|
|
1126
|
+
"kind": "function",
|
|
1127
|
+
"name": "defineAgent",
|
|
1128
|
+
"description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
|
|
1129
|
+
}
|
|
1130
|
+
],
|
|
872
1131
|
"exports": [
|
|
873
1132
|
{
|
|
874
1133
|
"kind": "js",
|
|
875
|
-
"name": "
|
|
1134
|
+
"name": "CachePolicy",
|
|
876
1135
|
"declaration": {
|
|
877
|
-
"name": "
|
|
878
|
-
"
|
|
1136
|
+
"name": "CachePolicy",
|
|
1137
|
+
"module": "src/config/config.ts"
|
|
879
1138
|
}
|
|
880
1139
|
},
|
|
881
1140
|
{
|
|
882
1141
|
"kind": "js",
|
|
883
|
-
"name": "
|
|
1142
|
+
"name": "ChatFallback",
|
|
884
1143
|
"declaration": {
|
|
885
|
-
"name": "
|
|
886
|
-
"
|
|
1144
|
+
"name": "ChatFallback",
|
|
1145
|
+
"module": "src/config/config.ts"
|
|
887
1146
|
}
|
|
888
1147
|
},
|
|
889
1148
|
{
|
|
890
1149
|
"kind": "js",
|
|
891
|
-
"name": "
|
|
1150
|
+
"name": "ChatInputDuringExecutionMode",
|
|
892
1151
|
"declaration": {
|
|
893
|
-
"name": "
|
|
894
|
-
"
|
|
1152
|
+
"name": "ChatInputDuringExecutionMode",
|
|
1153
|
+
"module": "src/config/config.ts"
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"kind": "js",
|
|
1158
|
+
"name": "ChatToolChoice",
|
|
1159
|
+
"declaration": {
|
|
1160
|
+
"name": "ChatToolChoice",
|
|
1161
|
+
"module": "src/config/config.ts"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"kind": "js",
|
|
1166
|
+
"name": "defineAgent",
|
|
1167
|
+
"declaration": {
|
|
1168
|
+
"name": "defineAgent",
|
|
1169
|
+
"module": "src/config/config.ts"
|
|
895
1170
|
}
|
|
896
1171
|
}
|
|
897
1172
|
]
|
|
898
1173
|
},
|
|
899
1174
|
{
|
|
900
1175
|
"kind": "javascript-module",
|
|
901
|
-
"path": "src/
|
|
1176
|
+
"path": "src/config/define-stateful-agent.ts",
|
|
902
1177
|
"declarations": [
|
|
903
1178
|
{
|
|
904
|
-
"kind": "
|
|
905
|
-
"name": "
|
|
906
|
-
"
|
|
907
|
-
|
|
1179
|
+
"kind": "function",
|
|
1180
|
+
"name": "restoreMachine",
|
|
1181
|
+
"return": {
|
|
1182
|
+
"type": {
|
|
1183
|
+
"text": "void"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"parameters": [
|
|
1187
|
+
{
|
|
1188
|
+
"name": "machine",
|
|
1189
|
+
"type": {
|
|
1190
|
+
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
1191
|
+
},
|
|
1192
|
+
"description": "the machine to restore (already constructed/started)."
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"name": "restored",
|
|
1196
|
+
"type": {
|
|
1197
|
+
"text": "unknown"
|
|
1198
|
+
},
|
|
1199
|
+
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"name": "key",
|
|
1203
|
+
"default": "'machine'",
|
|
1204
|
+
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
1205
|
+
}
|
|
1206
|
+
],
|
|
1207
|
+
"description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"kind": "function",
|
|
1211
|
+
"name": "defineStatefulAgent",
|
|
1212
|
+
"return": {
|
|
1213
|
+
"type": {
|
|
1214
|
+
"text": "AgentConfig"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"parameters": [
|
|
1218
|
+
{
|
|
1219
|
+
"name": "opts",
|
|
1220
|
+
"type": {
|
|
1221
|
+
"text": "StatefulAgentInit<S>"
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
],
|
|
1225
|
+
"description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
|
|
1226
|
+
}
|
|
1227
|
+
],
|
|
1228
|
+
"exports": [
|
|
1229
|
+
{
|
|
1230
|
+
"kind": "js",
|
|
1231
|
+
"name": "restoreMachine",
|
|
1232
|
+
"declaration": {
|
|
1233
|
+
"name": "restoreMachine",
|
|
1234
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"kind": "js",
|
|
1239
|
+
"name": "defineStatefulAgent",
|
|
1240
|
+
"declaration": {
|
|
1241
|
+
"name": "defineStatefulAgent",
|
|
1242
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
]
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
"kind": "javascript-module",
|
|
1249
|
+
"path": "src/config/fallback-agents.ts",
|
|
1250
|
+
"declarations": [
|
|
1251
|
+
{
|
|
1252
|
+
"kind": "variable",
|
|
1253
|
+
"name": "friendlyFallbackAgent",
|
|
1254
|
+
"type": {
|
|
1255
|
+
"text": "FallbackAgentConfig"
|
|
1256
|
+
},
|
|
1257
|
+
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
|
|
1258
|
+
"description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
"kind": "variable",
|
|
1262
|
+
"name": "strictFallbackAgent",
|
|
1263
|
+
"type": {
|
|
1264
|
+
"text": "FallbackAgentConfig"
|
|
1265
|
+
},
|
|
1266
|
+
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. Respond with a single short sentence stating what you can assist with. Do not elaborate. The available specialists are: {{agents}}.`,\n}",
|
|
1267
|
+
"description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list."
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
"exports": [
|
|
1271
|
+
{
|
|
1272
|
+
"kind": "js",
|
|
1273
|
+
"name": "friendlyFallbackAgent",
|
|
1274
|
+
"declaration": {
|
|
1275
|
+
"name": "friendlyFallbackAgent",
|
|
1276
|
+
"module": "src/config/fallback-agents.ts"
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"kind": "js",
|
|
1281
|
+
"name": "strictFallbackAgent",
|
|
1282
|
+
"declaration": {
|
|
1283
|
+
"name": "strictFallbackAgent",
|
|
1284
|
+
"module": "src/config/fallback-agents.ts"
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
]
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"kind": "javascript-module",
|
|
1291
|
+
"path": "src/config/index.ts",
|
|
1292
|
+
"declarations": [],
|
|
1293
|
+
"exports": [
|
|
1294
|
+
{
|
|
1295
|
+
"kind": "js",
|
|
1296
|
+
"name": "*",
|
|
1297
|
+
"declaration": {
|
|
1298
|
+
"name": "*",
|
|
1299
|
+
"package": "./config"
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"kind": "js",
|
|
1304
|
+
"name": "*",
|
|
1305
|
+
"declaration": {
|
|
1306
|
+
"name": "*",
|
|
1307
|
+
"package": "./fallback-agents"
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"kind": "javascript-module",
|
|
1314
|
+
"path": "src/config/validate-providers.ts",
|
|
1315
|
+
"declarations": [],
|
|
1316
|
+
"exports": []
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"kind": "javascript-module",
|
|
1320
|
+
"path": "src/main/index.ts",
|
|
1321
|
+
"declarations": [],
|
|
1322
|
+
"exports": [
|
|
1323
|
+
{
|
|
1324
|
+
"kind": "js",
|
|
1325
|
+
"name": "*",
|
|
1326
|
+
"declaration": {
|
|
1327
|
+
"name": "*",
|
|
1328
|
+
"package": "./main.template"
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
"kind": "js",
|
|
1333
|
+
"name": "*",
|
|
1334
|
+
"declaration": {
|
|
1335
|
+
"name": "*",
|
|
1336
|
+
"package": "./main"
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"kind": "js",
|
|
1341
|
+
"name": "*",
|
|
1342
|
+
"declaration": {
|
|
1343
|
+
"name": "*",
|
|
1344
|
+
"package": "./main.types"
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"kind": "javascript-module",
|
|
1351
|
+
"path": "src/main/main.styles.ts",
|
|
1352
|
+
"declarations": [
|
|
1353
|
+
{
|
|
1354
|
+
"kind": "variable",
|
|
1355
|
+
"name": "styles",
|
|
1356
|
+
"default": "css`\n ${baseStyles}\n ${settingsModalStyles}\n`"
|
|
1357
|
+
}
|
|
908
1358
|
],
|
|
909
1359
|
"exports": [
|
|
910
1360
|
{
|
|
@@ -3350,381 +3800,192 @@
|
|
|
3350
3800
|
"fieldName": "placeholder"
|
|
3351
3801
|
},
|
|
3352
3802
|
{
|
|
3353
|
-
"name": "popout-mode",
|
|
3354
|
-
"type": {
|
|
3355
|
-
"text": "PopoutMode | undefined"
|
|
3356
|
-
},
|
|
3357
|
-
"description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change).",
|
|
3358
|
-
"fieldName": "popoutMode"
|
|
3359
|
-
},
|
|
3360
|
-
{
|
|
3361
|
-
"name": "debug-redux",
|
|
3362
|
-
"type": {
|
|
3363
|
-
"text": "boolean"
|
|
3364
|
-
},
|
|
3365
|
-
"default": "false",
|
|
3366
|
-
"description": "When set, enables Redux DevTools for this instance's session store.",
|
|
3367
|
-
"fieldName": "debugRedux"
|
|
3368
|
-
}
|
|
3369
|
-
],
|
|
3370
|
-
"superclass": {
|
|
3371
|
-
"name": "GenesisElement",
|
|
3372
|
-
"package": "@genesislcap/web-core"
|
|
3373
|
-
},
|
|
3374
|
-
"tagName": "foundation-ai-assistant",
|
|
3375
|
-
"customElement": true
|
|
3376
|
-
}
|
|
3377
|
-
],
|
|
3378
|
-
"exports": [
|
|
3379
|
-
{
|
|
3380
|
-
"kind": "js",
|
|
3381
|
-
"name": "sparkleIconSvg",
|
|
3382
|
-
"declaration": {
|
|
3383
|
-
"name": "sparkleIconSvg",
|
|
3384
|
-
"module": "src/main/main.ts"
|
|
3385
|
-
}
|
|
3386
|
-
},
|
|
3387
|
-
{
|
|
3388
|
-
"kind": "js",
|
|
3389
|
-
"name": "userIconSvg",
|
|
3390
|
-
"declaration": {
|
|
3391
|
-
"name": "userIconSvg",
|
|
3392
|
-
"module": "src/main/main.ts"
|
|
3393
|
-
}
|
|
3394
|
-
},
|
|
3395
|
-
{
|
|
3396
|
-
"kind": "js",
|
|
3397
|
-
"name": "genesisIconSvg",
|
|
3398
|
-
"declaration": {
|
|
3399
|
-
"name": "genesisIconSvg",
|
|
3400
|
-
"module": "src/main/main.ts"
|
|
3401
|
-
}
|
|
3402
|
-
},
|
|
3403
|
-
{
|
|
3404
|
-
"kind": "js",
|
|
3405
|
-
"name": "FoundationAiAssistant",
|
|
3406
|
-
"declaration": {
|
|
3407
|
-
"name": "FoundationAiAssistant",
|
|
3408
|
-
"module": "src/main/main.ts"
|
|
3409
|
-
}
|
|
3410
|
-
},
|
|
3411
|
-
{
|
|
3412
|
-
"kind": "custom-element-definition",
|
|
3413
|
-
"name": "foundation-ai-assistant",
|
|
3414
|
-
"declaration": {
|
|
3415
|
-
"name": "FoundationAiAssistant",
|
|
3416
|
-
"module": "src/main/main.ts"
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
]
|
|
3420
|
-
},
|
|
3421
|
-
{
|
|
3422
|
-
"kind": "javascript-module",
|
|
3423
|
-
"path": "src/main/main.types.ts",
|
|
3424
|
-
"declarations": [
|
|
3425
|
-
{
|
|
3426
|
-
"kind": "variable",
|
|
3427
|
-
"name": "AiAssistantEvent",
|
|
3428
|
-
"type": {
|
|
3429
|
-
"text": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}"
|
|
3430
|
-
},
|
|
3431
|
-
"default": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}",
|
|
3432
|
-
"description": "DOM events the `<foundation-ai-assistant>` element dispatches to its host.\nAll bubble and are `composed` (they cross the shadow boundary), so a host can\nlisten on the element — or any ancestor — to react. Use these constants to\nwire listeners instead of hand-typing event-name strings.\n\nAn `as const` map (not a TS `enum` — this package ships none), so it serves as\nboth the listener-name value and, via the same-named type below, a union."
|
|
3433
|
-
},
|
|
3434
|
-
{
|
|
3435
|
-
"kind": "variable",
|
|
3436
|
-
"name": "ANIMATION_DEFS",
|
|
3437
|
-
"type": {
|
|
3438
|
-
"text": "object"
|
|
3439
|
-
},
|
|
3440
|
-
"default": "{\n loading: {\n label: 'Dots',\n description: 'Shows pulsing dots while the assistant is generating a response.',\n category: 'Loading style',\n },\n waves: {\n label: 'Waves',\n description:\n 'Shows glowing sine waves inside a circle while the assistant is generating a response.',\n category: 'Loading style',\n },\n flowingWaves: {\n label: 'Flowing waves',\n description:\n 'Shows coloured waves rising and settling from a line while the assistant is generating a response.',\n category: 'Loading style',\n },\n plasma: {\n label: 'Plasma orb',\n description:\n 'Shows a glowing plasma sphere with drifting energy while the assistant is generating a response.',\n category: 'Loading style',\n },\n halo: {\n label: 'Halo',\n description:\n 'Displays a glowing halo around the assistant avatar while a response is streaming.',\n category: 'Effects',\n },\n}",
|
|
3441
|
-
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
3442
|
-
},
|
|
3443
|
-
{
|
|
3444
|
-
"kind": "variable",
|
|
3445
|
-
"name": "satisfies",
|
|
3446
|
-
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
3447
|
-
},
|
|
3448
|
-
{
|
|
3449
|
-
"kind": "variable",
|
|
3450
|
-
"name": "Record",
|
|
3451
|
-
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
3452
|
-
}
|
|
3453
|
-
],
|
|
3454
|
-
"exports": [
|
|
3455
|
-
{
|
|
3456
|
-
"kind": "js",
|
|
3457
|
-
"name": "AgentPickerMode",
|
|
3458
|
-
"declaration": {
|
|
3459
|
-
"name": "AgentPickerMode",
|
|
3460
|
-
"package": "@genesislcap/foundation-ai"
|
|
3461
|
-
}
|
|
3462
|
-
},
|
|
3463
|
-
{
|
|
3464
|
-
"kind": "js",
|
|
3465
|
-
"name": "AiAssistantEvent",
|
|
3466
|
-
"declaration": {
|
|
3467
|
-
"name": "AiAssistantEvent",
|
|
3468
|
-
"module": "src/main/main.types.ts"
|
|
3469
|
-
}
|
|
3470
|
-
},
|
|
3471
|
-
{
|
|
3472
|
-
"kind": "js",
|
|
3473
|
-
"name": "ANIMATION_DEFS",
|
|
3474
|
-
"declaration": {
|
|
3475
|
-
"name": "ANIMATION_DEFS",
|
|
3476
|
-
"module": "src/main/main.types.ts"
|
|
3477
|
-
}
|
|
3478
|
-
},
|
|
3479
|
-
{
|
|
3480
|
-
"kind": "js",
|
|
3481
|
-
"name": "satisfies",
|
|
3482
|
-
"declaration": {
|
|
3483
|
-
"name": "satisfies",
|
|
3484
|
-
"module": "src/main/main.types.ts"
|
|
3485
|
-
}
|
|
3486
|
-
},
|
|
3487
|
-
{
|
|
3488
|
-
"kind": "js",
|
|
3489
|
-
"name": "Record",
|
|
3490
|
-
"declaration": {
|
|
3491
|
-
"name": "Record",
|
|
3492
|
-
"module": "src/main/main.types.ts"
|
|
3493
|
-
}
|
|
3494
|
-
}
|
|
3495
|
-
]
|
|
3496
|
-
},
|
|
3497
|
-
{
|
|
3498
|
-
"kind": "javascript-module",
|
|
3499
|
-
"path": "src/provider/ai-provider-switcher.ts",
|
|
3500
|
-
"declarations": [
|
|
3501
|
-
{
|
|
3502
|
-
"kind": "variable",
|
|
3503
|
-
"name": "AIProviderSwitcher",
|
|
3504
|
-
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
3505
|
-
}
|
|
3506
|
-
],
|
|
3507
|
-
"exports": [
|
|
3508
|
-
{
|
|
3509
|
-
"kind": "js",
|
|
3510
|
-
"name": "AIProviderSwitcher",
|
|
3511
|
-
"declaration": {
|
|
3512
|
-
"name": "AIProviderSwitcher",
|
|
3513
|
-
"module": "src/provider/ai-provider-switcher.ts"
|
|
3514
|
-
}
|
|
3515
|
-
}
|
|
3516
|
-
]
|
|
3517
|
-
},
|
|
3518
|
-
{
|
|
3519
|
-
"kind": "javascript-module",
|
|
3520
|
-
"path": "src/provider/assistant-app-settings.ts",
|
|
3521
|
-
"declarations": [
|
|
3522
|
-
{
|
|
3523
|
-
"kind": "variable",
|
|
3524
|
-
"name": "AssistantAppSettingsProvider",
|
|
3525
|
-
"description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
|
|
3526
|
-
}
|
|
3527
|
-
],
|
|
3528
|
-
"exports": [
|
|
3529
|
-
{
|
|
3530
|
-
"kind": "js",
|
|
3531
|
-
"name": "AssistantAppSettingsProvider",
|
|
3532
|
-
"declaration": {
|
|
3533
|
-
"name": "AssistantAppSettingsProvider",
|
|
3534
|
-
"module": "src/provider/assistant-app-settings.ts"
|
|
3535
|
-
}
|
|
3536
|
-
}
|
|
3537
|
-
]
|
|
3538
|
-
},
|
|
3539
|
-
{
|
|
3540
|
-
"kind": "javascript-module",
|
|
3541
|
-
"path": "src/config/config.ts",
|
|
3542
|
-
"declarations": [
|
|
3543
|
-
{
|
|
3544
|
-
"kind": "function",
|
|
3545
|
-
"name": "defineAgent",
|
|
3546
|
-
"description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
|
|
3547
|
-
}
|
|
3548
|
-
],
|
|
3549
|
-
"exports": [
|
|
3550
|
-
{
|
|
3551
|
-
"kind": "js",
|
|
3552
|
-
"name": "CachePolicy",
|
|
3553
|
-
"declaration": {
|
|
3554
|
-
"name": "CachePolicy",
|
|
3555
|
-
"module": "src/config/config.ts"
|
|
3556
|
-
}
|
|
3557
|
-
},
|
|
3558
|
-
{
|
|
3559
|
-
"kind": "js",
|
|
3560
|
-
"name": "ChatInputDuringExecutionMode",
|
|
3561
|
-
"declaration": {
|
|
3562
|
-
"name": "ChatInputDuringExecutionMode",
|
|
3563
|
-
"module": "src/config/config.ts"
|
|
3564
|
-
}
|
|
3565
|
-
},
|
|
3566
|
-
{
|
|
3567
|
-
"kind": "js",
|
|
3568
|
-
"name": "ChatToolChoice",
|
|
3569
|
-
"declaration": {
|
|
3570
|
-
"name": "ChatToolChoice",
|
|
3571
|
-
"module": "src/config/config.ts"
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
{
|
|
3575
|
-
"kind": "js",
|
|
3576
|
-
"name": "defineAgent",
|
|
3577
|
-
"declaration": {
|
|
3578
|
-
"name": "defineAgent",
|
|
3579
|
-
"module": "src/config/config.ts"
|
|
3580
|
-
}
|
|
3581
|
-
}
|
|
3582
|
-
]
|
|
3583
|
-
},
|
|
3584
|
-
{
|
|
3585
|
-
"kind": "javascript-module",
|
|
3586
|
-
"path": "src/config/define-stateful-agent.ts",
|
|
3587
|
-
"declarations": [
|
|
3588
|
-
{
|
|
3589
|
-
"kind": "function",
|
|
3590
|
-
"name": "restoreMachine",
|
|
3591
|
-
"return": {
|
|
3592
|
-
"type": {
|
|
3593
|
-
"text": "void"
|
|
3594
|
-
}
|
|
3595
|
-
},
|
|
3596
|
-
"parameters": [
|
|
3597
|
-
{
|
|
3598
|
-
"name": "machine",
|
|
3599
|
-
"type": {
|
|
3600
|
-
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
3601
|
-
},
|
|
3602
|
-
"description": "the machine to restore (already constructed/started)."
|
|
3603
|
-
},
|
|
3604
|
-
{
|
|
3605
|
-
"name": "restored",
|
|
3606
|
-
"type": {
|
|
3607
|
-
"text": "unknown"
|
|
3608
|
-
},
|
|
3609
|
-
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
3610
|
-
},
|
|
3611
|
-
{
|
|
3612
|
-
"name": "key",
|
|
3613
|
-
"default": "'machine'",
|
|
3614
|
-
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
3615
|
-
}
|
|
3616
|
-
],
|
|
3617
|
-
"description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
|
|
3618
|
-
},
|
|
3619
|
-
{
|
|
3620
|
-
"kind": "function",
|
|
3621
|
-
"name": "defineStatefulAgent",
|
|
3622
|
-
"return": {
|
|
3623
|
-
"type": {
|
|
3624
|
-
"text": "AgentConfig"
|
|
3625
|
-
}
|
|
3626
|
-
},
|
|
3627
|
-
"parameters": [
|
|
3803
|
+
"name": "popout-mode",
|
|
3804
|
+
"type": {
|
|
3805
|
+
"text": "PopoutMode | undefined"
|
|
3806
|
+
},
|
|
3807
|
+
"description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change).",
|
|
3808
|
+
"fieldName": "popoutMode"
|
|
3809
|
+
},
|
|
3628
3810
|
{
|
|
3629
|
-
"name": "
|
|
3811
|
+
"name": "debug-redux",
|
|
3630
3812
|
"type": {
|
|
3631
|
-
"text": "
|
|
3632
|
-
}
|
|
3813
|
+
"text": "boolean"
|
|
3814
|
+
},
|
|
3815
|
+
"default": "false",
|
|
3816
|
+
"description": "When set, enables Redux DevTools for this instance's session store.",
|
|
3817
|
+
"fieldName": "debugRedux"
|
|
3633
3818
|
}
|
|
3634
3819
|
],
|
|
3635
|
-
"
|
|
3820
|
+
"superclass": {
|
|
3821
|
+
"name": "GenesisElement",
|
|
3822
|
+
"package": "@genesislcap/web-core"
|
|
3823
|
+
},
|
|
3824
|
+
"tagName": "foundation-ai-assistant",
|
|
3825
|
+
"customElement": true
|
|
3636
3826
|
}
|
|
3637
3827
|
],
|
|
3638
3828
|
"exports": [
|
|
3639
3829
|
{
|
|
3640
3830
|
"kind": "js",
|
|
3641
|
-
"name": "
|
|
3831
|
+
"name": "sparkleIconSvg",
|
|
3642
3832
|
"declaration": {
|
|
3643
|
-
"name": "
|
|
3644
|
-
"module": "src/
|
|
3833
|
+
"name": "sparkleIconSvg",
|
|
3834
|
+
"module": "src/main/main.ts"
|
|
3645
3835
|
}
|
|
3646
3836
|
},
|
|
3647
3837
|
{
|
|
3648
3838
|
"kind": "js",
|
|
3649
|
-
"name": "
|
|
3839
|
+
"name": "userIconSvg",
|
|
3650
3840
|
"declaration": {
|
|
3651
|
-
"name": "
|
|
3652
|
-
"module": "src/
|
|
3841
|
+
"name": "userIconSvg",
|
|
3842
|
+
"module": "src/main/main.ts"
|
|
3843
|
+
}
|
|
3844
|
+
},
|
|
3845
|
+
{
|
|
3846
|
+
"kind": "js",
|
|
3847
|
+
"name": "genesisIconSvg",
|
|
3848
|
+
"declaration": {
|
|
3849
|
+
"name": "genesisIconSvg",
|
|
3850
|
+
"module": "src/main/main.ts"
|
|
3851
|
+
}
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
"kind": "js",
|
|
3855
|
+
"name": "FoundationAiAssistant",
|
|
3856
|
+
"declaration": {
|
|
3857
|
+
"name": "FoundationAiAssistant",
|
|
3858
|
+
"module": "src/main/main.ts"
|
|
3859
|
+
}
|
|
3860
|
+
},
|
|
3861
|
+
{
|
|
3862
|
+
"kind": "custom-element-definition",
|
|
3863
|
+
"name": "foundation-ai-assistant",
|
|
3864
|
+
"declaration": {
|
|
3865
|
+
"name": "FoundationAiAssistant",
|
|
3866
|
+
"module": "src/main/main.ts"
|
|
3653
3867
|
}
|
|
3654
3868
|
}
|
|
3655
3869
|
]
|
|
3656
3870
|
},
|
|
3657
3871
|
{
|
|
3658
3872
|
"kind": "javascript-module",
|
|
3659
|
-
"path": "src/
|
|
3873
|
+
"path": "src/main/main.types.ts",
|
|
3660
3874
|
"declarations": [
|
|
3661
3875
|
{
|
|
3662
3876
|
"kind": "variable",
|
|
3663
|
-
"name": "
|
|
3877
|
+
"name": "AiAssistantEvent",
|
|
3664
3878
|
"type": {
|
|
3665
|
-
"text": "
|
|
3879
|
+
"text": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}"
|
|
3666
3880
|
},
|
|
3667
|
-
"default": "{\n
|
|
3668
|
-
"description": "
|
|
3881
|
+
"default": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}",
|
|
3882
|
+
"description": "DOM events the `<foundation-ai-assistant>` element dispatches to its host.\nAll bubble and are `composed` (they cross the shadow boundary), so a host can\nlisten on the element — or any ancestor — to react. Use these constants to\nwire listeners instead of hand-typing event-name strings.\n\nAn `as const` map (not a TS `enum` — this package ships none), so it serves as\nboth the listener-name value and, via the same-named type below, a union."
|
|
3669
3883
|
},
|
|
3670
3884
|
{
|
|
3671
3885
|
"kind": "variable",
|
|
3672
|
-
"name": "
|
|
3886
|
+
"name": "ANIMATION_DEFS",
|
|
3673
3887
|
"type": {
|
|
3674
|
-
"text": "
|
|
3888
|
+
"text": "object"
|
|
3675
3889
|
},
|
|
3676
|
-
"default": "{\n
|
|
3677
|
-
"description": "
|
|
3890
|
+
"default": "{\n loading: {\n label: 'Dots',\n description: 'Shows pulsing dots while the assistant is generating a response.',\n category: 'Loading style',\n },\n waves: {\n label: 'Waves',\n description:\n 'Shows glowing sine waves inside a circle while the assistant is generating a response.',\n category: 'Loading style',\n },\n flowingWaves: {\n label: 'Flowing waves',\n description:\n 'Shows coloured waves rising and settling from a line while the assistant is generating a response.',\n category: 'Loading style',\n },\n plasma: {\n label: 'Plasma orb',\n description:\n 'Shows a glowing plasma sphere with drifting energy while the assistant is generating a response.',\n category: 'Loading style',\n },\n halo: {\n label: 'Halo',\n description:\n 'Displays a glowing halo around the assistant avatar while a response is streaming.',\n category: 'Effects',\n },\n}",
|
|
3891
|
+
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
3892
|
+
},
|
|
3893
|
+
{
|
|
3894
|
+
"kind": "variable",
|
|
3895
|
+
"name": "satisfies",
|
|
3896
|
+
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
3897
|
+
},
|
|
3898
|
+
{
|
|
3899
|
+
"kind": "variable",
|
|
3900
|
+
"name": "Record",
|
|
3901
|
+
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
3678
3902
|
}
|
|
3679
3903
|
],
|
|
3680
3904
|
"exports": [
|
|
3681
3905
|
{
|
|
3682
3906
|
"kind": "js",
|
|
3683
|
-
"name": "
|
|
3907
|
+
"name": "AgentPickerMode",
|
|
3684
3908
|
"declaration": {
|
|
3685
|
-
"name": "
|
|
3686
|
-
"
|
|
3909
|
+
"name": "AgentPickerMode",
|
|
3910
|
+
"package": "@genesislcap/foundation-ai"
|
|
3687
3911
|
}
|
|
3688
3912
|
},
|
|
3689
3913
|
{
|
|
3690
3914
|
"kind": "js",
|
|
3691
|
-
"name": "
|
|
3915
|
+
"name": "AiAssistantEvent",
|
|
3692
3916
|
"declaration": {
|
|
3693
|
-
"name": "
|
|
3694
|
-
"module": "src/
|
|
3917
|
+
"name": "AiAssistantEvent",
|
|
3918
|
+
"module": "src/main/main.types.ts"
|
|
3919
|
+
}
|
|
3920
|
+
},
|
|
3921
|
+
{
|
|
3922
|
+
"kind": "js",
|
|
3923
|
+
"name": "ANIMATION_DEFS",
|
|
3924
|
+
"declaration": {
|
|
3925
|
+
"name": "ANIMATION_DEFS",
|
|
3926
|
+
"module": "src/main/main.types.ts"
|
|
3927
|
+
}
|
|
3928
|
+
},
|
|
3929
|
+
{
|
|
3930
|
+
"kind": "js",
|
|
3931
|
+
"name": "satisfies",
|
|
3932
|
+
"declaration": {
|
|
3933
|
+
"name": "satisfies",
|
|
3934
|
+
"module": "src/main/main.types.ts"
|
|
3935
|
+
}
|
|
3936
|
+
},
|
|
3937
|
+
{
|
|
3938
|
+
"kind": "js",
|
|
3939
|
+
"name": "Record",
|
|
3940
|
+
"declaration": {
|
|
3941
|
+
"name": "Record",
|
|
3942
|
+
"module": "src/main/main.types.ts"
|
|
3695
3943
|
}
|
|
3696
3944
|
}
|
|
3697
3945
|
]
|
|
3698
3946
|
},
|
|
3699
3947
|
{
|
|
3700
3948
|
"kind": "javascript-module",
|
|
3701
|
-
"path": "src/
|
|
3702
|
-
"declarations": [
|
|
3949
|
+
"path": "src/provider/ai-provider-switcher.ts",
|
|
3950
|
+
"declarations": [
|
|
3951
|
+
{
|
|
3952
|
+
"kind": "variable",
|
|
3953
|
+
"name": "AIProviderSwitcher",
|
|
3954
|
+
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
3955
|
+
}
|
|
3956
|
+
],
|
|
3703
3957
|
"exports": [
|
|
3704
3958
|
{
|
|
3705
3959
|
"kind": "js",
|
|
3706
|
-
"name": "
|
|
3960
|
+
"name": "AIProviderSwitcher",
|
|
3707
3961
|
"declaration": {
|
|
3708
|
-
"name": "
|
|
3709
|
-
"
|
|
3962
|
+
"name": "AIProviderSwitcher",
|
|
3963
|
+
"module": "src/provider/ai-provider-switcher.ts"
|
|
3710
3964
|
}
|
|
3711
|
-
}
|
|
3965
|
+
}
|
|
3966
|
+
]
|
|
3967
|
+
},
|
|
3968
|
+
{
|
|
3969
|
+
"kind": "javascript-module",
|
|
3970
|
+
"path": "src/provider/assistant-app-settings.ts",
|
|
3971
|
+
"declarations": [
|
|
3972
|
+
{
|
|
3973
|
+
"kind": "variable",
|
|
3974
|
+
"name": "AssistantAppSettingsProvider",
|
|
3975
|
+
"description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
|
|
3976
|
+
}
|
|
3977
|
+
],
|
|
3978
|
+
"exports": [
|
|
3712
3979
|
{
|
|
3713
3980
|
"kind": "js",
|
|
3714
|
-
"name": "
|
|
3981
|
+
"name": "AssistantAppSettingsProvider",
|
|
3715
3982
|
"declaration": {
|
|
3716
|
-
"name": "
|
|
3717
|
-
"
|
|
3983
|
+
"name": "AssistantAppSettingsProvider",
|
|
3984
|
+
"module": "src/provider/assistant-app-settings.ts"
|
|
3718
3985
|
}
|
|
3719
3986
|
}
|
|
3720
3987
|
]
|
|
3721
3988
|
},
|
|
3722
|
-
{
|
|
3723
|
-
"kind": "javascript-module",
|
|
3724
|
-
"path": "src/config/validate-providers.ts",
|
|
3725
|
-
"declarations": [],
|
|
3726
|
-
"exports": []
|
|
3727
|
-
},
|
|
3728
3989
|
{
|
|
3729
3990
|
"kind": "javascript-module",
|
|
3730
3991
|
"path": "src/state/ai-assistant-slice.ts",
|
|
@@ -3971,6 +4232,14 @@
|
|
|
3971
4232
|
"module": "src/state/debug-event-log.ts"
|
|
3972
4233
|
}
|
|
3973
4234
|
},
|
|
4235
|
+
{
|
|
4236
|
+
"kind": "js",
|
|
4237
|
+
"name": "TurnFailureReason",
|
|
4238
|
+
"declaration": {
|
|
4239
|
+
"name": "TurnFailureReason",
|
|
4240
|
+
"module": "src/state/debug-event-log.ts"
|
|
4241
|
+
}
|
|
4242
|
+
},
|
|
3974
4243
|
{
|
|
3975
4244
|
"kind": "js",
|
|
3976
4245
|
"name": "recordTurnError",
|
|
@@ -6771,6 +7040,24 @@
|
|
|
6771
7040
|
"privacy": "private",
|
|
6772
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."
|
|
6773
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
|
+
},
|
|
6774
7061
|
{
|
|
6775
7062
|
"kind": "field",
|
|
6776
7063
|
"name": "activeOnUnresolvedTool",
|
|
@@ -6839,6 +7126,39 @@
|
|
|
6839
7126
|
"privacy": "private",
|
|
6840
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`."
|
|
6841
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
|
+
},
|
|
6842
7162
|
{
|
|
6843
7163
|
"kind": "method",
|
|
6844
7164
|
"name": "dispose",
|
|
@@ -6892,6 +7212,66 @@
|
|
|
6892
7212
|
},
|
|
6893
7213
|
"description": "Finish a turn whose signal aborted. A user cancel adds a subtle \"Stopped.\"\nmarker; a dispose-driven abort stops quietly (the widget is gone and the\ncached history would otherwise gain a stray marker on remount)."
|
|
6894
7214
|
},
|
|
7215
|
+
{
|
|
7216
|
+
"kind": "method",
|
|
7217
|
+
"name": "turnDone",
|
|
7218
|
+
"privacy": "private",
|
|
7219
|
+
"return": {
|
|
7220
|
+
"type": {
|
|
7221
|
+
"text": "ChatDriverResult"
|
|
7222
|
+
}
|
|
7223
|
+
},
|
|
7224
|
+
"parameters": [
|
|
7225
|
+
{
|
|
7226
|
+
"name": "failureReason",
|
|
7227
|
+
"optional": true,
|
|
7228
|
+
"type": {
|
|
7229
|
+
"text": "TurnFailureReason"
|
|
7230
|
+
}
|
|
7231
|
+
}
|
|
7232
|
+
],
|
|
7233
|
+
"description": "Build the `done` loop result, carrying the typed failure reason when the turn\nbailed (PTC-0). The discriminant stays `'done'` either way — the same value a\nclean turn returns — so consumers matching on `reason === 'done'` are unchanged;\n`failureReason` is simply present on a failure and absent on success. Omitted\n(rather than set to `undefined`) so a happy-path result stays byte-identical to\nthe historical `{ reason: 'done' }`."
|
|
7234
|
+
},
|
|
7235
|
+
{
|
|
7236
|
+
"kind": "method",
|
|
7237
|
+
"name": "failureReasonOf",
|
|
7238
|
+
"privacy": "private",
|
|
7239
|
+
"static": true,
|
|
7240
|
+
"return": {
|
|
7241
|
+
"type": {
|
|
7242
|
+
"text": "TurnFailureReason | undefined"
|
|
7243
|
+
}
|
|
7244
|
+
},
|
|
7245
|
+
"parameters": [
|
|
7246
|
+
{
|
|
7247
|
+
"name": "result",
|
|
7248
|
+
"type": {
|
|
7249
|
+
"text": "ChatDriverResult"
|
|
7250
|
+
}
|
|
7251
|
+
}
|
|
7252
|
+
],
|
|
7253
|
+
"description": "The typed failure reason on a loop result, or `undefined` for a clean turn / handoff."
|
|
7254
|
+
},
|
|
7255
|
+
{
|
|
7256
|
+
"kind": "method",
|
|
7257
|
+
"name": "loopEndDetail",
|
|
7258
|
+
"privacy": "private",
|
|
7259
|
+
"static": true,
|
|
7260
|
+
"return": {
|
|
7261
|
+
"type": {
|
|
7262
|
+
"text": "{ failureReason: TurnFailureReason } | undefined"
|
|
7263
|
+
}
|
|
7264
|
+
},
|
|
7265
|
+
"parameters": [
|
|
7266
|
+
{
|
|
7267
|
+
"name": "result",
|
|
7268
|
+
"type": {
|
|
7269
|
+
"text": "ChatDriverResult"
|
|
7270
|
+
}
|
|
7271
|
+
}
|
|
7272
|
+
],
|
|
7273
|
+
"description": "Build the `tool-loop-end` event detail for a turn's result. A failure carries a\n`{ failureReason }` detail; a clean turn emits `undefined` — the historical shape,\nkept byte-identical so subscribers see exactly what they always have."
|
|
7274
|
+
},
|
|
6895
7275
|
{
|
|
6896
7276
|
"kind": "method",
|
|
6897
7277
|
"name": "applyAgent",
|
|
@@ -8098,7 +8478,7 @@
|
|
|
8098
8478
|
},
|
|
8099
8479
|
"privacy": "private",
|
|
8100
8480
|
"readonly": true,
|
|
8101
|
-
"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 })"
|
|
8102
8482
|
},
|
|
8103
8483
|
{
|
|
8104
8484
|
"kind": "field",
|