@shuffleio/shuffle-mcps 0.0.33 → 0.0.35
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-KWDP7F2K.mjs → appsCache-PP55YC62.mjs} +1 -1
- package/dist/{chunk-B4JFC2JU.mjs → chunk-5B3Q2RHS.mjs} +54 -30
- package/dist/index.d.mts +300 -90
- package/dist/index.d.ts +300 -90
- package/dist/index.js +7096 -2470
- package/dist/index.mjs +7303 -2637
- package/dist/{shuffle-mcp-TWJGPBOQ.css → shuffle-mcp-3U5AFQDK.css} +32 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ interface CustomStyles {
|
|
|
131
131
|
checkbox?: React.CSSProperties;
|
|
132
132
|
checkboxChecked?: React.CSSProperties;
|
|
133
133
|
}
|
|
134
|
-
interface AppAuthentication {
|
|
134
|
+
interface AppAuthentication$1 {
|
|
135
135
|
app: {
|
|
136
136
|
id: string;
|
|
137
137
|
name: string;
|
|
@@ -212,7 +212,7 @@ interface ShuffleMCPProps extends ShuffleHostProps {
|
|
|
212
212
|
/** Base URL for Singul API calls (default: https://singul.io) */
|
|
213
213
|
singulBaseUrl?: string;
|
|
214
214
|
/** Manually provided authenticated apps (used when apiKey is not provided) */
|
|
215
|
-
authenticatedApps?: AppAuthentication[];
|
|
215
|
+
authenticatedApps?: AppAuthentication$1[];
|
|
216
216
|
/** Hide the auth status chips (Configured/Not configured, Tested/Not tested) */
|
|
217
217
|
hideAuthStatus?: boolean;
|
|
218
218
|
/** Apps to pin at the top of the results (prepended, deduped by name). */
|
|
@@ -229,11 +229,19 @@ interface ShuffleMCPProps extends ShuffleHostProps {
|
|
|
229
229
|
configured: boolean;
|
|
230
230
|
validated: boolean;
|
|
231
231
|
}) => React.ReactNode;
|
|
232
|
-
renderEmptyState?: () => React.ReactNode;
|
|
232
|
+
renderEmptyState?: (query: string) => React.ReactNode;
|
|
233
233
|
renderLoadingState?: () => React.ReactNode;
|
|
234
|
+
/** Custom footer shown when the user has scrolled through all results */
|
|
235
|
+
renderEndOfResults?: () => React.ReactNode;
|
|
236
|
+
/** Optional element rendered inside the search field, on its right edge.
|
|
237
|
+
* Useful for injecting context-aware CTAs (e.g. a "New App" chip that
|
|
238
|
+
* seeds the AddAppDialog with the current category). */
|
|
239
|
+
renderInputEndAdornment?: () => React.ReactNode;
|
|
234
240
|
onAppSelected?: (detail: AppSelectedEvent) => void;
|
|
235
241
|
onSelectionChange?: (apps: AlgoliaSearchApp[]) => void;
|
|
236
242
|
onSearchChange?: (query: string) => void;
|
|
243
|
+
/** Called when the user clicks the "New app" CTA at the end of results. */
|
|
244
|
+
onCreateNewApp?: () => void;
|
|
237
245
|
}
|
|
238
246
|
|
|
239
247
|
/**
|
|
@@ -245,6 +253,7 @@ interface ShuffleMCPProps extends ShuffleHostProps {
|
|
|
245
253
|
interface ShuffleMCPHandle {
|
|
246
254
|
search: (query: string) => void;
|
|
247
255
|
clear: () => void;
|
|
256
|
+
focus: (selectAll?: boolean) => void;
|
|
248
257
|
}
|
|
249
258
|
|
|
250
259
|
interface AiAgentPromptsEditorProps {
|
|
@@ -335,6 +344,39 @@ interface TryMcpSectionProps extends ShuffleHostProps {
|
|
|
335
344
|
categories?: string[];
|
|
336
345
|
}
|
|
337
346
|
|
|
347
|
+
interface AgentPreset {
|
|
348
|
+
id: string;
|
|
349
|
+
label: string;
|
|
350
|
+
description: string;
|
|
351
|
+
/** Default prompt seed — will pre-fill the AgentUI when the preset is clicked. */
|
|
352
|
+
defaultPrompt: string;
|
|
353
|
+
icon: React.ReactNode;
|
|
354
|
+
/** When true, the preset is clickable and pre-fills the prompt. Others are placeholders. */
|
|
355
|
+
enabled?: boolean;
|
|
356
|
+
/** Optional tools/apps to pre-select when this preset is clicked. */
|
|
357
|
+
defaultApps?: Array<{
|
|
358
|
+
name: string;
|
|
359
|
+
id?: string;
|
|
360
|
+
icon?: string;
|
|
361
|
+
}>;
|
|
362
|
+
}
|
|
363
|
+
declare const AGENT_PRESETS: AgentPreset[];
|
|
364
|
+
interface AgentPresetsProps {
|
|
365
|
+
/** Inline variant sits inside the prompt input row alongside action buttons. */
|
|
366
|
+
variant?: 'default' | 'inline' | 'floating';
|
|
367
|
+
/** Called when the user picks a preset — receives the preset's default prompt seed. */
|
|
368
|
+
onSelectPreset?: (preset: AgentPreset) => void;
|
|
369
|
+
/** Optional currently selected preset — turns the trigger into a chip showing the preset label. */
|
|
370
|
+
selectedPreset?: AgentPreset | null;
|
|
371
|
+
/** Called when the user clicks the remove (X) button on a selected preset chip. */
|
|
372
|
+
onRemoveSelected?: () => void;
|
|
373
|
+
/** Override the built-in preset list. */
|
|
374
|
+
presets?: AgentPreset[];
|
|
375
|
+
/** Ref forwarded to the trigger button so the host can measure its width. */
|
|
376
|
+
chipRef?: React.Ref<HTMLButtonElement>;
|
|
377
|
+
}
|
|
378
|
+
declare const AgentPresets: ({ variant, onSelectPreset, selectedPreset, onRemoveSelected, presets, chipRef }: AgentPresetsProps) => React$1.JSX.Element;
|
|
379
|
+
|
|
338
380
|
/**
|
|
339
381
|
* AgentUI — Standalone "start + debug agents" surface.
|
|
340
382
|
*
|
|
@@ -495,6 +537,7 @@ interface AgentUIProps {
|
|
|
495
537
|
id?: string;
|
|
496
538
|
icon?: string;
|
|
497
539
|
}>;
|
|
540
|
+
presetId?: string;
|
|
498
541
|
onStep?: (event: {
|
|
499
542
|
id: 'name' | 'workflow' | 'schedule';
|
|
500
543
|
state: 'active' | 'done' | 'error';
|
|
@@ -526,7 +569,58 @@ interface AgentUIProps {
|
|
|
526
569
|
sx?: SxProps<Theme>;
|
|
527
570
|
/** Style overrides for the inner content card (the column under the run-switcher). */
|
|
528
571
|
contentSx?: SxProps<Theme>;
|
|
572
|
+
/**
|
|
573
|
+
* Storage key for the per-user prompt-prefix chip. Typically the current
|
|
574
|
+
* Shuffle user id. When omitted, the prefix persists under `"default"`
|
|
575
|
+
* (shared across all users on this browser).
|
|
576
|
+
*/
|
|
577
|
+
userId?: string;
|
|
578
|
+
/** Hide the "+ Templates" trigger next to the input. */
|
|
579
|
+
hidePresets?: boolean;
|
|
580
|
+
/** Override the built-in template list surfaced by the "+ Templates" trigger. */
|
|
581
|
+
presets?: AgentPreset[];
|
|
582
|
+
/** Called when the user picks a preset. Overrides the built-in seed behavior. */
|
|
583
|
+
onSelectPreset?: (preset: AgentPreset) => void;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
interface AgentPromptPrefixChipProps {
|
|
587
|
+
/** Optional label override. Defaults to "Shuffle Tools MCP". */
|
|
588
|
+
label?: string;
|
|
589
|
+
/** Storage key (typically the current user id) — used when uncontrolled. */
|
|
590
|
+
userId?: string;
|
|
591
|
+
/** Controlled value. When provided, disables internal persistence. */
|
|
592
|
+
value?: string;
|
|
593
|
+
/** Called when the user saves an edit in controlled mode. */
|
|
594
|
+
onChange?: (next: string) => void | Promise<void>;
|
|
595
|
+
/** Called when the user clicks the remove (X) button. */
|
|
596
|
+
onRemove?: () => void;
|
|
597
|
+
/** Override the built-in default prompt seed. */
|
|
598
|
+
defaultPrompt?: string;
|
|
599
|
+
/** Dialog title override. */
|
|
600
|
+
dialogTitle?: string;
|
|
601
|
+
/** When true, the chip is not clickable and the edit dialog is suppressed. */
|
|
602
|
+
readOnly?: boolean;
|
|
529
603
|
}
|
|
604
|
+
declare const AgentPromptPrefixChip: ({ label, userId, value, onChange, onRemove, defaultPrompt, dialogTitle, readOnly, }: AgentPromptPrefixChipProps) => React$1.JSX.Element;
|
|
605
|
+
|
|
606
|
+
declare const AGENT_PROMPT_PREFIX_CATEGORY = "agent-prompt-prefix";
|
|
607
|
+
/** Default seed used until the user saves their own prefix.
|
|
608
|
+
* Empty by default — the backend system prompt handles agent identity. */
|
|
609
|
+
declare const DEFAULT_AGENT_PROMPT_PREFIX = "";
|
|
610
|
+
interface UseAgentPromptPrefixOptions {
|
|
611
|
+
/** Storage key — typically the current user id. Falls back to `"default"`. */
|
|
612
|
+
userId?: string;
|
|
613
|
+
/** Override the seed shown until the user saves their own. */
|
|
614
|
+
defaultPrompt?: string;
|
|
615
|
+
/** When false, disables datastore reads/writes entirely (in-memory only). */
|
|
616
|
+
persist?: boolean;
|
|
617
|
+
}
|
|
618
|
+
declare const useAgentPromptPrefix: (options?: UseAgentPromptPrefixOptions) => {
|
|
619
|
+
prompt: string;
|
|
620
|
+
savePrompt: (next: string) => Promise<boolean>;
|
|
621
|
+
hasFetched: boolean;
|
|
622
|
+
isSaving: boolean;
|
|
623
|
+
};
|
|
530
624
|
|
|
531
625
|
type AgentRunDrawerTab = 'run' | 'permissions' | 'localLLM';
|
|
532
626
|
interface AgentRunDrawerProps extends ShuffleHostProps {
|
|
@@ -548,7 +642,7 @@ interface AgentRunDrawerProps extends ShuffleHostProps {
|
|
|
548
642
|
permissionsDisabledTooltip?: string;
|
|
549
643
|
/** Forwarded to the embedded AgentUI (apiKey, apiBaseUrl, orgId, etc.). */
|
|
550
644
|
agentUIProps?: Partial<AgentUIProps>;
|
|
551
|
-
/** Drawer width override (default:
|
|
645
|
+
/** Drawer width override (default: 595 px on >=sm, full-width on xs). */
|
|
552
646
|
width?: number;
|
|
553
647
|
/** Header title. Default: "Agent". */
|
|
554
648
|
title?: string;
|
|
@@ -714,6 +808,18 @@ declare const scheduleAgentRun: ({ cron, input, apps, onStep, apiKey, apiBaseUrl
|
|
|
714
808
|
cron: string;
|
|
715
809
|
}>;
|
|
716
810
|
|
|
811
|
+
/**
|
|
812
|
+
* A usecase-backed agent "type" surfaced in the run filter dropdown.
|
|
813
|
+
* Hosts supply only the usecases that are actually enabled for the tenant.
|
|
814
|
+
*/
|
|
815
|
+
interface AgentUsecaseFilter {
|
|
816
|
+
/** Unique id (used as the menu value). */
|
|
817
|
+
id: string;
|
|
818
|
+
/** Menu label, e.g. "Incident Response Agent". */
|
|
819
|
+
label: string;
|
|
820
|
+
/** Case-insensitive substrings matched against run source/workflow metadata. */
|
|
821
|
+
matchTokens: string[];
|
|
822
|
+
}
|
|
717
823
|
interface AgentActivityListProps extends ShuffleHostProps {
|
|
718
824
|
/** Optional Shuffle API key. Falls back to the shared API_CONFIG. */
|
|
719
825
|
apiKey?: string;
|
|
@@ -751,6 +857,8 @@ interface AgentActivityListProps extends ShuffleHostProps {
|
|
|
751
857
|
toolbarSx?: SxProps<Theme>;
|
|
752
858
|
/** Style overrides for each individual run row. */
|
|
753
859
|
rowSx?: SxProps<Theme>;
|
|
860
|
+
/** Usecase-backed agent types shown in the run filter dropdown. */
|
|
861
|
+
usecaseFilters?: AgentUsecaseFilter[];
|
|
754
862
|
}
|
|
755
863
|
|
|
756
864
|
interface AgentExecutionDrawerProps extends ShuffleHostProps {
|
|
@@ -821,6 +929,8 @@ interface AgentsViewProps extends ShuffleHostProps {
|
|
|
821
929
|
disableAppsPersistence?: boolean;
|
|
822
930
|
/** Storage key for internal chip-row persistence. Defaults to `shuffle-agents-selected-apps`. */
|
|
823
931
|
appsStorageKey?: string;
|
|
932
|
+
/** Usecase-backed agent types shown in the activity list filter dropdown. */
|
|
933
|
+
usecaseFilters?: AgentUsecaseFilter[];
|
|
824
934
|
}
|
|
825
935
|
|
|
826
936
|
interface AgentLocalModel {
|
|
@@ -841,6 +951,161 @@ interface LocalLLMConfigProps extends ShuffleHostProps {
|
|
|
841
951
|
onTestResult?: (result: LocalLLMTestResult) => void;
|
|
842
952
|
}
|
|
843
953
|
|
|
954
|
+
/**
|
|
955
|
+
* AddAppModal — Two-phase modal for finding and authenticating apps.
|
|
956
|
+
*
|
|
957
|
+
* Phase 1: ShuffleMCP search (same style as /onboarding/sources)
|
|
958
|
+
* Phase 2: AppAuthCard for the selected app (same as /onboarding/authenticate)
|
|
959
|
+
*
|
|
960
|
+
* Self-contained: lives in Shuffle-MCPs so it can be used inside the library
|
|
961
|
+
* (e.g., AppSearchDrawer) without host-app imports.
|
|
962
|
+
*/
|
|
963
|
+
interface AddAppModalProps {
|
|
964
|
+
open: boolean;
|
|
965
|
+
onClose: () => void;
|
|
966
|
+
/** Initial search query (e.g. category label like "SIEM") */
|
|
967
|
+
initialQuery: string;
|
|
968
|
+
/** Category label for display */
|
|
969
|
+
categoryLabel: string;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
type AuthStatus = 'pending' | 'testing' | 'connected' | 'error';
|
|
973
|
+
interface AppAuthState {
|
|
974
|
+
systemId: string;
|
|
975
|
+
status: AuthStatus;
|
|
976
|
+
credentials: Record<string, string>;
|
|
977
|
+
errorMessage?: string;
|
|
978
|
+
successMessage?: string;
|
|
979
|
+
warningMessage?: string;
|
|
980
|
+
workflowId?: string;
|
|
981
|
+
executionId?: string;
|
|
982
|
+
errorCode?: number;
|
|
983
|
+
}
|
|
984
|
+
interface AuthParameter {
|
|
985
|
+
description: string;
|
|
986
|
+
example: string;
|
|
987
|
+
id: string;
|
|
988
|
+
name: string;
|
|
989
|
+
required: boolean;
|
|
990
|
+
schema: {
|
|
991
|
+
type: string;
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
interface AppAuthentication {
|
|
995
|
+
type: string;
|
|
996
|
+
description?: string;
|
|
997
|
+
redirect_uri?: string;
|
|
998
|
+
token_uri?: string;
|
|
999
|
+
refresh_uri?: string;
|
|
1000
|
+
authorization_url?: string;
|
|
1001
|
+
auth_uri?: string;
|
|
1002
|
+
authorize_url?: string;
|
|
1003
|
+
scope?: string[];
|
|
1004
|
+
client_id?: string;
|
|
1005
|
+
client_secret?: string;
|
|
1006
|
+
parameters?: AuthParameter[];
|
|
1007
|
+
}
|
|
1008
|
+
interface ApiAuthEntry {
|
|
1009
|
+
id?: string;
|
|
1010
|
+
label?: string;
|
|
1011
|
+
app: {
|
|
1012
|
+
id: string;
|
|
1013
|
+
name: string;
|
|
1014
|
+
large_image?: string;
|
|
1015
|
+
};
|
|
1016
|
+
active?: boolean;
|
|
1017
|
+
created?: number;
|
|
1018
|
+
edited?: number;
|
|
1019
|
+
validation?: {
|
|
1020
|
+
valid: boolean;
|
|
1021
|
+
error?: string;
|
|
1022
|
+
last_valid?: number;
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
interface AppAuthConfigProps extends ShuffleHostProps {
|
|
1026
|
+
apps: AlgoliaSearchApp[];
|
|
1027
|
+
authStates: Record<string, AppAuthState>;
|
|
1028
|
+
authenticatedApps?: ApiAuthEntry[];
|
|
1029
|
+
onAuthChange: (appId: string, credentials: Record<string, string>) => void;
|
|
1030
|
+
onTestConnection: (appId: string, authenticationId?: string) => void;
|
|
1031
|
+
onSaveAuth: (appId: string, credentials: Record<string, string>) => Promise<boolean>;
|
|
1032
|
+
onSelectAuth?: (appId: string, authId: string) => void;
|
|
1033
|
+
onRefreshAuth?: () => Promise<void> | void;
|
|
1034
|
+
}
|
|
1035
|
+
interface AppAuthCardProps extends ShuffleHostProps {
|
|
1036
|
+
app: AlgoliaSearchApp;
|
|
1037
|
+
authState: AppAuthState;
|
|
1038
|
+
isExpanded: boolean;
|
|
1039
|
+
onToggle: () => void;
|
|
1040
|
+
onAuthChange: (appId: string, credentials: Record<string, string>) => void;
|
|
1041
|
+
onTestConnection: (appId: string, authenticationId?: string) => void;
|
|
1042
|
+
onSaveAuth: (appId: string, credentials: Record<string, string>) => Promise<boolean>;
|
|
1043
|
+
apiAuthEntries: ApiAuthEntry[];
|
|
1044
|
+
onSelectAuth?: (appId: string, authId: string) => void;
|
|
1045
|
+
/** Called to refresh auth entries (e.g. after OAuth popup closes) */
|
|
1046
|
+
onRefreshAuth?: () => Promise<void> | void;
|
|
1047
|
+
/** When true, do NOT auto-fill URL fields with the param.example value. */
|
|
1048
|
+
disableUrlPrefill?: boolean;
|
|
1049
|
+
/** Hide the entire card header row (app icon, name, description, chips, docs, expand). Body stays expanded. */
|
|
1050
|
+
hideHeader?: boolean;
|
|
1051
|
+
/** Hide the "Configured / Not configured" and "Tested / Not tested" chips. */
|
|
1052
|
+
hideStatusChips?: boolean;
|
|
1053
|
+
/** Hide the documentation (book icon) link. */
|
|
1054
|
+
hideDocsLink?: boolean;
|
|
1055
|
+
/** Hide URL-like fields (name/id containing "url", "endpoint", or "host").
|
|
1056
|
+
* Use when the URL is supplied externally (e.g. via a provider preset). */
|
|
1057
|
+
hideUrlFields?: boolean;
|
|
1058
|
+
/** Render without the outer Card border so the component can be embedded
|
|
1059
|
+
* inside another bordered container without the nested "double border" look. */
|
|
1060
|
+
borderless?: boolean;
|
|
1061
|
+
/** Compact mode for embedded auth setup (e.g. Local LLM). Hides the
|
|
1062
|
+
* "Select authentication" dropdown and the large "Pending Verification"
|
|
1063
|
+
* detail panel with its standalone Test Connection button. The inline
|
|
1064
|
+
* credentials form (with the small "Test Authentication" CTA) is always
|
|
1065
|
+
* visible so users can edit & retest in one place. */
|
|
1066
|
+
compactAuthForm?: boolean;
|
|
1067
|
+
/** Always render the "Select authentication" dropdown, even when there are no
|
|
1068
|
+
* saved entries yet, so the UI does not switch between two different shapes. */
|
|
1069
|
+
alwaysShowAuthSelector?: boolean;
|
|
1070
|
+
/** Suppress the "Authentication saved" success toast (embedded flows that
|
|
1071
|
+
* already give their own feedback, e.g. the LLM provider config). */
|
|
1072
|
+
suppressSaveToast?: boolean;
|
|
1073
|
+
/** Render additional fields inside the expanded body, above the credential
|
|
1074
|
+
* inputs. The slot receives the live `localCredentials` and a `setField`
|
|
1075
|
+
* helper so its values are persisted as part of the auth on Save. */
|
|
1076
|
+
extraFieldsSlot?: (api: {
|
|
1077
|
+
credentials: Record<string, string>;
|
|
1078
|
+
setField: (key: string, value: string) => void;
|
|
1079
|
+
}) => React.ReactNode;
|
|
1080
|
+
/** Known-ahead-of-time auth schema. When provided the fields render
|
|
1081
|
+
* instantly and no app-config request is made (no "Loading configuration"). */
|
|
1082
|
+
initialAuthConfig?: AppAuthentication;
|
|
1083
|
+
}
|
|
1084
|
+
declare const AppAuthCard: ({ app, authState, isExpanded, onToggle, onAuthChange, onTestConnection, onSaveAuth, apiAuthEntries, onSelectAuth, onRefreshAuth, disableUrlPrefill, hideHeader, hideStatusChips, hideDocsLink, hideUrlFields, borderless, compactAuthForm, alwaysShowAuthSelector, suppressSaveToast, extraFieldsSlot, initialAuthConfig, globalUrl, userdata, isLoaded, isLoggedIn, serverside, }: AppAuthCardProps) => React$1.JSX.Element;
|
|
1085
|
+
declare const AppAuthConfig: ({ apps, authStates, authenticatedApps, onAuthChange, onTestConnection, onSaveAuth, onSelectAuth, onRefreshAuth, globalUrl, userdata, isLoaded, isLoggedIn, serverside, }: AppAuthConfigProps) => React$1.JSX.Element;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* useAppAuthFlow — Shared hook for the search→authenticate flow.
|
|
1089
|
+
* Encapsulates fetching auth entries, saving credentials, and testing connections.
|
|
1090
|
+
* Used by AddAppModal, AppSearchDrawer, and anywhere else that needs app auth.
|
|
1091
|
+
*
|
|
1092
|
+
* Self-contained: lives in Shuffle-MCPs so library consumers can use the same
|
|
1093
|
+
* auth flow without host-app wiring.
|
|
1094
|
+
*/
|
|
1095
|
+
|
|
1096
|
+
declare function useAppAuthFlow(): {
|
|
1097
|
+
selectedApp: AlgoliaSearchApp;
|
|
1098
|
+
authState: AppAuthState;
|
|
1099
|
+
authenticatedApps: ApiAuthEntry[];
|
|
1100
|
+
authLoading: boolean;
|
|
1101
|
+
selectApp: (app: AlgoliaSearchApp) => void;
|
|
1102
|
+
clearSelection: () => void;
|
|
1103
|
+
handleAuthChange: (_appId: string, credentials: Record<string, string>) => void;
|
|
1104
|
+
handleTestConnection: (systemId: string, authenticationId?: string) => Promise<void>;
|
|
1105
|
+
handleSaveAuth: (appId: string, credentials: Record<string, string>) => Promise<boolean>;
|
|
1106
|
+
refreshAuth: () => Promise<void>;
|
|
1107
|
+
};
|
|
1108
|
+
|
|
844
1109
|
/**
|
|
845
1110
|
* Shared diagnosis utilities for an agent execution result.
|
|
846
1111
|
*
|
|
@@ -1000,95 +1265,13 @@ interface IntegrationStatusProps extends ShuffleHostProps {
|
|
|
1000
1265
|
declare const refreshAllIntegrationStatus: () => void;
|
|
1001
1266
|
declare const IntegrationStatus: ({ collapsed, filterApps, onAddClick, iconSize, onDisable, disabledApps, showAll, hideAddButton, hideHeader, priorityCategory, extraApps }: IntegrationStatusProps) => React$1.JSX.Element;
|
|
1002
1267
|
|
|
1003
|
-
type AuthStatus = 'pending' | 'testing' | 'connected' | 'error';
|
|
1004
|
-
interface AppAuthState {
|
|
1005
|
-
systemId: string;
|
|
1006
|
-
status: AuthStatus;
|
|
1007
|
-
credentials: Record<string, string>;
|
|
1008
|
-
errorMessage?: string;
|
|
1009
|
-
successMessage?: string;
|
|
1010
|
-
warningMessage?: string;
|
|
1011
|
-
workflowId?: string;
|
|
1012
|
-
executionId?: string;
|
|
1013
|
-
errorCode?: number;
|
|
1014
|
-
}
|
|
1015
|
-
interface ApiAuthEntry {
|
|
1016
|
-
id?: string;
|
|
1017
|
-
label?: string;
|
|
1018
|
-
app: {
|
|
1019
|
-
id: string;
|
|
1020
|
-
name: string;
|
|
1021
|
-
large_image?: string;
|
|
1022
|
-
};
|
|
1023
|
-
active?: boolean;
|
|
1024
|
-
created?: number;
|
|
1025
|
-
edited?: number;
|
|
1026
|
-
validation?: {
|
|
1027
|
-
valid: boolean;
|
|
1028
|
-
error?: string;
|
|
1029
|
-
last_valid?: number;
|
|
1030
|
-
};
|
|
1031
|
-
}
|
|
1032
|
-
interface AppAuthConfigProps extends ShuffleHostProps {
|
|
1033
|
-
apps: AlgoliaSearchApp[];
|
|
1034
|
-
authStates: Record<string, AppAuthState>;
|
|
1035
|
-
authenticatedApps?: ApiAuthEntry[];
|
|
1036
|
-
onAuthChange: (appId: string, credentials: Record<string, string>) => void;
|
|
1037
|
-
onTestConnection: (appId: string, authenticationId?: string) => void;
|
|
1038
|
-
onSaveAuth: (appId: string, credentials: Record<string, string>) => Promise<boolean>;
|
|
1039
|
-
onSelectAuth?: (appId: string, authId: string) => void;
|
|
1040
|
-
onRefreshAuth?: () => Promise<void> | void;
|
|
1041
|
-
}
|
|
1042
|
-
interface AppAuthCardProps extends ShuffleHostProps {
|
|
1043
|
-
app: AlgoliaSearchApp;
|
|
1044
|
-
authState: AppAuthState;
|
|
1045
|
-
isExpanded: boolean;
|
|
1046
|
-
onToggle: () => void;
|
|
1047
|
-
onAuthChange: (appId: string, credentials: Record<string, string>) => void;
|
|
1048
|
-
onTestConnection: (appId: string, authenticationId?: string) => void;
|
|
1049
|
-
onSaveAuth: (appId: string, credentials: Record<string, string>) => Promise<boolean>;
|
|
1050
|
-
apiAuthEntries: ApiAuthEntry[];
|
|
1051
|
-
onSelectAuth?: (appId: string, authId: string) => void;
|
|
1052
|
-
/** Called to refresh auth entries (e.g. after OAuth popup closes) */
|
|
1053
|
-
onRefreshAuth?: () => Promise<void> | void;
|
|
1054
|
-
/** When true, do NOT auto-fill URL fields with the param.example value. */
|
|
1055
|
-
disableUrlPrefill?: boolean;
|
|
1056
|
-
/** Hide the entire card header row (app icon, name, description, chips, docs, expand). Body stays expanded. */
|
|
1057
|
-
hideHeader?: boolean;
|
|
1058
|
-
/** Hide the "Configured / Not configured" and "Tested / Not tested" chips. */
|
|
1059
|
-
hideStatusChips?: boolean;
|
|
1060
|
-
/** Hide the documentation (book icon) link. */
|
|
1061
|
-
hideDocsLink?: boolean;
|
|
1062
|
-
/** Hide URL-like fields (name/id containing "url", "endpoint", or "host").
|
|
1063
|
-
* Use when the URL is supplied externally (e.g. via a provider preset). */
|
|
1064
|
-
hideUrlFields?: boolean;
|
|
1065
|
-
/** Render without the outer Card border so the component can be embedded
|
|
1066
|
-
* inside another bordered container without the nested "double border" look. */
|
|
1067
|
-
borderless?: boolean;
|
|
1068
|
-
/** Compact mode for embedded auth setup (e.g. Local LLM). Hides the
|
|
1069
|
-
* "Select authentication" dropdown and the large "Pending Verification"
|
|
1070
|
-
* detail panel with its standalone Test Connection button. The inline
|
|
1071
|
-
* credentials form (with the small "Test Authentication" CTA) is always
|
|
1072
|
-
* visible so users can edit & retest in one place. */
|
|
1073
|
-
compactAuthForm?: boolean;
|
|
1074
|
-
/** Render additional fields inside the expanded body, above the credential
|
|
1075
|
-
* inputs. The slot receives the live `localCredentials` and a `setField`
|
|
1076
|
-
* helper so its values are persisted as part of the auth on Save. */
|
|
1077
|
-
extraFieldsSlot?: (api: {
|
|
1078
|
-
credentials: Record<string, string>;
|
|
1079
|
-
setField: (key: string, value: string) => void;
|
|
1080
|
-
}) => React.ReactNode;
|
|
1081
|
-
}
|
|
1082
|
-
declare const AppAuthCard: ({ app, authState, isExpanded, onToggle, onAuthChange, onTestConnection, onSaveAuth, apiAuthEntries, onSelectAuth, onRefreshAuth, disableUrlPrefill, hideHeader, hideStatusChips, hideDocsLink, hideUrlFields, borderless, compactAuthForm, extraFieldsSlot, globalUrl, userdata, isLoaded, isLoggedIn, serverside, }: AppAuthCardProps) => React$1.JSX.Element;
|
|
1083
|
-
declare const AppAuthConfig: ({ apps, authStates, authenticatedApps, onAuthChange, onTestConnection, onSaveAuth, onSelectAuth, onRefreshAuth, globalUrl, userdata, isLoaded, isLoggedIn, serverside, }: AppAuthConfigProps) => React$1.JSX.Element;
|
|
1084
|
-
|
|
1085
1268
|
declare function useAppAuth(): {
|
|
1086
1269
|
authStates: Record<string, AppAuthState>;
|
|
1087
1270
|
authenticatedApps: ApiAuthEntry[];
|
|
1088
1271
|
loading: boolean;
|
|
1089
1272
|
handleAuthChange: (systemId: string, credentials: Record<string, string>) => void;
|
|
1090
1273
|
handleTestConnection: (systemId: string, authenticationId?: string) => Promise<void>;
|
|
1091
|
-
handleSaveAuth: (appId: string, credentials: Record<string, string>, appName?: string) => Promise<boolean>;
|
|
1274
|
+
handleSaveAuth: (appId: string, credentials: Record<string, string>, appName?: string, label?: string) => Promise<boolean>;
|
|
1092
1275
|
refreshAuth: () => Promise<void>;
|
|
1093
1276
|
};
|
|
1094
1277
|
|
|
@@ -1115,6 +1298,10 @@ declare const useSyncHostBaseUrl: (globalUrl: string | undefined | null) => void
|
|
|
1115
1298
|
* scoped to a Shuffle backend origin) fails repeatedly inside a short window,
|
|
1116
1299
|
* subsequent calls fail-fast with a synthetic 503 for a cooldown period.
|
|
1117
1300
|
*
|
|
1301
|
+
* The breaker is "half-open": shortly after tripping it lets a single probe
|
|
1302
|
+
* request through. If that probe succeeds the endpoint is restored immediately
|
|
1303
|
+
* instead of staying blocked for the full cooldown.
|
|
1304
|
+
*
|
|
1118
1305
|
* This is a safety net — components and hooks should still throttle / cache
|
|
1119
1306
|
* their own requests. The breaker only kicks in when something has gone wrong
|
|
1120
1307
|
* (a useEffect missing deps, a render loop, an unreachable backend).
|
|
@@ -1175,6 +1362,8 @@ interface DatastoreItem {
|
|
|
1175
1362
|
created?: number;
|
|
1176
1363
|
edited?: number;
|
|
1177
1364
|
public_authorization?: string;
|
|
1365
|
+
publicAuthorization?: string;
|
|
1366
|
+
PublicAuthorization?: string;
|
|
1178
1367
|
enrichments?: Array<{
|
|
1179
1368
|
type: string;
|
|
1180
1369
|
value?: string;
|
|
@@ -1205,6 +1394,11 @@ interface CategoryConfig {
|
|
|
1205
1394
|
public: boolean;
|
|
1206
1395
|
};
|
|
1207
1396
|
}
|
|
1397
|
+
interface DatastoreKeyExisted {
|
|
1398
|
+
key: string;
|
|
1399
|
+
existed: boolean;
|
|
1400
|
+
changed: boolean;
|
|
1401
|
+
}
|
|
1208
1402
|
interface DatastoreResponse {
|
|
1209
1403
|
success: boolean;
|
|
1210
1404
|
data?: DatastoreItem[];
|
|
@@ -1213,6 +1407,10 @@ interface DatastoreResponse {
|
|
|
1213
1407
|
totalAmount?: number;
|
|
1214
1408
|
error?: string;
|
|
1215
1409
|
diagnostics?: DatastoreDiagnostics;
|
|
1410
|
+
/** Per-key write result reported by the backend (v2 datastore writes). */
|
|
1411
|
+
keysExisted?: DatastoreKeyExisted[];
|
|
1412
|
+
/** True when the backend reports the stored value actually changed. */
|
|
1413
|
+
changed?: boolean;
|
|
1216
1414
|
}
|
|
1217
1415
|
interface DatastoreDiagnostics {
|
|
1218
1416
|
operation: string;
|
|
@@ -1245,7 +1443,9 @@ declare const setDatastoreItems: (items: {
|
|
|
1245
1443
|
/**
|
|
1246
1444
|
* Get a single item from the datastore
|
|
1247
1445
|
*/
|
|
1248
|
-
declare const getDatastoreItem: (key: string, category: string, overrideOrgId?: string
|
|
1446
|
+
declare const getDatastoreItem: (key: string, category: string, overrideOrgId?: string, options?: {
|
|
1447
|
+
priority?: boolean;
|
|
1448
|
+
}) => Promise<DatastoreResponse & {
|
|
1249
1449
|
item?: DatastoreItem;
|
|
1250
1450
|
}>;
|
|
1251
1451
|
/**
|
|
@@ -1254,10 +1454,17 @@ declare const getDatastoreItem: (key: string, category: string, overrideOrgId?:
|
|
|
1254
1454
|
declare const getDatastoreItemPublic: (key: string, orgId: string, authorization: string) => Promise<DatastoreResponse & {
|
|
1255
1455
|
item?: DatastoreItem;
|
|
1256
1456
|
}>;
|
|
1457
|
+
/**
|
|
1458
|
+
/**
|
|
1459
|
+
* Page size used for a category. Exported so callers that follow cursors can
|
|
1460
|
+
* tell a full page (more data may exist) from a short page (definitively the
|
|
1461
|
+
* last one) — the backend returns a cursor even on the final page.
|
|
1462
|
+
*/
|
|
1463
|
+
declare const getDatastorePageSize: (category: string, limit?: number) => number;
|
|
1257
1464
|
/**
|
|
1258
1465
|
* Get all items in a category with optional cursor-based pagination
|
|
1259
1466
|
*/
|
|
1260
|
-
declare const getDatastoreByCategory: (category: string, cursor?: string, limit?: number) => Promise<DatastoreResponse>;
|
|
1467
|
+
declare const getDatastoreByCategory: (category: string, cursor?: string, limit?: number, overrideOrgId?: string) => Promise<DatastoreResponse>;
|
|
1261
1468
|
/**
|
|
1262
1469
|
* Delete a single item from the datastore
|
|
1263
1470
|
*/
|
|
@@ -1273,6 +1480,7 @@ declare const deleteDatastoreItems: (keys: string[], category: string) => Promis
|
|
|
1273
1480
|
}>;
|
|
1274
1481
|
declare const DATASTORE_CATEGORIES: {
|
|
1275
1482
|
readonly INCIDENTS: "shuffle-security_incidents";
|
|
1483
|
+
readonly VULNERABILITIES: "shuffle-security_vulnerabilities";
|
|
1276
1484
|
readonly ASSETS: "shuffle-security_assets";
|
|
1277
1485
|
readonly TEMPLATES: "shuffle-security_templates";
|
|
1278
1486
|
readonly CONFIGURATION: "shuffle-security_configuration";
|
|
@@ -1449,4 +1657,6 @@ declare const AgentsView: React__default.ComponentType<any>;
|
|
|
1449
1657
|
declare const AgentRunDiagnosisBanner: React__default.ComponentType<any>;
|
|
1450
1658
|
declare const LocalLLMConfig: React__default.ComponentType<any>;
|
|
1451
1659
|
|
|
1452
|
-
|
|
1660
|
+
declare const AddAppModal: React__default.ComponentType<any>;
|
|
1661
|
+
|
|
1662
|
+
export { AGENT_PRESETS, AGENT_PROMPT_PREFIX_CATEGORY, API_CONFIG, AddAppModal, type AddAppModalProps, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, AgentIcon, type AgentLocalModel, type AgentPreset, AgentPresets, type AgentPresetsProps, AgentPromptPrefixChip, type AgentPromptPrefixChipProps, 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$1 as 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, DEFAULT_AGENT_PROMPT_PREFIX, 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, LocalLLMConfig, type LocalLLMConfigProps, type LocalLLMTestResult, type OutputDiagnosis, type ResolvedApp, SIEM_PATTERNS, type ShuffleHostProps, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, type ShuffleMcpColorMode, ShuffleMcpThemeProvider, type ShuffleMcpThemeProviderProps, ShufflePipelinesBanner, type ShuffleTheme, SingulActionsPreview, THREAT_INTEL_PATTERNS, TryMcpSection, type TryMcpSectionProps, UsageBar, type UsageBarProps, type UseAgentPromptPrefixOptions, VULN_SCANNER_PATTERNS, type ValidatedIngestionApp, ShuffleMCP as default, deleteDatastoreItem, deleteDatastoreItems, diagnoseOutputWarning, extractActionAppNames, extractValidatedIngestionApps, extractWorkflowActionAppNames, extractWorkflowAppNames, fetchApps, fetchAppsViaApiConfig, findForwardTicketsWorkflow, findIngestTicketsWorkflow, getApiUrl, getAuthHeader, getDatastoreByCategory, getDatastoreItem, getDatastoreItemPublic, getDatastorePageSize, getFailureInfo, getHostBaseUrl, getIngestionCategory, hasOutputWarning, installFetchBreaker, invalidateAppsCache, invalidateResolvedApps, isCloud, isCloudDomain, isEmailApp, isIngestionApp, isOnprem, isThreatIntelApp, isVulnScannerApp, isWorkflowScheduleStopped, normalizeAppName, parseRunResult, refreshAllIntegrationStatus, registerProtectedOrigin, resetRegionUrl, resolveApp, resolveApps, scheduleAgentRun, searchAgentActivity, seedResolvedApp, setDatastoreItem, setDatastoreItems, setHostBaseUrl, setRegionUrl, setRuntimeOrgId, setToastImpl, shuffleFetch, toast, useAgentPromptPrefix, useAppAuth, useAppAuthFlow, useAppDetail, useAppDetailOptional, useAppLookup, useSyncHostBaseUrl };
|