@executor-js/plugin-mcp 0.1.0 → 1.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/AddMcpSource-TLAL463B.js +762 -0
  2. package/dist/AddMcpSource-TLAL463B.js.map +1 -0
  3. package/dist/EditMcpSource-CWN6HIC4.js +259 -0
  4. package/dist/EditMcpSource-CWN6HIC4.js.map +1 -0
  5. package/dist/McpSourceSummary-257JNETP.js +85 -0
  6. package/dist/McpSourceSummary-257JNETP.js.map +1 -0
  7. package/dist/api/group.d.ts +183 -19
  8. package/dist/api/index.d.ts +501 -0
  9. package/dist/chunk-4ORPFRLI.js +238 -0
  10. package/dist/chunk-4ORPFRLI.js.map +1 -0
  11. package/dist/chunk-M6REVU6O.js +179 -0
  12. package/dist/chunk-M6REVU6O.js.map +1 -0
  13. package/dist/chunk-NQT7NAGE.js +2277 -0
  14. package/dist/chunk-NQT7NAGE.js.map +1 -0
  15. package/dist/chunk-SKSXXFOA.js +104 -0
  16. package/dist/chunk-SKSXXFOA.js.map +1 -0
  17. package/dist/chunk-ZIRGIRGP.js +115 -0
  18. package/dist/chunk-ZIRGIRGP.js.map +1 -0
  19. package/dist/client.js +51 -0
  20. package/dist/client.js.map +1 -0
  21. package/dist/core.js +26 -2
  22. package/dist/index.js +2 -1
  23. package/dist/react/McpRemoteSourceFields.d.ts +18 -0
  24. package/dist/react/McpSourceSummary.d.ts +5 -0
  25. package/dist/react/atoms.d.ts +286 -6
  26. package/dist/react/client.d.ts +187 -16
  27. package/dist/react/index.d.ts +1 -1
  28. package/dist/react/plugin-client.d.ts +9 -2
  29. package/dist/sdk/binding-store.d.ts +106 -1
  30. package/dist/sdk/index.d.ts +1 -1
  31. package/dist/sdk/invoke.d.ts +2 -0
  32. package/dist/sdk/plugin.d.ts +178 -114
  33. package/dist/sdk/probe-shape-real-servers.live.test.d.ts +1 -0
  34. package/dist/sdk/probe-shape.d.ts +17 -3
  35. package/dist/sdk/stored-source.d.ts +12 -11
  36. package/dist/sdk/types.d.ts +122 -17
  37. package/dist/{stdio-connector-KNHLETKM.js → stdio-connector-AA5S6UUJ.js} +1 -1
  38. package/dist/{stdio-connector-KNHLETKM.js.map → stdio-connector-AA5S6UUJ.js.map} +1 -1
  39. package/dist/testing/index.d.ts +1 -0
  40. package/dist/{sdk/test-utils.d.ts → testing/server.d.ts} +0 -6
  41. package/dist/testing.js +51 -0
  42. package/dist/testing.js.map +1 -0
  43. package/package.json +17 -4
  44. package/dist/chunk-C2GNZGFJ.js +0 -1622
  45. package/dist/chunk-C2GNZGFJ.js.map +0 -1
@@ -1,8 +1,7 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
2
  import { Schema } from "effect";
3
- import { InternalError } from "@executor-js/api";
3
+ import { InternalError } from "@executor-js/sdk/core";
4
4
  import { McpConnectionError, McpToolDiscoveryError } from "../sdk/errors";
5
- import { McpStoredSourceSchema } from "../sdk/stored-source";
6
5
  export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.HttpApiEndpoint<"probeEndpoint", "POST", "/scopes/:scopeId/mcp/probe", HttpApiEndpoint.StringTree<Schema.Struct<{
7
6
  scopeId: Schema.brand<Schema.String, "ScopeId">;
8
7
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
@@ -18,6 +17,7 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.
18
17
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
19
18
  readonly connected: Schema.Boolean;
20
19
  readonly requiresOAuth: Schema.Boolean;
20
+ readonly supportsDynamicRegistration: Schema.Boolean;
21
21
  readonly name: Schema.String;
22
22
  readonly namespace: Schema.String;
23
23
  readonly toolCount: Schema.NullOr<Schema.Number>;
@@ -25,36 +25,66 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.
25
25
  }>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"addSource", "POST", "/scopes/:scopeId/mcp/sources", HttpApiEndpoint.StringTree<Schema.Struct<{
26
26
  scopeId: Schema.brand<Schema.String, "ScopeId">;
27
27
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Union<readonly [Schema.Struct<{
28
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
28
29
  readonly transport: Schema.Literal<"remote">;
29
30
  readonly name: Schema.String;
30
31
  readonly endpoint: Schema.String;
31
32
  readonly remoteTransport: Schema.optional<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>;
32
33
  readonly namespace: Schema.optional<Schema.String>;
33
- readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
34
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
34
35
  readonly secretId: Schema.String;
35
36
  readonly prefix: Schema.optional<Schema.String>;
36
- }>]>>>;
37
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
37
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
38
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
39
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
38
40
  readonly secretId: Schema.String;
39
41
  readonly prefix: Schema.optional<Schema.String>;
40
- }>]>>>;
41
- readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
42
+ }>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
43
+ readonly kind: Schema.Literal<"binding">;
44
+ readonly slot: Schema.String;
45
+ readonly prefix: Schema.optional<Schema.String>;
46
+ }>]>]>>>;
47
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
48
+ readonly secretId: Schema.String;
49
+ readonly prefix: Schema.optional<Schema.String>;
50
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
51
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
52
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
53
+ readonly secretId: Schema.String;
54
+ readonly prefix: Schema.optional<Schema.String>;
55
+ }>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
56
+ readonly kind: Schema.Literal<"binding">;
57
+ readonly slot: Schema.String;
58
+ readonly prefix: Schema.optional<Schema.String>;
59
+ }>]>]>>>;
60
+ readonly auth: Schema.optional<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
42
61
  readonly kind: Schema.Literal<"none">;
43
62
  }>, Schema.Struct<{
63
+ readonly kind: Schema.Literal<"header">;
64
+ readonly headerName: Schema.String;
65
+ readonly secretSlot: Schema.String;
66
+ readonly prefix: Schema.optional<Schema.String>;
67
+ }>, Schema.Struct<{
68
+ readonly kind: Schema.Literal<"oauth2">;
69
+ readonly connectionSlot: Schema.String;
70
+ readonly clientIdSlot: Schema.optional<Schema.String>;
71
+ readonly clientSecretSlot: Schema.optional<Schema.String>;
72
+ }>]>, Schema.Struct<{
44
73
  readonly kind: Schema.Literal<"header">;
45
74
  readonly headerName: Schema.String;
46
75
  readonly secretId: Schema.String;
47
76
  readonly prefix: Schema.optional<Schema.String>;
77
+ readonly targetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
78
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
48
79
  }>, Schema.Struct<{
49
80
  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
81
  readonly connectionId: Schema.String;
54
82
  readonly clientIdSecretId: Schema.optional<Schema.String>;
55
83
  readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
56
84
  }>]>>;
85
+ readonly credentialTargetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
57
86
  }>, Schema.Struct<{
87
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
58
88
  readonly transport: Schema.Literal<"stdio">;
59
89
  readonly name: Schema.String;
60
90
  readonly command: Schema.String;
@@ -80,36 +110,170 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"mcp", HttpApiEndpoint.
80
110
  }>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/mcp/sources/:namespace", HttpApiEndpoint.StringTree<Schema.Struct<{
81
111
  scopeId: Schema.brand<Schema.String, "ScopeId">;
82
112
  namespace: Schema.String;
83
- }>>, 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<{
113
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
114
+ readonly namespace: Schema.String;
115
+ readonly scope: Schema.brand<Schema.String, "ScopeId">;
116
+ readonly name: Schema.String;
117
+ readonly config: Schema.Union<readonly [Schema.Struct<{
118
+ readonly transport: Schema.Literal<"remote">;
119
+ readonly endpoint: Schema.String;
120
+ readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
121
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
122
+ readonly kind: Schema.Literal<"binding">;
123
+ readonly slot: Schema.String;
124
+ readonly prefix: Schema.optional<Schema.String>;
125
+ }>]>>>;
126
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
127
+ readonly kind: Schema.Literal<"binding">;
128
+ readonly slot: Schema.String;
129
+ readonly prefix: Schema.optional<Schema.String>;
130
+ }>]>>>;
131
+ readonly auth: Schema.Union<readonly [Schema.Struct<{
132
+ readonly kind: Schema.Literal<"none">;
133
+ }>, Schema.Struct<{
134
+ readonly kind: Schema.Literal<"header">;
135
+ readonly headerName: Schema.String;
136
+ readonly secretSlot: Schema.String;
137
+ readonly prefix: Schema.optional<Schema.String>;
138
+ }>, Schema.Struct<{
139
+ readonly kind: Schema.Literal<"oauth2">;
140
+ readonly connectionSlot: Schema.String;
141
+ readonly clientIdSlot: Schema.optional<Schema.String>;
142
+ readonly clientSecretSlot: Schema.optional<Schema.String>;
143
+ }>]>;
144
+ }>, Schema.Struct<{
145
+ readonly transport: Schema.Literal<"stdio">;
146
+ readonly command: Schema.String;
147
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
148
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
149
+ readonly cwd: Schema.optional<Schema.String>;
150
+ }>]>;
151
+ }>>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/mcp/sources/:namespace", HttpApiEndpoint.StringTree<Schema.Struct<{
84
152
  scopeId: Schema.brand<Schema.String, "ScopeId">;
85
153
  namespace: Schema.String;
86
154
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
155
+ readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
87
156
  readonly name: Schema.optional<Schema.String>;
88
157
  readonly endpoint: Schema.optional<Schema.String>;
89
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
158
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
90
159
  readonly secretId: Schema.String;
91
160
  readonly prefix: Schema.optional<Schema.String>;
92
- }>]>>>;
93
- readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
161
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
162
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
163
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
94
164
  readonly secretId: Schema.String;
95
165
  readonly prefix: Schema.optional<Schema.String>;
96
- }>]>>>;
97
- readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
166
+ }>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
167
+ readonly kind: Schema.Literal<"binding">;
168
+ readonly slot: Schema.String;
169
+ readonly prefix: Schema.optional<Schema.String>;
170
+ }>]>]>>>;
171
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
172
+ readonly secretId: Schema.String;
173
+ readonly prefix: Schema.optional<Schema.String>;
174
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
175
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
176
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
177
+ readonly secretId: Schema.String;
178
+ readonly prefix: Schema.optional<Schema.String>;
179
+ }>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
180
+ readonly kind: Schema.Literal<"binding">;
181
+ readonly slot: Schema.String;
182
+ readonly prefix: Schema.optional<Schema.String>;
183
+ }>]>]>>>;
184
+ readonly credentialTargetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
185
+ readonly auth: Schema.optional<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
98
186
  readonly kind: Schema.Literal<"none">;
99
187
  }>, Schema.Struct<{
188
+ readonly kind: Schema.Literal<"header">;
189
+ readonly headerName: Schema.String;
190
+ readonly secretSlot: Schema.String;
191
+ readonly prefix: Schema.optional<Schema.String>;
192
+ }>, Schema.Struct<{
193
+ readonly kind: Schema.Literal<"oauth2">;
194
+ readonly connectionSlot: Schema.String;
195
+ readonly clientIdSlot: Schema.optional<Schema.String>;
196
+ readonly clientSecretSlot: Schema.optional<Schema.String>;
197
+ }>]>, Schema.Struct<{
100
198
  readonly kind: Schema.Literal<"header">;
101
199
  readonly headerName: Schema.String;
102
200
  readonly secretId: Schema.String;
103
201
  readonly prefix: Schema.optional<Schema.String>;
202
+ readonly targetScope: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
203
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
104
204
  }>, Schema.Struct<{
105
205
  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
206
  readonly connectionId: Schema.String;
110
207
  readonly clientIdSecretId: Schema.optional<Schema.String>;
111
208
  readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
112
209
  }>]>>;
113
210
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
114
211
  readonly updated: Schema.Boolean;
212
+ }>>, 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<{
213
+ scopeId: Schema.brand<Schema.String, "ScopeId">;
214
+ namespace: Schema.String;
215
+ sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
216
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
217
+ readonly sourceId: Schema.String;
218
+ readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
219
+ readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
220
+ readonly slot: Schema.String;
221
+ readonly value: Schema.Union<readonly [Schema.Struct<{
222
+ readonly kind: Schema.Literal<"text">;
223
+ readonly text: Schema.String;
224
+ }>, Schema.Struct<{
225
+ readonly kind: Schema.Literal<"secret">;
226
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
227
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
228
+ }>, Schema.Struct<{
229
+ readonly kind: Schema.Literal<"connection">;
230
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
231
+ }>]>;
232
+ readonly createdAt: Schema.Date;
233
+ readonly updatedAt: Schema.Date;
234
+ }>>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings", HttpApiEndpoint.StringTree<Schema.Struct<{
235
+ scopeId: Schema.brand<Schema.String, "ScopeId">;
236
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
237
+ readonly sourceId: Schema.String;
238
+ readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
239
+ readonly scope: Schema.brand<Schema.String, "ScopeId">;
240
+ readonly slot: Schema.String;
241
+ readonly value: Schema.Union<readonly [Schema.Struct<{
242
+ readonly kind: Schema.Literal<"text">;
243
+ readonly text: Schema.String;
244
+ }>, Schema.Struct<{
245
+ readonly kind: Schema.Literal<"secret">;
246
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
247
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
248
+ }>, Schema.Struct<{
249
+ readonly kind: Schema.Literal<"connection">;
250
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
251
+ }>]>;
252
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
253
+ readonly sourceId: Schema.String;
254
+ readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
255
+ readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
256
+ readonly slot: Schema.String;
257
+ readonly value: Schema.Union<readonly [Schema.Struct<{
258
+ readonly kind: Schema.Literal<"text">;
259
+ readonly text: Schema.String;
260
+ }>, Schema.Struct<{
261
+ readonly kind: Schema.Literal<"secret">;
262
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
263
+ readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
264
+ }>, Schema.Struct<{
265
+ readonly kind: Schema.Literal<"connection">;
266
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
267
+ }>]>;
268
+ readonly createdAt: Schema.Date;
269
+ readonly updatedAt: Schema.Date;
270
+ }>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings/remove", HttpApiEndpoint.StringTree<Schema.Struct<{
271
+ scopeId: Schema.brand<Schema.String, "ScopeId">;
272
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
273
+ readonly sourceId: Schema.String;
274
+ readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
275
+ readonly slot: Schema.String;
276
+ readonly scope: Schema.brand<Schema.String, "ScopeId">;
277
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
278
+ readonly removed: Schema.Boolean;
115
279
  }>>, HttpApiEndpoint.Json<typeof InternalError | typeof McpConnectionError | typeof McpToolDiscoveryError>, never, never>, false>;