@genesislcap/ai-assistant 14.403.0-ai-assistant.1

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.
Files changed (244) hide show
  1. package/api-extractor.json +4 -0
  2. package/dist/ai-assistant.api.json +4028 -0
  3. package/dist/ai-assistant.d.ts +396 -0
  4. package/dist/dts/channel/ai-activity-channel.d.ts +32 -0
  5. package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -0
  6. package/dist/dts/components/activity-halo/activity-halo.d.ts +31 -0
  7. package/dist/dts/components/activity-halo/activity-halo.d.ts.map +1 -0
  8. package/dist/dts/components/chat-bubble/chat-bubble.d.ts +52 -0
  9. package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -0
  10. package/dist/dts/components/chat-bubble/chat-bubble.styles.d.ts +2 -0
  11. package/dist/dts/components/chat-bubble/chat-bubble.styles.d.ts.map +1 -0
  12. package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts +4 -0
  13. package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts.map +1 -0
  14. package/dist/dts/components/chat-bubble/index.d.ts +2 -0
  15. package/dist/dts/components/chat-bubble/index.d.ts.map +1 -0
  16. package/dist/dts/components/chat-driver/chat-driver.d.ts +49 -0
  17. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -0
  18. package/dist/dts/components/chat-driver/index.d.ts +2 -0
  19. package/dist/dts/components/chat-driver/index.d.ts.map +1 -0
  20. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts +19 -0
  21. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts.map +1 -0
  22. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.styles.d.ts +2 -0
  23. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.styles.d.ts.map +1 -0
  24. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.template.d.ts +3 -0
  25. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.template.d.ts.map +1 -0
  26. package/dist/dts/components/chat-interaction-wrapper/index.d.ts +4 -0
  27. package/dist/dts/components/chat-interaction-wrapper/index.d.ts.map +1 -0
  28. package/dist/dts/components/chat-markdown/chat-markdown.d.ts +6 -0
  29. package/dist/dts/components/chat-markdown/chat-markdown.d.ts.map +1 -0
  30. package/dist/dts/components/chat-markdown/index.d.ts +2 -0
  31. package/dist/dts/components/chat-markdown/index.d.ts.map +1 -0
  32. package/dist/dts/components/halo-overlay.d.ts +25 -0
  33. package/dist/dts/components/halo-overlay.d.ts.map +1 -0
  34. package/dist/dts/config/config.d.ts +51 -0
  35. package/dist/dts/config/config.d.ts.map +1 -0
  36. package/dist/dts/config/configure.d.ts +1 -0
  37. package/dist/dts/config/configure.d.ts.map +1 -0
  38. package/dist/dts/config/index.d.ts +2 -0
  39. package/dist/dts/config/index.d.ts.map +1 -0
  40. package/dist/dts/index.d.ts +10 -0
  41. package/dist/dts/index.d.ts.map +1 -0
  42. package/dist/dts/main/index.d.ts +5 -0
  43. package/dist/dts/main/index.d.ts.map +1 -0
  44. package/dist/dts/main/main.d.ts +103 -0
  45. package/dist/dts/main/main.d.ts.map +1 -0
  46. package/dist/dts/main/main.styles.d.ts +2 -0
  47. package/dist/dts/main/main.styles.d.ts.map +1 -0
  48. package/dist/dts/main/main.template.d.ts +4 -0
  49. package/dist/dts/main/main.template.d.ts.map +1 -0
  50. package/dist/dts/main/main.types.d.ts +54 -0
  51. package/dist/dts/main/main.types.d.ts.map +1 -0
  52. package/dist/dts/styles/index.d.ts +2 -0
  53. package/dist/dts/styles/index.d.ts.map +1 -0
  54. package/dist/dts/styles/styles.d.ts +5 -0
  55. package/dist/dts/styles/styles.d.ts.map +1 -0
  56. package/dist/dts/tags/index.d.ts +1 -0
  57. package/dist/dts/tags/index.d.ts.map +1 -0
  58. package/dist/dts/types/ai-chat-widget.d.ts +12 -0
  59. package/dist/dts/types/ai-chat-widget.d.ts.map +1 -0
  60. package/dist/dts/utils/index.d.ts +2 -0
  61. package/dist/dts/utils/index.d.ts.map +1 -0
  62. package/dist/dts/utils/logger.d.ts +2 -0
  63. package/dist/dts/utils/logger.d.ts.map +1 -0
  64. package/dist/esm/channel/ai-activity-channel.js +2 -0
  65. package/dist/esm/components/activity-halo/activity-halo.js +119 -0
  66. package/dist/esm/components/chat-bubble/chat-bubble.js +381 -0
  67. package/dist/esm/components/chat-bubble/chat-bubble.styles.js +193 -0
  68. package/dist/esm/components/chat-bubble/chat-bubble.template.js +50 -0
  69. package/dist/esm/components/chat-bubble/index.js +1 -0
  70. package/dist/esm/components/chat-driver/chat-driver.js +209 -0
  71. package/dist/esm/components/chat-driver/index.js +1 -0
  72. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +90 -0
  73. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.styles.js +6 -0
  74. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.template.js +4 -0
  75. package/dist/esm/components/chat-interaction-wrapper/index.js +3 -0
  76. package/dist/esm/components/chat-markdown/chat-markdown.js +95 -0
  77. package/dist/esm/components/chat-markdown/index.js +1 -0
  78. package/dist/esm/components/halo-overlay.js +118 -0
  79. package/dist/esm/config/config.js +16 -0
  80. package/dist/esm/config/configure.js +0 -0
  81. package/dist/esm/config/index.js +1 -0
  82. package/dist/esm/index.js +8 -0
  83. package/dist/esm/main/index.js +4 -0
  84. package/dist/esm/main/main.js +491 -0
  85. package/dist/esm/main/main.styles.js +356 -0
  86. package/dist/esm/main/main.template.js +272 -0
  87. package/dist/esm/main/main.types.js +22 -0
  88. package/dist/esm/styles/index.js +1 -0
  89. package/dist/esm/styles/styles.js +237 -0
  90. package/dist/esm/tags/index.js +0 -0
  91. package/dist/esm/types/ai-chat-widget.js +1 -0
  92. package/dist/esm/utils/index.js +1 -0
  93. package/dist/esm/utils/logger.js +2 -0
  94. package/dist/tsconfig.tsbuildinfo +1 -0
  95. package/dist/tsdoc-metadata.json +11 -0
  96. package/docs/.gitattributes +2 -0
  97. package/docs/api/ai-assistant.ai_activity_channel_name.md +11 -0
  98. package/docs/api/ai-assistant.aiactivityevents.md +24 -0
  99. package/docs/api/ai-assistant.aiactivityhalo.channelname.md +16 -0
  100. package/docs/api/ai-assistant.aiactivityhalo.connectedcallback.md +18 -0
  101. package/docs/api/ai-assistant.aiactivityhalo.disconnectedcallback.md +18 -0
  102. package/docs/api/ai-assistant.aiactivityhalo.haloactive.md +14 -0
  103. package/docs/api/ai-assistant.aiactivityhalo.md +176 -0
  104. package/docs/api/ai-assistant.aiactivityhalo.minshowtime.md +16 -0
  105. package/docs/api/ai-assistant.aiactivityhalo.tools.md +16 -0
  106. package/docs/api/ai-assistant.aiassistantanimation.md +18 -0
  107. package/docs/api/ai-assistant.aiassistantanimationdef.label.md +16 -0
  108. package/docs/api/ai-assistant.aiassistantanimationdef.md +80 -0
  109. package/docs/api/ai-assistant.aiassistantanimationdef.tooltip.md +16 -0
  110. package/docs/api/ai-assistant.aiassistantconfig.chatconfig.md +16 -0
  111. package/docs/api/ai-assistant.aiassistantconfig.debugstatefactory.md +16 -0
  112. package/docs/api/ai-assistant.aiassistantconfig.headertitle.md +16 -0
  113. package/docs/api/ai-assistant.aiassistantconfig.md +157 -0
  114. package/docs/api/ai-assistant.aiassistantconfig.systemprompt.md +16 -0
  115. package/docs/api/ai-assistant.aiassistantconfig.tooldefinitions.md +16 -0
  116. package/docs/api/ai-assistant.aiassistantconfig.toolhandlers.md +16 -0
  117. package/docs/api/ai-assistant.aiassistantserializedstate.enabledanimations.md +14 -0
  118. package/docs/api/ai-assistant.aiassistantserializedstate.md +118 -0
  119. package/docs/api/ai-assistant.aiassistantserializedstate.messages.md +14 -0
  120. package/docs/api/ai-assistant.aiassistantserializedstate.showthinkingsteps.md +14 -0
  121. package/docs/api/ai-assistant.aiassistantserializedstate.showtoolcalls.md +14 -0
  122. package/docs/api/ai-assistant.aiassistantstate.md +16 -0
  123. package/docs/api/ai-assistant.aichatbubble.bubbleleft.md +11 -0
  124. package/docs/api/ai-assistant.aichatbubble.bubbletop.md +11 -0
  125. package/docs/api/ai-assistant.aichatbubble.channelname.md +11 -0
  126. package/docs/api/ai-assistant.aichatbubble.connectedcallback.md +15 -0
  127. package/docs/api/ai-assistant.aichatbubble.designsystemprefix.md +11 -0
  128. package/docs/api/ai-assistant.aichatbubble.dialogcontent.md +11 -0
  129. package/docs/api/ai-assistant.aichatbubble.dialogcontentchanged.md +64 -0
  130. package/docs/api/ai-assistant.aichatbubble.dialogheight.md +11 -0
  131. package/docs/api/ai-assistant.aichatbubble.dialogleft.md +11 -0
  132. package/docs/api/ai-assistant.aichatbubble.dialogopen.md +11 -0
  133. package/docs/api/ai-assistant.aichatbubble.dialogopenchanged.md +64 -0
  134. package/docs/api/ai-assistant.aichatbubble.dialogtop.md +11 -0
  135. package/docs/api/ai-assistant.aichatbubble.dialogwidth.md +11 -0
  136. package/docs/api/ai-assistant.aichatbubble.disconnectedcallback.md +15 -0
  137. package/docs/api/ai-assistant.aichatbubble.hovered.md +11 -0
  138. package/docs/api/ai-assistant.aichatbubble.imagesrc.md +11 -0
  139. package/docs/api/ai-assistant.aichatbubble.md +396 -0
  140. package/docs/api/ai-assistant.aichatbubble.onbubblemousedown.md +50 -0
  141. package/docs/api/ai-assistant.aichatbubble.onclosedialog.md +15 -0
  142. package/docs/api/ai-assistant.aichatbubble.ondialogheadermousedown.md +53 -0
  143. package/docs/api/ai-assistant.aichatbubble.onpopout.md +15 -0
  144. package/docs/api/ai-assistant.aichatbubble.title.md +11 -0
  145. package/docs/api/ai-assistant.aichatbubble.tooltipstyle.md +11 -0
  146. package/docs/api/ai-assistant.aichatwidget.data.md +14 -0
  147. package/docs/api/ai-assistant.aichatwidget.md +80 -0
  148. package/docs/api/ai-assistant.aichatwidget.resolved.md +16 -0
  149. package/docs/api/ai-assistant.animation_defs.md +25 -0
  150. package/docs/api/ai-assistant.chatdriver._constructor_.md +99 -0
  151. package/docs/api/ai-assistant.chatdriver.gethistory.md +18 -0
  152. package/docs/api/ai-assistant.chatdriver.isbusy.md +18 -0
  153. package/docs/api/ai-assistant.chatdriver.loadhistory.md +55 -0
  154. package/docs/api/ai-assistant.chatdriver.md +158 -0
  155. package/docs/api/ai-assistant.chatdriver.requestinteraction.md +73 -0
  156. package/docs/api/ai-assistant.chatdriver.resolveinteraction.md +69 -0
  157. package/docs/api/ai-assistant.chatdriver.sendmessage.md +69 -0
  158. package/docs/api/ai-assistant.chathistoryupdatedevent.md +16 -0
  159. package/docs/api/ai-assistant.defaultaiassistantconfig.md +16 -0
  160. package/docs/api/ai-assistant.foundationaiassistant.aiprovider.md +14 -0
  161. package/docs/api/ai-assistant.foundationaiassistant.applystate.md +55 -0
  162. package/docs/api/ai-assistant.foundationaiassistant.attachmenterrors.md +14 -0
  163. package/docs/api/ai-assistant.foundationaiassistant.attachments.md +14 -0
  164. package/docs/api/ai-assistant.foundationaiassistant.channelname.md +14 -0
  165. package/docs/api/ai-assistant.foundationaiassistant.chatconfig.md +14 -0
  166. package/docs/api/ai-assistant.foundationaiassistant.connectedcallback.md +18 -0
  167. package/docs/api/ai-assistant.foundationaiassistant.debugstatefactory.md +14 -0
  168. package/docs/api/ai-assistant.foundationaiassistant.designsystemprefix.md +14 -0
  169. package/docs/api/ai-assistant.foundationaiassistant.disconnectedcallback.md +18 -0
  170. package/docs/api/ai-assistant.foundationaiassistant.downloadhistory.md +18 -0
  171. package/docs/api/ai-assistant.foundationaiassistant.enabledanimations.md +16 -0
  172. package/docs/api/ai-assistant.foundationaiassistant.handlefileselect.md +53 -0
  173. package/docs/api/ai-assistant.foundationaiassistant.handleinteractioncompleted.md +53 -0
  174. package/docs/api/ai-assistant.foundationaiassistant.handlepopout.md +20 -0
  175. package/docs/api/ai-assistant.foundationaiassistant.handlesendclick.md +18 -0
  176. package/docs/api/ai-assistant.foundationaiassistant.hasactivependinginteraction.md +16 -0
  177. package/docs/api/ai-assistant.foundationaiassistant.headertitle.md +14 -0
  178. package/docs/api/ai-assistant.foundationaiassistant.imagesrc.md +14 -0
  179. package/docs/api/ai-assistant.foundationaiassistant.inputvalue.md +14 -0
  180. package/docs/api/ai-assistant.foundationaiassistant.md +826 -0
  181. package/docs/api/ai-assistant.foundationaiassistant.messages.md +14 -0
  182. package/docs/api/ai-assistant.foundationaiassistant.messageschanged.md +18 -0
  183. package/docs/api/ai-assistant.foundationaiassistant.onchatheadermousedown.md +53 -0
  184. package/docs/api/ai-assistant.foundationaiassistant.placeholder.md +14 -0
  185. package/docs/api/ai-assistant.foundationaiassistant.popoutmode.md +16 -0
  186. package/docs/api/ai-assistant.foundationaiassistant.removeattachment.md +53 -0
  187. package/docs/api/ai-assistant.foundationaiassistant.removeattachmenterror.md +53 -0
  188. package/docs/api/ai-assistant.foundationaiassistant.setenabledanimations.md +53 -0
  189. package/docs/api/ai-assistant.foundationaiassistant.settingsopen.md +16 -0
  190. package/docs/api/ai-assistant.foundationaiassistant.showhalo.md +16 -0
  191. package/docs/api/ai-assistant.foundationaiassistant.showhalochanged.md +18 -0
  192. package/docs/api/ai-assistant.foundationaiassistant.showloadingindicator.md +16 -0
  193. package/docs/api/ai-assistant.foundationaiassistant.showloadingindicatorchanged.md +18 -0
  194. package/docs/api/ai-assistant.foundationaiassistant.showthinkingsteps.md +16 -0
  195. package/docs/api/ai-assistant.foundationaiassistant.showtoolcalls.md +16 -0
  196. package/docs/api/ai-assistant.foundationaiassistant.state.md +14 -0
  197. package/docs/api/ai-assistant.foundationaiassistant.statechanged.md +18 -0
  198. package/docs/api/ai-assistant.foundationaiassistant.systemprompt.md +14 -0
  199. package/docs/api/ai-assistant.foundationaiassistant.togglesettings.md +18 -0
  200. package/docs/api/ai-assistant.foundationaiassistant.toggleshowthinkingsteps.md +18 -0
  201. package/docs/api/ai-assistant.foundationaiassistant.toggleshowtoolcalls.md +18 -0
  202. package/docs/api/ai-assistant.foundationaiassistant.tooldefinitions.md +14 -0
  203. package/docs/api/ai-assistant.foundationaiassistant.toolhandlers.md +14 -0
  204. package/docs/api/ai-assistant.foundationaiassistant.triggerfileinput.md +18 -0
  205. package/docs/api/ai-assistant.foundationaiassistant.visiblemessages.md +16 -0
  206. package/docs/api/ai-assistant.foundationaiassistanttemplate.md +50 -0
  207. package/docs/api/ai-assistant.md +262 -0
  208. package/docs/api/ai-assistant.popoutmode.md +16 -0
  209. package/docs/api/index.md +30 -0
  210. package/docs/api-report.md.api.md +280 -0
  211. package/license.txt +46 -0
  212. package/package.json +92 -0
  213. package/src/channel/ai-activity-channel.ts +30 -0
  214. package/src/components/activity-halo/activity-halo.ts +113 -0
  215. package/src/components/chat-bubble/chat-bubble.styles.ts +194 -0
  216. package/src/components/chat-bubble/chat-bubble.template.ts +63 -0
  217. package/src/components/chat-bubble/chat-bubble.ts +389 -0
  218. package/src/components/chat-bubble/index.ts +1 -0
  219. package/src/components/chat-driver/chat-driver.ts +254 -0
  220. package/src/components/chat-driver/index.ts +1 -0
  221. package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.styles.ts +7 -0
  222. package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.template.ts +6 -0
  223. package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts +89 -0
  224. package/src/components/chat-interaction-wrapper/index.ts +3 -0
  225. package/src/components/chat-markdown/chat-markdown.ts +87 -0
  226. package/src/components/chat-markdown/index.ts +1 -0
  227. package/src/components/halo-overlay.ts +115 -0
  228. package/src/config/config.ts +59 -0
  229. package/src/config/configure.ts +0 -0
  230. package/src/config/index.ts +1 -0
  231. package/src/index.ts +9 -0
  232. package/src/main/index.ts +4 -0
  233. package/src/main/main.styles.ts +357 -0
  234. package/src/main/main.template.ts +364 -0
  235. package/src/main/main.ts +474 -0
  236. package/src/main/main.types.ts +58 -0
  237. package/src/styles/index.ts +1 -0
  238. package/src/styles/styles.ts +238 -0
  239. package/src/tags/index.ts +0 -0
  240. package/src/types/ai-chat-widget.ts +11 -0
  241. package/src/utils/index.ts +1 -0
  242. package/src/utils/logger.ts +3 -0
  243. package/temp/api-report.md.api.md +280 -0
  244. package/tsconfig.json +11 -0
@@ -0,0 +1,396 @@
1
+ import { AIProvider } from '@genesislcap/foundation-ai';
2
+ import type { ChatAttachment } from '@genesislcap/foundation-ai';
3
+ import type { ChatConfig } from '@genesislcap/foundation-ai';
4
+ import type { ChatMessage } from '@genesislcap/foundation-ai';
5
+ import type { ChatToolDefinition } from '@genesislcap/foundation-ai';
6
+ import type { ChatToolHandlers } from '@genesislcap/foundation-ai';
7
+ import { GenesisElement } from '@genesislcap/web-core';
8
+ import { InterfaceSymbol } from '@microsoft/fast-foundation';
9
+ import { PartialGenesisElementDefinition } from '@genesislcap/web-core';
10
+ import { ViewTemplate } from '@genesislcap/web-core';
11
+
12
+ export declare const AI_ACTIVITY_CHANNEL_NAME = "foundation-ai-activity";
13
+
14
+ export declare type AiActivityEvents = {
15
+ /** Fired when the assistant begins a tool call. Contains the names of all active tools. */
16
+ 'halo-start': {
17
+ toolNames: string[];
18
+ };
19
+ /** Fired when the assistant finishes all tool processing and returns to idle. */
20
+ 'halo-stop': void;
21
+ /** Fired when the user clicks the expand button — moves assistant from bubble into layout. */
22
+ 'chat-popout': {
23
+ state: AiAssistantSerializedState;
24
+ };
25
+ /** Fired when the user clicks the collapse button — moves assistant from layout back to bubble. */
26
+ 'chat-popin': {
27
+ state: AiAssistantSerializedState;
28
+ };
29
+ };
30
+
31
+ /**
32
+ * Wrapper component that shows an `<ai-halo-overlay>` when the AI assistant
33
+ * is executing one of the declared tool names.
34
+ *
35
+ * @example
36
+ * ```html
37
+ * <ai-activity-halo tools="search_trades">
38
+ * <trades-grid></trades-grid>
39
+ * </ai-activity-halo>
40
+ * ```
41
+ *
42
+ * @beta
43
+ */
44
+ export declare class AiActivityHalo extends GenesisElement {
45
+ /** Comma-separated list of tool names this element reacts to. */
46
+ tools: string;
47
+ /** Broadcast channel name — must match the assistant's channel-name attribute. */
48
+ channelName: string;
49
+ /** Minimum time in ms the halo stays visible after activation. */
50
+ minShowTime: number;
51
+ haloActive: boolean;
52
+ private channel?;
53
+ private hideTimeout?;
54
+ private startTime;
55
+ connectedCallback(): void;
56
+ disconnectedCallback(): void;
57
+ private activate;
58
+ private scheduleDeactivate;
59
+ }
60
+
61
+ /**
62
+ * Union of all available animation names, derived from {@link ANIMATION_DEFS}.
63
+ *
64
+ * @beta
65
+ */
66
+ export declare type AiAssistantAnimation = keyof typeof ANIMATION_DEFS;
67
+
68
+ /**
69
+ * Metadata describing a UI animation in the assistant.
70
+ *
71
+ * @beta
72
+ */
73
+ export declare interface AiAssistantAnimationDef {
74
+ /** Display label shown in the settings multiselect. */
75
+ label: string;
76
+ /** Short description shown as a tooltip on the option. */
77
+ tooltip: string;
78
+ }
79
+
80
+ /**
81
+ * Do not reference any ../main files here. We must avoid ../tags being referenced and
82
+ * therefore set up pre-configuration.
83
+ */
84
+ /**
85
+ * AiAssistantConfig DI interface.
86
+ *
87
+ * @beta
88
+ */
89
+ export declare interface AiAssistantConfig extends PartialGenesisElementDefinition {
90
+ /**
91
+ * Display title shown in the chat header (e.g. 'Trades Assistant').
92
+ */
93
+ headerTitle?: string;
94
+ /**
95
+ * Chat display and behaviour configuration.
96
+ */
97
+ chatConfig: ChatConfig;
98
+ /**
99
+ * Tool handlers injected per-app at configure() time.
100
+ */
101
+ toolHandlers?: ChatToolHandlers;
102
+ /**
103
+ * Tool definitions (JSON Schema) passed to the AI provider.
104
+ */
105
+ toolDefinitions?: ChatToolDefinition[];
106
+ /**
107
+ * System prompt injected into every conversation.
108
+ */
109
+ systemPrompt?: string;
110
+ /**
111
+ * Optional factory called at download time to include extra app-specific debug state
112
+ * alongside the message history. Only used when `chatConfig.allowDebugDownload` is `true`.
113
+ */
114
+ debugStateFactory?: () => unknown;
115
+ }
116
+
117
+ /**
118
+ * AiAssistantConfig DI key.
119
+ *
120
+ * @internal
121
+ */
122
+ export declare const AiAssistantConfig: InterfaceSymbol<AiAssistantConfig>;
123
+
124
+ /**
125
+ * Serialized state of a `FoundationAiAssistant` instance.
126
+ * All fields are JSON-serializable and round-trip through BroadcastChannel structured-clone.
127
+ *
128
+ * @beta
129
+ */
130
+ export declare interface AiAssistantSerializedState {
131
+ messages: ChatMessage[];
132
+ showToolCalls: boolean;
133
+ showThinkingSteps: boolean;
134
+ enabledAnimations: AiAssistantAnimation[];
135
+ }
136
+
137
+ /**
138
+ * State of the AI assistant component.
139
+ *
140
+ * @beta
141
+ */
142
+ export declare type AiAssistantState = 'idle' | 'loading' | 'error';
143
+
144
+ export declare class AiChatBubble extends GenesisElement {
145
+ title: string;
146
+ imageSrc?: string;
147
+ channelName: string;
148
+ designSystemPrefix: string;
149
+ dialogContent: HTMLElement[];
150
+ private tooltipMeasuredWidth;
151
+ bubbleLeft: number;
152
+ bubbleTop: number;
153
+ dialogLeft: number;
154
+ dialogTop: number;
155
+ dialogWidth: number;
156
+ dialogHeight: number;
157
+ dialogOpen: boolean;
158
+ hovered: boolean;
159
+ private bubbleChannel?;
160
+ private injectedCloseBtn?;
161
+ private resizeObserver?;
162
+ private dragging;
163
+ private dragTarget;
164
+ private startMouseX;
165
+ private startMouseY;
166
+ private startElemLeft;
167
+ private startElemTop;
168
+ private hasDragged;
169
+ private latestMouseX;
170
+ private latestMouseY;
171
+ private rafHandle?;
172
+ private closeAbort?;
173
+ connectedCallback(): void;
174
+ disconnectedCallback(): void;
175
+ dialogOpenChanged(_: boolean, next: boolean): void;
176
+ dialogContentChanged(_: HTMLElement[], next: HTMLElement[]): void;
177
+ private injectCloseButton;
178
+ private onBubbleChannelMessage;
179
+ onBubbleMouseDown(e: MouseEvent): void;
180
+ onDialogHeaderMouseDown(e: CustomEvent<{
181
+ clientX: number;
182
+ clientY: number;
183
+ }>): void;
184
+ private readonly onCloseBtnClick;
185
+ private cancelClose;
186
+ private startCloseDialog;
187
+ private onDocMouseMove;
188
+ private applyDragFrame;
189
+ private onDocMouseUp;
190
+ onPopout(): void;
191
+ onCloseDialog(): void;
192
+ get tooltipStyle(): string;
193
+ }
194
+
195
+ /**
196
+ * Interface that AI inline interaction components can implement.
197
+ * The `AiChatInteractionWrapper` always sets `data` and `resolved` on the rendered element.
198
+ *
199
+ * @beta
200
+ */
201
+ export declare interface AiChatWidget {
202
+ data: unknown;
203
+ /** When true, the interaction has already been resolved. Components should render read-only. */
204
+ resolved?: boolean;
205
+ }
206
+
207
+ /**
208
+ * All available animation names, derived from the registry.
209
+ *
210
+ * @internal
211
+ */
212
+ export declare const ALL_ANIMATIONS: AiAssistantAnimation[];
213
+
214
+ /**
215
+ * Registry of all available animations with their display metadata.
216
+ * Adding an entry here automatically extends the {@link AiAssistantAnimation} type.
217
+ *
218
+ * @beta
219
+ */
220
+ export declare const ANIMATION_DEFS: {
221
+ loading: {
222
+ label: string;
223
+ tooltip: string;
224
+ };
225
+ halo: {
226
+ label: string;
227
+ tooltip: string;
228
+ };
229
+ };
230
+
231
+ /**
232
+ * Plain TS class that drives a multi-turn chat conversation, including the tool-call loop.
233
+ * Owned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.
234
+ *
235
+ * Dispatches `'history-updated'` events on itself so the owning element can observe changes.
236
+ *
237
+ * @beta
238
+ */
239
+ export declare class ChatDriver extends EventTarget {
240
+ private readonly aiProvider;
241
+ private readonly toolHandlers;
242
+ private readonly toolDefinitions;
243
+ private readonly systemPrompt?;
244
+ private history;
245
+ private busy;
246
+ private pendingInteractions;
247
+ constructor(aiProvider: AIProvider, toolHandlers?: ChatToolHandlers, toolDefinitions?: ChatToolDefinition[], systemPrompt?: string);
248
+ getHistory(): ReadonlyArray<ChatMessage>;
249
+ isBusy(): boolean;
250
+ /**
251
+ * Request a custom UI interaction. Emits a new message with the interaction.
252
+ * Tool handlers can call this to pause execution until the user completes the UI interaction.
253
+ *
254
+ * @param componentName - The custom element name to render.
255
+ * @param data - Data to pass to the component.
256
+ */
257
+ requestInteraction<T>(componentName: string, data: any): Promise<T>;
258
+ /**
259
+ * Resolve a pending interaction. The wrapper component calls this on completion.
260
+ * Marks the interaction message as resolved so it renders read-only on re-render.
261
+ */
262
+ resolveInteraction(interactionId: string, result: any): void;
263
+ /**
264
+ * Seeds the driver with a prior conversation history so a new component instance
265
+ * can continue an existing conversation. Call this before the first user message.
266
+ */
267
+ loadHistory(messages: ChatMessage[]): void;
268
+ sendMessage(userInput: string, attachments?: ChatAttachment[]): Promise<void>;
269
+ private runToolLoop;
270
+ private appendToHistory;
271
+ }
272
+
273
+ /**
274
+ * Event emitted when the chat history is updated (new message appended).
275
+ *
276
+ * @beta
277
+ */
278
+ export declare type ChatHistoryUpdatedEvent = CustomEvent<ReadonlyArray<ChatMessage>>;
279
+
280
+ /**
281
+ * Default AiAssistantConfig DI implementation.
282
+ *
283
+ * @beta
284
+ */
285
+ export declare const defaultAiAssistantConfig: AiAssistantConfig;
286
+
287
+ /**
288
+ * Foundation AI Assistant component.
289
+ *
290
+ * @remarks
291
+ * Lazy-loaded via `configure()`. Inject an `AIProvider` and `AiAssistantConfig` through the DI
292
+ * container. The component creates a `ChatDriver` to manage the conversation loop.
293
+ *
294
+ * @beta
295
+ */
296
+ export declare class FoundationAiAssistant extends GenesisElement {
297
+ aiProvider: AIProvider;
298
+ designSystemPrefix: string;
299
+ headerTitle?: string;
300
+ channelName: string;
301
+ imageSrc?: string;
302
+ placeholder: string;
303
+ /**
304
+ * Controls the pop-out button shown next to the settings cog.
305
+ * "expand" — in bubble, expands to layout panel (fires chat-popout).
306
+ * "collapse" — in layout panel, collapses back to bubble (fires chat-popin).
307
+ * Absent — no button (default standalone behaviour, no breaking change).
308
+ */
309
+ popoutMode?: PopoutMode;
310
+ systemPrompt?: string;
311
+ toolDefinitions?: ChatToolDefinition[];
312
+ toolHandlers?: ChatToolHandlers;
313
+ chatConfig: ChatConfig;
314
+ debugStateFactory?: () => unknown;
315
+ messages: ChatMessage[];
316
+ state: AiAssistantState;
317
+ inputValue: string;
318
+ attachments: ChatAttachment[];
319
+ attachmentErrors: string[];
320
+ /** Current user-facing toggle state for tool call visibility. */
321
+ showToolCalls: boolean;
322
+ /** Current user-facing toggle state for thinking step visibility. */
323
+ showThinkingSteps: boolean;
324
+ /** Currently enabled animations. */
325
+ enabledAnimations: AiAssistantAnimation[];
326
+ /** Whether the loading spinner is currently visible. Controlled by the loading delay timer. */
327
+ showLoadingIndicator: boolean;
328
+ /** Whether the settings panel is open. */
329
+ settingsOpen: boolean;
330
+ private driver?;
331
+ private loadingTimer;
332
+ private activityChannel?;
333
+ private haloStartPublished;
334
+ /**
335
+ * Whether the halo animation should be shown.
336
+ * True when the AI is actively computing (loading state, no pending interaction).
337
+ */
338
+ showHalo: boolean;
339
+ private syncShowHalo;
340
+ /** True when there is a pending (unresolved) interaction — disables the popout button. */
341
+ get hasActivePendingInteraction(): boolean;
342
+ showHaloChanged(): void;
343
+ private getActiveToolNames;
344
+ /**
345
+ * Messages filtered by the current toggle state.
346
+ * Tool-related messages (those with toolCalls or toolResult) are hidden when
347
+ * `showToolCalls` is false.
348
+ */
349
+ get visibleMessages(): ChatMessage[];
350
+ connectedCallback(): void;
351
+ disconnectedCallback(): void;
352
+ private onChannelMessage;
353
+ stateChanged(): void;
354
+ messagesChanged(): void;
355
+ showLoadingIndicatorChanged(): void;
356
+ private scrollToBottom;
357
+ private static readonly DEFAULT_LOADING_DELAY_S;
358
+ private static readonly MS_PER_SECOND;
359
+ private startLoadingTimer;
360
+ private clearLoadingTimer;
361
+ private stopLoadingTimer;
362
+ /** Called when the user clicks the popout button. */
363
+ handlePopout(): void;
364
+ /** Applies a serialized state snapshot to this live instance (used on collapse path). */
365
+ applyState(state: AiAssistantSerializedState): void;
366
+ private serializeState;
367
+ toggleSettings(): void;
368
+ toggleShowToolCalls(): void;
369
+ toggleShowThinkingSteps(): void;
370
+ setEnabledAnimations(animations: AiAssistantAnimation[]): void;
371
+ downloadHistory(): void;
372
+ triggerFileInput(): void;
373
+ handleFileSelect(e: Event): void;
374
+ removeAttachment(attachment: ChatAttachment): void;
375
+ removeAttachmentError(message: string): void;
376
+ private isAcceptedFile;
377
+ private readFileAsText;
378
+ private loadSelectedFiles;
379
+ handleSendClick(): void;
380
+ private send;
381
+ onChatHeaderMouseDown(e: MouseEvent): void;
382
+ handleInteractionCompleted(e: Event): void;
383
+ }
384
+
385
+ export declare const FoundationAiAssistantTemplate: (designSystemPrefix: string) => ViewTemplate<FoundationAiAssistant>;
386
+
387
+ /**
388
+ * Controls the pop-out button shown in the assistant header.
389
+ * - `"expand"` — assistant is embedded in the bubble dialog; button expands it to a layout panel.
390
+ * - `"collapse"` — assistant is in a layout panel; button collapses it back to the bubble.
391
+ *
392
+ * @beta
393
+ */
394
+ export declare type PopoutMode = 'expand' | 'collapse';
395
+
396
+ export { }
@@ -0,0 +1,32 @@
1
+ import type { ChatMessage } from '@genesislcap/foundation-ai';
2
+ import type { AiAssistantAnimation } from '../main/main.types';
3
+ export declare const AI_ACTIVITY_CHANNEL_NAME = "foundation-ai-activity";
4
+ /**
5
+ * Serialized state of a `FoundationAiAssistant` instance.
6
+ * All fields are JSON-serializable and round-trip through BroadcastChannel structured-clone.
7
+ *
8
+ * @beta
9
+ */
10
+ export interface AiAssistantSerializedState {
11
+ messages: ChatMessage[];
12
+ showToolCalls: boolean;
13
+ showThinkingSteps: boolean;
14
+ enabledAnimations: AiAssistantAnimation[];
15
+ }
16
+ export type AiActivityEvents = {
17
+ /** Fired when the assistant begins a tool call. Contains the names of all active tools. */
18
+ 'halo-start': {
19
+ toolNames: string[];
20
+ };
21
+ /** Fired when the assistant finishes all tool processing and returns to idle. */
22
+ 'halo-stop': void;
23
+ /** Fired when the user clicks the expand button — moves assistant from bubble into layout. */
24
+ 'chat-popout': {
25
+ state: AiAssistantSerializedState;
26
+ };
27
+ /** Fired when the user clicks the collapse button — moves assistant from layout back to bubble. */
28
+ 'chat-popin': {
29
+ state: AiAssistantSerializedState;
30
+ };
31
+ };
32
+ //# sourceMappingURL=ai-activity-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-activity-channel.d.ts","sourceRoot":"","sources":["../../../src/channel/ai-activity-channel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,eAAO,MAAM,wBAAwB,2BAA2B,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;CAC3C;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,2FAA2F;IAC3F,YAAY,EAAE;QAAE,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACtC,iFAAiF;IACjF,WAAW,EAAE,IAAI,CAAC;IAClB,8FAA8F;IAC9F,aAAa,EAAE;QAAE,KAAK,EAAE,0BAA0B,CAAA;KAAE,CAAC;IACrD,mGAAmG;IACnG,YAAY,EAAE;QAAE,KAAK,EAAE,0BAA0B,CAAA;KAAE,CAAC;CACrD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { GenesisElement } from '@genesislcap/web-core';
2
+ /**
3
+ * Wrapper component that shows an `<ai-halo-overlay>` when the AI assistant
4
+ * is executing one of the declared tool names.
5
+ *
6
+ * @example
7
+ * ```html
8
+ * <ai-activity-halo tools="search_trades">
9
+ * <trades-grid></trades-grid>
10
+ * </ai-activity-halo>
11
+ * ```
12
+ *
13
+ * @beta
14
+ */
15
+ export declare class AiActivityHalo extends GenesisElement {
16
+ /** Comma-separated list of tool names this element reacts to. */
17
+ tools: string;
18
+ /** Broadcast channel name — must match the assistant's channel-name attribute. */
19
+ channelName: string;
20
+ /** Minimum time in ms the halo stays visible after activation. */
21
+ minShowTime: number;
22
+ haloActive: boolean;
23
+ private channel?;
24
+ private hideTimeout?;
25
+ private startTime;
26
+ connectedCallback(): void;
27
+ disconnectedCallback(): void;
28
+ private activate;
29
+ private scheduleDeactivate;
30
+ }
31
+ //# sourceMappingURL=activity-halo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-halo.d.ts","sourceRoot":"","sources":["../../../../src/components/activity-halo/activity-halo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAS9F;;;;;;;;;;;;GAYG;AACH,qBAqBa,cAAe,SAAQ,cAAc;IAChD,iEAAiE;IAC3D,KAAK,EAAE,MAAM,CAAM;IAEzB,kFAAkF;IAC7C,WAAW,EAAE,MAAM,CAA4B;IAEpF,kEAAkE;IAElE,WAAW,EAAE,MAAM,CAAyB;IAEhC,UAAU,EAAE,OAAO,CAAS;IAExC,OAAO,CAAC,OAAO,CAAC,CAA0C;IAC1D,OAAO,CAAC,WAAW,CAAC,CAAgC;IACpD,OAAO,CAAC,SAAS,CAAa;IAE9B,iBAAiB;IAmBjB,oBAAoB;IAUpB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,kBAAkB;CAY3B"}
@@ -0,0 +1,52 @@
1
+ import { GenesisElement } from '@genesislcap/web-core';
2
+ export declare class AiChatBubble extends GenesisElement {
3
+ title: string;
4
+ imageSrc?: string;
5
+ channelName: string;
6
+ designSystemPrefix: string;
7
+ dialogContent: HTMLElement[];
8
+ private tooltipMeasuredWidth;
9
+ bubbleLeft: number;
10
+ bubbleTop: number;
11
+ dialogLeft: number;
12
+ dialogTop: number;
13
+ dialogWidth: number;
14
+ dialogHeight: number;
15
+ dialogOpen: boolean;
16
+ hovered: boolean;
17
+ private bubbleChannel?;
18
+ private injectedCloseBtn?;
19
+ private resizeObserver?;
20
+ private dragging;
21
+ private dragTarget;
22
+ private startMouseX;
23
+ private startMouseY;
24
+ private startElemLeft;
25
+ private startElemTop;
26
+ private hasDragged;
27
+ private latestMouseX;
28
+ private latestMouseY;
29
+ private rafHandle?;
30
+ private closeAbort?;
31
+ connectedCallback(): void;
32
+ disconnectedCallback(): void;
33
+ dialogOpenChanged(_: boolean, next: boolean): void;
34
+ dialogContentChanged(_: HTMLElement[], next: HTMLElement[]): void;
35
+ private injectCloseButton;
36
+ private onBubbleChannelMessage;
37
+ onBubbleMouseDown(e: MouseEvent): void;
38
+ onDialogHeaderMouseDown(e: CustomEvent<{
39
+ clientX: number;
40
+ clientY: number;
41
+ }>): void;
42
+ private readonly onCloseBtnClick;
43
+ private cancelClose;
44
+ private startCloseDialog;
45
+ private onDocMouseMove;
46
+ private applyDragFrame;
47
+ private onDocMouseUp;
48
+ onPopout(): void;
49
+ onCloseDialog(): void;
50
+ get tooltipStyle(): string;
51
+ }
52
+ //# sourceMappingURL=chat-bubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-bubble.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAsC9F,qBAOa,YAAa,SAAQ,cAAc;IAChB,KAAK,EAAE,MAAM,CAAkB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAA4B;IACvC,kBAAkB,EAAE,MAAM,CAAW;IAEtE,aAAa,EAAE,WAAW,EAAE,CAAM;IAClC,OAAO,CAAC,oBAAoB,CAAa;IACzC,UAAU,EAAE,MAAM,CAAK;IACvB,SAAS,EAAE,MAAM,CAAK;IACtB,UAAU,EAAE,MAAM,CAAK;IACvB,SAAS,EAAE,MAAM,CAAK;IACtB,WAAW,EAAE,MAAM,CAAwB;IAC3C,YAAY,EAAE,MAAM,CAAyB;IAC7C,UAAU,EAAE,OAAO,CAAS;IAC5B,OAAO,EAAE,OAAO,CAAS;IAErC,OAAO,CAAC,aAAa,CAAC,CAA0C;IAChE,OAAO,CAAC,gBAAgB,CAAC,CAAU;IACnC,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,iBAAiB;IA0BjB,oBAAoB;IAoBpB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO;IAoB3C,oBAAoB,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAc1D,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,sBAAsB,CAS5B;IAEF,iBAAiB,CAAC,CAAC,EAAE,UAAU;IAa/B,uBAAuB,CAAC,CAAC,EAAE,WAAW,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAmB5E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8B;IAO9D,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,cAAc,CAOpB;IASF,OAAO,CAAC,cAAc,CAyBpB;IAMF,OAAO,CAAC,YAAY,CA0ClB;IAEF,QAAQ;IAIR,aAAa;IAiBb,IAAI,YAAY,IAAI,MAAM,CAazB;CACF"}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
2
+ //# sourceMappingURL=chat-bubble.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-bubble.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,iDA+LlB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ViewTemplate } from '@genesislcap/web-core';
2
+ import type { AiChatBubble } from './chat-bubble';
3
+ export declare const AiChatBubbleTemplate: () => ViewTemplate<AiChatBubble>;
4
+ //# sourceMappingURL=chat-bubble.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-bubble.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,CA6ChE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './chat-bubble';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { AIProvider, ChatAttachment, ChatMessage, ChatToolDefinition, ChatToolHandlers } from '@genesislcap/foundation-ai';
2
+ /**
3
+ * Event emitted when the chat history is updated (new message appended).
4
+ *
5
+ * @beta
6
+ */
7
+ export type ChatHistoryUpdatedEvent = CustomEvent<ReadonlyArray<ChatMessage>>;
8
+ /**
9
+ * Plain TS class that drives a multi-turn chat conversation, including the tool-call loop.
10
+ * Owned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.
11
+ *
12
+ * Dispatches `'history-updated'` events on itself so the owning element can observe changes.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class ChatDriver extends EventTarget {
17
+ private readonly aiProvider;
18
+ private readonly toolHandlers;
19
+ private readonly toolDefinitions;
20
+ private readonly systemPrompt?;
21
+ private history;
22
+ private busy;
23
+ private pendingInteractions;
24
+ constructor(aiProvider: AIProvider, toolHandlers?: ChatToolHandlers, toolDefinitions?: ChatToolDefinition[], systemPrompt?: string);
25
+ getHistory(): ReadonlyArray<ChatMessage>;
26
+ isBusy(): boolean;
27
+ /**
28
+ * Request a custom UI interaction. Emits a new message with the interaction.
29
+ * Tool handlers can call this to pause execution until the user completes the UI interaction.
30
+ *
31
+ * @param componentName - The custom element name to render.
32
+ * @param data - Data to pass to the component.
33
+ */
34
+ requestInteraction<T>(componentName: string, data: any): Promise<T>;
35
+ /**
36
+ * Resolve a pending interaction. The wrapper component calls this on completion.
37
+ * Marks the interaction message as resolved so it renders read-only on re-render.
38
+ */
39
+ resolveInteraction(interactionId: string, result: any): void;
40
+ /**
41
+ * Seeds the driver with a prior conversation history so a new component instance
42
+ * can continue an existing conversation. Call this before the first user message.
43
+ */
44
+ loadHistory(messages: ChatMessage[]): void;
45
+ sendMessage(userInput: string, attachments?: ChatAttachment[]): Promise<void>;
46
+ private runToolLoop;
47
+ private appendToHistory;
48
+ }
49
+ //# sourceMappingURL=chat-driver.d.ts.map
@@ -0,0 +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,WAAW,EAEX,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAOpC;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AAE9E;;;;;;;GAOG;AACH,qBAAa,UAAW,SAAQ,WAAW;IASvC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAXhC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,mBAAmB,CAGvB;gBAGe,UAAU,EAAE,UAAU,EACtB,YAAY,GAAE,gBAAqB,EACnC,eAAe,GAAE,kBAAkB,EAAO,EAC1C,YAAY,CAAC,EAAE,MAAM;IAKxC,UAAU,IAAI,aAAa,CAAC,WAAW,CAAC;IAIxC,MAAM,IAAI,OAAO;IAIjB;;;;;;OAMG;IACU,kBAAkB,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC;IAYhF;;;OAGG;IACI,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,IAAI;IAqBnE;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAI3C,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAoBrE,WAAW;IAuHzB,OAAO,CAAC,eAAe;CAQxB"}
@@ -0,0 +1,2 @@
1
+ export * from './chat-driver';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { InteractionResult } from '@genesislcap/foundation-ai';
2
+ import { GenesisElement } from '@genesislcap/web-core';
3
+ export type ChatInteractionEventsMap = {
4
+ 'interaction-completed': InteractionResult<unknown> & {
5
+ interactionId: string;
6
+ };
7
+ };
8
+ export declare class AiChatInteractionWrapper extends GenesisElement {
9
+ componentName: string;
10
+ data: any;
11
+ interactionId: string;
12
+ /** When true, the interaction has already been resolved. Forwarded to the rendered component. */
13
+ resolved: boolean;
14
+ connectedCallback(): void;
15
+ componentNameChanged(): void;
16
+ resolvedChanged(): void;
17
+ private renderComponent;
18
+ }
19
+ //# sourceMappingURL=chat-interaction-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-interaction-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAKlF,MAAM,MAAM,wBAAwB,GAAG;IACrC,uBAAuB,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CACjF,CAAC;AAEF,qBAKa,wBAAyB,SAAQ,cAAc;IAC9C,aAAa,EAAE,MAAM,CAAM;IAC3B,IAAI,EAAE,GAAG,CAAC;IACV,aAAa,EAAE,MAAM,CAAM;IACvC,iGAAiG;IACrF,QAAQ,EAAE,OAAO,CAAS;IAEtC,iBAAiB;IAKjB,oBAAoB;IAIpB,eAAe;IAUf,OAAO,CAAC,eAAe;CA+CxB"}
@@ -0,0 +1,2 @@
1
+ export declare const AiChatInteractionWrapperStyles: import("@microsoft/fast-element").ElementStyles;
2
+ //# sourceMappingURL=chat-interaction-wrapper.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-interaction-wrapper.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-interaction-wrapper/chat-interaction-wrapper.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,8BAA8B,iDAI1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AiChatInteractionWrapper } from './chat-interaction-wrapper';
2
+ export declare const AiChatInteractionWrapperTemplate: import("@microsoft/fast-element").ViewTemplate<AiChatInteractionWrapper, any>;
3
+ //# sourceMappingURL=chat-interaction-wrapper.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-interaction-wrapper.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-interaction-wrapper/chat-interaction-wrapper.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,eAAO,MAAM,gCAAgC,+EAE5C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './chat-interaction-wrapper';
2
+ export * from './chat-interaction-wrapper.styles';
3
+ export * from './chat-interaction-wrapper.template';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-interaction-wrapper/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { GenesisElement } from '@genesislcap/web-core';
2
+ export declare class AiChatMarkdown extends GenesisElement {
3
+ content: string;
4
+ renderMarkdown(): string;
5
+ }
6
+ //# sourceMappingURL=chat-markdown.d.ts.map