@executor-js/plugin-mcp 0.2.1 → 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.
@@ -1,8 +1,70 @@
1
1
  import type { ScopeId } from "@executor-js/sdk/core";
2
2
  import * as Atom from "effect/unstable/reactivity/Atom";
3
3
  import * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
4
- export declare const mcpSourceAtom: (scopeId: ScopeId, namespace: string) => Atom.Atom<AsyncResult.AsyncResult<import("../sdk/stored-source").McpStoredSourceSchema | null, import("@executor-js/api").InternalError | import("../sdk/errors").McpConnectionError | import("../sdk/errors").McpToolDiscoveryError>>;
5
- export declare const mcpSourceBindingsAtom: (scopeId: ScopeId, namespace: string, sourceScopeId: ScopeId) => Atom.Atom<AsyncResult.AsyncResult<readonly import("../sdk").McpSourceBindingRef[], import("@executor-js/api").InternalError | import("../sdk/errors").McpConnectionError | import("../sdk/errors").McpToolDiscoveryError>>;
4
+ export declare const mcpSourceAtom: (scopeId: ScopeId, namespace: string) => Atom.Atom<AsyncResult.AsyncResult<{
5
+ readonly name: string;
6
+ readonly scope: string & import("effect/Brand").Brand<"ScopeId">;
7
+ readonly namespace: string;
8
+ readonly config: {
9
+ readonly endpoint: string;
10
+ readonly transport: "remote";
11
+ readonly auth: {
12
+ readonly kind: "none";
13
+ } | {
14
+ readonly kind: "header";
15
+ readonly headerName: string;
16
+ readonly secretSlot: string;
17
+ readonly prefix?: string | undefined;
18
+ } | {
19
+ readonly kind: "oauth2";
20
+ readonly connectionSlot: string;
21
+ readonly clientIdSlot?: string | undefined;
22
+ readonly clientSecretSlot?: string | undefined;
23
+ };
24
+ readonly headers?: {
25
+ readonly [x: string]: string | {
26
+ readonly kind: "binding";
27
+ readonly slot: string;
28
+ readonly prefix?: string | undefined;
29
+ };
30
+ } | undefined;
31
+ readonly remoteTransport?: "streamable-http" | "sse" | "auto" | undefined;
32
+ readonly queryParams?: {
33
+ readonly [x: string]: string | {
34
+ readonly kind: "binding";
35
+ readonly slot: string;
36
+ readonly prefix?: string | undefined;
37
+ };
38
+ } | undefined;
39
+ } | {
40
+ readonly transport: "stdio";
41
+ readonly command: string;
42
+ readonly args?: readonly string[] | undefined;
43
+ readonly env?: {
44
+ readonly [x: string]: string;
45
+ } | undefined;
46
+ readonly cwd?: string | undefined;
47
+ };
48
+ } | null, import("@executor-js/api").InternalError | import("../sdk/errors").McpConnectionError | import("../sdk/errors").McpToolDiscoveryError>>;
49
+ export declare const mcpSourceBindingsAtom: (scopeId: ScopeId, namespace: string, sourceScopeId: ScopeId) => Atom.Atom<AsyncResult.AsyncResult<readonly {
50
+ readonly value: {
51
+ readonly text: string;
52
+ readonly kind: "text";
53
+ } | {
54
+ readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
55
+ readonly kind: "secret";
56
+ readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
57
+ } | {
58
+ readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
59
+ readonly kind: "connection";
60
+ };
61
+ readonly createdAt: Date;
62
+ readonly sourceId: string;
63
+ readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
64
+ readonly updatedAt: Date;
65
+ readonly slot: string;
66
+ readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
67
+ }[], import("@executor-js/api").InternalError | import("../sdk/errors").McpConnectionError | import("../sdk/errors").McpToolDiscoveryError>>;
6
68
  export declare const probeMcpEndpoint: Atom.AtomResultFn<{
7
69
  readonly params: {
8
70
  readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
@@ -335,7 +397,25 @@ export declare const setMcpSourceBinding: Atom.AtomResultFn<{
335
397
  };
336
398
  readonly responseMode?: "decoded-only" | undefined;
337
399
  readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
338
- }, import("../sdk").McpSourceBindingRef, import("@executor-js/api").InternalError | import("../sdk/errors").McpConnectionError | import("../sdk/errors").McpToolDiscoveryError>;
400
+ }, {
401
+ readonly value: {
402
+ readonly text: string;
403
+ readonly kind: "text";
404
+ } | {
405
+ readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
406
+ readonly kind: "secret";
407
+ readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
408
+ } | {
409
+ readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
410
+ readonly kind: "connection";
411
+ };
412
+ readonly createdAt: Date;
413
+ readonly sourceId: string;
414
+ readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
415
+ readonly updatedAt: Date;
416
+ readonly slot: string;
417
+ readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
418
+ }, import("@executor-js/api").InternalError | import("../sdk/errors").McpConnectionError | import("../sdk/errors").McpToolDiscoveryError>;
339
419
  export declare const removeMcpSourceBinding: Atom.AtomResultFn<{
340
420
  readonly params: {
341
421
  readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
@@ -106,7 +106,45 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
106
106
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/mcp/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
107
107
  scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
108
108
  namespace: import("effect/Schema").String;
109
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<typeof import("../sdk/stored-source").McpStoredSourceSchema>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/mcp/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
109
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
110
+ readonly namespace: import("effect/Schema").String;
111
+ readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
112
+ readonly name: import("effect/Schema").String;
113
+ readonly config: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
114
+ readonly transport: import("effect/Schema").Literal<"remote">;
115
+ readonly endpoint: import("effect/Schema").String;
116
+ readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
117
+ 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").Struct<{
118
+ readonly kind: import("effect/Schema").Literal<"binding">;
119
+ readonly slot: import("effect/Schema").String;
120
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
121
+ }>]>>>;
122
+ 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").Struct<{
123
+ readonly kind: import("effect/Schema").Literal<"binding">;
124
+ readonly slot: import("effect/Schema").String;
125
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
126
+ }>]>>>;
127
+ readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
128
+ readonly kind: import("effect/Schema").Literal<"none">;
129
+ }>, import("effect/Schema").Struct<{
130
+ readonly kind: import("effect/Schema").Literal<"header">;
131
+ readonly headerName: import("effect/Schema").String;
132
+ readonly secretSlot: import("effect/Schema").String;
133
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
134
+ }>, import("effect/Schema").Struct<{
135
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
136
+ readonly connectionSlot: import("effect/Schema").String;
137
+ readonly clientIdSlot: import("effect/Schema").optional<import("effect/Schema").String>;
138
+ readonly clientSecretSlot: import("effect/Schema").optional<import("effect/Schema").String>;
139
+ }>]>;
140
+ }>, import("effect/Schema").Struct<{
141
+ readonly transport: import("effect/Schema").Literal<"stdio">;
142
+ readonly command: import("effect/Schema").String;
143
+ readonly args: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
144
+ readonly env: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
145
+ readonly cwd: import("effect/Schema").optional<import("effect/Schema").String>;
146
+ }>]>;
147
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/mcp/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
110
148
  scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
111
149
  namespace: import("effect/Schema").String;
112
150
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
@@ -171,7 +209,25 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
171
209
  scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
172
210
  namespace: import("effect/Schema").String;
173
211
  sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
174
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<typeof import("../sdk").McpSourceBindingRef>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
212
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
213
+ readonly sourceId: import("effect/Schema").String;
214
+ readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
215
+ readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
216
+ readonly slot: import("effect/Schema").String;
217
+ readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
218
+ readonly kind: import("effect/Schema").Literal<"text">;
219
+ readonly text: import("effect/Schema").String;
220
+ }>, import("effect/Schema").Struct<{
221
+ readonly kind: import("effect/Schema").Literal<"secret">;
222
+ readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
223
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
224
+ }>, import("effect/Schema").Struct<{
225
+ readonly kind: import("effect/Schema").Literal<"connection">;
226
+ readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
227
+ }>]>;
228
+ readonly createdAt: import("effect/Schema").Date;
229
+ readonly updatedAt: import("effect/Schema").Date;
230
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
175
231
  scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
176
232
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
177
233
  readonly sourceId: import("effect/Schema").String;
@@ -189,7 +245,25 @@ export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi")
189
245
  readonly kind: import("effect/Schema").Literal<"connection">;
190
246
  readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
191
247
  }>]>;
192
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../sdk").McpSourceBindingRef>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings/remove", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
248
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
249
+ readonly sourceId: import("effect/Schema").String;
250
+ readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
251
+ readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
252
+ readonly slot: import("effect/Schema").String;
253
+ readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
254
+ readonly kind: import("effect/Schema").Literal<"text">;
255
+ readonly text: import("effect/Schema").String;
256
+ }>, import("effect/Schema").Struct<{
257
+ readonly kind: import("effect/Schema").Literal<"secret">;
258
+ readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
259
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
260
+ }>, import("effect/Schema").Struct<{
261
+ readonly kind: import("effect/Schema").Literal<"connection">;
262
+ readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
263
+ }>]>;
264
+ readonly createdAt: import("effect/Schema").Date;
265
+ readonly updatedAt: import("effect/Schema").Date;
266
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk/errors").McpConnectionError | typeof import("../sdk/errors").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/mcp/source-bindings/remove", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
193
267
  scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
194
268
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
195
269
  readonly sourceId: import("effect/Schema").String;
@@ -112,8 +112,44 @@ export declare const mcpPlugin: import("@executor-js/sdk/core").ConfiguredPlugin
112
112
  }, StorageFailure | McpConnectionError | McpToolDiscoveryError, never>;
113
113
  getSource: (namespace: string, scope: string) => Effect.Effect<McpStoredSource | null, StorageFailure, never>;
114
114
  updateSource: (namespace: string, scope: string, input: McpUpdateSourceInput) => Effect.Effect<void, StorageFailure | McpConnectionError, never>;
115
- listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly McpSourceBindingRef[], StorageFailure, never>;
116
- setSourceBinding: (input: McpSourceBindingInput) => Effect.Effect<McpSourceBindingRef, StorageFailure, never>;
115
+ listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly {
116
+ readonly value: {
117
+ readonly text: string;
118
+ readonly kind: "text";
119
+ } | {
120
+ readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
121
+ readonly kind: "secret";
122
+ readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
123
+ } | {
124
+ readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
125
+ readonly kind: "connection";
126
+ };
127
+ readonly createdAt: Date;
128
+ readonly sourceId: string;
129
+ readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
130
+ readonly updatedAt: Date;
131
+ readonly slot: string;
132
+ readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
133
+ }[], StorageFailure, never>;
134
+ setSourceBinding: (input: McpSourceBindingInput) => Effect.Effect<{
135
+ readonly value: {
136
+ readonly text: string;
137
+ readonly kind: "text";
138
+ } | {
139
+ readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
140
+ readonly kind: "secret";
141
+ readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
142
+ } | {
143
+ readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
144
+ readonly kind: "connection";
145
+ };
146
+ readonly createdAt: Date;
147
+ readonly sourceId: string;
148
+ readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
149
+ readonly updatedAt: Date;
150
+ readonly slot: string;
151
+ readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
152
+ }, StorageFailure, never>;
117
153
  removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
118
154
  }, McpBindingStore, McpPluginOptions, {
119
155
  readonly mcp_source: {
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- declare const McpStoredSourceSchema_base: Schema.Class<McpStoredSourceSchema, Schema.Struct<{
2
+ export declare const McpStoredSourceSchema: Schema.Struct<{
3
3
  readonly namespace: Schema.String;
4
4
  readonly scope: Schema.brand<Schema.String, "ScopeId">;
5
5
  readonly name: Schema.String;
@@ -37,8 +37,6 @@ declare const McpStoredSourceSchema_base: Schema.Class<McpStoredSourceSchema, Sc
37
37
  readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
38
38
  readonly cwd: Schema.optional<Schema.String>;
39
39
  }>]>;
40
- }>, {}>;
41
- export declare class McpStoredSourceSchema extends McpStoredSourceSchema_base {
42
- }
40
+ }>;
41
+ export type McpStoredSourceSchema = typeof McpStoredSourceSchema.Type;
43
42
  export type McpStoredSourceSchemaType = typeof McpStoredSourceSchema.Type;
44
- export {};
@@ -87,7 +87,7 @@ export declare const McpSourceBindingValue: Schema.Union<readonly [Schema.Struct
87
87
  readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
88
88
  }>]>;
89
89
  export type McpSourceBindingValue = typeof McpSourceBindingValue.Type;
90
- export declare const McpSourceBindingInputSchema: Schema.Struct<{
90
+ export declare const McpSourceBindingInput: Schema.Struct<{
91
91
  readonly sourceId: Schema.String;
92
92
  readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
93
93
  readonly scope: Schema.brand<Schema.String, "ScopeId">;
@@ -104,26 +104,8 @@ export declare const McpSourceBindingInputSchema: Schema.Struct<{
104
104
  readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
105
105
  }>]>;
106
106
  }>;
107
- declare const McpSourceBindingInput_base: Schema.Class<McpSourceBindingInput, Schema.Struct<{
108
- readonly sourceId: Schema.String;
109
- readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
110
- readonly scope: Schema.brand<Schema.String, "ScopeId">;
111
- readonly slot: Schema.String;
112
- readonly value: Schema.Union<readonly [Schema.Struct<{
113
- readonly kind: Schema.Literal<"text">;
114
- readonly text: Schema.String;
115
- }>, Schema.Struct<{
116
- readonly kind: Schema.Literal<"secret">;
117
- readonly secretId: Schema.brand<Schema.String, "SecretId">;
118
- readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
119
- }>, Schema.Struct<{
120
- readonly kind: Schema.Literal<"connection">;
121
- readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
122
- }>]>;
123
- }>, {}>;
124
- export declare class McpSourceBindingInput extends McpSourceBindingInput_base {
125
- }
126
- declare const McpSourceBindingRef_base: Schema.Class<McpSourceBindingRef, Schema.Struct<{
107
+ export type McpSourceBindingInput = typeof McpSourceBindingInput.Type;
108
+ export declare const McpSourceBindingRef: Schema.Struct<{
127
109
  readonly sourceId: Schema.String;
128
110
  readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
129
111
  readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
@@ -141,9 +123,8 @@ declare const McpSourceBindingRef_base: Schema.Class<McpSourceBindingRef, Schema
141
123
  }>]>;
142
124
  readonly createdAt: Schema.Date;
143
125
  readonly updatedAt: Schema.Date;
144
- }>, {}>;
145
- export declare class McpSourceBindingRef extends McpSourceBindingRef_base {
146
- }
126
+ }>;
127
+ export type McpSourceBindingRef = typeof McpSourceBindingRef.Type;
147
128
  export declare const McpRemoteSourceData: Schema.Struct<{
148
129
  readonly transport: Schema.Literal<"remote">;
149
130
  /** The MCP server endpoint URL */
@@ -242,7 +223,7 @@ export declare const McpToolAnnotations: Schema.Struct<{
242
223
  readonly openWorldHint: Schema.optional<Schema.Boolean>;
243
224
  }>;
244
225
  export type McpToolAnnotations = typeof McpToolAnnotations.Type;
245
- declare const McpToolBinding_base: Schema.Class<McpToolBinding, Schema.Struct<{
226
+ export declare const McpToolBinding: Schema.Struct<{
246
227
  readonly toolId: Schema.String;
247
228
  readonly toolName: Schema.String;
248
229
  readonly description: Schema.NullOr<Schema.String>;
@@ -255,6 +236,5 @@ declare const McpToolBinding_base: Schema.Class<McpToolBinding, Schema.Struct<{
255
236
  readonly idempotentHint: Schema.optional<Schema.Boolean>;
256
237
  readonly openWorldHint: Schema.optional<Schema.Boolean>;
257
238
  }>>;
258
- }>, {}>;
259
- export declare class McpToolBinding extends McpToolBinding_base {
260
- }
239
+ }>;
240
+ export type McpToolBinding = typeof McpToolBinding.Type;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-mcp",
3
- "version": "0.2.1",
3
+ "version": "1.4.20",
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,15 +54,15 @@
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": "0.2.1",
58
- "@executor-js/sdk": "0.2.1",
57
+ "@executor-js/config": "1.4.20",
58
+ "@executor-js/sdk": "1.4.20",
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "effect": "4.0.0-beta.59"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@effect/atom-react": "4.0.0-beta.59",
64
64
  "@effect/vitest": "4.0.0-beta.59",
65
- "@executor-js/storage-core": "0.2.1",
65
+ "@executor-js/storage-core": "1.4.20",
66
66
  "@types/node": "^24.3.1",
67
67
  "@types/react": "^19.1.0",
68
68
  "bun-types": "^1.2.22",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/EditMcpSource.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { useAtomValue, useAtomSet } from \"@effect/atom-react\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\nimport * as Exit from \"effect/Exit\";\nimport {\n mcpSourceAtom,\n mcpSourceBindingsAtom,\n setMcpSourceBinding,\n updateMcpSource,\n} from \"./atoms\";\nimport { connectionsAtom } from \"@executor-js/react/api/atoms\";\nimport { useScope, useScopeStack } from \"@executor-js/react/api/scope-context\";\nimport { connectionWriteKeys, sourceWriteKeys } from \"@executor-js/react/api/reactivity-keys\";\nimport { slugifyNamespace, useSourceIdentity } from \"@executor-js/react/plugins/source-identity\";\nimport { useCredentialTargetScope } from \"@executor-js/react/plugins/credential-target-scope\";\nimport { useSecretPickerSecrets } from \"@executor-js/react/plugins/use-secret-picker-secrets\";\nimport {\n HttpCredentialsEditor,\n serializeHttpCredentials,\n serializeScopedHttpCredentials,\n type HttpCredentialsState,\n} from \"@executor-js/react/plugins/http-credentials\";\nimport {\n effectiveCredentialBindingForScope,\n httpCredentialsFromConfiguredCredentialBindings,\n initialCredentialTargetScope,\n} from \"@executor-js/react/plugins/credential-bindings\";\nimport { SourceOAuthConnectionControl } from \"@executor-js/react/plugins/source-oauth-connection\";\nimport { Button } from \"@executor-js/react/components/button\";\nimport { Badge } from \"@executor-js/react/components/badge\";\nimport { ScopeId } from \"@executor-js/sdk/core\";\nimport { McpRemoteSourceFields } from \"./McpRemoteSourceFields\";\nimport {\n McpSourceBindingInput,\n type McpCredentialInput,\n type McpSourceBindingRef,\n} from \"../sdk/types\";\nimport type { McpStoredSourceSchemaType } from \"../sdk/stored-source\";\n\n// ---------------------------------------------------------------------------\n// Remote edit form\n// ---------------------------------------------------------------------------\n\nfunction RemoteEditForm(props: {\n sourceId: string;\n initial: McpStoredSourceSchemaType & { config: { transport: \"remote\" } };\n bindings: readonly McpSourceBindingRef[];\n onSave: () => void;\n}) {\n const displayScope = useScope();\n const scopeStack = useScopeStack();\n const sourceScope = ScopeId.make(props.initial.scope);\n const { credentialTargetScope, credentialScopeOptions } = useCredentialTargetScope({\n sourceScope,\n initialTargetScope: initialCredentialTargetScope(sourceScope, props.bindings),\n });\n const {\n credentialTargetScope: oauthCredentialTargetScope,\n setCredentialTargetScope: setOAuthCredentialTargetScope,\n } = useCredentialTargetScope({\n sourceScope,\n initialTargetScope: initialCredentialTargetScope(sourceScope, props.bindings),\n });\n const doUpdate = useAtomSet(updateMcpSource, { mode: \"promiseExit\" });\n const setBinding = useAtomSet(setMcpSourceBinding, { mode: \"promise\" });\n const secretList = useSecretPickerSecrets();\n const connectionsResult = useAtomValue(connectionsAtom(displayScope));\n\n const identity = useSourceIdentity({\n fallbackName: props.initial.name,\n fallbackNamespace: props.initial.namespace,\n });\n const [endpoint, setEndpoint] = useState(props.initial.config.endpoint);\n const [credentials, setCredentials] = useState<HttpCredentialsState>(() =>\n httpCredentialsFromConfiguredCredentialBindings({\n headers: props.initial.config.headers,\n queryParams: props.initial.config.queryParams,\n bindings: props.bindings,\n }),\n );\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [credentialsDirty, setCredentialsDirty] = useState(false);\n\n const identityDirty = identity.name.trim() !== props.initial.name.trim();\n const metadataDirty = identityDirty || endpoint.trim() !== props.initial.config.endpoint.trim();\n const dirty = metadataDirty || credentialsDirty;\n const oauth2 = props.initial.config.auth.kind === \"oauth2\" ? props.initial.config.auth : null;\n const connections = AsyncResult.isSuccess(connectionsResult) ? connectionsResult.value : [];\n const scopeRanks = new Map(scopeStack.map((scope, index) => [scope.id, index] as const));\n const connectionBinding = oauth2\n ? effectiveCredentialBindingForScope(\n props.bindings,\n oauth2.connectionSlot,\n oauthCredentialTargetScope,\n scopeRanks,\n )\n : null;\n const boundConnectionId =\n connectionBinding?.value.kind === \"connection\" ? connectionBinding.value.connectionId : null;\n const isConnected =\n boundConnectionId !== null &&\n connections.some((connection) => connection.id === boundConnectionId);\n const oauthRequestCredentials = serializeHttpCredentials(credentials);\n\n const handleCredentialsChange = (next: HttpCredentialsState) => {\n setCredentials(next);\n setCredentialsDirty(true);\n };\n\n const handleSave = async () => {\n setSaving(true);\n setError(null);\n const { headers, queryParams } = serializeScopedHttpCredentials(\n credentials,\n credentialTargetScope,\n );\n const payload: {\n sourceScope: ScopeId;\n name?: string;\n endpoint?: string;\n headers?: Record<string, McpCredentialInput>;\n queryParams?: Record<string, McpCredentialInput>;\n credentialTargetScope?: ScopeId;\n } = {\n sourceScope,\n name: metadataDirty ? identity.name.trim() || undefined : undefined,\n endpoint: metadataDirty ? endpoint.trim() || undefined : undefined,\n };\n if (credentialsDirty) {\n payload.headers = headers;\n payload.queryParams = queryParams as Record<string, McpCredentialInput>;\n payload.credentialTargetScope = credentialTargetScope;\n }\n const exit = await doUpdate({\n params: { scopeId: displayScope, namespace: props.sourceId },\n payload,\n reactivityKeys: sourceWriteKeys,\n });\n if (Exit.isFailure(exit)) {\n setError(\"Failed to update source\");\n setSaving(false);\n return;\n }\n setCredentialsDirty(false);\n setSaving(false);\n props.onSave();\n };\n\n return (\n <div className=\"space-y-6\">\n <div>\n <h1 className=\"text-xl font-semibold text-foreground\">Edit MCP Source</h1>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n Update the endpoint and headers for this MCP connection.\n </p>\n </div>\n\n <div className=\"flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3\">\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-semibold text-card-foreground\">{props.sourceId}</p>\n </div>\n <Badge variant=\"secondary\" className=\"text-xs\">\n remote\n </Badge>\n </div>\n\n <McpRemoteSourceFields\n url={endpoint}\n onUrlChange={setEndpoint}\n identity={identity}\n preview={{\n name: props.initial.name,\n serverName: props.initial.name,\n connected: true,\n toolCount: null,\n }}\n namespaceReadOnly\n />\n\n <HttpCredentialsEditor\n credentials={credentials}\n onChange={handleCredentialsChange}\n existingSecrets={secretList}\n sourceName={identity.name}\n targetScope={credentialTargetScope}\n credentialScopeOptions={credentialScopeOptions}\n bindingScopeOptions={credentialScopeOptions}\n />\n\n {oauth2 && (\n <SourceOAuthConnectionControl\n popupName=\"mcp-oauth\"\n pluginId=\"mcp\"\n namespace={slugifyNamespace(props.initial.namespace) || \"mcp\"}\n fallbackNamespace=\"mcp\"\n endpoint={endpoint.trim()}\n tokenScope={oauthCredentialTargetScope}\n onTokenScopeChange={setOAuthCredentialTargetScope}\n credentialScopeOptions={credentialScopeOptions}\n connectionId={boundConnectionId}\n sourceLabel={`${identity.name.trim() || props.initial.namespace || \"MCP\"} OAuth`}\n headers={oauthRequestCredentials.headers}\n queryParams={oauthRequestCredentials.queryParams}\n isConnected={isConnected}\n onConnected={async (connectionId) => {\n await setBinding({\n params: { scopeId: oauthCredentialTargetScope },\n payload: new McpSourceBindingInput({\n sourceId: props.sourceId,\n sourceScope,\n scope: oauthCredentialTargetScope,\n slot: oauth2.connectionSlot,\n value: { kind: \"connection\", connectionId },\n }),\n reactivityKeys: [...sourceWriteKeys, ...connectionWriteKeys],\n });\n }}\n reconnectingLabel=\"Reconnecting…\"\n signingInLabel=\"Signing in…\"\n />\n )}\n\n {error && (\n <div className=\"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2\">\n <p className=\"text-sm text-destructive\">{error}</p>\n </div>\n )}\n\n <div className=\"flex items-center justify-between border-t border-border pt-4\">\n <Button variant=\"ghost\" onClick={props.onSave}>\n Cancel\n </Button>\n <Button onClick={handleSave} disabled={!dirty || saving}>\n {saving ? \"Saving…\" : \"Save changes\"}\n </Button>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Stdio read-only view\n// ---------------------------------------------------------------------------\n\nfunction StdioReadOnly(props: {\n sourceId: string;\n initial: McpStoredSourceSchemaType & { config: { transport: \"stdio\" } };\n onSave: () => void;\n}) {\n const { command, args } = props.initial.config;\n return (\n <div className=\"space-y-6\">\n <div>\n <h1 className=\"text-xl font-semibold text-foreground\">Edit MCP Source</h1>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n Stdio MCP sources cannot be edited in the UI. Modify the executor.jsonc config file\n directly.\n </p>\n </div>\n\n <div className=\"flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3\">\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-semibold text-card-foreground\">{props.sourceId}</p>\n <p className=\"mt-0.5 text-xs text-muted-foreground font-mono\">\n {command} {(args ?? []).join(\" \")}\n </p>\n </div>\n <Badge variant=\"secondary\" className=\"text-xs\">\n stdio\n </Badge>\n </div>\n\n <div className=\"flex items-center justify-end border-t border-border pt-4\">\n <Button onClick={props.onSave}>Done</Button>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Main component\n// ---------------------------------------------------------------------------\n\nexport default function EditMcpSource({\n sourceId,\n onSave,\n}: {\n readonly sourceId: string;\n readonly onSave: () => void;\n}) {\n const scopeId = useScope();\n const sourceResult = useAtomValue(mcpSourceAtom(scopeId, sourceId)) as AsyncResult.AsyncResult<\n McpStoredSourceSchemaType | null,\n unknown\n >;\n const source =\n AsyncResult.isSuccess(sourceResult) && sourceResult.value ? sourceResult.value : null;\n const sourceScope = source ? ScopeId.make(source.scope) : scopeId;\n const bindingsResult = useAtomValue(mcpSourceBindingsAtom(scopeId, sourceId, sourceScope));\n\n if (!AsyncResult.isSuccess(sourceResult) || !source || !AsyncResult.isSuccess(bindingsResult)) {\n return (\n <div className=\"space-y-6\">\n <div>\n <h1 className=\"text-xl font-semibold text-foreground\">Edit MCP Source</h1>\n <p className=\"mt-1 text-sm text-muted-foreground\">Loading configuration…</p>\n </div>\n </div>\n );\n }\n\n if (source.config.transport === \"stdio\") {\n return (\n <StdioReadOnly\n sourceId={sourceId}\n initial={source as McpStoredSourceSchemaType & { config: { transport: \"stdio\" } }}\n onSave={onSave}\n />\n );\n }\n\n return (\n <RemoteEditForm\n sourceId={sourceId}\n initial={source as McpStoredSourceSchemaType & { config: { transport: \"remote\" } }}\n bindings={bindingsResult.value}\n onSave={onSave}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AACzB,SAAS,cAAc,kBAAkB;AACzC,YAAY,iBAAiB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;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts","../src/sdk/stored-source.ts"],"sourcesContent":["import type { ScopeId } from \"@executor-js/sdk/core\";\nimport * as Atom from \"effect/unstable/reactivity/Atom\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\nimport { sourcesOptimisticAtom } from \"@executor-js/react/api/atoms\";\nimport { ReactivityKey } from \"@executor-js/react/api/reactivity-keys\";\nimport { McpClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms\n// ---------------------------------------------------------------------------\n\nexport const mcpSourceAtom = (scopeId: ScopeId, namespace: string) =>\n McpClient.query(\"mcp\", \"getSource\", {\n params: { scopeId, namespace },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.sources, ReactivityKey.tools],\n });\n\nexport const mcpSourceBindingsAtom = (\n scopeId: ScopeId,\n namespace: string,\n sourceScopeId: ScopeId,\n) =>\n McpClient.query(\"mcp\", \"listSourceBindings\", {\n params: { scopeId, namespace, sourceScopeId },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.sources, ReactivityKey.secrets, ReactivityKey.connections],\n });\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const probeMcpEndpoint = McpClient.mutation(\"mcp\", \"probeEndpoint\");\nexport const addMcpSource = McpClient.mutation(\"mcp\", \"addSource\");\nexport const addMcpSourceOptimistic = Atom.family((scopeId: ScopeId) =>\n sourcesOptimisticAtom(scopeId).pipe(\n Atom.optimisticFn({\n reducer: (current, arg) =>\n AsyncResult.map(current, (rows) => {\n const id = arg.payload.namespace ?? `pending-${Math.random().toString(36).slice(2)}`;\n const source = {\n id,\n scopeId: arg.payload.targetScope,\n kind: \"mcp\",\n pluginId: \"mcp\",\n name: arg.payload.name ?? id,\n ...(arg.payload.transport === \"remote\" ? { url: arg.payload.endpoint } : {}),\n canRemove: false,\n canRefresh: false,\n canEdit: false,\n runtime: false,\n };\n return [source, ...rows.filter((row) => row.id !== id)].sort((a, b) =>\n a.name.localeCompare(b.name),\n );\n }),\n fn: addMcpSource,\n }),\n ),\n);\nexport const removeMcpSource = McpClient.mutation(\"mcp\", \"removeSource\");\nexport const refreshMcpSource = McpClient.mutation(\"mcp\", \"refreshSource\");\nexport const updateMcpSource = McpClient.mutation(\"mcp\", \"updateSource\");\nexport const setMcpSourceBinding = McpClient.mutation(\"mcp\", \"setSourceBinding\");\nexport const removeMcpSourceBinding = McpClient.mutation(\"mcp\", \"removeSourceBinding\");\n","import { createPluginAtomClient } from \"@executor-js/sdk/client\";\nimport { getBaseUrl } from \"@executor-js/react/api/base-url\";\nimport { McpGroup } from \"../api/group\";\n\nexport const McpClient = createPluginAtomClient(McpGroup, {\n baseUrl: getBaseUrl,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport { InternalError, ScopeId, SecretBackedMap } from \"@executor-js/sdk/core\";\n\nimport { McpConnectionError, McpToolDiscoveryError } from \"../sdk/errors\";\nimport { McpStoredSourceSchema } from \"../sdk/stored-source\";\nimport {\n McpConnectionAuthInput,\n McpCredentialInput,\n McpSourceBindingInputSchema,\n McpSourceBindingRef,\n} from \"../sdk/types\";\n\n// ---------------------------------------------------------------------------\n// Params\n// ---------------------------------------------------------------------------\n\nconst ScopeParams = { scopeId: ScopeId };\nconst SourceParams = { scopeId: ScopeId, namespace: Schema.String };\nconst SourceBindingParams = {\n scopeId: ScopeId,\n namespace: Schema.String,\n sourceScopeId: ScopeId,\n};\n\n// ---------------------------------------------------------------------------\n// Auth payload (only for remote)\n// ---------------------------------------------------------------------------\n\nconst AuthPayload = McpConnectionAuthInput;\n\nconst StringMap = Schema.Record(Schema.String, Schema.String);\n// ---------------------------------------------------------------------------\n// Add source — discriminated union on transport\n// ---------------------------------------------------------------------------\n\nconst AddRemoteSourcePayload = Schema.Struct({\n targetScope: ScopeId,\n transport: Schema.Literal(\"remote\"),\n name: Schema.String,\n endpoint: Schema.String,\n remoteTransport: Schema.optional(Schema.Literals([\"streamable-http\", \"sse\", \"auto\"])),\n namespace: Schema.optional(Schema.String),\n queryParams: Schema.optional(Schema.Record(Schema.String, McpCredentialInput)),\n headers: Schema.optional(Schema.Record(Schema.String, McpCredentialInput)),\n auth: Schema.optional(AuthPayload),\n credentialTargetScope: Schema.optional(ScopeId),\n});\n\nconst AddStdioSourcePayload = Schema.Struct({\n targetScope: ScopeId,\n transport: Schema.Literal(\"stdio\"),\n name: Schema.String,\n command: Schema.String,\n args: Schema.optional(Schema.Array(Schema.String)),\n env: Schema.optional(StringMap),\n cwd: Schema.optional(Schema.String),\n namespace: Schema.optional(Schema.String),\n});\n\nconst AddSourcePayload = Schema.Union([AddRemoteSourcePayload, AddStdioSourcePayload]);\n\n// ---------------------------------------------------------------------------\n// Other payloads\n// ---------------------------------------------------------------------------\n\nconst UpdateSourcePayload = Schema.Struct({\n sourceScope: ScopeId,\n name: Schema.optional(Schema.String),\n endpoint: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, McpCredentialInput)),\n queryParams: Schema.optional(Schema.Record(Schema.String, McpCredentialInput)),\n credentialTargetScope: Schema.optional(ScopeId),\n auth: Schema.optional(AuthPayload),\n});\n\nconst UpdateSourceResponse = Schema.Struct({\n updated: Schema.Boolean,\n});\n\nconst ProbeEndpointPayload = Schema.Struct({\n endpoint: Schema.String,\n headers: Schema.optional(SecretBackedMap),\n queryParams: Schema.optional(SecretBackedMap),\n});\n\nconst ProbeEndpointResponse = Schema.Struct({\n connected: Schema.Boolean,\n requiresOAuth: Schema.Boolean,\n supportsDynamicRegistration: Schema.Boolean,\n name: Schema.String,\n namespace: Schema.String,\n toolCount: Schema.NullOr(Schema.Number),\n serverName: Schema.NullOr(Schema.String),\n});\n\nconst NamespacePayload = Schema.Struct({\n namespace: Schema.String,\n});\n\nconst RemoveBindingPayload = Schema.Struct({\n sourceId: Schema.String,\n sourceScope: ScopeId,\n slot: Schema.String,\n scope: ScopeId,\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddSourceResponse = Schema.Struct({\n toolCount: Schema.Number,\n namespace: Schema.String,\n});\n\nconst RefreshSourceResponse = Schema.Struct({\n toolCount: Schema.Number,\n});\n\nconst RemoveSourceResponse = Schema.Struct({\n removed: Schema.Boolean,\n});\n\n// ---------------------------------------------------------------------------\n// Group\n//\n// Plugin SDK errors (McpOAuthError etc.) are declared once at the group\n// level via `.addError(...)` — every endpoint inherits them. The errors\n// themselves carry their HTTP status via `HttpApiSchema.annotations`\n// in errors.ts, so handlers just `return yield* ext.foo(...)` and the\n// schema encodes whatever it gets.\n//\n// 5xx is handled at the API level: `CoreExecutorApi.addError(InternalError)`\n// adds a single shared opaque-by-schema 500 surface to every endpoint in\n// the entire API. Defects are captured + downgraded to it by an\n// HttpApiBuilder middleware (see apps/cloud/src/observability.ts).\n// No per-handler wrapping, no per-plugin InternalError.\n// ---------------------------------------------------------------------------\n\nexport const McpGroup = HttpApiGroup.make(\"mcp\")\n .add(\n HttpApiEndpoint.post(\"probeEndpoint\", \"/scopes/:scopeId/mcp/probe\", {\n params: ScopeParams,\n payload: ProbeEndpointPayload,\n success: ProbeEndpointResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addSource\", \"/scopes/:scopeId/mcp/sources\", {\n params: ScopeParams,\n payload: AddSourcePayload,\n success: AddSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"removeSource\", \"/scopes/:scopeId/mcp/sources/remove\", {\n params: ScopeParams,\n payload: NamespacePayload,\n success: RemoveSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"refreshSource\", \"/scopes/:scopeId/mcp/sources/refresh\", {\n params: ScopeParams,\n payload: NamespacePayload,\n success: RefreshSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getSource\", \"/scopes/:scopeId/mcp/sources/:namespace\", {\n params: SourceParams,\n success: Schema.NullOr(McpStoredSourceSchema),\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.patch(\"updateSource\", \"/scopes/:scopeId/mcp/sources/:namespace\", {\n params: SourceParams,\n payload: UpdateSourcePayload,\n success: UpdateSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.get(\n \"listSourceBindings\",\n \"/scopes/:scopeId/mcp/sources/:namespace/base/:sourceScopeId/bindings\",\n {\n params: SourceBindingParams,\n success: Schema.Array(McpSourceBindingRef),\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n },\n ),\n )\n .add(\n HttpApiEndpoint.post(\"setSourceBinding\", \"/scopes/:scopeId/mcp/source-bindings\", {\n params: ScopeParams,\n payload: McpSourceBindingInputSchema,\n success: McpSourceBindingRef,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"removeSourceBinding\", \"/scopes/:scopeId/mcp/source-bindings/remove\", {\n params: ScopeParams,\n payload: RemoveBindingPayload,\n success: Schema.Struct({ removed: Schema.Boolean }),\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n );\n// Errors declared once at the group level — every endpoint inherits.\n// Plugin domain errors carry their own HttpApiSchema status (4xx);\n// `InternalError` is the shared opaque 500 translated at the HTTP\n// edge by `withCapture`. We only list errors an MCP *group*\n// endpoint can surface: `McpInvocationError` is thrown inside\n// `invokeTool` which is reached via the core `tools.invoke`\n// endpoint, not any MCP-group endpoint, so it doesn't belong here.\n// OAuth errors live on the shared `/oauth/*` group in `@executor-js/api`\n// now — the MCP group only declares its own plugin-domain errors.\n","import { Schema } from \"effect\";\nimport { ScopeId } from \"@executor-js/sdk/core\";\n\nimport { McpStoredSourceData } from \"./types\";\n\n// ---------------------------------------------------------------------------\n// Stored source — the shape persisted by the binding store and exposed\n// via the getSource HTTP endpoint.\n// ---------------------------------------------------------------------------\n\nexport class McpStoredSourceSchema extends Schema.Class<McpStoredSourceSchema>(\"McpStoredSource\")({\n namespace: Schema.String,\n scope: ScopeId,\n name: Schema.String,\n config: McpStoredSourceData,\n}) {}\n\nexport type McpStoredSourceSchemaType = typeof McpStoredSourceSchema.Type;\n"],"mappings":";;;;;;;;;;;AACA,YAAY,UAAU;AACtB,YAAY,iBAAiB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;;;ACJ9B,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;;;ACD3B,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,UAAAA,eAAc;AACvB,SAAS,eAAe,WAAAC,UAAS,uBAAuB;;;ACFxD,SAAS,cAAc;AACvB,SAAS,eAAe;AASjB,IAAM,wBAAN,cAAoC,OAAO,MAA6B,iBAAiB,EAAE;AAAA,EAChG,WAAW,OAAO;AAAA,EAClB,OAAO;AAAA,EACP,MAAM,OAAO;AAAA,EACb,QAAQ;AACV,CAAC,EAAE;AAAC;;;ADEJ,IAAM,cAAc,EAAE,SAASC,SAAQ;AACvC,IAAM,eAAe,EAAE,SAASA,UAAS,WAAWC,QAAO,OAAO;AAClE,IAAM,sBAAsB;AAAA,EAC1B,SAASD;AAAA,EACT,WAAWC,QAAO;AAAA,EAClB,eAAeD;AACjB;AAMA,IAAM,cAAc;AAEpB,IAAM,YAAYC,QAAO,OAAOA,QAAO,QAAQA,QAAO,MAAM;AAK5D,IAAM,yBAAyBA,QAAO,OAAO;AAAA,EAC3C,aAAaD;AAAA,EACb,WAAWC,QAAO,QAAQ,QAAQ;AAAA,EAClC,MAAMA,QAAO;AAAA,EACb,UAAUA,QAAO;AAAA,EACjB,iBAAiBA,QAAO,SAASA,QAAO,SAAS,CA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