@genesislcap/ai-assistant 14.432.2 → 14.433.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/api-extractor.json +8 -1
- package/dist/ai-assistant.api.json +1216 -141
- package/dist/ai-assistant.d.ts +216 -15
- package/dist/dts/components/agent-picker/agent-picker.d.ts +69 -0
- package/dist/dts/components/agent-picker/agent-picker.d.ts.map +1 -0
- package/dist/dts/components/agent-picker/agent-picker.styles.d.ts +2 -0
- package/dist/dts/components/agent-picker/agent-picker.styles.d.ts.map +1 -0
- package/dist/dts/components/agent-picker/agent-picker.template.d.ts +5 -0
- package/dist/dts/components/agent-picker/agent-picker.template.d.ts.map +1 -0
- package/dist/dts/components/agent-picker/index.d.ts +2 -0
- package/dist/dts/components/agent-picker/index.d.ts.map +1 -0
- package/dist/dts/components/chat-driver/chat-driver.d.ts +21 -0
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +14 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/config/config.d.ts +22 -12
- 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 +72 -4
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/main/main.types.d.ts +1 -0
- package/dist/dts/main/main.types.d.ts.map +1 -1
- package/dist/dts/state/ai-assistant-slice.d.ts +39 -1
- package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
- package/dist/dts/state/session-store.d.ts +6 -0
- package/dist/dts/state/session-store.d.ts.map +1 -1
- package/dist/dts/utils/animated-panel-toggle.d.ts +26 -0
- package/dist/dts/utils/animated-panel-toggle.d.ts.map +1 -0
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/esm/components/agent-picker/agent-picker.js +157 -0
- package/dist/esm/components/agent-picker/agent-picker.styles.js +73 -0
- package/dist/esm/components/agent-picker/agent-picker.template.js +72 -0
- package/dist/esm/components/agent-picker/index.js +1 -0
- package/dist/esm/components/chat-driver/chat-driver.js +48 -6
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +43 -6
- package/dist/esm/index.js +1 -0
- package/dist/esm/main/main.js +215 -21
- package/dist/esm/main/main.styles.js +59 -0
- package/dist/esm/main/main.template.js +66 -12
- package/dist/esm/state/ai-assistant-slice.js +15 -0
- package/dist/esm/utils/animated-panel-toggle.js +62 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/gemini-empty-response.md +110 -0
- package/package.json +16 -16
- package/src/components/agent-picker/agent-picker.styles.ts +74 -0
- package/src/components/agent-picker/agent-picker.template.ts +88 -0
- package/src/components/agent-picker/agent-picker.ts +148 -0
- package/src/components/agent-picker/index.ts +1 -0
- package/src/components/chat-driver/chat-driver.ts +65 -8
- package/src/components/orchestrating-driver/orchestrating-driver.ts +45 -6
- package/src/config/config.ts +28 -11
- package/src/index.ts +1 -0
- package/src/main/main.styles.ts +59 -0
- package/src/main/main.template.ts +79 -13
- package/src/main/main.ts +220 -19
- package/src/main/main.types.ts +2 -0
- package/src/state/ai-assistant-slice.ts +51 -1
- package/src/utils/animated-panel-toggle.ts +62 -0
- package/src/utils/index.ts +1 -0
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AgentPickerMode } from '@genesislcap/foundation-ai';
|
|
1
2
|
import { AIProvider } from '@genesislcap/foundation-ai';
|
|
2
3
|
import type { ChatAttachment } from '@genesislcap/foundation-ai';
|
|
3
4
|
import type { ChatConfig } from '@genesislcap/foundation-ai';
|
|
4
5
|
import type { ChatDriverResult } from '@genesislcap/foundation-ai';
|
|
6
|
+
import type { ChatInputDuringExecutionMode } from '@genesislcap/foundation-ai';
|
|
5
7
|
import type { ChatMessage } from '@genesislcap/foundation-ai';
|
|
6
8
|
import type { ChatToolDefinition } from '@genesislcap/foundation-ai';
|
|
7
9
|
import type { ChatToolHandlers } from '@genesislcap/foundation-ai';
|
|
@@ -9,6 +11,9 @@ import { GenesisElement } from '@genesislcap/web-core';
|
|
|
9
11
|
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
10
12
|
import { ViewTemplate } from '@genesislcap/web-core';
|
|
11
13
|
|
|
14
|
+
/** Sentinel value used by the segmented control / select to represent "Auto". */
|
|
15
|
+
export declare const AGENT_PICKER_AUTO_VALUE = "__auto__";
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* Configuration for an agent passed to `FoundationAiAssistant`.
|
|
14
19
|
*
|
|
@@ -124,6 +129,72 @@ export declare interface AgenticActivityEvents {
|
|
|
124
129
|
'chat-popin': undefined;
|
|
125
130
|
}
|
|
126
131
|
|
|
132
|
+
/**
|
|
133
|
+
* User-facing agent picker rendered above the chat input.
|
|
134
|
+
*
|
|
135
|
+
* Renders `Auto` plus each top-level agent that has `manualSelection.enabled`.
|
|
136
|
+
* Sub-agents and non-selectable specialists are excluded. Hidden when fewer
|
|
137
|
+
* than two agents are configured or none are manually selectable.
|
|
138
|
+
*
|
|
139
|
+
* @fires agent-pinned - Fired when the user changes selection. `detail` is the
|
|
140
|
+
* agent name (string) or `null` for Auto.
|
|
141
|
+
*
|
|
142
|
+
* @beta
|
|
143
|
+
*/
|
|
144
|
+
export declare class AgentPicker extends GenesisElement {
|
|
145
|
+
/** Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`. */
|
|
146
|
+
designSystemPrefix: string;
|
|
147
|
+
/** Picker variant, sourced from the assistant's `chatConfig.agentPicker`. */
|
|
148
|
+
mode: AgentPickerMode;
|
|
149
|
+
/** Top-level agents passed to the assistant. */
|
|
150
|
+
agents: AgentConfig[];
|
|
151
|
+
/** Currently pinned agent name, or `null` for Auto. */
|
|
152
|
+
pinnedAgentName: string | null;
|
|
153
|
+
/** @internal — set via the template `${ref(...)}` binding. */
|
|
154
|
+
segmentedRowEl?: HTMLElement;
|
|
155
|
+
/**
|
|
156
|
+
* @internal — true when the segmented row's content overflows its container.
|
|
157
|
+
* Drives the fallback to `select` rendering. Only meaningful when
|
|
158
|
+
* `mode === 'segmented-control'`.
|
|
159
|
+
*/
|
|
160
|
+
overflowing: boolean;
|
|
161
|
+
private resizeObserver?;
|
|
162
|
+
/** Top-level agents that opted in to manual selection. */
|
|
163
|
+
get selectableAgents(): AgentConfig[];
|
|
164
|
+
/** Whether the picker should render at all. */
|
|
165
|
+
get visible(): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* The variant actually rendered: `'select'` if user-configured or if the
|
|
168
|
+
* segmented row currently overflows; `'segmented-control'` otherwise.
|
|
169
|
+
*/
|
|
170
|
+
get effectiveMode(): 'select' | 'segmented-control';
|
|
171
|
+
connectedCallback(): void;
|
|
172
|
+
disconnectedCallback(): void;
|
|
173
|
+
/**
|
|
174
|
+
* Re-measure when agents change — newly added selectable agents may push the
|
|
175
|
+
* segmented row past the container's width.
|
|
176
|
+
*/
|
|
177
|
+
agentsChanged(): void;
|
|
178
|
+
modeChanged(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Measures whether the segmented row's natural content width exceeds the
|
|
181
|
+
* container's visible width. Bails when the row isn't currently rendered
|
|
182
|
+
* (e.g. when `mode !== 'segmented-control'`).
|
|
183
|
+
*/
|
|
184
|
+
private measureOverflow;
|
|
185
|
+
selectAgent(name: string | null): void;
|
|
186
|
+
/**
|
|
187
|
+
* Maps a value from the segmented-control or select (which uses
|
|
188
|
+
* {@link AGENT_PICKER_AUTO_VALUE} for Auto) back to the `string | null` form
|
|
189
|
+
* expected by `selectAgent`.
|
|
190
|
+
*/
|
|
191
|
+
selectByValue(value: string): void;
|
|
192
|
+
/** Current pinned agent name as a value the segmented-control / select can bind to. */
|
|
193
|
+
get currentValue(): string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export { AgentPickerMode }
|
|
197
|
+
|
|
127
198
|
/**
|
|
128
199
|
* Union of all available animation names, derived from {@link ANIMATION_DEFS}.
|
|
129
200
|
*
|
|
@@ -310,6 +381,12 @@ declare interface BaseAgentConfig {
|
|
|
310
381
|
* Defaults to `'disabled'`. See {@link ChatInputDuringExecutionMode}.
|
|
311
382
|
*/
|
|
312
383
|
chatInputDuringExecution?: ChatInputDuringExecutionMode;
|
|
384
|
+
/**
|
|
385
|
+
* Opts this agent in to manual selection from the assistant's agent picker.
|
|
386
|
+
* Has no effect on sub-agents or when the assistant's `agentPicker` is
|
|
387
|
+
* disabled. See {@link ManualSelectionConfig}.
|
|
388
|
+
*/
|
|
389
|
+
manualSelection?: ManualSelectionConfig;
|
|
313
390
|
}
|
|
314
391
|
|
|
315
392
|
/**
|
|
@@ -333,6 +410,13 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
333
410
|
private toolHandlers;
|
|
334
411
|
private primerHistory?;
|
|
335
412
|
private activeAgentName?;
|
|
413
|
+
/**
|
|
414
|
+
* When set, `requestInteraction` delegates to this callback instead of using
|
|
415
|
+
* this driver's own pending map. Wired by `invokeSubAgent` so a sub-agent's
|
|
416
|
+
* widget renders in — and resolves through — the parent (ultimately the
|
|
417
|
+
* root) driver, where the main UI is listening.
|
|
418
|
+
*/
|
|
419
|
+
private hostInteractionRequester?;
|
|
336
420
|
/**
|
|
337
421
|
* When set (e.g. by OrchestratingDriver), applied only to the conversation slice
|
|
338
422
|
* sent to the model — stored `history` stays unchanged for UI and logging.
|
|
@@ -378,10 +462,24 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
378
462
|
getActiveFoldNames(): string[];
|
|
379
463
|
getSuggestions(history: ChatMessage[], prompt: string, count: number, allAgentInfo?: AllAgentSummary[]): Promise<string[]>;
|
|
380
464
|
isBusy(): boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Wire a parent driver as the host for this driver's interactions. When set,
|
|
467
|
+
* `requestInteraction` delegates upward so the widget renders in (and
|
|
468
|
+
* resolves through) the parent's history and pending map. Calls chain
|
|
469
|
+
* naturally: a grandchild → child → root.
|
|
470
|
+
*/
|
|
471
|
+
setHostInteractionRequester(fn: <T>(componentName: string, data: any) => Promise<T>): void;
|
|
381
472
|
/**
|
|
382
473
|
* Request a custom UI interaction. Emits a new message with the interaction.
|
|
383
474
|
* Tool handlers can call this to pause execution until the user completes the UI interaction.
|
|
384
475
|
*
|
|
476
|
+
* If a host requester is wired (sub-agent case), the call delegates upward
|
|
477
|
+
* so the interaction lives on the parent — the main UI is only listening to
|
|
478
|
+
* the root driver. Only one interaction may be in flight at any time on a
|
|
479
|
+
* given root: concurrent calls (e.g. two parallel sub-agents both spawning a
|
|
480
|
+
* widget) throw. Parallel sub-agents are for parallel work, not for user
|
|
481
|
+
* interaction, which is inherently sequential.
|
|
482
|
+
*
|
|
385
483
|
* @param componentName - The custom element name to render.
|
|
386
484
|
* @param data - Data to pass to the component.
|
|
387
485
|
*/
|
|
@@ -449,21 +547,7 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
449
547
|
*/
|
|
450
548
|
export declare type ChatHistoryUpdatedEvent = CustomEvent<ReadonlyArray<ChatMessage>>;
|
|
451
549
|
|
|
452
|
-
|
|
453
|
-
* Controls how the main chat input area behaves while this agent is executing
|
|
454
|
-
* (i.e. while `state === 'loading'` — covers both LLM thinking and pending
|
|
455
|
-
* widget interactions).
|
|
456
|
-
*
|
|
457
|
-
* - `'disabled'` (default): input stays visible but disabled.
|
|
458
|
-
* - `'hidden'`: the entire input row (attach button, textarea, send button) is
|
|
459
|
-
* hidden. Useful for agents whose interaction widgets contain their own
|
|
460
|
-
* input affordances and where a second disabled chat input is redundant or
|
|
461
|
-
* confusing — typically long-running agents (planners) where one transition
|
|
462
|
-
* in/out is less jarring than mid-run flicker.
|
|
463
|
-
*
|
|
464
|
-
* @beta
|
|
465
|
-
*/
|
|
466
|
-
export declare type ChatInputDuringExecutionMode = 'disabled' | 'hidden';
|
|
550
|
+
export { ChatInputDuringExecutionMode }
|
|
467
551
|
|
|
468
552
|
/**
|
|
469
553
|
* Creates a tool fold — a facade that hides a group of related tools behind a single
|
|
@@ -605,6 +689,11 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
605
689
|
*/
|
|
606
690
|
agents?: AgentConfig[];
|
|
607
691
|
chatConfig: ChatConfig;
|
|
692
|
+
/**
|
|
693
|
+
* Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to
|
|
694
|
+
* `'disabled'`.
|
|
695
|
+
*/
|
|
696
|
+
get agentPicker(): AgentPickerMode;
|
|
608
697
|
debugStateFactory?: () => unknown;
|
|
609
698
|
/** When set, enables Redux DevTools for this instance's session store. */
|
|
610
699
|
debugRedux: boolean;
|
|
@@ -639,10 +728,35 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
639
728
|
/** Currently enabled animations. */
|
|
640
729
|
get enabledAnimations(): AiAssistantAnimation[];
|
|
641
730
|
set enabledAnimations(value: AiAssistantAnimation[]);
|
|
731
|
+
/**
|
|
732
|
+
* Whether the agent picker slide-out panel is open. Lives on the session
|
|
733
|
+
* store so the bubble-dialog and popout-panel instances stay in sync.
|
|
734
|
+
*/
|
|
735
|
+
get agentPickerOpen(): boolean;
|
|
736
|
+
set agentPickerOpen(value: boolean);
|
|
737
|
+
/**
|
|
738
|
+
* Name of the agent the user has pinned via the agent picker. `null` means
|
|
739
|
+
* automatic routing (Auto). Persisted on the session store, so it survives
|
|
740
|
+
* pop-in/pop-out but resets on page refresh.
|
|
741
|
+
*/
|
|
742
|
+
get pinnedAgentName(): string | null;
|
|
743
|
+
set pinnedAgentName(value: string | null);
|
|
642
744
|
get liveSubAgentTrace(): ChatMessage[];
|
|
643
745
|
set liveSubAgentTrace(value: ChatMessage[]);
|
|
644
746
|
get liveSubAgentName(): string | null;
|
|
645
747
|
set liveSubAgentName(value: string | null);
|
|
748
|
+
/**
|
|
749
|
+
* In-flight per-call chat-input overrides pushed by `requestSubAgent`
|
|
750
|
+
* invocations. Empty means no override is active.
|
|
751
|
+
*/
|
|
752
|
+
get subAgentInputOverrides(): SubAgentInputOverride[];
|
|
753
|
+
/**
|
|
754
|
+
* Resolves the effective chat-input behaviour while the assistant is
|
|
755
|
+
* executing. Sub-agent overrides take precedence over the agent-level
|
|
756
|
+
* config; among overrides the most restrictive wins (`'hidden'` >
|
|
757
|
+
* `'disabled'`). Falls back to the active agent's config, then `'disabled'`.
|
|
758
|
+
*/
|
|
759
|
+
get effectiveChatInputDuringExecution(): ChatInputDuringExecutionMode;
|
|
646
760
|
/** Most recent prompt token count from the AI provider, if available. */
|
|
647
761
|
get contextTokens(): number | undefined;
|
|
648
762
|
set contextTokens(value: number | undefined);
|
|
@@ -751,7 +865,43 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
751
865
|
handlePopout(): void;
|
|
752
866
|
/** Returns a cache key for this instance, or undefined if the component has no identity. */
|
|
753
867
|
private getStateKey;
|
|
868
|
+
private readonly _settingsToggle;
|
|
754
869
|
toggleSettings(): void;
|
|
870
|
+
private readonly _agentPickerToggle;
|
|
871
|
+
toggleAgentPicker(): void;
|
|
872
|
+
/**
|
|
873
|
+
* Programmatically pin an agent by name. Returns `true` if the pin was
|
|
874
|
+
* applied, `false` if the agent isn't in the configured agents array or
|
|
875
|
+
* the call was suppressed by `force: false`.
|
|
876
|
+
*
|
|
877
|
+
* With `force: false`, the call is a no-op when a `picker.defaultAgent` is
|
|
878
|
+
* configured and the user has already moved away from it (either by picking
|
|
879
|
+
* another agent or by switching to Auto). This lets hosts seed an opinion
|
|
880
|
+
* without overriding an explicit user choice.
|
|
881
|
+
*
|
|
882
|
+
* @public
|
|
883
|
+
*/
|
|
884
|
+
setAgent(agentName: string, options?: {
|
|
885
|
+
force?: boolean;
|
|
886
|
+
}): boolean;
|
|
887
|
+
/** Whether the picker toggle button should appear. Mirrors the picker's own visibility rule. */
|
|
888
|
+
get agentPickerEnabled(): boolean;
|
|
889
|
+
/** Hint text for the currently pinned agent, if any. Used in the toggle button tooltip. */
|
|
890
|
+
get pinnedAgentHint(): string | undefined;
|
|
891
|
+
/**
|
|
892
|
+
* Tint applied to the pin icon when an agent is pinned. Picked from the
|
|
893
|
+
* brand palette by agent position (modulo the palette length), so each agent
|
|
894
|
+
* gets a consistent colour across renders. `undefined` when nothing is
|
|
895
|
+
* pinned, the agent isn't in the current array, or the host has opted out
|
|
896
|
+
* via `chatConfig.picker.disablePinColours`.
|
|
897
|
+
*/
|
|
898
|
+
get pinnedAgentColour(): string | undefined;
|
|
899
|
+
/**
|
|
900
|
+
* Placeholder shown in the chat input. Substitutes the pinned agent's name
|
|
901
|
+
* when one is selected so the user has a clearer signal of where their
|
|
902
|
+
* message will go; otherwise falls back to the host-provided placeholder.
|
|
903
|
+
*/
|
|
904
|
+
get effectivePlaceholder(): string;
|
|
755
905
|
toggleShowToolCalls(): void;
|
|
756
906
|
toggleShowThinkingSteps(): void;
|
|
757
907
|
toggleShowAgentSwitchIndicator(): void;
|
|
@@ -771,6 +921,7 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
771
921
|
primerHistory?: ChatMessage[];
|
|
772
922
|
subAgents?: AgentConfig[];
|
|
773
923
|
chatInputDuringExecution?: ChatInputDuringExecutionMode;
|
|
924
|
+
manualSelection?: ManualSelectionConfig;
|
|
774
925
|
} | {
|
|
775
926
|
toolDefinitions: ToolTreeNode[];
|
|
776
927
|
toolHandlers: any;
|
|
@@ -781,6 +932,7 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
781
932
|
primerHistory?: ChatMessage[];
|
|
782
933
|
subAgents?: AgentConfig[];
|
|
783
934
|
chatInputDuringExecution?: ChatInputDuringExecutionMode;
|
|
935
|
+
manualSelection?: ManualSelectionConfig;
|
|
784
936
|
})[];
|
|
785
937
|
activeSystemPrompt: string;
|
|
786
938
|
activePrimerHistory: ChatMessage[];
|
|
@@ -868,6 +1020,26 @@ export declare const friendlyFallbackAgent: FallbackAgentConfig;
|
|
|
868
1020
|
*/
|
|
869
1021
|
export declare function getAiPopoutManager(): FoundationAiPopoutManager | undefined;
|
|
870
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
* Opts an agent in to manual selection from the assistant's agent picker.
|
|
1025
|
+
*
|
|
1026
|
+
* Only applies to top-level agents — sub-agents are never user-selectable.
|
|
1027
|
+
* Has no effect unless the assistant's `agentPicker` is also enabled.
|
|
1028
|
+
*
|
|
1029
|
+
* @beta
|
|
1030
|
+
*/
|
|
1031
|
+
export declare interface ManualSelectionConfig {
|
|
1032
|
+
/**
|
|
1033
|
+
* Whether this agent appears in the picker.
|
|
1034
|
+
*/
|
|
1035
|
+
enabled: boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* Optional short description shown as a tooltip on the picker entry, and as
|
|
1038
|
+
* a secondary line in the dropdown variant.
|
|
1039
|
+
*/
|
|
1040
|
+
hint?: string;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
871
1043
|
/**
|
|
872
1044
|
* Orchestrates multiple specialist agents. Sits between `FoundationAiAssistant`
|
|
873
1045
|
* and `ChatDriver`, classifying each user message and routing it to the right
|
|
@@ -884,6 +1056,7 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
884
1056
|
private readonly maxHandoffs;
|
|
885
1057
|
private readonly classifierHistoryLength;
|
|
886
1058
|
private readonly classifierRetries;
|
|
1059
|
+
private pinnedAgentName;
|
|
887
1060
|
activeAgent?: AgentConfig;
|
|
888
1061
|
constructor(aiProvider: AIProvider, agents: AgentConfig[], options?: {
|
|
889
1062
|
maxHandoffs?: number;
|
|
@@ -894,6 +1067,13 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
894
1067
|
});
|
|
895
1068
|
resolveInteraction(interactionId: string, result: unknown): void;
|
|
896
1069
|
isBusy(): boolean;
|
|
1070
|
+
/**
|
|
1071
|
+
* Pins routing to a specific agent by name. While pinned, the classifier is
|
|
1072
|
+
* skipped and the continuation tool is hidden from the agent's tool list, so
|
|
1073
|
+
* the agent cannot quietly hand back to the orchestrator. Pass `null` to
|
|
1074
|
+
* return to automatic routing.
|
|
1075
|
+
*/
|
|
1076
|
+
setPinnedAgent(name: string | null): void;
|
|
897
1077
|
loadHistory(messages: ChatMessage[]): void;
|
|
898
1078
|
getRawHistory(): readonly ChatMessage[];
|
|
899
1079
|
getSuggestions(history: ChatMessage[], prompt: string, count: number, allAgentInfo?: AllAgentSummary[]): Promise<string[]>;
|
|
@@ -901,6 +1081,12 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
901
1081
|
continueFromHistory(transientPrimer?: ChatMessage[]): Promise<ChatDriverResult>;
|
|
902
1082
|
private applyAgent;
|
|
903
1083
|
private classify;
|
|
1084
|
+
/**
|
|
1085
|
+
* Returns the pinned agent if `pinnedAgentName` matches a known specialist or
|
|
1086
|
+
* fallback. Logs and returns `undefined` if pinned to a name that no longer
|
|
1087
|
+
* exists in the agents array — caller falls back to the classifier.
|
|
1088
|
+
*/
|
|
1089
|
+
private resolvePinnedAgent;
|
|
904
1090
|
private appendInlineMessage;
|
|
905
1091
|
}
|
|
906
1092
|
|
|
@@ -943,6 +1129,21 @@ export declare interface SpecialistAgentConfig extends BaseAgentConfig {
|
|
|
943
1129
|
*/
|
|
944
1130
|
export declare const strictFallbackAgent: FallbackAgentConfig;
|
|
945
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* A single in-flight per-call chat-input override pushed by a `requestSubAgent`
|
|
1134
|
+
* invocation. Tracked as an array (not a counter) so the slice can survive
|
|
1135
|
+
* pop-in/pop-out and so a listener that connects mid-execution can compute the
|
|
1136
|
+
* effective mode without having seen the start event.
|
|
1137
|
+
*
|
|
1138
|
+
* @internal
|
|
1139
|
+
*/
|
|
1140
|
+
declare interface SubAgentInputOverride {
|
|
1141
|
+
/** Unique per-invocation id, paired with the start/stop events. */
|
|
1142
|
+
id: string;
|
|
1143
|
+
/** The mode requested for this invocation. */
|
|
1144
|
+
mode: ChatInputDuringExecutionMode;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
946
1147
|
/**
|
|
947
1148
|
* State of the chat suggestions feature.
|
|
948
1149
|
*
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
|
+
import type { AgentConfig } from '../../config/config';
|
|
3
|
+
import type { AgentPickerMode } from '../../main/main.types';
|
|
4
|
+
/** Sentinel value used by the segmented control / select to represent "Auto". */
|
|
5
|
+
export declare const AGENT_PICKER_AUTO_VALUE = "__auto__";
|
|
6
|
+
/**
|
|
7
|
+
* User-facing agent picker rendered above the chat input.
|
|
8
|
+
*
|
|
9
|
+
* Renders `Auto` plus each top-level agent that has `manualSelection.enabled`.
|
|
10
|
+
* Sub-agents and non-selectable specialists are excluded. Hidden when fewer
|
|
11
|
+
* than two agents are configured or none are manually selectable.
|
|
12
|
+
*
|
|
13
|
+
* @fires agent-pinned - Fired when the user changes selection. `detail` is the
|
|
14
|
+
* agent name (string) or `null` for Auto.
|
|
15
|
+
*
|
|
16
|
+
* @beta
|
|
17
|
+
*/
|
|
18
|
+
export declare class AgentPicker extends GenesisElement {
|
|
19
|
+
/** Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`. */
|
|
20
|
+
designSystemPrefix: string;
|
|
21
|
+
/** Picker variant, sourced from the assistant's `chatConfig.agentPicker`. */
|
|
22
|
+
mode: AgentPickerMode;
|
|
23
|
+
/** Top-level agents passed to the assistant. */
|
|
24
|
+
agents: AgentConfig[];
|
|
25
|
+
/** Currently pinned agent name, or `null` for Auto. */
|
|
26
|
+
pinnedAgentName: string | null;
|
|
27
|
+
/** @internal — set via the template `${ref(...)}` binding. */
|
|
28
|
+
segmentedRowEl?: HTMLElement;
|
|
29
|
+
/**
|
|
30
|
+
* @internal — true when the segmented row's content overflows its container.
|
|
31
|
+
* Drives the fallback to `select` rendering. Only meaningful when
|
|
32
|
+
* `mode === 'segmented-control'`.
|
|
33
|
+
*/
|
|
34
|
+
overflowing: boolean;
|
|
35
|
+
private resizeObserver?;
|
|
36
|
+
/** Top-level agents that opted in to manual selection. */
|
|
37
|
+
get selectableAgents(): AgentConfig[];
|
|
38
|
+
/** Whether the picker should render at all. */
|
|
39
|
+
get visible(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The variant actually rendered: `'select'` if user-configured or if the
|
|
42
|
+
* segmented row currently overflows; `'segmented-control'` otherwise.
|
|
43
|
+
*/
|
|
44
|
+
get effectiveMode(): 'select' | 'segmented-control';
|
|
45
|
+
connectedCallback(): void;
|
|
46
|
+
disconnectedCallback(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Re-measure when agents change — newly added selectable agents may push the
|
|
49
|
+
* segmented row past the container's width.
|
|
50
|
+
*/
|
|
51
|
+
agentsChanged(): void;
|
|
52
|
+
modeChanged(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Measures whether the segmented row's natural content width exceeds the
|
|
55
|
+
* container's visible width. Bails when the row isn't currently rendered
|
|
56
|
+
* (e.g. when `mode !== 'segmented-control'`).
|
|
57
|
+
*/
|
|
58
|
+
private measureOverflow;
|
|
59
|
+
selectAgent(name: string | null): void;
|
|
60
|
+
/**
|
|
61
|
+
* Maps a value from the segmented-control or select (which uses
|
|
62
|
+
* {@link AGENT_PICKER_AUTO_VALUE} for Auto) back to the `string | null` form
|
|
63
|
+
* expected by `selectAgent`.
|
|
64
|
+
*/
|
|
65
|
+
selectByValue(value: string): void;
|
|
66
|
+
/** Current pinned agent name as a value the segmented-control / select can bind to. */
|
|
67
|
+
get currentValue(): string;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=agent-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-picker/agent-picker.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAKlD;;;;;;;;;;;GAWG;AACH,qBAOa,WAAY,SAAQ,cAAc;IAC7C,8EAA8E;IACjC,kBAAkB,EAAE,MAAM,CAAW;IAClF,6EAA6E;IACjE,IAAI,EAAE,eAAe,CAAc;IAC/C,gDAAgD;IACpC,MAAM,EAAE,WAAW,EAAE,CAAM;IACvC,uDAAuD;IAC3C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElD,8DAA8D;IAC9D,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;;OAIG;IACS,WAAW,EAAE,OAAO,CAAS;IAEzC,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC,0DAA0D;IAC1D,IACI,gBAAgB,IAAI,WAAW,EAAE,CAEpC;IAED,+CAA+C;IAC/C,IACI,OAAO,IAAI,OAAO,CAKrB;IAED;;;OAGG;IACH,IACI,aAAa,IAAI,QAAQ,GAAG,mBAAmB,CAKlD;IAEQ,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAMrC;;;OAGG;IACH,aAAa,IAAI,IAAI;IAIrB,WAAW,IAAI,IAAI;IAInB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IASvB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAOtC;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIlC,uFAAuF;IACvF,IACI,YAAY,IAAI,MAAM,CAEzB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-picker.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-picker/agent-picker.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,iDAuElB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ViewTemplate } from '@genesislcap/web-core';
|
|
2
|
+
import { type AgentPicker } from './agent-picker';
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const AgentPickerTemplate: (designSystemPrefix: string) => ViewTemplate<AgentPicker>;
|
|
5
|
+
//# sourceMappingURL=agent-picker.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-picker.template.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-picker/agent-picker.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK3E,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,GAAI,oBAAoB,MAAM,KAAG,YAAY,CAAC,WAAW,CA+ExF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-picker/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -30,6 +30,13 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
30
30
|
private toolHandlers;
|
|
31
31
|
private primerHistory?;
|
|
32
32
|
private activeAgentName?;
|
|
33
|
+
/**
|
|
34
|
+
* When set, `requestInteraction` delegates to this callback instead of using
|
|
35
|
+
* this driver's own pending map. Wired by `invokeSubAgent` so a sub-agent's
|
|
36
|
+
* widget renders in — and resolves through — the parent (ultimately the
|
|
37
|
+
* root) driver, where the main UI is listening.
|
|
38
|
+
*/
|
|
39
|
+
private hostInteractionRequester?;
|
|
33
40
|
/**
|
|
34
41
|
* When set (e.g. by OrchestratingDriver), applied only to the conversation slice
|
|
35
42
|
* sent to the model — stored `history` stays unchanged for UI and logging.
|
|
@@ -75,10 +82,24 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
75
82
|
getActiveFoldNames(): string[];
|
|
76
83
|
getSuggestions(history: ChatMessage[], prompt: string, count: number, allAgentInfo?: AllAgentSummary[]): Promise<string[]>;
|
|
77
84
|
isBusy(): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Wire a parent driver as the host for this driver's interactions. When set,
|
|
87
|
+
* `requestInteraction` delegates upward so the widget renders in (and
|
|
88
|
+
* resolves through) the parent's history and pending map. Calls chain
|
|
89
|
+
* naturally: a grandchild → child → root.
|
|
90
|
+
*/
|
|
91
|
+
setHostInteractionRequester(fn: <T>(componentName: string, data: any) => Promise<T>): void;
|
|
78
92
|
/**
|
|
79
93
|
* Request a custom UI interaction. Emits a new message with the interaction.
|
|
80
94
|
* Tool handlers can call this to pause execution until the user completes the UI interaction.
|
|
81
95
|
*
|
|
96
|
+
* If a host requester is wired (sub-agent case), the call delegates upward
|
|
97
|
+
* so the interaction lives on the parent — the main UI is only listening to
|
|
98
|
+
* the root driver. Only one interaction may be in flight at any time on a
|
|
99
|
+
* given root: concurrent calls (e.g. two parallel sub-agents both spawning a
|
|
100
|
+
* widget) throw. Parallel sub-agents are for parallel work, not for user
|
|
101
|
+
* interaction, which is inherently sequential.
|
|
102
|
+
*
|
|
82
103
|
* @param componentName - The custom element name to render.
|
|
83
104
|
* @param data - Data to pass to the component.
|
|
84
105
|
*/
|
|
@@ -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,EAGX,kBAAkB,EAClB,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AASx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AAI;IAIP;;;;;;;;;;;;;OAaG;IACU,kBAAkB,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC;IAsBhF;;;OAGG;IACI,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,IAAI;IAsBnE;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAS3C,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsB/F;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IA0B3B;;;;;OAKG;YACW,cAAc;IAmF5B;;;OAGG;IACG,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwBrF,wFAAwF;IACxF,OAAO,CAAC,OAAO;IAKf;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA+BxB,uFAAuF;IACvF,OAAO,CAAC,QAAQ;IAqChB,OAAO,CAAC,aAAa;IAQrB,8EAA8E;IAC9E,OAAO,CAAC,SAAS;IAWjB,mFAAmF;IACnF,OAAO,CAAC,2BAA2B;YAiCrB,WAAW;IA+UzB,OAAO,CAAC,eAAe;CAWxB"}
|
|
@@ -17,6 +17,7 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
17
17
|
private readonly maxHandoffs;
|
|
18
18
|
private readonly classifierHistoryLength;
|
|
19
19
|
private readonly classifierRetries;
|
|
20
|
+
private pinnedAgentName;
|
|
20
21
|
activeAgent?: AgentConfig;
|
|
21
22
|
constructor(aiProvider: AIProvider, agents: AgentConfig[], options?: {
|
|
22
23
|
maxHandoffs?: number;
|
|
@@ -27,6 +28,13 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
27
28
|
});
|
|
28
29
|
resolveInteraction(interactionId: string, result: unknown): void;
|
|
29
30
|
isBusy(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Pins routing to a specific agent by name. While pinned, the classifier is
|
|
33
|
+
* skipped and the continuation tool is hidden from the agent's tool list, so
|
|
34
|
+
* the agent cannot quietly hand back to the orchestrator. Pass `null` to
|
|
35
|
+
* return to automatic routing.
|
|
36
|
+
*/
|
|
37
|
+
setPinnedAgent(name: string | null): void;
|
|
30
38
|
loadHistory(messages: ChatMessage[]): void;
|
|
31
39
|
getRawHistory(): readonly ChatMessage[];
|
|
32
40
|
getSuggestions(history: ChatMessage[], prompt: string, count: number, allAgentInfo?: AllAgentSummary[]): Promise<string[]>;
|
|
@@ -34,6 +42,12 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
34
42
|
continueFromHistory(transientPrimer?: ChatMessage[]): Promise<ChatDriverResult>;
|
|
35
43
|
private applyAgent;
|
|
36
44
|
private classify;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the pinned agent if `pinnedAgentName` matches a known specialist or
|
|
47
|
+
* fallback. Logs and returns `undefined` if pinned to a name that no longer
|
|
48
|
+
* exists in the agents array — caller falls back to the classifier.
|
|
49
|
+
*/
|
|
50
|
+
private resolvePinnedAgent;
|
|
37
51
|
private appendInlineMessage;
|
|
38
52
|
}
|
|
39
53
|
//# sourceMappingURL=orchestrating-driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,EAAE,WAAW,EAA8C,MAAM,qBAAqB,CAAC;AAGnG,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,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O,GAAG,IAAI;IAIhE,MAAM,IAAI,OAAO;IAIjB;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIzC,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAI1C,aAAa,IAAI,SAAS,WAAW,EAAE;IAIjC,cAAc,CAClB,OAAO,EAAE,WAAW,EAAE,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,eAAe,EAAE,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC;IAad,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6DrF,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrF,OAAO,CAAC,UAAU;YAuBJ,QAAQ;IA2EtB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,mBAAmB;CAO5B"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import type { ChatMessage, ChatToolDefinition, ChatToolHandlers } from '@genesislcap/foundation-ai';
|
|
1
|
+
import type { ChatInputDuringExecutionMode, ChatMessage, ChatToolDefinition, ChatToolHandlers } from '@genesislcap/foundation-ai';
|
|
2
|
+
export type { ChatInputDuringExecutionMode };
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* (i.e. while `state === 'loading'` — covers both LLM thinking and pending
|
|
5
|
-
* widget interactions).
|
|
4
|
+
* Opts an agent in to manual selection from the assistant's agent picker.
|
|
6
5
|
*
|
|
7
|
-
* -
|
|
8
|
-
*
|
|
9
|
-
* hidden. Useful for agents whose interaction widgets contain their own
|
|
10
|
-
* input affordances and where a second disabled chat input is redundant or
|
|
11
|
-
* confusing — typically long-running agents (planners) where one transition
|
|
12
|
-
* in/out is less jarring than mid-run flicker.
|
|
6
|
+
* Only applies to top-level agents — sub-agents are never user-selectable.
|
|
7
|
+
* Has no effect unless the assistant's `agentPicker` is also enabled.
|
|
13
8
|
*
|
|
14
9
|
* @beta
|
|
15
10
|
*/
|
|
16
|
-
export
|
|
11
|
+
export interface ManualSelectionConfig {
|
|
12
|
+
/**
|
|
13
|
+
* Whether this agent appears in the picker.
|
|
14
|
+
*/
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Optional short description shown as a tooltip on the picker entry, and as
|
|
18
|
+
* a secondary line in the dropdown variant.
|
|
19
|
+
*/
|
|
20
|
+
hint?: string;
|
|
21
|
+
}
|
|
17
22
|
interface BaseAgentConfig {
|
|
18
23
|
/**
|
|
19
24
|
* Display name shown in the chat header when this agent is active.
|
|
@@ -45,6 +50,12 @@ interface BaseAgentConfig {
|
|
|
45
50
|
* Defaults to `'disabled'`. See {@link ChatInputDuringExecutionMode}.
|
|
46
51
|
*/
|
|
47
52
|
chatInputDuringExecution?: ChatInputDuringExecutionMode;
|
|
53
|
+
/**
|
|
54
|
+
* Opts this agent in to manual selection from the assistant's agent picker.
|
|
55
|
+
* Has no effect on sub-agents or when the assistant's `agentPicker` is
|
|
56
|
+
* disabled. See {@link ManualSelectionConfig}.
|
|
57
|
+
*/
|
|
58
|
+
manualSelection?: ManualSelectionConfig;
|
|
48
59
|
}
|
|
49
60
|
/**
|
|
50
61
|
* Configuration for a specialist agent.
|
|
@@ -103,5 +114,4 @@ export type AgentConfig = SpecialistAgentConfig | FallbackAgentConfig;
|
|
|
103
114
|
* @beta
|
|
104
115
|
*/
|
|
105
116
|
export declare function defineAgent<const T extends AgentConfig>(config: T): T;
|
|
106
|
-
export {};
|
|
107
117
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,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AAM,EAAE,CAAC,GAAG,CAAC,CAErE"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './main/main';
|
|
2
2
|
export * from './main/main.types';
|
|
3
3
|
export * from './main/main.template';
|
|
4
|
+
export * from './components/agent-picker';
|
|
4
5
|
export * from './components/ai-driver';
|
|
5
6
|
export * from './components/chat-driver';
|
|
6
7
|
export * from './components/orchestrating-driver';
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC"}
|