@shuffleio/shuffle-mcps 0.0.17 → 0.0.20
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.mts +85 -167
- package/dist/index.d.ts +85 -167
- package/dist/index.js +292 -83
- package/dist/index.mjs +297 -88
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -20,12 +20,30 @@ 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";
|
|
26
27
|
import { ThemeProvider, createTheme, useTheme as useMuiTheme } from "@mui/material";
|
|
27
28
|
import { jsx } from "react/jsx-runtime";
|
|
28
|
-
var
|
|
29
|
+
var readHtmlDarkClass = () => {
|
|
30
|
+
if (typeof document === "undefined") return false;
|
|
31
|
+
return document.documentElement.classList.contains("dark");
|
|
32
|
+
};
|
|
33
|
+
var useHtmlDarkClass = (enabled) => {
|
|
34
|
+
const [isDark, setIsDark] = React.useState(() => enabled ? readHtmlDarkClass() : false);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
if (!enabled || typeof document === "undefined") return;
|
|
37
|
+
setIsDark(readHtmlDarkClass());
|
|
38
|
+
const observer = new MutationObserver(() => setIsDark(readHtmlDarkClass()));
|
|
39
|
+
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
|
|
40
|
+
return () => observer.disconnect();
|
|
41
|
+
}, [enabled]);
|
|
42
|
+
return isDark;
|
|
43
|
+
};
|
|
44
|
+
var ShuffleMcpThemeContext = React.createContext(null);
|
|
45
|
+
var useShuffleMcpTheme = () => React.useContext(ShuffleMcpThemeContext);
|
|
46
|
+
var buildComponentOverrides = (scopeClassName) => ({
|
|
29
47
|
MuiTextField: { defaultProps: { size: "small" } },
|
|
30
48
|
MuiButton: { defaultProps: { size: "small" } },
|
|
31
49
|
MuiFormControl: { defaultProps: { size: "small" } },
|
|
@@ -67,7 +85,15 @@ var componentOverrides = {
|
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
87
|
},
|
|
88
|
+
// ---- Portaled surfaces: stamp scopeClassName so HSL tokens resolve ----
|
|
89
|
+
MuiDrawer: {
|
|
90
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName } } }
|
|
91
|
+
},
|
|
92
|
+
MuiDialog: {
|
|
93
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName } } }
|
|
94
|
+
},
|
|
70
95
|
MuiMenu: {
|
|
96
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName } } },
|
|
71
97
|
styleOverrides: {
|
|
72
98
|
paper: {
|
|
73
99
|
backgroundColor: "hsl(var(--popover))",
|
|
@@ -77,6 +103,7 @@ var componentOverrides = {
|
|
|
77
103
|
}
|
|
78
104
|
},
|
|
79
105
|
MuiPopover: {
|
|
106
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName } } },
|
|
80
107
|
styleOverrides: {
|
|
81
108
|
paper: {
|
|
82
109
|
backgroundColor: "hsl(var(--popover))",
|
|
@@ -85,32 +112,23 @@ var componentOverrides = {
|
|
|
85
112
|
}
|
|
86
113
|
}
|
|
87
114
|
},
|
|
115
|
+
MuiTooltip: {
|
|
116
|
+
defaultProps: { slotProps: { tooltip: { className: scopeClassName } } }
|
|
117
|
+
},
|
|
88
118
|
MuiDivider: {
|
|
89
119
|
styleOverrides: { root: { borderColor: "hsl(var(--border))" } }
|
|
90
120
|
}
|
|
91
|
-
};
|
|
92
|
-
var readHtmlDarkClass = () => {
|
|
93
|
-
if (typeof document === "undefined") return false;
|
|
94
|
-
return document.documentElement.classList.contains("dark");
|
|
95
|
-
};
|
|
96
|
-
var useHtmlDarkClass = (enabled) => {
|
|
97
|
-
const [isDark, setIsDark] = React.useState(() => enabled ? readHtmlDarkClass() : false);
|
|
98
|
-
React.useEffect(() => {
|
|
99
|
-
if (!enabled || typeof document === "undefined") return;
|
|
100
|
-
setIsDark(readHtmlDarkClass());
|
|
101
|
-
const observer = new MutationObserver(() => setIsDark(readHtmlDarkClass()));
|
|
102
|
-
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
|
|
103
|
-
return () => observer.disconnect();
|
|
104
|
-
}, [enabled]);
|
|
105
|
-
return isDark;
|
|
106
|
-
};
|
|
121
|
+
});
|
|
107
122
|
var ShuffleMcpThemeProvider = ({
|
|
108
123
|
children,
|
|
109
124
|
mode = "auto"
|
|
110
125
|
}) => {
|
|
111
126
|
const parent = useMuiTheme();
|
|
127
|
+
const parentCtx = useShuffleMcpTheme();
|
|
112
128
|
const htmlIsDark = useHtmlDarkClass(mode === "auto");
|
|
113
129
|
const effectiveDark = mode === "auto" ? htmlIsDark : mode === "dark";
|
|
130
|
+
const sameAsParent = parentCtx !== null && parentCtx.isDark === effectiveDark;
|
|
131
|
+
const scopeClassName = effectiveDark ? "shuffle-mcp-scope dark" : "shuffle-mcp-scope";
|
|
114
132
|
const merged = React.useMemo(
|
|
115
133
|
() => createTheme({
|
|
116
134
|
...parent,
|
|
@@ -120,16 +138,19 @@ var ShuffleMcpThemeProvider = ({
|
|
|
120
138
|
},
|
|
121
139
|
components: {
|
|
122
140
|
...parent.components,
|
|
123
|
-
...
|
|
141
|
+
...buildComponentOverrides(scopeClassName)
|
|
124
142
|
}
|
|
125
143
|
}),
|
|
126
|
-
[parent, effectiveDark]
|
|
144
|
+
[parent, effectiveDark, scopeClassName]
|
|
145
|
+
);
|
|
146
|
+
const ctxValue = React.useMemo(
|
|
147
|
+
() => ({ mode, isDark: effectiveDark, scopeClassName }),
|
|
148
|
+
[mode, effectiveDark, scopeClassName]
|
|
127
149
|
);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return /* @__PURE__ */ jsx("div", { className: mode === "dark" ? "dark" : "", "data-shuffle-mode": mode, children: tree });
|
|
150
|
+
if (sameAsParent) {
|
|
151
|
+
return /* @__PURE__ */ jsx(ShuffleMcpThemeContext.Provider, { value: ctxValue, children });
|
|
131
152
|
}
|
|
132
|
-
return
|
|
153
|
+
return /* @__PURE__ */ jsx(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx(ThemeProvider, { theme: merged, children: /* @__PURE__ */ jsx("div", { className: scopeClassName, "data-shuffle-mode": mode, "data-shuffle-mcp-root": true, children }) }) });
|
|
133
154
|
};
|
|
134
155
|
|
|
135
156
|
// ShuffleMCP.tsx
|
|
@@ -5588,19 +5609,32 @@ import "./shuffle-mcp-CN72CJJQ.css";
|
|
|
5588
5609
|
import * as React2 from "react";
|
|
5589
5610
|
import { motion as motion7, LayoutGroup } from "framer-motion";
|
|
5590
5611
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5591
|
-
var
|
|
5592
|
-
var sizeClasses = {
|
|
5612
|
+
var SIZE = {
|
|
5593
5613
|
sm: {
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5614
|
+
containerPadding: "2px",
|
|
5615
|
+
fontSize: "11px",
|
|
5616
|
+
itemPaddingY: "4px",
|
|
5617
|
+
itemPaddingX: "10px",
|
|
5618
|
+
itemGap: "6px",
|
|
5619
|
+
countMin: "16px",
|
|
5620
|
+
countH: "16px",
|
|
5621
|
+
countPx: "4px",
|
|
5622
|
+
countFs: "10px",
|
|
5623
|
+
dividerH: "16px",
|
|
5624
|
+
dividerMx: "2px"
|
|
5598
5625
|
},
|
|
5599
5626
|
md: {
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5627
|
+
containerPadding: "4px",
|
|
5628
|
+
fontSize: "12px",
|
|
5629
|
+
itemPaddingY: "6px",
|
|
5630
|
+
itemPaddingX: "12px",
|
|
5631
|
+
itemGap: "6px",
|
|
5632
|
+
countMin: "18px",
|
|
5633
|
+
countH: "18px",
|
|
5634
|
+
countPx: "6px",
|
|
5635
|
+
countFs: "10px",
|
|
5636
|
+
dividerH: "20px",
|
|
5637
|
+
dividerMx: "4px"
|
|
5604
5638
|
}
|
|
5605
5639
|
};
|
|
5606
5640
|
var uid = 0;
|
|
@@ -5624,25 +5658,36 @@ function SegmentedControl({
|
|
|
5624
5658
|
}) {
|
|
5625
5659
|
const autoId = useUniqueId("segmented");
|
|
5626
5660
|
const groupId = layoutId ?? autoId;
|
|
5627
|
-
const s =
|
|
5661
|
+
const s = SIZE[size];
|
|
5628
5662
|
return /* @__PURE__ */ jsx13(LayoutGroup, { id: groupId, children: /* @__PURE__ */ jsx13(
|
|
5629
5663
|
"div",
|
|
5630
5664
|
{
|
|
5631
5665
|
role: "tablist",
|
|
5632
5666
|
"aria-label": ariaLabel,
|
|
5633
|
-
className
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5667
|
+
className,
|
|
5668
|
+
style: {
|
|
5669
|
+
display: "inline-flex",
|
|
5670
|
+
alignItems: "center",
|
|
5671
|
+
gap: "2px",
|
|
5672
|
+
borderRadius: 9999,
|
|
5673
|
+
padding: s.containerPadding,
|
|
5674
|
+
fontSize: s.fontSize,
|
|
5675
|
+
border: variant === "outline" ? "1px solid hsl(var(--border))" : "1px solid transparent",
|
|
5676
|
+
background: variant === "outline" ? "transparent" : "hsl(var(--muted) / 0.4)"
|
|
5677
|
+
},
|
|
5639
5678
|
children: options.map((opt, i) => {
|
|
5640
5679
|
if (opt.type === "divider") {
|
|
5641
5680
|
return /* @__PURE__ */ jsx13(
|
|
5642
5681
|
"span",
|
|
5643
5682
|
{
|
|
5644
5683
|
"aria-hidden": true,
|
|
5645
|
-
|
|
5684
|
+
style: {
|
|
5685
|
+
width: 1,
|
|
5686
|
+
height: s.dividerH,
|
|
5687
|
+
margin: `0 ${s.dividerMx}`,
|
|
5688
|
+
background: "hsl(var(--border))",
|
|
5689
|
+
alignSelf: "center"
|
|
5690
|
+
}
|
|
5646
5691
|
},
|
|
5647
5692
|
opt.key ?? `divider-${i}`
|
|
5648
5693
|
);
|
|
@@ -5664,20 +5709,46 @@ function SegmentedControl({
|
|
|
5664
5709
|
if (isAction) opt.onClick();
|
|
5665
5710
|
else onChange(opt.value);
|
|
5666
5711
|
},
|
|
5667
|
-
|
|
5668
|
-
"relative
|
|
5669
|
-
"
|
|
5670
|
-
|
|
5671
|
-
s.
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5712
|
+
style: {
|
|
5713
|
+
position: "relative",
|
|
5714
|
+
display: "inline-flex",
|
|
5715
|
+
alignItems: "center",
|
|
5716
|
+
gap: s.itemGap,
|
|
5717
|
+
padding: `${s.itemPaddingY} ${s.itemPaddingX}`,
|
|
5718
|
+
borderRadius: 9999,
|
|
5719
|
+
fontWeight: 500,
|
|
5720
|
+
fontSize: s.fontSize,
|
|
5721
|
+
background: "transparent",
|
|
5722
|
+
border: "none",
|
|
5723
|
+
cursor: opt.disabled ? "not-allowed" : "pointer",
|
|
5724
|
+
color: active ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))",
|
|
5725
|
+
opacity: opt.disabled ? 0.5 : 1,
|
|
5726
|
+
transition: "color 200ms ease",
|
|
5727
|
+
outline: "none",
|
|
5728
|
+
fontFamily: "inherit"
|
|
5729
|
+
},
|
|
5730
|
+
onMouseEnter: (e) => {
|
|
5731
|
+
if (!active && !opt.disabled) {
|
|
5732
|
+
e.currentTarget.style.color = "hsl(var(--foreground))";
|
|
5733
|
+
}
|
|
5734
|
+
},
|
|
5735
|
+
onMouseLeave: (e) => {
|
|
5736
|
+
if (!active && !opt.disabled) {
|
|
5737
|
+
e.currentTarget.style.color = "hsl(var(--muted-foreground))";
|
|
5738
|
+
}
|
|
5739
|
+
},
|
|
5675
5740
|
children: [
|
|
5676
5741
|
active && /* @__PURE__ */ jsx13(
|
|
5677
5742
|
motion7.span,
|
|
5678
5743
|
{
|
|
5679
5744
|
layoutId: `${groupId}-pill`,
|
|
5680
|
-
|
|
5745
|
+
style: {
|
|
5746
|
+
position: "absolute",
|
|
5747
|
+
inset: 0,
|
|
5748
|
+
borderRadius: 9999,
|
|
5749
|
+
background: "hsl(var(--muted))",
|
|
5750
|
+
border: "1px solid hsl(var(--border))"
|
|
5751
|
+
},
|
|
5681
5752
|
initial: false,
|
|
5682
5753
|
transition: {
|
|
5683
5754
|
type: "spring",
|
|
@@ -5686,15 +5757,39 @@ function SegmentedControl({
|
|
|
5686
5757
|
}
|
|
5687
5758
|
}
|
|
5688
5759
|
),
|
|
5689
|
-
/* @__PURE__ */ jsx13(
|
|
5760
|
+
/* @__PURE__ */ jsx13(
|
|
5761
|
+
"span",
|
|
5762
|
+
{
|
|
5763
|
+
style: {
|
|
5764
|
+
position: "relative",
|
|
5765
|
+
zIndex: 1,
|
|
5766
|
+
display: "inline-flex",
|
|
5767
|
+
alignItems: "center",
|
|
5768
|
+
gap: s.itemGap
|
|
5769
|
+
},
|
|
5770
|
+
children: opt.label
|
|
5771
|
+
}
|
|
5772
|
+
),
|
|
5690
5773
|
!isAction && typeof opt.count === "number" && /* @__PURE__ */ jsx13(
|
|
5691
5774
|
"span",
|
|
5692
5775
|
{
|
|
5693
|
-
|
|
5694
|
-
"relative
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5776
|
+
style: {
|
|
5777
|
+
position: "relative",
|
|
5778
|
+
zIndex: 1,
|
|
5779
|
+
display: "inline-flex",
|
|
5780
|
+
alignItems: "center",
|
|
5781
|
+
justifyContent: "center",
|
|
5782
|
+
minWidth: s.countMin,
|
|
5783
|
+
height: s.countH,
|
|
5784
|
+
padding: `0 ${s.countPx}`,
|
|
5785
|
+
fontSize: s.countFs,
|
|
5786
|
+
fontWeight: 600,
|
|
5787
|
+
fontVariantNumeric: "tabular-nums",
|
|
5788
|
+
borderRadius: 6,
|
|
5789
|
+
border: "1px solid hsl(var(--border) / 0.6)",
|
|
5790
|
+
color: active ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))",
|
|
5791
|
+
background: "transparent"
|
|
5792
|
+
},
|
|
5698
5793
|
children: opt.count
|
|
5699
5794
|
}
|
|
5700
5795
|
)
|
|
@@ -6254,7 +6349,6 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6254
6349
|
);
|
|
6255
6350
|
});
|
|
6256
6351
|
ShuffleMCP.displayName = "ShuffleMCP";
|
|
6257
|
-
var ShuffleMCP_default = ShuffleMCP;
|
|
6258
6352
|
|
|
6259
6353
|
// AppSearchDrawer.tsx
|
|
6260
6354
|
import { useState as useState10, useEffect as useEffect9 } from "react";
|
|
@@ -6598,7 +6692,7 @@ function AppSearchDrawer({
|
|
|
6598
6692
|
transition: { duration: 0.2 },
|
|
6599
6693
|
style: { height: "100%", minHeight: 0 },
|
|
6600
6694
|
children: /* @__PURE__ */ jsx15(
|
|
6601
|
-
|
|
6695
|
+
ShuffleMCP2,
|
|
6602
6696
|
{
|
|
6603
6697
|
apiKey: API_CONFIG.apiKey || void 0,
|
|
6604
6698
|
apiBaseUrl: API_CONFIG.baseUrl,
|
|
@@ -6647,7 +6741,7 @@ function AppSearchDrawer({
|
|
|
6647
6741
|
}
|
|
6648
6742
|
),
|
|
6649
6743
|
/* @__PURE__ */ jsx15(
|
|
6650
|
-
|
|
6744
|
+
AppDetailDrawer2,
|
|
6651
6745
|
{
|
|
6652
6746
|
open: open && detailAppName !== null,
|
|
6653
6747
|
onClose: () => {
|
|
@@ -8679,6 +8773,8 @@ var AgentUI = ({
|
|
|
8679
8773
|
appPickerLabel = "Select Apps",
|
|
8680
8774
|
appPickerTitle = "Select Apps",
|
|
8681
8775
|
appPickerSubtitle = "Pick the tools the agent is allowed to use for this run",
|
|
8776
|
+
onChooseLLM,
|
|
8777
|
+
hideChooseLLM = false,
|
|
8682
8778
|
submitTooltip = "\u2318+Enter to send",
|
|
8683
8779
|
submitIcon,
|
|
8684
8780
|
submitOverride,
|
|
@@ -10531,15 +10627,25 @@ var AgentUI = ({
|
|
|
10531
10627
|
bgcolor: "hsl(var(--card))",
|
|
10532
10628
|
maxWidth: "100%"
|
|
10533
10629
|
}, children: [
|
|
10534
|
-
/* @__PURE__ */ jsx20(Tooltip9, { title: "Configure the local LLM used for this agent", children: /* @__PURE__ */ jsxs16(
|
|
10630
|
+
!hideChooseLLM && /* @__PURE__ */ jsx20(Tooltip9, { title: "Configure the local LLM used for this agent", children: /* @__PURE__ */ jsxs16(
|
|
10535
10631
|
Box14,
|
|
10536
10632
|
{
|
|
10537
10633
|
component: "button",
|
|
10538
10634
|
type: "button",
|
|
10539
10635
|
onClick: () => {
|
|
10540
|
-
if (
|
|
10541
|
-
|
|
10542
|
-
|
|
10636
|
+
if (onChooseLLM) {
|
|
10637
|
+
onChooseLLM();
|
|
10638
|
+
return;
|
|
10639
|
+
}
|
|
10640
|
+
if (typeof window === "undefined") return;
|
|
10641
|
+
const evt = new CustomEvent("agent-drawer-open", {
|
|
10642
|
+
detail: { tab: "localLLM" },
|
|
10643
|
+
cancelable: true
|
|
10644
|
+
});
|
|
10645
|
+
const handled = window.dispatchEvent(evt);
|
|
10646
|
+
if (handled && !window.__shuffleAgentDrawerMounted) {
|
|
10647
|
+
console.warn(
|
|
10648
|
+
'[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
10649
|
);
|
|
10544
10650
|
}
|
|
10545
10651
|
},
|
|
@@ -11315,6 +11421,13 @@ var AgentRunDrawer = ({
|
|
|
11315
11421
|
if (open && !prevOpenRef.current) setActiveTab(initialTab);
|
|
11316
11422
|
prevOpenRef.current = open;
|
|
11317
11423
|
}, [open, initialTab]);
|
|
11424
|
+
useEffect12(() => {
|
|
11425
|
+
if (typeof window === "undefined") return;
|
|
11426
|
+
window.__shuffleAgentDrawerMounted = (window.__shuffleAgentDrawerMounted || 0) + 1;
|
|
11427
|
+
return () => {
|
|
11428
|
+
window.__shuffleAgentDrawerMounted = Math.max(0, (window.__shuffleAgentDrawerMounted || 1) - 1);
|
|
11429
|
+
};
|
|
11430
|
+
}, []);
|
|
11318
11431
|
const visibleTabs = TAB_ORDER.filter((t) => {
|
|
11319
11432
|
if (t === "run") return true;
|
|
11320
11433
|
if (t === "permissions") return !!permissionsSlot;
|
|
@@ -12445,10 +12558,22 @@ var AgentExecutionDrawer = ({
|
|
|
12445
12558
|
var AgentExecutionDrawer_default = AgentExecutionDrawer;
|
|
12446
12559
|
|
|
12447
12560
|
// AgentsView.tsx
|
|
12448
|
-
import { useCallback as useCallback10, useState as useState15 } from "react";
|
|
12561
|
+
import { useCallback as useCallback10, useMemo as useMemo7, useState as useState15 } from "react";
|
|
12449
12562
|
import { Box as Box18, Stack, Typography as Typography17 } from "@mui/material";
|
|
12450
12563
|
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
12451
|
-
var AgentsView = ({
|
|
12564
|
+
var AgentsView = ({
|
|
12565
|
+
onSchedule,
|
|
12566
|
+
maxWidth = 820,
|
|
12567
|
+
onChooseLLM,
|
|
12568
|
+
hideChooseLLM,
|
|
12569
|
+
localLLMSlot,
|
|
12570
|
+
permissionsSlot,
|
|
12571
|
+
globalUrl,
|
|
12572
|
+
isLoaded,
|
|
12573
|
+
isLoggedIn,
|
|
12574
|
+
userdata,
|
|
12575
|
+
serverside
|
|
12576
|
+
}) => {
|
|
12452
12577
|
useSyncHostBaseUrl(globalUrl);
|
|
12453
12578
|
const [selectedRun, setSelectedRun] = useState15(null);
|
|
12454
12579
|
const [agentView, setAgentView] = useState15("start");
|
|
@@ -12458,6 +12583,33 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
|
|
|
12458
12583
|
key: 0
|
|
12459
12584
|
});
|
|
12460
12585
|
const [editing, setEditing] = useState15(null);
|
|
12586
|
+
const [builtInDrawer, setBuiltInDrawer] = useState15({
|
|
12587
|
+
open: false,
|
|
12588
|
+
tab: "localLLM"
|
|
12589
|
+
});
|
|
12590
|
+
const effectiveLocalLLMSlot = useMemo7(
|
|
12591
|
+
() => localLLMSlot ?? /* @__PURE__ */ jsxs20(Box18, { sx: { p: 3, color: "hsl(var(--muted-foreground))", fontSize: "0.85rem", lineHeight: 1.6 }, children: [
|
|
12592
|
+
/* @__PURE__ */ jsx24(Typography17, { sx: { fontSize: "0.95rem", fontWeight: 600, color: "hsl(var(--foreground))", mb: 1 }, children: "Local LLM not configured" }),
|
|
12593
|
+
"This host hasn't wired a Local LLM picker yet. Pass an",
|
|
12594
|
+
" ",
|
|
12595
|
+
/* @__PURE__ */ jsx24("code", { style: { fontFamily: "monospace" }, children: "onChooseLLM" }),
|
|
12596
|
+
" handler or a",
|
|
12597
|
+
" ",
|
|
12598
|
+
/* @__PURE__ */ jsx24("code", { style: { fontFamily: "monospace" }, children: "localLLMSlot" }),
|
|
12599
|
+
" to",
|
|
12600
|
+
" ",
|
|
12601
|
+
/* @__PURE__ */ jsx24("code", { style: { fontFamily: "monospace" }, children: "<AgentsView />" }),
|
|
12602
|
+
" to render your own configuration UI here."
|
|
12603
|
+
] }),
|
|
12604
|
+
[localLLMSlot]
|
|
12605
|
+
);
|
|
12606
|
+
const handleChooseLLM = useCallback10(() => {
|
|
12607
|
+
if (onChooseLLM) {
|
|
12608
|
+
onChooseLLM();
|
|
12609
|
+
return;
|
|
12610
|
+
}
|
|
12611
|
+
setBuiltInDrawer({ open: true, tab: "localLLM" });
|
|
12612
|
+
}, [onChooseLLM]);
|
|
12461
12613
|
const handleEditWorkflow = useCallback10(
|
|
12462
12614
|
({ workflowId, name, prompt, apps }) => {
|
|
12463
12615
|
setEditing({ workflowId, name });
|
|
@@ -12490,8 +12642,8 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
|
|
|
12490
12642
|
},
|
|
12491
12643
|
[editing]
|
|
12492
12644
|
);
|
|
12493
|
-
return /* @__PURE__ */ jsxs20(Box18, { sx: { minHeight: "
|
|
12494
|
-
/* @__PURE__ */ jsxs20(Stack, { spacing: 6, sx: { maxWidth, mx: "auto" }, children: [
|
|
12645
|
+
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: [
|
|
12646
|
+
/* @__PURE__ */ jsxs20(Stack, { spacing: 6, sx: { maxWidth, mx: "auto", width: "100%" }, children: [
|
|
12495
12647
|
editing && /* @__PURE__ */ jsxs20(
|
|
12496
12648
|
Box18,
|
|
12497
12649
|
{
|
|
@@ -12538,6 +12690,8 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
|
|
|
12538
12690
|
apiBaseUrl: globalUrl,
|
|
12539
12691
|
onViewChange: setAgentView,
|
|
12540
12692
|
onSchedule,
|
|
12693
|
+
onChooseLLM: handleChooseLLM,
|
|
12694
|
+
hideChooseLLM,
|
|
12541
12695
|
defaultInput: prefill.input,
|
|
12542
12696
|
defaultApps: prefill.apps.length > 0 ? prefill.apps : void 0,
|
|
12543
12697
|
submitOverride: editing ? handleSaveEdit : void 0,
|
|
@@ -12548,7 +12702,7 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
|
|
|
12548
12702
|
},
|
|
12549
12703
|
prefill.key
|
|
12550
12704
|
),
|
|
12551
|
-
agentView === "start" && /* @__PURE__ */ jsx24(Box18, { sx: { pt: "
|
|
12705
|
+
agentView === "start" && /* @__PURE__ */ jsx24(Box18, { sx: { pt: { xs: 4, md: "8vh" } }, children: /* @__PURE__ */ jsx24(
|
|
12552
12706
|
AgentActivityList_default,
|
|
12553
12707
|
{
|
|
12554
12708
|
apiBaseUrl: globalUrl,
|
|
@@ -12566,13 +12720,25 @@ var AgentsView = ({ onSchedule, maxWidth = 820, globalUrl, isLoaded, isLoggedIn,
|
|
|
12566
12720
|
apiBaseUrl: globalUrl,
|
|
12567
12721
|
onSchedule
|
|
12568
12722
|
}
|
|
12723
|
+
),
|
|
12724
|
+
/* @__PURE__ */ jsx24(
|
|
12725
|
+
AgentRunDrawer_default,
|
|
12726
|
+
{
|
|
12727
|
+
open: builtInDrawer.open,
|
|
12728
|
+
onClose: () => setBuiltInDrawer((s) => ({ ...s, open: false })),
|
|
12729
|
+
initialTab: builtInDrawer.tab,
|
|
12730
|
+
globalUrl,
|
|
12731
|
+
localLLMSlot: effectiveLocalLLMSlot,
|
|
12732
|
+
permissionsSlot,
|
|
12733
|
+
agentUIProps: { onSchedule, apiBaseUrl: globalUrl }
|
|
12734
|
+
}
|
|
12569
12735
|
)
|
|
12570
12736
|
] });
|
|
12571
12737
|
};
|
|
12572
12738
|
var AgentsView_default = AgentsView;
|
|
12573
12739
|
|
|
12574
12740
|
// useAppLookup.ts
|
|
12575
|
-
import { useEffect as useEffect14, useMemo as
|
|
12741
|
+
import { useEffect as useEffect14, useMemo as useMemo8, useState as useState16 } from "react";
|
|
12576
12742
|
var norm3 = (s) => s.toLowerCase().replace(/[\s_\-]+/g, "_");
|
|
12577
12743
|
function useAppLookup(appName) {
|
|
12578
12744
|
const [loading, setLoading] = useState16(false);
|
|
@@ -12665,13 +12831,13 @@ function useAppLookup(appName) {
|
|
|
12665
12831
|
setLoading(false);
|
|
12666
12832
|
})();
|
|
12667
12833
|
}, [appName]);
|
|
12668
|
-
const matchingEntries =
|
|
12834
|
+
const matchingEntries = useMemo8(() => {
|
|
12669
12835
|
if (!appName) return [];
|
|
12670
12836
|
return authenticatedApps.filter(
|
|
12671
12837
|
(auth) => auth.app?.name && norm3(auth.app.name) === norm3(appName)
|
|
12672
12838
|
);
|
|
12673
12839
|
}, [appName, authenticatedApps]);
|
|
12674
|
-
const image =
|
|
12840
|
+
const image = useMemo8(() => {
|
|
12675
12841
|
if (info?.image) return info.image;
|
|
12676
12842
|
for (const entry of matchingEntries) {
|
|
12677
12843
|
const img = entry.app?.large_image || entry.large_image;
|
|
@@ -12679,7 +12845,7 @@ function useAppLookup(appName) {
|
|
|
12679
12845
|
}
|
|
12680
12846
|
return "";
|
|
12681
12847
|
}, [info, matchingEntries]);
|
|
12682
|
-
const algoliaApp =
|
|
12848
|
+
const algoliaApp = useMemo8(() => {
|
|
12683
12849
|
if (!appName) return null;
|
|
12684
12850
|
return {
|
|
12685
12851
|
objectID: algoliaId || appName,
|
|
@@ -12789,23 +12955,66 @@ var UsageBar = ({
|
|
|
12789
12955
|
) })
|
|
12790
12956
|
] }) });
|
|
12791
12957
|
};
|
|
12958
|
+
|
|
12959
|
+
// index.ts
|
|
12960
|
+
var resolveMode = (theme, colorMode) => {
|
|
12961
|
+
if (theme === "light" || theme === "dark") return theme;
|
|
12962
|
+
if (theme === "system") return "auto";
|
|
12963
|
+
return colorMode ?? "auto";
|
|
12964
|
+
};
|
|
12965
|
+
var withMcpTheme = (Inner, displayName) => {
|
|
12966
|
+
const Wrapped = ({ theme, colorMode, ...rest }) => React5.createElement(
|
|
12967
|
+
ShuffleMcpThemeProvider,
|
|
12968
|
+
{ mode: resolveMode(theme, colorMode) },
|
|
12969
|
+
React5.createElement(Inner, { ...rest })
|
|
12970
|
+
);
|
|
12971
|
+
Wrapped.displayName = `ShuffleMCPs(${displayName})`;
|
|
12972
|
+
return Wrapped;
|
|
12973
|
+
};
|
|
12974
|
+
var withMcpThemeRef = (Inner, displayName) => {
|
|
12975
|
+
const Wrapped = React5.forwardRef(
|
|
12976
|
+
({ theme, colorMode, ...rest }, ref) => React5.createElement(
|
|
12977
|
+
ShuffleMcpThemeProvider,
|
|
12978
|
+
{ mode: resolveMode(theme, colorMode) },
|
|
12979
|
+
React5.createElement(Inner, { ...rest, ref })
|
|
12980
|
+
)
|
|
12981
|
+
);
|
|
12982
|
+
Wrapped.displayName = `ShuffleMCPs(${displayName})`;
|
|
12983
|
+
return Wrapped;
|
|
12984
|
+
};
|
|
12985
|
+
var ShuffleMCP2 = withMcpThemeRef(ShuffleMCP, "ShuffleMCP");
|
|
12986
|
+
var index_default = ShuffleMCP2;
|
|
12987
|
+
var AppDetailDrawer2 = withMcpTheme(AppDetailDrawer, "AppDetailDrawer");
|
|
12988
|
+
var AppSearchDrawer2 = withMcpTheme(AppSearchDrawer, "AppSearchDrawer");
|
|
12989
|
+
var AiAgentPromptsEditor2 = withMcpTheme(AiAgentPromptsEditor_default, "AiAgentPromptsEditor");
|
|
12990
|
+
var ShufflePipelinesBanner2 = withMcpTheme(ShufflePipelinesBanner_default, "ShufflePipelinesBanner");
|
|
12991
|
+
var AppTitleHeader2 = withMcpTheme(AppTitleHeader, "AppTitleHeader");
|
|
12992
|
+
var AppAuthSection2 = withMcpTheme(AppAuthSection, "AppAuthSection");
|
|
12993
|
+
var TryMcpSection2 = withMcpTheme(TryMcpSection, "TryMcpSection");
|
|
12994
|
+
var SingulActionsPreview2 = withMcpTheme(SingulActionsPreview_default, "SingulActionsPreview");
|
|
12995
|
+
var AgentUI2 = withMcpTheme(AgentUI_default, "AgentUI");
|
|
12996
|
+
var AgentRunDrawer2 = withMcpTheme(AgentRunDrawer_default, "AgentRunDrawer");
|
|
12997
|
+
var AgentActivityList2 = withMcpTheme(AgentActivityList_default, "AgentActivityList");
|
|
12998
|
+
var AgentExecutionDrawer2 = withMcpTheme(AgentExecutionDrawer_default, "AgentExecutionDrawer");
|
|
12999
|
+
var AgentsView2 = withMcpTheme(AgentsView_default, "AgentsView");
|
|
13000
|
+
var AgentRunDiagnosisBanner2 = withMcpTheme(AgentRunDiagnosisBanner_default, "AgentRunDiagnosisBanner");
|
|
12792
13001
|
export {
|
|
12793
13002
|
API_CONFIG,
|
|
12794
|
-
|
|
12795
|
-
|
|
13003
|
+
AgentActivityList2 as AgentActivityList,
|
|
13004
|
+
AgentExecutionDrawer2 as AgentExecutionDrawer,
|
|
12796
13005
|
AgentIcon_default as AgentIcon,
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
13006
|
+
AgentRunDiagnosisBanner2 as AgentRunDiagnosisBanner,
|
|
13007
|
+
AgentRunDrawer2 as AgentRunDrawer,
|
|
13008
|
+
AgentUI2 as AgentUI,
|
|
13009
|
+
AgentsView2 as AgentsView,
|
|
13010
|
+
AiAgentPromptsEditor2 as AiAgentPromptsEditor,
|
|
12802
13011
|
AppAuthCard,
|
|
12803
13012
|
AppAuthConfig,
|
|
12804
|
-
AppAuthSection,
|
|
12805
|
-
AppDetailDrawer,
|
|
13013
|
+
AppAuthSection2 as AppAuthSection,
|
|
13014
|
+
AppDetailDrawer2 as AppDetailDrawer,
|
|
12806
13015
|
AppDetailProvider,
|
|
12807
|
-
AppSearchDrawer,
|
|
12808
|
-
AppTitleHeader,
|
|
13016
|
+
AppSearchDrawer2 as AppSearchDrawer,
|
|
13017
|
+
AppTitleHeader2 as AppTitleHeader,
|
|
12809
13018
|
CASES_PATTERNS,
|
|
12810
13019
|
COMMUNICATION_PATTERNS_NAMES,
|
|
12811
13020
|
DATASTORE_CATEGORIES,
|
|
@@ -12815,15 +13024,15 @@ export {
|
|
|
12815
13024
|
INGEST_TICKETS_WORKFLOW_NAME,
|
|
12816
13025
|
IntegrationStatus,
|
|
12817
13026
|
SIEM_PATTERNS,
|
|
12818
|
-
ShuffleMCP,
|
|
13027
|
+
ShuffleMCP2 as ShuffleMCP,
|
|
12819
13028
|
ShuffleMcpThemeProvider,
|
|
12820
|
-
|
|
12821
|
-
|
|
13029
|
+
ShufflePipelinesBanner2 as ShufflePipelinesBanner,
|
|
13030
|
+
SingulActionsPreview2 as SingulActionsPreview,
|
|
12822
13031
|
THREAT_INTEL_PATTERNS,
|
|
12823
|
-
TryMcpSection,
|
|
13032
|
+
TryMcpSection2 as TryMcpSection,
|
|
12824
13033
|
UsageBar,
|
|
12825
13034
|
VULN_SCANNER_PATTERNS,
|
|
12826
|
-
|
|
13035
|
+
index_default as default,
|
|
12827
13036
|
deleteDatastoreItem,
|
|
12828
13037
|
deleteDatastoreItems,
|
|
12829
13038
|
diagnoseOutputWarning,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuffleio/shuffle-mcps",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
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": {
|