@cadraos/sdk 0.1.10 → 0.1.12

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.
@@ -3,28 +3,6 @@ import { Components } from 'react-markdown';
3
3
  import * as React$1 from 'react';
4
4
  import React__default from 'react';
5
5
 
6
- interface MarkdownContentProps {
7
- /** Markdown content to render */
8
- content: string;
9
- /** Additional CSS classes */
10
- className?: string;
11
- /** Custom React-Markdown component overrides (merged with defaults, user wins) */
12
- components?: Partial<Components>;
13
- /** Custom URL transform for React-Markdown (e.g., to preserve custom protocols like artifact:) */
14
- urlTransform?: (url: string) => string;
15
- /** Transform content string before rendering (e.g., strip certain patterns) */
16
- contentTransform?: (content: string) => string;
17
- }
18
- /**
19
- * Renders markdown content with chat-appropriate styling
20
- *
21
- * @example
22
- * ```tsx
23
- * <MarkdownContent content="# Hello\n\nThis is **bold** text." />
24
- * ```
25
- */
26
- declare function MarkdownContent({ content, className, components: customComponents, urlTransform, contentTransform, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
27
-
28
6
  /**
29
7
  * Type definitions for @cadraos/sdk/chat
30
8
  *
@@ -49,7 +27,11 @@ interface ChatMessage$1 {
49
27
  /** Tool calls made during this message */
50
28
  toolCalls?: ToolCall[];
51
29
  /** Thinking blocks (for models that support extended thinking) */
52
- thinkingBlocks?: ThinkingBlock[];
30
+ thinkingBlocks?: ThinkingBlock$1[];
31
+ /** Images extracted from tool results (convenience projection, derived from toolCalls) */
32
+ images?: ImageData[];
33
+ /** Delegation events for team execution (orchestrator → specialist handoffs) */
34
+ delegationEvents?: DelegationEvent[];
53
35
  }
54
36
  /**
55
37
  * Attachment data for files sent with messages
@@ -94,7 +76,7 @@ interface ToolCall {
94
76
  /**
95
77
  * Thinking block for extended thinking models
96
78
  */
97
- interface ThinkingBlock {
79
+ interface ThinkingBlock$1 {
98
80
  /** Unique identifier */
99
81
  id: string;
100
82
  /** Thinking content */
@@ -102,6 +84,52 @@ interface ThinkingBlock {
102
84
  /** When the thinking block was created */
103
85
  timestamp: Date;
104
86
  }
87
+ /**
88
+ * Image data extracted from tool results.
89
+ * Always derived from toolCalls[] (single source of truth).
90
+ */
91
+ interface ImageData {
92
+ /** Image URL */
93
+ url: string;
94
+ /** Alt text for accessibility */
95
+ alt?: string;
96
+ /** Original filename */
97
+ filename?: string;
98
+ /** Image width in pixels */
99
+ width?: number;
100
+ /** Image height in pixels */
101
+ height?: number;
102
+ /** ID of the tool call that produced this image */
103
+ sourceToolCallId?: string;
104
+ }
105
+ /**
106
+ * Delegation event for team execution (orchestrator → specialist handoffs).
107
+ * Uses wire types: delegation_started / delegation_completed.
108
+ */
109
+ interface DelegationEvent {
110
+ /** Event type matching the wire protocol */
111
+ type: "delegation_started" | "delegation_completed";
112
+ /** Unique handoff ID linking start/complete pairs */
113
+ handoffId?: string;
114
+ /** Orchestrator agent name */
115
+ fromAgent?: string;
116
+ /** Target specialist agent name */
117
+ toAgent?: string;
118
+ /** Target agent UUID (raw from wire event) */
119
+ targetAgentUuid?: string;
120
+ /** Sub-execution ID */
121
+ executionId?: string;
122
+ /** Preview of the delegated task (from delegation_started) */
123
+ taskPreview?: string;
124
+ /** Preview of the result (from delegation_completed) */
125
+ resultPreview?: string;
126
+ /** When the event occurred */
127
+ timestamp: Date;
128
+ /** Current status */
129
+ status?: "active" | "completed" | "failed";
130
+ /** Duration in milliseconds (from delegation_completed) */
131
+ durationMs?: number;
132
+ }
105
133
  /**
106
134
  * Chat error information
107
135
  */
@@ -137,6 +165,14 @@ interface TodoItem {
137
165
  /** Present continuous form for active display */
138
166
  activeForm: string;
139
167
  }
168
+ /**
169
+ * Tool call verbosity levels for controlling which tool calls are displayed
170
+ *
171
+ * - `"compact"` (default) — Hide internal/orchestration tools, show user-facing tools in compact style
172
+ * - `"verbose"` — Show all tools including internal ones (useful for debugging)
173
+ * - `"hidden"` — Hide all tool calls entirely
174
+ */
175
+ type ToolCallVerbosity = "compact" | "verbose" | "hidden";
140
176
  /**
141
177
  * SSE stream event from agent execution
142
178
  */
@@ -204,6 +240,43 @@ interface AttachmentFile {
204
240
  actualSize?: number;
205
241
  }
206
242
 
243
+ interface MarkdownContentProps {
244
+ /** Markdown content to render */
245
+ content: string;
246
+ /** Additional CSS classes */
247
+ className?: string;
248
+ /** Custom React-Markdown component overrides (merged with defaults, user wins) */
249
+ components?: Partial<Components>;
250
+ /** Custom URL transform for React-Markdown (e.g., to preserve custom protocols like artifact:) */
251
+ urlTransform?: (url: string) => string;
252
+ /** Transform content string before rendering (e.g., strip certain patterns) */
253
+ contentTransform?: (content: string) => string;
254
+ }
255
+ /**
256
+ * Renders markdown content with chat-appropriate styling
257
+ *
258
+ * @example
259
+ * ```tsx
260
+ * <MarkdownContent content="# Hello\n\nThis is **bold** text." />
261
+ * ```
262
+ */
263
+ declare function MarkdownContent({ content, className, components: customComponents, urlTransform, contentTransform, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
264
+
265
+ /**
266
+ * CSS custom properties supported by ChatMessage for theming:
267
+ *
268
+ * --chat-user-bg: User message bubble background (default: #3b82f6)
269
+ * --chat-user-text: User message text color (default: white)
270
+ * --chat-user-avatar-bg: User avatar background (default: #3b82f6)
271
+ * --chat-user-avatar-text: User avatar text color (default: white)
272
+ * --chat-assistant-bg: Assistant message bubble background (default: #f3f4f6)
273
+ * --chat-assistant-text: Assistant message text color (default: #111827)
274
+ * --chat-assistant-avatar-bg: Assistant avatar background (default: #e5e7eb)
275
+ * --chat-assistant-avatar-text: Assistant avatar text color (default: #4b5563)
276
+ * --chat-meta-text: Timestamp and metadata text color (default: #6b7280)
277
+ *
278
+ * Set these on a parent element (e.g., .cadra-chat-container) to theme the chat.
279
+ */
207
280
  interface ChatMessageProps {
208
281
  /** Message data */
209
282
  message: ChatMessage$1;
@@ -211,6 +284,8 @@ interface ChatMessageProps {
211
284
  enableMarkdown?: boolean;
212
285
  /** Whether to show tool calls */
213
286
  showToolCalls?: boolean;
287
+ /** Tool call verbosity level (overrides showToolCalls when set) */
288
+ toolCallVerbosity?: ToolCallVerbosity;
214
289
  /** Additional CSS classes */
215
290
  className?: string;
216
291
  /** Custom markdown component overrides */
@@ -225,6 +300,20 @@ interface ChatMessageProps {
225
300
  alt?: string;
226
301
  filename?: string;
227
302
  }) => void;
303
+ /** Show thinking blocks (default true) */
304
+ showThinking?: boolean;
305
+ /** Show delegation progress (default true) */
306
+ showDelegation?: boolean;
307
+ /** Show images from tool results (default true) */
308
+ showImages?: boolean;
309
+ /** Custom tool call rendering override */
310
+ renderToolCall?: (toolCall: ToolCall, defaultRender: () => React.ReactNode) => React.ReactNode;
311
+ /**
312
+ * Visual variant for the message layout.
313
+ * - "bubble" (default): Chat bubble style with colored backgrounds and right-aligned user messages.
314
+ * - "flat": Full-width flat layout (like Claude AI). Both roles left-aligned, no bubble backgrounds.
315
+ */
316
+ variant?: "bubble" | "flat";
228
317
  }
229
318
  /**
230
319
  * Renders a single chat message with appropriate styling
@@ -243,7 +332,7 @@ interface ChatMessageProps {
243
332
  * />
244
333
  * ```
245
334
  */
246
- declare function ChatMessage({ message, enableMarkdown, showToolCalls, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
335
+ declare function ChatMessage({ message, enableMarkdown, showToolCalls, toolCallVerbosity: _toolCallVerbosity, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, showThinking, showDelegation, showImages, renderToolCall, variant, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
247
336
 
248
337
  interface MessageListProps {
249
338
  /** Array of messages to display */
@@ -271,6 +360,8 @@ interface MessageListProps {
271
360
  enableMarkdown?: boolean;
272
361
  /** Whether to show tool calls */
273
362
  showToolCalls?: boolean;
363
+ /** Tool call verbosity level */
364
+ toolCallVerbosity?: ToolCallVerbosity;
274
365
  /** Additional CSS classes */
275
366
  className?: string;
276
367
  /** Custom markdown component overrides */
@@ -285,6 +376,22 @@ interface MessageListProps {
285
376
  alt?: string;
286
377
  filename?: string;
287
378
  }) => void;
379
+ /** Show thinking blocks (default true) */
380
+ showThinking?: boolean;
381
+ /** Show delegation progress (default true) */
382
+ showDelegation?: boolean;
383
+ /** Show images from tool results (default true) */
384
+ showImages?: boolean;
385
+ /** Custom message rendering override */
386
+ renderMessage?: (message: ChatMessage$1, defaultRender: () => React.ReactNode) => React.ReactNode;
387
+ /** Custom tool call rendering override */
388
+ renderToolCall?: (toolCall: ToolCall, defaultRender: () => React.ReactNode) => React.ReactNode;
389
+ /**
390
+ * Visual variant for message rendering.
391
+ * - "bubble" (default): Chat bubble style with colored backgrounds.
392
+ * - "flat": Full-width flat layout (like Claude AI).
393
+ */
394
+ messageVariant?: "bubble" | "flat";
288
395
  /**
289
396
  * Send message function passed from parent (AgentChat).
290
397
  * Used to forward to renderWelcome render function for suggestion chips.
@@ -307,7 +414,7 @@ interface MessageListProps {
307
414
  * />
308
415
  * ```
309
416
  */
310
- declare function MessageList({ messages, welcomeMessage, renderWelcome, isLoading, isStreaming, isLoadingHistory, enableMarkdown, showToolCalls, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, sendMessage, }: MessageListProps): react_jsx_runtime.JSX.Element;
417
+ declare function MessageList({ messages, welcomeMessage, renderWelcome, isLoading, isStreaming, isLoadingHistory, enableMarkdown, showToolCalls, toolCallVerbosity, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, showThinking, showDelegation, showImages, renderMessage, renderToolCall, messageVariant, sendMessage, }: MessageListProps): react_jsx_runtime.JSX.Element;
311
418
 
312
419
  /**
313
420
  * Common types shared across all resources
@@ -1222,18 +1329,34 @@ interface AgentChatProps {
1222
1329
  renderWelcome?: React.ReactNode | ((props: {
1223
1330
  sendMessage: (text: string) => void;
1224
1331
  }) => React.ReactNode);
1225
- /** Maximum height of the chat container */
1332
+ /** Maximum height of the chat container (only used in "fixed" layout) */
1226
1333
  maxHeight?: string | number;
1227
1334
  /** Additional CSS class for the container */
1228
1335
  className?: string;
1229
1336
  /** Theme mode */
1230
1337
  theme?: ThemeMode;
1338
+ /**
1339
+ * Layout mode for the chat container.
1340
+ * - "fixed" (default): Widget-style with maxHeight constraint.
1341
+ * - "fill": Fills parent flex container. Use for full-page layouts.
1342
+ */
1343
+ layout?: "fixed" | "fill";
1231
1344
  /** Enable file attachments */
1232
1345
  enableAttachments?: boolean;
1233
1346
  /** Enable markdown rendering */
1234
1347
  enableMarkdown?: boolean;
1235
1348
  /** Show tool call visualization */
1236
1349
  showToolCalls?: boolean;
1350
+ /**
1351
+ * Tool call verbosity level
1352
+ *
1353
+ * - `"compact"` (default) — Hide internal tools, show user-facing tools in compact style when completed
1354
+ * - `"verbose"` — Show all tools including internal ones (debugging)
1355
+ * - `"hidden"` — Hide all tool calls
1356
+ *
1357
+ * When `showToolCalls={false}`, this is automatically set to `"hidden"`.
1358
+ */
1359
+ toolCallVerbosity?: ToolCallVerbosity;
1237
1360
  /** Custom markdown component overrides (e.g., for artifact rendering) */
1238
1361
  markdownComponents?: MessageListProps["markdownComponents"];
1239
1362
  /** Custom URL transform for markdown (e.g., to preserve artifact: protocol) */
@@ -1246,6 +1369,40 @@ interface AgentChatProps {
1246
1369
  alt?: string;
1247
1370
  filename?: string;
1248
1371
  }) => void;
1372
+ /** Hide the default chat header when true */
1373
+ hideHeader?: boolean;
1374
+ /** Render slot above the chat input (e.g., config pills, action buttons) */
1375
+ renderAboveInput?: () => React.ReactNode;
1376
+ /** Render slot below the message list (e.g., image carousel) */
1377
+ renderBelowMessages?: () => React.ReactNode;
1378
+ /**
1379
+ * Custom message rendering override.
1380
+ * Receives the message and a defaultRender function for selective override.
1381
+ */
1382
+ renderMessage?: (message: ChatMessage$1, defaultRender: () => React.ReactNode) => React.ReactNode;
1383
+ /**
1384
+ * Custom tool call rendering override.
1385
+ * Receives the tool call and a defaultRender function for selective override.
1386
+ */
1387
+ renderToolCall?: (toolCall: ToolCall, defaultRender: () => React.ReactNode) => React.ReactNode;
1388
+ /**
1389
+ * Visual variant for message rendering.
1390
+ * - "bubble" (default): Chat bubble style with colored backgrounds.
1391
+ * - "flat": Full-width flat layout (like Claude AI).
1392
+ */
1393
+ messageVariant?: "bubble" | "flat";
1394
+ /** Show thinking blocks (default true) */
1395
+ showThinking?: boolean;
1396
+ /** Show delegation progress (default true) */
1397
+ showDelegation?: boolean;
1398
+ /** Show images from tool results (default true) */
1399
+ showImages?: boolean;
1400
+ /** Polling interval in ms (default 2000) */
1401
+ pollingInterval?: number;
1402
+ /** Enable polling fallback (default true) */
1403
+ pollingEnabled?: boolean;
1404
+ /** Callback fired when a delegation event occurs */
1405
+ onDelegation?: (event: DelegationEvent) => void;
1249
1406
  }
1250
1407
  /**
1251
1408
  * Complete chat interface for interacting with AI agents
@@ -1268,7 +1425,7 @@ interface AgentChatProps {
1268
1425
  * />
1269
1426
  * ```
1270
1427
  */
1271
- declare function AgentChat({ agentId, teamId, sessionId, adapter, onMessage, onError, onSessionCreated, onSessionStart, onToolCall, onToolResult, onClarification, initialMessages, placeholder, welcomeMessage, renderWelcome, maxHeight, className, theme, enableAttachments, enableMarkdown, showToolCalls, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, }: AgentChatProps): react_jsx_runtime.JSX.Element;
1428
+ declare function AgentChat({ agentId, teamId, sessionId, adapter, onMessage, onError, onSessionCreated, onSessionStart, onToolCall, onToolResult, onClarification, initialMessages, placeholder, welcomeMessage, renderWelcome, maxHeight, className, theme, layout, enableAttachments, enableMarkdown, showToolCalls, toolCallVerbosity, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, hideHeader, renderAboveInput, renderBelowMessages, renderMessage, renderToolCall, messageVariant, showThinking, showDelegation, showImages, pollingInterval, pollingEnabled, onDelegation, }: AgentChatProps): react_jsx_runtime.JSX.Element;
1272
1429
 
1273
1430
  /**
1274
1431
  * Retry utility with exponential backoff
@@ -2622,17 +2779,17 @@ declare class SessionsAPI extends BaseResourceAPI {
2622
2779
  }
2623
2780
 
2624
2781
  /**
2625
- * AI SaaS Client
2782
+ * Cadra Client
2626
2783
  *
2627
2784
  * Main entry point for the SDK. Provides access to all resource APIs.
2628
2785
  *
2629
2786
  * @example
2630
2787
  * ```typescript
2631
- * import { AISaaSClient } from '@cadraos/sdk';
2788
+ * import { CadraClient } from '@cadraos/sdk';
2632
2789
  *
2633
- * const client = new AISaaSClient({
2634
- * apiKey: process.env.AISAAS_API_KEY,
2635
- * orgId: Number(process.env.AISAAS_ORG_ID),
2790
+ * const client = new CadraClient({
2791
+ * apiKey: process.env.CADRA_API_KEY,
2792
+ * orgId: Number(process.env.CADRA_ORG_ID),
2636
2793
  * });
2637
2794
  *
2638
2795
  * // List agents
@@ -2658,12 +2815,12 @@ declare class SessionsAPI extends BaseResourceAPI {
2658
2815
  /**
2659
2816
  * Client options for API key authentication
2660
2817
  */
2661
- interface AISaaSClientOptionsApiKey {
2818
+ interface CadraClientOptionsApiKey {
2662
2819
  /** API key for authentication */
2663
2820
  apiKey: string;
2664
2821
  /** Organization ID */
2665
2822
  orgId: number;
2666
- /** Base URL for API (default: https://api.aisaas.com/v1) */
2823
+ /** Base URL for API (default: https://api.cadraos.com) */
2667
2824
  baseUrl?: string;
2668
2825
  /** Request timeout in milliseconds (default: 30000) */
2669
2826
  timeout?: number;
@@ -2675,12 +2832,12 @@ interface AISaaSClientOptionsApiKey {
2675
2832
  /**
2676
2833
  * Client options for OAuth token authentication
2677
2834
  */
2678
- interface AISaaSClientOptionsToken {
2835
+ interface CadraClientOptionsToken {
2679
2836
  /** OAuth token for authentication */
2680
2837
  token: string;
2681
2838
  /** Organization ID */
2682
2839
  orgId: number;
2683
- /** Base URL for API (default: https://api.aisaas.com/v1) */
2840
+ /** Base URL for API (default: https://api.cadraos.com) */
2684
2841
  baseUrl?: string;
2685
2842
  /** Request timeout in milliseconds (default: 30000) */
2686
2843
  timeout?: number;
@@ -2692,12 +2849,12 @@ interface AISaaSClientOptionsToken {
2692
2849
  /**
2693
2850
  * Client options for token provider authentication
2694
2851
  */
2695
- interface AISaaSClientOptionsTokenProvider {
2852
+ interface CadraClientOptionsTokenProvider {
2696
2853
  /** Token provider callback (called before each request) */
2697
2854
  tokenProvider: () => Promise<string>;
2698
2855
  /** Organization ID */
2699
2856
  orgId: number;
2700
- /** Base URL for API (default: https://api.aisaas.com/v1) */
2857
+ /** Base URL for API (default: https://api.cadraos.com) */
2701
2858
  baseUrl?: string;
2702
2859
  /** Request timeout in milliseconds (default: 30000) */
2703
2860
  timeout?: number;
@@ -2709,14 +2866,14 @@ interface AISaaSClientOptionsTokenProvider {
2709
2866
  /**
2710
2867
  * All client options
2711
2868
  */
2712
- type AISaaSClientOptions = AISaaSClientOptionsApiKey | AISaaSClientOptionsToken | AISaaSClientOptionsTokenProvider;
2869
+ type CadraClientOptions = CadraClientOptionsApiKey | CadraClientOptionsToken | CadraClientOptionsTokenProvider;
2713
2870
  /**
2714
2871
  * AI SaaS Client
2715
2872
  *
2716
2873
  * Main class for interacting with the AI SaaS API.
2717
2874
  * Provides access to all resource APIs (agents, skills, tools, artifacts, sessions).
2718
2875
  */
2719
- declare class AISaaSClient {
2876
+ declare class CadraClient {
2720
2877
  private readonly httpClient;
2721
2878
  private readonly config;
2722
2879
  /**
@@ -2747,25 +2904,25 @@ declare class AISaaSClient {
2747
2904
  * @example
2748
2905
  * ```typescript
2749
2906
  * // API key authentication
2750
- * const client = new AISaaSClient({
2907
+ * const client = new CadraClient({
2751
2908
  * apiKey: 'sk_...',
2752
2909
  * orgId: 123,
2753
2910
  * });
2754
2911
  *
2755
2912
  * // OAuth token authentication
2756
- * const client = new AISaaSClient({
2913
+ * const client = new CadraClient({
2757
2914
  * token: 'eyJ...',
2758
2915
  * orgId: 123,
2759
2916
  * });
2760
2917
  *
2761
2918
  * // Token provider (for automatic refresh)
2762
- * const client = new AISaaSClient({
2919
+ * const client = new CadraClient({
2763
2920
  * tokenProvider: async () => myAuth.getAccessToken(),
2764
2921
  * orgId: 123,
2765
2922
  * });
2766
2923
  * ```
2767
2924
  */
2768
- constructor(options: AISaaSClientOptions);
2925
+ constructor(options: CadraClientOptions);
2769
2926
  /**
2770
2927
  * Validate client options
2771
2928
  */
@@ -2788,7 +2945,7 @@ interface DefaultAdapterConfig {
2788
2945
  /**
2789
2946
  * Pre-constructed CadraClient (takes priority over individual options)
2790
2947
  */
2791
- client?: AISaaSClient;
2948
+ client?: CadraClient;
2792
2949
  /**
2793
2950
  * Base URL for the API
2794
2951
  * @example "https://api.example.com/v1"
@@ -2916,6 +3073,20 @@ interface UseAgentChatOptions {
2916
3073
  onToolResult?: (toolName: string, result: unknown, durationMs?: number) => void;
2917
3074
  /** Callback fired when clarification is needed */
2918
3075
  onClarification?: (data: ClarificationData) => void;
3076
+ /** Callback fired when a delegation event occurs (team execution) */
3077
+ onDelegation?: (event: DelegationEvent) => void;
3078
+ /**
3079
+ * Polling interval in milliseconds for the polling fallback.
3080
+ * Used when SSE connection fails and falls back to polling.
3081
+ * Default: 2000ms
3082
+ */
3083
+ pollingInterval?: number;
3084
+ /**
3085
+ * Whether polling fallback is enabled.
3086
+ * When false, SSE failure will result in an error instead of falling back to polling.
3087
+ * Default: true
3088
+ */
3089
+ pollingEnabled?: boolean;
2919
3090
  }
2920
3091
  /**
2921
3092
  * Options for sendMessage
@@ -2939,6 +3110,8 @@ interface UseAgentChatResult {
2939
3110
  sessionId: string | null;
2940
3111
  /** Current clarification request if any */
2941
3112
  clarification: ClarificationData | null;
3113
+ /** Currently active delegation event (team execution) */
3114
+ activeDelegation: DelegationEvent | null;
2942
3115
  /** Send a message to the agent */
2943
3116
  sendMessage: (content: string, options?: SendMessageOptions) => Promise<void>;
2944
3117
  /** Respond to a clarification request */
@@ -3166,12 +3339,21 @@ declare function useFileAttachments(options: UseFileAttachmentsOptions): UseFile
3166
3339
  interface ChatContainerProps {
3167
3340
  /** Child components (MessageList, ChatInput, etc.) */
3168
3341
  children: React$1.ReactNode;
3169
- /** Maximum height of the container */
3342
+ /**
3343
+ * Maximum height of the container (only used in "fixed" layout).
3344
+ * Ignored when layout is "fill".
3345
+ */
3170
3346
  maxHeight?: string | number;
3171
3347
  /** Additional CSS classes */
3172
3348
  className?: string;
3173
3349
  /** Theme mode */
3174
3350
  theme?: ThemeMode;
3351
+ /**
3352
+ * Layout mode for the container.
3353
+ * - "fixed" (default): Uses maxHeight for a widget-style bounded container.
3354
+ * - "fill": Uses flex-1/min-h-0 to fill parent container. Ideal for full-page layouts.
3355
+ */
3356
+ layout?: "fixed" | "fill";
3175
3357
  }
3176
3358
  /**
3177
3359
  * Container component for the chat interface
@@ -3184,7 +3366,7 @@ interface ChatContainerProps {
3184
3366
  * </ChatContainer>
3185
3367
  * ```
3186
3368
  */
3187
- declare function ChatContainer({ children, maxHeight, className, theme, }: ChatContainerProps): react_jsx_runtime.JSX.Element;
3369
+ declare function ChatContainer({ children, maxHeight, className, theme, layout, }: ChatContainerProps): react_jsx_runtime.JSX.Element;
3188
3370
 
3189
3371
  interface ChatInputProps {
3190
3372
  /** Callback when user sends a message */
@@ -3226,6 +3408,17 @@ interface ChatInputProps {
3226
3408
  */
3227
3409
  declare function ChatInput({ onSend, onStop, placeholder, disabled, isLoading, enableAttachments, attachments, onRemoveAttachment, dropZoneRef, isUploadingAttachments, className, }: ChatInputProps): react_jsx_runtime.JSX.Element;
3228
3410
 
3411
+ /**
3412
+ * Tool name patterns for internal/orchestration tools that should be hidden
3413
+ * in compact verbosity mode. These are matched after stripping common prefixes
3414
+ * (e.g., `team_api_handoff_to_agent` → `handoff_to_agent`).
3415
+ */
3416
+ declare const INTERNAL_TOOL_NAMES: Set<string>;
3417
+ /**
3418
+ * Check if a tool name is an internal/orchestration tool.
3419
+ * Strips common prefixes before matching (e.g., `team_api_handoff_to_agent` → matches `handoff_to_agent`).
3420
+ */
3421
+ declare function isInternalTool(toolName: string): boolean;
3229
3422
  interface ToolCallEntryProps {
3230
3423
  /** Tool call data */
3231
3424
  toolCall: ToolCall;
@@ -3239,6 +3432,8 @@ interface ToolCallEntryProps {
3239
3432
  alt?: string;
3240
3433
  filename?: string;
3241
3434
  }) => void;
3435
+ /** Render in compact single-line style (for completed tools in compact verbosity) */
3436
+ compact?: boolean;
3242
3437
  }
3243
3438
  /**
3244
3439
  * Displays a single tool call with status and expandable details
@@ -3257,7 +3452,85 @@ interface ToolCallEntryProps {
3257
3452
  * />
3258
3453
  * ```
3259
3454
  */
3260
- declare function ToolCallEntry({ toolCall, className, showFullJson, onImageClick, }: ToolCallEntryProps): react_jsx_runtime.JSX.Element;
3455
+ declare function ToolCallEntry({ toolCall, className, showFullJson, onImageClick, compact, }: ToolCallEntryProps): react_jsx_runtime.JSX.Element;
3456
+
3457
+ interface ThinkingBlockProps {
3458
+ /** Thinking block data */
3459
+ block: ThinkingBlock$1;
3460
+ /** Whether the block starts expanded */
3461
+ defaultExpanded?: boolean;
3462
+ /** Additional CSS classes */
3463
+ className?: string;
3464
+ }
3465
+ interface ThinkingBlockListProps {
3466
+ /** Array of thinking blocks to display */
3467
+ blocks: ThinkingBlock$1[];
3468
+ /** Whether blocks start expanded */
3469
+ defaultExpanded?: boolean;
3470
+ /** Additional CSS classes */
3471
+ className?: string;
3472
+ }
3473
+ /**
3474
+ * Renders a single collapsible thinking/reasoning block
3475
+ */
3476
+ declare function ThinkingBlock({ block, defaultExpanded, className, }: ThinkingBlockProps): react_jsx_runtime.JSX.Element;
3477
+ /**
3478
+ * Renders a list of thinking blocks
3479
+ */
3480
+ declare function ThinkingBlockList({ blocks, defaultExpanded, className, }: ThinkingBlockListProps): react_jsx_runtime.JSX.Element | null;
3481
+
3482
+ interface DelegationProgressProps {
3483
+ /** Delegation event data */
3484
+ event: DelegationEvent;
3485
+ /** Additional CSS classes */
3486
+ className?: string;
3487
+ }
3488
+ interface DelegationProgressListProps {
3489
+ /** Array of delegation events to display */
3490
+ events: DelegationEvent[];
3491
+ /** Additional CSS classes */
3492
+ className?: string;
3493
+ }
3494
+ /**
3495
+ * Renders a single delegation progress indicator
3496
+ */
3497
+ declare function DelegationProgress({ event, className, }: DelegationProgressProps): react_jsx_runtime.JSX.Element;
3498
+ /**
3499
+ * Renders a list of delegation progress indicators
3500
+ */
3501
+ declare function DelegationProgressList({ events, className, }: DelegationProgressListProps): react_jsx_runtime.JSX.Element | null;
3502
+
3503
+ interface ImageGalleryProps {
3504
+ /** Array of images to display */
3505
+ images: ImageData[];
3506
+ /** Callback when an image is clicked. Overrides default lightbox behavior. */
3507
+ onImageClick?: (image: ImageData) => void;
3508
+ /** Additional CSS classes */
3509
+ className?: string;
3510
+ }
3511
+ /**
3512
+ * Renders images in a responsive grid with optional lightbox
3513
+ */
3514
+ declare function ImageGallery({ images, onImageClick, className, }: ImageGalleryProps): react_jsx_runtime.JSX.Element | null;
3515
+
3516
+ interface ImageLightboxProps {
3517
+ /** Array of images */
3518
+ images: ImageData[];
3519
+ /** Current image index */
3520
+ currentIndex: number;
3521
+ /** Close the lightbox */
3522
+ onClose: () => void;
3523
+ /** Navigate to previous image */
3524
+ onPrev: () => void;
3525
+ /** Navigate to next image */
3526
+ onNext: () => void;
3527
+ /** Additional CSS classes for the overlay */
3528
+ className?: string;
3529
+ }
3530
+ /**
3531
+ * Fullscreen image viewer with prev/next navigation
3532
+ */
3533
+ declare function ImageLightbox({ images, currentIndex, onClose, onPrev, onNext, className, }: ImageLightboxProps): react_jsx_runtime.JSX.Element | null;
3261
3534
 
3262
3535
  interface AskUserPromptProps {
3263
3536
  /** The question to display to the user */
@@ -3377,4 +3650,4 @@ declare function ClockIcon({ className, ...props }: IconProps): react_jsx_runtim
3377
3650
  */
3378
3651
  declare function compressImage(file: File, targetSizeKB?: number): Promise<File>;
3379
3652
 
3380
- export { AgentChat, type AgentChatProps, AlertCircleIcon, type Artifact$1 as Artifact, AskUserPrompt, type AskUserPromptProps, type AttachmentData, type AttachmentFile, BotIcon, type ChatAdapter, ChatConfigProvider, type ChatConfigProviderProps, ChatContainer, type ChatContainerProps, type ChatError, ChatInput, type ChatInputProps, ChatMessage, type ChatMessageProps, type ChatMessage$1 as ChatMessageType, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleIcon, type ClarificationData, ClockIcon, CodeIcon, CopyIcon, DatabaseIcon, type DefaultAdapterConfig, DownloadIcon, type Execution, type ExecutionResult, type ExecutionStreamEvent, ExternalLinkIcon, FileDropZone, type FileDropZoneProps, type FileDropZoneRef, FileIcon, FileTextIcon, HelpCircleIcon, type HistoryMessage, type IconProps, ImageIcon, ImagesIcon, type ListSessionsInput, ListTodoIcon, LoadingSpinner, MarkdownContent, type MarkdownContentProps, Maximize2Icon, MessageCircleIcon, MessageList, type MessageListProps, Minimize2Icon, PaperclipIcon, SendIcon, type SendMessageInput$1 as SendMessageInput, type SendMessageOptions, type SessionHistory$1 as SessionHistory, type SessionList, type SessionListItem, SparklesIcon, type StartExecutionInput, StopCircleIcon, type ThemeMode, type ThinkingBlock, type TodoItem, TodoList, type TodoListProps, type ToolCall, ToolCallEntry, type ToolCallEntryProps, type UploadUrlInput, type UploadUrlResult, type UseAgentChatOptions, type UseAgentChatResult, type UseExecutionStreamOptions, type UseExecutionStreamResult, type UseFileAttachmentsOptions, type UseFileAttachmentsResult, UserIcon, XIcon, ZoomInIcon, ZoomOutIcon, compressImage, createDefaultAdapter, useAgentChat, useChatConfig, useChatConfigOptional, useExecutionStream, useFileAttachments };
3653
+ export { AgentChat, type AgentChatProps, AlertCircleIcon, type Artifact$1 as Artifact, AskUserPrompt, type AskUserPromptProps, type AttachmentData, type AttachmentFile, BotIcon, type ChatAdapter, ChatConfigProvider, type ChatConfigProviderProps, ChatContainer, type ChatContainerProps, type ChatError, ChatInput, type ChatInputProps, ChatMessage, type ChatMessageProps, type ChatMessage$1 as ChatMessageType, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleIcon, type ClarificationData, ClockIcon, CodeIcon, CopyIcon, DatabaseIcon, type DefaultAdapterConfig, type DelegationEvent, DelegationProgress, DelegationProgressList, type DelegationProgressListProps, type DelegationProgressProps, DownloadIcon, type Execution, type ExecutionResult, type ExecutionStreamEvent, ExternalLinkIcon, FileDropZone, type FileDropZoneProps, type FileDropZoneRef, FileIcon, FileTextIcon, HelpCircleIcon, type HistoryMessage, INTERNAL_TOOL_NAMES, type IconProps, type ImageData, ImageGallery, type ImageGalleryProps, ImageIcon, ImageLightbox, type ImageLightboxProps, ImagesIcon, type ListSessionsInput, ListTodoIcon, LoadingSpinner, MarkdownContent, type MarkdownContentProps, Maximize2Icon, MessageCircleIcon, MessageList, type MessageListProps, Minimize2Icon, PaperclipIcon, SendIcon, type SendMessageInput$1 as SendMessageInput, type SendMessageOptions, type SessionHistory$1 as SessionHistory, type SessionList, type SessionListItem, SparklesIcon, type StartExecutionInput, StopCircleIcon, type ThemeMode, ThinkingBlock, ThinkingBlockList, type ThinkingBlockListProps, type ThinkingBlockProps, type ThinkingBlock$1 as ThinkingBlockType, type TodoItem, TodoList, type TodoListProps, type ToolCall, ToolCallEntry, type ToolCallEntryProps, type ToolCallVerbosity, type UploadUrlInput, type UploadUrlResult, type UseAgentChatOptions, type UseAgentChatResult, type UseExecutionStreamOptions, type UseExecutionStreamResult, type UseFileAttachmentsOptions, type UseFileAttachmentsResult, UserIcon, XIcon, ZoomInIcon, ZoomOutIcon, compressImage, createDefaultAdapter, isInternalTool, useAgentChat, useChatConfig, useChatConfigOptional, useExecutionStream, useFileAttachments };