@genesislcap/ai-assistant 14.483.3-alpha-7a2e689.0 → 14.484.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/custom-elements-manifest.config.js +14 -0
- package/dist/ai-assistant.api.json +113 -4
- package/dist/ai-assistant.d.ts +26 -4
- package/dist/custom-elements.json +8222 -0
- package/dist/dts/components/agent-picker/agent-picker.d.ts +2 -2
- package/dist/dts/components/chat-driver/chat-driver.d.ts +1 -1
- package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts +6 -1
- package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.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 +1 -1
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/main/main.types.d.ts +9 -0
- package/dist/dts/main/main.types.d.ts.map +1 -1
- package/dist/dts/react.d.ts +162 -0
- package/dist/esm/components/agent-picker/agent-picker.js +2 -2
- package/dist/esm/components/chat-driver/chat-driver.js +1 -1
- package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +1 -1
- package/dist/esm/main/main.js +1 -1
- package/dist/esm/main/main.template.js +9 -1
- package/dist/react.cjs +145 -0
- package/dist/react.mjs +128 -0
- package/package.json +18 -17
- package/src/components/agent-picker/agent-picker.ts +2 -2
- package/src/components/chat-driver/chat-driver.ts +1 -1
- package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts +7 -1
- package/src/index.ts +1 -0
- package/src/main/main.template.ts +10 -1
- package/src/main/main.ts +3 -2
- package/src/main/main.types.ts +10 -0
- package/tsdoc.json +14 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/** Globs to analyze */
|
|
3
|
+
globs: ['src/**/*.ts'],
|
|
4
|
+
/** Directory to output CEM to */
|
|
5
|
+
outdir: './dist',
|
|
6
|
+
/** Run in dev mode, provides extra logging */
|
|
7
|
+
dev: false,
|
|
8
|
+
/** Enable special handling for FastElement */
|
|
9
|
+
fast: true,
|
|
10
|
+
/** Include third party custom elements manifests */
|
|
11
|
+
dependencies: true,
|
|
12
|
+
/** Output CEM path to `package.json`, defaults to true */
|
|
13
|
+
packagejson: true,
|
|
14
|
+
};
|
|
@@ -125,6 +125,11 @@
|
|
|
125
125
|
{
|
|
126
126
|
"tagName": "@preapproved",
|
|
127
127
|
"syntaxKind": "modifier"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"tagName": "@fires",
|
|
131
|
+
"syntaxKind": "block",
|
|
132
|
+
"allowMultiple": true
|
|
128
133
|
}
|
|
129
134
|
],
|
|
130
135
|
"supportForTags": {
|
|
@@ -155,7 +160,8 @@
|
|
|
155
160
|
"@virtual": true,
|
|
156
161
|
"@betaDocumentation": true,
|
|
157
162
|
"@internalRemarks": true,
|
|
158
|
-
"@preapproved": true
|
|
163
|
+
"@preapproved": true,
|
|
164
|
+
"@fires": true
|
|
159
165
|
},
|
|
160
166
|
"reportUnsupportedHtmlElements": false
|
|
161
167
|
}
|
|
@@ -1034,7 +1040,7 @@
|
|
|
1034
1040
|
{
|
|
1035
1041
|
"kind": "Class",
|
|
1036
1042
|
"canonicalReference": "@genesislcap/ai-assistant!AgentPicker:class",
|
|
1037
|
-
"docComment": "/**\n * User-facing agent picker rendered above the chat input.\n *\n * Renders `Auto` plus each top-level agent that has `manualSelection.enabled`. Sub-agents and non-selectable specialists are excluded. Hidden when fewer than two agents are configured or none are manually selectable.\n *\n * @fires agent-pinned - Fired when the user changes selection
|
|
1043
|
+
"docComment": "/**\n * User-facing agent picker rendered above the chat input.\n *\n * Renders `Auto` plus each top-level agent that has `manualSelection.enabled`. Sub-agents and non-selectable specialists are excluded. Hidden when fewer than two agents are configured or none are manually selectable.\n *\n * @fires\n *\n * agent-pinned - Fired when the user changes selection with the agent name or `null` for Auto. detail: `string | null`\n *\n * @beta\n */\n",
|
|
1038
1044
|
"excerptTokens": [
|
|
1039
1045
|
{
|
|
1040
1046
|
"kind": "Content",
|
|
@@ -3553,7 +3559,7 @@
|
|
|
3553
3559
|
{
|
|
3554
3560
|
"kind": "Class",
|
|
3555
3561
|
"canonicalReference": "@genesislcap/ai-assistant!ChatDriver:class",
|
|
3556
|
-
"docComment": "/**\n * Plain TS class that drives a multi-turn chat conversation, including the tool-call loop. Owned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.\n *\n * Dispatches `'history-updated'` events on itself so the owning element can observe changes.\n *\n * @fires history-updated - Fired whenever the in-memory chat history changes (append, tool loop, interaction resolution)
|
|
3562
|
+
"docComment": "/**\n * Plain TS class that drives a multi-turn chat conversation, including the tool-call loop. Owned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.\n *\n * Dispatches `'history-updated'` events on itself so the owning element can observe changes.\n *\n * @fires\n *\n * history-updated - Fired whenever the in-memory chat history changes (append, tool loop, interaction resolution) with the full history snapshot. detail: `ReadonlyArray<ChatMessage>`\n *\n * @beta\n */\n",
|
|
3557
3563
|
"excerptTokens": [
|
|
3558
3564
|
{
|
|
3559
3565
|
"kind": "Content",
|
|
@@ -4841,6 +4847,78 @@
|
|
|
4841
4847
|
}
|
|
4842
4848
|
]
|
|
4843
4849
|
},
|
|
4850
|
+
{
|
|
4851
|
+
"kind": "Interface",
|
|
4852
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatHeaderMousedownEventDetail:interface",
|
|
4853
|
+
"docComment": "/**\n * Detail payload for the `chat-header-mousedown` event fired by the assistant in `popout-mode=\"expand\"`.\n *\n * @beta\n */\n",
|
|
4854
|
+
"excerptTokens": [
|
|
4855
|
+
{
|
|
4856
|
+
"kind": "Content",
|
|
4857
|
+
"text": "export interface ChatHeaderMousedownEventDetail "
|
|
4858
|
+
}
|
|
4859
|
+
],
|
|
4860
|
+
"fileUrlPath": "src/main/main.types.ts",
|
|
4861
|
+
"releaseTag": "Beta",
|
|
4862
|
+
"name": "ChatHeaderMousedownEventDetail",
|
|
4863
|
+
"preserveMemberOrder": false,
|
|
4864
|
+
"members": [
|
|
4865
|
+
{
|
|
4866
|
+
"kind": "PropertySignature",
|
|
4867
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatHeaderMousedownEventDetail#clientX:member",
|
|
4868
|
+
"docComment": "",
|
|
4869
|
+
"excerptTokens": [
|
|
4870
|
+
{
|
|
4871
|
+
"kind": "Content",
|
|
4872
|
+
"text": "clientX: "
|
|
4873
|
+
},
|
|
4874
|
+
{
|
|
4875
|
+
"kind": "Content",
|
|
4876
|
+
"text": "number"
|
|
4877
|
+
},
|
|
4878
|
+
{
|
|
4879
|
+
"kind": "Content",
|
|
4880
|
+
"text": ";"
|
|
4881
|
+
}
|
|
4882
|
+
],
|
|
4883
|
+
"isReadonly": false,
|
|
4884
|
+
"isOptional": false,
|
|
4885
|
+
"releaseTag": "Beta",
|
|
4886
|
+
"name": "clientX",
|
|
4887
|
+
"propertyTypeTokenRange": {
|
|
4888
|
+
"startIndex": 1,
|
|
4889
|
+
"endIndex": 2
|
|
4890
|
+
}
|
|
4891
|
+
},
|
|
4892
|
+
{
|
|
4893
|
+
"kind": "PropertySignature",
|
|
4894
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatHeaderMousedownEventDetail#clientY:member",
|
|
4895
|
+
"docComment": "",
|
|
4896
|
+
"excerptTokens": [
|
|
4897
|
+
{
|
|
4898
|
+
"kind": "Content",
|
|
4899
|
+
"text": "clientY: "
|
|
4900
|
+
},
|
|
4901
|
+
{
|
|
4902
|
+
"kind": "Content",
|
|
4903
|
+
"text": "number"
|
|
4904
|
+
},
|
|
4905
|
+
{
|
|
4906
|
+
"kind": "Content",
|
|
4907
|
+
"text": ";"
|
|
4908
|
+
}
|
|
4909
|
+
],
|
|
4910
|
+
"isReadonly": false,
|
|
4911
|
+
"isOptional": false,
|
|
4912
|
+
"releaseTag": "Beta",
|
|
4913
|
+
"name": "clientY",
|
|
4914
|
+
"propertyTypeTokenRange": {
|
|
4915
|
+
"startIndex": 1,
|
|
4916
|
+
"endIndex": 2
|
|
4917
|
+
}
|
|
4918
|
+
}
|
|
4919
|
+
],
|
|
4920
|
+
"extendsTokenRanges": []
|
|
4921
|
+
},
|
|
4844
4922
|
{
|
|
4845
4923
|
"kind": "TypeAlias",
|
|
4846
4924
|
"canonicalReference": "@genesislcap/ai-assistant!ChatHistoryUpdatedEvent:type",
|
|
@@ -5504,7 +5582,7 @@
|
|
|
5504
5582
|
{
|
|
5505
5583
|
"kind": "Class",
|
|
5506
5584
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant:class",
|
|
5507
|
-
"docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * **Cost build history:** opt-in via `chatConfig.costHistory.enabled`. When enabled, finalized sessions persist in `localStorage` (scoped by `costHistory.scope`, the element `id`, or `'default'`). Snapshots run on tab close and when the session title changes; hosts may call {@link FoundationAiAssistant.finalizeCostSession}.\n *\n * @fires chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed
|
|
5585
|
+
"docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * **Cost build history:** opt-in via `chatConfig.costHistory.enabled`. When enabled, finalized sessions persist in `localStorage` (scoped by `costHistory.scope`, the element `id`, or `'default'`). Snapshots run on tab close and when the session title changes; hosts may call {@link FoundationAiAssistant.finalizeCostSession}.\n *\n * @fires\n *\n * chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMousedownEventDetail`\n *\n * @beta\n */\n",
|
|
5508
5586
|
"excerptTokens": [
|
|
5509
5587
|
{
|
|
5510
5588
|
"kind": "Content",
|
|
@@ -10668,6 +10746,37 @@
|
|
|
10668
10746
|
"parameters": [],
|
|
10669
10747
|
"name": "getAiPopoutManager"
|
|
10670
10748
|
},
|
|
10749
|
+
{
|
|
10750
|
+
"kind": "TypeAlias",
|
|
10751
|
+
"canonicalReference": "@genesislcap/ai-assistant!InteractionCompletedEventDetail:type",
|
|
10752
|
+
"docComment": "/**\n * Detail payload for the `interaction-completed` event.\n *\n * @public\n */\n",
|
|
10753
|
+
"excerptTokens": [
|
|
10754
|
+
{
|
|
10755
|
+
"kind": "Content",
|
|
10756
|
+
"text": "export type InteractionCompletedEventDetail = "
|
|
10757
|
+
},
|
|
10758
|
+
{
|
|
10759
|
+
"kind": "Reference",
|
|
10760
|
+
"text": "ChatInteractionEventsMap",
|
|
10761
|
+
"canonicalReference": "@genesislcap/ai-assistant!~ChatInteractionEventsMap:type"
|
|
10762
|
+
},
|
|
10763
|
+
{
|
|
10764
|
+
"kind": "Content",
|
|
10765
|
+
"text": "['interaction-completed']"
|
|
10766
|
+
},
|
|
10767
|
+
{
|
|
10768
|
+
"kind": "Content",
|
|
10769
|
+
"text": ";"
|
|
10770
|
+
}
|
|
10771
|
+
],
|
|
10772
|
+
"fileUrlPath": "src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts",
|
|
10773
|
+
"releaseTag": "Public",
|
|
10774
|
+
"name": "InteractionCompletedEventDetail",
|
|
10775
|
+
"typeTokenRange": {
|
|
10776
|
+
"startIndex": 1,
|
|
10777
|
+
"endIndex": 3
|
|
10778
|
+
}
|
|
10779
|
+
},
|
|
10671
10780
|
{
|
|
10672
10781
|
"kind": "Function",
|
|
10673
10782
|
"canonicalReference": "@genesislcap/ai-assistant!isAiAssistantDocked:function(1)",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -226,8 +226,8 @@ export declare interface AgentLifecycleContext {
|
|
|
226
226
|
* Sub-agents and non-selectable specialists are excluded. Hidden when fewer
|
|
227
227
|
* than two agents are configured or none are manually selectable.
|
|
228
228
|
*
|
|
229
|
-
* @fires agent-pinned - Fired when the user changes selection
|
|
230
|
-
* agent name
|
|
229
|
+
* @fires agent-pinned - Fired when the user changes selection with the
|
|
230
|
+
* agent name or `null` for Auto. detail: `string | null`
|
|
231
231
|
*
|
|
232
232
|
* @beta
|
|
233
233
|
*/
|
|
@@ -762,7 +762,7 @@ export declare type CachePolicyInput = CachePolicy | ((ctx: SystemPromptContext)
|
|
|
762
762
|
*
|
|
763
763
|
* Dispatches `'history-updated'` events on itself so the owning element can observe changes.
|
|
764
764
|
*
|
|
765
|
-
* @fires history-updated - Fired whenever the in-memory chat history changes (append, tool loop, interaction resolution)
|
|
765
|
+
* @fires history-updated - Fired whenever the in-memory chat history changes (append, tool loop, interaction resolution) with the full history snapshot. detail: `ReadonlyArray<ChatMessage>`
|
|
766
766
|
*
|
|
767
767
|
* @beta
|
|
768
768
|
*/
|
|
@@ -1329,6 +1329,16 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
1329
1329
|
private appendToHistory;
|
|
1330
1330
|
}
|
|
1331
1331
|
|
|
1332
|
+
/**
|
|
1333
|
+
* Detail payload for the `chat-header-mousedown` event fired by the assistant
|
|
1334
|
+
* in `popout-mode="expand"`.
|
|
1335
|
+
* @beta
|
|
1336
|
+
*/
|
|
1337
|
+
export declare interface ChatHeaderMousedownEventDetail {
|
|
1338
|
+
clientX: number;
|
|
1339
|
+
clientY: number;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1332
1342
|
/**
|
|
1333
1343
|
* Event emitted when the chat history is updated (new message appended).
|
|
1334
1344
|
*
|
|
@@ -1338,6 +1348,12 @@ export declare type ChatHistoryUpdatedEvent = CustomEvent<ReadonlyArray<ChatMess
|
|
|
1338
1348
|
|
|
1339
1349
|
export { ChatInputDuringExecutionMode }
|
|
1340
1350
|
|
|
1351
|
+
declare type ChatInteractionEventsMap = {
|
|
1352
|
+
'interaction-completed': InteractionResult<unknown> & {
|
|
1353
|
+
interactionId: string;
|
|
1354
|
+
};
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1341
1357
|
export { ChatToolChoice }
|
|
1342
1358
|
|
|
1343
1359
|
/** A model used during a finalized cost session. */
|
|
@@ -1519,7 +1535,7 @@ export declare interface FallbackAgentConfig extends BaseAgentConfig {
|
|
|
1519
1535
|
* element `id`, or `'default'`). Snapshots run on tab close and when the session
|
|
1520
1536
|
* title changes; hosts may call {@link FoundationAiAssistant.finalizeCostSession}.
|
|
1521
1537
|
*
|
|
1522
|
-
* @fires chat-header-mousedown - Fired when the user presses the chat header in `popout-mode="expand"` (for drag-to-popout hosts). Bubbles and composed
|
|
1538
|
+
* @fires chat-header-mousedown - Fired when the user presses the chat header in `popout-mode="expand"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMousedownEventDetail`
|
|
1523
1539
|
*
|
|
1524
1540
|
* @beta
|
|
1525
1541
|
*/
|
|
@@ -2232,6 +2248,12 @@ declare interface InputOverride {
|
|
|
2232
2248
|
mode: ChatInputDuringExecutionMode;
|
|
2233
2249
|
}
|
|
2234
2250
|
|
|
2251
|
+
/**
|
|
2252
|
+
* Detail payload for the `interaction-completed` event.
|
|
2253
|
+
* @public
|
|
2254
|
+
*/
|
|
2255
|
+
export declare type InteractionCompletedEventDetail = ChatInteractionEventsMap['interaction-completed'];
|
|
2256
|
+
|
|
2235
2257
|
/** True when the collapse-mode assistant is active in the layout panel. */
|
|
2236
2258
|
export declare function isAiAssistantDocked(): boolean;
|
|
2237
2259
|
|