@shuffleio/shuffle-mcps 0.0.6 → 0.0.8
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/README.md +122 -3
- package/dist/index.cjs +1929 -772
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +220 -11
- package/dist/index.d.ts +220 -11
- package/dist/index.js +1956 -774
- package/dist/index.js.map +1 -1
- package/dist/{shuffle-mcp-JQWKQNUP.css → shuffle-mcp-24XBNRGE.css} +45 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Local Singul Library - Helpers
|
|
@@ -271,8 +272,12 @@ interface AppSearchDrawerProps {
|
|
|
271
272
|
categories?: string[];
|
|
272
273
|
objectID?: string;
|
|
273
274
|
}>;
|
|
275
|
+
/** Highlight (pulsing ring) the matching app card after `highlightDelayMs` */
|
|
276
|
+
highlightAppName?: string;
|
|
277
|
+
/** Delay before the highlight kicks in (default 5000ms) */
|
|
278
|
+
highlightDelayMs?: number;
|
|
274
279
|
}
|
|
275
|
-
declare function AppSearchDrawer({ open, onClose, initialQuery, title, subtitle, anchor, width, showPipelinesBanner, onQuickSelect, onSelectOverride, onDetailClose, onAddToCanvas, priorityCategory, connectionPathApps, pinnedApps, }: AppSearchDrawerProps): react_jsx_runtime.JSX.Element;
|
|
280
|
+
declare function AppSearchDrawer({ open, onClose, initialQuery, title, subtitle, anchor, width, showPipelinesBanner, onQuickSelect, onSelectOverride, onDetailClose, onAddToCanvas, priorityCategory, connectionPathApps, pinnedApps, highlightAppName, highlightDelayMs, }: AppSearchDrawerProps): react_jsx_runtime.JSX.Element;
|
|
276
281
|
|
|
277
282
|
declare function ShufflePipelinesBanner(): react_jsx_runtime.JSX.Element;
|
|
278
283
|
|
|
@@ -428,6 +433,8 @@ interface AgentUIProps {
|
|
|
428
433
|
hideAppPicker?: boolean;
|
|
429
434
|
/** Hide the paperclip image-attachment button. */
|
|
430
435
|
hideAttach?: boolean;
|
|
436
|
+
/** Disable the "Start" tab in the run switcher (e.g. when viewing a fixed execution). */
|
|
437
|
+
disableStartTab?: boolean;
|
|
431
438
|
/** Label on the "Select Apps / MCPs" chip. */
|
|
432
439
|
appPickerLabel?: string;
|
|
433
440
|
/** Title on the AppSearchDrawer. */
|
|
@@ -449,6 +456,27 @@ interface AgentUIProps {
|
|
|
449
456
|
executionId?: string;
|
|
450
457
|
/** Authorization token paired with `executionId`. */
|
|
451
458
|
authorization?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Pre-loaded execution payload. When provided, AgentUI skips the starter
|
|
461
|
+
* and renders Simple/Detailed views immediately — no `/streams/results`
|
|
462
|
+
* fetch, no `authorization` token required. Useful for embedding inside
|
|
463
|
+
* a list/drawer that already has the execution data in hand. If the run
|
|
464
|
+
* is still EXECUTING and an `authorization` is also present, polling
|
|
465
|
+
* continues normally.
|
|
466
|
+
*/
|
|
467
|
+
initialExecution?: {
|
|
468
|
+
execution_id?: string;
|
|
469
|
+
authorization?: string;
|
|
470
|
+
status?: string;
|
|
471
|
+
started_at?: number | string;
|
|
472
|
+
completed_at?: number | string;
|
|
473
|
+
results?: any[];
|
|
474
|
+
workflow?: {
|
|
475
|
+
id?: string;
|
|
476
|
+
name?: string;
|
|
477
|
+
};
|
|
478
|
+
[k: string]: any;
|
|
479
|
+
};
|
|
452
480
|
/** Called whenever a run finishes (success or failure). */
|
|
453
481
|
onRun?: (info: {
|
|
454
482
|
input: string;
|
|
@@ -456,6 +484,8 @@ interface AgentUIProps {
|
|
|
456
484
|
executionId?: string;
|
|
457
485
|
error?: string;
|
|
458
486
|
}) => void;
|
|
487
|
+
/** Called whenever the active top-level view changes (start / simple / detailed). */
|
|
488
|
+
onViewChange?: (view: 'start' | 'simple' | 'detailed') => void;
|
|
459
489
|
/**
|
|
460
490
|
* Optional Shuffle API key. When provided, all `/api/v1/*` calls made by
|
|
461
491
|
* this component (agent run, polling, app autoload, icon fallback) use it
|
|
@@ -471,9 +501,197 @@ interface AgentUIProps {
|
|
|
471
501
|
apiBaseUrl?: string;
|
|
472
502
|
/** Optional Shuffle Org ID — sent as the `Org-Id` header on every call. */
|
|
473
503
|
orgId?: string;
|
|
504
|
+
/** Optional className forwarded to the root container. */
|
|
505
|
+
className?: string;
|
|
506
|
+
/** Style overrides merged into the root container sx. */
|
|
507
|
+
sx?: SxProps<Theme>;
|
|
508
|
+
/** Style overrides for the inner content card (the column under the run-switcher). */
|
|
509
|
+
contentSx?: SxProps<Theme>;
|
|
474
510
|
}
|
|
475
511
|
declare const AgentUI: React$1.FC<AgentUIProps>;
|
|
476
512
|
|
|
513
|
+
type AgentRunDrawerTab = 'run' | 'permissions' | 'localLLM';
|
|
514
|
+
interface AgentRunDrawerProps {
|
|
515
|
+
open: boolean;
|
|
516
|
+
onClose: () => void;
|
|
517
|
+
/** Which tab to focus when the drawer opens. Default: 'run'. */
|
|
518
|
+
initialTab?: AgentRunDrawerTab;
|
|
519
|
+
/** Render content for the Permissions tab. Tab is hidden when omitted. */
|
|
520
|
+
permissionsSlot?: React.ReactNode;
|
|
521
|
+
/** Render content for the Local LLM tab. Tab is hidden when omitted. */
|
|
522
|
+
localLLMSlot?: React.ReactNode;
|
|
523
|
+
/**
|
|
524
|
+
* Custom badge node next to the Local LLM tab label (e.g. a green check
|
|
525
|
+
* when OpenAI auth is detected). Optional.
|
|
526
|
+
*/
|
|
527
|
+
localLLMTabBadge?: React.ReactNode;
|
|
528
|
+
/** Tooltip shown when the Permissions tab is rendered but disabled. */
|
|
529
|
+
permissionsDisabled?: boolean;
|
|
530
|
+
permissionsDisabledTooltip?: string;
|
|
531
|
+
/** Forwarded to the embedded AgentUI (apiKey, apiBaseUrl, orgId, etc.). */
|
|
532
|
+
agentUIProps?: Partial<AgentUIProps>;
|
|
533
|
+
/** Drawer width override (default: 480 px on >=sm, full-width on xs). */
|
|
534
|
+
width?: number;
|
|
535
|
+
/** Header title. Default: "Agent". */
|
|
536
|
+
title?: string;
|
|
537
|
+
/** Header subtitle. Default: "Run actions and manage permissions". */
|
|
538
|
+
subtitle?: string;
|
|
539
|
+
/** Optional className forwarded to the Drawer Paper. */
|
|
540
|
+
className?: string;
|
|
541
|
+
/** Style overrides merged into the Drawer Paper sx. Use to override colors, padding, etc. */
|
|
542
|
+
paperSx?: SxProps<Theme>;
|
|
543
|
+
/** Style overrides for the header bar (icon + title + close). */
|
|
544
|
+
headerSx?: SxProps<Theme>;
|
|
545
|
+
/** Style overrides for the tab strip. */
|
|
546
|
+
tabsSx?: SxProps<Theme>;
|
|
547
|
+
/** Style overrides for the body container that wraps the active tab content. */
|
|
548
|
+
bodySx?: SxProps<Theme>;
|
|
549
|
+
}
|
|
550
|
+
declare const AgentRunDrawer: ({ open, onClose, initialTab, permissionsSlot, localLLMSlot, localLLMTabBadge, permissionsDisabled, permissionsDisabledTooltip, agentUIProps, width, title, subtitle, className, paperSx, headerSx, tabsSx, bodySx, }: AgentRunDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
551
|
+
|
|
552
|
+
declare const API_CONFIG: {
|
|
553
|
+
readonly baseUrl: string;
|
|
554
|
+
version: string;
|
|
555
|
+
readonly apiKey: string | null;
|
|
556
|
+
setApiKey(key: string | null): void;
|
|
557
|
+
};
|
|
558
|
+
declare const getApiUrl: (endpoint: string) => string;
|
|
559
|
+
declare const getAuthHeader: (overrideOrgId?: string | null) => Record<string, string>;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Agent Activity service — standalone fetcher for agent workflow executions.
|
|
563
|
+
*
|
|
564
|
+
* Self-contained: uses only the lib's API_CONFIG / getApiUrl / getAuthHeader
|
|
565
|
+
* so it works in npm consumers without any project-side hooks or contexts.
|
|
566
|
+
*/
|
|
567
|
+
|
|
568
|
+
interface AgentRunResult {
|
|
569
|
+
action?: {
|
|
570
|
+
app_name?: string;
|
|
571
|
+
label?: string;
|
|
572
|
+
id?: string;
|
|
573
|
+
};
|
|
574
|
+
result?: string;
|
|
575
|
+
status?: string;
|
|
576
|
+
}
|
|
577
|
+
interface AgentDecision {
|
|
578
|
+
title?: string;
|
|
579
|
+
description?: string;
|
|
580
|
+
status?: string;
|
|
581
|
+
timestamp?: string | number;
|
|
582
|
+
duration?: number;
|
|
583
|
+
action?: string;
|
|
584
|
+
result?: string;
|
|
585
|
+
tool?: string;
|
|
586
|
+
reason?: string;
|
|
587
|
+
category?: string;
|
|
588
|
+
confidence?: number;
|
|
589
|
+
runs?: string | number;
|
|
590
|
+
fields?: unknown;
|
|
591
|
+
approval_required?: boolean;
|
|
592
|
+
run_details?: unknown;
|
|
593
|
+
[key: string]: unknown;
|
|
594
|
+
}
|
|
595
|
+
interface AgentRun {
|
|
596
|
+
execution_id: string;
|
|
597
|
+
workflow_id: string;
|
|
598
|
+
status: string;
|
|
599
|
+
started_at: string;
|
|
600
|
+
completed_at?: string;
|
|
601
|
+
result?: string;
|
|
602
|
+
results?: AgentRunResult[];
|
|
603
|
+
decisions?: AgentDecision[];
|
|
604
|
+
execution_argument?: string;
|
|
605
|
+
execution_source?: string;
|
|
606
|
+
authorization?: string;
|
|
607
|
+
workflow?: {
|
|
608
|
+
name?: string;
|
|
609
|
+
description?: string;
|
|
610
|
+
actions?: Array<{
|
|
611
|
+
app_name?: string;
|
|
612
|
+
label?: string;
|
|
613
|
+
}>;
|
|
614
|
+
};
|
|
615
|
+
duration?: number;
|
|
616
|
+
}
|
|
617
|
+
interface AgentActivityResponse {
|
|
618
|
+
success: boolean;
|
|
619
|
+
runs: AgentRun[];
|
|
620
|
+
cursor: string;
|
|
621
|
+
}
|
|
622
|
+
interface AgentActivityParams {
|
|
623
|
+
cursor?: string;
|
|
624
|
+
limit?: number;
|
|
625
|
+
status?: string;
|
|
626
|
+
startTime?: string;
|
|
627
|
+
endTime?: string;
|
|
628
|
+
suborgRuns?: boolean;
|
|
629
|
+
/** Override the lib's shared apiKey for this call. */
|
|
630
|
+
apiKey?: string;
|
|
631
|
+
/** Override the lib's shared baseUrl for this call. */
|
|
632
|
+
apiBaseUrl?: string;
|
|
633
|
+
/** Optional Shuffle Org ID — sent as the `Org-Id` header. */
|
|
634
|
+
orgId?: string;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Search agent workflow executions (workflow_id = "AGENT").
|
|
638
|
+
*/
|
|
639
|
+
declare const searchAgentActivity: (params?: AgentActivityParams) => Promise<AgentActivityResponse>;
|
|
640
|
+
|
|
641
|
+
interface AgentActivityListProps {
|
|
642
|
+
/** Optional Shuffle API key. Falls back to the shared API_CONFIG. */
|
|
643
|
+
apiKey?: string;
|
|
644
|
+
/** Optional Shuffle backend base URL. Falls back to the shared API_CONFIG. */
|
|
645
|
+
apiBaseUrl?: string;
|
|
646
|
+
/** Optional Shuffle Org ID — sent as the `Org-Id` header. */
|
|
647
|
+
orgId?: string;
|
|
648
|
+
/** Called when a run row is clicked. */
|
|
649
|
+
onRunClick?: (run: AgentRun) => void;
|
|
650
|
+
/** Show the search box. Default: true. */
|
|
651
|
+
showSearchBar?: boolean;
|
|
652
|
+
/** Show the status filter chips. Default: true. */
|
|
653
|
+
showStatusChips?: boolean;
|
|
654
|
+
/** Page size. Default: 50. */
|
|
655
|
+
limit?: number;
|
|
656
|
+
/** Empty-state heading. */
|
|
657
|
+
emptyTitle?: string;
|
|
658
|
+
/** Empty-state subtitle. */
|
|
659
|
+
emptySubtitle?: string;
|
|
660
|
+
/** Optional className forwarded to the root container. */
|
|
661
|
+
className?: string;
|
|
662
|
+
/** Style overrides merged into the root container sx. */
|
|
663
|
+
sx?: SxProps<Theme>;
|
|
664
|
+
/** Style overrides for the filter/search toolbar. */
|
|
665
|
+
toolbarSx?: SxProps<Theme>;
|
|
666
|
+
/** Style overrides for each individual run row. */
|
|
667
|
+
rowSx?: SxProps<Theme>;
|
|
668
|
+
}
|
|
669
|
+
declare const AgentActivityList: ({ apiKey, apiBaseUrl, orgId, onRunClick, showSearchBar, showStatusChips, limit, emptyTitle, emptySubtitle, className, sx, toolbarSx, rowSx, }: AgentActivityListProps) => react_jsx_runtime.JSX.Element;
|
|
670
|
+
|
|
671
|
+
interface AgentExecutionDrawerProps {
|
|
672
|
+
open: boolean;
|
|
673
|
+
onClose: () => void;
|
|
674
|
+
/** The run to display. When null and `open=true`, drawer renders empty. */
|
|
675
|
+
run: AgentRun | null;
|
|
676
|
+
/** Drawer width. Default: 720 px on >=sm, full-width on xs. */
|
|
677
|
+
width?: number;
|
|
678
|
+
/** Optional Shuffle API key, forwarded to the embedded AgentUI. */
|
|
679
|
+
apiKey?: string;
|
|
680
|
+
/** Optional Shuffle backend base URL, forwarded to the embedded AgentUI. */
|
|
681
|
+
apiBaseUrl?: string;
|
|
682
|
+
/** Optional Shuffle Org ID, forwarded to the embedded AgentUI. */
|
|
683
|
+
orgId?: string;
|
|
684
|
+
/** Optional className forwarded to the Drawer Paper. */
|
|
685
|
+
className?: string;
|
|
686
|
+
/** Style overrides merged into the Drawer Paper sx. */
|
|
687
|
+
paperSx?: SxProps<Theme>;
|
|
688
|
+
/** Style overrides for the header bar. */
|
|
689
|
+
headerSx?: SxProps<Theme>;
|
|
690
|
+
/** Style overrides for the body container that wraps the embedded AgentUI. */
|
|
691
|
+
bodySx?: SxProps<Theme>;
|
|
692
|
+
}
|
|
693
|
+
declare const AgentExecutionDrawer: ({ open, onClose, run, width, apiKey, apiBaseUrl, orgId, className, paperSx, headerSx, bodySx, }: AgentExecutionDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
694
|
+
|
|
477
695
|
/**
|
|
478
696
|
* useAppLookup — Resolve an app's display name, image, categories,
|
|
479
697
|
* canonical Algolia objectID and matching auth entries from just
|
|
@@ -586,15 +804,6 @@ declare const AppDetailProvider: ({ children }: {
|
|
|
586
804
|
}) => react_jsx_runtime.JSX.Element;
|
|
587
805
|
declare const useAppDetail: () => AppDetailContextType;
|
|
588
806
|
|
|
589
|
-
declare const API_CONFIG: {
|
|
590
|
-
readonly baseUrl: string;
|
|
591
|
-
version: string;
|
|
592
|
-
readonly apiKey: string | null;
|
|
593
|
-
setApiKey(key: string | null): void;
|
|
594
|
-
};
|
|
595
|
-
declare const getApiUrl: (endpoint: string) => string;
|
|
596
|
-
declare const getAuthHeader: (overrideOrgId?: string | null) => Record<string, string>;
|
|
597
|
-
|
|
598
807
|
/**
|
|
599
808
|
* Tiny toast facade — library version. Mirrors the sonner-style surface
|
|
600
809
|
* (`toast(...)`, `toast.success`, `toast.error`, `toast.info`, `toast.warning`)
|
|
@@ -621,4 +830,4 @@ type ToastApi = ((arg: ToastArg, opts?: ToastOptions) => void) & {
|
|
|
621
830
|
};
|
|
622
831
|
declare const toast: ToastApi;
|
|
623
832
|
|
|
624
|
-
export { API_CONFIG, AgentUI, type AgentUIApp, type AgentUIProps, type AlgoliaSearchApp, AppAuthSection, type AppAuthSectionProps, type AppAuthentication, AppDetailDrawer, AppDetailProvider, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, type CustomStyles, IntegrationStatus, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShufflePipelinesBanner, SingulActionsPreview, TryMcpSection, type TryMcpSectionProps, ShuffleMCP as default, getApiUrl, getAuthHeader, refreshAllIntegrationStatus, setToastImpl, toast, useAppAuth, useAppDetail, useAppLookup };
|
|
833
|
+
export { API_CONFIG, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, type AgentRun, AgentRunDrawer, type AgentRunDrawerProps, type AgentRunDrawerTab, type AgentRunResult, AgentUI, type AgentUIApp, type AgentUIProps, type AlgoliaSearchApp, AppAuthSection, type AppAuthSectionProps, type AppAuthentication, AppDetailDrawer, AppDetailProvider, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, type CustomStyles, IntegrationStatus, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShufflePipelinesBanner, SingulActionsPreview, TryMcpSection, type TryMcpSectionProps, ShuffleMCP as default, getApiUrl, getAuthHeader, refreshAllIntegrationStatus, searchAgentActivity, setToastImpl, toast, useAppAuth, useAppDetail, useAppLookup };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Local Singul Library - Helpers
|
|
@@ -271,8 +272,12 @@ interface AppSearchDrawerProps {
|
|
|
271
272
|
categories?: string[];
|
|
272
273
|
objectID?: string;
|
|
273
274
|
}>;
|
|
275
|
+
/** Highlight (pulsing ring) the matching app card after `highlightDelayMs` */
|
|
276
|
+
highlightAppName?: string;
|
|
277
|
+
/** Delay before the highlight kicks in (default 5000ms) */
|
|
278
|
+
highlightDelayMs?: number;
|
|
274
279
|
}
|
|
275
|
-
declare function AppSearchDrawer({ open, onClose, initialQuery, title, subtitle, anchor, width, showPipelinesBanner, onQuickSelect, onSelectOverride, onDetailClose, onAddToCanvas, priorityCategory, connectionPathApps, pinnedApps, }: AppSearchDrawerProps): react_jsx_runtime.JSX.Element;
|
|
280
|
+
declare function AppSearchDrawer({ open, onClose, initialQuery, title, subtitle, anchor, width, showPipelinesBanner, onQuickSelect, onSelectOverride, onDetailClose, onAddToCanvas, priorityCategory, connectionPathApps, pinnedApps, highlightAppName, highlightDelayMs, }: AppSearchDrawerProps): react_jsx_runtime.JSX.Element;
|
|
276
281
|
|
|
277
282
|
declare function ShufflePipelinesBanner(): react_jsx_runtime.JSX.Element;
|
|
278
283
|
|
|
@@ -428,6 +433,8 @@ interface AgentUIProps {
|
|
|
428
433
|
hideAppPicker?: boolean;
|
|
429
434
|
/** Hide the paperclip image-attachment button. */
|
|
430
435
|
hideAttach?: boolean;
|
|
436
|
+
/** Disable the "Start" tab in the run switcher (e.g. when viewing a fixed execution). */
|
|
437
|
+
disableStartTab?: boolean;
|
|
431
438
|
/** Label on the "Select Apps / MCPs" chip. */
|
|
432
439
|
appPickerLabel?: string;
|
|
433
440
|
/** Title on the AppSearchDrawer. */
|
|
@@ -449,6 +456,27 @@ interface AgentUIProps {
|
|
|
449
456
|
executionId?: string;
|
|
450
457
|
/** Authorization token paired with `executionId`. */
|
|
451
458
|
authorization?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Pre-loaded execution payload. When provided, AgentUI skips the starter
|
|
461
|
+
* and renders Simple/Detailed views immediately — no `/streams/results`
|
|
462
|
+
* fetch, no `authorization` token required. Useful for embedding inside
|
|
463
|
+
* a list/drawer that already has the execution data in hand. If the run
|
|
464
|
+
* is still EXECUTING and an `authorization` is also present, polling
|
|
465
|
+
* continues normally.
|
|
466
|
+
*/
|
|
467
|
+
initialExecution?: {
|
|
468
|
+
execution_id?: string;
|
|
469
|
+
authorization?: string;
|
|
470
|
+
status?: string;
|
|
471
|
+
started_at?: number | string;
|
|
472
|
+
completed_at?: number | string;
|
|
473
|
+
results?: any[];
|
|
474
|
+
workflow?: {
|
|
475
|
+
id?: string;
|
|
476
|
+
name?: string;
|
|
477
|
+
};
|
|
478
|
+
[k: string]: any;
|
|
479
|
+
};
|
|
452
480
|
/** Called whenever a run finishes (success or failure). */
|
|
453
481
|
onRun?: (info: {
|
|
454
482
|
input: string;
|
|
@@ -456,6 +484,8 @@ interface AgentUIProps {
|
|
|
456
484
|
executionId?: string;
|
|
457
485
|
error?: string;
|
|
458
486
|
}) => void;
|
|
487
|
+
/** Called whenever the active top-level view changes (start / simple / detailed). */
|
|
488
|
+
onViewChange?: (view: 'start' | 'simple' | 'detailed') => void;
|
|
459
489
|
/**
|
|
460
490
|
* Optional Shuffle API key. When provided, all `/api/v1/*` calls made by
|
|
461
491
|
* this component (agent run, polling, app autoload, icon fallback) use it
|
|
@@ -471,9 +501,197 @@ interface AgentUIProps {
|
|
|
471
501
|
apiBaseUrl?: string;
|
|
472
502
|
/** Optional Shuffle Org ID — sent as the `Org-Id` header on every call. */
|
|
473
503
|
orgId?: string;
|
|
504
|
+
/** Optional className forwarded to the root container. */
|
|
505
|
+
className?: string;
|
|
506
|
+
/** Style overrides merged into the root container sx. */
|
|
507
|
+
sx?: SxProps<Theme>;
|
|
508
|
+
/** Style overrides for the inner content card (the column under the run-switcher). */
|
|
509
|
+
contentSx?: SxProps<Theme>;
|
|
474
510
|
}
|
|
475
511
|
declare const AgentUI: React$1.FC<AgentUIProps>;
|
|
476
512
|
|
|
513
|
+
type AgentRunDrawerTab = 'run' | 'permissions' | 'localLLM';
|
|
514
|
+
interface AgentRunDrawerProps {
|
|
515
|
+
open: boolean;
|
|
516
|
+
onClose: () => void;
|
|
517
|
+
/** Which tab to focus when the drawer opens. Default: 'run'. */
|
|
518
|
+
initialTab?: AgentRunDrawerTab;
|
|
519
|
+
/** Render content for the Permissions tab. Tab is hidden when omitted. */
|
|
520
|
+
permissionsSlot?: React.ReactNode;
|
|
521
|
+
/** Render content for the Local LLM tab. Tab is hidden when omitted. */
|
|
522
|
+
localLLMSlot?: React.ReactNode;
|
|
523
|
+
/**
|
|
524
|
+
* Custom badge node next to the Local LLM tab label (e.g. a green check
|
|
525
|
+
* when OpenAI auth is detected). Optional.
|
|
526
|
+
*/
|
|
527
|
+
localLLMTabBadge?: React.ReactNode;
|
|
528
|
+
/** Tooltip shown when the Permissions tab is rendered but disabled. */
|
|
529
|
+
permissionsDisabled?: boolean;
|
|
530
|
+
permissionsDisabledTooltip?: string;
|
|
531
|
+
/** Forwarded to the embedded AgentUI (apiKey, apiBaseUrl, orgId, etc.). */
|
|
532
|
+
agentUIProps?: Partial<AgentUIProps>;
|
|
533
|
+
/** Drawer width override (default: 480 px on >=sm, full-width on xs). */
|
|
534
|
+
width?: number;
|
|
535
|
+
/** Header title. Default: "Agent". */
|
|
536
|
+
title?: string;
|
|
537
|
+
/** Header subtitle. Default: "Run actions and manage permissions". */
|
|
538
|
+
subtitle?: string;
|
|
539
|
+
/** Optional className forwarded to the Drawer Paper. */
|
|
540
|
+
className?: string;
|
|
541
|
+
/** Style overrides merged into the Drawer Paper sx. Use to override colors, padding, etc. */
|
|
542
|
+
paperSx?: SxProps<Theme>;
|
|
543
|
+
/** Style overrides for the header bar (icon + title + close). */
|
|
544
|
+
headerSx?: SxProps<Theme>;
|
|
545
|
+
/** Style overrides for the tab strip. */
|
|
546
|
+
tabsSx?: SxProps<Theme>;
|
|
547
|
+
/** Style overrides for the body container that wraps the active tab content. */
|
|
548
|
+
bodySx?: SxProps<Theme>;
|
|
549
|
+
}
|
|
550
|
+
declare const AgentRunDrawer: ({ open, onClose, initialTab, permissionsSlot, localLLMSlot, localLLMTabBadge, permissionsDisabled, permissionsDisabledTooltip, agentUIProps, width, title, subtitle, className, paperSx, headerSx, tabsSx, bodySx, }: AgentRunDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
551
|
+
|
|
552
|
+
declare const API_CONFIG: {
|
|
553
|
+
readonly baseUrl: string;
|
|
554
|
+
version: string;
|
|
555
|
+
readonly apiKey: string | null;
|
|
556
|
+
setApiKey(key: string | null): void;
|
|
557
|
+
};
|
|
558
|
+
declare const getApiUrl: (endpoint: string) => string;
|
|
559
|
+
declare const getAuthHeader: (overrideOrgId?: string | null) => Record<string, string>;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Agent Activity service — standalone fetcher for agent workflow executions.
|
|
563
|
+
*
|
|
564
|
+
* Self-contained: uses only the lib's API_CONFIG / getApiUrl / getAuthHeader
|
|
565
|
+
* so it works in npm consumers without any project-side hooks or contexts.
|
|
566
|
+
*/
|
|
567
|
+
|
|
568
|
+
interface AgentRunResult {
|
|
569
|
+
action?: {
|
|
570
|
+
app_name?: string;
|
|
571
|
+
label?: string;
|
|
572
|
+
id?: string;
|
|
573
|
+
};
|
|
574
|
+
result?: string;
|
|
575
|
+
status?: string;
|
|
576
|
+
}
|
|
577
|
+
interface AgentDecision {
|
|
578
|
+
title?: string;
|
|
579
|
+
description?: string;
|
|
580
|
+
status?: string;
|
|
581
|
+
timestamp?: string | number;
|
|
582
|
+
duration?: number;
|
|
583
|
+
action?: string;
|
|
584
|
+
result?: string;
|
|
585
|
+
tool?: string;
|
|
586
|
+
reason?: string;
|
|
587
|
+
category?: string;
|
|
588
|
+
confidence?: number;
|
|
589
|
+
runs?: string | number;
|
|
590
|
+
fields?: unknown;
|
|
591
|
+
approval_required?: boolean;
|
|
592
|
+
run_details?: unknown;
|
|
593
|
+
[key: string]: unknown;
|
|
594
|
+
}
|
|
595
|
+
interface AgentRun {
|
|
596
|
+
execution_id: string;
|
|
597
|
+
workflow_id: string;
|
|
598
|
+
status: string;
|
|
599
|
+
started_at: string;
|
|
600
|
+
completed_at?: string;
|
|
601
|
+
result?: string;
|
|
602
|
+
results?: AgentRunResult[];
|
|
603
|
+
decisions?: AgentDecision[];
|
|
604
|
+
execution_argument?: string;
|
|
605
|
+
execution_source?: string;
|
|
606
|
+
authorization?: string;
|
|
607
|
+
workflow?: {
|
|
608
|
+
name?: string;
|
|
609
|
+
description?: string;
|
|
610
|
+
actions?: Array<{
|
|
611
|
+
app_name?: string;
|
|
612
|
+
label?: string;
|
|
613
|
+
}>;
|
|
614
|
+
};
|
|
615
|
+
duration?: number;
|
|
616
|
+
}
|
|
617
|
+
interface AgentActivityResponse {
|
|
618
|
+
success: boolean;
|
|
619
|
+
runs: AgentRun[];
|
|
620
|
+
cursor: string;
|
|
621
|
+
}
|
|
622
|
+
interface AgentActivityParams {
|
|
623
|
+
cursor?: string;
|
|
624
|
+
limit?: number;
|
|
625
|
+
status?: string;
|
|
626
|
+
startTime?: string;
|
|
627
|
+
endTime?: string;
|
|
628
|
+
suborgRuns?: boolean;
|
|
629
|
+
/** Override the lib's shared apiKey for this call. */
|
|
630
|
+
apiKey?: string;
|
|
631
|
+
/** Override the lib's shared baseUrl for this call. */
|
|
632
|
+
apiBaseUrl?: string;
|
|
633
|
+
/** Optional Shuffle Org ID — sent as the `Org-Id` header. */
|
|
634
|
+
orgId?: string;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Search agent workflow executions (workflow_id = "AGENT").
|
|
638
|
+
*/
|
|
639
|
+
declare const searchAgentActivity: (params?: AgentActivityParams) => Promise<AgentActivityResponse>;
|
|
640
|
+
|
|
641
|
+
interface AgentActivityListProps {
|
|
642
|
+
/** Optional Shuffle API key. Falls back to the shared API_CONFIG. */
|
|
643
|
+
apiKey?: string;
|
|
644
|
+
/** Optional Shuffle backend base URL. Falls back to the shared API_CONFIG. */
|
|
645
|
+
apiBaseUrl?: string;
|
|
646
|
+
/** Optional Shuffle Org ID — sent as the `Org-Id` header. */
|
|
647
|
+
orgId?: string;
|
|
648
|
+
/** Called when a run row is clicked. */
|
|
649
|
+
onRunClick?: (run: AgentRun) => void;
|
|
650
|
+
/** Show the search box. Default: true. */
|
|
651
|
+
showSearchBar?: boolean;
|
|
652
|
+
/** Show the status filter chips. Default: true. */
|
|
653
|
+
showStatusChips?: boolean;
|
|
654
|
+
/** Page size. Default: 50. */
|
|
655
|
+
limit?: number;
|
|
656
|
+
/** Empty-state heading. */
|
|
657
|
+
emptyTitle?: string;
|
|
658
|
+
/** Empty-state subtitle. */
|
|
659
|
+
emptySubtitle?: string;
|
|
660
|
+
/** Optional className forwarded to the root container. */
|
|
661
|
+
className?: string;
|
|
662
|
+
/** Style overrides merged into the root container sx. */
|
|
663
|
+
sx?: SxProps<Theme>;
|
|
664
|
+
/** Style overrides for the filter/search toolbar. */
|
|
665
|
+
toolbarSx?: SxProps<Theme>;
|
|
666
|
+
/** Style overrides for each individual run row. */
|
|
667
|
+
rowSx?: SxProps<Theme>;
|
|
668
|
+
}
|
|
669
|
+
declare const AgentActivityList: ({ apiKey, apiBaseUrl, orgId, onRunClick, showSearchBar, showStatusChips, limit, emptyTitle, emptySubtitle, className, sx, toolbarSx, rowSx, }: AgentActivityListProps) => react_jsx_runtime.JSX.Element;
|
|
670
|
+
|
|
671
|
+
interface AgentExecutionDrawerProps {
|
|
672
|
+
open: boolean;
|
|
673
|
+
onClose: () => void;
|
|
674
|
+
/** The run to display. When null and `open=true`, drawer renders empty. */
|
|
675
|
+
run: AgentRun | null;
|
|
676
|
+
/** Drawer width. Default: 720 px on >=sm, full-width on xs. */
|
|
677
|
+
width?: number;
|
|
678
|
+
/** Optional Shuffle API key, forwarded to the embedded AgentUI. */
|
|
679
|
+
apiKey?: string;
|
|
680
|
+
/** Optional Shuffle backend base URL, forwarded to the embedded AgentUI. */
|
|
681
|
+
apiBaseUrl?: string;
|
|
682
|
+
/** Optional Shuffle Org ID, forwarded to the embedded AgentUI. */
|
|
683
|
+
orgId?: string;
|
|
684
|
+
/** Optional className forwarded to the Drawer Paper. */
|
|
685
|
+
className?: string;
|
|
686
|
+
/** Style overrides merged into the Drawer Paper sx. */
|
|
687
|
+
paperSx?: SxProps<Theme>;
|
|
688
|
+
/** Style overrides for the header bar. */
|
|
689
|
+
headerSx?: SxProps<Theme>;
|
|
690
|
+
/** Style overrides for the body container that wraps the embedded AgentUI. */
|
|
691
|
+
bodySx?: SxProps<Theme>;
|
|
692
|
+
}
|
|
693
|
+
declare const AgentExecutionDrawer: ({ open, onClose, run, width, apiKey, apiBaseUrl, orgId, className, paperSx, headerSx, bodySx, }: AgentExecutionDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
694
|
+
|
|
477
695
|
/**
|
|
478
696
|
* useAppLookup — Resolve an app's display name, image, categories,
|
|
479
697
|
* canonical Algolia objectID and matching auth entries from just
|
|
@@ -586,15 +804,6 @@ declare const AppDetailProvider: ({ children }: {
|
|
|
586
804
|
}) => react_jsx_runtime.JSX.Element;
|
|
587
805
|
declare const useAppDetail: () => AppDetailContextType;
|
|
588
806
|
|
|
589
|
-
declare const API_CONFIG: {
|
|
590
|
-
readonly baseUrl: string;
|
|
591
|
-
version: string;
|
|
592
|
-
readonly apiKey: string | null;
|
|
593
|
-
setApiKey(key: string | null): void;
|
|
594
|
-
};
|
|
595
|
-
declare const getApiUrl: (endpoint: string) => string;
|
|
596
|
-
declare const getAuthHeader: (overrideOrgId?: string | null) => Record<string, string>;
|
|
597
|
-
|
|
598
807
|
/**
|
|
599
808
|
* Tiny toast facade — library version. Mirrors the sonner-style surface
|
|
600
809
|
* (`toast(...)`, `toast.success`, `toast.error`, `toast.info`, `toast.warning`)
|
|
@@ -621,4 +830,4 @@ type ToastApi = ((arg: ToastArg, opts?: ToastOptions) => void) & {
|
|
|
621
830
|
};
|
|
622
831
|
declare const toast: ToastApi;
|
|
623
832
|
|
|
624
|
-
export { API_CONFIG, AgentUI, type AgentUIApp, type AgentUIProps, type AlgoliaSearchApp, AppAuthSection, type AppAuthSectionProps, type AppAuthentication, AppDetailDrawer, AppDetailProvider, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, type CustomStyles, IntegrationStatus, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShufflePipelinesBanner, SingulActionsPreview, TryMcpSection, type TryMcpSectionProps, ShuffleMCP as default, getApiUrl, getAuthHeader, refreshAllIntegrationStatus, setToastImpl, toast, useAppAuth, useAppDetail, useAppLookup };
|
|
833
|
+
export { API_CONFIG, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, type AgentRun, AgentRunDrawer, type AgentRunDrawerProps, type AgentRunDrawerTab, type AgentRunResult, AgentUI, type AgentUIApp, type AgentUIProps, type AlgoliaSearchApp, AppAuthSection, type AppAuthSectionProps, type AppAuthentication, AppDetailDrawer, AppDetailProvider, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, type CustomStyles, IntegrationStatus, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShufflePipelinesBanner, SingulActionsPreview, TryMcpSection, type TryMcpSectionProps, ShuffleMCP as default, getApiUrl, getAuthHeader, refreshAllIntegrationStatus, searchAgentActivity, setToastImpl, toast, useAppAuth, useAppDetail, useAppLookup };
|