@executor-js/plugin-mcp 0.0.1-beta.6 → 0.0.2
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/README.md +19 -15
- package/dist/api/group.d.ts +114 -147
- package/dist/api/handlers.d.ts +2 -2
- package/dist/api/handlers.test.d.ts +1 -0
- package/dist/chunk-DJANY5EU.js +1325 -0
- package/dist/chunk-DJANY5EU.js.map +1 -0
- package/dist/core.js +8 -52
- package/dist/core.js.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/promise.d.ts +2 -6
- package/dist/react/AddMcpSource.d.ts +2 -0
- package/dist/react/McpSignInButton.d.ts +3 -0
- package/dist/react/atoms.d.ts +153 -0
- package/dist/react/client.d.ts +437 -3
- package/dist/react/index.d.ts +3 -2
- package/dist/react/source-plugin.d.ts +13 -1
- package/dist/sdk/binding-store.d.ts +74 -18
- package/dist/sdk/connection-pool.test.d.ts +1 -0
- package/dist/sdk/connection.d.ts +3 -1
- package/dist/sdk/cross-user-isolation.test.d.ts +1 -0
- package/dist/sdk/errors.d.ts +15 -23
- package/dist/sdk/index.d.ts +3 -3
- package/dist/sdk/invoke.d.ts +18 -17
- package/dist/sdk/manifest.d.ts +1 -0
- package/dist/sdk/per-user-auth-isolation.test.d.ts +1 -0
- package/dist/sdk/plugin.d.ts +109 -43
- package/dist/sdk/probe-shape.d.ts +39 -0
- package/dist/sdk/probe-shape.test.d.ts +1 -0
- package/dist/sdk/stdio-connector.d.ts +8 -0
- package/dist/sdk/stored-source.d.ts +31 -105
- package/dist/sdk/types.d.ts +77 -93
- package/dist/stdio-connector-KNHLETKM.js +12 -0
- package/dist/stdio-connector-KNHLETKM.js.map +1 -0
- package/package.json +11 -21
- package/dist/chunk-NJ4CITCV.js +0 -1203
- package/dist/chunk-NJ4CITCV.js.map +0 -1
- package/dist/react/McpSourceSummary.d.ts +0 -3
- package/dist/sdk/config-file-store.d.ts +0 -10
- package/dist/sdk/oauth.d.ts +0 -36
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1,136 +1,120 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
|
|
2
|
+
import { SecretBackedMap, SecretBackedValue } from "@executor-js/sdk/core";
|
|
3
|
+
export { SecretBackedMap, SecretBackedValue };
|
|
4
|
+
export declare const McpRemoteTransport: Schema.Literals<readonly ["streamable-http", "sse", "auto"]>;
|
|
3
5
|
export type McpRemoteTransport = typeof McpRemoteTransport.Type;
|
|
4
6
|
/** All transport types (used in the connector layer) */
|
|
5
|
-
export declare const McpTransport: Schema.
|
|
7
|
+
export declare const McpTransport: Schema.Literals<readonly ["streamable-http", "sse", "stdio", "auto"]>;
|
|
6
8
|
export type McpTransport = typeof McpTransport.Type;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
/** JSON object loosely typed — used for opaque OAuth state we just round-trip. */
|
|
10
|
+
declare const JsonObject: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
11
|
+
export { JsonObject as McpJsonObject };
|
|
12
|
+
export declare const McpConnectionAuth: Schema.Union<readonly [Schema.Struct<{
|
|
13
|
+
readonly kind: Schema.Literal<"none">;
|
|
9
14
|
}>, Schema.Struct<{
|
|
10
|
-
kind: Schema.Literal<
|
|
11
|
-
headerName:
|
|
12
|
-
secretId:
|
|
13
|
-
prefix: Schema.optional<
|
|
15
|
+
readonly kind: Schema.Literal<"header">;
|
|
16
|
+
readonly headerName: Schema.String;
|
|
17
|
+
readonly secretId: Schema.String;
|
|
18
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
14
19
|
}>, Schema.Struct<{
|
|
15
|
-
kind: Schema.Literal<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
default: () => string;
|
|
20
|
-
}>;
|
|
21
|
-
expiresAt: Schema.NullOr<typeof Schema.Number>;
|
|
22
|
-
scope: Schema.NullOr<typeof Schema.String>;
|
|
20
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
21
|
+
readonly connectionId: Schema.String;
|
|
22
|
+
readonly clientIdSecretId: Schema.optional<Schema.String>;
|
|
23
|
+
readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
23
24
|
}>]>;
|
|
24
25
|
export type McpConnectionAuth = typeof McpConnectionAuth.Type;
|
|
25
26
|
export declare const McpRemoteSourceData: Schema.Struct<{
|
|
26
|
-
transport: Schema.Literal<
|
|
27
|
+
readonly transport: Schema.Literal<"remote">;
|
|
27
28
|
/** The MCP server endpoint URL */
|
|
28
|
-
endpoint:
|
|
29
|
+
readonly endpoint: Schema.String;
|
|
29
30
|
/** Transport preference for this remote source */
|
|
30
|
-
remoteTransport: Schema.
|
|
31
|
-
default: () => "auto";
|
|
32
|
-
}>;
|
|
31
|
+
readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
33
32
|
/** Extra query params appended to the endpoint URL */
|
|
34
|
-
queryParams: Schema.optional<Schema
|
|
33
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
34
|
+
readonly secretId: Schema.String;
|
|
35
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
36
|
+
}>]>>>;
|
|
35
37
|
/** Extra headers sent on every request */
|
|
36
|
-
headers: Schema.optional<Schema
|
|
38
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
39
|
+
readonly secretId: Schema.String;
|
|
40
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
41
|
+
}>]>>>;
|
|
37
42
|
/** Auth configuration */
|
|
38
|
-
auth: Schema.Union<[Schema.Struct<{
|
|
39
|
-
kind: Schema.Literal<
|
|
43
|
+
readonly auth: Schema.Union<readonly [Schema.Struct<{
|
|
44
|
+
readonly kind: Schema.Literal<"none">;
|
|
40
45
|
}>, Schema.Struct<{
|
|
41
|
-
kind: Schema.Literal<
|
|
42
|
-
headerName:
|
|
43
|
-
secretId:
|
|
44
|
-
prefix: Schema.optional<
|
|
46
|
+
readonly kind: Schema.Literal<"header">;
|
|
47
|
+
readonly headerName: Schema.String;
|
|
48
|
+
readonly secretId: Schema.String;
|
|
49
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
45
50
|
}>, Schema.Struct<{
|
|
46
|
-
kind: Schema.Literal<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
default: () => string;
|
|
51
|
-
}>;
|
|
52
|
-
expiresAt: Schema.NullOr<typeof Schema.Number>;
|
|
53
|
-
scope: Schema.NullOr<typeof Schema.String>;
|
|
51
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
52
|
+
readonly connectionId: Schema.String;
|
|
53
|
+
readonly clientIdSecretId: Schema.optional<Schema.String>;
|
|
54
|
+
readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
54
55
|
}>]>;
|
|
55
56
|
}>;
|
|
56
57
|
export type McpRemoteSourceData = typeof McpRemoteSourceData.Type;
|
|
57
58
|
export declare const McpStdioSourceData: Schema.Struct<{
|
|
58
|
-
transport: Schema.Literal<
|
|
59
|
+
readonly transport: Schema.Literal<"stdio">;
|
|
59
60
|
/** The command to run */
|
|
60
|
-
command:
|
|
61
|
+
readonly command: Schema.String;
|
|
61
62
|
/** Arguments to the command */
|
|
62
|
-
args: Schema.optional<Schema
|
|
63
|
+
readonly args: Schema.optional<Schema.$Array<Schema.String>>;
|
|
63
64
|
/** Environment variables */
|
|
64
|
-
env: Schema.optional<Schema
|
|
65
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
65
66
|
/** Working directory */
|
|
66
|
-
cwd: Schema.optional<
|
|
67
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
67
68
|
}>;
|
|
68
69
|
export type McpStdioSourceData = typeof McpStdioSourceData.Type;
|
|
69
|
-
export declare const McpStoredSourceData: Schema.Union<[Schema.Struct<{
|
|
70
|
-
transport: Schema.Literal<
|
|
70
|
+
export declare const McpStoredSourceData: Schema.Union<readonly [Schema.Struct<{
|
|
71
|
+
readonly transport: Schema.Literal<"remote">;
|
|
71
72
|
/** The MCP server endpoint URL */
|
|
72
|
-
endpoint:
|
|
73
|
+
readonly endpoint: Schema.String;
|
|
73
74
|
/** Transport preference for this remote source */
|
|
74
|
-
remoteTransport: Schema.
|
|
75
|
-
default: () => "auto";
|
|
76
|
-
}>;
|
|
75
|
+
readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
77
76
|
/** Extra query params appended to the endpoint URL */
|
|
78
|
-
queryParams: Schema.optional<Schema
|
|
77
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
78
|
+
readonly secretId: Schema.String;
|
|
79
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
80
|
+
}>]>>>;
|
|
79
81
|
/** Extra headers sent on every request */
|
|
80
|
-
headers: Schema.optional<Schema
|
|
82
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
83
|
+
readonly secretId: Schema.String;
|
|
84
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
85
|
+
}>]>>>;
|
|
81
86
|
/** Auth configuration */
|
|
82
|
-
auth: Schema.Union<[Schema.Struct<{
|
|
83
|
-
kind: Schema.Literal<
|
|
87
|
+
readonly auth: Schema.Union<readonly [Schema.Struct<{
|
|
88
|
+
readonly kind: Schema.Literal<"none">;
|
|
84
89
|
}>, Schema.Struct<{
|
|
85
|
-
kind: Schema.Literal<
|
|
86
|
-
headerName:
|
|
87
|
-
secretId:
|
|
88
|
-
prefix: Schema.optional<
|
|
90
|
+
readonly kind: Schema.Literal<"header">;
|
|
91
|
+
readonly headerName: Schema.String;
|
|
92
|
+
readonly secretId: Schema.String;
|
|
93
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
89
94
|
}>, Schema.Struct<{
|
|
90
|
-
kind: Schema.Literal<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
default: () => string;
|
|
95
|
-
}>;
|
|
96
|
-
expiresAt: Schema.NullOr<typeof Schema.Number>;
|
|
97
|
-
scope: Schema.NullOr<typeof Schema.String>;
|
|
95
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
96
|
+
readonly connectionId: Schema.String;
|
|
97
|
+
readonly clientIdSecretId: Schema.optional<Schema.String>;
|
|
98
|
+
readonly clientSecretSecretId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
98
99
|
}>]>;
|
|
99
100
|
}>, Schema.Struct<{
|
|
100
|
-
transport: Schema.Literal<
|
|
101
|
+
readonly transport: Schema.Literal<"stdio">;
|
|
101
102
|
/** The command to run */
|
|
102
|
-
command:
|
|
103
|
+
readonly command: Schema.String;
|
|
103
104
|
/** Arguments to the command */
|
|
104
|
-
args: Schema.optional<Schema
|
|
105
|
+
readonly args: Schema.optional<Schema.$Array<Schema.String>>;
|
|
105
106
|
/** Environment variables */
|
|
106
|
-
env: Schema.optional<Schema
|
|
107
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
107
108
|
/** Working directory */
|
|
108
|
-
cwd: Schema.optional<
|
|
109
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
109
110
|
}>]>;
|
|
110
111
|
export type McpStoredSourceData = typeof McpStoredSourceData.Type;
|
|
111
|
-
declare const McpToolBinding_base: Schema.Class<McpToolBinding, {
|
|
112
|
-
toolId:
|
|
113
|
-
toolName:
|
|
114
|
-
description: Schema.NullOr<
|
|
115
|
-
inputSchema: Schema.optional<
|
|
116
|
-
outputSchema: Schema.optional<
|
|
117
|
-
}
|
|
118
|
-
toolId: typeof Schema.String;
|
|
119
|
-
toolName: typeof Schema.String;
|
|
120
|
-
description: Schema.NullOr<typeof Schema.String>;
|
|
121
|
-
inputSchema: Schema.optional<typeof Schema.Unknown>;
|
|
122
|
-
outputSchema: Schema.optional<typeof Schema.Unknown>;
|
|
123
|
-
}>, never, {
|
|
124
|
-
readonly toolId: string;
|
|
125
|
-
} & {
|
|
126
|
-
readonly description: string | null;
|
|
127
|
-
} & {
|
|
128
|
-
readonly inputSchema?: unknown;
|
|
129
|
-
} & {
|
|
130
|
-
readonly outputSchema?: unknown;
|
|
131
|
-
} & {
|
|
132
|
-
readonly toolName: string;
|
|
133
|
-
}, {}, {}>;
|
|
112
|
+
declare const McpToolBinding_base: Schema.Class<McpToolBinding, Schema.Struct<{
|
|
113
|
+
readonly toolId: Schema.String;
|
|
114
|
+
readonly toolName: Schema.String;
|
|
115
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
116
|
+
readonly inputSchema: Schema.optional<Schema.Unknown>;
|
|
117
|
+
readonly outputSchema: Schema.optional<Schema.Unknown>;
|
|
118
|
+
}>, {}>;
|
|
134
119
|
export declare class McpToolBinding extends McpToolBinding_base {
|
|
135
120
|
}
|
|
136
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/sdk/stdio-connector.ts
|
|
2
|
+
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
3
|
+
var createStdioTransport = (config) => new StdioClientTransport({
|
|
4
|
+
command: config.command,
|
|
5
|
+
args: config.args ? [...config.args] : void 0,
|
|
6
|
+
env: config.env ? { ...process.env, ...config.env } : void 0,
|
|
7
|
+
cwd: config.cwd
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
createStdioTransport
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=stdio-connector-KNHLETKM.js.map
|
|
@@ -0,0 +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\n ? ({ ...process.env, ...config.env } as Record<string, string>)\n : 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,MACP,EAAE,GAAG,QAAQ,KAAK,GAAG,OAAO,IAAI,IACjC;AAAA,EACJ,KAAK,OAAO;AACd,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executor-js/plugin-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
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"
|
|
@@ -40,30 +40,26 @@
|
|
|
40
40
|
"typecheck:slow": "bunx tsc --noEmit -p tsconfig.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@effect/platform": "
|
|
44
|
-
"@
|
|
45
|
-
"@executor/
|
|
46
|
-
"@executor-js/sdk": "0.0.1-beta.6",
|
|
43
|
+
"@effect/platform-node": "4.0.0-beta.59",
|
|
44
|
+
"@executor-js/config": "0.0.2",
|
|
45
|
+
"@executor-js/sdk": "0.0.2",
|
|
47
46
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
48
|
-
"effect": "
|
|
47
|
+
"effect": "4.0.0-beta.59"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
|
-
"@effect
|
|
52
|
-
"@effect/vitest": "
|
|
53
|
-
"@executor/
|
|
54
|
-
"@executor/react": "1.4.3-beta.0",
|
|
50
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
51
|
+
"@effect/vitest": "4.0.0-beta.59",
|
|
52
|
+
"@executor-js/storage-core": "0.0.2",
|
|
55
53
|
"@types/node": "^24.3.1",
|
|
56
54
|
"@types/react": "^19.1.0",
|
|
57
55
|
"bun-types": "^1.2.22",
|
|
58
56
|
"react": "^19.1.0",
|
|
59
57
|
"tsup": "^8.5.0",
|
|
60
|
-
"vitest": "^4.1.
|
|
58
|
+
"vitest": "^4.1.5",
|
|
61
59
|
"zod": "^4.3.6"
|
|
62
60
|
},
|
|
63
61
|
"peerDependencies": {
|
|
64
|
-
"@effect
|
|
65
|
-
"@executor/api": "1.4.3-beta.0",
|
|
66
|
-
"@executor/react": "1.4.3-beta.0",
|
|
62
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
67
63
|
"@tanstack/react-router": "^1.168.10",
|
|
68
64
|
"react": "^19.1.0"
|
|
69
65
|
},
|
|
@@ -71,17 +67,11 @@
|
|
|
71
67
|
"react": {
|
|
72
68
|
"optional": true
|
|
73
69
|
},
|
|
74
|
-
"@effect
|
|
70
|
+
"@effect/atom-react": {
|
|
75
71
|
"optional": true
|
|
76
72
|
},
|
|
77
73
|
"@tanstack/react-router": {
|
|
78
74
|
"optional": true
|
|
79
|
-
},
|
|
80
|
-
"@executor/api": {
|
|
81
|
-
"optional": true
|
|
82
|
-
},
|
|
83
|
-
"@executor/react": {
|
|
84
|
-
"optional": true
|
|
85
75
|
}
|
|
86
76
|
}
|
|
87
77
|
}
|