@shuffleio/shuffle-mcps 0.0.59 → 0.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -136,6 +136,8 @@ interface AppAuthentication$1 {
136
136
  id: string;
137
137
  name: string;
138
138
  large_image: string;
139
+ categories?: string[];
140
+ description?: string;
139
141
  };
140
142
  fields: Array<{
141
143
  key: string;
@@ -149,6 +151,7 @@ interface AppAuthentication$1 {
149
151
  /** Whether the authentication has been validated (tests ran successfully) */
150
152
  valid: boolean;
151
153
  error?: string;
154
+ last_valid?: number;
152
155
  };
153
156
  }
154
157
  interface ShuffleMCPProps extends ShuffleHostProps {
@@ -390,6 +393,8 @@ interface AppDetailContentProps extends ShuffleHostProps {
390
393
  appName: string | null;
391
394
  /** Pre-resolved Algolia objectID (optional fast path) */
392
395
  appId?: string | null;
396
+ /** Pre-resolved app icon/image (optional fast path from chip/picker) */
397
+ appImage?: string | null;
393
398
  /** Callback to close the view (drawer mode) */
394
399
  onClose?: () => void;
395
400
  /** Callback when data is refreshed */
@@ -478,6 +483,12 @@ interface AppTitleHeaderProps extends ShuffleHostProps {
478
483
  activateLoading?: boolean;
479
484
  /** Called when user clicks Activate/Deactivate. */
480
485
  onActivateToggle?: () => void;
486
+ /** Ingestion state — `null` or undefined hides the Ingest button. */
487
+ isIngestEnabled?: boolean | null;
488
+ /** Whether ingestion toggle is in-flight. */
489
+ ingestLoading?: boolean;
490
+ /** Called when user clicks Enable ingest / Ingest enabled. */
491
+ onIngestToggle?: () => void;
481
492
  /** When true, visually highlight the Activate button to signal an
482
493
  * automatic click is happening (e.g. from a usecase auto-activate flow). */
483
494
  highlightActivate?: boolean;
@@ -728,6 +739,7 @@ interface AgentUIProps {
728
739
  input: string;
729
740
  success: boolean;
730
741
  executionId?: string;
742
+ authorization?: string;
731
743
  error?: string;
732
744
  }) => void;
733
745
  /** Called whenever the chip set under the prompt changes (add/remove apps). */
@@ -929,7 +941,7 @@ interface AskAiButtonProps {
929
941
  isBeta?: boolean;
930
942
  /** Current URL pathname. Automatically disables button on /agents and /agent */
931
943
  pathname?: string;
932
- /** Custom button label. Default: "Ask AI". */
944
+ /** Custom button label. Default: "Ask Shuffle". */
933
945
  label?: string;
934
946
  /** Tag label in the button. When undefined, defaults to "Beta" if isBeta is true, else "Support". Set to null to hide tag. */
935
947
  tagLabel?: string | null;
@@ -1193,6 +1205,9 @@ interface AskAiSidePanelProps extends ShuffleHostProps {
1193
1205
  * Self-contained: No host-app `@/` imports.
1194
1206
  */
1195
1207
 
1208
+ declare const AGENT_DRAWER_OPEN_EVENT = "agent-drawer-open";
1209
+ declare const AGENT_DRAWER_CLOSE_EVENT = "agent-drawer-close";
1210
+ declare const AGENT_DRAWER_STATE_EVENT = "agent-drawer-state";
1196
1211
  interface AskAiWidgetProps extends Omit<AskAiSidePanelProps, 'open' | 'onClose'> {
1197
1212
  /** Controlled open state. When omitted, the widget manages its own open state. */
1198
1213
  open?: boolean;
@@ -1225,6 +1240,34 @@ interface AskAiWidgetProps extends Omit<AskAiSidePanelProps, 'open' | 'onClose'>
1225
1240
  */
1226
1241
  declare const useContextAwareAgent: (pathname?: string, search?: string) => AgentResolvedContext;
1227
1242
 
1243
+ /**
1244
+ * ApiCallViewer — Standardized, compact API call inspector and test runner.
1245
+ * Used across App Integrations and Documentation.
1246
+ *
1247
+ * Supports switching between cURL, Python, HTTP, and JSON payload inspection,
1248
+ * live testing via Shuffle HTTP app, and collapsible JSON parsing via JsonView.
1249
+ */
1250
+
1251
+ interface ApiCallConfig {
1252
+ method: string;
1253
+ url: string;
1254
+ headers?: Record<string, string>;
1255
+ body?: unknown;
1256
+ }
1257
+ type SnippetLang = 'curl' | 'python' | 'http' | 'json';
1258
+ interface ApiCallViewerProps extends ShuffleHostProps {
1259
+ /** Structured API call configuration */
1260
+ config?: ApiCallConfig;
1261
+ /** Raw cURL command string (e.g. from documentation markdown) */
1262
+ rawCurl?: string;
1263
+ /** Whether to mask the Authorization header value in display (default: true) */
1264
+ maskAuth?: boolean;
1265
+ /** Initial selected tab mode (default: 'curl') */
1266
+ defaultMode?: SnippetLang;
1267
+ /** Title displayed in the header (default: 'API Call') */
1268
+ title?: string;
1269
+ }
1270
+
1228
1271
  /**
1229
1272
  * API Configuration
1230
1273
  *
@@ -1922,6 +1965,8 @@ interface DatastoreResponse {
1922
1965
  totalAmount?: number;
1923
1966
  error?: string;
1924
1967
  diagnostics?: DatastoreDiagnostics;
1968
+ /** Raw items count from backend before client-side cross-category filtering */
1969
+ rawItemCount?: number;
1925
1970
  /** Per-key write result reported by the backend (v2 datastore writes). */
1926
1971
  keysExisted?: DatastoreKeyExisted[];
1927
1972
  /** True when the backend reports the stored value actually changed. */
@@ -1938,6 +1983,7 @@ interface DatastoreDiagnostics {
1938
1983
  contentType?: string | null;
1939
1984
  responseShape?: 'array' | 'keys' | 'data' | 'object' | 'unknown';
1940
1985
  itemCount?: number;
1986
+ rawItemCount?: number;
1941
1987
  totalAmount?: number | null;
1942
1988
  bodyPreview?: string;
1943
1989
  errorStage?: 'request' | 'response' | 'parse' | 'unknown';
@@ -1973,6 +2019,17 @@ declare const getDatastoreItemPublic: (key: string, orgId: string, authorization
1973
2019
  item?: DatastoreItem;
1974
2020
  }>;
1975
2021
  /**
2022
+ * Defensively filters items returned by datastore list APIs.
2023
+ * The Shuffle Core backend's list_cache API filters the category field with an
2024
+ * analyzed match query instead of an exact term match, causing cross-category
2025
+ * contamination among categories sharing prefixes (e.g. shuffle-security_*).
2026
+ * If an item explicitly carries a `category` property, ensure it matches the
2027
+ * requested category (or known aliases for vulns). Items without a category
2028
+ * property are preserved for backwards compatibility with legacy payloads.
2029
+ */
2030
+ declare const filterItemsByCategory: <T extends {
2031
+ category?: string;
2032
+ }>(items: T[], category: string) => T[];
1976
2033
  /**
1977
2034
  * Page size used for a category. Exported so callers that follow cursors can
1978
2035
  * tell a full page (more data may exist) from a short page (definitively the
@@ -2235,6 +2292,45 @@ declare function resolveConnectedTools(category: 'incidents' | 'vulnerabilities'
2235
2292
  */
2236
2293
  declare function fetchConnectedTools(category: string, resolveUrl?: (path: string) => string, resolveHeaders?: () => Record<string, string>): Promise<ConnectedToolApp[]>;
2237
2294
 
2295
+ /**
2296
+ * Helper to build and launch pre-filled contact form URLs for escalating
2297
+ * an Ask Shuffle run or question to Shuffle Support.
2298
+ */
2299
+ interface SupportEscalationContext {
2300
+ userdata?: any;
2301
+ sourceUrl?: string;
2302
+ pathname?: string;
2303
+ search?: string;
2304
+ entityTitle?: string;
2305
+ initialQuestion?: string;
2306
+ executionId?: string;
2307
+ authorization?: string;
2308
+ executionStatus?: string;
2309
+ error?: string;
2310
+ category?: string;
2311
+ }
2312
+ interface ResolvedContactUserInfo {
2313
+ firstName: string;
2314
+ lastName: string;
2315
+ email: string;
2316
+ title: string;
2317
+ company: string;
2318
+ }
2319
+ /**
2320
+ * Extracts and normalizes user profile fields from available user session data.
2321
+ */
2322
+ declare function resolveContactUserInfo(userdata?: any): ResolvedContactUserInfo;
2323
+ /**
2324
+ * Builds the pre-filled URL pointing to https://shuffler.io/contact
2325
+ * using the available form fields:
2326
+ * "firstName", "lastName", "email", "title", "company", "category", "message"
2327
+ */
2328
+ declare function buildSupportEscalationUrl(context: SupportEscalationContext): string;
2329
+ /**
2330
+ * Opens https://shuffler.io/contact pre-filled in a new browser tab.
2331
+ */
2332
+ declare function openSupportEscalation(context: SupportEscalationContext): void;
2333
+
2238
2334
  /**
2239
2335
  * Local Singul Library — fully self-contained.
2240
2336
  * No host-app `@/` imports remain inside this folder (assets aside).
@@ -2280,6 +2376,8 @@ declare const AskAiSidePanel: React__default.ComponentType<any>;
2280
2376
 
2281
2377
  declare const AskAiWidget: React__default.ComponentType<any>;
2282
2378
 
2379
+ declare const ApiCallViewer: React__default.ComponentType<any>;
2380
+
2283
2381
  declare const AgentActivityList: React__default.ComponentType<any>;
2284
2382
 
2285
2383
  declare const AgentExecutionDrawer: React__default.ComponentType<any>;
@@ -2291,4 +2389,4 @@ declare const LocalLLMConfig: React__default.ComponentType<any>;
2291
2389
 
2292
2390
  declare const AddAppModal: React__default.ComponentType<any>;
2293
2391
 
2294
- export { AGENT_PRESETS, AGENT_PROMPT_PREFIX_CATEGORY, API_CONFIG, ASK_AI_PANEL_WIDTH_STORAGE_KEY, AddAppModal, type AddAppModalProps, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentContextApp, type AgentContextRule, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, AgentIcon, type AgentLocalModel, type AgentPreset, AgentPresets, type AgentPresetsProps, AgentPromptPrefixChip, type AgentPromptPrefixChipProps, type AgentResolvedContext, 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, AppDetailContent, type AppDetailContentProps, AppDetailDrawer, AppDetailProvider, type AppInfo, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, AskAiButton, type AskAiButtonProps, AskAiDrawer, type AskAiDrawerProps, AskAiSidePanel, type AskAiSidePanelProps, AskAiWidget, type AskAiWidgetProps, type AuthStatus, CASES_PATTERNS, COMMUNICATION_PATTERNS_NAMES, type CategoryAutomation, type CategoryConfig, type ConnectedToolApp, type CustomStyles, DATASTORE_CATEGORIES, DEFAULT_AGENT_CONTEXT_RULES, DEFAULT_AGENT_PROMPT_PREFIX, DEMO_AGENT_RUNS, 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, MAX_ASK_AI_PANEL_WIDTH, MAX_AUTO_ASSIGNED_TOOLS, MIN_ASK_AI_PANEL_WIDTH, ShuffleMarkdown as Markdown, MarkdownJsonBlock, type OutputDiagnosis, type PageContextChoice, type ResolvedApp, SIEM_PATTERNS, type ShuffleHostProps, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShuffleMarkdown, type ShuffleMcpColorMode, ShuffleMcpThemeProvider, type ShuffleMcpThemeProviderProps, ShufflePipelinesBanner, type ShuffleTheme, SingulActionsPreview, THREAT_INTEL_PATTERNS, TryMcpSection, type TryMcpSectionProps, UsageBar, type UsageBarProps, type UseAgentPromptPrefixOptions, VERIFIED_BUILTIN_APPS, VULN_SCANNER_PATTERNS, type ValidatedIngestionApp, VideoEmbed, applyRegionFromPayload, checkAppNameMatch, clearPageContextChoice, ShuffleMCP as default, deleteDatastoreItem, deleteDatastoreItems, diagnoseOutputWarning, extractActionAppNames, extractValidatedIngestionApps, extractWorkflowActionAppNames, extractWorkflowAppNames, fetchApps, fetchAppsViaApiConfig, fetchConnectedTools, findForwardTicketsWorkflow, findIngestTicketsWorkflow, getActivePageEntityName, getAgentContextRules, getApiUrl, getAuthHeader, getCachedConnectedTools, getDatastoreByCategory, getDatastoreItem, getDatastoreItemPublic, getDatastorePageSize, getFailureInfo, getHostBaseUrl, getIngestionCategory, getPageContextChoice, hasOutputWarning, installFetchBreaker, invalidateAppsCache, invalidateResolvedApps, isAgentRoute, isCloud, isCloudDomain, isEmailApp, isIngestionApp, isOnprem, isShuffleCloudDomain, isShuffleSecurityBackend, isThreatIntelApp, isVulnScannerApp, isWorkflowScheduleStopped, mapCloudRegionUrl, matchRoutePattern, mergeConnectedTools, normalizeAppName, parseRunResult, refreshAllIntegrationStatus, registerAgentContextRule, registerProtectedOrigin, resetRegionUrl, resolveAgentContext, resolveApp, resolveApps, resolveConnectedTools, resolveVideoUrl, scheduleAgentRun, searchAgentActivity, seedResolvedApp, setCachedConnectedTools, setDatastoreItem, setDatastoreItems, setHostBaseUrl, setPageContextChoice, setRegionUrl, setRuntimeOrgId, setToastImpl, shuffleFetch, toast, useAgentPromptPrefix, useAppAuth, useAppAuthFlow, useAppDetail, useAppDetailOptional, useAppLookup, useContextAwareAgent, useSyncHostBaseUrl };
2392
+ export { AGENT_DRAWER_CLOSE_EVENT, AGENT_DRAWER_OPEN_EVENT, AGENT_DRAWER_STATE_EVENT, AGENT_PRESETS, AGENT_PROMPT_PREFIX_CATEGORY, API_CONFIG, ASK_AI_PANEL_WIDTH_STORAGE_KEY, AddAppModal, type AddAppModalProps, AgentActivityList, type AgentActivityListProps, type AgentActivityParams, type AgentActivityResponse, type AgentContextApp, type AgentContextRule, type AgentDecision, AgentExecutionDrawer, type AgentExecutionDrawerProps, AgentIcon, type AgentLocalModel, type AgentPreset, AgentPresets, type AgentPresetsProps, AgentPromptPrefixChip, type AgentPromptPrefixChipProps, type AgentResolvedContext, 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, type ApiCallConfig, ApiCallViewer, type ApiCallViewerProps, AppAuthCard, type AppAuthCardProps, AppAuthConfig, AppAuthSection, type AppAuthSectionProps, type AppAuthState, type AppAuthentication$1 as AppAuthentication, AppDetailContent, type AppDetailContentProps, AppDetailDrawer, AppDetailProvider, type AppInfo, type AppLookupResult, AppSearchDrawer, type AppSelectedEvent, AppTitleHeader, type AppTitleHeaderProps, AskAiButton, type AskAiButtonProps, AskAiDrawer, type AskAiDrawerProps, AskAiSidePanel, type AskAiSidePanelProps, AskAiWidget, type AskAiWidgetProps, type AuthStatus, CASES_PATTERNS, COMMUNICATION_PATTERNS_NAMES, type CategoryAutomation, type CategoryConfig, type ConnectedToolApp, type CustomStyles, DATASTORE_CATEGORIES, DEFAULT_AGENT_CONTEXT_RULES, DEFAULT_AGENT_PROMPT_PREFIX, DEMO_AGENT_RUNS, 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, MAX_ASK_AI_PANEL_WIDTH, MAX_AUTO_ASSIGNED_TOOLS, MIN_ASK_AI_PANEL_WIDTH, ShuffleMarkdown as Markdown, MarkdownJsonBlock, type OutputDiagnosis, type PageContextChoice, type ResolvedApp, type ResolvedContactUserInfo, SIEM_PATTERNS, type ShuffleHostProps, ShuffleMCP, type ShuffleMCPHandle, type ShuffleMCPProps, ShuffleMarkdown, type ShuffleMcpColorMode, ShuffleMcpThemeProvider, type ShuffleMcpThemeProviderProps, ShufflePipelinesBanner, type ShuffleTheme, SingulActionsPreview, type SupportEscalationContext, THREAT_INTEL_PATTERNS, TryMcpSection, type TryMcpSectionProps, UsageBar, type UsageBarProps, type UseAgentPromptPrefixOptions, VERIFIED_BUILTIN_APPS, VULN_SCANNER_PATTERNS, type ValidatedIngestionApp, VideoEmbed, applyRegionFromPayload, buildSupportEscalationUrl, checkAppNameMatch, clearPageContextChoice, ShuffleMCP as default, deleteDatastoreItem, deleteDatastoreItems, diagnoseOutputWarning, extractActionAppNames, extractValidatedIngestionApps, extractWorkflowActionAppNames, extractWorkflowAppNames, fetchApps, fetchAppsViaApiConfig, fetchConnectedTools, filterItemsByCategory, findForwardTicketsWorkflow, findIngestTicketsWorkflow, getActivePageEntityName, getAgentContextRules, getApiUrl, getAuthHeader, getCachedConnectedTools, getDatastoreByCategory, getDatastoreItem, getDatastoreItemPublic, getDatastorePageSize, getFailureInfo, getHostBaseUrl, getIngestionCategory, getPageContextChoice, hasOutputWarning, installFetchBreaker, invalidateAppsCache, invalidateResolvedApps, isAgentRoute, isCloud, isCloudDomain, isEmailApp, isIngestionApp, isOnprem, isShuffleCloudDomain, isShuffleSecurityBackend, isThreatIntelApp, isVulnScannerApp, isWorkflowScheduleStopped, mapCloudRegionUrl, matchRoutePattern, mergeConnectedTools, normalizeAppName, openSupportEscalation, parseRunResult, refreshAllIntegrationStatus, registerAgentContextRule, registerProtectedOrigin, resetRegionUrl, resolveAgentContext, resolveApp, resolveApps, resolveConnectedTools, resolveContactUserInfo, resolveVideoUrl, scheduleAgentRun, searchAgentActivity, seedResolvedApp, setCachedConnectedTools, setDatastoreItem, setDatastoreItems, setHostBaseUrl, setPageContextChoice, setRegionUrl, setRuntimeOrgId, setToastImpl, shuffleFetch, toast, useAgentPromptPrefix, useAppAuth, useAppAuthFlow, useAppDetail, useAppDetailOptional, useAppLookup, useContextAwareAgent, useSyncHostBaseUrl };