@executor-js/plugin-mcp 0.1.0 → 1.4.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.
Files changed (45) hide show
  1. package/dist/AddMcpSource-TLAL463B.js +762 -0
  2. package/dist/AddMcpSource-TLAL463B.js.map +1 -0
  3. package/dist/EditMcpSource-CWN6HIC4.js +259 -0
  4. package/dist/EditMcpSource-CWN6HIC4.js.map +1 -0
  5. package/dist/McpSourceSummary-257JNETP.js +85 -0
  6. package/dist/McpSourceSummary-257JNETP.js.map +1 -0
  7. package/dist/api/group.d.ts +183 -19
  8. package/dist/api/index.d.ts +501 -0
  9. package/dist/chunk-4ORPFRLI.js +238 -0
  10. package/dist/chunk-4ORPFRLI.js.map +1 -0
  11. package/dist/chunk-M6REVU6O.js +179 -0
  12. package/dist/chunk-M6REVU6O.js.map +1 -0
  13. package/dist/chunk-NQT7NAGE.js +2277 -0
  14. package/dist/chunk-NQT7NAGE.js.map +1 -0
  15. package/dist/chunk-SKSXXFOA.js +104 -0
  16. package/dist/chunk-SKSXXFOA.js.map +1 -0
  17. package/dist/chunk-ZIRGIRGP.js +115 -0
  18. package/dist/chunk-ZIRGIRGP.js.map +1 -0
  19. package/dist/client.js +51 -0
  20. package/dist/client.js.map +1 -0
  21. package/dist/core.js +26 -2
  22. package/dist/index.js +2 -1
  23. package/dist/react/McpRemoteSourceFields.d.ts +18 -0
  24. package/dist/react/McpSourceSummary.d.ts +5 -0
  25. package/dist/react/atoms.d.ts +286 -6
  26. package/dist/react/client.d.ts +187 -16
  27. package/dist/react/index.d.ts +1 -1
  28. package/dist/react/plugin-client.d.ts +9 -2
  29. package/dist/sdk/binding-store.d.ts +106 -1
  30. package/dist/sdk/index.d.ts +1 -1
  31. package/dist/sdk/invoke.d.ts +2 -0
  32. package/dist/sdk/plugin.d.ts +178 -114
  33. package/dist/sdk/probe-shape-real-servers.live.test.d.ts +1 -0
  34. package/dist/sdk/probe-shape.d.ts +17 -3
  35. package/dist/sdk/stored-source.d.ts +12 -11
  36. package/dist/sdk/types.d.ts +122 -17
  37. package/dist/{stdio-connector-KNHLETKM.js → stdio-connector-AA5S6UUJ.js} +1 -1
  38. package/dist/{stdio-connector-KNHLETKM.js.map → stdio-connector-AA5S6UUJ.js.map} +1 -1
  39. package/dist/testing/index.d.ts +1 -0
  40. package/dist/{sdk/test-utils.d.ts → testing/server.d.ts} +0 -6
  41. package/dist/testing.js +51 -0
  42. package/dist/testing.js.map +1 -0
  43. package/package.json +17 -4
  44. package/dist/chunk-C2GNZGFJ.js +0 -1622
  45. package/dist/chunk-C2GNZGFJ.js.map +0 -1
@@ -0,0 +1,115 @@
1
+ // src/react/McpRemoteSourceFields.tsx
2
+ import { Badge } from "@executor-js/react/components/badge";
3
+ import {
4
+ CardStack,
5
+ CardStackContent,
6
+ CardStackEntry,
7
+ CardStackEntryActions,
8
+ CardStackEntryContent,
9
+ CardStackEntryDescription,
10
+ CardStackEntryField,
11
+ CardStackEntryMedia,
12
+ CardStackEntryTitle
13
+ } from "@executor-js/react/components/card-stack";
14
+ import { FieldError } from "@executor-js/react/components/field";
15
+ import { Input } from "@executor-js/react/components/input";
16
+ import { Skeleton } from "@executor-js/react/components/skeleton";
17
+ import { SourceFavicon } from "@executor-js/react/components/source-favicon";
18
+ import { IOSSpinner } from "@executor-js/react/components/spinner";
19
+ import { Button } from "@executor-js/react/components/button";
20
+ import {
21
+ SourceIdentityFieldRows
22
+ } from "@executor-js/react/plugins/source-identity";
23
+ import { jsx, jsxs } from "react/jsx-runtime";
24
+ function McpRemoteSourceFields(props) {
25
+ const previewDescription = props.preview ? props.preview.connected ? props.preview.toolCount === null ? null : `${props.preview.toolCount} tool${props.preview.toolCount !== 1 ? "s" : ""} available` : "OAuth required to discover tools" : null;
26
+ if (props.preview) {
27
+ return /* @__PURE__ */ jsx(CardStack, { children: /* @__PURE__ */ jsxs(CardStackContent, { className: "border-t-0", children: [
28
+ /* @__PURE__ */ jsxs(CardStackEntry, { children: [
29
+ /* @__PURE__ */ jsx(CardStackEntryMedia, { children: /* @__PURE__ */ jsx(SourceFavicon, { url: props.url, size: 32 }) }),
30
+ /* @__PURE__ */ jsxs(CardStackEntryContent, { children: [
31
+ /* @__PURE__ */ jsx(CardStackEntryTitle, { children: props.preview.serverName ?? props.preview.name }),
32
+ previewDescription ? /* @__PURE__ */ jsx(CardStackEntryDescription, { children: previewDescription }) : null
33
+ ] }),
34
+ /* @__PURE__ */ jsx(CardStackEntryActions, { children: props.preview.connected ? /* @__PURE__ */ jsx(
35
+ Badge,
36
+ {
37
+ variant: "outline",
38
+ className: "border-emerald-500/20 bg-emerald-500/10 text-[10px] text-emerald-600 dark:text-emerald-400",
39
+ children: "Connected"
40
+ }
41
+ ) : /* @__PURE__ */ jsx(
42
+ Badge,
43
+ {
44
+ variant: "outline",
45
+ className: "border-amber-500/20 bg-amber-500/10 text-[10px] text-amber-600 dark:text-amber-400",
46
+ children: "OAuth required"
47
+ }
48
+ ) })
49
+ ] }),
50
+ /* @__PURE__ */ jsx(
51
+ SourceIdentityFieldRows,
52
+ {
53
+ identity: props.identity,
54
+ namePlaceholder: "e.g. Linear",
55
+ namespaceReadOnly: props.namespaceReadOnly
56
+ }
57
+ ),
58
+ /* @__PURE__ */ jsx(CardStackEntryField, { label: "Server URL", children: /* @__PURE__ */ jsx(
59
+ Input,
60
+ {
61
+ value: props.url,
62
+ onChange: (e) => props.onUrlChange(e.target.value),
63
+ placeholder: "https://mcp.example.com",
64
+ className: "w-full font-mono text-sm",
65
+ disabled: props.urlDisabled
66
+ }
67
+ ) })
68
+ ] }) });
69
+ }
70
+ if (props.probing) {
71
+ return /* @__PURE__ */ jsx(CardStack, { children: /* @__PURE__ */ jsx(CardStackContent, { className: "border-t-0", children: /* @__PURE__ */ jsxs(CardStackEntry, { children: [
72
+ /* @__PURE__ */ jsx(CardStackEntryMedia, { children: /* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded" }) }),
73
+ /* @__PURE__ */ jsxs(CardStackEntryContent, { children: [
74
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-40" }),
75
+ /* @__PURE__ */ jsx(Skeleton, { className: "mt-1 h-3 w-32" })
76
+ ] }),
77
+ /* @__PURE__ */ jsx(CardStackEntryActions, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-20 rounded-full" }) })
78
+ ] }) }) });
79
+ }
80
+ return /* @__PURE__ */ jsx(CardStack, { children: /* @__PURE__ */ jsx(CardStackContent, { className: "border-t-0", children: /* @__PURE__ */ jsxs(CardStackEntryField, { label: "Server URL", children: [
81
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
82
+ /* @__PURE__ */ jsx(
83
+ Input,
84
+ {
85
+ value: props.url,
86
+ onChange: (e) => props.onUrlChange(e.target.value),
87
+ placeholder: "https://mcp.example.com",
88
+ className: "w-full pr-9 font-mono text-sm",
89
+ "aria-invalid": props.error ? true : void 0,
90
+ disabled: props.urlDisabled
91
+ }
92
+ ),
93
+ props.probing && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx(IOSSpinner, { className: "size-4" }) })
94
+ ] }),
95
+ props.error && /* @__PURE__ */ jsxs("div", { className: "mt-2 space-y-2", children: [
96
+ /* @__PURE__ */ jsx(FieldError, { children: props.error }),
97
+ props.onRetry && /* @__PURE__ */ jsx(
98
+ Button,
99
+ {
100
+ type: "button",
101
+ variant: "outline",
102
+ size: "sm",
103
+ onClick: props.onRetry,
104
+ className: "h-7 px-2 text-xs",
105
+ children: "Try again"
106
+ }
107
+ )
108
+ ] })
109
+ ] }) }) });
110
+ }
111
+
112
+ export {
113
+ McpRemoteSourceFields
114
+ };
115
+ //# sourceMappingURL=chunk-ZIRGIRGP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/McpRemoteSourceFields.tsx"],"sourcesContent":["import { Badge } from \"@executor-js/react/components/badge\";\nimport {\n CardStack,\n CardStackContent,\n CardStackEntry,\n CardStackEntryActions,\n CardStackEntryContent,\n CardStackEntryDescription,\n CardStackEntryField,\n CardStackEntryMedia,\n CardStackEntryTitle,\n} from \"@executor-js/react/components/card-stack\";\nimport { FieldError } from \"@executor-js/react/components/field\";\nimport { Input } from \"@executor-js/react/components/input\";\nimport { Skeleton } from \"@executor-js/react/components/skeleton\";\nimport { SourceFavicon } from \"@executor-js/react/components/source-favicon\";\nimport { IOSSpinner } from \"@executor-js/react/components/spinner\";\nimport { Button } from \"@executor-js/react/components/button\";\nimport {\n SourceIdentityFieldRows,\n type SourceIdentity,\n} from \"@executor-js/react/plugins/source-identity\";\n\nexport type McpRemoteSourcePreview = {\n readonly name: string;\n readonly serverName: string | null;\n readonly connected: boolean;\n readonly toolCount: number | null;\n};\n\nexport function McpRemoteSourceFields(props: {\n readonly url: string;\n readonly onUrlChange: (url: string) => void;\n readonly identity: SourceIdentity;\n readonly preview: McpRemoteSourcePreview | null;\n readonly probing?: boolean;\n readonly error?: string | null;\n readonly onRetry?: () => void;\n readonly namespaceReadOnly?: boolean;\n readonly urlDisabled?: boolean;\n}) {\n const previewDescription = props.preview\n ? props.preview.connected\n ? props.preview.toolCount === null\n ? null\n : `${props.preview.toolCount} tool${props.preview.toolCount !== 1 ? \"s\" : \"\"} available`\n : \"OAuth required to discover tools\"\n : null;\n\n if (props.preview) {\n return (\n <CardStack>\n <CardStackContent className=\"border-t-0\">\n <CardStackEntry>\n <CardStackEntryMedia>\n <SourceFavicon url={props.url} size={32} />\n </CardStackEntryMedia>\n <CardStackEntryContent>\n <CardStackEntryTitle>\n {props.preview.serverName ?? props.preview.name}\n </CardStackEntryTitle>\n {previewDescription ? (\n <CardStackEntryDescription>{previewDescription}</CardStackEntryDescription>\n ) : null}\n </CardStackEntryContent>\n <CardStackEntryActions>\n {props.preview.connected ? (\n <Badge\n variant=\"outline\"\n className=\"border-emerald-500/20 bg-emerald-500/10 text-[10px] text-emerald-600 dark:text-emerald-400\"\n >\n Connected\n </Badge>\n ) : (\n <Badge\n variant=\"outline\"\n className=\"border-amber-500/20 bg-amber-500/10 text-[10px] text-amber-600 dark:text-amber-400\"\n >\n OAuth required\n </Badge>\n )}\n </CardStackEntryActions>\n </CardStackEntry>\n <SourceIdentityFieldRows\n identity={props.identity}\n namePlaceholder=\"e.g. Linear\"\n namespaceReadOnly={props.namespaceReadOnly}\n />\n <CardStackEntryField label=\"Server URL\">\n <Input\n value={props.url}\n onChange={(e) => props.onUrlChange((e.target as HTMLInputElement).value)}\n placeholder=\"https://mcp.example.com\"\n className=\"w-full font-mono text-sm\"\n disabled={props.urlDisabled}\n />\n </CardStackEntryField>\n </CardStackContent>\n </CardStack>\n );\n }\n\n if (props.probing) {\n return (\n <CardStack>\n <CardStackContent className=\"border-t-0\">\n <CardStackEntry>\n <CardStackEntryMedia>\n <Skeleton className=\"size-4 rounded\" />\n </CardStackEntryMedia>\n <CardStackEntryContent>\n <Skeleton className=\"h-4 w-40\" />\n <Skeleton className=\"mt-1 h-3 w-32\" />\n </CardStackEntryContent>\n <CardStackEntryActions>\n <Skeleton className=\"h-4 w-20 rounded-full\" />\n </CardStackEntryActions>\n </CardStackEntry>\n </CardStackContent>\n </CardStack>\n );\n }\n\n return (\n <CardStack>\n <CardStackContent className=\"border-t-0\">\n <CardStackEntryField label=\"Server URL\">\n <div className=\"relative\">\n <Input\n value={props.url}\n onChange={(e) => props.onUrlChange((e.target as HTMLInputElement).value)}\n placeholder=\"https://mcp.example.com\"\n className=\"w-full pr-9 font-mono text-sm\"\n aria-invalid={props.error ? true : undefined}\n disabled={props.urlDisabled}\n />\n {props.probing && (\n <div className=\"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2\">\n <IOSSpinner className=\"size-4\" />\n </div>\n )}\n </div>\n {props.error && (\n <div className=\"mt-2 space-y-2\">\n <FieldError>{props.error}</FieldError>\n {props.onRetry && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={props.onRetry}\n className=\"h-7 px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AAA,UACf,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,OAEJ;AAAA,KAEJ,GACF,GACF;AAEJ;","names":[]}
package/dist/client.js ADDED
@@ -0,0 +1,51 @@
1
+ import {
2
+ mcpPresets
3
+ } from "./chunk-SKSXXFOA.js";
4
+
5
+ // src/react/plugin-client.tsx
6
+ import { defineClientPlugin } from "@executor-js/sdk/client";
7
+
8
+ // src/react/source-plugin.tsx
9
+ import { lazy } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var importAdd = () => import("./AddMcpSource-TLAL463B.js");
12
+ var importEdit = () => import("./EditMcpSource-CWN6HIC4.js");
13
+ var importSummary = () => import("./McpSourceSummary-257JNETP.js");
14
+ var LazyAddMcpSource = lazy(importAdd);
15
+ var LazyEditMcpSource = lazy(importEdit);
16
+ var LazyMcpSourceSummary = lazy(importSummary);
17
+ var createMcpSourcePlugin = (options) => {
18
+ const allowStdio = options?.allowStdio ?? false;
19
+ const AddWithFlag = (props) => /* @__PURE__ */ jsx(LazyAddMcpSource, { ...props, allowStdio });
20
+ const presets = allowStdio ? mcpPresets : mcpPresets.filter(
21
+ (p) => !("transport" in p && p.transport === "stdio")
22
+ );
23
+ return {
24
+ key: "mcp",
25
+ label: "MCP",
26
+ add: AddWithFlag,
27
+ edit: LazyEditMcpSource,
28
+ summary: LazyMcpSourceSummary,
29
+ presets,
30
+ preload: () => {
31
+ void importAdd();
32
+ void importEdit();
33
+ void importSummary();
34
+ }
35
+ };
36
+ };
37
+ var mcpSourcePlugin = createMcpSourcePlugin();
38
+
39
+ // src/react/plugin-client.tsx
40
+ function createMcpClientPlugin(config) {
41
+ return defineClientPlugin({
42
+ id: "mcp",
43
+ sourcePlugin: createMcpSourcePlugin({
44
+ allowStdio: config?.allowStdio ?? false
45
+ })
46
+ });
47
+ }
48
+ export {
49
+ createMcpClientPlugin as default
50
+ };
51
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/plugin-client.tsx","../src/react/source-plugin.tsx"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/plugin-mcp/client — `defineClientPlugin` factory entry.\n//\n// Default-exports a factory rather than a value: at build time the\n// `@executor-js/vite-plugin` reads each plugin spec's `clientConfig`\n// from `executor.config.ts` and emits `__p(<JSON.stringify(clientConfig)>)`\n// into the virtual `plugins-client` module. So `allowStdio` flows from\n// the server-side `mcpPlugin({ dangerouslyAllowStdioMCP })` straight\n// into the bundle — no parallel client-side flag, no per-host shim,\n// no runtime fetch.\n// ---------------------------------------------------------------------------\n\nimport { defineClientPlugin } from \"@executor-js/sdk/client\";\n\nimport { createMcpSourcePlugin } from \"./source-plugin\";\n\nexport interface McpClientConfig {\n /**\n * Mirrors `dangerouslyAllowStdioMCP` on the server-side plugin. When\n * false, the AddMcpSource UI hides the stdio tab and stdio presets.\n * Defaults to false — same default as the server flag.\n */\n readonly allowStdio?: boolean;\n}\n\nexport default function createMcpClientPlugin(config?: McpClientConfig) {\n return defineClientPlugin({\n id: \"mcp\" as const,\n sourcePlugin: createMcpSourcePlugin({\n allowStdio: config?.allowStdio ?? false,\n }),\n });\n}\n","import { lazy, type ComponentProps, type ComponentType } from \"react\";\nimport type { SourcePlugin } from \"@executor-js/sdk/client\";\nimport { mcpPresets } from \"../sdk/presets\";\n\nconst importAdd = () => import(\"./AddMcpSource\");\nconst importEdit = () => import(\"./EditMcpSource\");\nconst importSummary = () => import(\"./McpSourceSummary\");\n\nconst LazyAddMcpSource = lazy(importAdd);\nconst LazyEditMcpSource = lazy(importEdit);\nconst LazyMcpSourceSummary = lazy(importSummary);\n\ntype AddProps = ComponentProps<SourcePlugin[\"add\"]>;\n\nexport interface McpSourcePluginOptions {\n /**\n * Enable the stdio transport in the add-source UI (tab + presets).\n *\n * Off by default — stdio is a high-risk transport on any server deployment\n * (see `dangerouslyAllowStdioMCP` on the server-side plugin). Only enable in\n * trusted local contexts where the server has the matching flag set.\n */\n readonly allowStdio?: boolean;\n}\n\nexport const createMcpSourcePlugin = (options?: McpSourcePluginOptions): SourcePlugin => {\n const allowStdio = options?.allowStdio ?? false;\n\n const AddWithFlag: ComponentType<AddProps> = (props) => (\n <LazyAddMcpSource {...props} allowStdio={allowStdio} />\n );\n\n const presets = allowStdio\n ? mcpPresets\n : mcpPresets.filter(\n (p) => !(\"transport\" in p && (p as { transport?: string }).transport === \"stdio\"),\n );\n\n return {\n key: \"mcp\",\n label: \"MCP\",\n add: AddWithFlag,\n edit: LazyEditMcpSource,\n summary: LazyMcpSourceSummary,\n presets,\n preload: () => {\n void importAdd();\n void importEdit();\n void importSummary();\n },\n };\n};\n\n/** @deprecated Use `createMcpSourcePlugin({ allowStdio })` instead. */\nexport const mcpSourcePlugin: SourcePlugin = createMcpSourcePlugin();\n"],"mappings":";;;;;AAYA,SAAS,0BAA0B;;;ACZnC,SAAS,YAAqD;AA6B1D;AAzBJ,IAAM,YAAY,MAAM,OAAO,4BAAgB;AAC/C,IAAM,aAAa,MAAM,OAAO,6BAAiB;AACjD,IAAM,gBAAgB,MAAM,OAAO,gCAAoB;AAEvD,IAAM,mBAAmB,KAAK,SAAS;AACvC,IAAM,oBAAoB,KAAK,UAAU;AACzC,IAAM,uBAAuB,KAAK,aAAa;AAexC,IAAM,wBAAwB,CAAC,YAAmD;AACvF,QAAM,aAAa,SAAS,cAAc;AAE1C,QAAM,cAAuC,CAAC,UAC5C,oBAAC,oBAAkB,GAAG,OAAO,YAAwB;AAGvD,QAAM,UAAU,aACZ,aACA,WAAW;AAAA,IACT,CAAC,MAAM,EAAE,eAAe,KAAM,EAA6B,cAAc;AAAA,EAC3E;AAEJ,SAAO;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT;AAAA,IACA,SAAS,MAAM;AACb,WAAK,UAAU;AACf,WAAK,WAAW;AAChB,WAAK,cAAc;AAAA,IACrB;AAAA,EACF;AACF;AAGO,IAAM,kBAAgC,sBAAsB;;;AD7BpD,SAAR,sBAAuC,QAA0B;AACtE,SAAO,mBAAmB;AAAA,IACxB,IAAI;AAAA,IACJ,cAAc,sBAAsB;AAAA,MAClC,YAAY,QAAQ,cAAc;AAAA,IACpC,CAAC;AAAA,EACH,CAAC;AACH;","names":[]}
package/dist/core.js CHANGED
@@ -1,13 +1,37 @@
1
1
  import {
2
- McpConnectionAuth,
3
2
  makeMcpStore,
4
3
  mcpPlugin,
5
4
  mcpSchema
6
- } from "./chunk-C2GNZGFJ.js";
5
+ } from "./chunk-NQT7NAGE.js";
6
+ import {
7
+ ConfiguredMcpCredentialValue,
8
+ MCP_HEADER_AUTH_SLOT,
9
+ MCP_OAUTH_CLIENT_ID_SLOT,
10
+ MCP_OAUTH_CLIENT_SECRET_SLOT,
11
+ MCP_OAUTH_CONNECTION_SLOT,
12
+ McpConnectionAuth,
13
+ McpConnectionAuthInput,
14
+ McpCredentialInput,
15
+ McpSourceBindingInput,
16
+ McpSourceBindingRef,
17
+ mcpHeaderSlot,
18
+ mcpQueryParamSlot
19
+ } from "./chunk-M6REVU6O.js";
7
20
  export {
21
+ ConfiguredMcpCredentialValue,
22
+ MCP_HEADER_AUTH_SLOT,
23
+ MCP_OAUTH_CLIENT_ID_SLOT,
24
+ MCP_OAUTH_CLIENT_SECRET_SLOT,
25
+ MCP_OAUTH_CONNECTION_SLOT,
8
26
  McpConnectionAuth,
27
+ McpConnectionAuthInput,
28
+ McpCredentialInput,
29
+ McpSourceBindingInput,
30
+ McpSourceBindingRef,
9
31
  makeMcpStore,
32
+ mcpHeaderSlot,
10
33
  mcpPlugin,
34
+ mcpQueryParamSlot,
11
35
  mcpSchema
12
36
  };
13
37
  //# sourceMappingURL=core.js.map
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  mcpPlugin
3
- } from "./chunk-C2GNZGFJ.js";
3
+ } from "./chunk-NQT7NAGE.js";
4
+ import "./chunk-M6REVU6O.js";
4
5
  export {
5
6
  mcpPlugin
6
7
  };
@@ -0,0 +1,18 @@
1
+ import { type SourceIdentity } from "@executor-js/react/plugins/source-identity";
2
+ export type McpRemoteSourcePreview = {
3
+ readonly name: string;
4
+ readonly serverName: string | null;
5
+ readonly connected: boolean;
6
+ readonly toolCount: number | null;
7
+ };
8
+ export declare function McpRemoteSourceFields(props: {
9
+ readonly url: string;
10
+ readonly onUrlChange: (url: string) => void;
11
+ readonly identity: SourceIdentity;
12
+ readonly preview: McpRemoteSourcePreview | null;
13
+ readonly probing?: boolean;
14
+ readonly error?: string | null;
15
+ readonly onRetry?: () => void;
16
+ readonly namespaceReadOnly?: boolean;
17
+ readonly urlDisabled?: boolean;
18
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export default function McpSourceSummary(props: {
2
+ readonly sourceId: string;
3
+ readonly variant?: "badge" | "panel";
4
+ readonly onAction?: () => void;
5
+ }): import("react/jsx-runtime").JSX.Element | null;