@icanbwell/baileyai-chat-ui 1.0.12 → 1.0.15

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.ts CHANGED
@@ -53,9 +53,9 @@ export declare interface BaileyChatInputMessage {
53
53
  titleHint?: string;
54
54
  }
55
55
 
56
- export declare function BaileyChatPanel({ chat, placeholder, replyPlaceholder, emptyPlaceholder, suggestions, onHistoryClick, privacyNote, resolveActivityIcon, className, height, width, hideDeveloperDetails, renderMessageActions, renderTable, renderChart, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
56
+ export declare function BaileyChatPanel({ chat, placeholder, replyPlaceholder, emptyPlaceholder, suggestions, onHistoryClick, privacyNote, resolveActivityIcon, className, height, width, hideDeveloperDetails, renderMessageActions, renderTable, renderChart, renderMcpApp, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
57
57
 
58
- export declare interface BaileyChatPanelLabels {
58
+ export declare interface BaileyChatPanelLabels extends ToolStepLabels {
59
59
  /** Visible text of the "new chat" item in the "..." menu. */
60
60
  newChatButtonText: string;
61
61
  /** @deprecated No longer applied -- the "New chat" menu item is named by its visible text
@@ -97,10 +97,29 @@ export declare interface BaileyChatPanelLabels {
97
97
  copyButtonTooltipDefault: string;
98
98
  /** Tooltip text immediately after a successful copy, on the per-message copy control. */
99
99
  copyButtonTooltipCopied: string;
100
+ /** iframe `title` attribute (accessible name) for an 'mcp_app' part (MCP Apps, SEP-1865)
101
+ * that doesn't carry its own `title` from the tool/resource. Only used by the default
102
+ * McpAppFrame renderer — a host-supplied `renderMcpApp` (BaileyChatPanelProps) owns its
103
+ * own accessible naming instead. */
104
+ mcpAppDefaultTitle: string;
100
105
  }
101
106
 
102
107
  export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
103
108
  chat: UseBaileyChatResult;
109
+ /** Overrides the default McpAppFrame rendering for an 'mcp_app' content part (MCP Apps,
110
+ * SEP-1865) — e.g. a host that wants to supply its own iframe-hosting shell instead of this
111
+ * package's default sandboxed iframe. Not part of BaileyMarkdownRenderers: an mcp_app part
112
+ * is structured data attached to the message (BaileyMessage.parts), the same way image parts
113
+ * are, not a markdown-AST override. Omit to get the default McpAppFrame. */
114
+ renderMcpApp?: (part: {
115
+ html: string;
116
+ title?: string;
117
+ resourceUri: string;
118
+ csp?: Record<string, unknown>;
119
+ permissions?: Record<string, unknown>;
120
+ prefersBorder?: boolean;
121
+ displayMode?: string;
122
+ }) => ReactNode;
104
123
  /** Overrides the input's placeholder in BOTH the empty and reply states, taking priority
105
124
  * over emptyPlaceholder/replyPlaceholder below. Omit to get the state-appropriate default. */
106
125
  placeholder?: string;
@@ -126,9 +145,9 @@ export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
126
145
  * set. No default — the exact copy/link is host-specific, so nothing is shown unless a host
127
146
  * supplies one. */
128
147
  privacyNote?: BaileyPrivacyNote;
129
- /** Customizes the icon shown next to an inline activity line (e.g. "Checking your vitals.")
130
- * based on the tool/event name — defaults to a single generic icon for every line, rather
131
- * than guessing a per-tool glyph mapping. */
148
+ /** Customizes the icon shown next to each tool step — the live "Checking your vitals…" line
149
+ * while a tool runs, and each entry in the expanded "Used N tools" summary — based on the
150
+ * tool name. No icon is shown for a step unless this returns one. */
132
151
  resolveActivityIcon?: (toolName: string | null) => ReactNode;
133
152
  className?: string;
134
153
  /** Explicit panel height (number is treated as px, e.g. 600 or '600px' or '100vh'). Applied
@@ -183,6 +202,15 @@ export declare type BaileyContentPart = {
183
202
  type: 'image';
184
203
  src: string;
185
204
  alt?: string;
205
+ } | {
206
+ type: 'mcp_app';
207
+ html: string;
208
+ title?: string;
209
+ resourceUri: string;
210
+ csp?: Record<string, unknown>;
211
+ permissions?: Record<string, unknown>;
212
+ prefersBorder?: boolean;
213
+ displayMode?: string;
186
214
  };
187
215
 
188
216
  export declare interface BaileyLastRequest {
@@ -247,6 +275,8 @@ export declare interface BaileyOutputItem {
247
275
  type: string;
248
276
  name?: string;
249
277
  arguments?: string;
278
+ call_id?: string;
279
+ display_name?: string;
250
280
  output?: string;
251
281
  is_error?: boolean;
252
282
  runtime_seconds?: number;
@@ -294,6 +324,16 @@ export declare type BaileyStreamEvent = {
294
324
  } | {
295
325
  type: 'info';
296
326
  message: string;
327
+ } | {
328
+ type: 'mcp_app';
329
+ html: string;
330
+ title?: string;
331
+ resourceUri?: string;
332
+ protocolVersion?: string;
333
+ csp?: Record<string, unknown>;
334
+ permissions?: Record<string, unknown>;
335
+ prefersBorder?: boolean;
336
+ displayMode?: string;
297
337
  };
298
338
 
299
339
  export declare interface BaileyStreamStats {
@@ -322,12 +362,16 @@ export declare type BaileyTraceEvent = {
322
362
  args?: string;
323
363
  at: number;
324
364
  turnSentAt: number;
365
+ callId?: string;
366
+ displayName?: string;
325
367
  } | {
326
368
  kind: 'tool_end';
327
369
  name: string;
328
370
  args?: string;
329
371
  at: number;
330
372
  turnSentAt: number;
373
+ callId?: string;
374
+ displayName?: string;
331
375
  output?: string;
332
376
  isError?: boolean;
333
377
  runtimeSeconds?: number;
@@ -477,6 +521,32 @@ export declare const shouldUseGrid: (rows: BaileyTableCell[][]) => boolean;
477
521
 
478
522
  export declare function toActivityLines(events: BaileyTraceEvent[], turnSentAt: number | undefined): ActivityLine[];
479
523
 
524
+ export declare interface ToolStep {
525
+ key: string;
526
+ callId: string | undefined;
527
+ toolName: string;
528
+ label: string;
529
+ status: ToolStepStatus;
530
+ runtimeSeconds?: number;
531
+ }
532
+
533
+ declare interface ToolStepLabels {
534
+ /** Collapsed summary for a turn that used exactly one tool. */
535
+ toolStepsSummaryOne: string;
536
+ /** Collapsed summary for a turn that used several tools; `{count}` is replaced. */
537
+ toolStepsSummaryMany: string;
538
+ /** Appended to the summary when any tool failed; `{failed}` is replaced. */
539
+ toolStepsFailedSuffix: string;
540
+ /** Marker next to a failed step in the expanded list. */
541
+ toolStepFailedText: string;
542
+ /** Marker next to a step that never finished (turn stopped or errored mid-call). */
543
+ toolStepStoppedText: string;
544
+ }
545
+
546
+ export declare type ToolStepStatus = 'running' | 'done' | 'failed';
547
+
548
+ export declare function toToolSteps(events: BaileyTraceEvent[], turnSentAt: number | undefined): ToolStep[];
549
+
480
550
  export declare function toTraceRows(events: BaileyTraceEvent[]): TraceRow[];
481
551
 
482
552
  export declare function toTraceSegments(rows: TraceRow[]): TraceSegment[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/baileyai-chat-ui",
3
- "version": "1.0.12",
3
+ "version": "1.0.15",
4
4
  "description": "Shared React chat UI and streaming logic for Bailey, the icanbwell AI assistant",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {