@executor-js/plugin-mcp 1.5.6 → 1.5.8
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/{AddMcpSource-4LLERUW5.js → AddMcpSource-ZDNQ7F6I.js} +70 -97
- package/dist/AddMcpSource-ZDNQ7F6I.js.map +1 -0
- package/dist/EditMcpSource-75NJRWZR.js +178 -0
- package/dist/EditMcpSource-75NJRWZR.js.map +1 -0
- package/dist/McpAccountsPanel-QBCSCJE7.js +83 -0
- package/dist/McpAccountsPanel-QBCSCJE7.js.map +1 -0
- package/dist/api/group.d.ts +106 -15
- package/dist/api/index.d.ts +121 -15
- package/dist/{chunk-N4EAF5CA.js → chunk-3AOD4VAW.js} +74 -5
- package/dist/chunk-3AOD4VAW.js.map +1 -0
- package/dist/{chunk-6OEQZ72N.js → chunk-3H5Y7JCQ.js} +65 -11
- package/dist/chunk-3H5Y7JCQ.js.map +1 -0
- package/dist/{chunk-HSJWIVME.js → chunk-6BJ6MZF7.js} +110 -52
- package/dist/chunk-6BJ6MZF7.js.map +1 -0
- package/dist/client.js +3 -3
- package/dist/core.js +152 -5
- package/dist/core.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/react/atoms.d.ts +128 -26
- package/dist/react/auth-method-config.d.ts +22 -7
- package/dist/react/client.d.ts +103 -15
- package/dist/sdk/connection.d.ts +1 -1
- package/dist/sdk/index.d.ts +3 -1
- package/dist/sdk/invoke.d.ts +1 -1
- package/dist/sdk/migrate-config.d.ts +6 -0
- package/dist/sdk/migrate-config.test.d.ts +1 -0
- package/dist/sdk/multi-placement-auth.test.d.ts +1 -0
- package/dist/sdk/plugin.d.ts +92 -5
- package/dist/sdk/types.d.ts +105 -15
- package/package.json +4 -4
- package/dist/AddMcpSource-4LLERUW5.js.map +0 -1
- package/dist/EditMcpSource-GKJRP75X.js +0 -313
- package/dist/EditMcpSource-GKJRP75X.js.map +0 -1
- package/dist/McpAccountsPanel-UX7MHEIG.js +0 -132
- package/dist/McpAccountsPanel-UX7MHEIG.js.map +0 -1
- package/dist/chunk-6OEQZ72N.js.map +0 -1
- package/dist/chunk-7FJ3PUUL.js +0 -21
- package/dist/chunk-7FJ3PUUL.js.map +0 -1
- package/dist/chunk-HSJWIVME.js.map +0 -1
- package/dist/chunk-N4EAF5CA.js.map +0 -1
package/dist/react/atoms.d.ts
CHANGED
|
@@ -5,23 +5,32 @@ export declare const mcpServerAtom: (slug: IntegrationSlug) => import("effect/un
|
|
|
5
5
|
readonly kind: string;
|
|
6
6
|
readonly config: {
|
|
7
7
|
readonly endpoint: string;
|
|
8
|
-
readonly
|
|
9
|
-
|
|
8
|
+
readonly transport: "remote";
|
|
9
|
+
readonly authenticationTemplate: readonly ({
|
|
10
|
+
readonly slug: string;
|
|
11
|
+
readonly kind: "apikey";
|
|
12
|
+
readonly placements: readonly {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly carrier: "header" | "query";
|
|
15
|
+
readonly variable?: string | undefined;
|
|
16
|
+
readonly prefix?: string | undefined;
|
|
17
|
+
readonly literal?: string | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
readonly label?: string | undefined;
|
|
10
20
|
} | {
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly prefix?: string | undefined;
|
|
21
|
+
readonly slug: string;
|
|
22
|
+
readonly kind: "none";
|
|
14
23
|
} | {
|
|
24
|
+
readonly slug: string;
|
|
15
25
|
readonly kind: "oauth2";
|
|
16
|
-
};
|
|
17
|
-
readonly transport: "remote";
|
|
26
|
+
})[];
|
|
18
27
|
readonly headers?: {
|
|
19
28
|
readonly [x: string]: string;
|
|
20
29
|
} | undefined;
|
|
21
|
-
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
22
30
|
readonly queryParams?: {
|
|
23
31
|
readonly [x: string]: string;
|
|
24
32
|
} | undefined;
|
|
33
|
+
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
25
34
|
} | {
|
|
26
35
|
readonly transport: "stdio";
|
|
27
36
|
readonly command: string;
|
|
@@ -73,11 +82,34 @@ export declare const addMcpServer: import("effect/unstable/reactivity/Atom").Ato
|
|
|
73
82
|
readonly headers?: {
|
|
74
83
|
readonly [x: string]: string;
|
|
75
84
|
} | undefined;
|
|
76
|
-
readonly transport?: "remote" | undefined;
|
|
77
|
-
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
78
85
|
readonly queryParams?: {
|
|
79
86
|
readonly [x: string]: string;
|
|
80
87
|
} | undefined;
|
|
88
|
+
readonly transport?: "remote" | undefined;
|
|
89
|
+
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
90
|
+
readonly authenticationTemplate?: readonly ({
|
|
91
|
+
readonly type: "apiKey";
|
|
92
|
+
readonly slug?: string | undefined;
|
|
93
|
+
readonly label?: string | undefined;
|
|
94
|
+
readonly headers?: {
|
|
95
|
+
readonly [x: string]: string | readonly (string | {
|
|
96
|
+
readonly type: "variable";
|
|
97
|
+
readonly name: string;
|
|
98
|
+
})[];
|
|
99
|
+
} | undefined;
|
|
100
|
+
readonly queryParams?: {
|
|
101
|
+
readonly [x: string]: string | readonly (string | {
|
|
102
|
+
readonly type: "variable";
|
|
103
|
+
readonly name: string;
|
|
104
|
+
})[];
|
|
105
|
+
} | undefined;
|
|
106
|
+
} | {
|
|
107
|
+
readonly kind: "none";
|
|
108
|
+
readonly slug?: string | undefined;
|
|
109
|
+
} | {
|
|
110
|
+
readonly kind: "oauth2";
|
|
111
|
+
readonly slug?: string | undefined;
|
|
112
|
+
})[] | undefined;
|
|
81
113
|
};
|
|
82
114
|
readonly responseMode?: "decoded-only" | undefined;
|
|
83
115
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
@@ -114,23 +146,32 @@ export declare const configureMcpServer: import("effect/unstable/reactivity/Atom
|
|
|
114
146
|
readonly payload: {
|
|
115
147
|
readonly config: {
|
|
116
148
|
readonly endpoint: string;
|
|
117
|
-
readonly
|
|
118
|
-
|
|
149
|
+
readonly transport: "remote";
|
|
150
|
+
readonly authenticationTemplate: readonly ({
|
|
151
|
+
readonly slug: string;
|
|
152
|
+
readonly kind: "apikey";
|
|
153
|
+
readonly placements: readonly {
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly carrier: "header" | "query";
|
|
156
|
+
readonly variable?: string | undefined;
|
|
157
|
+
readonly prefix?: string | undefined;
|
|
158
|
+
readonly literal?: string | undefined;
|
|
159
|
+
}[];
|
|
160
|
+
readonly label?: string | undefined;
|
|
119
161
|
} | {
|
|
120
|
-
readonly
|
|
121
|
-
readonly
|
|
122
|
-
readonly prefix?: string | undefined;
|
|
162
|
+
readonly slug: string;
|
|
163
|
+
readonly kind: "none";
|
|
123
164
|
} | {
|
|
165
|
+
readonly slug: string;
|
|
124
166
|
readonly kind: "oauth2";
|
|
125
|
-
};
|
|
126
|
-
readonly transport: "remote";
|
|
167
|
+
})[];
|
|
127
168
|
readonly headers?: {
|
|
128
169
|
readonly [x: string]: string;
|
|
129
170
|
} | undefined;
|
|
130
|
-
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
131
171
|
readonly queryParams?: {
|
|
132
172
|
readonly [x: string]: string;
|
|
133
173
|
} | undefined;
|
|
174
|
+
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
134
175
|
} | {
|
|
135
176
|
readonly transport: "stdio";
|
|
136
177
|
readonly command: string;
|
|
@@ -146,23 +187,32 @@ export declare const configureMcpServer: import("effect/unstable/reactivity/Atom
|
|
|
146
187
|
}, {
|
|
147
188
|
readonly config: {
|
|
148
189
|
readonly endpoint: string;
|
|
149
|
-
readonly
|
|
150
|
-
|
|
190
|
+
readonly transport: "remote";
|
|
191
|
+
readonly authenticationTemplate: readonly ({
|
|
192
|
+
readonly slug: string;
|
|
193
|
+
readonly kind: "apikey";
|
|
194
|
+
readonly placements: readonly {
|
|
195
|
+
readonly name: string;
|
|
196
|
+
readonly carrier: "header" | "query";
|
|
197
|
+
readonly variable?: string | undefined;
|
|
198
|
+
readonly prefix?: string | undefined;
|
|
199
|
+
readonly literal?: string | undefined;
|
|
200
|
+
}[];
|
|
201
|
+
readonly label?: string | undefined;
|
|
151
202
|
} | {
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
154
|
-
readonly prefix?: string | undefined;
|
|
203
|
+
readonly slug: string;
|
|
204
|
+
readonly kind: "none";
|
|
155
205
|
} | {
|
|
206
|
+
readonly slug: string;
|
|
156
207
|
readonly kind: "oauth2";
|
|
157
|
-
};
|
|
158
|
-
readonly transport: "remote";
|
|
208
|
+
})[];
|
|
159
209
|
readonly headers?: {
|
|
160
210
|
readonly [x: string]: string;
|
|
161
211
|
} | undefined;
|
|
162
|
-
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
163
212
|
readonly queryParams?: {
|
|
164
213
|
readonly [x: string]: string;
|
|
165
214
|
} | undefined;
|
|
215
|
+
readonly remoteTransport?: "auto" | "streamable-http" | "sse" | undefined;
|
|
166
216
|
} | {
|
|
167
217
|
readonly transport: "stdio";
|
|
168
218
|
readonly command: string;
|
|
@@ -173,3 +223,55 @@ export declare const configureMcpServer: import("effect/unstable/reactivity/Atom
|
|
|
173
223
|
} | undefined;
|
|
174
224
|
};
|
|
175
225
|
}, import("@executor-js/sdk").InternalError | import("../sdk").McpConnectionError | import("../sdk").McpToolDiscoveryError>;
|
|
226
|
+
export declare const configureMcpAuth: import("effect/unstable/reactivity/Atom").AtomResultFn<{
|
|
227
|
+
readonly params: {
|
|
228
|
+
readonly slug: string & import("effect/Brand").Brand<"IntegrationSlug">;
|
|
229
|
+
};
|
|
230
|
+
readonly payload: {
|
|
231
|
+
readonly authenticationTemplate: readonly ({
|
|
232
|
+
readonly type: "apiKey";
|
|
233
|
+
readonly slug?: string | undefined;
|
|
234
|
+
readonly label?: string | undefined;
|
|
235
|
+
readonly headers?: {
|
|
236
|
+
readonly [x: string]: string | readonly (string | {
|
|
237
|
+
readonly type: "variable";
|
|
238
|
+
readonly name: string;
|
|
239
|
+
})[];
|
|
240
|
+
} | undefined;
|
|
241
|
+
readonly queryParams?: {
|
|
242
|
+
readonly [x: string]: string | readonly (string | {
|
|
243
|
+
readonly type: "variable";
|
|
244
|
+
readonly name: string;
|
|
245
|
+
})[];
|
|
246
|
+
} | undefined;
|
|
247
|
+
} | {
|
|
248
|
+
readonly kind: "none";
|
|
249
|
+
readonly slug?: string | undefined;
|
|
250
|
+
} | {
|
|
251
|
+
readonly kind: "oauth2";
|
|
252
|
+
readonly slug?: string | undefined;
|
|
253
|
+
})[];
|
|
254
|
+
readonly mode?: "replace" | "merge" | undefined;
|
|
255
|
+
};
|
|
256
|
+
readonly responseMode?: "decoded-only" | undefined;
|
|
257
|
+
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
258
|
+
}, {
|
|
259
|
+
readonly authenticationTemplate: readonly ({
|
|
260
|
+
readonly slug: string;
|
|
261
|
+
readonly kind: "apikey";
|
|
262
|
+
readonly placements: readonly {
|
|
263
|
+
readonly name: string;
|
|
264
|
+
readonly carrier: "header" | "query";
|
|
265
|
+
readonly variable?: string | undefined;
|
|
266
|
+
readonly prefix?: string | undefined;
|
|
267
|
+
readonly literal?: string | undefined;
|
|
268
|
+
}[];
|
|
269
|
+
readonly label?: string | undefined;
|
|
270
|
+
} | {
|
|
271
|
+
readonly slug: string;
|
|
272
|
+
readonly kind: "none";
|
|
273
|
+
} | {
|
|
274
|
+
readonly slug: string;
|
|
275
|
+
readonly kind: "oauth2";
|
|
276
|
+
})[];
|
|
277
|
+
}, import("@executor-js/sdk").InternalError | import("../sdk").McpConnectionError | import("../sdk").McpToolDiscoveryError>;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import type { AuthTemplateEditorValue } from "@executor-js/react/components/auth-template-editor";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import type { AuthMethod, Placement } from "@executor-js/react/lib/auth-placements";
|
|
3
|
+
import type { McpAuthMethod, McpAuthMethodInput, McpCanonicalAuthMethodInput } from "../sdk/types";
|
|
4
|
+
/** Serialize a canonical method into the wire input union (apikey → the
|
|
5
|
+
* request-shaped dialect; none/oauth2 pass through). */
|
|
6
|
+
export declare const mcpWireAuthInput: (method: McpAuthMethod | McpCanonicalAuthMethodInput) => McpAuthMethodInput;
|
|
7
|
+
/** Convert a generic editor value into one MCP auth-method input (no slug —
|
|
8
|
+
* the backend assigns carrier-derived slugs). An apikey value keeps every
|
|
9
|
+
* named placement (headers and query params mix freely); one with no usable
|
|
10
|
+
* placement falls back to `none`. */
|
|
11
|
+
export declare function mcpAuthMethodInputFromEditorValue(value: AuthTemplateEditorValue): McpCanonicalAuthMethodInput;
|
|
12
|
+
/** Convert one stored MCP method into the generic editor value. */
|
|
13
|
+
export declare function editorValueFromMcpAuthMethod(method: McpAuthMethod): AuthTemplateEditorValue;
|
|
14
|
+
/** Project the stored methods into the generic `AuthMethod[]` the hub renders.
|
|
15
|
+
* Mirrors the server's `describeMcpAuthMethods`; `custom_` slugs mark
|
|
16
|
+
* user-created methods (removable from the hub). `endpoint` feeds the oauth
|
|
17
|
+
* method's probe-at-connect `discoveryUrl`. */
|
|
18
|
+
export declare function authMethodsFromConfig(methods: readonly McpAuthMethod[], endpoint: string): AuthMethod[];
|
|
19
|
+
/** Build the MCP method input for a custom method from generic placements —
|
|
20
|
+
* ONE method carrying every named placement (header + query mix in a single
|
|
21
|
+
* method; each placement renders from its own input variable, or shares one).
|
|
22
|
+
* Empty when no placement is usable. */
|
|
23
|
+
export declare function mcpAuthMethodInputsFromPlacements(placements: readonly Placement[]): McpCanonicalAuthMethodInput[];
|
package/dist/react/client.d.ts
CHANGED
|
@@ -19,6 +19,25 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
|
|
|
19
19
|
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
20
20
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
21
21
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
22
|
+
readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
23
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
24
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
25
|
+
}>, import("effect/Schema").Struct<{
|
|
26
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
27
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
28
|
+
}>, import("effect/Schema").Struct<{
|
|
29
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
30
|
+
readonly type: import("effect/Schema").Literal<"apiKey">;
|
|
31
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
32
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
33
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
34
|
+
readonly name: import("effect/Schema").String;
|
|
35
|
+
}>]>>]>>>;
|
|
36
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
37
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
38
|
+
readonly name: import("effect/Schema").String;
|
|
39
|
+
}>]>>]>>>;
|
|
40
|
+
}>]>>>;
|
|
22
41
|
readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
23
42
|
readonly kind: import("effect/Schema").Literal<"none">;
|
|
24
43
|
}>, import("effect/Schema").Struct<{
|
|
@@ -56,15 +75,24 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
|
|
|
56
75
|
readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
57
76
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
58
77
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
59
|
-
readonly
|
|
78
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
79
|
+
readonly slug: import("effect/Schema").String;
|
|
60
80
|
readonly kind: import("effect/Schema").Literal<"none">;
|
|
61
81
|
}>, import("effect/Schema").Struct<{
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
82
|
+
readonly slug: import("effect/Schema").String;
|
|
83
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
84
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
85
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
86
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
87
|
+
readonly name: import("effect/Schema").String;
|
|
88
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
89
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
90
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
91
|
+
}>>;
|
|
65
92
|
}>, import("effect/Schema").Struct<{
|
|
93
|
+
readonly slug: import("effect/Schema").String;
|
|
66
94
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
67
|
-
}>]
|
|
95
|
+
}>]>>;
|
|
68
96
|
}>, import("effect/Schema").Struct<{
|
|
69
97
|
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
70
98
|
readonly command: import("effect/Schema").String;
|
|
@@ -81,15 +109,24 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
|
|
|
81
109
|
readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
82
110
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
83
111
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
84
|
-
readonly
|
|
112
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
113
|
+
readonly slug: import("effect/Schema").String;
|
|
85
114
|
readonly kind: import("effect/Schema").Literal<"none">;
|
|
86
115
|
}>, import("effect/Schema").Struct<{
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
116
|
+
readonly slug: import("effect/Schema").String;
|
|
117
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
118
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
119
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
120
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
121
|
+
readonly name: import("effect/Schema").String;
|
|
122
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
123
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
124
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
125
|
+
}>>;
|
|
90
126
|
}>, import("effect/Schema").Struct<{
|
|
127
|
+
readonly slug: import("effect/Schema").String;
|
|
91
128
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
92
|
-
}>]
|
|
129
|
+
}>]>>;
|
|
93
130
|
}>, import("effect/Schema").Struct<{
|
|
94
131
|
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
95
132
|
readonly command: import("effect/Schema").String;
|
|
@@ -104,15 +141,24 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
|
|
|
104
141
|
readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
105
142
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
106
143
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
107
|
-
readonly
|
|
144
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
145
|
+
readonly slug: import("effect/Schema").String;
|
|
108
146
|
readonly kind: import("effect/Schema").Literal<"none">;
|
|
109
147
|
}>, import("effect/Schema").Struct<{
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
148
|
+
readonly slug: import("effect/Schema").String;
|
|
149
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
150
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
151
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
152
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
153
|
+
readonly name: import("effect/Schema").String;
|
|
154
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
155
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
156
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
157
|
+
}>>;
|
|
113
158
|
}>, import("effect/Schema").Struct<{
|
|
159
|
+
readonly slug: import("effect/Schema").String;
|
|
114
160
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
115
|
-
}>]
|
|
161
|
+
}>]>>;
|
|
116
162
|
}>, import("effect/Schema").Struct<{
|
|
117
163
|
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
118
164
|
readonly command: import("effect/Schema").String;
|
|
@@ -120,4 +166,46 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
|
|
|
120
166
|
readonly env: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
121
167
|
readonly cwd: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
122
168
|
}>]>;
|
|
169
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configureAuth", "POST", "/mcp/servers/:slug/auth", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
170
|
+
slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
171
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
172
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
173
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
174
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
175
|
+
}>, import("effect/Schema").Struct<{
|
|
176
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
177
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
178
|
+
}>, import("effect/Schema").Struct<{
|
|
179
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
180
|
+
readonly type: import("effect/Schema").Literal<"apiKey">;
|
|
181
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
182
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
183
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
184
|
+
readonly name: import("effect/Schema").String;
|
|
185
|
+
}>]>>]>>>;
|
|
186
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
187
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
188
|
+
readonly name: import("effect/Schema").String;
|
|
189
|
+
}>]>>]>>>;
|
|
190
|
+
}>]>>;
|
|
191
|
+
readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
|
|
192
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
193
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
194
|
+
readonly slug: import("effect/Schema").String;
|
|
195
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
196
|
+
}>, import("effect/Schema").Struct<{
|
|
197
|
+
readonly slug: import("effect/Schema").String;
|
|
198
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
199
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
200
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
201
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
202
|
+
readonly name: import("effect/Schema").String;
|
|
203
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
204
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
205
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
206
|
+
}>>;
|
|
207
|
+
}>, import("effect/Schema").Struct<{
|
|
208
|
+
readonly slug: import("effect/Schema").String;
|
|
209
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
210
|
+
}>]>>;
|
|
123
211
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never>, false>>;
|
package/dist/sdk/connection.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type McpConnection = {
|
|
|
8
8
|
readonly close: () => Promise<void>;
|
|
9
9
|
};
|
|
10
10
|
export type McpConnector = Effect.Effect<McpConnection, McpConnectionError>;
|
|
11
|
-
export type RemoteConnectorInput = Omit<McpRemoteIntegrationConfig, "
|
|
11
|
+
export type RemoteConnectorInput = Omit<McpRemoteIntegrationConfig, "authenticationTemplate" | "remoteTransport" | "headers" | "queryParams"> & {
|
|
12
12
|
readonly remoteTransport?: McpRemoteIntegrationConfig["remoteTransport"];
|
|
13
13
|
readonly headers?: Record<string, string>;
|
|
14
14
|
readonly queryParams?: Record<string, string>;
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { mcpPlugin, userFacingProbeMessage, type McpPluginExtension, type McpPluginOptions, type McpServerInput, type McpRemoteServerInput, type McpStdioServerInput, type McpProbeResult, type McpProbeEndpointInput, type McpExtensionFailure, } from "./plugin";
|
|
2
|
-
export {
|
|
2
|
+
export { McpAuthMethod, McpAuthMethodInput, McpAuthShorthand, McpIntegrationConfig, McpRemoteIntegrationConfig, McpStdioIntegrationConfig, McpRemoteTransport, McpTransport, McpToolAnnotations, McpToolBinding, parseMcpIntegrationConfig, } from "./types";
|
|
3
|
+
export { migrateMcpAuthConfig } from "./migrate-config";
|
|
4
|
+
export { variable, type ApiKeyAuthTemplate } from "@executor-js/sdk/http-auth";
|
|
3
5
|
export { McpConnectionError, McpToolDiscoveryError, McpInvocationError, McpOAuthError, } from "./errors";
|
|
4
6
|
export { deriveMcpNamespace, joinToolPath, extractManifestFromListToolsResult } from "./manifest";
|
package/dist/sdk/invoke.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import { type Elicit } from "@executor-js/sdk
|
|
2
|
+
import { type Elicit } from "@executor-js/sdk";
|
|
3
3
|
import { McpConnectionError, McpInvocationError } from "./errors";
|
|
4
4
|
import type { McpConnector } from "./connection";
|
|
5
5
|
export interface InvokeMcpToolInput {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Rewrite a stored MCP integration config blob into the canonical shape.
|
|
2
|
+
* Returns the rewritten config, or `null` when no rewrite is needed (already
|
|
3
|
+
* canonical, a stdio config, or not this plugin's shape at all). Throws
|
|
4
|
+
* nothing: an unmigratable blob also returns `null` and stays untouched.
|
|
5
|
+
* Idempotent — feeding the output back returns `null`. */
|
|
6
|
+
export declare const migrateMcpAuthConfig: (config: unknown) => unknown | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Effect, Layer, Schema } from "effect";
|
|
2
2
|
import type { HttpClient } from "effect/unstable/http";
|
|
3
|
-
import { IntegrationAlreadyExistsError, type AuthMethodDescriptor, type Integration, type IntegrationConfig, type IntegrationRecord, type StorageFailure } from "@executor-js/sdk
|
|
3
|
+
import { IntegrationAlreadyExistsError, type AuthMethodDescriptor, type Integration, type IntegrationConfig, type IntegrationRecord, type StorageFailure } from "@executor-js/sdk";
|
|
4
4
|
import { McpConnectionError, McpToolDiscoveryError } from "./errors";
|
|
5
5
|
import { type McpShapeProbeResult } from "./probe-shape";
|
|
6
|
-
import { type McpIntegrationConfig as McpIntegrationConfigType } from "./types";
|
|
6
|
+
import { type McpAuthMethod, type McpIntegrationConfig as McpIntegrationConfigType } from "./types";
|
|
7
7
|
declare const McpRemoteServerInputSchema: Schema.Struct<{
|
|
8
8
|
readonly transport: Schema.optional<Schema.Literal<"remote">>;
|
|
9
9
|
readonly name: Schema.String;
|
|
@@ -12,7 +12,28 @@ declare const McpRemoteServerInputSchema: Schema.Struct<{
|
|
|
12
12
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
13
13
|
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
14
14
|
readonly slug: Schema.optional<Schema.String>;
|
|
15
|
-
/**
|
|
15
|
+
/** Declared auth methods a connection can be applied through. */
|
|
16
|
+
readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
17
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
18
|
+
readonly kind: Schema.Literal<"none">;
|
|
19
|
+
}>, Schema.Struct<{
|
|
20
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
21
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
22
|
+
}>, Schema.Struct<{
|
|
23
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
24
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
25
|
+
readonly label: Schema.optional<Schema.String>;
|
|
26
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
27
|
+
readonly type: Schema.Literal<"variable">;
|
|
28
|
+
readonly name: Schema.String;
|
|
29
|
+
}>]>>]>>>;
|
|
30
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
31
|
+
readonly type: Schema.Literal<"variable">;
|
|
32
|
+
readonly name: Schema.String;
|
|
33
|
+
}>]>>]>>>;
|
|
34
|
+
}>]>>>;
|
|
35
|
+
/** Single-method shorthand (legacy callers). Ignored when
|
|
36
|
+
* `authenticationTemplate` is present. Defaults to none. */
|
|
16
37
|
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
17
38
|
readonly kind: Schema.Literal<"none">;
|
|
18
39
|
}>, Schema.Struct<{
|
|
@@ -40,7 +61,28 @@ declare const McpAddServerInputSchema: Schema.Union<readonly [Schema.Struct<{
|
|
|
40
61
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
41
62
|
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
42
63
|
readonly slug: Schema.optional<Schema.String>;
|
|
43
|
-
/**
|
|
64
|
+
/** Declared auth methods a connection can be applied through. */
|
|
65
|
+
readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
66
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
67
|
+
readonly kind: Schema.Literal<"none">;
|
|
68
|
+
}>, Schema.Struct<{
|
|
69
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
70
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
71
|
+
}>, Schema.Struct<{
|
|
72
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
73
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
74
|
+
readonly label: Schema.optional<Schema.String>;
|
|
75
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
76
|
+
readonly type: Schema.Literal<"variable">;
|
|
77
|
+
readonly name: Schema.String;
|
|
78
|
+
}>]>>]>>>;
|
|
79
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
80
|
+
readonly type: Schema.Literal<"variable">;
|
|
81
|
+
readonly name: Schema.String;
|
|
82
|
+
}>]>>]>>>;
|
|
83
|
+
}>]>>>;
|
|
84
|
+
/** Single-method shorthand (legacy callers). Ignored when
|
|
85
|
+
* `authenticationTemplate` is present. Defaults to none. */
|
|
44
86
|
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
45
87
|
readonly kind: Schema.Literal<"none">;
|
|
46
88
|
}>, Schema.Struct<{
|
|
@@ -59,6 +101,32 @@ declare const McpAddServerInputSchema: Schema.Union<readonly [Schema.Struct<{
|
|
|
59
101
|
readonly cwd: Schema.optional<Schema.String>;
|
|
60
102
|
readonly slug: Schema.optional<Schema.String>;
|
|
61
103
|
}>]>;
|
|
104
|
+
/** Input for the custom-method-create flow. `merge` (default) appends onto the
|
|
105
|
+
* integration's existing `authenticationTemplate`; `replace` swaps the whole
|
|
106
|
+
* declared set. Mirrors the OpenAPI/GraphQL `configureAuth` inputs. */
|
|
107
|
+
export declare const McpConfigureAuthInputSchema: Schema.Struct<{
|
|
108
|
+
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
109
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
110
|
+
readonly kind: Schema.Literal<"none">;
|
|
111
|
+
}>, Schema.Struct<{
|
|
112
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
113
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
114
|
+
}>, Schema.Struct<{
|
|
115
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
116
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
117
|
+
readonly label: Schema.optional<Schema.String>;
|
|
118
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
119
|
+
readonly type: Schema.Literal<"variable">;
|
|
120
|
+
readonly name: Schema.String;
|
|
121
|
+
}>]>>]>>>;
|
|
122
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
123
|
+
readonly type: Schema.Literal<"variable">;
|
|
124
|
+
readonly name: Schema.String;
|
|
125
|
+
}>]>>]>>>;
|
|
126
|
+
}>]>>;
|
|
127
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["merge", "replace"]>>;
|
|
128
|
+
}>;
|
|
129
|
+
export type McpConfigureAuthInput = typeof McpConfigureAuthInputSchema.Type;
|
|
62
130
|
declare const McpProbeEndpointInputSchema: Schema.Struct<{
|
|
63
131
|
readonly endpoint: Schema.String;
|
|
64
132
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
@@ -100,7 +168,7 @@ export interface McpPluginOptions {
|
|
|
100
168
|
readonly dangerouslyAllowStdioMCP?: boolean;
|
|
101
169
|
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
|
|
102
170
|
}
|
|
103
|
-
export declare const mcpPlugin: import("@executor-js/sdk
|
|
171
|
+
export declare const mcpPlugin: import("@executor-js/sdk").ConfiguredPlugin<"mcp", {
|
|
104
172
|
probeEndpoint: (input: string | McpProbeEndpointInput) => Effect.Effect<{
|
|
105
173
|
connected: true;
|
|
106
174
|
requiresAuthentication: false;
|
|
@@ -135,6 +203,24 @@ export declare const mcpPlugin: import("@executor-js/sdk/core").ConfiguredPlugin
|
|
|
135
203
|
removeServer: (slug: string) => Effect.Effect<void, StorageFailure, never>;
|
|
136
204
|
getServer: (slug: string) => Effect.Effect<IntegrationRecord | null, StorageFailure, never>;
|
|
137
205
|
configureServer: (slug: string, config: McpIntegrationConfigType) => Effect.Effect<void, StorageFailure, never>;
|
|
206
|
+
configureAuth: (slug: string, input: McpConfigureAuthInput) => Effect.Effect<readonly ({
|
|
207
|
+
readonly slug: string;
|
|
208
|
+
readonly kind: "apikey";
|
|
209
|
+
readonly placements: readonly {
|
|
210
|
+
readonly name: string;
|
|
211
|
+
readonly carrier: "header" | "query";
|
|
212
|
+
readonly variable?: string | undefined;
|
|
213
|
+
readonly prefix?: string | undefined;
|
|
214
|
+
readonly literal?: string | undefined;
|
|
215
|
+
}[];
|
|
216
|
+
readonly label?: string | undefined;
|
|
217
|
+
} | {
|
|
218
|
+
readonly slug: string;
|
|
219
|
+
readonly kind: "none";
|
|
220
|
+
} | {
|
|
221
|
+
readonly slug: string;
|
|
222
|
+
readonly kind: "oauth2";
|
|
223
|
+
})[], StorageFailure, never>;
|
|
138
224
|
}, {}, McpPluginOptions, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
139
225
|
export type McpExtensionFailure = McpConnectionError | McpToolDiscoveryError | StorageFailure;
|
|
140
226
|
export interface McpPluginExtension {
|
|
@@ -147,5 +233,6 @@ export interface McpPluginExtension {
|
|
|
147
233
|
readonly config: IntegrationConfig;
|
|
148
234
|
}) | null, McpExtensionFailure>;
|
|
149
235
|
readonly configureServer: (slug: string, config: McpIntegrationConfigType) => Effect.Effect<void, McpExtensionFailure>;
|
|
236
|
+
readonly configureAuth: (slug: string, input: McpConfigureAuthInput) => Effect.Effect<readonly McpAuthMethod[], McpExtensionFailure>;
|
|
150
237
|
}
|
|
151
238
|
export {};
|