@shuffleio/shuffle-mcps 0.0.15 → 0.0.17
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/{appsCache-33KARY6K.mjs → appsCache-CFCVTF7D.mjs} +1 -1
- package/dist/chunk-R3YLER6P.mjs +325 -0
- package/dist/index.d.mts +202 -43
- package/dist/index.d.ts +202 -43
- package/dist/index.js +2174 -1336
- package/dist/index.mjs +1474 -829
- package/package.json +1 -1
- package/dist/chunk-FOMFBSUO.mjs +0 -137
package/dist/index.d.mts
CHANGED
|
@@ -2,11 +2,78 @@ import React$1, { ReactNode } from 'react';
|
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { SxProps, Theme } from '@mui/material';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* ShuffleMcpThemeProvider
|
|
7
|
+
*
|
|
8
|
+
* Mirror of Shuffle-Core's theme provider, scoped for the Shuffle-MCPs lib.
|
|
9
|
+
* Two jobs:
|
|
10
|
+
*
|
|
11
|
+
* 1. Pin MUI defaults (`size="small"`) so individual call sites never need to
|
|
12
|
+
* thread sizing through.
|
|
13
|
+
*
|
|
14
|
+
* 2. Bridge the host app's light/dark scheme into MUI:
|
|
15
|
+
* - `mode="auto"` (default) — track the `.dark` class on `<html>` and flip
|
|
16
|
+
* MUI `palette.mode` accordingly. Tokens (`hsl(var(--…))`) flip with the
|
|
17
|
+
* same class so nothing else needs to know about the theme.
|
|
18
|
+
* - `mode="light" | "dark"` — pin the wrapped subtree to that scheme. We
|
|
19
|
+
* render a `<div className="dark">` (or remove it) so Tailwind dark
|
|
20
|
+
* variants and CSS-variable overrides scope to this subtree only —
|
|
21
|
+
* useful when embedding MCPs inside a host that doesn't manage `.dark`
|
|
22
|
+
* on `<html>`.
|
|
23
|
+
*
|
|
24
|
+
* Wrap your MCP usage at any level:
|
|
25
|
+
*
|
|
26
|
+
* <ShuffleMcpThemeProvider mode="dark">
|
|
27
|
+
* <ShuffleMCP ... />
|
|
28
|
+
* </ShuffleMcpThemeProvider>
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
type ShuffleMcpColorMode = "light" | "dark" | "auto";
|
|
32
|
+
interface ShuffleMcpThemeProviderProps {
|
|
33
|
+
children: React$1.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Color mode for the wrapped subtree.
|
|
36
|
+
* - `"auto"` (default) — follow the host page's `.dark` class on `<html>`.
|
|
37
|
+
* - `"light"` / `"dark"` — pin the subtree to that scheme via a wrapping div.
|
|
38
|
+
*/
|
|
39
|
+
mode?: ShuffleMcpColorMode;
|
|
40
|
+
}
|
|
41
|
+
declare const ShuffleMcpThemeProvider: React$1.FC<ShuffleMcpThemeProviderProps>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Standard host-injected props passed to every top-level Shuffle-MCPs
|
|
45
|
+
* component the consumer mounts directly. Mirrors `ShuffleCoreHostProps` so a
|
|
46
|
+
* single context object can be threaded through any Shuffle surface.
|
|
47
|
+
*
|
|
48
|
+
* All fields are optional so components remain usable standalone; concrete
|
|
49
|
+
* components decide which ones they actually read.
|
|
50
|
+
*
|
|
51
|
+
* Conventional usage inside a component:
|
|
52
|
+
* - Skip auth-dependent fetches while `isLoaded === false`.
|
|
53
|
+
* - Skip authenticated-only fetches when `isLoggedIn === false`.
|
|
54
|
+
* - Prefer `globalUrl` over the bundled `API_CONFIG.baseUrl` when set.
|
|
55
|
+
* - Read org / role / support flags from `userdata` when available
|
|
56
|
+
* (e.g. `userdata?.active_org?.id`).
|
|
57
|
+
*/
|
|
58
|
+
interface ShuffleHostProps {
|
|
59
|
+
/** True when rendered during SSR (skip window/document access). */
|
|
60
|
+
serverside?: boolean;
|
|
61
|
+
/** True once the host has finished hydrating auth + org info (/getinfo done). */
|
|
62
|
+
isLoaded?: boolean;
|
|
63
|
+
/** True when the active user session is authenticated. Only meaningful once `isLoaded` is true. */
|
|
64
|
+
isLoggedIn?: boolean;
|
|
65
|
+
/** Backend API base URL. Overrides `API_CONFIG.baseUrl` defaults when provided. */
|
|
66
|
+
globalUrl?: string;
|
|
67
|
+
/** Userdata returned by `GET /api/v1/getinfo` (active_org, support, etc.). */
|
|
68
|
+
userdata?: any;
|
|
69
|
+
}
|
|
70
|
+
|
|
5
71
|
/**
|
|
6
72
|
* Local Singul Library - Helpers
|
|
7
73
|
* This is a local copy for development. Changes here should be merged back to:
|
|
8
74
|
* https://github.com/Shuffle/singul.js
|
|
9
75
|
*/
|
|
76
|
+
|
|
10
77
|
interface AlgoliaSearchApp {
|
|
11
78
|
name: string;
|
|
12
79
|
description: string;
|
|
@@ -84,7 +151,7 @@ interface AppAuthentication {
|
|
|
84
151
|
error?: string;
|
|
85
152
|
};
|
|
86
153
|
}
|
|
87
|
-
interface ShuffleMCPProps {
|
|
154
|
+
interface ShuffleMCPProps extends ShuffleHostProps {
|
|
88
155
|
/**
|
|
89
156
|
* Shuffle API key. Used as the `Authorization: Bearer` header on every
|
|
90
157
|
* request the component makes (`/api/v1/apps/authentication`,
|
|
@@ -179,12 +246,6 @@ interface ShuffleMCPHandle {
|
|
|
179
246
|
}
|
|
180
247
|
declare const ShuffleMCP: React$1.ForwardRefExoticComponent<ShuffleMCPProps & React$1.RefAttributes<ShuffleMCPHandle>>;
|
|
181
248
|
|
|
182
|
-
/**
|
|
183
|
-
* AppDetailDrawer — Shows app detail content (header, auth, MCP chat, API viewer)
|
|
184
|
-
* inside a drawer. Used from alluvial diagrams and the app search drawer.
|
|
185
|
-
*
|
|
186
|
-
* Accepts either an app name (fetches data) or pre-loaded app info.
|
|
187
|
-
*/
|
|
188
249
|
/**
|
|
189
250
|
* Singul standard actions catalog, keyed by lowercase category fragment.
|
|
190
251
|
* Mirrors the canonical action names exposed by https://singul.io —
|
|
@@ -192,7 +253,7 @@ declare const ShuffleMCP: React$1.ForwardRefExoticComponent<ShuffleMCPProps & Re
|
|
|
192
253
|
* Fields shown here are starter parameters; the full schema lives on
|
|
193
254
|
* the Singul side and is editable in the curl preview below.
|
|
194
255
|
*/
|
|
195
|
-
interface AppDetailDrawerProps {
|
|
256
|
+
interface AppDetailDrawerProps extends ShuffleHostProps {
|
|
196
257
|
open: boolean;
|
|
197
258
|
onClose: () => void;
|
|
198
259
|
/** App name to load */
|
|
@@ -220,17 +281,13 @@ interface AppDetailDrawerProps {
|
|
|
220
281
|
}
|
|
221
282
|
declare function AppDetailDrawer({ open, onClose, appName, appId, anchor, width, onRefresh, onAddToCanvas, isAuthenticated, activeOrgId, }: AppDetailDrawerProps): react_jsx_runtime.JSX.Element;
|
|
222
283
|
|
|
223
|
-
/**
|
|
224
|
-
* AppSearchDrawer — Reusable drawer for searching apps.
|
|
225
|
-
* Selecting an app opens the AppDetailDrawer for full configuration.
|
|
226
|
-
*/
|
|
227
284
|
interface ConnectionPathApp {
|
|
228
285
|
name: string;
|
|
229
286
|
icon: string;
|
|
230
287
|
hasValidAuth?: boolean;
|
|
231
288
|
isActiveOnly?: boolean;
|
|
232
289
|
}
|
|
233
|
-
interface AppSearchDrawerProps {
|
|
290
|
+
interface AppSearchDrawerProps extends ShuffleHostProps {
|
|
234
291
|
open: boolean;
|
|
235
292
|
onClose: () => void;
|
|
236
293
|
initialQuery?: string;
|
|
@@ -297,17 +354,38 @@ interface AppSearchDrawerProps {
|
|
|
297
354
|
}
|
|
298
355
|
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;
|
|
299
356
|
|
|
357
|
+
interface AiAgentPromptsEditorProps {
|
|
358
|
+
/** Ordered list of prompts. */
|
|
359
|
+
prompts: string[];
|
|
360
|
+
/** Per-prompt allow-list of app IDs/names (parallel array to `prompts`). */
|
|
361
|
+
apps: string[][];
|
|
362
|
+
/** Read-only mode: render prompts as plain text, no edit/add/remove. */
|
|
363
|
+
readOnly?: boolean;
|
|
364
|
+
/** Edit handlers — required when `readOnly` is false. */
|
|
365
|
+
onChangePrompt?: (index: number, value: string) => void;
|
|
366
|
+
onRemovePrompt?: (index: number) => void;
|
|
367
|
+
onAddPrompt?: () => void;
|
|
368
|
+
onRemoveApp?: (promptIndex: number, appKey: string) => void;
|
|
369
|
+
onAddAppRequested?: (promptIndex: number) => void;
|
|
370
|
+
/** Resolves an app key to its display metadata. */
|
|
371
|
+
resolveAppMeta: (key: string) => {
|
|
372
|
+
name: string;
|
|
373
|
+
image: string;
|
|
374
|
+
};
|
|
375
|
+
/** Optional slot to render a richer prompt editor (e.g. PopupTextEditor).
|
|
376
|
+
* If omitted, a multiline MUI TextField is rendered in edit mode. */
|
|
377
|
+
renderPromptInput?: (props: {
|
|
378
|
+
index: number;
|
|
379
|
+
value: string;
|
|
380
|
+
onChange: (next: string) => void;
|
|
381
|
+
placeholder: string;
|
|
382
|
+
}) => React$1.ReactNode;
|
|
383
|
+
}
|
|
384
|
+
declare const AiAgentPromptsEditor: React$1.FC<AiAgentPromptsEditorProps>;
|
|
385
|
+
|
|
300
386
|
declare function ShufflePipelinesBanner(): react_jsx_runtime.JSX.Element;
|
|
301
387
|
|
|
302
|
-
|
|
303
|
-
* AppTitleHeader — Standalone title/header card for an app.
|
|
304
|
-
*
|
|
305
|
-
* Shows avatar (with valid-auth border), name, Verified/Pending chip,
|
|
306
|
-
* categories, and either an "Activate/Deactivate" or "+ Add" action.
|
|
307
|
-
*
|
|
308
|
-
* Pure presentational component — pass in already-resolved props.
|
|
309
|
-
*/
|
|
310
|
-
interface AppTitleHeaderProps {
|
|
388
|
+
interface AppTitleHeaderProps extends ShuffleHostProps {
|
|
311
389
|
/** Display name of the app (will be capitalized via CSS). */
|
|
312
390
|
name: string;
|
|
313
391
|
/** Image URL for the app icon. */
|
|
@@ -331,7 +409,7 @@ interface AppTitleHeaderProps {
|
|
|
331
409
|
}
|
|
332
410
|
declare function AppTitleHeader({ name, image, hasValidAuth, hasAnyAuth, isAuthenticated, categories, isActivated, activateLoading, onActivateToggle, onAdd, }: AppTitleHeaderProps): react_jsx_runtime.JSX.Element;
|
|
333
411
|
|
|
334
|
-
interface AppAuthSectionProps {
|
|
412
|
+
interface AppAuthSectionProps extends ShuffleHostProps {
|
|
335
413
|
/** Display name (used in copy when no auth exists). */
|
|
336
414
|
displayName: string;
|
|
337
415
|
/** Algolia app object — required to render the AuthCard. */
|
|
@@ -356,12 +434,7 @@ interface AppAuthSectionProps {
|
|
|
356
434
|
}
|
|
357
435
|
declare function AppAuthSection({ displayName, algoliaApp, resolvedAlgoliaId, authState, expanded, onToggle, authCount, isAuthenticated, matchingEntries, onAuthChange, onTestConnection, onSaveAuth, onRefreshAuth, }: AppAuthSectionProps): react_jsx_runtime.JSX.Element;
|
|
358
436
|
|
|
359
|
-
|
|
360
|
-
* TryMcpSection — Standalone "Try MCP" block.
|
|
361
|
-
*
|
|
362
|
-
* Wraps the heading + AppMcpChat. Pass in the resolved app props.
|
|
363
|
-
*/
|
|
364
|
-
interface TryMcpSectionProps {
|
|
437
|
+
interface TryMcpSectionProps extends ShuffleHostProps {
|
|
365
438
|
appName: string;
|
|
366
439
|
/** Image URL used as the chat avatar. */
|
|
367
440
|
appIcon?: string;
|
|
@@ -372,16 +445,18 @@ interface TryMcpSectionProps {
|
|
|
372
445
|
}
|
|
373
446
|
declare function TryMcpSection({ appName, appIcon, appId, categories }: TryMcpSectionProps): react_jsx_runtime.JSX.Element;
|
|
374
447
|
|
|
375
|
-
|
|
448
|
+
interface SingulActionsPreviewProps extends ShuffleHostProps {
|
|
376
449
|
appName: string;
|
|
377
450
|
appIcon?: string;
|
|
451
|
+
appId?: string | null;
|
|
378
452
|
categories?: string[];
|
|
379
453
|
activeOrgId?: string | null;
|
|
380
454
|
/** Optional click handler invoked when the user presses the
|
|
381
455
|
* "Authenticate {App}" button surfaced after an
|
|
382
456
|
* `action: "app_authentication"` response. */
|
|
383
457
|
onAuthenticate?: (appName: string) => void;
|
|
384
|
-
}
|
|
458
|
+
}
|
|
459
|
+
declare const SingulActionsPreview: ({ appName, appIcon, categories, activeOrgId, onAuthenticate, }: SingulActionsPreviewProps) => react_jsx_runtime.JSX.Element;
|
|
385
460
|
|
|
386
461
|
/**
|
|
387
462
|
* AgentUI — Standalone "start + debug agents" surface.
|
|
@@ -442,13 +517,13 @@ interface AgentUIProps {
|
|
|
442
517
|
maxWidth?: number;
|
|
443
518
|
/** Compact mode: hides the hero icon, shrinks padding. */
|
|
444
519
|
compact?: boolean;
|
|
445
|
-
/** Hide the "Select Apps
|
|
520
|
+
/** Hide the "Select Apps" chip row entirely. */
|
|
446
521
|
hideAppPicker?: boolean;
|
|
447
522
|
/** Hide the paperclip image-attachment button. */
|
|
448
523
|
hideAttach?: boolean;
|
|
449
524
|
/** Disable the "Start" tab in the run switcher (e.g. when viewing a fixed execution). */
|
|
450
525
|
disableStartTab?: boolean;
|
|
451
|
-
/** Label on the "Select Apps
|
|
526
|
+
/** Label on the "Select Apps" chip. */
|
|
452
527
|
appPickerLabel?: string;
|
|
453
528
|
/** Title on the AppSearchDrawer. */
|
|
454
529
|
appPickerTitle?: string;
|
|
@@ -561,7 +636,7 @@ interface AgentUIProps {
|
|
|
561
636
|
declare const AgentUI: React$1.FC<AgentUIProps>;
|
|
562
637
|
|
|
563
638
|
type AgentRunDrawerTab = 'run' | 'permissions' | 'localLLM';
|
|
564
|
-
interface AgentRunDrawerProps {
|
|
639
|
+
interface AgentRunDrawerProps extends ShuffleHostProps {
|
|
565
640
|
open: boolean;
|
|
566
641
|
onClose: () => void;
|
|
567
642
|
/** Which tab to focus when the drawer opens. Default: 'run'. */
|
|
@@ -597,7 +672,7 @@ interface AgentRunDrawerProps {
|
|
|
597
672
|
/** Style overrides for the body container that wraps the active tab content. */
|
|
598
673
|
bodySx?: SxProps<Theme>;
|
|
599
674
|
}
|
|
600
|
-
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;
|
|
675
|
+
declare const AgentRunDrawer: ({ open, onClose, initialTab, permissionsSlot, localLLMSlot, localLLMTabBadge, permissionsDisabled, permissionsDisabledTooltip, agentUIProps, width, title, subtitle, className, paperSx, headerSx, tabsSx, bodySx, globalUrl, }: AgentRunDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
601
676
|
|
|
602
677
|
/** Check if running on a known Shuffle Cloud domain */
|
|
603
678
|
declare const isCloudDomain: () => boolean;
|
|
@@ -613,6 +688,26 @@ declare const isCloud: () => boolean;
|
|
|
613
688
|
* True when running self-hosted (onprem) — i.e. NOT in Lovable preview AND NOT on a known cloud domain.
|
|
614
689
|
*/
|
|
615
690
|
declare const isOnprem: () => boolean;
|
|
691
|
+
/**
|
|
692
|
+
* Set the dynamic region URL from getinfo response.
|
|
693
|
+
* Only applies if the URL is a shuffler.io subdomain and different from default.
|
|
694
|
+
*/
|
|
695
|
+
declare const setRegionUrl: (regionUrl: string | undefined | null, orgId: string | undefined | null) => void;
|
|
696
|
+
/**
|
|
697
|
+
* Called when org changes. Resets region URL to default until next getinfo.
|
|
698
|
+
*/
|
|
699
|
+
declare const resetRegionUrl: () => void;
|
|
700
|
+
/**
|
|
701
|
+
* Host override — call from a top-level component (or `useSyncHostBaseUrl`)
|
|
702
|
+
* with the `globalUrl` injected via `ShuffleHostProps`. When set, this beats
|
|
703
|
+
* region URL and the env-based default for ALL fetches that go through
|
|
704
|
+
* `getApiUrl()` / `API_CONFIG.baseUrl` / `shuffleFetch`.
|
|
705
|
+
*
|
|
706
|
+
* Pass `null` / `undefined` / empty string to clear the override.
|
|
707
|
+
*/
|
|
708
|
+
declare const setHostBaseUrl: (url: string | undefined | null) => void;
|
|
709
|
+
/** Get the currently active host override, if any. */
|
|
710
|
+
declare const getHostBaseUrl: () => string | null;
|
|
616
711
|
declare const API_CONFIG: {
|
|
617
712
|
readonly baseUrl: string;
|
|
618
713
|
version: string;
|
|
@@ -620,6 +715,11 @@ declare const API_CONFIG: {
|
|
|
620
715
|
setApiKey(key: string | null): void;
|
|
621
716
|
};
|
|
622
717
|
declare const getApiUrl: (endpoint: string) => string;
|
|
718
|
+
/**
|
|
719
|
+
* Central fetch wrapper that ALWAYS includes credentials and auth headers.
|
|
720
|
+
* Use this instead of raw fetch() for all Shuffle API calls.
|
|
721
|
+
*/
|
|
722
|
+
declare const shuffleFetch: (url: string, init?: RequestInit) => Promise<Response>;
|
|
623
723
|
declare const getAuthHeader: (overrideOrgId?: string | null) => Record<string, string>;
|
|
624
724
|
|
|
625
725
|
/**
|
|
@@ -704,7 +804,7 @@ interface AgentActivityParams {
|
|
|
704
804
|
*/
|
|
705
805
|
declare const searchAgentActivity: (params?: AgentActivityParams) => Promise<AgentActivityResponse>;
|
|
706
806
|
|
|
707
|
-
interface AgentActivityListProps {
|
|
807
|
+
interface AgentActivityListProps extends ShuffleHostProps {
|
|
708
808
|
/** Optional Shuffle API key. Falls back to the shared API_CONFIG. */
|
|
709
809
|
apiKey?: string;
|
|
710
810
|
/** Optional Shuffle backend base URL. Falls back to the shared API_CONFIG. */
|
|
@@ -744,7 +844,7 @@ interface AgentActivityListProps {
|
|
|
744
844
|
}
|
|
745
845
|
declare const AgentActivityList: ({ apiKey, apiBaseUrl, orgId, onRunClick, onEditWorkflow, showSearchBar, showStatusChips, limit, emptyTitle, emptySubtitle, className, sx, toolbarSx, rowSx, }: AgentActivityListProps) => react_jsx_runtime.JSX.Element;
|
|
746
846
|
|
|
747
|
-
interface AgentExecutionDrawerProps {
|
|
847
|
+
interface AgentExecutionDrawerProps extends ShuffleHostProps {
|
|
748
848
|
open: boolean;
|
|
749
849
|
onClose: () => void;
|
|
750
850
|
/** The run to display. When null and `open=true`, drawer renders empty. */
|
|
@@ -774,6 +874,18 @@ interface AgentExecutionDrawerProps {
|
|
|
774
874
|
}
|
|
775
875
|
declare const AgentExecutionDrawer: ({ open, onClose, run, width, apiKey, apiBaseUrl, orgId, className, paperSx, headerSx, bodySx, topBanner, onSchedule, }: AgentExecutionDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
776
876
|
|
|
877
|
+
interface AgentsViewProps extends ShuffleHostProps {
|
|
878
|
+
/**
|
|
879
|
+
* Required scheduler implementation. Receives the cron + prompt + apps
|
|
880
|
+
* from AgentUI and is responsible for creating the underlying scheduled
|
|
881
|
+
* workflow on the host backend.
|
|
882
|
+
*/
|
|
883
|
+
onSchedule: NonNullable<AgentUIProps['onSchedule']>;
|
|
884
|
+
/** Override max content width of the inner stack. Defaults to 820. */
|
|
885
|
+
maxWidth?: number;
|
|
886
|
+
}
|
|
887
|
+
declare const AgentsView: ({ onSchedule, maxWidth, globalUrl, isLoaded, isLoggedIn, userdata, serverside }: AgentsViewProps) => react_jsx_runtime.JSX.Element;
|
|
888
|
+
|
|
777
889
|
/**
|
|
778
890
|
* Shared diagnosis utilities for an agent execution result.
|
|
779
891
|
*
|
|
@@ -825,7 +937,7 @@ type OutputDiagnosis = {
|
|
|
825
937
|
};
|
|
826
938
|
declare const diagnoseOutputWarning: (run: DiagnosableRun) => OutputDiagnosis | null;
|
|
827
939
|
|
|
828
|
-
interface Props {
|
|
940
|
+
interface Props extends ShuffleHostProps {
|
|
829
941
|
run: DiagnosableRun | null | undefined;
|
|
830
942
|
/** Outer padding wrapper. Defaults to `{ px: 2.5, pb: 0.5 }`. */
|
|
831
943
|
sx?: Record<string, unknown>;
|
|
@@ -917,7 +1029,7 @@ declare function seedResolvedApp(idOrName: string, app: Partial<ResolvedApp>): v
|
|
|
917
1029
|
/** Clear the resolver cache (e.g. on org change). */
|
|
918
1030
|
declare function invalidateResolvedApps(): void;
|
|
919
1031
|
|
|
920
|
-
interface IntegrationStatusProps {
|
|
1032
|
+
interface IntegrationStatusProps extends ShuffleHostProps {
|
|
921
1033
|
collapsed: boolean;
|
|
922
1034
|
/** When provided, only show integrations whose name is in this list */
|
|
923
1035
|
filterApps?: string[];
|
|
@@ -977,7 +1089,7 @@ interface ApiAuthEntry {
|
|
|
977
1089
|
last_valid?: number;
|
|
978
1090
|
};
|
|
979
1091
|
}
|
|
980
|
-
interface AppAuthConfigProps {
|
|
1092
|
+
interface AppAuthConfigProps extends ShuffleHostProps {
|
|
981
1093
|
apps: AlgoliaSearchApp[];
|
|
982
1094
|
authStates: Record<string, AppAuthState>;
|
|
983
1095
|
authenticatedApps?: ApiAuthEntry[];
|
|
@@ -987,7 +1099,7 @@ interface AppAuthConfigProps {
|
|
|
987
1099
|
onSelectAuth?: (appId: string, authId: string) => void;
|
|
988
1100
|
onRefreshAuth?: () => Promise<void> | void;
|
|
989
1101
|
}
|
|
990
|
-
interface AppAuthCardProps {
|
|
1102
|
+
interface AppAuthCardProps extends ShuffleHostProps {
|
|
991
1103
|
app: AlgoliaSearchApp;
|
|
992
1104
|
authState: AppAuthState;
|
|
993
1105
|
isExpanded: boolean;
|
|
@@ -1007,8 +1119,14 @@ interface AppAuthCardProps {
|
|
|
1007
1119
|
hideStatusChips?: boolean;
|
|
1008
1120
|
/** Hide the documentation (book icon) link. */
|
|
1009
1121
|
hideDocsLink?: boolean;
|
|
1122
|
+
/** Hide URL-like fields (name/id containing "url", "endpoint", or "host").
|
|
1123
|
+
* Use when the URL is supplied externally (e.g. via a provider preset). */
|
|
1124
|
+
hideUrlFields?: boolean;
|
|
1125
|
+
/** Render without the outer Card border so the component can be embedded
|
|
1126
|
+
* inside another bordered container without the nested "double border" look. */
|
|
1127
|
+
borderless?: boolean;
|
|
1010
1128
|
}
|
|
1011
|
-
declare const AppAuthCard: ({ app, authState, isExpanded, onToggle, onAuthChange, onTestConnection, onSaveAuth, apiAuthEntries, onSelectAuth, onRefreshAuth, disableUrlPrefill, hideHeader, hideStatusChips, hideDocsLink, }: AppAuthCardProps) => react_jsx_runtime.JSX.Element;
|
|
1129
|
+
declare const AppAuthCard: ({ app, authState, isExpanded, onToggle, onAuthChange, onTestConnection, onSaveAuth, apiAuthEntries, onSelectAuth, onRefreshAuth, disableUrlPrefill, hideHeader, hideStatusChips, hideDocsLink, hideUrlFields, borderless, }: AppAuthCardProps) => react_jsx_runtime.JSX.Element;
|
|
1012
1130
|
declare const AppAuthConfig: ({ apps, authStates, authenticatedApps, onAuthChange, onTestConnection, onSaveAuth, onSelectAuth, onRefreshAuth, }: AppAuthConfigProps) => react_jsx_runtime.JSX.Element;
|
|
1013
1131
|
|
|
1014
1132
|
declare function useAppAuth(): {
|
|
@@ -1034,6 +1152,27 @@ declare const useAppDetail: () => AppDetailContextType;
|
|
|
1034
1152
|
/** Safe variant: returns null if no provider is mounted. Useful for components used both inside and outside the dashboard. */
|
|
1035
1153
|
declare const useAppDetailOptional: () => AppDetailContextType;
|
|
1036
1154
|
|
|
1155
|
+
declare const useSyncHostBaseUrl: (globalUrl: string | undefined | null) => void;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Global fetch circuit breaker.
|
|
1159
|
+
*
|
|
1160
|
+
* Installs a one-time wrapper around `window.fetch` that protects the Shuffle
|
|
1161
|
+
* backend from infinite-loop spam. If the same endpoint (method + URL pathname,
|
|
1162
|
+
* scoped to a Shuffle backend origin) fails repeatedly inside a short window,
|
|
1163
|
+
* subsequent calls fail-fast with a synthetic 503 for a cooldown period.
|
|
1164
|
+
*
|
|
1165
|
+
* This is a safety net — components and hooks should still throttle / cache
|
|
1166
|
+
* their own requests. The breaker only kicks in when something has gone wrong
|
|
1167
|
+
* (a useEffect missing deps, a render loop, an unreachable backend).
|
|
1168
|
+
*
|
|
1169
|
+
* Both Shuffle-Core and Shuffle-MCPs install this — it is idempotent so the
|
|
1170
|
+
* first call wins and the second is a no-op.
|
|
1171
|
+
*/
|
|
1172
|
+
/** Register a backend origin as one we should guard. Idempotent. */
|
|
1173
|
+
declare const registerProtectedOrigin: (url: string | undefined | null) => void;
|
|
1174
|
+
declare const installFetchBreaker: () => void;
|
|
1175
|
+
|
|
1037
1176
|
/**
|
|
1038
1177
|
* Tiny toast facade — library version. Mirrors the sonner-style surface
|
|
1039
1178
|
* (`toast(...)`, `toast.success`, `toast.error`, `toast.info`, `toast.warning`)
|
|
@@ -1291,4 +1430,24 @@ declare const invalidateAppsCache: (opts?: FetchAppsOptions) => void;
|
|
|
1291
1430
|
*/
|
|
1292
1431
|
declare const fetchAppsViaApiConfig: () => Promise<any[]>;
|
|
1293
1432
|
|
|
1294
|
-
|
|
1433
|
+
/**
|
|
1434
|
+
* Compact, reusable usage bar showing `usage / limit`. Designed to stack
|
|
1435
|
+
* tightly so multiple bars can sit anywhere (sidebars, footers, panels).
|
|
1436
|
+
*
|
|
1437
|
+
* Visual: neutral by default. Color only kicks in when approaching/over limit.
|
|
1438
|
+
* < 65% → muted foreground
|
|
1439
|
+
* 65-99% → severity-medium
|
|
1440
|
+
* >=100% → destructive
|
|
1441
|
+
*/
|
|
1442
|
+
interface UsageBarProps {
|
|
1443
|
+
label: string;
|
|
1444
|
+
usage: number;
|
|
1445
|
+
limit: number;
|
|
1446
|
+
unit?: string;
|
|
1447
|
+
hint?: string;
|
|
1448
|
+
actionLabel?: string;
|
|
1449
|
+
actionHref?: string;
|
|
1450
|
+
}
|
|
1451
|
+
declare const UsageBar: React$1.FC<UsageBarProps>;
|
|
1452
|
+
|
|
1453
|
+
export { API_CONFIG, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, AgentIcon, type AgentRun, AgentRunDiagnosisBanner, AgentRunDrawer, type AgentRunDrawerProps, type AgentRunDrawerTab, type AgentRunResult, AgentUI, type AgentUIApp, type AgentUIProps, AgentsView, type AgentsViewProps, AiAgentPromptsEditor, type AiAgentPromptsEditorProps, type AlgoliaSearchApp, type ApiAuthEntry, AppAuthCard, type AppAuthCardProps, AppAuthConfig, AppAuthSection, type AppAuthSectionProps, type AppAuthState, type AppAuthentication, AppDetailDrawer, AppDetailProvider, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, type AuthStatus, CASES_PATTERNS, COMMUNICATION_PATTERNS_NAMES, type CategoryAutomation, type CategoryConfig, type CustomStyles, DATASTORE_CATEGORIES, type DatastoreDiagnostics, type DatastoreItem, type DatastoreResponse, type DiagnosableRun, type DiagnosisEvidence, EDR_PATTERNS, EMAIL_APP_PATTERNS, FORWARD_TICKETS_WORKFLOW_NAME, type FetchAppsOptions, INGEST_TICKETS_WORKFLOW_NAME, type IngestionCategory, IntegrationStatus, type OutputDiagnosis, type ResolvedApp, SIEM_PATTERNS, type ShuffleHostProps, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, type ShuffleMcpColorMode, ShuffleMcpThemeProvider, type ShuffleMcpThemeProviderProps, ShufflePipelinesBanner, SingulActionsPreview, THREAT_INTEL_PATTERNS, TryMcpSection, type TryMcpSectionProps, UsageBar, type UsageBarProps, VULN_SCANNER_PATTERNS, type ValidatedIngestionApp, ShuffleMCP as default, deleteDatastoreItem, deleteDatastoreItems, diagnoseOutputWarning, extractValidatedIngestionApps, extractWorkflowAppNames, fetchApps, fetchAppsViaApiConfig, findForwardTicketsWorkflow, findIngestTicketsWorkflow, getApiUrl, getAuthHeader, getDatastoreByCategory, getDatastoreItem, getDatastoreItemPublic, getFailureInfo, getHostBaseUrl, getIngestionCategory, hasOutputWarning, installFetchBreaker, invalidateAppsCache, invalidateResolvedApps, isCloud, isCloudDomain, isEmailApp, isIngestionApp, isOnprem, isThreatIntelApp, isVulnScannerApp, isWorkflowScheduleStopped, normalizeAppName, parseRunResult, refreshAllIntegrationStatus, registerProtectedOrigin, resetRegionUrl, resolveApp, resolveApps, searchAgentActivity, seedResolvedApp, setDatastoreItem, setDatastoreItems, setHostBaseUrl, setRegionUrl, setRuntimeOrgId, setToastImpl, shuffleFetch, toast, useAppAuth, useAppDetail, useAppDetailOptional, useAppLookup, useSyncHostBaseUrl };
|