@erdoai/ui 0.1.48 → 0.1.50

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.cts CHANGED
@@ -22,7 +22,14 @@ interface DatasetDetails {
22
22
  * recreating on every render.
23
23
  */
24
24
  interface DataFetcher {
25
- fetchDatasetContents: (slug: string, invocationId: string) => Promise<any[]>;
25
+ /**
26
+ * Fetch dataset contents for charts/tables.
27
+ * @param slug - Dataset slug to query
28
+ * @param invocationId - Thread/invocation ID for context
29
+ * @param sqlQuery - Optional SQL query to run against the dataset
30
+ * @param resourceKey - Optional resource key to look up range/sheet metadata for Excel files
31
+ */
32
+ fetchDatasetContents: (slug: string, invocationId: string, sqlQuery?: string, resourceKey?: string) => Promise<any[]>;
26
33
  /**
27
34
  * Get dataset details (id and name) by slug.
28
35
  * Used by DatasetDownload component to resolve slug to downloadable dataset.
@@ -30,9 +37,14 @@ interface DataFetcher {
30
37
  getDatasetDetails?: (slug: string, threadId: string) => Promise<DatasetDetails | null>;
31
38
  /**
32
39
  * Download a dataset file by ID.
40
+ * If sqlQuery is provided, the query is executed and results returned as CSV.
41
+ * If no query is provided, the raw dataset file is returned.
42
+ * @param datasetId - Dataset UUID
43
+ * @param sqlQuery - Optional SQL query to execute
44
+ * @param resourceKey - Optional resource key for sheet/range metadata
33
45
  * Returns a Blob that can be saved as a file.
34
46
  */
35
- downloadDataset?: (datasetId: string) => Promise<Blob>;
47
+ downloadDataset?: (datasetId: string, sqlQuery?: string, resourceKey?: string) => Promise<Blob>;
36
48
  }
37
49
  /**
38
50
  * Configuration for the ErdoProvider.
@@ -295,6 +307,10 @@ interface Series$1 {
295
307
  key: string;
296
308
  color: string;
297
309
  datasetSlug: string;
310
+ /** Optional SQL query to run against the dataset */
311
+ sqlQuery?: string;
312
+ /** Optional resource key for Excel files with headers not on row 1 */
313
+ resourceKey?: string;
298
314
  axisIndex?: number;
299
315
  filters?: Filter$1[];
300
316
  }
@@ -344,6 +360,10 @@ interface DatasetTableProps {
344
360
  title?: string;
345
361
  invocationId: string;
346
362
  datasetSlug: string;
363
+ /** Optional SQL query to run against the dataset */
364
+ sqlQuery?: string;
365
+ /** Optional resource key for Excel files with headers not on row 1 */
366
+ resourceKey?: string;
347
367
  columns?: TableColumn$1[];
348
368
  maxRows?: number;
349
369
  /** Class for the outer container */
@@ -363,7 +383,7 @@ interface DatasetTableProps {
363
383
  * A table component that fetches data from a dataset and renders it.
364
384
  * Requires ErdoProvider to be set up with data fetching capabilities.
365
385
  */
366
- declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
386
+ declare function DatasetTable({ title, invocationId, datasetSlug, sqlQuery, resourceKey, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
367
387
 
368
388
  /**
369
389
  * JSON streaming parser utilities.
@@ -442,7 +462,7 @@ declare function isParsingInProgress(value: any): boolean;
442
462
  * They represent the structure of entities that can be built from SSE events.
443
463
  */
444
464
 
445
- type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking';
465
+ type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking' | 'bot_invocation' | 'bot_invocation_result' | 'tool_invocation' | 'tool_result';
446
466
  declare function isJsonLike(contentType: ContentType, uiContentType: string): boolean;
447
467
  type EntityType = 'message' | 'message_content' | 'invocation' | 'output' | 'output_content' | 'step' | 'result_handler' | 'status' | 'log';
448
468
  type MessageStreamingState = 'in_progress' | 'completed';
@@ -492,7 +512,7 @@ interface MessageContent extends BaseContentFields {
492
512
  id: string;
493
513
  message_id: string;
494
514
  content_type: ContentType;
495
- content: string;
515
+ content: string | Record<string, unknown>;
496
516
  created_by_invocation_id?: string;
497
517
  user_visibility: string;
498
518
  bot_visibility: string;
@@ -530,7 +550,7 @@ interface OutputContent extends BaseContentFields {
530
550
  _type: 'output_content';
531
551
  id: string;
532
552
  output_id: string;
533
- content: string;
553
+ content: string | Record<string, unknown>;
534
554
  content_type: ContentType;
535
555
  user_visibility: string;
536
556
  bot_visibility: string;
@@ -581,6 +601,7 @@ interface Step {
581
601
  Valid: boolean;
582
602
  };
583
603
  bot_id?: string;
604
+ bot_name?: string;
584
605
  result_handler_id: string;
585
606
  step_order: {
586
607
  Int32: number;
@@ -612,6 +633,7 @@ interface Step {
612
633
  Valid: boolean;
613
634
  };
614
635
  depends_on: string[];
636
+ history_content_type?: string;
615
637
  eventsByID: Record<string, InvocationEvent$1>;
616
638
  currentStatus: Status | null;
617
639
  }
@@ -925,6 +947,10 @@ interface Series {
925
947
  key: string;
926
948
  color: string;
927
949
  dataset_slug?: string;
950
+ /** Optional SQL query to run against the dataset */
951
+ sql_query?: string;
952
+ /** Optional resource key for Excel files with headers not on row 1 */
953
+ resource_key?: string;
928
954
  axis_index?: number;
929
955
  filters?: Filter[];
930
956
  }
@@ -1189,6 +1215,10 @@ interface DatasetDownloadProps {
1189
1215
  invocationId?: string;
1190
1216
  /** Optional thread ID override (falls back to provider's threadId) */
1191
1217
  threadId?: string;
1218
+ /** Optional SQL query - if provided, query is executed and results returned as CSV */
1219
+ sqlQuery?: string;
1220
+ /** Optional resource key for sheet/range metadata (Excel files) */
1221
+ resourceKey?: string;
1192
1222
  /** Optional class name for styling */
1193
1223
  className?: string;
1194
1224
  }
@@ -1203,7 +1233,31 @@ interface DatasetDownloadProps {
1203
1233
  * <DatasetDownload slug="my-dataset" invocationId="abc123" />
1204
1234
  * ```
1205
1235
  */
1206
- declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1236
+ declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, sqlQuery, resourceKey, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1237
+
1238
+ interface Memory {
1239
+ id: string;
1240
+ content: string;
1241
+ description: string;
1242
+ type: string;
1243
+ tags?: string[];
1244
+ created_at?: string;
1245
+ extra?: Record<string, unknown>;
1246
+ }
1247
+ interface MemoryContentProps {
1248
+ /** Array of memories or object with memories array */
1249
+ content: Memory[] | {
1250
+ memories: Memory[];
1251
+ };
1252
+ className?: string;
1253
+ }
1254
+ /**
1255
+ * Renders memory search results with proper formatting for different memory types.
1256
+ *
1257
+ * Snippets are shown with truncated descriptions and expandable content.
1258
+ * Other memory types show their content directly.
1259
+ */
1260
+ declare function MemoryContent({ content, className }: MemoryContentProps): react_jsx_runtime.JSX.Element;
1207
1261
 
1208
1262
  /** Node structure from UI generation content */
1209
1263
  interface UINode {
@@ -1237,6 +1291,10 @@ interface ChartNodeContent {
1237
1291
  interface TableNodeContent {
1238
1292
  table_title: string;
1239
1293
  dataset_slug?: string;
1294
+ /** Optional SQL query to run against the dataset */
1295
+ sql_query?: string;
1296
+ /** Optional resource key for Excel files with headers not on row 1 */
1297
+ resource_key?: string;
1240
1298
  columns: TableColumn[];
1241
1299
  }
1242
1300
  /** Text markdown node content structure */
@@ -1355,6 +1413,7 @@ interface UseDatasetContentsResult {
1355
1413
  *
1356
1414
  * @param datasetSlug - The slug/identifier of the dataset
1357
1415
  * @param invocationId - The invocation ID context
1416
+ * @param sqlQuery - Optional SQL query to run against the dataset
1358
1417
  * @returns Object with data, isLoading, error, and refetch function
1359
1418
  *
1360
1419
  * @example
@@ -1364,14 +1423,34 @@ interface UseDatasetContentsResult {
1364
1423
  * if (error) return <Error message={error.message} />;
1365
1424
  * return <Chart data={data} />;
1366
1425
  * ```
1426
+ *
1427
+ * @example With SQL query
1428
+ * ```tsx
1429
+ * const { data } = useDatasetContents(
1430
+ * 'my-database',
1431
+ * invocationId,
1432
+ * 'SELECT * FROM users ORDER BY created_at DESC LIMIT 10'
1433
+ * );
1434
+ * ```
1435
+ *
1436
+ * @example With resource key (for Excel files with headers not on row 1)
1437
+ * ```tsx
1438
+ * const { data } = useDatasetContents(
1439
+ * 'my-excel-dataset',
1440
+ * invocationId,
1441
+ * undefined,
1442
+ * 'abc123::Sheet1::table_1'
1443
+ * );
1444
+ * ```
1367
1445
  */
1368
- declare function useDatasetContents(datasetSlug: string, invocationId: string): UseDatasetContentsResult;
1446
+ declare function useDatasetContents(datasetSlug: string, invocationId: string, sqlQuery?: string, resourceKey?: string): UseDatasetContentsResult;
1369
1447
  /**
1370
1448
  * Hook to fetch contents of multiple datasets in parallel.
1371
1449
  * Uses the DataFetcher from ErdoProvider if available, otherwise falls back to REST API.
1372
1450
  *
1373
1451
  * @param datasetSlugs - Array of dataset slugs/identifiers
1374
1452
  * @param invocationId - The invocation ID context
1453
+ * @param sqlQueries - Optional map of dataset slug to SQL query
1375
1454
  * @returns Array of result objects, one per dataset
1376
1455
  *
1377
1456
  * @example
@@ -1380,8 +1459,27 @@ declare function useDatasetContents(datasetSlug: string, invocationId: string):
1380
1459
  * const isLoading = results.some(r => r.isLoading);
1381
1460
  * const allData = results.map(r => r.data || []);
1382
1461
  * ```
1462
+ *
1463
+ * @example With SQL queries
1464
+ * ```tsx
1465
+ * const results = useMultipleDatasetContents(
1466
+ * ['my-db', 'other-db'],
1467
+ * invocationId,
1468
+ * { 'my-db': 'SELECT * FROM users LIMIT 10' }
1469
+ * );
1470
+ * ```
1471
+ *
1472
+ * @example With resource keys
1473
+ * ```tsx
1474
+ * const results = useMultipleDatasetContents(
1475
+ * ['dataset-1', 'dataset-2'],
1476
+ * invocationId,
1477
+ * undefined,
1478
+ * { 'dataset-1': 'abc123::Sheet1::table_1' }
1479
+ * );
1480
+ * ```
1383
1481
  */
1384
- declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string): UseDatasetContentsResult[];
1482
+ declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string, sqlQueries?: Record<string, string>, resourceKeys?: Record<string, string>): UseDatasetContentsResult[];
1385
1483
 
1386
1484
  interface UseThreadOptions {
1387
1485
  /** Initial thread ID to use (if resuming an existing thread) */
@@ -1626,4 +1724,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
1626
1724
  */
1627
1725
  declare function handleSSEEvent(eventType: string, event: SSEEventData, path: string[], threadID: string, activeMessagesByID: Record<string, MessageWithContents>, currentEntity?: Entity | null, parents?: Entity[], entityIds?: Record<string, string>): Entity | null;
1628
1726
 
1629
- export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
1727
+ export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
package/dist/index.d.ts CHANGED
@@ -22,7 +22,14 @@ interface DatasetDetails {
22
22
  * recreating on every render.
23
23
  */
24
24
  interface DataFetcher {
25
- fetchDatasetContents: (slug: string, invocationId: string) => Promise<any[]>;
25
+ /**
26
+ * Fetch dataset contents for charts/tables.
27
+ * @param slug - Dataset slug to query
28
+ * @param invocationId - Thread/invocation ID for context
29
+ * @param sqlQuery - Optional SQL query to run against the dataset
30
+ * @param resourceKey - Optional resource key to look up range/sheet metadata for Excel files
31
+ */
32
+ fetchDatasetContents: (slug: string, invocationId: string, sqlQuery?: string, resourceKey?: string) => Promise<any[]>;
26
33
  /**
27
34
  * Get dataset details (id and name) by slug.
28
35
  * Used by DatasetDownload component to resolve slug to downloadable dataset.
@@ -30,9 +37,14 @@ interface DataFetcher {
30
37
  getDatasetDetails?: (slug: string, threadId: string) => Promise<DatasetDetails | null>;
31
38
  /**
32
39
  * Download a dataset file by ID.
40
+ * If sqlQuery is provided, the query is executed and results returned as CSV.
41
+ * If no query is provided, the raw dataset file is returned.
42
+ * @param datasetId - Dataset UUID
43
+ * @param sqlQuery - Optional SQL query to execute
44
+ * @param resourceKey - Optional resource key for sheet/range metadata
33
45
  * Returns a Blob that can be saved as a file.
34
46
  */
35
- downloadDataset?: (datasetId: string) => Promise<Blob>;
47
+ downloadDataset?: (datasetId: string, sqlQuery?: string, resourceKey?: string) => Promise<Blob>;
36
48
  }
37
49
  /**
38
50
  * Configuration for the ErdoProvider.
@@ -295,6 +307,10 @@ interface Series$1 {
295
307
  key: string;
296
308
  color: string;
297
309
  datasetSlug: string;
310
+ /** Optional SQL query to run against the dataset */
311
+ sqlQuery?: string;
312
+ /** Optional resource key for Excel files with headers not on row 1 */
313
+ resourceKey?: string;
298
314
  axisIndex?: number;
299
315
  filters?: Filter$1[];
300
316
  }
@@ -344,6 +360,10 @@ interface DatasetTableProps {
344
360
  title?: string;
345
361
  invocationId: string;
346
362
  datasetSlug: string;
363
+ /** Optional SQL query to run against the dataset */
364
+ sqlQuery?: string;
365
+ /** Optional resource key for Excel files with headers not on row 1 */
366
+ resourceKey?: string;
347
367
  columns?: TableColumn$1[];
348
368
  maxRows?: number;
349
369
  /** Class for the outer container */
@@ -363,7 +383,7 @@ interface DatasetTableProps {
363
383
  * A table component that fetches data from a dataset and renders it.
364
384
  * Requires ErdoProvider to be set up with data fetching capabilities.
365
385
  */
366
- declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
386
+ declare function DatasetTable({ title, invocationId, datasetSlug, sqlQuery, resourceKey, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
367
387
 
368
388
  /**
369
389
  * JSON streaming parser utilities.
@@ -442,7 +462,7 @@ declare function isParsingInProgress(value: any): boolean;
442
462
  * They represent the structure of entities that can be built from SSE events.
443
463
  */
444
464
 
445
- type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking';
465
+ type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking' | 'bot_invocation' | 'bot_invocation_result' | 'tool_invocation' | 'tool_result';
446
466
  declare function isJsonLike(contentType: ContentType, uiContentType: string): boolean;
447
467
  type EntityType = 'message' | 'message_content' | 'invocation' | 'output' | 'output_content' | 'step' | 'result_handler' | 'status' | 'log';
448
468
  type MessageStreamingState = 'in_progress' | 'completed';
@@ -492,7 +512,7 @@ interface MessageContent extends BaseContentFields {
492
512
  id: string;
493
513
  message_id: string;
494
514
  content_type: ContentType;
495
- content: string;
515
+ content: string | Record<string, unknown>;
496
516
  created_by_invocation_id?: string;
497
517
  user_visibility: string;
498
518
  bot_visibility: string;
@@ -530,7 +550,7 @@ interface OutputContent extends BaseContentFields {
530
550
  _type: 'output_content';
531
551
  id: string;
532
552
  output_id: string;
533
- content: string;
553
+ content: string | Record<string, unknown>;
534
554
  content_type: ContentType;
535
555
  user_visibility: string;
536
556
  bot_visibility: string;
@@ -581,6 +601,7 @@ interface Step {
581
601
  Valid: boolean;
582
602
  };
583
603
  bot_id?: string;
604
+ bot_name?: string;
584
605
  result_handler_id: string;
585
606
  step_order: {
586
607
  Int32: number;
@@ -612,6 +633,7 @@ interface Step {
612
633
  Valid: boolean;
613
634
  };
614
635
  depends_on: string[];
636
+ history_content_type?: string;
615
637
  eventsByID: Record<string, InvocationEvent$1>;
616
638
  currentStatus: Status | null;
617
639
  }
@@ -925,6 +947,10 @@ interface Series {
925
947
  key: string;
926
948
  color: string;
927
949
  dataset_slug?: string;
950
+ /** Optional SQL query to run against the dataset */
951
+ sql_query?: string;
952
+ /** Optional resource key for Excel files with headers not on row 1 */
953
+ resource_key?: string;
928
954
  axis_index?: number;
929
955
  filters?: Filter[];
930
956
  }
@@ -1189,6 +1215,10 @@ interface DatasetDownloadProps {
1189
1215
  invocationId?: string;
1190
1216
  /** Optional thread ID override (falls back to provider's threadId) */
1191
1217
  threadId?: string;
1218
+ /** Optional SQL query - if provided, query is executed and results returned as CSV */
1219
+ sqlQuery?: string;
1220
+ /** Optional resource key for sheet/range metadata (Excel files) */
1221
+ resourceKey?: string;
1192
1222
  /** Optional class name for styling */
1193
1223
  className?: string;
1194
1224
  }
@@ -1203,7 +1233,31 @@ interface DatasetDownloadProps {
1203
1233
  * <DatasetDownload slug="my-dataset" invocationId="abc123" />
1204
1234
  * ```
1205
1235
  */
1206
- declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1236
+ declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, sqlQuery, resourceKey, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1237
+
1238
+ interface Memory {
1239
+ id: string;
1240
+ content: string;
1241
+ description: string;
1242
+ type: string;
1243
+ tags?: string[];
1244
+ created_at?: string;
1245
+ extra?: Record<string, unknown>;
1246
+ }
1247
+ interface MemoryContentProps {
1248
+ /** Array of memories or object with memories array */
1249
+ content: Memory[] | {
1250
+ memories: Memory[];
1251
+ };
1252
+ className?: string;
1253
+ }
1254
+ /**
1255
+ * Renders memory search results with proper formatting for different memory types.
1256
+ *
1257
+ * Snippets are shown with truncated descriptions and expandable content.
1258
+ * Other memory types show their content directly.
1259
+ */
1260
+ declare function MemoryContent({ content, className }: MemoryContentProps): react_jsx_runtime.JSX.Element;
1207
1261
 
1208
1262
  /** Node structure from UI generation content */
1209
1263
  interface UINode {
@@ -1237,6 +1291,10 @@ interface ChartNodeContent {
1237
1291
  interface TableNodeContent {
1238
1292
  table_title: string;
1239
1293
  dataset_slug?: string;
1294
+ /** Optional SQL query to run against the dataset */
1295
+ sql_query?: string;
1296
+ /** Optional resource key for Excel files with headers not on row 1 */
1297
+ resource_key?: string;
1240
1298
  columns: TableColumn[];
1241
1299
  }
1242
1300
  /** Text markdown node content structure */
@@ -1355,6 +1413,7 @@ interface UseDatasetContentsResult {
1355
1413
  *
1356
1414
  * @param datasetSlug - The slug/identifier of the dataset
1357
1415
  * @param invocationId - The invocation ID context
1416
+ * @param sqlQuery - Optional SQL query to run against the dataset
1358
1417
  * @returns Object with data, isLoading, error, and refetch function
1359
1418
  *
1360
1419
  * @example
@@ -1364,14 +1423,34 @@ interface UseDatasetContentsResult {
1364
1423
  * if (error) return <Error message={error.message} />;
1365
1424
  * return <Chart data={data} />;
1366
1425
  * ```
1426
+ *
1427
+ * @example With SQL query
1428
+ * ```tsx
1429
+ * const { data } = useDatasetContents(
1430
+ * 'my-database',
1431
+ * invocationId,
1432
+ * 'SELECT * FROM users ORDER BY created_at DESC LIMIT 10'
1433
+ * );
1434
+ * ```
1435
+ *
1436
+ * @example With resource key (for Excel files with headers not on row 1)
1437
+ * ```tsx
1438
+ * const { data } = useDatasetContents(
1439
+ * 'my-excel-dataset',
1440
+ * invocationId,
1441
+ * undefined,
1442
+ * 'abc123::Sheet1::table_1'
1443
+ * );
1444
+ * ```
1367
1445
  */
1368
- declare function useDatasetContents(datasetSlug: string, invocationId: string): UseDatasetContentsResult;
1446
+ declare function useDatasetContents(datasetSlug: string, invocationId: string, sqlQuery?: string, resourceKey?: string): UseDatasetContentsResult;
1369
1447
  /**
1370
1448
  * Hook to fetch contents of multiple datasets in parallel.
1371
1449
  * Uses the DataFetcher from ErdoProvider if available, otherwise falls back to REST API.
1372
1450
  *
1373
1451
  * @param datasetSlugs - Array of dataset slugs/identifiers
1374
1452
  * @param invocationId - The invocation ID context
1453
+ * @param sqlQueries - Optional map of dataset slug to SQL query
1375
1454
  * @returns Array of result objects, one per dataset
1376
1455
  *
1377
1456
  * @example
@@ -1380,8 +1459,27 @@ declare function useDatasetContents(datasetSlug: string, invocationId: string):
1380
1459
  * const isLoading = results.some(r => r.isLoading);
1381
1460
  * const allData = results.map(r => r.data || []);
1382
1461
  * ```
1462
+ *
1463
+ * @example With SQL queries
1464
+ * ```tsx
1465
+ * const results = useMultipleDatasetContents(
1466
+ * ['my-db', 'other-db'],
1467
+ * invocationId,
1468
+ * { 'my-db': 'SELECT * FROM users LIMIT 10' }
1469
+ * );
1470
+ * ```
1471
+ *
1472
+ * @example With resource keys
1473
+ * ```tsx
1474
+ * const results = useMultipleDatasetContents(
1475
+ * ['dataset-1', 'dataset-2'],
1476
+ * invocationId,
1477
+ * undefined,
1478
+ * { 'dataset-1': 'abc123::Sheet1::table_1' }
1479
+ * );
1480
+ * ```
1383
1481
  */
1384
- declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string): UseDatasetContentsResult[];
1482
+ declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string, sqlQueries?: Record<string, string>, resourceKeys?: Record<string, string>): UseDatasetContentsResult[];
1385
1483
 
1386
1484
  interface UseThreadOptions {
1387
1485
  /** Initial thread ID to use (if resuming an existing thread) */
@@ -1626,4 +1724,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
1626
1724
  */
1627
1725
  declare function handleSSEEvent(eventType: string, event: SSEEventData, path: string[], threadID: string, activeMessagesByID: Record<string, MessageWithContents>, currentEntity?: Entity | null, parents?: Entity[], entityIds?: Record<string, string>): Entity | null;
1628
1726
 
1629
- export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
1727
+ export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };