@shuffleio/shuffle-mcps 0.0.7 → 0.0.9
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 +110 -1
- package/dist/index.cjs +4667 -1403
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +370 -22
- package/dist/index.d.ts +370 -22
- package/dist/index.js +4673 -1389
- 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.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,30 @@ 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;
|
|
279
|
+
/** Enable multi-select: clicking apps toggles them in/out of the selection,
|
|
280
|
+
* drawer stays open, and the picker shows checkboxes + a primary-bordered
|
|
281
|
+
* highlight on already-chosen rows. */
|
|
282
|
+
multiSelect?: boolean;
|
|
283
|
+
/** Currently chosen apps (used to highlight rows in multi-select mode).
|
|
284
|
+
* Match is by objectID first, then by normalized name. */
|
|
285
|
+
selectedApps?: Array<{
|
|
286
|
+
name: string;
|
|
287
|
+
id?: string | null;
|
|
288
|
+
icon?: string;
|
|
289
|
+
}>;
|
|
290
|
+
/** Fires whenever the selection changes in multi-select mode. */
|
|
291
|
+
onSelectionChange?: (apps: Array<{
|
|
292
|
+
name: string;
|
|
293
|
+
id: string | null;
|
|
294
|
+
icon: string;
|
|
295
|
+
categories: string[];
|
|
296
|
+
}>) => void;
|
|
274
297
|
}
|
|
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;
|
|
298
|
+
declare function AppSearchDrawer({ open, onClose, initialQuery, title, subtitle, anchor, width, showPipelinesBanner, onQuickSelect, onSelectOverride, onDetailClose, onAddToCanvas, priorityCategory, connectionPathApps, pinnedApps, highlightAppName, highlightDelayMs, multiSelect, selectedApps, onSelectionChange, }: AppSearchDrawerProps): react_jsx_runtime.JSX.Element;
|
|
276
299
|
|
|
277
300
|
declare function ShufflePipelinesBanner(): react_jsx_runtime.JSX.Element;
|
|
278
301
|
|
|
@@ -349,20 +372,15 @@ interface TryMcpSectionProps {
|
|
|
349
372
|
}
|
|
350
373
|
declare function TryMcpSection({ appName, appIcon, appId, categories }: TryMcpSectionProps): react_jsx_runtime.JSX.Element;
|
|
351
374
|
|
|
352
|
-
|
|
353
|
-
* SingulActionsPreview — Standalone "Try individual actions" block.
|
|
354
|
-
*
|
|
355
|
-
* Renders the action picker (grouped by category), curl/python toggle,
|
|
356
|
-
* editable snippet, Play button (calls Shuffle Tools `execute_python` or
|
|
357
|
-
* the http app `curl` action) and a response area that streams in.
|
|
358
|
-
*
|
|
359
|
-
* Self-contained — pass in the app name + categories. Optionally pass
|
|
360
|
-
* `activeOrgId` so multi-org curl previews include the right Org-Id header.
|
|
361
|
-
*/
|
|
362
|
-
declare const SingulActionsPreview: ({ appName, categories, activeOrgId, }: {
|
|
375
|
+
declare const SingulActionsPreview: ({ appName, appIcon, categories, activeOrgId, onAuthenticate, }: {
|
|
363
376
|
appName: string;
|
|
377
|
+
appIcon?: string;
|
|
364
378
|
categories?: string[];
|
|
365
379
|
activeOrgId?: string | null;
|
|
380
|
+
/** Optional click handler invoked when the user presses the
|
|
381
|
+
* "Authenticate {App}" button surfaced after an
|
|
382
|
+
* `action: "app_authentication"` response. */
|
|
383
|
+
onAuthenticate?: (appName: string) => void;
|
|
366
384
|
}) => react_jsx_runtime.JSX.Element;
|
|
367
385
|
|
|
368
386
|
/**
|
|
@@ -428,6 +446,8 @@ interface AgentUIProps {
|
|
|
428
446
|
hideAppPicker?: boolean;
|
|
429
447
|
/** Hide the paperclip image-attachment button. */
|
|
430
448
|
hideAttach?: boolean;
|
|
449
|
+
/** Disable the "Start" tab in the run switcher (e.g. when viewing a fixed execution). */
|
|
450
|
+
disableStartTab?: boolean;
|
|
431
451
|
/** Label on the "Select Apps / MCPs" chip. */
|
|
432
452
|
appPickerLabel?: string;
|
|
433
453
|
/** Title on the AppSearchDrawer. */
|
|
@@ -449,6 +469,27 @@ interface AgentUIProps {
|
|
|
449
469
|
executionId?: string;
|
|
450
470
|
/** Authorization token paired with `executionId`. */
|
|
451
471
|
authorization?: string;
|
|
472
|
+
/**
|
|
473
|
+
* Pre-loaded execution payload. When provided, AgentUI skips the starter
|
|
474
|
+
* and renders Simple/Detailed views immediately — no `/streams/results`
|
|
475
|
+
* fetch, no `authorization` token required. Useful for embedding inside
|
|
476
|
+
* a list/drawer that already has the execution data in hand. If the run
|
|
477
|
+
* is still EXECUTING and an `authorization` is also present, polling
|
|
478
|
+
* continues normally.
|
|
479
|
+
*/
|
|
480
|
+
initialExecution?: {
|
|
481
|
+
execution_id?: string;
|
|
482
|
+
authorization?: string;
|
|
483
|
+
status?: string;
|
|
484
|
+
started_at?: number | string;
|
|
485
|
+
completed_at?: number | string;
|
|
486
|
+
results?: any[];
|
|
487
|
+
workflow?: {
|
|
488
|
+
id?: string;
|
|
489
|
+
name?: string;
|
|
490
|
+
};
|
|
491
|
+
[k: string]: any;
|
|
492
|
+
};
|
|
452
493
|
/** Called whenever a run finishes (success or failure). */
|
|
453
494
|
onRun?: (info: {
|
|
454
495
|
input: string;
|
|
@@ -456,6 +497,22 @@ interface AgentUIProps {
|
|
|
456
497
|
executionId?: string;
|
|
457
498
|
error?: string;
|
|
458
499
|
}) => void;
|
|
500
|
+
/** Called whenever the active top-level view changes (start / simple / detailed). */
|
|
501
|
+
onViewChange?: (view: 'start' | 'simple' | 'detailed') => void;
|
|
502
|
+
/**
|
|
503
|
+
* Called when the user saves a recurring schedule (cron expression) for the
|
|
504
|
+
* current prompt. When omitted, a toast is shown indicating scheduling is
|
|
505
|
+
* not wired up in this embed.
|
|
506
|
+
*/
|
|
507
|
+
onSchedule?: (info: {
|
|
508
|
+
cron: string;
|
|
509
|
+
input: string;
|
|
510
|
+
onStep?: (event: {
|
|
511
|
+
id: 'name' | 'workflow' | 'schedule';
|
|
512
|
+
state: 'active' | 'done' | 'error';
|
|
513
|
+
detail?: string;
|
|
514
|
+
}) => void;
|
|
515
|
+
}) => void | Promise<void>;
|
|
459
516
|
/**
|
|
460
517
|
* Optional Shuffle API key. When provided, all `/api/v1/*` calls made by
|
|
461
518
|
* this component (agent run, polling, app autoload, icon fallback) use it
|
|
@@ -471,9 +528,268 @@ interface AgentUIProps {
|
|
|
471
528
|
apiBaseUrl?: string;
|
|
472
529
|
/** Optional Shuffle Org ID — sent as the `Org-Id` header on every call. */
|
|
473
530
|
orgId?: string;
|
|
531
|
+
/** Optional className forwarded to the root container. */
|
|
532
|
+
className?: string;
|
|
533
|
+
/** Style overrides merged into the root container sx. */
|
|
534
|
+
sx?: SxProps<Theme>;
|
|
535
|
+
/** Style overrides for the inner content card (the column under the run-switcher). */
|
|
536
|
+
contentSx?: SxProps<Theme>;
|
|
474
537
|
}
|
|
475
538
|
declare const AgentUI: React$1.FC<AgentUIProps>;
|
|
476
539
|
|
|
540
|
+
type AgentRunDrawerTab = 'run' | 'permissions' | 'localLLM';
|
|
541
|
+
interface AgentRunDrawerProps {
|
|
542
|
+
open: boolean;
|
|
543
|
+
onClose: () => void;
|
|
544
|
+
/** Which tab to focus when the drawer opens. Default: 'run'. */
|
|
545
|
+
initialTab?: AgentRunDrawerTab;
|
|
546
|
+
/** Render content for the Permissions tab. Tab is hidden when omitted. */
|
|
547
|
+
permissionsSlot?: React.ReactNode;
|
|
548
|
+
/** Render content for the Local LLM tab. Tab is hidden when omitted. */
|
|
549
|
+
localLLMSlot?: React.ReactNode;
|
|
550
|
+
/**
|
|
551
|
+
* Custom badge node next to the Local LLM tab label (e.g. a green check
|
|
552
|
+
* when OpenAI auth is detected). Optional.
|
|
553
|
+
*/
|
|
554
|
+
localLLMTabBadge?: React.ReactNode;
|
|
555
|
+
/** Tooltip shown when the Permissions tab is rendered but disabled. */
|
|
556
|
+
permissionsDisabled?: boolean;
|
|
557
|
+
permissionsDisabledTooltip?: string;
|
|
558
|
+
/** Forwarded to the embedded AgentUI (apiKey, apiBaseUrl, orgId, etc.). */
|
|
559
|
+
agentUIProps?: Partial<AgentUIProps>;
|
|
560
|
+
/** Drawer width override (default: 480 px on >=sm, full-width on xs). */
|
|
561
|
+
width?: number;
|
|
562
|
+
/** Header title. Default: "Agent". */
|
|
563
|
+
title?: string;
|
|
564
|
+
/** Header subtitle. Default: "Run actions and manage permissions". */
|
|
565
|
+
subtitle?: string;
|
|
566
|
+
/** Optional className forwarded to the Drawer Paper. */
|
|
567
|
+
className?: string;
|
|
568
|
+
/** Style overrides merged into the Drawer Paper sx. Use to override colors, padding, etc. */
|
|
569
|
+
paperSx?: SxProps<Theme>;
|
|
570
|
+
/** Style overrides for the header bar (icon + title + close). */
|
|
571
|
+
headerSx?: SxProps<Theme>;
|
|
572
|
+
/** Style overrides for the tab strip. */
|
|
573
|
+
tabsSx?: SxProps<Theme>;
|
|
574
|
+
/** Style overrides for the body container that wraps the active tab content. */
|
|
575
|
+
bodySx?: SxProps<Theme>;
|
|
576
|
+
}
|
|
577
|
+
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;
|
|
578
|
+
|
|
579
|
+
declare const API_CONFIG: {
|
|
580
|
+
readonly baseUrl: string;
|
|
581
|
+
version: string;
|
|
582
|
+
readonly apiKey: string | null;
|
|
583
|
+
setApiKey(key: string | null): void;
|
|
584
|
+
};
|
|
585
|
+
declare const getApiUrl: (endpoint: string) => string;
|
|
586
|
+
declare const getAuthHeader: (overrideOrgId?: string | null) => Record<string, string>;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Agent Activity service — standalone fetcher for agent workflow executions.
|
|
590
|
+
*
|
|
591
|
+
* Self-contained: uses only the lib's API_CONFIG / getApiUrl / getAuthHeader
|
|
592
|
+
* so it works in npm consumers without any project-side hooks or contexts.
|
|
593
|
+
*/
|
|
594
|
+
|
|
595
|
+
interface AgentRunResult {
|
|
596
|
+
action?: {
|
|
597
|
+
app_name?: string;
|
|
598
|
+
label?: string;
|
|
599
|
+
id?: string;
|
|
600
|
+
};
|
|
601
|
+
result?: string;
|
|
602
|
+
status?: string;
|
|
603
|
+
}
|
|
604
|
+
interface AgentDecision {
|
|
605
|
+
title?: string;
|
|
606
|
+
description?: string;
|
|
607
|
+
status?: string;
|
|
608
|
+
timestamp?: string | number;
|
|
609
|
+
duration?: number;
|
|
610
|
+
action?: string;
|
|
611
|
+
result?: string;
|
|
612
|
+
tool?: string;
|
|
613
|
+
reason?: string;
|
|
614
|
+
category?: string;
|
|
615
|
+
confidence?: number;
|
|
616
|
+
runs?: string | number;
|
|
617
|
+
fields?: unknown;
|
|
618
|
+
approval_required?: boolean;
|
|
619
|
+
run_details?: unknown;
|
|
620
|
+
[key: string]: unknown;
|
|
621
|
+
}
|
|
622
|
+
interface AgentRun {
|
|
623
|
+
execution_id: string;
|
|
624
|
+
workflow_id: string;
|
|
625
|
+
status: string;
|
|
626
|
+
started_at: string;
|
|
627
|
+
completed_at?: string;
|
|
628
|
+
result?: string;
|
|
629
|
+
results?: AgentRunResult[];
|
|
630
|
+
decisions?: AgentDecision[];
|
|
631
|
+
execution_argument?: string;
|
|
632
|
+
execution_source?: string;
|
|
633
|
+
authorization?: string;
|
|
634
|
+
workflow?: {
|
|
635
|
+
name?: string;
|
|
636
|
+
description?: string;
|
|
637
|
+
actions?: Array<{
|
|
638
|
+
app_name?: string;
|
|
639
|
+
label?: string;
|
|
640
|
+
}>;
|
|
641
|
+
};
|
|
642
|
+
duration?: number;
|
|
643
|
+
}
|
|
644
|
+
interface AgentActivityResponse {
|
|
645
|
+
success: boolean;
|
|
646
|
+
runs: AgentRun[];
|
|
647
|
+
cursor: string;
|
|
648
|
+
}
|
|
649
|
+
interface AgentActivityParams {
|
|
650
|
+
cursor?: string;
|
|
651
|
+
limit?: number;
|
|
652
|
+
status?: string;
|
|
653
|
+
startTime?: string;
|
|
654
|
+
endTime?: string;
|
|
655
|
+
suborgRuns?: boolean;
|
|
656
|
+
/** Override the lib's shared apiKey for this call. */
|
|
657
|
+
apiKey?: string;
|
|
658
|
+
/** Override the lib's shared baseUrl for this call. */
|
|
659
|
+
apiBaseUrl?: string;
|
|
660
|
+
/** Optional Shuffle Org ID — sent as the `Org-Id` header. */
|
|
661
|
+
orgId?: string;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Search agent workflow executions (workflow_id = "AGENT").
|
|
665
|
+
*/
|
|
666
|
+
declare const searchAgentActivity: (params?: AgentActivityParams) => Promise<AgentActivityResponse>;
|
|
667
|
+
|
|
668
|
+
interface AgentActivityListProps {
|
|
669
|
+
/** Optional Shuffle API key. Falls back to the shared API_CONFIG. */
|
|
670
|
+
apiKey?: string;
|
|
671
|
+
/** Optional Shuffle backend base URL. Falls back to the shared API_CONFIG. */
|
|
672
|
+
apiBaseUrl?: string;
|
|
673
|
+
/** Optional Shuffle Org ID — sent as the `Org-Id` header. */
|
|
674
|
+
orgId?: string;
|
|
675
|
+
/** Called when a run row is clicked. */
|
|
676
|
+
onRunClick?: (run: AgentRun) => void;
|
|
677
|
+
/** Show the search box. Default: true. */
|
|
678
|
+
showSearchBar?: boolean;
|
|
679
|
+
/** Show the status filter chips. Default: true. */
|
|
680
|
+
showStatusChips?: boolean;
|
|
681
|
+
/** Page size. Default: 50. */
|
|
682
|
+
limit?: number;
|
|
683
|
+
/** Empty-state heading. */
|
|
684
|
+
emptyTitle?: string;
|
|
685
|
+
/** Empty-state subtitle. */
|
|
686
|
+
emptySubtitle?: string;
|
|
687
|
+
/** Optional className forwarded to the root container. */
|
|
688
|
+
className?: string;
|
|
689
|
+
/** Style overrides merged into the root container sx. */
|
|
690
|
+
sx?: SxProps<Theme>;
|
|
691
|
+
/** Style overrides for the filter/search toolbar. */
|
|
692
|
+
toolbarSx?: SxProps<Theme>;
|
|
693
|
+
/** Style overrides for each individual run row. */
|
|
694
|
+
rowSx?: SxProps<Theme>;
|
|
695
|
+
}
|
|
696
|
+
declare const AgentActivityList: ({ apiKey, apiBaseUrl, orgId, onRunClick, showSearchBar, showStatusChips, limit, emptyTitle, emptySubtitle, className, sx, toolbarSx, rowSx, }: AgentActivityListProps) => react_jsx_runtime.JSX.Element;
|
|
697
|
+
|
|
698
|
+
interface AgentExecutionDrawerProps {
|
|
699
|
+
open: boolean;
|
|
700
|
+
onClose: () => void;
|
|
701
|
+
/** The run to display. When null and `open=true`, drawer renders empty. */
|
|
702
|
+
run: AgentRun | null;
|
|
703
|
+
/** Drawer width. Default: 720 px on >=sm, full-width on xs. */
|
|
704
|
+
width?: number;
|
|
705
|
+
/** Optional Shuffle API key, forwarded to the embedded AgentUI. */
|
|
706
|
+
apiKey?: string;
|
|
707
|
+
/** Optional Shuffle backend base URL, forwarded to the embedded AgentUI. */
|
|
708
|
+
apiBaseUrl?: string;
|
|
709
|
+
/** Optional Shuffle Org ID, forwarded to the embedded AgentUI. */
|
|
710
|
+
orgId?: string;
|
|
711
|
+
/** Optional className forwarded to the Drawer Paper. */
|
|
712
|
+
className?: string;
|
|
713
|
+
/** Style overrides merged into the Drawer Paper sx. */
|
|
714
|
+
paperSx?: SxProps<Theme>;
|
|
715
|
+
/** Style overrides for the header bar. */
|
|
716
|
+
headerSx?: SxProps<Theme>;
|
|
717
|
+
/** Style overrides for the body container that wraps the embedded AgentUI. */
|
|
718
|
+
bodySx?: SxProps<Theme>;
|
|
719
|
+
/** Optional content rendered at the top of the body, before the embedded
|
|
720
|
+
* AgentUI. Use this to inject a shared "Needs attention" / failure
|
|
721
|
+
* diagnosis banner so the drawer mirrors the timeline status pill. */
|
|
722
|
+
topBanner?: React.ReactNode;
|
|
723
|
+
/** Handler for scheduling the loaded agent prompt from the execution view. */
|
|
724
|
+
onSchedule?: AgentUIProps['onSchedule'];
|
|
725
|
+
}
|
|
726
|
+
declare const AgentExecutionDrawer: ({ open, onClose, run, width, apiKey, apiBaseUrl, orgId, className, paperSx, headerSx, bodySx, topBanner, onSchedule, }: AgentExecutionDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Shared diagnosis utilities for an agent execution result.
|
|
730
|
+
*
|
|
731
|
+
* Lives in the Shuffle-MCPs lib so every surface that displays an agent run
|
|
732
|
+
* (AgentUI Simple/Detailed view, AgentExecutionDrawer, the incident-side
|
|
733
|
+
* AgentRunResultViewer, the activity feed status pill, ...) uses the EXACT
|
|
734
|
+
* same logic to decide whether the run "needs review" and what to tell the
|
|
735
|
+
* user about it.
|
|
736
|
+
*
|
|
737
|
+
* Pure logic — no React, no MUI, no project-side imports.
|
|
738
|
+
*/
|
|
739
|
+
/** Minimal run shape the diagnoser needs. Compatible with AgentRun and
|
|
740
|
+
* AgentUI's internal ExecutionData. */
|
|
741
|
+
interface DiagnosableRun {
|
|
742
|
+
status?: string;
|
|
743
|
+
results?: Array<{
|
|
744
|
+
result?: string;
|
|
745
|
+
} | any> | null;
|
|
746
|
+
}
|
|
747
|
+
/** Try to parse the result JSON from results[0].result, unwrapping AGENT-type executions. */
|
|
748
|
+
declare const parseRunResult: (run: DiagnosableRun) => {
|
|
749
|
+
raw: string | null;
|
|
750
|
+
parsed: any | null;
|
|
751
|
+
};
|
|
752
|
+
/** Extract failure info from a failed/aborted run. */
|
|
753
|
+
declare const getFailureInfo: (run: DiagnosableRun) => {
|
|
754
|
+
reason: string;
|
|
755
|
+
} | null;
|
|
756
|
+
/** Detect if the output content hints at an error/failure even if the run
|
|
757
|
+
* status is "finished". Only returns true when `diagnoseOutputWarning`
|
|
758
|
+
* would produce a concrete, actionable diagnosis — never on vague keyword
|
|
759
|
+
* matches alone. */
|
|
760
|
+
declare const hasOutputWarning: (run: DiagnosableRun) => boolean;
|
|
761
|
+
type DiagnosisEvidence = {
|
|
762
|
+
/** Dotted JSON path inside the parsed run result. */
|
|
763
|
+
path: string;
|
|
764
|
+
/** Trimmed snippet of the value at that path. */
|
|
765
|
+
value: string;
|
|
766
|
+
};
|
|
767
|
+
type OutputDiagnosis = {
|
|
768
|
+
kind: 'auth' | 'permission' | 'not_found' | 'rate_limit' | 'network' | 'validation' | 'generic';
|
|
769
|
+
status?: number;
|
|
770
|
+
title: string;
|
|
771
|
+
explanation: string;
|
|
772
|
+
remediation: string;
|
|
773
|
+
snippet?: string;
|
|
774
|
+
evidence: DiagnosisEvidence[];
|
|
775
|
+
};
|
|
776
|
+
declare const diagnoseOutputWarning: (run: DiagnosableRun) => OutputDiagnosis | null;
|
|
777
|
+
|
|
778
|
+
interface Props {
|
|
779
|
+
run: DiagnosableRun | null | undefined;
|
|
780
|
+
/** Outer padding wrapper. Defaults to `{ px: 2.5, pb: 0.5 }`. */
|
|
781
|
+
sx?: Record<string, unknown>;
|
|
782
|
+
/** When provided, the banner becomes clickable and asks the host to jump
|
|
783
|
+
* to the underlying decision (e.g. switch to the detailed timeline,
|
|
784
|
+
* expand that row, scroll to it). */
|
|
785
|
+
onJumpToEvidence?: (decisionIndex: number) => void;
|
|
786
|
+
/** Stable id used to persist dismissals per-execution. Falls back to
|
|
787
|
+
* `run.execution_id` if present. When neither is available, dismiss
|
|
788
|
+
* still works for the current mount but is not persisted. */
|
|
789
|
+
executionId?: string;
|
|
790
|
+
}
|
|
791
|
+
declare const AgentRunDiagnosisBanner: ({ run, sx, onJumpToEvidence, executionId }: Props) => react_jsx_runtime.JSX.Element;
|
|
792
|
+
|
|
477
793
|
/**
|
|
478
794
|
* useAppLookup — Resolve an app's display name, image, categories,
|
|
479
795
|
* canonical Algolia objectID and matching auth entries from just
|
|
@@ -510,6 +826,47 @@ interface AppLookupResult {
|
|
|
510
826
|
}
|
|
511
827
|
declare function useAppLookup(appName: string | null): AppLookupResult;
|
|
512
828
|
|
|
829
|
+
/**
|
|
830
|
+
* resolveApp — General-purpose app resolver.
|
|
831
|
+
*
|
|
832
|
+
* Given an app id OR name, look it up across all three known sources and
|
|
833
|
+
* return a unified `{ id, name, image }` triple. Used anywhere we need to
|
|
834
|
+
* render an app chip/icon and only have a free-form identifier (decision
|
|
835
|
+
* `tool`, auth-request `appName`, `app_authentication` payload, etc.).
|
|
836
|
+
*
|
|
837
|
+
* Resolution order (each pass merges in any newly-found fields, so we keep
|
|
838
|
+
* going until id/name/image are all known or all sources are exhausted):
|
|
839
|
+
* 1. /api/v1/apps/authentication — covers user-installed/active apps,
|
|
840
|
+
* including private ones that may not be in the public catalog.
|
|
841
|
+
* 2. /api/v1/apps — covers everything visible to the org (activated
|
|
842
|
+
* and private uploads).
|
|
843
|
+
* 3. Algolia `appsearch` — canonical objectID + public catalog metadata.
|
|
844
|
+
*
|
|
845
|
+
* Results are cached in-memory by normalized key so repeat lookups for the
|
|
846
|
+
* same name/id are free.
|
|
847
|
+
*/
|
|
848
|
+
interface ResolvedApp {
|
|
849
|
+
/** Canonical id — Algolia objectID when known, otherwise Shuffle app id. */
|
|
850
|
+
id: string;
|
|
851
|
+
/** Display name (may be raw slug if no source had a friendly name). */
|
|
852
|
+
name: string;
|
|
853
|
+
/** Best available large image URL. Empty string if not found. */
|
|
854
|
+
image: string;
|
|
855
|
+
/** Categories from whichever source provided them. */
|
|
856
|
+
categories?: string[];
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Resolve an app from id-or-name across auth + apps + Algolia.
|
|
860
|
+
* Returns `null` only if all three sources came back empty.
|
|
861
|
+
*/
|
|
862
|
+
declare function resolveApp(idOrName: string): Promise<ResolvedApp | null>;
|
|
863
|
+
/** Resolve many at once — convenience wrapper. */
|
|
864
|
+
declare function resolveApps(idsOrNames: string[]): Promise<Record<string, ResolvedApp>>;
|
|
865
|
+
/** Seed the cache (e.g. from chosenApps that already carry an icon). */
|
|
866
|
+
declare function seedResolvedApp(idOrName: string, app: Partial<ResolvedApp>): void;
|
|
867
|
+
/** Clear the resolver cache (e.g. on org change). */
|
|
868
|
+
declare function invalidateResolvedApps(): void;
|
|
869
|
+
|
|
513
870
|
interface IntegrationStatusProps {
|
|
514
871
|
collapsed: boolean;
|
|
515
872
|
/** When provided, only show integrations whose name is in this list */
|
|
@@ -586,15 +943,6 @@ declare const AppDetailProvider: ({ children }: {
|
|
|
586
943
|
}) => react_jsx_runtime.JSX.Element;
|
|
587
944
|
declare const useAppDetail: () => AppDetailContextType;
|
|
588
945
|
|
|
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
946
|
/**
|
|
599
947
|
* Tiny toast facade — library version. Mirrors the sonner-style surface
|
|
600
948
|
* (`toast(...)`, `toast.success`, `toast.error`, `toast.info`, `toast.warning`)
|
|
@@ -621,4 +969,4 @@ type ToastApi = ((arg: ToastArg, opts?: ToastOptions) => void) & {
|
|
|
621
969
|
};
|
|
622
970
|
declare const toast: ToastApi;
|
|
623
971
|
|
|
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 };
|
|
972
|
+
export { API_CONFIG, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, type AgentRun, AgentRunDiagnosisBanner, 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, type DiagnosableRun, type DiagnosisEvidence, IntegrationStatus, type OutputDiagnosis, type ResolvedApp, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShufflePipelinesBanner, SingulActionsPreview, TryMcpSection, type TryMcpSectionProps, ShuffleMCP as default, diagnoseOutputWarning, getApiUrl, getAuthHeader, getFailureInfo, hasOutputWarning, invalidateResolvedApps, parseRunResult, refreshAllIntegrationStatus, resolveApp, resolveApps, searchAgentActivity, seedResolvedApp, setToastImpl, toast, useAppAuth, useAppDetail, useAppLookup };
|