@shuffleio/shuffle-mcps 0.0.17 → 0.0.18

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.mjs CHANGED
@@ -20,6 +20,7 @@ import {
20
20
 
21
21
  // index.ts
22
22
  import "./shuffle-mcp-CN72CJJQ.css";
23
+ import React5 from "react";
23
24
 
24
25
  // ShuffleMcpThemeProvider.tsx
25
26
  import React from "react";
@@ -106,7 +107,7 @@ var useHtmlDarkClass = (enabled) => {
106
107
  };
107
108
  var ShuffleMcpThemeProvider = ({
108
109
  children,
109
- mode = "auto"
110
+ mode = "dark"
110
111
  }) => {
111
112
  const parent = useMuiTheme();
112
113
  const htmlIsDark = useHtmlDarkClass(mode === "auto");
@@ -126,10 +127,11 @@ var ShuffleMcpThemeProvider = ({
126
127
  [parent, effectiveDark]
127
128
  );
128
129
  const tree = /* @__PURE__ */ jsx(ThemeProvider, { theme: merged, children });
130
+ const scopeClassName = mode === "light" ? "shuffle-mcp-scope" : "shuffle-mcp-scope dark";
129
131
  if (mode === "light" || mode === "dark") {
130
- return /* @__PURE__ */ jsx("div", { className: mode === "dark" ? "dark" : "", "data-shuffle-mode": mode, children: tree });
132
+ return /* @__PURE__ */ jsx("div", { className: scopeClassName, "data-shuffle-mode": mode, "data-shuffle-mcp-root": true, children: tree });
131
133
  }
132
- return tree;
134
+ return /* @__PURE__ */ jsx("div", { className: "shuffle-mcp-scope", "data-shuffle-mode": "auto", "data-shuffle-mcp-root": true, children: tree });
133
135
  };
134
136
 
135
137
  // ShuffleMCP.tsx
@@ -5588,19 +5590,32 @@ import "./shuffle-mcp-CN72CJJQ.css";
5588
5590
  import * as React2 from "react";
5589
5591
  import { motion as motion7, LayoutGroup } from "framer-motion";
5590
5592
  import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
5591
- var cn = (...inputs) => inputs.filter(Boolean).join(" ");
5592
- var sizeClasses = {
5593
+ var SIZE = {
5593
5594
  sm: {
5594
- container: "p-0.5 text-[11px]",
5595
- item: "px-2.5 py-1 gap-1.5",
5596
- count: "min-w-[16px] h-[16px] px-1 text-[10px]",
5597
- divider: "h-4 mx-0.5"
5595
+ containerPadding: "2px",
5596
+ fontSize: "11px",
5597
+ itemPaddingY: "4px",
5598
+ itemPaddingX: "10px",
5599
+ itemGap: "6px",
5600
+ countMin: "16px",
5601
+ countH: "16px",
5602
+ countPx: "4px",
5603
+ countFs: "10px",
5604
+ dividerH: "16px",
5605
+ dividerMx: "2px"
5598
5606
  },
5599
5607
  md: {
5600
- container: "p-1 text-xs",
5601
- item: "px-3 py-1.5 gap-1.5",
5602
- count: "min-w-[18px] h-[18px] px-1.5 text-[10px]",
5603
- divider: "h-5 mx-1"
5608
+ containerPadding: "4px",
5609
+ fontSize: "12px",
5610
+ itemPaddingY: "6px",
5611
+ itemPaddingX: "12px",
5612
+ itemGap: "6px",
5613
+ countMin: "18px",
5614
+ countH: "18px",
5615
+ countPx: "6px",
5616
+ countFs: "10px",
5617
+ dividerH: "20px",
5618
+ dividerMx: "4px"
5604
5619
  }
5605
5620
  };
5606
5621
  var uid = 0;
@@ -5624,25 +5639,36 @@ function SegmentedControl({
5624
5639
  }) {
5625
5640
  const autoId = useUniqueId("segmented");
5626
5641
  const groupId = layoutId ?? autoId;
5627
- const s = sizeClasses[size];
5642
+ const s = SIZE[size];
5628
5643
  return /* @__PURE__ */ jsx13(LayoutGroup, { id: groupId, children: /* @__PURE__ */ jsx13(
5629
5644
  "div",
5630
5645
  {
5631
5646
  role: "tablist",
5632
5647
  "aria-label": ariaLabel,
5633
- className: cn(
5634
- "inline-flex items-center gap-0.5 rounded-full",
5635
- variant === "outline" ? "border border-border bg-transparent" : "border border-transparent bg-muted/40",
5636
- s.container,
5637
- className
5638
- ),
5648
+ className,
5649
+ style: {
5650
+ display: "inline-flex",
5651
+ alignItems: "center",
5652
+ gap: "2px",
5653
+ borderRadius: 9999,
5654
+ padding: s.containerPadding,
5655
+ fontSize: s.fontSize,
5656
+ border: variant === "outline" ? "1px solid hsl(var(--border))" : "1px solid transparent",
5657
+ background: variant === "outline" ? "transparent" : "hsl(var(--muted) / 0.4)"
5658
+ },
5639
5659
  children: options.map((opt, i) => {
5640
5660
  if (opt.type === "divider") {
5641
5661
  return /* @__PURE__ */ jsx13(
5642
5662
  "span",
5643
5663
  {
5644
5664
  "aria-hidden": true,
5645
- className: cn("w-px bg-border self-center", s.divider)
5665
+ style: {
5666
+ width: 1,
5667
+ height: s.dividerH,
5668
+ margin: `0 ${s.dividerMx}`,
5669
+ background: "hsl(var(--border))",
5670
+ alignSelf: "center"
5671
+ }
5646
5672
  },
5647
5673
  opt.key ?? `divider-${i}`
5648
5674
  );
@@ -5664,20 +5690,46 @@ function SegmentedControl({
5664
5690
  if (isAction) opt.onClick();
5665
5691
  else onChange(opt.value);
5666
5692
  },
5667
- className: cn(
5668
- "relative inline-flex items-center rounded-full font-medium",
5669
- "transition-colors duration-300",
5670
- "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5671
- s.item,
5672
- active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
5673
- opt.disabled && "opacity-50 cursor-not-allowed"
5674
- ),
5693
+ style: {
5694
+ position: "relative",
5695
+ display: "inline-flex",
5696
+ alignItems: "center",
5697
+ gap: s.itemGap,
5698
+ padding: `${s.itemPaddingY} ${s.itemPaddingX}`,
5699
+ borderRadius: 9999,
5700
+ fontWeight: 500,
5701
+ fontSize: s.fontSize,
5702
+ background: "transparent",
5703
+ border: "none",
5704
+ cursor: opt.disabled ? "not-allowed" : "pointer",
5705
+ color: active ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))",
5706
+ opacity: opt.disabled ? 0.5 : 1,
5707
+ transition: "color 200ms ease",
5708
+ outline: "none",
5709
+ fontFamily: "inherit"
5710
+ },
5711
+ onMouseEnter: (e) => {
5712
+ if (!active && !opt.disabled) {
5713
+ e.currentTarget.style.color = "hsl(var(--foreground))";
5714
+ }
5715
+ },
5716
+ onMouseLeave: (e) => {
5717
+ if (!active && !opt.disabled) {
5718
+ e.currentTarget.style.color = "hsl(var(--muted-foreground))";
5719
+ }
5720
+ },
5675
5721
  children: [
5676
5722
  active && /* @__PURE__ */ jsx13(
5677
5723
  motion7.span,
5678
5724
  {
5679
5725
  layoutId: `${groupId}-pill`,
5680
- className: "absolute inset-0 rounded-full bg-muted border border-border",
5726
+ style: {
5727
+ position: "absolute",
5728
+ inset: 0,
5729
+ borderRadius: 9999,
5730
+ background: "hsl(var(--muted))",
5731
+ border: "1px solid hsl(var(--border))"
5732
+ },
5681
5733
  initial: false,
5682
5734
  transition: {
5683
5735
  type: "spring",
@@ -5686,15 +5738,39 @@ function SegmentedControl({
5686
5738
  }
5687
5739
  }
5688
5740
  ),
5689
- /* @__PURE__ */ jsx13("span", { className: "relative z-10 inline-flex items-center gap-1.5", children: opt.label }),
5741
+ /* @__PURE__ */ jsx13(
5742
+ "span",
5743
+ {
5744
+ style: {
5745
+ position: "relative",
5746
+ zIndex: 1,
5747
+ display: "inline-flex",
5748
+ alignItems: "center",
5749
+ gap: s.itemGap
5750
+ },
5751
+ children: opt.label
5752
+ }
5753
+ ),
5690
5754
  !isAction && typeof opt.count === "number" && /* @__PURE__ */ jsx13(
5691
5755
  "span",
5692
5756
  {
5693
- className: cn(
5694
- "relative z-10 inline-flex items-center justify-center rounded-md font-semibold tabular-nums border border-border/60",
5695
- s.count,
5696
- active ? "bg-transparent text-foreground" : "bg-transparent text-muted-foreground"
5697
- ),
5757
+ style: {
5758
+ position: "relative",
5759
+ zIndex: 1,
5760
+ display: "inline-flex",
5761
+ alignItems: "center",
5762
+ justifyContent: "center",
5763
+ minWidth: s.countMin,
5764
+ height: s.countH,
5765
+ padding: `0 ${s.countPx}`,
5766
+ fontSize: s.countFs,
5767
+ fontWeight: 600,
5768
+ fontVariantNumeric: "tabular-nums",
5769
+ borderRadius: 6,
5770
+ border: "1px solid hsl(var(--border) / 0.6)",
5771
+ color: active ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))",
5772
+ background: "transparent"
5773
+ },
5698
5774
  children: opt.count
5699
5775
  }
5700
5776
  )
@@ -6254,7 +6330,6 @@ var ShuffleMCP = React3.forwardRef(({
6254
6330
  );
6255
6331
  });
6256
6332
  ShuffleMCP.displayName = "ShuffleMCP";
6257
- var ShuffleMCP_default = ShuffleMCP;
6258
6333
 
6259
6334
  // AppSearchDrawer.tsx
6260
6335
  import { useState as useState10, useEffect as useEffect9 } from "react";
@@ -6598,7 +6673,7 @@ function AppSearchDrawer({
6598
6673
  transition: { duration: 0.2 },
6599
6674
  style: { height: "100%", minHeight: 0 },
6600
6675
  children: /* @__PURE__ */ jsx15(
6601
- ShuffleMCP,
6676
+ ShuffleMCP2,
6602
6677
  {
6603
6678
  apiKey: API_CONFIG.apiKey || void 0,
6604
6679
  apiBaseUrl: API_CONFIG.baseUrl,
@@ -6647,7 +6722,7 @@ function AppSearchDrawer({
6647
6722
  }
6648
6723
  ),
6649
6724
  /* @__PURE__ */ jsx15(
6650
- AppDetailDrawer,
6725
+ AppDetailDrawer2,
6651
6726
  {
6652
6727
  open: open && detailAppName !== null,
6653
6728
  onClose: () => {
@@ -8679,6 +8754,8 @@ var AgentUI = ({
8679
8754
  appPickerLabel = "Select Apps",
8680
8755
  appPickerTitle = "Select Apps",
8681
8756
  appPickerSubtitle = "Pick the tools the agent is allowed to use for this run",
8757
+ onChooseLLM,
8758
+ hideChooseLLM = false,
8682
8759
  submitTooltip = "\u2318+Enter to send",
8683
8760
  submitIcon,
8684
8761
  submitOverride,
@@ -10531,15 +10608,25 @@ var AgentUI = ({
10531
10608
  bgcolor: "hsl(var(--card))",
10532
10609
  maxWidth: "100%"
10533
10610
  }, children: [
10534
- /* @__PURE__ */ jsx20(Tooltip9, { title: "Configure the local LLM used for this agent", children: /* @__PURE__ */ jsxs16(
10611
+ !hideChooseLLM && /* @__PURE__ */ jsx20(Tooltip9, { title: "Configure the local LLM used for this agent", children: /* @__PURE__ */ jsxs16(
10535
10612
  Box14,
10536
10613
  {
10537
10614
  component: "button",
10538
10615
  type: "button",
10539
10616
  onClick: () => {
10540
- if (typeof window !== "undefined") {
10541
- window.dispatchEvent(
10542
- new CustomEvent("agent-drawer-open", { detail: { tab: "localLLM" } })
10617
+ if (onChooseLLM) {
10618
+ onChooseLLM();
10619
+ return;
10620
+ }
10621
+ if (typeof window === "undefined") return;
10622
+ const evt = new CustomEvent("agent-drawer-open", {
10623
+ detail: { tab: "localLLM" },
10624
+ cancelable: true
10625
+ });
10626
+ const handled = window.dispatchEvent(evt);
10627
+ if (handled && !window.__shuffleAgentDrawerMounted) {
10628
+ console.warn(
10629
+ '[AgentUI] "Choose LLM" was clicked but no host handler is wired. Pass an `onChooseLLM` prop, mount the bundled `AgentRunDrawer`, or set `hideChooseLLM` to remove the chip.'
10543
10630
  );
10544
10631
  }
10545
10632
  },
@@ -11315,6 +11402,13 @@ var AgentRunDrawer = ({
11315
11402
  if (open && !prevOpenRef.current) setActiveTab(initialTab);
11316
11403
  prevOpenRef.current = open;
11317
11404
  }, [open, initialTab]);
11405
+ useEffect12(() => {
11406
+ if (typeof window === "undefined") return;
11407
+ window.__shuffleAgentDrawerMounted = (window.__shuffleAgentDrawerMounted || 0) + 1;
11408
+ return () => {
11409
+ window.__shuffleAgentDrawerMounted = Math.max(0, (window.__shuffleAgentDrawerMounted || 1) - 1);
11410
+ };
11411
+ }, []);
11318
11412
  const visibleTabs = TAB_ORDER.filter((t) => {
11319
11413
  if (t === "run") return true;
11320
11414
  if (t === "permissions") return !!permissionsSlot;
@@ -12448,7 +12542,7 @@ var AgentExecutionDrawer_default = AgentExecutionDrawer;
12448
12542
  import { useCallback as useCallback10, useState as useState15 } from "react";
12449
12543
  import { Box as Box18, Stack, Typography as Typography17 } from "@mui/material";
12450
12544
  import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
12451
- var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn, userdata, serverside }) => {
12545
+ var AgentsView = ({ onSchedule, maxWidth = 820, onChooseLLM, hideChooseLLM, globalUrl, isLoaded, isLoggedIn, userdata, serverside }) => {
12452
12546
  useSyncHostBaseUrl(globalUrl);
12453
12547
  const [selectedRun, setSelectedRun] = useState15(null);
12454
12548
  const [agentView, setAgentView] = useState15("start");
@@ -12490,8 +12584,8 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
12490
12584
  },
12491
12585
  [editing]
12492
12586
  );
12493
- return /* @__PURE__ */ jsxs20(Box18, { sx: { minHeight: "100vh", width: "100%", px: { xs: 2, md: 4 }, pt: "5vh", pb: 6 }, children: [
12494
- /* @__PURE__ */ jsxs20(Stack, { spacing: 6, sx: { maxWidth, mx: "auto" }, children: [
12587
+ return /* @__PURE__ */ jsxs20(Box18, { sx: { minHeight: "100%", width: "100%", px: { xs: 2, md: 4 }, pt: { xs: 3, md: "5vh" }, pb: 6, boxSizing: "border-box" }, children: [
12588
+ /* @__PURE__ */ jsxs20(Stack, { spacing: 6, sx: { maxWidth, mx: "auto", width: "100%" }, children: [
12495
12589
  editing && /* @__PURE__ */ jsxs20(
12496
12590
  Box18,
12497
12591
  {
@@ -12538,6 +12632,8 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
12538
12632
  apiBaseUrl: globalUrl,
12539
12633
  onViewChange: setAgentView,
12540
12634
  onSchedule,
12635
+ onChooseLLM,
12636
+ hideChooseLLM,
12541
12637
  defaultInput: prefill.input,
12542
12638
  defaultApps: prefill.apps.length > 0 ? prefill.apps : void 0,
12543
12639
  submitOverride: editing ? handleSaveEdit : void 0,
@@ -12548,7 +12644,7 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
12548
12644
  },
12549
12645
  prefill.key
12550
12646
  ),
12551
- agentView === "start" && /* @__PURE__ */ jsx24(Box18, { sx: { pt: "12vh" }, children: /* @__PURE__ */ jsx24(
12647
+ agentView === "start" && /* @__PURE__ */ jsx24(Box18, { sx: { pt: { xs: 4, md: "8vh" } }, children: /* @__PURE__ */ jsx24(
12552
12648
  AgentActivityList_default,
12553
12649
  {
12554
12650
  apiBaseUrl: globalUrl,
@@ -12789,23 +12885,61 @@ var UsageBar = ({
12789
12885
  ) })
12790
12886
  ] }) });
12791
12887
  };
12888
+
12889
+ // index.ts
12890
+ var withMcpTheme = (Inner, displayName) => {
12891
+ const Wrapped = ({ colorMode, ...rest }) => React5.createElement(
12892
+ ShuffleMcpThemeProvider,
12893
+ { mode: colorMode },
12894
+ React5.createElement(Inner, { ...rest })
12895
+ );
12896
+ Wrapped.displayName = `ShuffleMCPs(${displayName})`;
12897
+ return Wrapped;
12898
+ };
12899
+ var withMcpThemeRef = (Inner, displayName) => {
12900
+ const Wrapped = React5.forwardRef(
12901
+ ({ colorMode, ...rest }, ref) => React5.createElement(
12902
+ ShuffleMcpThemeProvider,
12903
+ { mode: colorMode },
12904
+ React5.createElement(Inner, { ...rest, ref })
12905
+ )
12906
+ );
12907
+ Wrapped.displayName = `ShuffleMCPs(${displayName})`;
12908
+ return Wrapped;
12909
+ };
12910
+ var ShuffleMCP2 = withMcpThemeRef(ShuffleMCP, "ShuffleMCP");
12911
+ var index_default = ShuffleMCP2;
12912
+ var AppDetailDrawer2 = withMcpTheme(AppDetailDrawer, "AppDetailDrawer");
12913
+ var AppSearchDrawer2 = withMcpTheme(AppSearchDrawer, "AppSearchDrawer");
12914
+ var AiAgentPromptsEditor2 = withMcpTheme(AiAgentPromptsEditor_default, "AiAgentPromptsEditor");
12915
+ var ShufflePipelinesBanner2 = withMcpTheme(ShufflePipelinesBanner_default, "ShufflePipelinesBanner");
12916
+ var AppTitleHeader2 = withMcpTheme(AppTitleHeader, "AppTitleHeader");
12917
+ var AppAuthSection2 = withMcpTheme(AppAuthSection, "AppAuthSection");
12918
+ var TryMcpSection2 = withMcpTheme(TryMcpSection, "TryMcpSection");
12919
+ var SingulActionsPreview2 = withMcpTheme(SingulActionsPreview_default, "SingulActionsPreview");
12920
+ var AgentUI2 = withMcpTheme(AgentUI_default, "AgentUI");
12921
+ var AgentRunDrawer2 = withMcpTheme(AgentRunDrawer_default, "AgentRunDrawer");
12922
+ var AgentActivityList2 = withMcpTheme(AgentActivityList_default, "AgentActivityList");
12923
+ var AgentExecutionDrawer2 = withMcpTheme(AgentExecutionDrawer_default, "AgentExecutionDrawer");
12924
+ var AgentsView2 = withMcpTheme(AgentsView_default, "AgentsView");
12925
+ var AgentRunDiagnosisBanner2 = withMcpTheme(AgentRunDiagnosisBanner_default, "AgentRunDiagnosisBanner");
12792
12926
  export {
12793
12927
  API_CONFIG,
12794
- AgentActivityList_default as AgentActivityList,
12795
- AgentExecutionDrawer_default as AgentExecutionDrawer,
12928
+ AgentActivityList2 as AgentActivityList,
12929
+ AgentExecutionDrawer2 as AgentExecutionDrawer,
12796
12930
  AgentIcon_default as AgentIcon,
12797
- AgentRunDiagnosisBanner_default as AgentRunDiagnosisBanner,
12798
- AgentRunDrawer_default as AgentRunDrawer,
12799
- AgentUI_default as AgentUI,
12800
- AgentsView_default as AgentsView,
12801
- AiAgentPromptsEditor_default as AiAgentPromptsEditor,
12931
+ AgentRunDiagnosisBanner2 as AgentRunDiagnosisBanner,
12932
+ AgentRunDrawer2 as AgentRunDrawer,
12933
+ AgentUI2 as AgentUI,
12934
+ AgentsView2 as AgentsView,
12935
+ AiAgentPromptsEditor2 as AiAgentPromptsEditor,
12802
12936
  AppAuthCard,
12803
12937
  AppAuthConfig,
12804
- AppAuthSection,
12805
- AppDetailDrawer,
12938
+ AppAuthSection2 as AppAuthSection,
12939
+ AppDetailDrawer2 as AppDetailDrawer,
12806
12940
  AppDetailProvider,
12807
- AppSearchDrawer,
12808
- AppTitleHeader,
12941
+ AppSearchDrawer2 as AppSearchDrawer,
12942
+ AppTitleHeader2 as AppTitleHeader,
12809
12943
  CASES_PATTERNS,
12810
12944
  COMMUNICATION_PATTERNS_NAMES,
12811
12945
  DATASTORE_CATEGORIES,
@@ -12815,15 +12949,15 @@ export {
12815
12949
  INGEST_TICKETS_WORKFLOW_NAME,
12816
12950
  IntegrationStatus,
12817
12951
  SIEM_PATTERNS,
12818
- ShuffleMCP,
12952
+ ShuffleMCP2 as ShuffleMCP,
12819
12953
  ShuffleMcpThemeProvider,
12820
- ShufflePipelinesBanner_default as ShufflePipelinesBanner,
12821
- SingulActionsPreview_default as SingulActionsPreview,
12954
+ ShufflePipelinesBanner2 as ShufflePipelinesBanner,
12955
+ SingulActionsPreview2 as SingulActionsPreview,
12822
12956
  THREAT_INTEL_PATTERNS,
12823
- TryMcpSection,
12957
+ TryMcpSection2 as TryMcpSection,
12824
12958
  UsageBar,
12825
12959
  VULN_SCANNER_PATTERNS,
12826
- ShuffleMCP_default as default,
12960
+ index_default as default,
12827
12961
  deleteDatastoreItem,
12828
12962
  deleteDatastoreItems,
12829
12963
  diagnoseOutputWarning,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuffleio/shuffle-mcps",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Turn 3,000+ SaaS tools into MCP servers your agents can use. Headless React component for search, selection, and OAuth handoff.",
5
5
  "license": "MIT",
6
6
  "repository": {