@executor-js/plugin-mcp 1.4.29 → 1.4.31
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-TLAL463B.js → AddMcpSource-3HUBFR3K.js} +68 -141
- package/dist/AddMcpSource-3HUBFR3K.js.map +1 -0
- package/dist/{EditMcpSource-FAWEECNU.js → EditMcpSource-UVGSSC2R.js} +106 -83
- package/dist/EditMcpSource-UVGSSC2R.js.map +1 -0
- package/dist/McpSourceSummary-UWVCAJOU.js +171 -0
- package/dist/McpSourceSummary-UWVCAJOU.js.map +1 -0
- package/dist/api/group.d.ts +92 -180
- package/dist/api/index.d.ts +97 -382
- package/dist/{chunk-4ORPFRLI.js → chunk-2A4H3UVR.js} +21 -80
- package/dist/chunk-2A4H3UVR.js.map +1 -0
- package/dist/{chunk-M6REVU6O.js → chunk-3TGDWTNE.js} +14 -40
- package/dist/chunk-3TGDWTNE.js.map +1 -0
- package/dist/{chunk-2DOCEPYN.js → chunk-H5PLTEMB.js} +632 -713
- package/dist/chunk-H5PLTEMB.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-SKSXXFOA.js → chunk-TW44CBXJ.js} +12 -1
- package/dist/chunk-TW44CBXJ.js.map +1 -0
- package/dist/client.js +5 -4
- package/dist/client.js.map +1 -1
- package/dist/core.js +4 -6
- package/dist/index.js +4 -2
- package/dist/promise.d.ts +1 -1
- package/dist/react/atoms.d.ts +198 -236
- package/dist/react/client.d.ts +91 -179
- package/dist/sdk/binding-store.d.ts +3 -163
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/plugin.d.ts +172 -225
- package/dist/sdk/presets.d.ts +1 -0
- package/dist/sdk/testing-fixtures.test.d.ts +1 -0
- package/dist/sdk/types.d.ts +58 -83
- package/dist/{stdio-connector-AA5S6UUJ.js → stdio-connector-MDW6PW36.js} +3 -1
- package/dist/{stdio-connector-AA5S6UUJ.js.map → stdio-connector-MDW6PW36.js.map} +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/server.d.ts +70 -4
- package/dist/testing.js +14085 -30
- package/dist/testing.js.map +1 -1
- package/package.json +3 -4
- package/dist/AddMcpSource-TLAL463B.js.map +0 -1
- package/dist/EditMcpSource-FAWEECNU.js.map +0 -1
- package/dist/McpSourceSummary-257JNETP.js +0 -85
- package/dist/McpSourceSummary-257JNETP.js.map +0 -1
- package/dist/chunk-2DOCEPYN.js.map +0 -1
- package/dist/chunk-4ORPFRLI.js.map +0 -1
- package/dist/chunk-M6REVU6O.js.map +0 -1
- package/dist/chunk-SKSXXFOA.js.map +0 -1
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Effect, Layer } from "effect";
|
|
1
|
+
import { Effect, Layer, Schema } from "effect";
|
|
2
2
|
import type { HttpClient } from "effect/unstable/http";
|
|
3
3
|
import { type StorageFailure } from "@executor-js/sdk/core";
|
|
4
|
+
import { OAuth2SourceConfig } from "@executor-js/sdk/http-source";
|
|
4
5
|
import { type McpBindingStore, type McpStoredSource } from "./binding-store";
|
|
5
6
|
import { McpConnectionError, McpToolDiscoveryError } from "./errors";
|
|
6
7
|
import { type McpShapeProbeResult } from "./probe-shape";
|
|
7
|
-
import {
|
|
8
|
+
import { type McpConfiguredValueInput as McpConfiguredValueInputType } from "./types";
|
|
8
9
|
import { type ConfigFileSink } from "@executor-js/config";
|
|
9
10
|
/**
|
|
10
11
|
* Executor scope id that owns a newly-added MCP source row. Must be one
|
|
@@ -20,15 +21,11 @@ export interface McpRemoteSourceConfig extends McpSourceScopeField {
|
|
|
20
21
|
readonly name: string;
|
|
21
22
|
readonly endpoint: string;
|
|
22
23
|
readonly remoteTransport?: "streamable-http" | "sse" | "auto";
|
|
23
|
-
readonly queryParams?: Record<string,
|
|
24
|
-
readonly headers?: Record<string,
|
|
24
|
+
readonly queryParams?: Record<string, McpConfiguredValueInputType>;
|
|
25
|
+
readonly headers?: Record<string, McpConfiguredValueInputType>;
|
|
25
26
|
readonly namespace?: string;
|
|
26
|
-
readonly
|
|
27
|
-
|
|
28
|
-
* Scope that owns any direct credentials supplied on this call. Required
|
|
29
|
-
* whenever headers/queryParams/auth carry direct secret or connection ids.
|
|
30
|
-
*/
|
|
31
|
-
readonly credentialTargetScope?: string;
|
|
27
|
+
readonly oauth2?: OAuth2SourceConfig;
|
|
28
|
+
readonly credentials?: McpInitialCredentialsInput;
|
|
32
29
|
}
|
|
33
30
|
export interface McpStdioSourceConfig extends McpSourceScopeField {
|
|
34
31
|
readonly transport: "stdio";
|
|
@@ -49,19 +46,170 @@ export interface McpProbeResult {
|
|
|
49
46
|
readonly toolCount: number | null;
|
|
50
47
|
readonly serverName: string | null;
|
|
51
48
|
}
|
|
52
|
-
|
|
53
|
-
readonly name
|
|
54
|
-
readonly endpoint
|
|
55
|
-
readonly headers
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
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
|
+
}>]>>>;
|
|
78
|
+
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
79
|
+
readonly kind: Schema.Literal<"none">;
|
|
80
|
+
}>, Schema.Struct<{
|
|
81
|
+
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
82
|
+
readonly clientId: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
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>;
|
|
149
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
150
|
+
}>, Schema.Struct<{
|
|
151
|
+
readonly kind: Schema.Literal<"connection">;
|
|
152
|
+
readonly connectionId: Schema.String;
|
|
153
|
+
}>]>>>;
|
|
154
|
+
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
155
|
+
readonly kind: Schema.Literal<"none">;
|
|
156
|
+
}>, Schema.Struct<{
|
|
157
|
+
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
158
|
+
readonly clientId: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
159
|
+
readonly kind: Schema.Literal<"text">;
|
|
160
|
+
readonly text: Schema.String;
|
|
161
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
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
|
+
}>>;
|
|
198
|
+
}>]>>;
|
|
199
|
+
}>;
|
|
200
|
+
type McpInitialCredentialsInput = typeof McpInitialCredentialsInputSchema.Type;
|
|
201
|
+
declare const McpProbeEndpointInputSchema: Schema.Struct<{
|
|
202
|
+
readonly endpoint: Schema.String;
|
|
203
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
204
|
+
readonly secretId: Schema.String;
|
|
205
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
206
|
+
}>]>>>;
|
|
207
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
208
|
+
readonly secretId: Schema.String;
|
|
209
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
210
|
+
}>]>>>;
|
|
211
|
+
}>;
|
|
212
|
+
export type McpProbeEndpointInput = typeof McpProbeEndpointInputSchema.Type;
|
|
65
213
|
/** Translate a non-MCP probe outcome into a message a user can act on.
|
|
66
214
|
* The technical `reason` (`401 without Bearer WWW-Authenticate — not an
|
|
67
215
|
* MCP auth challenge`, etc.) stays in telemetry via the probe span; the
|
|
@@ -111,204 +259,7 @@ export declare const mcpPlugin: import("@executor-js/sdk/core").ConfiguredPlugin
|
|
|
111
259
|
toolCount: number;
|
|
112
260
|
}, StorageFailure | McpConnectionError | McpToolDiscoveryError, never>;
|
|
113
261
|
getSource: (namespace: string, scope: string) => Effect.Effect<McpStoredSource | null, StorageFailure, never>;
|
|
114
|
-
|
|
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>;
|
|
153
|
-
removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
|
|
154
|
-
}, McpBindingStore, McpPluginOptions, {
|
|
155
|
-
readonly mcp_source: {
|
|
156
|
-
readonly fields: {
|
|
157
|
-
readonly id: {
|
|
158
|
-
readonly type: "string";
|
|
159
|
-
readonly required: true;
|
|
160
|
-
};
|
|
161
|
-
readonly scope_id: {
|
|
162
|
-
readonly type: "string";
|
|
163
|
-
readonly required: true;
|
|
164
|
-
readonly index: true;
|
|
165
|
-
};
|
|
166
|
-
readonly name: {
|
|
167
|
-
readonly type: "string";
|
|
168
|
-
readonly required: true;
|
|
169
|
-
};
|
|
170
|
-
readonly config: {
|
|
171
|
-
readonly type: "json";
|
|
172
|
-
readonly required: true;
|
|
173
|
-
};
|
|
174
|
-
readonly auth_kind: {
|
|
175
|
-
readonly type: ["none", "header", "oauth2"];
|
|
176
|
-
readonly required: true;
|
|
177
|
-
readonly defaultValue: "none";
|
|
178
|
-
};
|
|
179
|
-
readonly auth_header_name: {
|
|
180
|
-
readonly type: "string";
|
|
181
|
-
readonly required: false;
|
|
182
|
-
};
|
|
183
|
-
readonly auth_header_slot: {
|
|
184
|
-
readonly type: "string";
|
|
185
|
-
readonly required: false;
|
|
186
|
-
};
|
|
187
|
-
readonly auth_header_prefix: {
|
|
188
|
-
readonly type: "string";
|
|
189
|
-
readonly required: false;
|
|
190
|
-
};
|
|
191
|
-
readonly auth_connection_slot: {
|
|
192
|
-
readonly type: "string";
|
|
193
|
-
readonly required: false;
|
|
194
|
-
};
|
|
195
|
-
readonly auth_client_id_slot: {
|
|
196
|
-
readonly type: "string";
|
|
197
|
-
readonly required: false;
|
|
198
|
-
};
|
|
199
|
-
readonly auth_client_secret_slot: {
|
|
200
|
-
readonly type: "string";
|
|
201
|
-
readonly required: false;
|
|
202
|
-
};
|
|
203
|
-
readonly created_at: {
|
|
204
|
-
readonly type: "date";
|
|
205
|
-
readonly required: true;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
readonly mcp_source_header: {
|
|
210
|
-
readonly fields: {
|
|
211
|
-
readonly id: {
|
|
212
|
-
readonly type: "string";
|
|
213
|
-
readonly required: true;
|
|
214
|
-
};
|
|
215
|
-
readonly scope_id: {
|
|
216
|
-
readonly type: "string";
|
|
217
|
-
readonly required: true;
|
|
218
|
-
readonly index: true;
|
|
219
|
-
};
|
|
220
|
-
readonly source_id: {
|
|
221
|
-
readonly type: "string";
|
|
222
|
-
readonly required: true;
|
|
223
|
-
readonly index: true;
|
|
224
|
-
};
|
|
225
|
-
readonly name: {
|
|
226
|
-
readonly type: "string";
|
|
227
|
-
readonly required: true;
|
|
228
|
-
};
|
|
229
|
-
readonly kind: {
|
|
230
|
-
readonly type: ["text", "binding"];
|
|
231
|
-
readonly required: true;
|
|
232
|
-
};
|
|
233
|
-
readonly text_value: {
|
|
234
|
-
readonly type: "string";
|
|
235
|
-
readonly required: false;
|
|
236
|
-
};
|
|
237
|
-
readonly slot_key: {
|
|
238
|
-
readonly type: "string";
|
|
239
|
-
readonly required: false;
|
|
240
|
-
};
|
|
241
|
-
readonly prefix: {
|
|
242
|
-
readonly type: "string";
|
|
243
|
-
readonly required: false;
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
readonly mcp_source_query_param: {
|
|
248
|
-
readonly fields: {
|
|
249
|
-
readonly id: {
|
|
250
|
-
readonly type: "string";
|
|
251
|
-
readonly required: true;
|
|
252
|
-
};
|
|
253
|
-
readonly scope_id: {
|
|
254
|
-
readonly type: "string";
|
|
255
|
-
readonly required: true;
|
|
256
|
-
readonly index: true;
|
|
257
|
-
};
|
|
258
|
-
readonly source_id: {
|
|
259
|
-
readonly type: "string";
|
|
260
|
-
readonly required: true;
|
|
261
|
-
readonly index: true;
|
|
262
|
-
};
|
|
263
|
-
readonly name: {
|
|
264
|
-
readonly type: "string";
|
|
265
|
-
readonly required: true;
|
|
266
|
-
};
|
|
267
|
-
readonly kind: {
|
|
268
|
-
readonly type: ["text", "binding"];
|
|
269
|
-
readonly required: true;
|
|
270
|
-
};
|
|
271
|
-
readonly text_value: {
|
|
272
|
-
readonly type: "string";
|
|
273
|
-
readonly required: false;
|
|
274
|
-
};
|
|
275
|
-
readonly slot_key: {
|
|
276
|
-
readonly type: "string";
|
|
277
|
-
readonly required: false;
|
|
278
|
-
};
|
|
279
|
-
readonly prefix: {
|
|
280
|
-
readonly type: "string";
|
|
281
|
-
readonly required: false;
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
readonly mcp_binding: {
|
|
286
|
-
readonly fields: {
|
|
287
|
-
readonly id: {
|
|
288
|
-
readonly type: "string";
|
|
289
|
-
readonly required: true;
|
|
290
|
-
};
|
|
291
|
-
readonly scope_id: {
|
|
292
|
-
readonly type: "string";
|
|
293
|
-
readonly required: true;
|
|
294
|
-
readonly index: true;
|
|
295
|
-
};
|
|
296
|
-
readonly source_id: {
|
|
297
|
-
readonly type: "string";
|
|
298
|
-
readonly required: true;
|
|
299
|
-
readonly index: true;
|
|
300
|
-
};
|
|
301
|
-
readonly binding: {
|
|
302
|
-
readonly type: "json";
|
|
303
|
-
readonly required: true;
|
|
304
|
-
};
|
|
305
|
-
readonly created_at: {
|
|
306
|
-
readonly type: "date";
|
|
307
|
-
readonly required: true;
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
}, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
262
|
+
}, McpBindingStore, McpPluginOptions, {}, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
312
263
|
/**
|
|
313
264
|
* Errors any MCP extension method may surface. The first four are
|
|
314
265
|
* plugin-domain tagged errors that flow directly to clients (4xx, each
|
|
@@ -331,9 +282,5 @@ export interface McpPluginExtension {
|
|
|
331
282
|
readonly toolCount: number;
|
|
332
283
|
}, McpExtensionFailure>;
|
|
333
284
|
readonly getSource: (namespace: string, scope: string) => Effect.Effect<McpStoredSource | null, McpExtensionFailure>;
|
|
334
|
-
readonly updateSource: (namespace: string, scope: string, input: McpUpdateSourceInput) => Effect.Effect<void, McpExtensionFailure>;
|
|
335
|
-
readonly listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly McpSourceBindingRef[], StorageFailure>;
|
|
336
|
-
readonly setSourceBinding: (input: McpSourceBindingInput) => Effect.Effect<McpSourceBindingRef, StorageFailure>;
|
|
337
|
-
readonly removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
338
285
|
}
|
|
339
286
|
export {};
|
package/dist/sdk/presets.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { SecretBackedMap, SecretBackedValue } from "@executor-js/sdk/
|
|
2
|
+
import { SecretBackedMap, SecretBackedValue } from "@executor-js/sdk/shared";
|
|
3
3
|
export { SecretBackedMap, SecretBackedValue };
|
|
4
4
|
export declare const McpRemoteTransport: Schema.Literals<readonly ["streamable-http", "sse", "auto"]>;
|
|
5
5
|
export type McpRemoteTransport = typeof McpRemoteTransport.Type;
|
|
@@ -12,19 +12,24 @@ export declare const ConfiguredMcpCredentialValue: Schema.Union<readonly [Schema
|
|
|
12
12
|
readonly prefix: Schema.optional<Schema.String>;
|
|
13
13
|
}>]>;
|
|
14
14
|
export type ConfiguredMcpCredentialValue = typeof ConfiguredMcpCredentialValue.Type;
|
|
15
|
-
export declare const
|
|
16
|
-
readonly
|
|
15
|
+
export declare const McpConfiguredValueInput: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
16
|
+
readonly kind: Schema.Literal<"secret">;
|
|
17
17
|
readonly prefix: Schema.optional<Schema.String>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
readonly
|
|
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;
|
|
22
23
|
readonly prefix: Schema.optional<Schema.String>;
|
|
23
|
-
}
|
|
24
|
-
readonly kind: Schema.Literal<"
|
|
25
|
-
readonly
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly kind: Schema.Literal<"secret">;
|
|
26
|
+
readonly secretId: Schema.String;
|
|
27
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
26
28
|
readonly prefix: Schema.optional<Schema.String>;
|
|
27
|
-
}
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly kind: Schema.Literal<"connection">;
|
|
31
|
+
readonly connectionId: Schema.String;
|
|
32
|
+
}>]>;
|
|
28
33
|
export type McpCredentialInput = typeof McpCredentialInput.Type;
|
|
29
34
|
export declare const mcpHeaderSlot: (name: string) => string;
|
|
30
35
|
export declare const mcpQueryParamSlot: (name: string) => string;
|
|
@@ -49,82 +54,52 @@ export declare const McpConnectionAuth: Schema.Union<readonly [Schema.Struct<{
|
|
|
49
54
|
readonly clientSecretSlot: Schema.optional<Schema.String>;
|
|
50
55
|
}>]>;
|
|
51
56
|
export type McpConnectionAuth = typeof McpConnectionAuth.Type;
|
|
52
|
-
export declare const McpConnectionAuthInput: Schema.Union<readonly [Schema.
|
|
57
|
+
export declare const McpConnectionAuthInput: Schema.Union<readonly [Schema.Struct<{
|
|
53
58
|
readonly kind: Schema.Literal<"none">;
|
|
54
59
|
}>, Schema.Struct<{
|
|
55
|
-
readonly
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
+
}>>;
|
|
76
101
|
}>]>;
|
|
77
102
|
export type McpConnectionAuthInput = typeof McpConnectionAuthInput.Type;
|
|
78
|
-
export declare const McpSourceBindingValue: Schema.Union<readonly [Schema.Struct<{
|
|
79
|
-
readonly kind: Schema.Literal<"text">;
|
|
80
|
-
readonly text: Schema.String;
|
|
81
|
-
}>, Schema.Struct<{
|
|
82
|
-
readonly kind: Schema.Literal<"secret">;
|
|
83
|
-
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
84
|
-
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
85
|
-
}>, Schema.Struct<{
|
|
86
|
-
readonly kind: Schema.Literal<"connection">;
|
|
87
|
-
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
88
|
-
}>]>;
|
|
89
|
-
export type McpSourceBindingValue = typeof McpSourceBindingValue.Type;
|
|
90
|
-
export declare const McpSourceBindingInput: Schema.Struct<{
|
|
91
|
-
readonly sourceId: Schema.String;
|
|
92
|
-
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
93
|
-
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
94
|
-
readonly slot: Schema.String;
|
|
95
|
-
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
96
|
-
readonly kind: Schema.Literal<"text">;
|
|
97
|
-
readonly text: Schema.String;
|
|
98
|
-
}>, Schema.Struct<{
|
|
99
|
-
readonly kind: Schema.Literal<"secret">;
|
|
100
|
-
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
101
|
-
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
102
|
-
}>, Schema.Struct<{
|
|
103
|
-
readonly kind: Schema.Literal<"connection">;
|
|
104
|
-
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
105
|
-
}>]>;
|
|
106
|
-
}>;
|
|
107
|
-
export type McpSourceBindingInput = typeof McpSourceBindingInput.Type;
|
|
108
|
-
export declare const McpSourceBindingRef: Schema.Struct<{
|
|
109
|
-
readonly sourceId: Schema.String;
|
|
110
|
-
readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
111
|
-
readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
112
|
-
readonly slot: Schema.String;
|
|
113
|
-
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
114
|
-
readonly kind: Schema.Literal<"text">;
|
|
115
|
-
readonly text: Schema.String;
|
|
116
|
-
}>, Schema.Struct<{
|
|
117
|
-
readonly kind: Schema.Literal<"secret">;
|
|
118
|
-
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
119
|
-
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
120
|
-
}>, Schema.Struct<{
|
|
121
|
-
readonly kind: Schema.Literal<"connection">;
|
|
122
|
-
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
123
|
-
}>]>;
|
|
124
|
-
readonly createdAt: Schema.Date;
|
|
125
|
-
readonly updatedAt: Schema.Date;
|
|
126
|
-
}>;
|
|
127
|
-
export type McpSourceBindingRef = typeof McpSourceBindingRef.Type;
|
|
128
103
|
export declare const McpRemoteSourceData: Schema.Struct<{
|
|
129
104
|
readonly transport: Schema.Literal<"remote">;
|
|
130
105
|
/** The MCP server endpoint URL */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "./chunk-PZ5AY32C.js";
|
|
2
|
+
|
|
1
3
|
// src/sdk/stdio-connector.ts
|
|
2
4
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
3
5
|
var createStdioTransport = (config) => new StdioClientTransport({
|
|
@@ -9,4 +11,4 @@ var createStdioTransport = (config) => new StdioClientTransport({
|
|
|
9
11
|
export {
|
|
10
12
|
createStdioTransport
|
|
11
13
|
};
|
|
12
|
-
//# sourceMappingURL=stdio-connector-
|
|
14
|
+
//# sourceMappingURL=stdio-connector-MDW6PW36.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sdk/stdio-connector.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Stdio transport factory — loaded only on demand\n// ---------------------------------------------------------------------------\n//\n// Kept in its own module so `connection.ts` never imports it eagerly at\n// module load. `@modelcontextprotocol/sdk/client/stdio.js` pulls in\n// `node:child_process` at evaluation time; under `@cloudflare/vitest-pool-workers`\n// that crashes workerd at module instantiation with SIGSEGV (prod bundles\n// tree-shake it away when `dangerouslyAllowStdioMCP: false`, tests do not).\n//\n// Callers that actually need stdio transport reach it via a dynamic import\n// in `connection.ts`. Remote-only consumers (cloud/marketing) never execute\n// the import and therefore never touch `node:child_process`.\n// ---------------------------------------------------------------------------\n\nimport { StdioClientTransport } from \"@modelcontextprotocol/sdk/client/stdio.js\";\n\nexport type StdioTransportConfig = {\n readonly command: string;\n readonly args?: ReadonlyArray<string>;\n readonly env?: Record<string, string>;\n readonly cwd?: string;\n};\n\nexport const createStdioTransport = (config: StdioTransportConfig) =>\n new StdioClientTransport({\n command: config.command,\n args: config.args ? [...config.args] : undefined,\n env: config.env ? ({ ...process.env, ...config.env } as Record<string, string>) : undefined,\n cwd: config.cwd,\n });\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/sdk/stdio-connector.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Stdio transport factory — loaded only on demand\n// ---------------------------------------------------------------------------\n//\n// Kept in its own module so `connection.ts` never imports it eagerly at\n// module load. `@modelcontextprotocol/sdk/client/stdio.js` pulls in\n// `node:child_process` at evaluation time; under `@cloudflare/vitest-pool-workers`\n// that crashes workerd at module instantiation with SIGSEGV (prod bundles\n// tree-shake it away when `dangerouslyAllowStdioMCP: false`, tests do not).\n//\n// Callers that actually need stdio transport reach it via a dynamic import\n// in `connection.ts`. Remote-only consumers (cloud/marketing) never execute\n// the import and therefore never touch `node:child_process`.\n// ---------------------------------------------------------------------------\n\nimport { StdioClientTransport } from \"@modelcontextprotocol/sdk/client/stdio.js\";\n\nexport type StdioTransportConfig = {\n readonly command: string;\n readonly args?: ReadonlyArray<string>;\n readonly env?: Record<string, string>;\n readonly cwd?: string;\n};\n\nexport const createStdioTransport = (config: StdioTransportConfig) =>\n new StdioClientTransport({\n command: config.command,\n args: config.args ? [...config.args] : undefined,\n env: config.env ? ({ ...process.env, ...config.env } as Record<string, string>) : undefined,\n cwd: config.cwd,\n });\n"],"mappings":";;;AAeA,SAAS,4BAA4B;AAS9B,IAAM,uBAAuB,CAAC,WACnC,IAAI,qBAAqB;AAAA,EACvB,SAAS,OAAO;AAAA,EAChB,MAAM,OAAO,OAAO,CAAC,GAAG,OAAO,IAAI,IAAI;AAAA,EACvC,KAAK,OAAO,MAAO,EAAE,GAAG,QAAQ,KAAK,GAAG,OAAO,IAAI,IAA+B;AAAA,EAClF,KAAK,OAAO;AACd,CAAC;","names":[]}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { serveMcpServer, type McpTestServer } from "./server";
|
|
1
|
+
export { McpTestServerError, McpTestServerLayer, makeAnnotationsMcpServer, makeEchoMcpServer, makeElicitationMcpServer, makeGreetingMcpServer, serveMcpServer, serveMcpServerWithOAuth, type McpTestRequest, type McpTestServer, type McpTestServerOptions, } from "./server";
|