@executor-js/plugin-mcp 1.4.32 → 1.5.0
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 +602 -0
- package/dist/AddMcpSource-4LLERUW5.js.map +1 -0
- package/dist/EditMcpSource-GKJRP75X.js +313 -0
- package/dist/EditMcpSource-GKJRP75X.js.map +1 -0
- package/dist/McpAccountsPanel-UX7MHEIG.js +132 -0
- package/dist/McpAccountsPanel-UX7MHEIG.js.map +1 -0
- package/dist/api/group.d.ts +79 -143
- package/dist/api/index.d.ts +99 -155
- package/dist/chunk-2TXHTMKM.js +1298 -0
- package/dist/chunk-2TXHTMKM.js.map +1 -0
- package/dist/chunk-6OEQZ72N.js +124 -0
- package/dist/chunk-6OEQZ72N.js.map +1 -0
- package/dist/chunk-7FJ3PUUL.js +21 -0
- package/dist/chunk-7FJ3PUUL.js.map +1 -0
- package/dist/chunk-N4EAF5CA.js +146 -0
- package/dist/chunk-N4EAF5CA.js.map +1 -0
- package/dist/client.js +9 -9
- package/dist/client.js.map +1 -1
- package/dist/core.js +36 -26
- package/dist/index.js +2 -2
- package/dist/promise.d.ts +1 -1
- package/dist/react/AddMcpSource.d.ts +1 -1
- package/dist/react/McpAccountsPanel.d.ts +6 -0
- package/dist/react/McpRemoteSourceFields.d.ts +4 -2
- package/dist/react/McpSignInButton.d.ts +2 -0
- package/dist/react/atoms.d.ts +93 -313
- package/dist/react/auth-method-config.d.ts +8 -0
- package/dist/react/client.d.ts +78 -142
- package/dist/react/index.d.ts +3 -3
- package/dist/react/source-plugin.d.ts +5 -5
- package/dist/sdk/connection.d.ts +4 -4
- package/dist/sdk/errors.d.ts +0 -19
- package/dist/sdk/index.d.ts +4 -3
- package/dist/sdk/invoke.d.ts +9 -16
- package/dist/sdk/plugin.d.ts +101 -236
- package/dist/sdk/types.d.ts +25 -130
- package/package.json +5 -4
- package/dist/AddMcpSource-PADMBVX2.js +0 -688
- package/dist/AddMcpSource-PADMBVX2.js.map +0 -1
- package/dist/EditMcpSource-L5GC2B4J.js +0 -281
- package/dist/EditMcpSource-L5GC2B4J.js.map +0 -1
- package/dist/McpSourceSummary-LE3WXFUE.js +0 -170
- package/dist/McpSourceSummary-LE3WXFUE.js.map +0 -1
- package/dist/chunk-6OYEXHU3.js +0 -156
- package/dist/chunk-6OYEXHU3.js.map +0 -1
- package/dist/chunk-FMTVLO5L.js +0 -179
- package/dist/chunk-FMTVLO5L.js.map +0 -1
- package/dist/chunk-LEGVPKYH.js +0 -2391
- package/dist/chunk-LEGVPKYH.js.map +0 -1
- package/dist/chunk-ZIRGIRGP.js +0 -115
- package/dist/chunk-ZIRGIRGP.js.map +0 -1
- package/dist/react/McpSourceSummary.d.ts +0 -5
- package/dist/sdk/binding-store.d.ts +0 -31
- package/dist/sdk/stored-source.d.ts +0 -42
- /package/dist/{sdk/connection-pool.test.d.ts → react/auth-method-config.test.d.ts} +0 -0
- /package/dist/sdk/{cross-user-isolation.test.d.ts → describe-auth-methods.test.d.ts} +0 -0
- /package/dist/sdk/{per-user-auth-isolation.test.d.ts → owner-isolation.test.d.ts} +0 -0
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -1,286 +1,151 @@
|
|
|
1
1
|
import { Effect, Layer, Schema } from "effect";
|
|
2
2
|
import type { HttpClient } from "effect/unstable/http";
|
|
3
|
-
import { type StorageFailure } from "@executor-js/sdk
|
|
4
|
-
import { OAuth2SourceConfig } from "@executor-js/sdk/http-source";
|
|
5
|
-
import { type McpBindingStore, type McpStoredSource } from "./binding-store";
|
|
3
|
+
import { IntegrationAlreadyExistsError, type AuthMethodDescriptor, type Integration, type IntegrationConfig, type IntegrationRecord, type StorageFailure } from "@executor-js/sdk";
|
|
6
4
|
import { McpConnectionError, McpToolDiscoveryError } from "./errors";
|
|
7
5
|
import { type McpShapeProbeResult } from "./probe-shape";
|
|
8
|
-
import { type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
export interface McpRemoteSourceConfig extends McpSourceScopeField {
|
|
20
|
-
readonly transport: "remote";
|
|
21
|
-
readonly name: string;
|
|
22
|
-
readonly endpoint: string;
|
|
23
|
-
readonly remoteTransport?: "streamable-http" | "sse" | "auto";
|
|
24
|
-
readonly queryParams?: Record<string, McpConfiguredValueInputType>;
|
|
25
|
-
readonly headers?: Record<string, McpConfiguredValueInputType>;
|
|
26
|
-
readonly namespace?: string;
|
|
27
|
-
readonly oauth2?: OAuth2SourceConfig;
|
|
28
|
-
readonly credentials?: McpInitialCredentialsInput;
|
|
29
|
-
}
|
|
30
|
-
export interface McpStdioSourceConfig extends McpSourceScopeField {
|
|
31
|
-
readonly transport: "stdio";
|
|
32
|
-
readonly name: string;
|
|
33
|
-
readonly command: string;
|
|
34
|
-
readonly args?: string[];
|
|
35
|
-
readonly env?: Record<string, string>;
|
|
36
|
-
readonly cwd?: string;
|
|
37
|
-
readonly namespace?: string;
|
|
38
|
-
}
|
|
39
|
-
export type McpSourceConfig = McpRemoteSourceConfig | McpStdioSourceConfig;
|
|
40
|
-
export interface McpProbeResult {
|
|
41
|
-
readonly connected: boolean;
|
|
42
|
-
readonly requiresOAuth: boolean;
|
|
43
|
-
readonly supportsDynamicRegistration: boolean;
|
|
44
|
-
readonly name: string;
|
|
45
|
-
readonly namespace: string;
|
|
46
|
-
readonly toolCount: number | null;
|
|
47
|
-
readonly serverName: string | null;
|
|
48
|
-
}
|
|
49
|
-
declare const McpConfigureSourceInputSchema: Schema.Struct<{
|
|
50
|
-
readonly name: Schema.optional<Schema.String>;
|
|
51
|
-
readonly endpoint: Schema.optional<Schema.String>;
|
|
52
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
53
|
-
readonly kind: Schema.Literal<"text">;
|
|
54
|
-
readonly text: Schema.String;
|
|
55
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
56
|
-
}>, Schema.Struct<{
|
|
57
|
-
readonly kind: Schema.Literal<"secret">;
|
|
58
|
-
readonly secretId: Schema.String;
|
|
59
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
60
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
61
|
-
}>, Schema.Struct<{
|
|
62
|
-
readonly kind: Schema.Literal<"connection">;
|
|
63
|
-
readonly connectionId: Schema.String;
|
|
64
|
-
}>]>>>;
|
|
65
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
66
|
-
readonly kind: Schema.Literal<"text">;
|
|
67
|
-
readonly text: Schema.String;
|
|
68
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
69
|
-
}>, Schema.Struct<{
|
|
70
|
-
readonly kind: Schema.Literal<"secret">;
|
|
71
|
-
readonly secretId: Schema.String;
|
|
72
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
73
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
74
|
-
}>, Schema.Struct<{
|
|
75
|
-
readonly kind: Schema.Literal<"connection">;
|
|
76
|
-
readonly connectionId: Schema.String;
|
|
77
|
-
}>]>>>;
|
|
6
|
+
import { type McpIntegrationConfig as McpIntegrationConfigType } from "./types";
|
|
7
|
+
declare const McpRemoteServerInputSchema: Schema.Struct<{
|
|
8
|
+
readonly transport: Schema.optional<Schema.Literal<"remote">>;
|
|
9
|
+
readonly name: Schema.String;
|
|
10
|
+
readonly endpoint: Schema.String;
|
|
11
|
+
readonly remoteTransport: Schema.optional<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>;
|
|
12
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
13
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
14
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
15
|
+
/** How a connection's value is applied to requests. Defaults to none. */
|
|
78
16
|
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
79
17
|
readonly kind: Schema.Literal<"none">;
|
|
80
18
|
}>, Schema.Struct<{
|
|
81
|
-
readonly
|
|
82
|
-
|
|
83
|
-
readonly kind: Schema.Literal<"text">;
|
|
84
|
-
readonly text: Schema.String;
|
|
85
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
86
|
-
}>, Schema.Struct<{
|
|
87
|
-
readonly kind: Schema.Literal<"secret">;
|
|
88
|
-
readonly secretId: Schema.String;
|
|
89
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
90
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
91
|
-
}>, Schema.Struct<{
|
|
92
|
-
readonly kind: Schema.Literal<"connection">;
|
|
93
|
-
readonly connectionId: Schema.String;
|
|
94
|
-
}>]>>;
|
|
95
|
-
readonly clientSecret: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
96
|
-
readonly kind: Schema.Literal<"text">;
|
|
97
|
-
readonly text: Schema.String;
|
|
98
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
99
|
-
}>, Schema.Struct<{
|
|
100
|
-
readonly kind: Schema.Literal<"secret">;
|
|
101
|
-
readonly secretId: Schema.String;
|
|
102
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
103
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
104
|
-
}>, Schema.Struct<{
|
|
105
|
-
readonly kind: Schema.Literal<"connection">;
|
|
106
|
-
readonly connectionId: Schema.String;
|
|
107
|
-
}>]>>>;
|
|
108
|
-
readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
109
|
-
readonly kind: Schema.Literal<"text">;
|
|
110
|
-
readonly text: Schema.String;
|
|
111
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
112
|
-
}>, Schema.Struct<{
|
|
113
|
-
readonly kind: Schema.Literal<"secret">;
|
|
114
|
-
readonly secretId: Schema.String;
|
|
115
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
116
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
117
|
-
}>, Schema.Struct<{
|
|
118
|
-
readonly kind: Schema.Literal<"connection">;
|
|
119
|
-
readonly connectionId: Schema.String;
|
|
120
|
-
}>]>>;
|
|
121
|
-
}>>;
|
|
122
|
-
}>]>>;
|
|
123
|
-
readonly scope: Schema.String;
|
|
124
|
-
}>;
|
|
125
|
-
export type McpConfigureSourceInput = typeof McpConfigureSourceInputSchema.Type;
|
|
126
|
-
declare const McpInitialCredentialsInputSchema: Schema.Struct<{
|
|
127
|
-
readonly scope: Schema.String;
|
|
128
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
129
|
-
readonly kind: Schema.Literal<"text">;
|
|
130
|
-
readonly text: Schema.String;
|
|
131
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
132
|
-
}>, Schema.Struct<{
|
|
133
|
-
readonly kind: Schema.Literal<"secret">;
|
|
134
|
-
readonly secretId: Schema.String;
|
|
135
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
136
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
137
|
-
}>, Schema.Struct<{
|
|
138
|
-
readonly kind: Schema.Literal<"connection">;
|
|
139
|
-
readonly connectionId: Schema.String;
|
|
140
|
-
}>]>>>;
|
|
141
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
142
|
-
readonly kind: Schema.Literal<"text">;
|
|
143
|
-
readonly text: Schema.String;
|
|
144
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
145
|
-
}>, Schema.Struct<{
|
|
146
|
-
readonly kind: Schema.Literal<"secret">;
|
|
147
|
-
readonly secretId: Schema.String;
|
|
148
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
19
|
+
readonly kind: Schema.Literal<"header">;
|
|
20
|
+
readonly headerName: Schema.String;
|
|
149
21
|
readonly prefix: Schema.optional<Schema.String>;
|
|
150
22
|
}>, Schema.Struct<{
|
|
151
|
-
readonly kind: Schema.Literal<"
|
|
152
|
-
|
|
153
|
-
|
|
23
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
24
|
+
}>]>>;
|
|
25
|
+
}>;
|
|
26
|
+
declare const McpStdioServerInputSchema: Schema.Struct<{
|
|
27
|
+
readonly transport: Schema.Literal<"stdio">;
|
|
28
|
+
readonly name: Schema.String;
|
|
29
|
+
readonly command: Schema.String;
|
|
30
|
+
readonly args: Schema.optional<Schema.$Array<Schema.String>>;
|
|
31
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
32
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
33
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
34
|
+
}>;
|
|
35
|
+
declare const McpAddServerInputSchema: Schema.Union<readonly [Schema.Struct<{
|
|
36
|
+
readonly transport: Schema.optional<Schema.Literal<"remote">>;
|
|
37
|
+
readonly name: Schema.String;
|
|
38
|
+
readonly endpoint: Schema.String;
|
|
39
|
+
readonly remoteTransport: Schema.optional<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>;
|
|
40
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
41
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
42
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
43
|
+
/** How a connection's value is applied to requests. Defaults to none. */
|
|
154
44
|
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
155
45
|
readonly kind: Schema.Literal<"none">;
|
|
156
46
|
}>, Schema.Struct<{
|
|
157
|
-
readonly
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}>, Schema.Struct<{
|
|
163
|
-
readonly kind: Schema.Literal<"secret">;
|
|
164
|
-
readonly secretId: Schema.String;
|
|
165
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
166
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
167
|
-
}>, Schema.Struct<{
|
|
168
|
-
readonly kind: Schema.Literal<"connection">;
|
|
169
|
-
readonly connectionId: Schema.String;
|
|
170
|
-
}>]>>;
|
|
171
|
-
readonly clientSecret: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
172
|
-
readonly kind: Schema.Literal<"text">;
|
|
173
|
-
readonly text: Schema.String;
|
|
174
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
175
|
-
}>, Schema.Struct<{
|
|
176
|
-
readonly kind: Schema.Literal<"secret">;
|
|
177
|
-
readonly secretId: Schema.String;
|
|
178
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
179
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
180
|
-
}>, Schema.Struct<{
|
|
181
|
-
readonly kind: Schema.Literal<"connection">;
|
|
182
|
-
readonly connectionId: Schema.String;
|
|
183
|
-
}>]>>>;
|
|
184
|
-
readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
185
|
-
readonly kind: Schema.Literal<"text">;
|
|
186
|
-
readonly text: Schema.String;
|
|
187
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
188
|
-
}>, Schema.Struct<{
|
|
189
|
-
readonly kind: Schema.Literal<"secret">;
|
|
190
|
-
readonly secretId: Schema.String;
|
|
191
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
192
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
193
|
-
}>, Schema.Struct<{
|
|
194
|
-
readonly kind: Schema.Literal<"connection">;
|
|
195
|
-
readonly connectionId: Schema.String;
|
|
196
|
-
}>]>>;
|
|
197
|
-
}>>;
|
|
47
|
+
readonly kind: Schema.Literal<"header">;
|
|
48
|
+
readonly headerName: Schema.String;
|
|
49
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
50
|
+
}>, Schema.Struct<{
|
|
51
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
198
52
|
}>]>>;
|
|
199
|
-
}
|
|
200
|
-
|
|
53
|
+
}>, Schema.Struct<{
|
|
54
|
+
readonly transport: Schema.Literal<"stdio">;
|
|
55
|
+
readonly name: Schema.String;
|
|
56
|
+
readonly command: Schema.String;
|
|
57
|
+
readonly args: Schema.optional<Schema.$Array<Schema.String>>;
|
|
58
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
59
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
60
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
61
|
+
}>]>;
|
|
201
62
|
declare const McpProbeEndpointInputSchema: Schema.Struct<{
|
|
202
63
|
readonly endpoint: Schema.String;
|
|
203
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
readonly
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
64
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
65
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
66
|
+
}>;
|
|
67
|
+
declare const McpProbeEndpointOutputSchema: Schema.Struct<{
|
|
68
|
+
readonly connected: Schema.Boolean;
|
|
69
|
+
readonly requiresAuthentication: Schema.Boolean;
|
|
70
|
+
readonly requiresOAuth: Schema.Boolean;
|
|
71
|
+
readonly supportsDynamicRegistration: Schema.Boolean;
|
|
72
|
+
readonly name: Schema.String;
|
|
73
|
+
readonly slug: Schema.String;
|
|
74
|
+
readonly toolCount: Schema.NullOr<Schema.Number>;
|
|
75
|
+
readonly serverName: Schema.NullOr<Schema.String>;
|
|
211
76
|
}>;
|
|
77
|
+
export type McpRemoteServerInput = typeof McpRemoteServerInputSchema.Type;
|
|
78
|
+
export type McpStdioServerInput = typeof McpStdioServerInputSchema.Type;
|
|
79
|
+
export type McpServerInput = typeof McpAddServerInputSchema.Type;
|
|
80
|
+
export type McpProbeResult = typeof McpProbeEndpointOutputSchema.Type;
|
|
212
81
|
export type McpProbeEndpointInput = typeof McpProbeEndpointInputSchema.Type;
|
|
213
82
|
/** Translate a non-MCP probe outcome into a message a user can act on.
|
|
214
|
-
*
|
|
215
|
-
* MCP auth challenge`, etc.) stays in telemetry via the probe span; the
|
|
216
|
-
* user gets a sentence pointing at their next step. Exported for tests. */
|
|
83
|
+
* Exported for tests. */
|
|
217
84
|
export declare const userFacingProbeMessage: (shape: Extract<McpShapeProbeResult, {
|
|
218
85
|
kind: "not-mcp";
|
|
219
86
|
} | {
|
|
220
87
|
kind: "unreachable";
|
|
221
88
|
}>) => string;
|
|
89
|
+
export declare const describeMcpAuthMethods: (record: IntegrationRecord) => readonly AuthMethodDescriptor[];
|
|
90
|
+
export declare const describeMcpIntegrationDisplay: (record: IntegrationRecord) => {
|
|
91
|
+
readonly url?: string;
|
|
92
|
+
};
|
|
222
93
|
export interface McpPluginOptions {
|
|
223
94
|
/**
|
|
224
|
-
* Allow configuring stdio-transport MCP
|
|
95
|
+
* Allow configuring stdio-transport MCP servers. Off by default.
|
|
225
96
|
*
|
|
226
|
-
* Stdio
|
|
97
|
+
* Stdio servers spawn a local subprocess that inherits the parent
|
|
227
98
|
* `process.env`. Only enable for trusted single-user contexts.
|
|
228
99
|
*/
|
|
229
100
|
readonly dangerouslyAllowStdioMCP?: boolean;
|
|
230
101
|
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
|
|
231
|
-
/** If provided, source add/remove is mirrored to executor.jsonc
|
|
232
|
-
* (best-effort — file errors are logged, not raised). */
|
|
233
|
-
readonly configFile?: ConfigFileSink;
|
|
234
102
|
}
|
|
235
|
-
export declare const mcpPlugin: import("@executor-js/sdk
|
|
103
|
+
export declare const mcpPlugin: import("@executor-js/sdk").ConfiguredPlugin<"mcp", {
|
|
236
104
|
probeEndpoint: (input: string | McpProbeEndpointInput) => Effect.Effect<{
|
|
237
105
|
connected: true;
|
|
106
|
+
requiresAuthentication: false;
|
|
238
107
|
requiresOAuth: false;
|
|
239
108
|
supportsDynamicRegistration: false;
|
|
240
109
|
name: string;
|
|
241
|
-
|
|
110
|
+
slug: string;
|
|
242
111
|
toolCount: number;
|
|
243
112
|
serverName: string | null;
|
|
244
113
|
} | {
|
|
245
114
|
connected: false;
|
|
115
|
+
requiresAuthentication: true;
|
|
246
116
|
requiresOAuth: true;
|
|
247
117
|
supportsDynamicRegistration: boolean;
|
|
248
118
|
name: string;
|
|
249
|
-
|
|
119
|
+
slug: string;
|
|
250
120
|
toolCount: null;
|
|
251
121
|
serverName: null;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
toolCount:
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
* `StorageError` to the opaque `InternalError({ traceId })` at Layer
|
|
270
|
-
* composition. `UniqueViolationError` passes through — plugins can
|
|
271
|
-
* `Effect.catchTag` it if they want a friendlier user-facing error.
|
|
272
|
-
*/
|
|
122
|
+
} | {
|
|
123
|
+
connected: false;
|
|
124
|
+
requiresAuthentication: true;
|
|
125
|
+
requiresOAuth: false;
|
|
126
|
+
supportsDynamicRegistration: false;
|
|
127
|
+
name: string;
|
|
128
|
+
slug: string;
|
|
129
|
+
toolCount: null;
|
|
130
|
+
serverName: null;
|
|
131
|
+
}, McpConnectionError, never>;
|
|
132
|
+
addServer: (input: McpServerInput) => Effect.Effect<{
|
|
133
|
+
slug: string;
|
|
134
|
+
}, StorageFailure | IntegrationAlreadyExistsError, never>;
|
|
135
|
+
removeServer: (slug: string) => Effect.Effect<void, StorageFailure, never>;
|
|
136
|
+
getServer: (slug: string) => Effect.Effect<IntegrationRecord | null, StorageFailure, never>;
|
|
137
|
+
configureServer: (slug: string, config: McpIntegrationConfigType) => Effect.Effect<void, StorageFailure, never>;
|
|
138
|
+
}, {}, McpPluginOptions, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
273
139
|
export type McpExtensionFailure = McpConnectionError | McpToolDiscoveryError | StorageFailure;
|
|
274
140
|
export interface McpPluginExtension {
|
|
275
141
|
readonly probeEndpoint: (input: string | McpProbeEndpointInput) => Effect.Effect<McpProbeResult, McpExtensionFailure>;
|
|
276
|
-
readonly
|
|
277
|
-
readonly
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
readonly
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
readonly getSource: (namespace: string, scope: string) => Effect.Effect<McpStoredSource | null, McpExtensionFailure>;
|
|
142
|
+
readonly addServer: (input: McpServerInput) => Effect.Effect<{
|
|
143
|
+
readonly slug: string;
|
|
144
|
+
}, McpExtensionFailure | IntegrationAlreadyExistsError>;
|
|
145
|
+
readonly removeServer: (slug: string) => Effect.Effect<void, McpExtensionFailure>;
|
|
146
|
+
readonly getServer: (slug: string) => Effect.Effect<(Integration & {
|
|
147
|
+
readonly config: IntegrationConfig;
|
|
148
|
+
}) | null, McpExtensionFailure>;
|
|
149
|
+
readonly configureServer: (slug: string, config: McpIntegrationConfigType) => Effect.Effect<void, McpExtensionFailure>;
|
|
285
150
|
}
|
|
286
151
|
export {};
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1,140 +1,42 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { SecretBackedMap, SecretBackedValue } from "@executor-js/sdk/shared";
|
|
3
|
-
export { SecretBackedMap, SecretBackedValue };
|
|
4
2
|
export declare const McpRemoteTransport: Schema.Literals<readonly ["streamable-http", "sse", "auto"]>;
|
|
5
3
|
export type McpRemoteTransport = typeof McpRemoteTransport.Type;
|
|
6
4
|
/** All transport types (used in the connector layer) */
|
|
7
5
|
export declare const McpTransport: Schema.Literals<readonly ["streamable-http", "sse", "stdio", "auto"]>;
|
|
8
6
|
export type McpTransport = typeof McpTransport.Type;
|
|
9
|
-
export declare const
|
|
10
|
-
readonly kind: Schema.Literal<"binding">;
|
|
11
|
-
readonly slot: Schema.String;
|
|
12
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
13
|
-
}>]>;
|
|
14
|
-
export type ConfiguredMcpCredentialValue = typeof ConfiguredMcpCredentialValue.Type;
|
|
15
|
-
export declare const McpConfiguredValueInput: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
16
|
-
readonly kind: Schema.Literal<"secret">;
|
|
17
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
18
|
-
}>]>;
|
|
19
|
-
export type McpConfiguredValueInput = typeof McpConfiguredValueInput.Type;
|
|
20
|
-
export declare const McpCredentialInput: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
21
|
-
readonly kind: Schema.Literal<"text">;
|
|
22
|
-
readonly text: Schema.String;
|
|
23
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
24
|
-
}>, Schema.Struct<{
|
|
25
|
-
readonly kind: Schema.Literal<"secret">;
|
|
26
|
-
readonly secretId: Schema.String;
|
|
27
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
28
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
29
|
-
}>, Schema.Struct<{
|
|
30
|
-
readonly kind: Schema.Literal<"connection">;
|
|
31
|
-
readonly connectionId: Schema.String;
|
|
32
|
-
}>]>;
|
|
33
|
-
export type McpCredentialInput = typeof McpCredentialInput.Type;
|
|
34
|
-
export declare const mcpHeaderSlot: (name: string) => string;
|
|
35
|
-
export declare const mcpQueryParamSlot: (name: string) => string;
|
|
36
|
-
export declare const MCP_HEADER_AUTH_SLOT = "auth:header";
|
|
37
|
-
export declare const MCP_OAUTH_CONNECTION_SLOT = "auth:oauth2:connection";
|
|
38
|
-
export declare const MCP_OAUTH_CLIENT_ID_SLOT = "auth:oauth2:client-id";
|
|
39
|
-
export declare const MCP_OAUTH_CLIENT_SECRET_SLOT = "auth:oauth2:client-secret";
|
|
40
|
-
/** JSON object loosely typed — used for opaque OAuth state we just round-trip. */
|
|
41
|
-
declare const JsonObject: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
42
|
-
export { JsonObject as McpJsonObject };
|
|
43
|
-
export declare const McpConnectionAuth: Schema.Union<readonly [Schema.Struct<{
|
|
7
|
+
export declare const McpAuthTemplate: Schema.Union<readonly [Schema.Struct<{
|
|
44
8
|
readonly kind: Schema.Literal<"none">;
|
|
45
9
|
}>, Schema.Struct<{
|
|
46
10
|
readonly kind: Schema.Literal<"header">;
|
|
47
11
|
readonly headerName: Schema.String;
|
|
48
|
-
readonly secretSlot: Schema.String;
|
|
49
12
|
readonly prefix: Schema.optional<Schema.String>;
|
|
50
13
|
}>, Schema.Struct<{
|
|
51
14
|
readonly kind: Schema.Literal<"oauth2">;
|
|
52
|
-
readonly connectionSlot: Schema.String;
|
|
53
|
-
readonly clientIdSlot: Schema.optional<Schema.String>;
|
|
54
|
-
readonly clientSecretSlot: Schema.optional<Schema.String>;
|
|
55
15
|
}>]>;
|
|
56
|
-
export type
|
|
57
|
-
export declare const
|
|
58
|
-
readonly kind: Schema.Literal<"none">;
|
|
59
|
-
}>, Schema.Struct<{
|
|
60
|
-
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
61
|
-
readonly clientId: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
62
|
-
readonly kind: Schema.Literal<"text">;
|
|
63
|
-
readonly text: Schema.String;
|
|
64
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
65
|
-
}>, Schema.Struct<{
|
|
66
|
-
readonly kind: Schema.Literal<"secret">;
|
|
67
|
-
readonly secretId: Schema.String;
|
|
68
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
69
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
70
|
-
}>, Schema.Struct<{
|
|
71
|
-
readonly kind: Schema.Literal<"connection">;
|
|
72
|
-
readonly connectionId: Schema.String;
|
|
73
|
-
}>]>>;
|
|
74
|
-
readonly clientSecret: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
75
|
-
readonly kind: Schema.Literal<"text">;
|
|
76
|
-
readonly text: Schema.String;
|
|
77
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
78
|
-
}>, Schema.Struct<{
|
|
79
|
-
readonly kind: Schema.Literal<"secret">;
|
|
80
|
-
readonly secretId: Schema.String;
|
|
81
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
82
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
83
|
-
}>, Schema.Struct<{
|
|
84
|
-
readonly kind: Schema.Literal<"connection">;
|
|
85
|
-
readonly connectionId: Schema.String;
|
|
86
|
-
}>]>>>;
|
|
87
|
-
readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
88
|
-
readonly kind: Schema.Literal<"text">;
|
|
89
|
-
readonly text: Schema.String;
|
|
90
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
91
|
-
}>, Schema.Struct<{
|
|
92
|
-
readonly kind: Schema.Literal<"secret">;
|
|
93
|
-
readonly secretId: Schema.String;
|
|
94
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
95
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
96
|
-
}>, Schema.Struct<{
|
|
97
|
-
readonly kind: Schema.Literal<"connection">;
|
|
98
|
-
readonly connectionId: Schema.String;
|
|
99
|
-
}>]>>;
|
|
100
|
-
}>>;
|
|
101
|
-
}>]>;
|
|
102
|
-
export type McpConnectionAuthInput = typeof McpConnectionAuthInput.Type;
|
|
103
|
-
export declare const McpRemoteSourceData: Schema.Struct<{
|
|
16
|
+
export type McpAuthTemplate = typeof McpAuthTemplate.Type;
|
|
17
|
+
export declare const McpRemoteIntegrationConfig: Schema.Struct<{
|
|
104
18
|
readonly transport: Schema.Literal<"remote">;
|
|
105
19
|
/** The MCP server endpoint URL */
|
|
106
20
|
readonly endpoint: Schema.String;
|
|
107
|
-
/** Transport preference for this remote
|
|
21
|
+
/** Transport preference for this remote server */
|
|
108
22
|
readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
109
|
-
/**
|
|
110
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}>]>>>;
|
|
115
|
-
/** Extra headers sent on every request */
|
|
116
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
117
|
-
readonly kind: Schema.Literal<"binding">;
|
|
118
|
-
readonly slot: Schema.String;
|
|
119
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
120
|
-
}>]>>>;
|
|
121
|
-
/** Auth configuration */
|
|
23
|
+
/** Static query params appended to the endpoint URL (non-credential) */
|
|
24
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
25
|
+
/** Static headers sent on every request (non-credential) */
|
|
26
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
27
|
+
/** Auth template — how the connection's value is rendered onto requests */
|
|
122
28
|
readonly auth: Schema.Union<readonly [Schema.Struct<{
|
|
123
29
|
readonly kind: Schema.Literal<"none">;
|
|
124
30
|
}>, Schema.Struct<{
|
|
125
31
|
readonly kind: Schema.Literal<"header">;
|
|
126
32
|
readonly headerName: Schema.String;
|
|
127
|
-
readonly secretSlot: Schema.String;
|
|
128
33
|
readonly prefix: Schema.optional<Schema.String>;
|
|
129
34
|
}>, Schema.Struct<{
|
|
130
35
|
readonly kind: Schema.Literal<"oauth2">;
|
|
131
|
-
readonly connectionSlot: Schema.String;
|
|
132
|
-
readonly clientIdSlot: Schema.optional<Schema.String>;
|
|
133
|
-
readonly clientSecretSlot: Schema.optional<Schema.String>;
|
|
134
36
|
}>]>;
|
|
135
37
|
}>;
|
|
136
|
-
export type
|
|
137
|
-
export declare const
|
|
38
|
+
export type McpRemoteIntegrationConfig = typeof McpRemoteIntegrationConfig.Type;
|
|
39
|
+
export declare const McpStdioIntegrationConfig: Schema.Struct<{
|
|
138
40
|
readonly transport: Schema.Literal<"stdio">;
|
|
139
41
|
/** The command to run */
|
|
140
42
|
readonly command: Schema.String;
|
|
@@ -145,38 +47,26 @@ export declare const McpStdioSourceData: Schema.Struct<{
|
|
|
145
47
|
/** Working directory */
|
|
146
48
|
readonly cwd: Schema.optional<Schema.String>;
|
|
147
49
|
}>;
|
|
148
|
-
export type
|
|
149
|
-
export declare const
|
|
50
|
+
export type McpStdioIntegrationConfig = typeof McpStdioIntegrationConfig.Type;
|
|
51
|
+
export declare const McpIntegrationConfig: Schema.Union<readonly [Schema.Struct<{
|
|
150
52
|
readonly transport: Schema.Literal<"remote">;
|
|
151
53
|
/** The MCP server endpoint URL */
|
|
152
54
|
readonly endpoint: Schema.String;
|
|
153
|
-
/** Transport preference for this remote
|
|
55
|
+
/** Transport preference for this remote server */
|
|
154
56
|
readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
155
|
-
/**
|
|
156
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}>]>>>;
|
|
161
|
-
/** Extra headers sent on every request */
|
|
162
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
163
|
-
readonly kind: Schema.Literal<"binding">;
|
|
164
|
-
readonly slot: Schema.String;
|
|
165
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
166
|
-
}>]>>>;
|
|
167
|
-
/** Auth configuration */
|
|
57
|
+
/** Static query params appended to the endpoint URL (non-credential) */
|
|
58
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
59
|
+
/** Static headers sent on every request (non-credential) */
|
|
60
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
61
|
+
/** Auth template — how the connection's value is rendered onto requests */
|
|
168
62
|
readonly auth: Schema.Union<readonly [Schema.Struct<{
|
|
169
63
|
readonly kind: Schema.Literal<"none">;
|
|
170
64
|
}>, Schema.Struct<{
|
|
171
65
|
readonly kind: Schema.Literal<"header">;
|
|
172
66
|
readonly headerName: Schema.String;
|
|
173
|
-
readonly secretSlot: Schema.String;
|
|
174
67
|
readonly prefix: Schema.optional<Schema.String>;
|
|
175
68
|
}>, Schema.Struct<{
|
|
176
69
|
readonly kind: Schema.Literal<"oauth2">;
|
|
177
|
-
readonly connectionSlot: Schema.String;
|
|
178
|
-
readonly clientIdSlot: Schema.optional<Schema.String>;
|
|
179
|
-
readonly clientSecretSlot: Schema.optional<Schema.String>;
|
|
180
70
|
}>]>;
|
|
181
71
|
}>, Schema.Struct<{
|
|
182
72
|
readonly transport: Schema.Literal<"stdio">;
|
|
@@ -189,7 +79,10 @@ export declare const McpStoredSourceData: Schema.Union<readonly [Schema.Struct<{
|
|
|
189
79
|
/** Working directory */
|
|
190
80
|
readonly cwd: Schema.optional<Schema.String>;
|
|
191
81
|
}>]>;
|
|
192
|
-
export type
|
|
82
|
+
export type McpIntegrationConfig = typeof McpIntegrationConfig.Type;
|
|
83
|
+
/** Parse an opaque integration `config` blob into a typed MCP config, or null
|
|
84
|
+
* if it isn't this plugin's shape. */
|
|
85
|
+
export declare const parseMcpIntegrationConfig: (config: unknown) => McpIntegrationConfig | null;
|
|
193
86
|
export declare const McpToolAnnotations: Schema.Struct<{
|
|
194
87
|
readonly title: Schema.optional<Schema.String>;
|
|
195
88
|
readonly readOnlyHint: Schema.optional<Schema.Boolean>;
|
|
@@ -199,7 +92,9 @@ export declare const McpToolAnnotations: Schema.Struct<{
|
|
|
199
92
|
}>;
|
|
200
93
|
export type McpToolAnnotations = typeof McpToolAnnotations.Type;
|
|
201
94
|
export declare const McpToolBinding: Schema.Struct<{
|
|
95
|
+
/** Sanitized, address-safe tool name (the `<tool>` address segment). */
|
|
202
96
|
readonly toolId: Schema.String;
|
|
97
|
+
/** The real MCP tool name as advertised by the server. */
|
|
203
98
|
readonly toolName: Schema.String;
|
|
204
99
|
readonly description: Schema.NullOr<Schema.String>;
|
|
205
100
|
readonly inputSchema: Schema.optional<Schema.Unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executor-js/plugin-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/mcp",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/RhysSullivan/executor/issues"
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@cfworker/json-schema": "^4.1.1",
|
|
56
56
|
"@effect/platform-node": "4.0.0-beta.59",
|
|
57
|
-
"@executor-js/config": "1.
|
|
58
|
-
"@executor-js/sdk": "1.
|
|
57
|
+
"@executor-js/config": "1.5.0",
|
|
58
|
+
"@executor-js/sdk": "1.5.0",
|
|
59
59
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
60
|
-
"effect": "4.0.0-beta.59",
|
|
61
60
|
"zod": "^4.3.6"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
@@ -66,6 +65,7 @@
|
|
|
66
65
|
"@types/node": "^24.3.1",
|
|
67
66
|
"@types/react": "^19.1.0",
|
|
68
67
|
"bun-types": "^1.2.22",
|
|
68
|
+
"effect": "4.0.0-beta.59",
|
|
69
69
|
"react": "^19.1.0",
|
|
70
70
|
"tsup": "^8.5.0",
|
|
71
71
|
"vitest": "^4.1.5"
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@effect/atom-react": "4.0.0-beta.59",
|
|
75
75
|
"@tanstack/react-router": "^1.168.10",
|
|
76
|
+
"effect": "4.0.0-beta.59",
|
|
76
77
|
"react": "^19.1.0"
|
|
77
78
|
},
|
|
78
79
|
"peerDependenciesMeta": {
|