@hef2024/llmasaservice-ui 0.24.2 → 0.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3,6 +3,17 @@ import * as React from 'react';
3
3
  import React__default from 'react';
4
4
  import PrismStyle from 'react-syntax-highlighter';
5
5
 
6
+ type MCPAuthPhase = "list" | "call";
7
+ interface MCPAuthHeaderResolverInput {
8
+ phase: MCPAuthPhase;
9
+ mcpServer: Record<string, unknown>;
10
+ projectId?: string;
11
+ customer?: LLMAsAServiceCustomer;
12
+ toolName?: string;
13
+ toolArgs?: unknown;
14
+ }
15
+ type MCPAuthHeaderResolver = (input: MCPAuthHeaderResolverInput) => Record<string, string> | null | undefined | Promise<Record<string, string> | null | undefined>;
16
+
6
17
  interface ChatPanelProps {
7
18
  project_id: string;
8
19
  initialPrompt?: string;
@@ -71,6 +82,7 @@ interface ChatPanelProps {
71
82
  customerEmailCapturePlaceholder?: string;
72
83
  mcpServers?: [];
73
84
  progressiveActions?: boolean;
85
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
74
86
  }
75
87
  interface ExtraProps$1 extends React__default.HTMLAttributes<HTMLElement> {
76
88
  inline?: boolean;
@@ -127,6 +139,7 @@ interface AgentPanelProps {
127
139
  createConversationOnFirstChat?: boolean;
128
140
  customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
129
141
  customerEmailCapturePlaceholder?: string;
142
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
130
143
  }
131
144
  interface ExtraProps extends React__default.HTMLAttributes<HTMLElement> {
132
145
  inline?: boolean;
@@ -134,15 +147,146 @@ interface ExtraProps extends React__default.HTMLAttributes<HTMLElement> {
134
147
  declare const AgentPanel: React__default.FC<AgentPanelProps & ExtraProps>;
135
148
 
136
149
  /**
137
- * Context section for agent awareness
150
+ * AIChatPanel - A modern chat interface using shadcn-style components
151
+ *
152
+ * This component provides the chat functionality for AIAgentPanel,
153
+ * using consistent shadcn-style UI components.
138
154
  */
139
- interface ContextSectionBase {
155
+
156
+ /**
157
+ * Agent option for the agent selector dropdown
158
+ */
159
+ interface AgentOption {
160
+ value: string;
161
+ label: string;
162
+ description?: string;
163
+ icon?: React__default.ReactNode;
164
+ avatarUrl?: string;
165
+ }
166
+ interface BeforeSendPayload {
167
+ prompt: string;
168
+ conversationId: string | null;
169
+ agentId?: string | null;
170
+ service?: string | null;
171
+ messages: {
172
+ role: string;
173
+ content: string;
174
+ }[];
175
+ }
176
+ type TraceContextMode = 'standard' | 'full';
177
+ interface LocalToolExecutorContext {
178
+ toolName: string;
179
+ callId: string;
180
+ serviceTag: string;
181
+ mcpTool: Record<string, unknown> | null;
182
+ }
183
+ type LocalToolExecutor = (args: Record<string, unknown>, context: LocalToolExecutorContext) => Promise<unknown> | unknown;
184
+ interface AIChatPanelProps {
185
+ project_id: string;
186
+ initialPrompt?: string;
187
+ initialMessage?: string;
188
+ title?: string;
189
+ placeholder?: string;
190
+ hideInitialPrompt?: boolean;
191
+ customer?: LLMAsAServiceCustomer;
192
+ data?: {
193
+ key: string;
194
+ data: string;
195
+ }[];
196
+ thumbsUpClick?: (callId: string) => void;
197
+ thumbsDownClick?: (callId: string) => void;
198
+ theme?: 'light' | 'dark';
199
+ url?: string | null;
200
+ service?: string | null;
201
+ historyChangedCallback?: (history: Record<string, {
202
+ content: string;
203
+ callId: string;
204
+ }>) => void;
205
+ responseCompleteCallback?: (callId: string, prompt: string, response: string) => void;
206
+ onLoadingChange?: (isLoading: boolean) => void;
207
+ promptTemplate?: string;
208
+ actions?: {
209
+ pattern: string;
210
+ type?: string;
211
+ markdown?: string;
212
+ callback?: (match: string, groups: any[]) => void;
213
+ clickCode?: string;
214
+ style?: string;
215
+ }[];
216
+ showNewConversationButton?: boolean;
217
+ followOnQuestions?: string[];
218
+ clearFollowOnQuestionsNextPrompt?: boolean;
219
+ followOnPrompt?: string;
220
+ showPoweredBy?: boolean;
221
+ agent?: string | null;
222
+ conversation?: string | null;
223
+ initialHistory?: Record<string, {
224
+ content: string;
225
+ callId: string;
226
+ }>;
227
+ hideRagContextInPrompt?: boolean;
228
+ createConversationOnFirstChat?: boolean;
229
+ autoApproveTools?: boolean | string[];
230
+ mcpServers?: any[];
231
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
232
+ localToolExecutors?: Record<string, LocalToolExecutor>;
233
+ traceContextMode?: TraceContextMode;
234
+ progressiveActions?: boolean;
235
+ agentOptions?: AgentOption[];
236
+ currentAgentId?: string;
237
+ onAgentChange?: (agentId: string) => void;
238
+ agentsLoading?: boolean;
239
+ contextSections?: ContextSection$1[];
240
+ totalContextTokens?: number;
241
+ maxContextTokens?: number;
242
+ enableContextDetailView?: boolean;
243
+ disabledSectionIds?: Set<string>;
244
+ onToggleSection?: (sectionId: string, enabled: boolean) => void;
245
+ onConversationCreated?: (conversationId: string) => void;
246
+ onBeforeSend?: (payload: BeforeSendPayload) => Promise<void> | void;
247
+ cssUrl?: string;
248
+ markdownClass?: string;
249
+ width?: string;
250
+ height?: string;
251
+ scrollToEnd?: boolean;
252
+ prismStyle?: any;
253
+ showSaveButton?: boolean;
254
+ showEmailButton?: boolean;
255
+ messages?: {
256
+ role: "user" | "assistant";
257
+ content: string;
258
+ }[];
259
+ showCallToAction?: boolean;
260
+ callToActionButtonText?: string;
261
+ callToActionEmailAddress?: string;
262
+ callToActionEmailSubject?: string;
263
+ customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
264
+ customerEmailCapturePlaceholder?: string;
265
+ }
266
+ /**
267
+ * Context section for the context viewer
268
+ */
269
+ interface ContextSection$1 {
140
270
  id: string;
141
271
  title: string;
142
272
  tokens?: number;
143
273
  format?: ContextDataFormat$1;
274
+ data?: Record<string, unknown>;
275
+ rawData?: string;
144
276
  }
145
277
  type ContextDataFormat$1 = 'json' | 'toon' | 'markdown' | 'text';
278
+ declare const _default: React__default.NamedExoticComponent<AIChatPanelProps>;
279
+
280
+ /**
281
+ * Context section for agent awareness
282
+ */
283
+ interface ContextSectionBase {
284
+ id: string;
285
+ title: string;
286
+ tokens?: number;
287
+ format?: ContextDataFormat;
288
+ }
289
+ type ContextDataFormat = 'json' | 'toon' | 'markdown' | 'text';
146
290
  interface ObjectContextSection extends ContextSectionBase {
147
291
  data: Record<string, unknown>;
148
292
  }
@@ -150,13 +294,13 @@ interface RawContextSection extends ContextSectionBase {
150
294
  rawData: string;
151
295
  data?: Record<string, unknown>;
152
296
  }
153
- type ContextSection$1 = ObjectContextSection | RawContextSection;
297
+ type ContextSection = ObjectContextSection | RawContextSection;
154
298
  /**
155
299
  * Agent context passed to the panel
156
300
  */
157
301
  interface AgentContext {
158
302
  route?: string;
159
- sections: ContextSection$1[];
303
+ sections: ContextSection[];
160
304
  totalTokens?: number;
161
305
  }
162
306
  /**
@@ -196,8 +340,8 @@ interface AIAgentPanelProps {
196
340
  apiKey?: string;
197
341
  context?: AgentContext | null;
198
342
  contextDataSources?: Record<string, unknown>;
199
- sharedContextSections?: ContextSection$1[];
200
- pageContextSections?: ContextSection$1[];
343
+ sharedContextSections?: ContextSection[];
344
+ pageContextSections?: ContextSection[];
201
345
  onContextChange?: (context: AgentContext) => void;
202
346
  maxContextTokens?: number;
203
347
  data?: {
@@ -218,6 +362,7 @@ interface AIAgentPanelProps {
218
362
  enableContextDetailView?: boolean;
219
363
  onAgentSwitch?: (fromAgent: string, toAgent: string) => void;
220
364
  onConversationChange?: (conversationId: string) => void;
365
+ onBeforeSend?: (payload: BeforeSendPayload) => Promise<void> | void;
221
366
  historyChangedCallback?: (history: Record<string, {
222
367
  content: string;
223
368
  callId: string;
@@ -262,117 +407,13 @@ interface AIAgentPanelProps {
262
407
  callToActionEmailSubject?: string;
263
408
  customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
264
409
  customerEmailCapturePlaceholder?: string;
410
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
411
+ localToolExecutors?: Record<string, LocalToolExecutor>;
412
+ traceContextMode?: TraceContextMode;
413
+ autoApproveTools?: boolean | string[];
265
414
  }
266
415
  declare const AIAgentPanel: React__default.ForwardRefExoticComponent<AIAgentPanelProps & React__default.RefAttributes<AIAgentPanelHandle>>;
267
416
 
268
- /**
269
- * AIChatPanel - A modern chat interface using shadcn-style components
270
- *
271
- * This component provides the chat functionality for AIAgentPanel,
272
- * using consistent shadcn-style UI components.
273
- */
274
-
275
- /**
276
- * Agent option for the agent selector dropdown
277
- */
278
- interface AgentOption {
279
- value: string;
280
- label: string;
281
- description?: string;
282
- icon?: React__default.ReactNode;
283
- avatarUrl?: string;
284
- }
285
- interface AIChatPanelProps {
286
- project_id: string;
287
- initialPrompt?: string;
288
- initialMessage?: string;
289
- title?: string;
290
- placeholder?: string;
291
- hideInitialPrompt?: boolean;
292
- customer?: LLMAsAServiceCustomer;
293
- data?: {
294
- key: string;
295
- data: string;
296
- }[];
297
- thumbsUpClick?: (callId: string) => void;
298
- thumbsDownClick?: (callId: string) => void;
299
- theme?: 'light' | 'dark';
300
- url?: string | null;
301
- service?: string | null;
302
- historyChangedCallback?: (history: Record<string, {
303
- content: string;
304
- callId: string;
305
- }>) => void;
306
- responseCompleteCallback?: (callId: string, prompt: string, response: string) => void;
307
- onLoadingChange?: (isLoading: boolean) => void;
308
- promptTemplate?: string;
309
- actions?: {
310
- pattern: string;
311
- type?: string;
312
- markdown?: string;
313
- callback?: (match: string, groups: any[]) => void;
314
- clickCode?: string;
315
- style?: string;
316
- }[];
317
- showNewConversationButton?: boolean;
318
- followOnQuestions?: string[];
319
- clearFollowOnQuestionsNextPrompt?: boolean;
320
- followOnPrompt?: string;
321
- showPoweredBy?: boolean;
322
- agent?: string | null;
323
- conversation?: string | null;
324
- initialHistory?: Record<string, {
325
- content: string;
326
- callId: string;
327
- }>;
328
- hideRagContextInPrompt?: boolean;
329
- createConversationOnFirstChat?: boolean;
330
- mcpServers?: any[];
331
- progressiveActions?: boolean;
332
- agentOptions?: AgentOption[];
333
- currentAgentId?: string;
334
- onAgentChange?: (agentId: string) => void;
335
- agentsLoading?: boolean;
336
- contextSections?: ContextSection[];
337
- totalContextTokens?: number;
338
- maxContextTokens?: number;
339
- enableContextDetailView?: boolean;
340
- disabledSectionIds?: Set<string>;
341
- onToggleSection?: (sectionId: string, enabled: boolean) => void;
342
- onConversationCreated?: (conversationId: string) => void;
343
- cssUrl?: string;
344
- markdownClass?: string;
345
- width?: string;
346
- height?: string;
347
- scrollToEnd?: boolean;
348
- prismStyle?: any;
349
- showSaveButton?: boolean;
350
- showEmailButton?: boolean;
351
- messages?: {
352
- role: "user" | "assistant";
353
- content: string;
354
- }[];
355
- showCallToAction?: boolean;
356
- callToActionButtonText?: string;
357
- callToActionEmailAddress?: string;
358
- callToActionEmailSubject?: string;
359
- customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
360
- customerEmailCapturePlaceholder?: string;
361
- }
362
- /**
363
- * Context section for the context viewer
364
- */
365
- interface ContextSection {
366
- id: string;
367
- title: string;
368
- tokens?: number;
369
- format?: ContextDataFormat;
370
- data?: Record<string, unknown>;
371
- rawData?: string;
372
- }
373
- type ContextDataFormat = 'json' | 'toon' | 'markdown' | 'text';
374
- declare const _default: React__default.NamedExoticComponent<AIChatPanelProps>;
375
-
376
417
  /**
377
418
  * Agent metadata returned from the LLMAsAService API
378
419
  */
@@ -411,6 +452,8 @@ interface MCPServer {
411
452
  status: 'active' | 'inactive';
412
453
  executionMode: 'CLIENT' | 'SERVER';
413
454
  url?: string;
455
+ accessToken?: string;
456
+ headers?: Record<string, string>;
414
457
  }
415
458
  interface AgentProfile {
416
459
  status: 'idle' | 'loading' | 'ready' | 'error';
@@ -616,4 +659,4 @@ interface ThinkingBlockProps {
616
659
  */
617
660
  declare const ThinkingBlock: React__default.FC<ThinkingBlockProps>;
618
661
 
619
- export { AIAgentPanel, type AIAgentPanelProps, _default as AIChatPanel, type AIChatPanelProps, type APIConversationSummary, type AgentContext, type AgentMetadata, AgentPanel, type AgentPanelProps, type AgentProfile, Button, type ButtonProps, ChatPanel, type ChatPanelProps, type ContextDataFormat$1 as ContextDataFormat, type ContextSection$1 as ContextSection, type Conversation, type ConversationGroup, Dialog, DialogFooter, type DialogFooterProps, type DialogProps, Input, type InputProps, type MCPServer, type ObjectContextSection, type RawContextSection, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, ThinkingBlock, type ThinkingBlockProps, type ThinkingBlockType, Tooltip, type TooltipProps, WordFadeIn, type WordFadeInProps, useAgentRegistry, useConversationStore };
662
+ export { AIAgentPanel, type AIAgentPanelProps, _default as AIChatPanel, type AIChatPanelProps, type APIConversationSummary, type AgentContext, type AgentMetadata, AgentPanel, type AgentPanelProps, type AgentProfile, Button, type ButtonProps, ChatPanel, type ChatPanelProps, type ContextDataFormat, type ContextSection, type Conversation, type ConversationGroup, Dialog, DialogFooter, type DialogFooterProps, type DialogProps, Input, type InputProps, type MCPAuthHeaderResolver, type MCPAuthHeaderResolverInput, type MCPAuthPhase, type MCPServer, type ObjectContextSection, type RawContextSection, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, ThinkingBlock, type ThinkingBlockProps, type ThinkingBlockType, Tooltip, type TooltipProps, WordFadeIn, type WordFadeInProps, useAgentRegistry, useConversationStore };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,17 @@ import * as React from 'react';
3
3
  import React__default from 'react';
4
4
  import PrismStyle from 'react-syntax-highlighter';
5
5
 
6
+ type MCPAuthPhase = "list" | "call";
7
+ interface MCPAuthHeaderResolverInput {
8
+ phase: MCPAuthPhase;
9
+ mcpServer: Record<string, unknown>;
10
+ projectId?: string;
11
+ customer?: LLMAsAServiceCustomer;
12
+ toolName?: string;
13
+ toolArgs?: unknown;
14
+ }
15
+ type MCPAuthHeaderResolver = (input: MCPAuthHeaderResolverInput) => Record<string, string> | null | undefined | Promise<Record<string, string> | null | undefined>;
16
+
6
17
  interface ChatPanelProps {
7
18
  project_id: string;
8
19
  initialPrompt?: string;
@@ -71,6 +82,7 @@ interface ChatPanelProps {
71
82
  customerEmailCapturePlaceholder?: string;
72
83
  mcpServers?: [];
73
84
  progressiveActions?: boolean;
85
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
74
86
  }
75
87
  interface ExtraProps$1 extends React__default.HTMLAttributes<HTMLElement> {
76
88
  inline?: boolean;
@@ -127,6 +139,7 @@ interface AgentPanelProps {
127
139
  createConversationOnFirstChat?: boolean;
128
140
  customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
129
141
  customerEmailCapturePlaceholder?: string;
142
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
130
143
  }
131
144
  interface ExtraProps extends React__default.HTMLAttributes<HTMLElement> {
132
145
  inline?: boolean;
@@ -134,15 +147,146 @@ interface ExtraProps extends React__default.HTMLAttributes<HTMLElement> {
134
147
  declare const AgentPanel: React__default.FC<AgentPanelProps & ExtraProps>;
135
148
 
136
149
  /**
137
- * Context section for agent awareness
150
+ * AIChatPanel - A modern chat interface using shadcn-style components
151
+ *
152
+ * This component provides the chat functionality for AIAgentPanel,
153
+ * using consistent shadcn-style UI components.
138
154
  */
139
- interface ContextSectionBase {
155
+
156
+ /**
157
+ * Agent option for the agent selector dropdown
158
+ */
159
+ interface AgentOption {
160
+ value: string;
161
+ label: string;
162
+ description?: string;
163
+ icon?: React__default.ReactNode;
164
+ avatarUrl?: string;
165
+ }
166
+ interface BeforeSendPayload {
167
+ prompt: string;
168
+ conversationId: string | null;
169
+ agentId?: string | null;
170
+ service?: string | null;
171
+ messages: {
172
+ role: string;
173
+ content: string;
174
+ }[];
175
+ }
176
+ type TraceContextMode = 'standard' | 'full';
177
+ interface LocalToolExecutorContext {
178
+ toolName: string;
179
+ callId: string;
180
+ serviceTag: string;
181
+ mcpTool: Record<string, unknown> | null;
182
+ }
183
+ type LocalToolExecutor = (args: Record<string, unknown>, context: LocalToolExecutorContext) => Promise<unknown> | unknown;
184
+ interface AIChatPanelProps {
185
+ project_id: string;
186
+ initialPrompt?: string;
187
+ initialMessage?: string;
188
+ title?: string;
189
+ placeholder?: string;
190
+ hideInitialPrompt?: boolean;
191
+ customer?: LLMAsAServiceCustomer;
192
+ data?: {
193
+ key: string;
194
+ data: string;
195
+ }[];
196
+ thumbsUpClick?: (callId: string) => void;
197
+ thumbsDownClick?: (callId: string) => void;
198
+ theme?: 'light' | 'dark';
199
+ url?: string | null;
200
+ service?: string | null;
201
+ historyChangedCallback?: (history: Record<string, {
202
+ content: string;
203
+ callId: string;
204
+ }>) => void;
205
+ responseCompleteCallback?: (callId: string, prompt: string, response: string) => void;
206
+ onLoadingChange?: (isLoading: boolean) => void;
207
+ promptTemplate?: string;
208
+ actions?: {
209
+ pattern: string;
210
+ type?: string;
211
+ markdown?: string;
212
+ callback?: (match: string, groups: any[]) => void;
213
+ clickCode?: string;
214
+ style?: string;
215
+ }[];
216
+ showNewConversationButton?: boolean;
217
+ followOnQuestions?: string[];
218
+ clearFollowOnQuestionsNextPrompt?: boolean;
219
+ followOnPrompt?: string;
220
+ showPoweredBy?: boolean;
221
+ agent?: string | null;
222
+ conversation?: string | null;
223
+ initialHistory?: Record<string, {
224
+ content: string;
225
+ callId: string;
226
+ }>;
227
+ hideRagContextInPrompt?: boolean;
228
+ createConversationOnFirstChat?: boolean;
229
+ autoApproveTools?: boolean | string[];
230
+ mcpServers?: any[];
231
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
232
+ localToolExecutors?: Record<string, LocalToolExecutor>;
233
+ traceContextMode?: TraceContextMode;
234
+ progressiveActions?: boolean;
235
+ agentOptions?: AgentOption[];
236
+ currentAgentId?: string;
237
+ onAgentChange?: (agentId: string) => void;
238
+ agentsLoading?: boolean;
239
+ contextSections?: ContextSection$1[];
240
+ totalContextTokens?: number;
241
+ maxContextTokens?: number;
242
+ enableContextDetailView?: boolean;
243
+ disabledSectionIds?: Set<string>;
244
+ onToggleSection?: (sectionId: string, enabled: boolean) => void;
245
+ onConversationCreated?: (conversationId: string) => void;
246
+ onBeforeSend?: (payload: BeforeSendPayload) => Promise<void> | void;
247
+ cssUrl?: string;
248
+ markdownClass?: string;
249
+ width?: string;
250
+ height?: string;
251
+ scrollToEnd?: boolean;
252
+ prismStyle?: any;
253
+ showSaveButton?: boolean;
254
+ showEmailButton?: boolean;
255
+ messages?: {
256
+ role: "user" | "assistant";
257
+ content: string;
258
+ }[];
259
+ showCallToAction?: boolean;
260
+ callToActionButtonText?: string;
261
+ callToActionEmailAddress?: string;
262
+ callToActionEmailSubject?: string;
263
+ customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
264
+ customerEmailCapturePlaceholder?: string;
265
+ }
266
+ /**
267
+ * Context section for the context viewer
268
+ */
269
+ interface ContextSection$1 {
140
270
  id: string;
141
271
  title: string;
142
272
  tokens?: number;
143
273
  format?: ContextDataFormat$1;
274
+ data?: Record<string, unknown>;
275
+ rawData?: string;
144
276
  }
145
277
  type ContextDataFormat$1 = 'json' | 'toon' | 'markdown' | 'text';
278
+ declare const _default: React__default.NamedExoticComponent<AIChatPanelProps>;
279
+
280
+ /**
281
+ * Context section for agent awareness
282
+ */
283
+ interface ContextSectionBase {
284
+ id: string;
285
+ title: string;
286
+ tokens?: number;
287
+ format?: ContextDataFormat;
288
+ }
289
+ type ContextDataFormat = 'json' | 'toon' | 'markdown' | 'text';
146
290
  interface ObjectContextSection extends ContextSectionBase {
147
291
  data: Record<string, unknown>;
148
292
  }
@@ -150,13 +294,13 @@ interface RawContextSection extends ContextSectionBase {
150
294
  rawData: string;
151
295
  data?: Record<string, unknown>;
152
296
  }
153
- type ContextSection$1 = ObjectContextSection | RawContextSection;
297
+ type ContextSection = ObjectContextSection | RawContextSection;
154
298
  /**
155
299
  * Agent context passed to the panel
156
300
  */
157
301
  interface AgentContext {
158
302
  route?: string;
159
- sections: ContextSection$1[];
303
+ sections: ContextSection[];
160
304
  totalTokens?: number;
161
305
  }
162
306
  /**
@@ -196,8 +340,8 @@ interface AIAgentPanelProps {
196
340
  apiKey?: string;
197
341
  context?: AgentContext | null;
198
342
  contextDataSources?: Record<string, unknown>;
199
- sharedContextSections?: ContextSection$1[];
200
- pageContextSections?: ContextSection$1[];
343
+ sharedContextSections?: ContextSection[];
344
+ pageContextSections?: ContextSection[];
201
345
  onContextChange?: (context: AgentContext) => void;
202
346
  maxContextTokens?: number;
203
347
  data?: {
@@ -218,6 +362,7 @@ interface AIAgentPanelProps {
218
362
  enableContextDetailView?: boolean;
219
363
  onAgentSwitch?: (fromAgent: string, toAgent: string) => void;
220
364
  onConversationChange?: (conversationId: string) => void;
365
+ onBeforeSend?: (payload: BeforeSendPayload) => Promise<void> | void;
221
366
  historyChangedCallback?: (history: Record<string, {
222
367
  content: string;
223
368
  callId: string;
@@ -262,117 +407,13 @@ interface AIAgentPanelProps {
262
407
  callToActionEmailSubject?: string;
263
408
  customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
264
409
  customerEmailCapturePlaceholder?: string;
410
+ resolveMcpAuthHeaders?: MCPAuthHeaderResolver;
411
+ localToolExecutors?: Record<string, LocalToolExecutor>;
412
+ traceContextMode?: TraceContextMode;
413
+ autoApproveTools?: boolean | string[];
265
414
  }
266
415
  declare const AIAgentPanel: React__default.ForwardRefExoticComponent<AIAgentPanelProps & React__default.RefAttributes<AIAgentPanelHandle>>;
267
416
 
268
- /**
269
- * AIChatPanel - A modern chat interface using shadcn-style components
270
- *
271
- * This component provides the chat functionality for AIAgentPanel,
272
- * using consistent shadcn-style UI components.
273
- */
274
-
275
- /**
276
- * Agent option for the agent selector dropdown
277
- */
278
- interface AgentOption {
279
- value: string;
280
- label: string;
281
- description?: string;
282
- icon?: React__default.ReactNode;
283
- avatarUrl?: string;
284
- }
285
- interface AIChatPanelProps {
286
- project_id: string;
287
- initialPrompt?: string;
288
- initialMessage?: string;
289
- title?: string;
290
- placeholder?: string;
291
- hideInitialPrompt?: boolean;
292
- customer?: LLMAsAServiceCustomer;
293
- data?: {
294
- key: string;
295
- data: string;
296
- }[];
297
- thumbsUpClick?: (callId: string) => void;
298
- thumbsDownClick?: (callId: string) => void;
299
- theme?: 'light' | 'dark';
300
- url?: string | null;
301
- service?: string | null;
302
- historyChangedCallback?: (history: Record<string, {
303
- content: string;
304
- callId: string;
305
- }>) => void;
306
- responseCompleteCallback?: (callId: string, prompt: string, response: string) => void;
307
- onLoadingChange?: (isLoading: boolean) => void;
308
- promptTemplate?: string;
309
- actions?: {
310
- pattern: string;
311
- type?: string;
312
- markdown?: string;
313
- callback?: (match: string, groups: any[]) => void;
314
- clickCode?: string;
315
- style?: string;
316
- }[];
317
- showNewConversationButton?: boolean;
318
- followOnQuestions?: string[];
319
- clearFollowOnQuestionsNextPrompt?: boolean;
320
- followOnPrompt?: string;
321
- showPoweredBy?: boolean;
322
- agent?: string | null;
323
- conversation?: string | null;
324
- initialHistory?: Record<string, {
325
- content: string;
326
- callId: string;
327
- }>;
328
- hideRagContextInPrompt?: boolean;
329
- createConversationOnFirstChat?: boolean;
330
- mcpServers?: any[];
331
- progressiveActions?: boolean;
332
- agentOptions?: AgentOption[];
333
- currentAgentId?: string;
334
- onAgentChange?: (agentId: string) => void;
335
- agentsLoading?: boolean;
336
- contextSections?: ContextSection[];
337
- totalContextTokens?: number;
338
- maxContextTokens?: number;
339
- enableContextDetailView?: boolean;
340
- disabledSectionIds?: Set<string>;
341
- onToggleSection?: (sectionId: string, enabled: boolean) => void;
342
- onConversationCreated?: (conversationId: string) => void;
343
- cssUrl?: string;
344
- markdownClass?: string;
345
- width?: string;
346
- height?: string;
347
- scrollToEnd?: boolean;
348
- prismStyle?: any;
349
- showSaveButton?: boolean;
350
- showEmailButton?: boolean;
351
- messages?: {
352
- role: "user" | "assistant";
353
- content: string;
354
- }[];
355
- showCallToAction?: boolean;
356
- callToActionButtonText?: string;
357
- callToActionEmailAddress?: string;
358
- callToActionEmailSubject?: string;
359
- customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
360
- customerEmailCapturePlaceholder?: string;
361
- }
362
- /**
363
- * Context section for the context viewer
364
- */
365
- interface ContextSection {
366
- id: string;
367
- title: string;
368
- tokens?: number;
369
- format?: ContextDataFormat;
370
- data?: Record<string, unknown>;
371
- rawData?: string;
372
- }
373
- type ContextDataFormat = 'json' | 'toon' | 'markdown' | 'text';
374
- declare const _default: React__default.NamedExoticComponent<AIChatPanelProps>;
375
-
376
417
  /**
377
418
  * Agent metadata returned from the LLMAsAService API
378
419
  */
@@ -411,6 +452,8 @@ interface MCPServer {
411
452
  status: 'active' | 'inactive';
412
453
  executionMode: 'CLIENT' | 'SERVER';
413
454
  url?: string;
455
+ accessToken?: string;
456
+ headers?: Record<string, string>;
414
457
  }
415
458
  interface AgentProfile {
416
459
  status: 'idle' | 'loading' | 'ready' | 'error';
@@ -616,4 +659,4 @@ interface ThinkingBlockProps {
616
659
  */
617
660
  declare const ThinkingBlock: React__default.FC<ThinkingBlockProps>;
618
661
 
619
- export { AIAgentPanel, type AIAgentPanelProps, _default as AIChatPanel, type AIChatPanelProps, type APIConversationSummary, type AgentContext, type AgentMetadata, AgentPanel, type AgentPanelProps, type AgentProfile, Button, type ButtonProps, ChatPanel, type ChatPanelProps, type ContextDataFormat$1 as ContextDataFormat, type ContextSection$1 as ContextSection, type Conversation, type ConversationGroup, Dialog, DialogFooter, type DialogFooterProps, type DialogProps, Input, type InputProps, type MCPServer, type ObjectContextSection, type RawContextSection, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, ThinkingBlock, type ThinkingBlockProps, type ThinkingBlockType, Tooltip, type TooltipProps, WordFadeIn, type WordFadeInProps, useAgentRegistry, useConversationStore };
662
+ export { AIAgentPanel, type AIAgentPanelProps, _default as AIChatPanel, type AIChatPanelProps, type APIConversationSummary, type AgentContext, type AgentMetadata, AgentPanel, type AgentPanelProps, type AgentProfile, Button, type ButtonProps, ChatPanel, type ChatPanelProps, type ContextDataFormat, type ContextSection, type Conversation, type ConversationGroup, Dialog, DialogFooter, type DialogFooterProps, type DialogProps, Input, type InputProps, type MCPAuthHeaderResolver, type MCPAuthHeaderResolverInput, type MCPAuthPhase, type MCPServer, type ObjectContextSection, type RawContextSection, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, ThinkingBlock, type ThinkingBlockProps, type ThinkingBlockType, Tooltip, type TooltipProps, WordFadeIn, type WordFadeInProps, useAgentRegistry, useConversationStore };