@executor-js/plugin-mcp 0.0.2 → 0.2.1
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-VM3HY26S.js +762 -0
- package/dist/AddMcpSource-VM3HY26S.js.map +1 -0
- package/dist/EditMcpSource-WELWGRJG.js +259 -0
- package/dist/EditMcpSource-WELWGRJG.js.map +1 -0
- package/dist/McpSourceSummary-7TDQXLT5.js +85 -0
- package/dist/McpSourceSummary-7TDQXLT5.js.map +1 -0
- package/dist/api/group.d.ts +115 -23
- package/dist/api/index.d.ts +391 -0
- package/dist/chunk-2ETJ6LQH.js +239 -0
- package/dist/chunk-2ETJ6LQH.js.map +1 -0
- package/dist/chunk-OOOH3IO4.js +2194 -0
- package/dist/chunk-OOOH3IO4.js.map +1 -0
- package/dist/chunk-SKSXXFOA.js +104 -0
- package/dist/chunk-SKSXXFOA.js.map +1 -0
- package/dist/chunk-Z4CRPOLI.js +186 -0
- package/dist/chunk-Z4CRPOLI.js.map +1 -0
- package/dist/chunk-ZIRGIRGP.js +115 -0
- package/dist/chunk-ZIRGIRGP.js.map +1 -0
- package/dist/client.js +51 -0
- package/dist/client.js.map +1 -0
- package/dist/core.js +26 -2
- package/dist/index.js +2 -1
- package/dist/react/McpRemoteSourceFields.d.ts +18 -0
- package/dist/react/McpSourceSummary.d.ts +5 -0
- package/dist/react/atoms.d.ts +211 -11
- package/dist/react/client.d.ts +114 -350
- package/dist/react/index.d.ts +1 -1
- package/dist/react/plugin-client.d.ts +9 -0
- package/dist/react/source-plugin.d.ts +1 -1
- package/dist/sdk/binding-store.d.ts +110 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/invoke.d.ts +2 -0
- package/dist/sdk/manifest.d.ts +2 -0
- package/dist/sdk/plugin.d.ts +168 -10
- package/dist/sdk/probe-shape-real-servers.live.test.d.ts +1 -0
- package/dist/sdk/probe-shape.d.ts +17 -3
- package/dist/sdk/stored-source.d.ts +9 -6
- package/dist/sdk/types.d.ts +153 -13
- package/dist/{stdio-connector-KNHLETKM.js → stdio-connector-AA5S6UUJ.js} +1 -1
- package/dist/{stdio-connector-KNHLETKM.js.map → stdio-connector-AA5S6UUJ.js.map} +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/server.d.ts +10 -0
- package/dist/testing.js +51 -0
- package/dist/testing.js.map +1 -0
- package/package.json +17 -4
- package/dist/chunk-DJANY5EU.js +0 -1325
- package/dist/chunk-DJANY5EU.js.map +0 -1
package/dist/api/group.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { InternalError } from "@executor-js/
|
|
3
|
+
import { InternalError } from "@executor-js/sdk/core";
|
|
4
4
|
import { McpConnectionError, McpToolDiscoveryError } from "../sdk/errors";
|
|
5
5
|
import { McpStoredSourceSchema } from "../sdk/stored-source";
|
|
6
|
+
import { McpSourceBindingRef } from "../sdk/types";
|
|
6
7
|
export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.HttpApiEndpoint<"probeEndpoint", "POST", "/scopes/:scopeId/mcp/probe", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
7
8
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
8
9
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
@@ -18,43 +19,74 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.
|
|
|
18
19
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
19
20
|
readonly connected: Schema.Boolean;
|
|
20
21
|
readonly requiresOAuth: Schema.Boolean;
|
|
22
|
+
readonly supportsDynamicRegistration: Schema.Boolean;
|
|
21
23
|
readonly name: Schema.String;
|
|
22
24
|
readonly namespace: Schema.String;
|
|
23
25
|
readonly toolCount: Schema.NullOr<Schema.Number>;
|
|
24
26
|
readonly serverName: Schema.NullOr<Schema.String>;
|
|
25
|
-
}>>, HttpApiEndpoint.Json<typeof
|
|
27
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"addSource", "POST", "/scopes/:scopeId/mcp/sources", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
26
28
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
27
29
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Union<readonly [Schema.Struct<{
|
|
30
|
+
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
28
31
|
readonly transport: Schema.Literal<"remote">;
|
|
29
32
|
readonly name: Schema.String;
|
|
30
33
|
readonly endpoint: Schema.String;
|
|
31
34
|
readonly remoteTransport: Schema.optional<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>;
|
|
32
35
|
readonly namespace: Schema.optional<Schema.String>;
|
|
33
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.
|
|
36
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
34
37
|
readonly secretId: Schema.String;
|
|
35
38
|
readonly prefix: Schema.optional<Schema.String>;
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
40
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
41
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
38
42
|
readonly secretId: Schema.String;
|
|
39
43
|
readonly prefix: Schema.optional<Schema.String>;
|
|
40
|
-
}>]
|
|
41
|
-
|
|
44
|
+
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
45
|
+
readonly kind: Schema.Literal<"binding">;
|
|
46
|
+
readonly slot: Schema.String;
|
|
47
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
48
|
+
}>]>]>>>;
|
|
49
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
50
|
+
readonly secretId: Schema.String;
|
|
51
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
52
|
+
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
53
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
54
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
55
|
+
readonly secretId: Schema.String;
|
|
56
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
57
|
+
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
58
|
+
readonly kind: Schema.Literal<"binding">;
|
|
59
|
+
readonly slot: Schema.String;
|
|
60
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
61
|
+
}>]>]>>>;
|
|
62
|
+
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
42
63
|
readonly kind: Schema.Literal<"none">;
|
|
43
64
|
}>, Schema.Struct<{
|
|
65
|
+
readonly kind: Schema.Literal<"header">;
|
|
66
|
+
readonly headerName: Schema.String;
|
|
67
|
+
readonly secretSlot: Schema.String;
|
|
68
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
71
|
+
readonly connectionSlot: Schema.String;
|
|
72
|
+
readonly clientIdSlot: Schema.optional<Schema.String>;
|
|
73
|
+
readonly clientSecretSlot: Schema.optional<Schema.String>;
|
|
74
|
+
}>]>, Schema.Struct<{
|
|
44
75
|
readonly kind: Schema.Literal<"header">;
|
|
45
76
|
readonly headerName: Schema.String;
|
|
46
77
|
readonly secretId: Schema.String;
|
|
47
78
|
readonly prefix: Schema.optional<Schema.String>;
|
|
79
|
+
readonly targetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
80
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
48
81
|
}>, Schema.Struct<{
|
|
49
82
|
readonly kind: Schema.Literal<"oauth2">;
|
|
50
|
-
/** Stable id of the SDK Connection minted by `completeOAuth`. The
|
|
51
|
-
* backing access/refresh secrets live on the connection row; the
|
|
52
|
-
* source only needs this pointer. */
|
|
53
83
|
readonly connectionId: Schema.String;
|
|
54
84
|
readonly clientIdSecretId: Schema.optional<Schema.String>;
|
|
55
85
|
readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
56
86
|
}>]>>;
|
|
87
|
+
readonly credentialTargetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
57
88
|
}>, Schema.Struct<{
|
|
89
|
+
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
58
90
|
readonly transport: Schema.Literal<"stdio">;
|
|
59
91
|
readonly name: Schema.String;
|
|
60
92
|
readonly command: Schema.String;
|
|
@@ -65,51 +97,111 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.
|
|
|
65
97
|
}>]>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
66
98
|
readonly toolCount: Schema.Number;
|
|
67
99
|
readonly namespace: Schema.String;
|
|
68
|
-
}>>, HttpApiEndpoint.Json<typeof
|
|
100
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeSource", "POST", "/scopes/:scopeId/mcp/sources/remove", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
69
101
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
70
102
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
71
103
|
readonly namespace: Schema.String;
|
|
72
104
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
73
105
|
readonly removed: Schema.Boolean;
|
|
74
|
-
}>>, HttpApiEndpoint.Json<typeof
|
|
106
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"refreshSource", "POST", "/scopes/:scopeId/mcp/sources/refresh", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
75
107
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
76
108
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
77
109
|
readonly namespace: Schema.String;
|
|
78
110
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
79
111
|
readonly toolCount: Schema.Number;
|
|
80
|
-
}>>, HttpApiEndpoint.Json<typeof
|
|
112
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/mcp/sources/:namespace", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
81
113
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
82
114
|
namespace: Schema.String;
|
|
83
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<typeof McpStoredSourceSchema>>, HttpApiEndpoint.Json<typeof
|
|
115
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<typeof McpStoredSourceSchema>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/mcp/sources/:namespace", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
84
116
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
85
117
|
namespace: Schema.String;
|
|
86
118
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
119
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
87
120
|
readonly name: Schema.optional<Schema.String>;
|
|
88
121
|
readonly endpoint: Schema.optional<Schema.String>;
|
|
89
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.
|
|
122
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
90
123
|
readonly secretId: Schema.String;
|
|
91
124
|
readonly prefix: Schema.optional<Schema.String>;
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
126
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
127
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
94
128
|
readonly secretId: Schema.String;
|
|
95
129
|
readonly prefix: Schema.optional<Schema.String>;
|
|
96
|
-
}>]
|
|
97
|
-
|
|
130
|
+
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
131
|
+
readonly kind: Schema.Literal<"binding">;
|
|
132
|
+
readonly slot: Schema.String;
|
|
133
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
134
|
+
}>]>]>>>;
|
|
135
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
136
|
+
readonly secretId: Schema.String;
|
|
137
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
138
|
+
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
139
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
140
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
141
|
+
readonly secretId: Schema.String;
|
|
142
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
143
|
+
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
144
|
+
readonly kind: Schema.Literal<"binding">;
|
|
145
|
+
readonly slot: Schema.String;
|
|
146
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
147
|
+
}>]>]>>>;
|
|
148
|
+
readonly credentialTargetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
149
|
+
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
98
150
|
readonly kind: Schema.Literal<"none">;
|
|
99
151
|
}>, Schema.Struct<{
|
|
152
|
+
readonly kind: Schema.Literal<"header">;
|
|
153
|
+
readonly headerName: Schema.String;
|
|
154
|
+
readonly secretSlot: Schema.String;
|
|
155
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
156
|
+
}>, Schema.Struct<{
|
|
157
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
158
|
+
readonly connectionSlot: Schema.String;
|
|
159
|
+
readonly clientIdSlot: Schema.optional<Schema.String>;
|
|
160
|
+
readonly clientSecretSlot: Schema.optional<Schema.String>;
|
|
161
|
+
}>]>, Schema.Struct<{
|
|
100
162
|
readonly kind: Schema.Literal<"header">;
|
|
101
163
|
readonly headerName: Schema.String;
|
|
102
164
|
readonly secretId: Schema.String;
|
|
103
165
|
readonly prefix: Schema.optional<Schema.String>;
|
|
166
|
+
readonly targetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
167
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
104
168
|
}>, Schema.Struct<{
|
|
105
169
|
readonly kind: Schema.Literal<"oauth2">;
|
|
106
|
-
/** Stable id of the SDK Connection minted by `completeOAuth`. The
|
|
107
|
-
* backing access/refresh secrets live on the connection row; the
|
|
108
|
-
* source only needs this pointer. */
|
|
109
170
|
readonly connectionId: Schema.String;
|
|
110
171
|
readonly clientIdSecretId: Schema.optional<Schema.String>;
|
|
111
172
|
readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
112
173
|
}>]>>;
|
|
113
174
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
114
175
|
readonly updated: Schema.Boolean;
|
|
115
|
-
}>>, HttpApiEndpoint.Json<typeof
|
|
176
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listSourceBindings", "GET", "/scopes/:scopeId/mcp/sources/:namespace/base/:sourceScopeId/bindings", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
177
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
178
|
+
namespace: Schema.String;
|
|
179
|
+
sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
180
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<typeof McpSourceBindingRef>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
181
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
182
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
183
|
+
readonly sourceId: Schema.String;
|
|
184
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
185
|
+
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
186
|
+
readonly slot: Schema.String;
|
|
187
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
188
|
+
readonly kind: Schema.Literal<"text">;
|
|
189
|
+
readonly text: Schema.String;
|
|
190
|
+
}>, Schema.Struct<{
|
|
191
|
+
readonly kind: Schema.Literal<"secret">;
|
|
192
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
193
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly kind: Schema.Literal<"connection">;
|
|
196
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
197
|
+
}>]>;
|
|
198
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<typeof McpSourceBindingRef>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings/remove", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
199
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
200
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
201
|
+
readonly sourceId: Schema.String;
|
|
202
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
203
|
+
readonly slot: Schema.String;
|
|
204
|
+
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
205
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
206
|
+
readonly removed: Schema.Boolean;
|
|
207
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never>, false>;
|