@genesislcap/ai-assistant 14.436.0 → 14.437.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 +73 -47
- package/dist/ai-assistant.d.ts +26 -21
- package/dist/dts/components/chat-driver/chat-driver.d.ts +6 -3
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +4 -4
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/state/ai-assistant-slice.d.ts +12 -10
- package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
- package/dist/dts/state/session-store.d.ts +2 -2
- package/dist/esm/components/chat-driver/chat-driver.js +21 -5
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +6 -0
- package/dist/esm/main/main.js +29 -8
- package/dist/esm/state/ai-assistant-slice.js +5 -5
- package/package.json +16 -16
- package/src/components/chat-driver/chat-driver.ts +45 -10
- package/src/components/orchestrating-driver/orchestrating-driver.ts +10 -0
- package/src/main/main.ts +29 -8
- package/src/state/ai-assistant-slice.ts +15 -15
|
@@ -3100,7 +3100,7 @@
|
|
|
3100
3100
|
{
|
|
3101
3101
|
"kind": "Method",
|
|
3102
3102
|
"canonicalReference": "@genesislcap/ai-assistant!ChatDriver#requestInteraction:member(1)",
|
|
3103
|
-
"docComment": "/**\n * Request a custom UI interaction. Emits a new message with the interaction. Tool handlers can call this to pause execution until the user completes the UI interaction.\n *\n * If a host requester is wired (sub-agent case), the call delegates upward so the interaction lives on the parent — the main UI is only listening to the root driver. Only one interaction may be in flight at any time on a given root: concurrent calls (e.g. two parallel sub-agents both spawning a widget) throw. Parallel sub-agents are for parallel work, not for user interaction, which is inherently sequential.\n *\n * @param componentName - The custom element name to render.\n *\n * @param data - Data to pass to the component.\n */\n",
|
|
3103
|
+
"docComment": "/**\n * Request a custom UI interaction. Emits a new message with the interaction. Tool handlers can call this to pause execution until the user completes the UI interaction.\n *\n * If a host requester is wired (sub-agent case), the call delegates upward so the interaction lives on the parent — the main UI is only listening to the root driver. Only one interaction may be in flight at any time on a given root: concurrent calls (e.g. two parallel sub-agents both spawning a widget) throw. Parallel sub-agents are for parallel work, not for user interaction, which is inherently sequential.\n *\n * @param componentName - The custom element name to render.\n *\n * @param data - Data to pass to the component.\n *\n * @param options - Optional per-call overrides, including `chatInputDuringExecution` to hide or disable the main chat input while the widget is awaiting user input. Reverts when the interaction resolves.\n */\n",
|
|
3104
3104
|
"excerptTokens": [
|
|
3105
3105
|
{
|
|
3106
3106
|
"kind": "Content",
|
|
@@ -3118,6 +3118,15 @@
|
|
|
3118
3118
|
"kind": "Content",
|
|
3119
3119
|
"text": "any"
|
|
3120
3120
|
},
|
|
3121
|
+
{
|
|
3122
|
+
"kind": "Content",
|
|
3123
|
+
"text": ", options?: "
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
"kind": "Reference",
|
|
3127
|
+
"text": "InteractionRequestOptions",
|
|
3128
|
+
"canonicalReference": "@genesislcap/foundation-ai!InteractionRequestOptions:interface"
|
|
3129
|
+
},
|
|
3121
3130
|
{
|
|
3122
3131
|
"kind": "Content",
|
|
3123
3132
|
"text": "): "
|
|
@@ -3151,8 +3160,8 @@
|
|
|
3151
3160
|
],
|
|
3152
3161
|
"isStatic": false,
|
|
3153
3162
|
"returnTypeTokenRange": {
|
|
3154
|
-
"startIndex":
|
|
3155
|
-
"endIndex":
|
|
3163
|
+
"startIndex": 7,
|
|
3164
|
+
"endIndex": 9
|
|
3156
3165
|
},
|
|
3157
3166
|
"releaseTag": "Beta",
|
|
3158
3167
|
"isProtected": false,
|
|
@@ -3173,6 +3182,14 @@
|
|
|
3173
3182
|
"endIndex": 4
|
|
3174
3183
|
},
|
|
3175
3184
|
"isOptional": false
|
|
3185
|
+
},
|
|
3186
|
+
{
|
|
3187
|
+
"parameterName": "options",
|
|
3188
|
+
"parameterTypeTokenRange": {
|
|
3189
|
+
"startIndex": 5,
|
|
3190
|
+
"endIndex": 6
|
|
3191
|
+
},
|
|
3192
|
+
"isOptional": true
|
|
3176
3193
|
}
|
|
3177
3194
|
],
|
|
3178
3195
|
"isOptional": false,
|
|
@@ -3337,7 +3354,16 @@
|
|
|
3337
3354
|
},
|
|
3338
3355
|
{
|
|
3339
3356
|
"kind": "Content",
|
|
3340
|
-
"text": "<T>(componentName: string, data: any
|
|
3357
|
+
"text": "<T>(componentName: string, data: any, options?: "
|
|
3358
|
+
},
|
|
3359
|
+
{
|
|
3360
|
+
"kind": "Reference",
|
|
3361
|
+
"text": "InteractionRequestOptions",
|
|
3362
|
+
"canonicalReference": "@genesislcap/foundation-ai!InteractionRequestOptions:interface"
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
"kind": "Content",
|
|
3366
|
+
"text": ") => "
|
|
3341
3367
|
},
|
|
3342
3368
|
{
|
|
3343
3369
|
"kind": "Reference",
|
|
@@ -3363,8 +3389,8 @@
|
|
|
3363
3389
|
],
|
|
3364
3390
|
"isStatic": false,
|
|
3365
3391
|
"returnTypeTokenRange": {
|
|
3366
|
-
"startIndex":
|
|
3367
|
-
"endIndex":
|
|
3392
|
+
"startIndex": 7,
|
|
3393
|
+
"endIndex": 8
|
|
3368
3394
|
},
|
|
3369
3395
|
"releaseTag": "Beta",
|
|
3370
3396
|
"isProtected": false,
|
|
@@ -3374,7 +3400,7 @@
|
|
|
3374
3400
|
"parameterName": "fn",
|
|
3375
3401
|
"parameterTypeTokenRange": {
|
|
3376
3402
|
"startIndex": 1,
|
|
3377
|
-
"endIndex":
|
|
3403
|
+
"endIndex": 6
|
|
3378
3404
|
},
|
|
3379
3405
|
"isOptional": false
|
|
3380
3406
|
}
|
|
@@ -4563,7 +4589,7 @@
|
|
|
4563
4589
|
{
|
|
4564
4590
|
"kind": "Property",
|
|
4565
4591
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#effectiveChatInputDuringExecution:member",
|
|
4566
|
-
"docComment": "/**\n * Resolves the effective chat-input behaviour while the assistant is executing.
|
|
4592
|
+
"docComment": "/**\n * Resolves the effective chat-input behaviour while the assistant is executing. Per-call overrides take precedence over the agent-level config; among overrides the most restrictive wins (`'hidden'` > `'disabled'`). Falls back to the active agent's config, then `'disabled'`.\n */\n",
|
|
4567
4593
|
"excerptTokens": [
|
|
4568
4594
|
{
|
|
4569
4595
|
"kind": "Content",
|
|
@@ -5129,6 +5155,45 @@
|
|
|
5129
5155
|
"isProtected": false,
|
|
5130
5156
|
"isAbstract": false
|
|
5131
5157
|
},
|
|
5158
|
+
{
|
|
5159
|
+
"kind": "Property",
|
|
5160
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#inputOverrides:member",
|
|
5161
|
+
"docComment": "/**\n * In-flight per-call chat-input overrides pushed by `requestSubAgent` or `requestInteraction` calls. Empty means no override is active.\n */\n",
|
|
5162
|
+
"excerptTokens": [
|
|
5163
|
+
{
|
|
5164
|
+
"kind": "Content",
|
|
5165
|
+
"text": "get inputOverrides(): "
|
|
5166
|
+
},
|
|
5167
|
+
{
|
|
5168
|
+
"kind": "Content",
|
|
5169
|
+
"text": "import(\"../state/ai-assistant-slice\")."
|
|
5170
|
+
},
|
|
5171
|
+
{
|
|
5172
|
+
"kind": "Reference",
|
|
5173
|
+
"text": "InputOverride",
|
|
5174
|
+
"canonicalReference": "@genesislcap/ai-assistant!~InputOverride:interface"
|
|
5175
|
+
},
|
|
5176
|
+
{
|
|
5177
|
+
"kind": "Content",
|
|
5178
|
+
"text": "[]"
|
|
5179
|
+
},
|
|
5180
|
+
{
|
|
5181
|
+
"kind": "Content",
|
|
5182
|
+
"text": ";"
|
|
5183
|
+
}
|
|
5184
|
+
],
|
|
5185
|
+
"isReadonly": true,
|
|
5186
|
+
"isOptional": false,
|
|
5187
|
+
"releaseTag": "Beta",
|
|
5188
|
+
"name": "inputOverrides",
|
|
5189
|
+
"propertyTypeTokenRange": {
|
|
5190
|
+
"startIndex": 1,
|
|
5191
|
+
"endIndex": 4
|
|
5192
|
+
},
|
|
5193
|
+
"isStatic": false,
|
|
5194
|
+
"isProtected": false,
|
|
5195
|
+
"isAbstract": false
|
|
5196
|
+
},
|
|
5132
5197
|
{
|
|
5133
5198
|
"kind": "Property",
|
|
5134
5199
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#inputValue:member",
|
|
@@ -6125,45 +6190,6 @@
|
|
|
6125
6190
|
"isProtected": false,
|
|
6126
6191
|
"isAbstract": false
|
|
6127
6192
|
},
|
|
6128
|
-
{
|
|
6129
|
-
"kind": "Property",
|
|
6130
|
-
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#subAgentInputOverrides:member",
|
|
6131
|
-
"docComment": "/**\n * In-flight per-call chat-input overrides pushed by `requestSubAgent` invocations. Empty means no override is active.\n */\n",
|
|
6132
|
-
"excerptTokens": [
|
|
6133
|
-
{
|
|
6134
|
-
"kind": "Content",
|
|
6135
|
-
"text": "get subAgentInputOverrides(): "
|
|
6136
|
-
},
|
|
6137
|
-
{
|
|
6138
|
-
"kind": "Content",
|
|
6139
|
-
"text": "import(\"../state/ai-assistant-slice\")."
|
|
6140
|
-
},
|
|
6141
|
-
{
|
|
6142
|
-
"kind": "Reference",
|
|
6143
|
-
"text": "SubAgentInputOverride",
|
|
6144
|
-
"canonicalReference": "@genesislcap/ai-assistant!~SubAgentInputOverride:interface"
|
|
6145
|
-
},
|
|
6146
|
-
{
|
|
6147
|
-
"kind": "Content",
|
|
6148
|
-
"text": "[]"
|
|
6149
|
-
},
|
|
6150
|
-
{
|
|
6151
|
-
"kind": "Content",
|
|
6152
|
-
"text": ";"
|
|
6153
|
-
}
|
|
6154
|
-
],
|
|
6155
|
-
"isReadonly": true,
|
|
6156
|
-
"isOptional": false,
|
|
6157
|
-
"releaseTag": "Beta",
|
|
6158
|
-
"name": "subAgentInputOverrides",
|
|
6159
|
-
"propertyTypeTokenRange": {
|
|
6160
|
-
"startIndex": 1,
|
|
6161
|
-
"endIndex": 4
|
|
6162
|
-
},
|
|
6163
|
-
"isStatic": false,
|
|
6164
|
-
"isProtected": false,
|
|
6165
|
-
"isAbstract": false
|
|
6166
|
-
},
|
|
6167
6193
|
{
|
|
6168
6194
|
"kind": "Property",
|
|
6169
6195
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#suggestionsState:member",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { ChatMessage } from '@genesislcap/foundation-ai';
|
|
|
8
8
|
import type { ChatToolDefinition } from '@genesislcap/foundation-ai';
|
|
9
9
|
import type { ChatToolHandlers } from '@genesislcap/foundation-ai';
|
|
10
10
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
11
|
+
import type { InteractionRequestOptions } from '@genesislcap/foundation-ai';
|
|
11
12
|
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
12
13
|
import { ViewTemplate } from '@genesislcap/web-core';
|
|
13
14
|
|
|
@@ -586,7 +587,7 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
586
587
|
* resolves through) the parent's history and pending map. Calls chain
|
|
587
588
|
* naturally: a grandchild → child → root.
|
|
588
589
|
*/
|
|
589
|
-
setHostInteractionRequester(fn: <T>(componentName: string, data: any) => Promise<T>): void;
|
|
590
|
+
setHostInteractionRequester(fn: <T>(componentName: string, data: any, options?: InteractionRequestOptions) => Promise<T>): void;
|
|
590
591
|
/**
|
|
591
592
|
* Request a custom UI interaction. Emits a new message with the interaction.
|
|
592
593
|
* Tool handlers can call this to pause execution until the user completes the UI interaction.
|
|
@@ -600,8 +601,11 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
600
601
|
*
|
|
601
602
|
* @param componentName - The custom element name to render.
|
|
602
603
|
* @param data - Data to pass to the component.
|
|
604
|
+
* @param options - Optional per-call overrides, including
|
|
605
|
+
* `chatInputDuringExecution` to hide or disable the main chat input while
|
|
606
|
+
* the widget is awaiting user input. Reverts when the interaction resolves.
|
|
603
607
|
*/
|
|
604
|
-
requestInteraction<T>(componentName: string, data: any): Promise<T>;
|
|
608
|
+
requestInteraction<T>(componentName: string, data: any, options?: InteractionRequestOptions): Promise<T>;
|
|
605
609
|
/**
|
|
606
610
|
* Resolve a pending interaction. The wrapper component calls this on completion.
|
|
607
611
|
* Marks the interaction message as resolved so it renders read-only on re-render.
|
|
@@ -891,13 +895,13 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
891
895
|
get liveSubAgentName(): string | null;
|
|
892
896
|
set liveSubAgentName(value: string | null);
|
|
893
897
|
/**
|
|
894
|
-
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
895
|
-
*
|
|
898
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent` or
|
|
899
|
+
* `requestInteraction` calls. Empty means no override is active.
|
|
896
900
|
*/
|
|
897
|
-
get
|
|
901
|
+
get inputOverrides(): InputOverride[];
|
|
898
902
|
/**
|
|
899
903
|
* Resolves the effective chat-input behaviour while the assistant is
|
|
900
|
-
* executing.
|
|
904
|
+
* executing. Per-call overrides take precedence over the agent-level
|
|
901
905
|
* config; among overrides the most restrictive wins (`'hidden'` >
|
|
902
906
|
* `'disabled'`). Falls back to the active agent's config, then `'disabled'`.
|
|
903
907
|
*/
|
|
@@ -1197,6 +1201,22 @@ export declare const friendlyFallbackAgent: FallbackAgentConfig;
|
|
|
1197
1201
|
*/
|
|
1198
1202
|
export declare function getAiPopoutManager(): FoundationAiPopoutManager | undefined;
|
|
1199
1203
|
|
|
1204
|
+
/**
|
|
1205
|
+
* A single in-flight per-call chat-input override pushed by a `requestSubAgent`
|
|
1206
|
+
* or `requestInteraction` call. Tracked as an array (not a counter) so the
|
|
1207
|
+
* slice can survive pop-in/pop-out and so a listener that connects
|
|
1208
|
+
* mid-execution can compute the effective mode without having seen the start
|
|
1209
|
+
* event.
|
|
1210
|
+
*
|
|
1211
|
+
* @internal
|
|
1212
|
+
*/
|
|
1213
|
+
declare interface InputOverride {
|
|
1214
|
+
/** Unique per-invocation id, paired with the start/stop events. */
|
|
1215
|
+
id: string;
|
|
1216
|
+
/** The mode requested for this invocation. */
|
|
1217
|
+
mode: ChatInputDuringExecutionMode;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1200
1220
|
/**
|
|
1201
1221
|
* Opts an agent in to manual selection from the assistant's agent picker.
|
|
1202
1222
|
*
|
|
@@ -1428,21 +1448,6 @@ export declare interface StatefulAgentInit<S> {
|
|
|
1428
1448
|
*/
|
|
1429
1449
|
export declare const strictFallbackAgent: FallbackAgentConfig;
|
|
1430
1450
|
|
|
1431
|
-
/**
|
|
1432
|
-
* A single in-flight per-call chat-input override pushed by a `requestSubAgent`
|
|
1433
|
-
* invocation. Tracked as an array (not a counter) so the slice can survive
|
|
1434
|
-
* pop-in/pop-out and so a listener that connects mid-execution can compute the
|
|
1435
|
-
* effective mode without having seen the start event.
|
|
1436
|
-
*
|
|
1437
|
-
* @internal
|
|
1438
|
-
*/
|
|
1439
|
-
declare interface SubAgentInputOverride {
|
|
1440
|
-
/** Unique per-invocation id, paired with the start/stop events. */
|
|
1441
|
-
id: string;
|
|
1442
|
-
/** The mode requested for this invocation. */
|
|
1443
|
-
mode: ChatInputDuringExecutionMode;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
1451
|
/**
|
|
1447
1452
|
* State of the chat suggestions feature.
|
|
1448
1453
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AIProvider, ChatAttachment, ChatDriverResult, ChatMessage, ChatToolHandlers } from '@genesislcap/foundation-ai';
|
|
1
|
+
import type { AIProvider, ChatAttachment, ChatDriverResult, ChatMessage, ChatToolHandlers, InteractionRequestOptions } from '@genesislcap/foundation-ai';
|
|
2
2
|
import type { AgentConfig, SystemPromptInput, ToolDefinitionsInput } from '../../config/config';
|
|
3
3
|
import type { AiDriver, AllAgentSummary } from '../ai-driver/ai-driver';
|
|
4
4
|
/** Name reserved for the cross-agent handoff tool — injected by OrchestratingDriver. */
|
|
@@ -164,7 +164,7 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
164
164
|
* resolves through) the parent's history and pending map. Calls chain
|
|
165
165
|
* naturally: a grandchild → child → root.
|
|
166
166
|
*/
|
|
167
|
-
setHostInteractionRequester(fn: <T>(componentName: string, data: any) => Promise<T>): void;
|
|
167
|
+
setHostInteractionRequester(fn: <T>(componentName: string, data: any, options?: InteractionRequestOptions) => Promise<T>): void;
|
|
168
168
|
/**
|
|
169
169
|
* Request a custom UI interaction. Emits a new message with the interaction.
|
|
170
170
|
* Tool handlers can call this to pause execution until the user completes the UI interaction.
|
|
@@ -178,8 +178,11 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
178
178
|
*
|
|
179
179
|
* @param componentName - The custom element name to render.
|
|
180
180
|
* @param data - Data to pass to the component.
|
|
181
|
+
* @param options - Optional per-call overrides, including
|
|
182
|
+
* `chatInputDuringExecution` to hide or disable the main chat input while
|
|
183
|
+
* the widget is awaiting user input. Reverts when the interaction resolves.
|
|
181
184
|
*/
|
|
182
|
-
requestInteraction<T>(componentName: string, data: any): Promise<T>;
|
|
185
|
+
requestInteraction<T>(componentName: string, data: any, options?: InteractionRequestOptions): Promise<T>;
|
|
183
186
|
/**
|
|
184
187
|
* Resolve a pending interaction. The wrapper component calls this on completion.
|
|
185
188
|
* Marks the interaction message as resolved so it renders read-only on re-render.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,WAAW,EAIX,gBAAgB,
|
|
1
|
+
{"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,gBA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W,CAAC;gBAGP,UAAU,EAAE,UAAU,EACtB,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,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,WAAW,EAKZ,MAAM,qBAAqB,CAAC;AAG7B,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;IAkBpE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAlBzB,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;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC;;;OAGG;IACH,OAAO,C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CAAC;YAiBhB,QAAQ;IA+FtB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,mBAAmB;CAO5B"}
|
package/dist/dts/main/main.d.ts
CHANGED
|
@@ -93,13 +93,13 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
93
93
|
get liveSubAgentName(): string | null;
|
|
94
94
|
set liveSubAgentName(value: string | null);
|
|
95
95
|
/**
|
|
96
|
-
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
97
|
-
*
|
|
96
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent` or
|
|
97
|
+
* `requestInteraction` calls. Empty means no override is active.
|
|
98
98
|
*/
|
|
99
|
-
get
|
|
99
|
+
get inputOverrides(): import("../state/ai-assistant-slice").InputOverride[];
|
|
100
100
|
/**
|
|
101
101
|
* Resolves the effective chat-input behaviour while the assistant is
|
|
102
|
-
* executing.
|
|
102
|
+
* executing. Per-call overrides take precedence over the agent-level
|
|
103
103
|
* config; among overrides the most restrictive wins (`'hidden'` >
|
|
104
104
|
* `'disabled'`). Falls back to the active agent's config, then `'disabled'`.
|
|
105
105
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,4BAA4B,EAC5B,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAGL,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAW/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgBpD,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAqEtB;;;;;;;;;;;;;GAaG;AACH,qBAOa,qBAAsB,SAAQ,cA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,eAAe;IAIf,qBAAqB,CAAC,UAAU,EAAE,MAAM;YAK1B,gBAAgB;YA4DhB,IAAI;IAwClB,qBAAqB,CAAC,CAAC,EAAE,UAAU;IAYnC,0BAA0B,CAAC,CAAC,EAAE,KAAK;CAQpC"}
|
|
@@ -4,13 +4,14 @@ import type { AgentConfig } from '../config/config';
|
|
|
4
4
|
import type { AiAssistantAnimation, AiAssistantState, SuggestionsState } from '../main/main.types';
|
|
5
5
|
/**
|
|
6
6
|
* A single in-flight per-call chat-input override pushed by a `requestSubAgent`
|
|
7
|
-
*
|
|
8
|
-
* pop-in/pop-out and so a listener that connects
|
|
9
|
-
* effective mode without having seen the start
|
|
7
|
+
* or `requestInteraction` call. Tracked as an array (not a counter) so the
|
|
8
|
+
* slice can survive pop-in/pop-out and so a listener that connects
|
|
9
|
+
* mid-execution can compute the effective mode without having seen the start
|
|
10
|
+
* event.
|
|
10
11
|
*
|
|
11
12
|
* @internal
|
|
12
13
|
*/
|
|
13
|
-
export interface
|
|
14
|
+
export interface InputOverride {
|
|
14
15
|
/** Unique per-invocation id, paired with the start/stop events. */
|
|
15
16
|
id: string;
|
|
16
17
|
/** The mode requested for this invocation. */
|
|
@@ -51,11 +52,12 @@ export interface AiAssistantSessionState {
|
|
|
51
52
|
/** Name of the currently-executing sub-agent, or null when idle. */
|
|
52
53
|
liveSubAgentName: string | null;
|
|
53
54
|
/**
|
|
54
|
-
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
55
|
-
* The most restrictive entry (`'hidden'` >
|
|
56
|
-
* means the agent-level
|
|
55
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent` or
|
|
56
|
+
* `requestInteraction` calls. The most restrictive entry (`'hidden'` >
|
|
57
|
+
* `'disabled'`) wins; an empty list means the agent-level
|
|
58
|
+
* `chatInputDuringExecution` applies.
|
|
57
59
|
*/
|
|
58
|
-
|
|
60
|
+
inputOverrides: InputOverride[];
|
|
59
61
|
}
|
|
60
62
|
export declare const defaultSessionState: AiAssistantSessionState;
|
|
61
63
|
export declare const aiAssistantSlice: import("@reduxjs/toolkit").Slice<AiAssistantSessionState, {
|
|
@@ -74,8 +76,8 @@ export declare const aiAssistantSlice: import("@reduxjs/toolkit").Slice<AiAssist
|
|
|
74
76
|
setInputValue(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string>): void;
|
|
75
77
|
setLiveSubAgentTrace(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<ChatMessage[]>): void;
|
|
76
78
|
setLiveSubAgentName(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string | null>): void;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
addInputOverride(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<InputOverride>): void;
|
|
80
|
+
removeInputOverride(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<{
|
|
79
81
|
id: string;
|
|
80
82
|
}>): void;
|
|
81
83
|
}, "aiAssistant", "aiAssistant", {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-assistant-slice.d.ts","sourceRoot":"","sources":["../../../src/state/ai-assistant-slice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEnG
|
|
1
|
+
{"version":3,"file":"ai-assistant-slice.d.ts","sourceRoot":"","sources":["../../../src/state/ai-assistant-slice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,KAAK,EAAE,aAAa,EAAE,MA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AO,CAAC;gGAGlB,aAAa,CAAC,OAAO,CAAC;uGAGf,aAAa,CAAC,OAAO,CAAC;gGAG7B,aAAa,CAAC,oBAAoB,EAAE,CAAC;+FAGtC,aAAa,CAAC,gBAAgB,CAAC;4FAGlC,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC;2FAGlC,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC;0FAGlC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC;8FAGxD,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;8FAG5B,aAAa,CAAC,OAAO,CAAC;yFAG3B,aAAa,CAAC,MAAM,CAAC;gGAGd,aAAa,CAAC,WAAW,EAAE,CAAC;+FAG7B,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;4FAG/B,aAAa,CAAC,aAAa,CAAC;+FAGzB,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;oCAKlE,CAAC"}
|
|
@@ -16,8 +16,8 @@ declare function makeStore(devTools: boolean | undefined): import("@genesislcap/
|
|
|
16
16
|
setInputValue(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string>): void;
|
|
17
17
|
setLiveSubAgentTrace(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<import("@genesislcap/foundation-ai").ChatMessage[]>): void;
|
|
18
18
|
setLiveSubAgentName(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string | null>): void;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
addInputOverride(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<import("./ai-assistant-slice").InputOverride>): void;
|
|
20
|
+
removeInputOverride(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<{
|
|
21
21
|
id: string;
|
|
22
22
|
}>): void;
|
|
23
23
|
}, "aiAssistant", "aiAssistant", {}>[]>;
|
|
@@ -272,11 +272,14 @@ export class ChatDriver extends EventTarget {
|
|
|
272
272
|
*
|
|
273
273
|
* @param componentName - The custom element name to render.
|
|
274
274
|
* @param data - Data to pass to the component.
|
|
275
|
+
* @param options - Optional per-call overrides, including
|
|
276
|
+
* `chatInputDuringExecution` to hide or disable the main chat input while
|
|
277
|
+
* the widget is awaiting user input. Reverts when the interaction resolves.
|
|
275
278
|
*/
|
|
276
|
-
requestInteraction(componentName, data) {
|
|
279
|
+
requestInteraction(componentName, data, options) {
|
|
277
280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
278
281
|
if (this.hostInteractionRequester) {
|
|
279
|
-
return this.hostInteractionRequester(componentName, data);
|
|
282
|
+
return this.hostInteractionRequester(componentName, data, options);
|
|
280
283
|
}
|
|
281
284
|
if (this.pendingInteractions.size > 0) {
|
|
282
285
|
throw new Error('requestInteraction: another user interaction is already in flight. ' +
|
|
@@ -284,8 +287,18 @@ export class ChatDriver extends EventTarget {
|
|
|
284
287
|
'rather than spawning widgets from parallel sub-agents or parallel tool calls.');
|
|
285
288
|
}
|
|
286
289
|
const interactionId = crypto.randomUUID();
|
|
290
|
+
const chatInputDuringExecution = options === null || options === void 0 ? void 0 : options.chatInputDuringExecution;
|
|
287
291
|
return new Promise((resolve, reject) => {
|
|
288
|
-
this.pendingInteractions.set(interactionId, {
|
|
292
|
+
this.pendingInteractions.set(interactionId, {
|
|
293
|
+
resolve,
|
|
294
|
+
reject,
|
|
295
|
+
overrideId: chatInputDuringExecution ? interactionId : undefined,
|
|
296
|
+
});
|
|
297
|
+
if (chatInputDuringExecution) {
|
|
298
|
+
this.dispatchEvent(new CustomEvent('interaction-start', {
|
|
299
|
+
detail: { interactionId, chatInputDuringExecution },
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
289
302
|
this.appendToHistory({
|
|
290
303
|
role: 'assistant',
|
|
291
304
|
content: '',
|
|
@@ -308,6 +321,9 @@ export class ChatDriver extends EventTarget {
|
|
|
308
321
|
detail: this.history,
|
|
309
322
|
}));
|
|
310
323
|
}
|
|
324
|
+
if (interaction.overrideId) {
|
|
325
|
+
this.dispatchEvent(new CustomEvent('interaction-stop', { detail: { interactionId } }));
|
|
326
|
+
}
|
|
311
327
|
interaction.resolve(result);
|
|
312
328
|
this.pendingInteractions.delete(interactionId);
|
|
313
329
|
}
|
|
@@ -360,7 +376,7 @@ export class ChatDriver extends EventTarget {
|
|
|
360
376
|
* so parallel tool calls each capture their own trace independently.
|
|
361
377
|
*/
|
|
362
378
|
buildHandlerContext(traceCapture) {
|
|
363
|
-
return Object.assign(Object.assign({ requestInteraction: (componentName, data) => this.requestInteraction(componentName, data) }, (this.subAgentsMap.size > 0 && {
|
|
379
|
+
return Object.assign(Object.assign({ requestInteraction: (componentName, data, options) => this.requestInteraction(componentName, data, options) }, (this.subAgentsMap.size > 0 && {
|
|
364
380
|
requestSubAgent: (name, options) => this.invokeSubAgent(name, options).then(({ result, trace }) => {
|
|
365
381
|
if (traceCapture)
|
|
366
382
|
traceCapture.trace = trace;
|
|
@@ -419,7 +435,7 @@ export class ChatDriver extends EventTarget {
|
|
|
419
435
|
// parent's (ultimately the root's) history and resolve via the same
|
|
420
436
|
// pending map the main UI is wired to. Recurses naturally for nested
|
|
421
437
|
// sub-agents.
|
|
422
|
-
child.setHostInteractionRequester((componentName, data) => this.requestInteraction(componentName, data));
|
|
438
|
+
child.setHostInteractionRequester((componentName, data, opts) => this.requestInteraction(componentName, data, opts));
|
|
423
439
|
const forwardTrace = (e) => {
|
|
424
440
|
this.dispatchEvent(new CustomEvent('sub-agent-history-updated', {
|
|
425
441
|
detail: { agentName: subConfig.name, history: e.detail },
|
|
@@ -90,6 +90,12 @@ export class OrchestratingDriver extends EventTarget {
|
|
|
90
90
|
this.chatDriver.addEventListener('sub-agent-stop', (e) => {
|
|
91
91
|
this.dispatchEvent(new CustomEvent('sub-agent-stop', { detail: e.detail }));
|
|
92
92
|
});
|
|
93
|
+
this.chatDriver.addEventListener('interaction-start', (e) => {
|
|
94
|
+
this.dispatchEvent(new CustomEvent('interaction-start', { detail: e.detail }));
|
|
95
|
+
});
|
|
96
|
+
this.chatDriver.addEventListener('interaction-stop', (e) => {
|
|
97
|
+
this.dispatchEvent(new CustomEvent('interaction-stop', { detail: e.detail }));
|
|
98
|
+
});
|
|
93
99
|
}
|
|
94
100
|
resolveInteraction(interactionId, result) {
|
|
95
101
|
this.chatDriver.resolveInteraction(interactionId, result);
|
package/dist/esm/main/main.js
CHANGED
|
@@ -300,22 +300,22 @@ let FoundationAiAssistant = FoundationAiAssistant_1 = class FoundationAiAssistan
|
|
|
300
300
|
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.setLiveSubAgentName(value);
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
303
|
-
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
304
|
-
*
|
|
303
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent` or
|
|
304
|
+
* `requestInteraction` calls. Empty means no override is active.
|
|
305
305
|
*/
|
|
306
|
-
get
|
|
306
|
+
get inputOverrides() {
|
|
307
307
|
var _a, _b;
|
|
308
|
-
return (_b = (_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.store.aiAssistant.
|
|
308
|
+
return (_b = (_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.store.aiAssistant.inputOverrides) !== null && _b !== void 0 ? _b : [];
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
311
311
|
* Resolves the effective chat-input behaviour while the assistant is
|
|
312
|
-
* executing.
|
|
312
|
+
* executing. Per-call overrides take precedence over the agent-level
|
|
313
313
|
* config; among overrides the most restrictive wins (`'hidden'` >
|
|
314
314
|
* `'disabled'`). Falls back to the active agent's config, then `'disabled'`.
|
|
315
315
|
*/
|
|
316
316
|
get effectiveChatInputDuringExecution() {
|
|
317
317
|
var _a, _b;
|
|
318
|
-
const overrides = this.
|
|
318
|
+
const overrides = this.inputOverrides;
|
|
319
319
|
if (overrides.some((o) => o.mode === 'hidden'))
|
|
320
320
|
return 'hidden';
|
|
321
321
|
if (overrides.some((o) => o.mode === 'disabled'))
|
|
@@ -570,7 +570,7 @@ let FoundationAiAssistant = FoundationAiAssistant_1 = class FoundationAiAssistan
|
|
|
570
570
|
const { invocationId, chatInputDuringExecution } = e.detail;
|
|
571
571
|
if (!chatInputDuringExecution)
|
|
572
572
|
return;
|
|
573
|
-
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.
|
|
573
|
+
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.addInputOverride({
|
|
574
574
|
id: invocationId,
|
|
575
575
|
mode: chatInputDuringExecution,
|
|
576
576
|
});
|
|
@@ -581,17 +581,38 @@ let FoundationAiAssistant = FoundationAiAssistant_1 = class FoundationAiAssistan
|
|
|
581
581
|
this.liveSubAgentName = null;
|
|
582
582
|
const { invocationId } = e.detail;
|
|
583
583
|
if (invocationId) {
|
|
584
|
-
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.
|
|
584
|
+
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.removeInputOverride({ id: invocationId });
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
const onInteractionStart = (e) => {
|
|
588
|
+
var _a;
|
|
589
|
+
const { interactionId, chatInputDuringExecution } = e.detail;
|
|
590
|
+
if (!chatInputDuringExecution)
|
|
591
|
+
return;
|
|
592
|
+
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.addInputOverride({
|
|
593
|
+
id: interactionId,
|
|
594
|
+
mode: chatInputDuringExecution,
|
|
595
|
+
});
|
|
596
|
+
};
|
|
597
|
+
const onInteractionStop = (e) => {
|
|
598
|
+
var _a;
|
|
599
|
+
const { interactionId } = e.detail;
|
|
600
|
+
if (interactionId) {
|
|
601
|
+
(_a = this._sessionRef) === null || _a === void 0 ? void 0 : _a.actions.aiAssistant.removeInputOverride({ id: interactionId });
|
|
585
602
|
}
|
|
586
603
|
};
|
|
587
604
|
driver.addEventListener('sub-agent-history-updated', onSubAgentHistoryUpdated);
|
|
588
605
|
driver.addEventListener('sub-agent-start', onSubAgentStart);
|
|
589
606
|
driver.addEventListener('sub-agent-stop', onSubAgentStop);
|
|
607
|
+
driver.addEventListener('interaction-start', onInteractionStart);
|
|
608
|
+
driver.addEventListener('interaction-stop', onInteractionStop);
|
|
590
609
|
const cleanups = [
|
|
591
610
|
() => driver.removeEventListener('history-updated', onHistoryUpdated),
|
|
592
611
|
() => driver.removeEventListener('sub-agent-history-updated', onSubAgentHistoryUpdated),
|
|
593
612
|
() => driver.removeEventListener('sub-agent-start', onSubAgentStart),
|
|
594
613
|
() => driver.removeEventListener('sub-agent-stop', onSubAgentStop),
|
|
614
|
+
() => driver.removeEventListener('interaction-start', onInteractionStart),
|
|
615
|
+
() => driver.removeEventListener('interaction-stop', onInteractionStop),
|
|
595
616
|
];
|
|
596
617
|
if (driver instanceof OrchestratingDriver) {
|
|
597
618
|
// Restore any pinned agent from the session store onto the freshly built
|
|
@@ -15,7 +15,7 @@ export const defaultSessionState = {
|
|
|
15
15
|
inputValue: '',
|
|
16
16
|
liveSubAgentTrace: [],
|
|
17
17
|
liveSubAgentName: null,
|
|
18
|
-
|
|
18
|
+
inputOverrides: [],
|
|
19
19
|
};
|
|
20
20
|
export const aiAssistantSlice = createSlice({
|
|
21
21
|
name: 'aiAssistant',
|
|
@@ -66,11 +66,11 @@ export const aiAssistantSlice = createSlice({
|
|
|
66
66
|
setLiveSubAgentName(state, action) {
|
|
67
67
|
state.liveSubAgentName = action.payload;
|
|
68
68
|
},
|
|
69
|
-
|
|
70
|
-
state.
|
|
69
|
+
addInputOverride(state, action) {
|
|
70
|
+
state.inputOverrides.push(action.payload);
|
|
71
71
|
},
|
|
72
|
-
|
|
73
|
-
state.
|
|
72
|
+
removeInputOverride(state, action) {
|
|
73
|
+
state.inputOverrides = state.inputOverrides.filter((o) => o.id !== action.payload.id);
|
|
74
74
|
},
|
|
75
75
|
},
|
|
76
76
|
selectors: {},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.437.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/ai-assistant.d.ts",
|
|
@@ -64,24 +64,24 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@genesislcap/foundation-testing": "14.
|
|
68
|
-
"@genesislcap/genx": "14.
|
|
69
|
-
"@genesislcap/rollup-builder": "14.
|
|
70
|
-
"@genesislcap/ts-builder": "14.
|
|
71
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
72
|
-
"@genesislcap/vite-builder": "14.
|
|
73
|
-
"@genesislcap/webpack-builder": "14.
|
|
67
|
+
"@genesislcap/foundation-testing": "14.437.0",
|
|
68
|
+
"@genesislcap/genx": "14.437.0",
|
|
69
|
+
"@genesislcap/rollup-builder": "14.437.0",
|
|
70
|
+
"@genesislcap/ts-builder": "14.437.0",
|
|
71
|
+
"@genesislcap/uvu-playwright-builder": "14.437.0",
|
|
72
|
+
"@genesislcap/vite-builder": "14.437.0",
|
|
73
|
+
"@genesislcap/webpack-builder": "14.437.0",
|
|
74
74
|
"@types/dompurify": "^3.0.5",
|
|
75
75
|
"@types/marked": "^5.0.2"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@genesislcap/foundation-ai": "14.
|
|
79
|
-
"@genesislcap/foundation-logger": "14.
|
|
80
|
-
"@genesislcap/foundation-redux": "14.
|
|
81
|
-
"@genesislcap/foundation-ui": "14.
|
|
82
|
-
"@genesislcap/foundation-utils": "14.
|
|
83
|
-
"@genesislcap/rapid-design-system": "14.
|
|
84
|
-
"@genesislcap/web-core": "14.
|
|
78
|
+
"@genesislcap/foundation-ai": "14.437.0",
|
|
79
|
+
"@genesislcap/foundation-logger": "14.437.0",
|
|
80
|
+
"@genesislcap/foundation-redux": "14.437.0",
|
|
81
|
+
"@genesislcap/foundation-ui": "14.437.0",
|
|
82
|
+
"@genesislcap/foundation-utils": "14.437.0",
|
|
83
|
+
"@genesislcap/rapid-design-system": "14.437.0",
|
|
84
|
+
"@genesislcap/web-core": "14.437.0",
|
|
85
85
|
"dompurify": "^3.3.1",
|
|
86
86
|
"marked": "^17.0.3"
|
|
87
87
|
},
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "c30c777f0ab5e45f4e931a9cc1200ac85bcace35"
|
|
97
97
|
}
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
ChatToolCall,
|
|
8
8
|
ChatToolDefinition,
|
|
9
9
|
ChatToolHandlers,
|
|
10
|
+
InteractionRequestOptions,
|
|
10
11
|
SubAgentRequestOptions,
|
|
11
12
|
} from '@genesislcap/foundation-ai';
|
|
12
13
|
import { MalformedFunctionCallError } from '@genesislcap/foundation-ai';
|
|
@@ -89,7 +90,12 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
89
90
|
private busy = false;
|
|
90
91
|
private pendingInteractions = new Map<
|
|
91
92
|
string,
|
|
92
|
-
{
|
|
93
|
+
{
|
|
94
|
+
resolve: (value: any) => void;
|
|
95
|
+
reject: (reason?: any) => void;
|
|
96
|
+
/** Present when the call requested a chat-input override. */
|
|
97
|
+
overrideId?: string;
|
|
98
|
+
}
|
|
93
99
|
>();
|
|
94
100
|
|
|
95
101
|
private systemPrompt?: SystemPromptInput;
|
|
@@ -117,7 +123,11 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
117
123
|
* widget renders in — and resolves through — the parent (ultimately the
|
|
118
124
|
* root) driver, where the main UI is listening.
|
|
119
125
|
*/
|
|
120
|
-
private hostInteractionRequester?: <T>(
|
|
126
|
+
private hostInteractionRequester?: <T>(
|
|
127
|
+
componentName: string,
|
|
128
|
+
data: any,
|
|
129
|
+
options?: InteractionRequestOptions,
|
|
130
|
+
) => Promise<T>;
|
|
121
131
|
/**
|
|
122
132
|
* When set (e.g. by OrchestratingDriver), applied only to the conversation slice
|
|
123
133
|
* sent to the model — stored `history` stays unchanged for UI and logging.
|
|
@@ -385,7 +395,7 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
385
395
|
* naturally: a grandchild → child → root.
|
|
386
396
|
*/
|
|
387
397
|
public setHostInteractionRequester(
|
|
388
|
-
fn: <T>(componentName: string, data: any) => Promise<T>,
|
|
398
|
+
fn: <T>(componentName: string, data: any, options?: InteractionRequestOptions) => Promise<T>,
|
|
389
399
|
): void {
|
|
390
400
|
this.hostInteractionRequester = fn;
|
|
391
401
|
}
|
|
@@ -403,10 +413,17 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
403
413
|
*
|
|
404
414
|
* @param componentName - The custom element name to render.
|
|
405
415
|
* @param data - Data to pass to the component.
|
|
416
|
+
* @param options - Optional per-call overrides, including
|
|
417
|
+
* `chatInputDuringExecution` to hide or disable the main chat input while
|
|
418
|
+
* the widget is awaiting user input. Reverts when the interaction resolves.
|
|
406
419
|
*/
|
|
407
|
-
public async requestInteraction<T>(
|
|
420
|
+
public async requestInteraction<T>(
|
|
421
|
+
componentName: string,
|
|
422
|
+
data: any,
|
|
423
|
+
options?: InteractionRequestOptions,
|
|
424
|
+
): Promise<T> {
|
|
408
425
|
if (this.hostInteractionRequester) {
|
|
409
|
-
return this.hostInteractionRequester<T>(componentName, data);
|
|
426
|
+
return this.hostInteractionRequester<T>(componentName, data, options);
|
|
410
427
|
}
|
|
411
428
|
if (this.pendingInteractions.size > 0) {
|
|
412
429
|
throw new Error(
|
|
@@ -416,8 +433,20 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
416
433
|
);
|
|
417
434
|
}
|
|
418
435
|
const interactionId = crypto.randomUUID();
|
|
436
|
+
const chatInputDuringExecution = options?.chatInputDuringExecution;
|
|
419
437
|
return new Promise((resolve, reject) => {
|
|
420
|
-
this.pendingInteractions.set(interactionId, {
|
|
438
|
+
this.pendingInteractions.set(interactionId, {
|
|
439
|
+
resolve,
|
|
440
|
+
reject,
|
|
441
|
+
overrideId: chatInputDuringExecution ? interactionId : undefined,
|
|
442
|
+
});
|
|
443
|
+
if (chatInputDuringExecution) {
|
|
444
|
+
this.dispatchEvent(
|
|
445
|
+
new CustomEvent('interaction-start', {
|
|
446
|
+
detail: { interactionId, chatInputDuringExecution },
|
|
447
|
+
}),
|
|
448
|
+
);
|
|
449
|
+
}
|
|
421
450
|
this.appendToHistory({
|
|
422
451
|
role: 'assistant',
|
|
423
452
|
content: '',
|
|
@@ -445,6 +474,9 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
445
474
|
}),
|
|
446
475
|
);
|
|
447
476
|
}
|
|
477
|
+
if (interaction.overrideId) {
|
|
478
|
+
this.dispatchEvent(new CustomEvent('interaction-stop', { detail: { interactionId } }));
|
|
479
|
+
}
|
|
448
480
|
interaction.resolve(result);
|
|
449
481
|
this.pendingInteractions.delete(interactionId);
|
|
450
482
|
} else {
|
|
@@ -499,8 +531,11 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
499
531
|
*/
|
|
500
532
|
private buildHandlerContext(traceCapture?: { trace?: ChatMessage[] }) {
|
|
501
533
|
return {
|
|
502
|
-
requestInteraction: <T>(
|
|
503
|
-
|
|
534
|
+
requestInteraction: <T>(
|
|
535
|
+
componentName: string,
|
|
536
|
+
data: any,
|
|
537
|
+
options?: InteractionRequestOptions,
|
|
538
|
+
): Promise<T> => this.requestInteraction(componentName, data, options),
|
|
504
539
|
...(this.subAgentsMap.size > 0 && {
|
|
505
540
|
requestSubAgent: <T = never>(
|
|
506
541
|
name: string,
|
|
@@ -581,8 +616,8 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
581
616
|
// pending map the main UI is wired to. Recurses naturally for nested
|
|
582
617
|
// sub-agents.
|
|
583
618
|
child.setHostInteractionRequester(
|
|
584
|
-
<R>(componentName: string, data: any): Promise<R> =>
|
|
585
|
-
this.requestInteraction<R>(componentName, data),
|
|
619
|
+
<R>(componentName: string, data: any, opts?: InteractionRequestOptions): Promise<R> =>
|
|
620
|
+
this.requestInteraction<R>(componentName, data, opts),
|
|
586
621
|
);
|
|
587
622
|
|
|
588
623
|
const forwardTrace = (e: Event) => {
|
|
@@ -156,6 +156,16 @@ export class OrchestratingDriver extends EventTarget implements AiDriver {
|
|
|
156
156
|
this.chatDriver.addEventListener('sub-agent-stop', (e: Event) => {
|
|
157
157
|
this.dispatchEvent(new CustomEvent('sub-agent-stop', { detail: (e as CustomEvent).detail }));
|
|
158
158
|
});
|
|
159
|
+
this.chatDriver.addEventListener('interaction-start', (e: Event) => {
|
|
160
|
+
this.dispatchEvent(
|
|
161
|
+
new CustomEvent('interaction-start', { detail: (e as CustomEvent).detail }),
|
|
162
|
+
);
|
|
163
|
+
});
|
|
164
|
+
this.chatDriver.addEventListener('interaction-stop', (e: Event) => {
|
|
165
|
+
this.dispatchEvent(
|
|
166
|
+
new CustomEvent('interaction-stop', { detail: (e as CustomEvent).detail }),
|
|
167
|
+
);
|
|
168
|
+
});
|
|
159
169
|
}
|
|
160
170
|
|
|
161
171
|
resolveInteraction(interactionId: string, result: unknown): void {
|
package/src/main/main.ts
CHANGED
|
@@ -333,22 +333,22 @@ export class FoundationAiAssistant extends GenesisElement {
|
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
/**
|
|
336
|
-
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
337
|
-
*
|
|
336
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent` or
|
|
337
|
+
* `requestInteraction` calls. Empty means no override is active.
|
|
338
338
|
*/
|
|
339
|
-
get
|
|
340
|
-
return this._sessionRef?.store.aiAssistant.
|
|
339
|
+
get inputOverrides() {
|
|
340
|
+
return this._sessionRef?.store.aiAssistant.inputOverrides ?? [];
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
344
|
* Resolves the effective chat-input behaviour while the assistant is
|
|
345
|
-
* executing.
|
|
345
|
+
* executing. Per-call overrides take precedence over the agent-level
|
|
346
346
|
* config; among overrides the most restrictive wins (`'hidden'` >
|
|
347
347
|
* `'disabled'`). Falls back to the active agent's config, then `'disabled'`.
|
|
348
348
|
*/
|
|
349
349
|
@volatile
|
|
350
350
|
get effectiveChatInputDuringExecution(): ChatInputDuringExecutionMode {
|
|
351
|
-
const overrides = this.
|
|
351
|
+
const overrides = this.inputOverrides;
|
|
352
352
|
if (overrides.some((o) => o.mode === 'hidden')) return 'hidden';
|
|
353
353
|
if (overrides.some((o) => o.mode === 'disabled')) return 'disabled';
|
|
354
354
|
return this.activeAgent?.chatInputDuringExecution ?? 'disabled';
|
|
@@ -656,7 +656,7 @@ export class FoundationAiAssistant extends GenesisElement {
|
|
|
656
656
|
chatInputDuringExecution?: ChatInputDuringExecutionMode;
|
|
657
657
|
};
|
|
658
658
|
if (!chatInputDuringExecution) return;
|
|
659
|
-
this._sessionRef?.actions.aiAssistant.
|
|
659
|
+
this._sessionRef?.actions.aiAssistant.addInputOverride({
|
|
660
660
|
id: invocationId,
|
|
661
661
|
mode: chatInputDuringExecution,
|
|
662
662
|
});
|
|
@@ -666,18 +666,39 @@ export class FoundationAiAssistant extends GenesisElement {
|
|
|
666
666
|
this.liveSubAgentName = null;
|
|
667
667
|
const { invocationId } = (e as CustomEvent).detail as { invocationId?: string };
|
|
668
668
|
if (invocationId) {
|
|
669
|
-
this._sessionRef?.actions.aiAssistant.
|
|
669
|
+
this._sessionRef?.actions.aiAssistant.removeInputOverride({ id: invocationId });
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
const onInteractionStart = (e: Event) => {
|
|
673
|
+
const { interactionId, chatInputDuringExecution } = (e as CustomEvent).detail as {
|
|
674
|
+
interactionId: string;
|
|
675
|
+
chatInputDuringExecution?: ChatInputDuringExecutionMode;
|
|
676
|
+
};
|
|
677
|
+
if (!chatInputDuringExecution) return;
|
|
678
|
+
this._sessionRef?.actions.aiAssistant.addInputOverride({
|
|
679
|
+
id: interactionId,
|
|
680
|
+
mode: chatInputDuringExecution,
|
|
681
|
+
});
|
|
682
|
+
};
|
|
683
|
+
const onInteractionStop = (e: Event) => {
|
|
684
|
+
const { interactionId } = (e as CustomEvent).detail as { interactionId?: string };
|
|
685
|
+
if (interactionId) {
|
|
686
|
+
this._sessionRef?.actions.aiAssistant.removeInputOverride({ id: interactionId });
|
|
670
687
|
}
|
|
671
688
|
};
|
|
672
689
|
driver.addEventListener('sub-agent-history-updated', onSubAgentHistoryUpdated);
|
|
673
690
|
driver.addEventListener('sub-agent-start', onSubAgentStart);
|
|
674
691
|
driver.addEventListener('sub-agent-stop', onSubAgentStop);
|
|
692
|
+
driver.addEventListener('interaction-start', onInteractionStart);
|
|
693
|
+
driver.addEventListener('interaction-stop', onInteractionStop);
|
|
675
694
|
|
|
676
695
|
const cleanups: (() => void)[] = [
|
|
677
696
|
() => driver.removeEventListener('history-updated', onHistoryUpdated),
|
|
678
697
|
() => driver.removeEventListener('sub-agent-history-updated', onSubAgentHistoryUpdated),
|
|
679
698
|
() => driver.removeEventListener('sub-agent-start', onSubAgentStart),
|
|
680
699
|
() => driver.removeEventListener('sub-agent-stop', onSubAgentStop),
|
|
700
|
+
() => driver.removeEventListener('interaction-start', onInteractionStart),
|
|
701
|
+
() => driver.removeEventListener('interaction-stop', onInteractionStop),
|
|
681
702
|
];
|
|
682
703
|
|
|
683
704
|
if (driver instanceof OrchestratingDriver) {
|
|
@@ -6,13 +6,14 @@ import type { AiAssistantAnimation, AiAssistantState, SuggestionsState } from '.
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A single in-flight per-call chat-input override pushed by a `requestSubAgent`
|
|
9
|
-
*
|
|
10
|
-
* pop-in/pop-out and so a listener that connects
|
|
11
|
-
* effective mode without having seen the start
|
|
9
|
+
* or `requestInteraction` call. Tracked as an array (not a counter) so the
|
|
10
|
+
* slice can survive pop-in/pop-out and so a listener that connects
|
|
11
|
+
* mid-execution can compute the effective mode without having seen the start
|
|
12
|
+
* event.
|
|
12
13
|
*
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
15
|
-
export interface
|
|
16
|
+
export interface InputOverride {
|
|
16
17
|
/** Unique per-invocation id, paired with the start/stop events. */
|
|
17
18
|
id: string;
|
|
18
19
|
/** The mode requested for this invocation. */
|
|
@@ -54,11 +55,12 @@ export interface AiAssistantSessionState {
|
|
|
54
55
|
/** Name of the currently-executing sub-agent, or null when idle. */
|
|
55
56
|
liveSubAgentName: string | null;
|
|
56
57
|
/**
|
|
57
|
-
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
58
|
-
* The most restrictive entry (`'hidden'` >
|
|
59
|
-
* means the agent-level
|
|
58
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent` or
|
|
59
|
+
* `requestInteraction` calls. The most restrictive entry (`'hidden'` >
|
|
60
|
+
* `'disabled'`) wins; an empty list means the agent-level
|
|
61
|
+
* `chatInputDuringExecution` applies.
|
|
60
62
|
*/
|
|
61
|
-
|
|
63
|
+
inputOverrides: InputOverride[];
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export const defaultSessionState: AiAssistantSessionState = {
|
|
@@ -77,7 +79,7 @@ export const defaultSessionState: AiAssistantSessionState = {
|
|
|
77
79
|
inputValue: '',
|
|
78
80
|
liveSubAgentTrace: [],
|
|
79
81
|
liveSubAgentName: null,
|
|
80
|
-
|
|
82
|
+
inputOverrides: [],
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
export const aiAssistantSlice = createSlice({
|
|
@@ -129,13 +131,11 @@ export const aiAssistantSlice = createSlice({
|
|
|
129
131
|
setLiveSubAgentName(state, action: PayloadAction<string | null>) {
|
|
130
132
|
state.liveSubAgentName = action.payload;
|
|
131
133
|
},
|
|
132
|
-
|
|
133
|
-
state.
|
|
134
|
+
addInputOverride(state, action: PayloadAction<InputOverride>) {
|
|
135
|
+
state.inputOverrides.push(action.payload);
|
|
134
136
|
},
|
|
135
|
-
|
|
136
|
-
state.
|
|
137
|
-
(o) => o.id !== action.payload.id,
|
|
138
|
-
);
|
|
137
|
+
removeInputOverride(state, action: PayloadAction<{ id: string }>) {
|
|
138
|
+
state.inputOverrides = state.inputOverrides.filter((o) => o.id !== action.payload.id);
|
|
139
139
|
},
|
|
140
140
|
},
|
|
141
141
|
selectors: {},
|