@executor-js/plugin-mcp 1.5.0 → 1.5.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/package.json +17 -17
- package/dist/api/group.d.ts +0 -127
- package/dist/api/handlers.d.ts +0 -7
- package/dist/api/handlers.test.d.ts +0 -1
- package/dist/api/index.d.ts +0 -162
- package/dist/promise.d.ts +0 -2
- package/dist/react/AddMcpSource.d.ts +0 -8
- package/dist/react/EditMcpSource.d.ts +0 -4
- package/dist/react/McpAccountsPanel.d.ts +0 -6
- package/dist/react/McpRemoteSourceFields.d.ts +0 -20
- package/dist/react/McpSignInButton.d.ts +0 -5
- package/dist/react/atoms.d.ts +0 -175
- package/dist/react/auth-method-config.d.ts +0 -8
- package/dist/react/auth-method-config.test.d.ts +0 -1
- package/dist/react/client.d.ts +0 -123
- package/dist/react/index.d.ts +0 -4
- package/dist/react/plugin-client.d.ts +0 -9
- package/dist/react/source-plugin.d.ts +0 -14
- package/dist/sdk/connection.d.ts +0 -19
- package/dist/sdk/describe-auth-methods.test.d.ts +0 -1
- package/dist/sdk/discover.d.ts +0 -9
- package/dist/sdk/elicitation.test.d.ts +0 -1
- package/dist/sdk/errors.d.ts +0 -25
- package/dist/sdk/index.d.ts +0 -4
- package/dist/sdk/invoke.d.ts +0 -15
- package/dist/sdk/manifest.d.ts +0 -27
- package/dist/sdk/owner-isolation.test.d.ts +0 -1
- package/dist/sdk/plugin.d.ts +0 -151
- package/dist/sdk/plugin.test.d.ts +0 -1
- package/dist/sdk/presets.d.ts +0 -23
- package/dist/sdk/probe-shape-real-servers.live.test.d.ts +0 -1
- package/dist/sdk/probe-shape.d.ts +0 -53
- package/dist/sdk/probe-shape.test.d.ts +0 -1
- package/dist/sdk/stdio-connector.d.ts +0 -8
- package/dist/sdk/testing-fixtures.test.d.ts +0 -1
- package/dist/sdk/types.d.ts +0 -110
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/server.d.ts +0 -76
package/dist/react/client.d.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
export declare const McpClient: import("effect/unstable/reactivity/AtomHttpApi").AtomHttpApiClient<"Plugin_mcpClient", `Plugin_${string}Client`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"mcp", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"probeEndpoint", "POST", "/mcp/probe", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
2
|
-
readonly endpoint: import("effect/Schema").String;
|
|
3
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
4
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
5
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
6
|
-
readonly connected: import("effect/Schema").Boolean;
|
|
7
|
-
readonly requiresAuthentication: import("effect/Schema").Boolean;
|
|
8
|
-
readonly requiresOAuth: import("effect/Schema").Boolean;
|
|
9
|
-
readonly supportsDynamicRegistration: import("effect/Schema").Boolean;
|
|
10
|
-
readonly name: import("effect/Schema").String;
|
|
11
|
-
readonly slug: import("effect/Schema").String;
|
|
12
|
-
readonly toolCount: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
13
|
-
readonly serverName: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
14
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addServer", "POST", "/mcp/servers", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
15
|
-
readonly transport: import("effect/Schema").optional<import("effect/Schema").Literal<"remote">>;
|
|
16
|
-
readonly name: import("effect/Schema").String;
|
|
17
|
-
readonly endpoint: import("effect/Schema").String;
|
|
18
|
-
readonly remoteTransport: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>;
|
|
19
|
-
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
20
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
21
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
22
|
-
readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
23
|
-
readonly kind: import("effect/Schema").Literal<"none">;
|
|
24
|
-
}>, import("effect/Schema").Struct<{
|
|
25
|
-
readonly kind: import("effect/Schema").Literal<"header">;
|
|
26
|
-
readonly headerName: import("effect/Schema").String;
|
|
27
|
-
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
28
|
-
}>, import("effect/Schema").Struct<{
|
|
29
|
-
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
30
|
-
}>]>>;
|
|
31
|
-
}>, import("effect/Schema").Struct<{
|
|
32
|
-
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
33
|
-
readonly name: import("effect/Schema").String;
|
|
34
|
-
readonly command: import("effect/Schema").String;
|
|
35
|
-
readonly args: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
36
|
-
readonly env: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
37
|
-
readonly cwd: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
38
|
-
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
39
|
-
}>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
40
|
-
readonly slug: import("effect/Schema").String;
|
|
41
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeServer", "DELETE", "/mcp/servers/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
42
|
-
slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
43
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
44
|
-
readonly removed: import("effect/Schema").Boolean;
|
|
45
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getServer", "GET", "/mcp/servers/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
46
|
-
slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
47
|
-
}>>, 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<{
|
|
48
|
-
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
49
|
-
readonly description: import("effect/Schema").String;
|
|
50
|
-
readonly kind: import("effect/Schema").String;
|
|
51
|
-
readonly canRemove: import("effect/Schema").Boolean;
|
|
52
|
-
readonly canRefresh: import("effect/Schema").Boolean;
|
|
53
|
-
readonly config: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
54
|
-
readonly transport: import("effect/Schema").Literal<"remote">;
|
|
55
|
-
readonly endpoint: import("effect/Schema").String;
|
|
56
|
-
readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
57
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
58
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
59
|
-
readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
60
|
-
readonly kind: import("effect/Schema").Literal<"none">;
|
|
61
|
-
}>, import("effect/Schema").Struct<{
|
|
62
|
-
readonly kind: import("effect/Schema").Literal<"header">;
|
|
63
|
-
readonly headerName: import("effect/Schema").String;
|
|
64
|
-
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
65
|
-
}>, import("effect/Schema").Struct<{
|
|
66
|
-
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
67
|
-
}>]>;
|
|
68
|
-
}>, import("effect/Schema").Struct<{
|
|
69
|
-
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
70
|
-
readonly command: import("effect/Schema").String;
|
|
71
|
-
readonly args: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
72
|
-
readonly env: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
73
|
-
readonly cwd: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
74
|
-
}>]>;
|
|
75
|
-
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configureServer", "POST", "/mcp/servers/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
76
|
-
slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
77
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
78
|
-
readonly config: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
79
|
-
readonly transport: import("effect/Schema").Literal<"remote">;
|
|
80
|
-
readonly endpoint: import("effect/Schema").String;
|
|
81
|
-
readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
82
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
83
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
84
|
-
readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
85
|
-
readonly kind: import("effect/Schema").Literal<"none">;
|
|
86
|
-
}>, import("effect/Schema").Struct<{
|
|
87
|
-
readonly kind: import("effect/Schema").Literal<"header">;
|
|
88
|
-
readonly headerName: import("effect/Schema").String;
|
|
89
|
-
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
90
|
-
}>, import("effect/Schema").Struct<{
|
|
91
|
-
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
92
|
-
}>]>;
|
|
93
|
-
}>, import("effect/Schema").Struct<{
|
|
94
|
-
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
95
|
-
readonly command: import("effect/Schema").String;
|
|
96
|
-
readonly args: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
97
|
-
readonly env: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
98
|
-
readonly cwd: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
99
|
-
}>]>;
|
|
100
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
101
|
-
readonly config: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
102
|
-
readonly transport: import("effect/Schema").Literal<"remote">;
|
|
103
|
-
readonly endpoint: import("effect/Schema").String;
|
|
104
|
-
readonly remoteTransport: import("effect/Schema").withConstructorDefault<import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["streamable-http", "sse", "auto"]>>>;
|
|
105
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
106
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
107
|
-
readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
108
|
-
readonly kind: import("effect/Schema").Literal<"none">;
|
|
109
|
-
}>, import("effect/Schema").Struct<{
|
|
110
|
-
readonly kind: import("effect/Schema").Literal<"header">;
|
|
111
|
-
readonly headerName: import("effect/Schema").String;
|
|
112
|
-
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
113
|
-
}>, import("effect/Schema").Struct<{
|
|
114
|
-
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
115
|
-
}>]>;
|
|
116
|
-
}>, import("effect/Schema").Struct<{
|
|
117
|
-
readonly transport: import("effect/Schema").Literal<"stdio">;
|
|
118
|
-
readonly command: import("effect/Schema").String;
|
|
119
|
-
readonly args: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
120
|
-
readonly env: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
121
|
-
readonly cwd: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
122
|
-
}>]>;
|
|
123
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").McpConnectionError | typeof import("../sdk").McpToolDiscoveryError>, never, never>, false>>;
|
package/dist/react/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { mcpIntegrationPlugin, createMcpIntegrationPlugin } from "./source-plugin";
|
|
2
|
-
export type { McpIntegrationPluginOptions } from "./source-plugin";
|
|
3
|
-
export { McpClient } from "./client";
|
|
4
|
-
export { probeMcpEndpoint, addMcpServer, removeMcpServer, configureMcpServer, mcpServerAtom, } from "./atoms";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface McpClientConfig {
|
|
2
|
-
/**
|
|
3
|
-
* Mirrors `dangerouslyAllowStdioMCP` on the server-side plugin. When
|
|
4
|
-
* false, the AddMcpSource UI hides the stdio tab and stdio presets.
|
|
5
|
-
* Defaults to false — same default as the server flag.
|
|
6
|
-
*/
|
|
7
|
-
readonly allowStdio?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export default function createMcpClientPlugin(config?: McpClientConfig): import("@executor-js/sdk/client").ClientPluginSpec<"mcp">;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IntegrationPlugin } from "@executor-js/sdk/client";
|
|
2
|
-
export interface McpIntegrationPluginOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Enable the stdio transport in the add-source UI (tab + presets).
|
|
5
|
-
*
|
|
6
|
-
* Off by default — stdio is a high-risk transport on any server deployment
|
|
7
|
-
* (see `dangerouslyAllowStdioMCP` on the server-side plugin). Only enable in
|
|
8
|
-
* trusted local contexts where the server has the matching flag set.
|
|
9
|
-
*/
|
|
10
|
-
readonly allowStdio?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const createMcpIntegrationPlugin: (options?: McpIntegrationPluginOptions) => IntegrationPlugin;
|
|
13
|
-
/** @deprecated Use `createMcpIntegrationPlugin({ allowStdio })` instead. */
|
|
14
|
-
export declare const mcpIntegrationPlugin: IntegrationPlugin;
|
package/dist/sdk/connection.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
2
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
3
|
-
import { Effect } from "effect";
|
|
4
|
-
import type { McpRemoteIntegrationConfig, McpStdioIntegrationConfig } from "./types";
|
|
5
|
-
import { McpConnectionError } from "./errors";
|
|
6
|
-
export type McpConnection = {
|
|
7
|
-
readonly client: Client;
|
|
8
|
-
readonly close: () => Promise<void>;
|
|
9
|
-
};
|
|
10
|
-
export type McpConnector = Effect.Effect<McpConnection, McpConnectionError>;
|
|
11
|
-
export type RemoteConnectorInput = Omit<McpRemoteIntegrationConfig, "auth" | "remoteTransport" | "headers" | "queryParams"> & {
|
|
12
|
-
readonly remoteTransport?: McpRemoteIntegrationConfig["remoteTransport"];
|
|
13
|
-
readonly headers?: Record<string, string>;
|
|
14
|
-
readonly queryParams?: Record<string, string>;
|
|
15
|
-
readonly authProvider?: OAuthClientProvider;
|
|
16
|
-
};
|
|
17
|
-
export type StdioConnectorInput = McpStdioIntegrationConfig;
|
|
18
|
-
export type ConnectorInput = RemoteConnectorInput | StdioConnectorInput;
|
|
19
|
-
export declare const createMcpConnector: (input: ConnectorInput) => McpConnector;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/sdk/discover.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
import type { McpConnector } from "./connection";
|
|
3
|
-
import { McpToolDiscoveryError } from "./errors";
|
|
4
|
-
import { type McpToolManifest } from "./manifest";
|
|
5
|
-
/**
|
|
6
|
-
* Connect to an MCP server and discover all available tools.
|
|
7
|
-
* Returns the parsed manifest containing server metadata and tool entries.
|
|
8
|
-
*/
|
|
9
|
-
export declare const discoverTools: (connector: McpConnector) => Effect.Effect<McpToolManifest, McpToolDiscoveryError>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/sdk/errors.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
declare const McpConnectionError_base: Schema.Class<McpConnectionError, Schema.TaggedStruct<"McpConnectionError", {
|
|
3
|
-
readonly transport: Schema.String;
|
|
4
|
-
readonly message: Schema.String;
|
|
5
|
-
}>, import("effect/Cause").YieldableError>;
|
|
6
|
-
export declare class McpConnectionError extends McpConnectionError_base {
|
|
7
|
-
}
|
|
8
|
-
declare const McpToolDiscoveryError_base: Schema.Class<McpToolDiscoveryError, Schema.TaggedStruct<"McpToolDiscoveryError", {
|
|
9
|
-
readonly stage: Schema.Literals<readonly ["connect", "list_tools"]>;
|
|
10
|
-
readonly message: Schema.String;
|
|
11
|
-
}>, import("effect/Cause").YieldableError>;
|
|
12
|
-
export declare class McpToolDiscoveryError extends McpToolDiscoveryError_base {
|
|
13
|
-
}
|
|
14
|
-
declare const McpInvocationError_base: Schema.Class<McpInvocationError, Schema.TaggedStruct<"McpInvocationError", {
|
|
15
|
-
readonly toolName: Schema.String;
|
|
16
|
-
readonly message: Schema.String;
|
|
17
|
-
}>, import("effect/Cause").YieldableError>;
|
|
18
|
-
export declare class McpInvocationError extends McpInvocationError_base {
|
|
19
|
-
}
|
|
20
|
-
declare const McpOAuthError_base: Schema.Class<McpOAuthError, Schema.TaggedStruct<"McpOAuthError", {
|
|
21
|
-
readonly message: Schema.String;
|
|
22
|
-
}>, import("effect/Cause").YieldableError>;
|
|
23
|
-
export declare class McpOAuthError extends McpOAuthError_base {
|
|
24
|
-
}
|
|
25
|
-
export {};
|
package/dist/sdk/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { mcpPlugin, userFacingProbeMessage, type McpPluginExtension, type McpPluginOptions, type McpServerInput, type McpRemoteServerInput, type McpStdioServerInput, type McpProbeResult, type McpProbeEndpointInput, type McpExtensionFailure, } from "./plugin";
|
|
2
|
-
export { McpAuthTemplate, McpIntegrationConfig, McpRemoteIntegrationConfig, McpStdioIntegrationConfig, McpRemoteTransport, McpTransport, McpToolAnnotations, McpToolBinding, parseMcpIntegrationConfig, } from "./types";
|
|
3
|
-
export { McpConnectionError, McpToolDiscoveryError, McpInvocationError, McpOAuthError, } from "./errors";
|
|
4
|
-
export { deriveMcpNamespace, joinToolPath, extractManifestFromListToolsResult } from "./manifest";
|
package/dist/sdk/invoke.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
import { type Elicit } from "@executor-js/sdk";
|
|
3
|
-
import { McpConnectionError, McpInvocationError } from "./errors";
|
|
4
|
-
import type { McpConnector } from "./connection";
|
|
5
|
-
export interface InvokeMcpToolInput {
|
|
6
|
-
readonly toolId: string;
|
|
7
|
-
/** The real MCP tool name advertised by the server. */
|
|
8
|
-
readonly toolName: string;
|
|
9
|
-
readonly args: unknown;
|
|
10
|
-
readonly transport: string;
|
|
11
|
-
/** Dials a fresh connection. The connection is closed after the call. */
|
|
12
|
-
readonly connector: McpConnector;
|
|
13
|
-
readonly elicit: Elicit;
|
|
14
|
-
}
|
|
15
|
-
export declare const invokeMcpTool: (input: InvokeMcpToolInput) => Effect.Effect<unknown, McpConnectionError | McpInvocationError>;
|
package/dist/sdk/manifest.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { McpToolAnnotations } from "./types";
|
|
2
|
-
export interface McpToolManifestEntry {
|
|
3
|
-
readonly toolId: string;
|
|
4
|
-
readonly toolName: string;
|
|
5
|
-
readonly description: string | null;
|
|
6
|
-
readonly inputSchema?: unknown;
|
|
7
|
-
readonly outputSchema?: unknown;
|
|
8
|
-
readonly annotations?: McpToolAnnotations;
|
|
9
|
-
}
|
|
10
|
-
export interface McpServerMetadata {
|
|
11
|
-
readonly name: string | null;
|
|
12
|
-
readonly version: string | null;
|
|
13
|
-
}
|
|
14
|
-
export interface McpToolManifest {
|
|
15
|
-
readonly server: McpServerMetadata | null;
|
|
16
|
-
readonly tools: readonly McpToolManifestEntry[];
|
|
17
|
-
}
|
|
18
|
-
export declare const isListToolsResult: (value: unknown) => boolean;
|
|
19
|
-
export declare const joinToolPath: (namespace: string | undefined, toolId: string) => string;
|
|
20
|
-
export declare const extractManifestFromListToolsResult: (listToolsResult: unknown, metadata?: {
|
|
21
|
-
serverInfo?: unknown;
|
|
22
|
-
}) => McpToolManifest;
|
|
23
|
-
export declare const deriveMcpNamespace: (input: {
|
|
24
|
-
name?: string | null;
|
|
25
|
-
endpoint?: string | null;
|
|
26
|
-
command?: string | null;
|
|
27
|
-
}) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/sdk/plugin.d.ts
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { Effect, Layer, Schema } from "effect";
|
|
2
|
-
import type { HttpClient } from "effect/unstable/http";
|
|
3
|
-
import { IntegrationAlreadyExistsError, type AuthMethodDescriptor, type Integration, type IntegrationConfig, type IntegrationRecord, type StorageFailure } from "@executor-js/sdk";
|
|
4
|
-
import { McpConnectionError, McpToolDiscoveryError } from "./errors";
|
|
5
|
-
import { type McpShapeProbeResult } from "./probe-shape";
|
|
6
|
-
import { type McpIntegrationConfig as McpIntegrationConfigType } from "./types";
|
|
7
|
-
declare const McpRemoteServerInputSchema: Schema.Struct<{
|
|
8
|
-
readonly transport: Schema.optional<Schema.Literal<"remote">>;
|
|
9
|
-
readonly name: Schema.String;
|
|
10
|
-
readonly endpoint: Schema.String;
|
|
11
|
-
readonly remoteTransport: Schema.optional<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>;
|
|
12
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
13
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
14
|
-
readonly slug: Schema.optional<Schema.String>;
|
|
15
|
-
/** How a connection's value is applied to requests. Defaults to none. */
|
|
16
|
-
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
17
|
-
readonly kind: Schema.Literal<"none">;
|
|
18
|
-
}>, Schema.Struct<{
|
|
19
|
-
readonly kind: Schema.Literal<"header">;
|
|
20
|
-
readonly headerName: Schema.String;
|
|
21
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
22
|
-
}>, Schema.Struct<{
|
|
23
|
-
readonly kind: Schema.Literal<"oauth2">;
|
|
24
|
-
}>]>>;
|
|
25
|
-
}>;
|
|
26
|
-
declare const McpStdioServerInputSchema: Schema.Struct<{
|
|
27
|
-
readonly transport: Schema.Literal<"stdio">;
|
|
28
|
-
readonly name: Schema.String;
|
|
29
|
-
readonly command: Schema.String;
|
|
30
|
-
readonly args: Schema.optional<Schema.$Array<Schema.String>>;
|
|
31
|
-
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
32
|
-
readonly cwd: Schema.optional<Schema.String>;
|
|
33
|
-
readonly slug: Schema.optional<Schema.String>;
|
|
34
|
-
}>;
|
|
35
|
-
declare const McpAddServerInputSchema: Schema.Union<readonly [Schema.Struct<{
|
|
36
|
-
readonly transport: Schema.optional<Schema.Literal<"remote">>;
|
|
37
|
-
readonly name: Schema.String;
|
|
38
|
-
readonly endpoint: Schema.String;
|
|
39
|
-
readonly remoteTransport: Schema.optional<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>;
|
|
40
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
41
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
42
|
-
readonly slug: Schema.optional<Schema.String>;
|
|
43
|
-
/** How a connection's value is applied to requests. Defaults to none. */
|
|
44
|
-
readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
45
|
-
readonly kind: Schema.Literal<"none">;
|
|
46
|
-
}>, Schema.Struct<{
|
|
47
|
-
readonly kind: Schema.Literal<"header">;
|
|
48
|
-
readonly headerName: Schema.String;
|
|
49
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
50
|
-
}>, Schema.Struct<{
|
|
51
|
-
readonly kind: Schema.Literal<"oauth2">;
|
|
52
|
-
}>]>>;
|
|
53
|
-
}>, Schema.Struct<{
|
|
54
|
-
readonly transport: Schema.Literal<"stdio">;
|
|
55
|
-
readonly name: Schema.String;
|
|
56
|
-
readonly command: Schema.String;
|
|
57
|
-
readonly args: Schema.optional<Schema.$Array<Schema.String>>;
|
|
58
|
-
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
59
|
-
readonly cwd: Schema.optional<Schema.String>;
|
|
60
|
-
readonly slug: Schema.optional<Schema.String>;
|
|
61
|
-
}>]>;
|
|
62
|
-
declare const McpProbeEndpointInputSchema: Schema.Struct<{
|
|
63
|
-
readonly endpoint: Schema.String;
|
|
64
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
65
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
66
|
-
}>;
|
|
67
|
-
declare const McpProbeEndpointOutputSchema: Schema.Struct<{
|
|
68
|
-
readonly connected: Schema.Boolean;
|
|
69
|
-
readonly requiresAuthentication: Schema.Boolean;
|
|
70
|
-
readonly requiresOAuth: Schema.Boolean;
|
|
71
|
-
readonly supportsDynamicRegistration: Schema.Boolean;
|
|
72
|
-
readonly name: Schema.String;
|
|
73
|
-
readonly slug: Schema.String;
|
|
74
|
-
readonly toolCount: Schema.NullOr<Schema.Number>;
|
|
75
|
-
readonly serverName: Schema.NullOr<Schema.String>;
|
|
76
|
-
}>;
|
|
77
|
-
export type McpRemoteServerInput = typeof McpRemoteServerInputSchema.Type;
|
|
78
|
-
export type McpStdioServerInput = typeof McpStdioServerInputSchema.Type;
|
|
79
|
-
export type McpServerInput = typeof McpAddServerInputSchema.Type;
|
|
80
|
-
export type McpProbeResult = typeof McpProbeEndpointOutputSchema.Type;
|
|
81
|
-
export type McpProbeEndpointInput = typeof McpProbeEndpointInputSchema.Type;
|
|
82
|
-
/** Translate a non-MCP probe outcome into a message a user can act on.
|
|
83
|
-
* Exported for tests. */
|
|
84
|
-
export declare const userFacingProbeMessage: (shape: Extract<McpShapeProbeResult, {
|
|
85
|
-
kind: "not-mcp";
|
|
86
|
-
} | {
|
|
87
|
-
kind: "unreachable";
|
|
88
|
-
}>) => string;
|
|
89
|
-
export declare const describeMcpAuthMethods: (record: IntegrationRecord) => readonly AuthMethodDescriptor[];
|
|
90
|
-
export declare const describeMcpIntegrationDisplay: (record: IntegrationRecord) => {
|
|
91
|
-
readonly url?: string;
|
|
92
|
-
};
|
|
93
|
-
export interface McpPluginOptions {
|
|
94
|
-
/**
|
|
95
|
-
* Allow configuring stdio-transport MCP servers. Off by default.
|
|
96
|
-
*
|
|
97
|
-
* Stdio servers spawn a local subprocess that inherits the parent
|
|
98
|
-
* `process.env`. Only enable for trusted single-user contexts.
|
|
99
|
-
*/
|
|
100
|
-
readonly dangerouslyAllowStdioMCP?: boolean;
|
|
101
|
-
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
|
|
102
|
-
}
|
|
103
|
-
export declare const mcpPlugin: import("@executor-js/sdk").ConfiguredPlugin<"mcp", {
|
|
104
|
-
probeEndpoint: (input: string | McpProbeEndpointInput) => Effect.Effect<{
|
|
105
|
-
connected: true;
|
|
106
|
-
requiresAuthentication: false;
|
|
107
|
-
requiresOAuth: false;
|
|
108
|
-
supportsDynamicRegistration: false;
|
|
109
|
-
name: string;
|
|
110
|
-
slug: string;
|
|
111
|
-
toolCount: number;
|
|
112
|
-
serverName: string | null;
|
|
113
|
-
} | {
|
|
114
|
-
connected: false;
|
|
115
|
-
requiresAuthentication: true;
|
|
116
|
-
requiresOAuth: true;
|
|
117
|
-
supportsDynamicRegistration: boolean;
|
|
118
|
-
name: string;
|
|
119
|
-
slug: string;
|
|
120
|
-
toolCount: null;
|
|
121
|
-
serverName: null;
|
|
122
|
-
} | {
|
|
123
|
-
connected: false;
|
|
124
|
-
requiresAuthentication: true;
|
|
125
|
-
requiresOAuth: false;
|
|
126
|
-
supportsDynamicRegistration: false;
|
|
127
|
-
name: string;
|
|
128
|
-
slug: string;
|
|
129
|
-
toolCount: null;
|
|
130
|
-
serverName: null;
|
|
131
|
-
}, McpConnectionError, never>;
|
|
132
|
-
addServer: (input: McpServerInput) => Effect.Effect<{
|
|
133
|
-
slug: string;
|
|
134
|
-
}, StorageFailure | IntegrationAlreadyExistsError, never>;
|
|
135
|
-
removeServer: (slug: string) => Effect.Effect<void, StorageFailure, never>;
|
|
136
|
-
getServer: (slug: string) => Effect.Effect<IntegrationRecord | null, StorageFailure, never>;
|
|
137
|
-
configureServer: (slug: string, config: McpIntegrationConfigType) => Effect.Effect<void, StorageFailure, never>;
|
|
138
|
-
}, {}, McpPluginOptions, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
139
|
-
export type McpExtensionFailure = McpConnectionError | McpToolDiscoveryError | StorageFailure;
|
|
140
|
-
export interface McpPluginExtension {
|
|
141
|
-
readonly probeEndpoint: (input: string | McpProbeEndpointInput) => Effect.Effect<McpProbeResult, McpExtensionFailure>;
|
|
142
|
-
readonly addServer: (input: McpServerInput) => Effect.Effect<{
|
|
143
|
-
readonly slug: string;
|
|
144
|
-
}, McpExtensionFailure | IntegrationAlreadyExistsError>;
|
|
145
|
-
readonly removeServer: (slug: string) => Effect.Effect<void, McpExtensionFailure>;
|
|
146
|
-
readonly getServer: (slug: string) => Effect.Effect<(Integration & {
|
|
147
|
-
readonly config: IntegrationConfig;
|
|
148
|
-
}) | null, McpExtensionFailure>;
|
|
149
|
-
readonly configureServer: (slug: string, config: McpIntegrationConfigType) => Effect.Effect<void, McpExtensionFailure>;
|
|
150
|
-
}
|
|
151
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/sdk/presets.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface McpRemotePreset {
|
|
2
|
-
readonly id: string;
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly summary: string;
|
|
5
|
-
readonly url: string;
|
|
6
|
-
readonly endpoint: string;
|
|
7
|
-
readonly icon?: string;
|
|
8
|
-
readonly featured?: boolean;
|
|
9
|
-
readonly transport?: undefined;
|
|
10
|
-
}
|
|
11
|
-
export interface McpStdioPreset {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
readonly name: string;
|
|
14
|
-
readonly summary: string;
|
|
15
|
-
readonly icon?: string;
|
|
16
|
-
readonly featured?: boolean;
|
|
17
|
-
readonly transport: "stdio";
|
|
18
|
-
readonly command: string;
|
|
19
|
-
readonly args?: readonly string[];
|
|
20
|
-
readonly env?: Readonly<Record<string, string>>;
|
|
21
|
-
}
|
|
22
|
-
export type McpPreset = McpRemotePreset | McpStdioPreset;
|
|
23
|
-
export declare const mcpPresets: readonly McpPreset[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Effect, Layer } from "effect";
|
|
2
|
-
import { HttpClient } from "effect/unstable/http";
|
|
3
|
-
/** Why the probe rejected an endpoint as not-MCP.
|
|
4
|
-
*
|
|
5
|
-
* - `auth-required` — server returned 401. We don't know for sure it's
|
|
6
|
-
* an MCP server (no spec-compliant Bearer challenge or the body
|
|
7
|
-
* isn't JSON-RPC), but the right next step for the user is the same
|
|
8
|
-
* either way: provide credentials and retry. This is what
|
|
9
|
-
* misclassifies real MCP servers like cubic.dev (no
|
|
10
|
-
* resource_metadata) or ref.tools (no WWW-Authenticate at all)
|
|
11
|
-
* without the URL-token fallback at the detect layer.
|
|
12
|
-
* - `wrong-shape` — endpoint responded but with a body or status that
|
|
13
|
-
* doesn't match any MCP shape (200 HTML, 400 GraphQL, 404 from a
|
|
14
|
-
* static host, etc.). User action: this URL probably isn't MCP. */
|
|
15
|
-
export type McpProbeRejectCategory = "auth-required" | "wrong-shape";
|
|
16
|
-
export type McpShapeProbeResult =
|
|
17
|
-
/** Server answered initialize successfully — either a 2xx with a
|
|
18
|
-
* JSON-RPC payload, or a 401 + WWW-Authenticate: Bearer (RFC 6750
|
|
19
|
-
* challenge) that the MCP auth spec requires. */
|
|
20
|
-
{
|
|
21
|
-
readonly kind: "mcp";
|
|
22
|
-
readonly requiresAuth: boolean;
|
|
23
|
-
}
|
|
24
|
-
/** Endpoint is reachable but the response does not look like MCP. */
|
|
25
|
-
| {
|
|
26
|
-
readonly kind: "not-mcp";
|
|
27
|
-
readonly reason: string;
|
|
28
|
-
readonly category: McpProbeRejectCategory;
|
|
29
|
-
}
|
|
30
|
-
/** Transport-level failure (DNS, TLS, timeout, abort, ...). */
|
|
31
|
-
| {
|
|
32
|
-
readonly kind: "unreachable";
|
|
33
|
-
readonly reason: string;
|
|
34
|
-
};
|
|
35
|
-
export interface ProbeOptions {
|
|
36
|
-
/** Abort the request after this many ms. Default 8000. */
|
|
37
|
-
readonly timeoutMs?: number;
|
|
38
|
-
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
|
|
39
|
-
readonly headers?: Record<string, string>;
|
|
40
|
-
readonly queryParams?: Record<string, string>;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Hit `endpoint` with a JSON-RPC `initialize` POST and classify the
|
|
44
|
-
* response according to the MCP authorization spec.
|
|
45
|
-
*
|
|
46
|
-
* Returns `{kind: "mcp"}` only when the endpoint either:
|
|
47
|
-
* - answers with 2xx (unauth-OK MCP server), or
|
|
48
|
-
* - responds 401 with a `Bearer` WWW-Authenticate challenge.
|
|
49
|
-
*
|
|
50
|
-
* Anything else (400, 404, 200-with-HTML, 200-with-GraphQL-errors, ...)
|
|
51
|
-
* is classified `not-mcp`. Transport errors surface as `unreachable`.
|
|
52
|
-
*/
|
|
53
|
-
export declare const probeMcpEndpointShape: (endpoint: string, options?: ProbeOptions) => Effect.Effect<McpShapeProbeResult>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
2
|
-
export type StdioTransportConfig = {
|
|
3
|
-
readonly command: string;
|
|
4
|
-
readonly args?: ReadonlyArray<string>;
|
|
5
|
-
readonly env?: Record<string, string>;
|
|
6
|
-
readonly cwd?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const createStdioTransport: (config: StdioTransportConfig) => StdioClientTransport;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|