@executor-js/plugin-mcp 1.5.2 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/api/group.d.ts +127 -0
  2. package/dist/api/handlers.d.ts +7 -0
  3. package/dist/api/handlers.test.d.ts +1 -0
  4. package/dist/api/index.d.ts +162 -0
  5. package/dist/promise.d.ts +2 -0
  6. package/dist/react/AddMcpSource.d.ts +8 -0
  7. package/dist/react/EditMcpSource.d.ts +4 -0
  8. package/dist/react/McpAccountsPanel.d.ts +6 -0
  9. package/dist/react/McpRemoteSourceFields.d.ts +20 -0
  10. package/dist/react/McpSignInButton.d.ts +5 -0
  11. package/dist/react/atoms.d.ts +175 -0
  12. package/dist/react/auth-method-config.d.ts +8 -0
  13. package/dist/react/auth-method-config.test.d.ts +1 -0
  14. package/dist/react/client.d.ts +123 -0
  15. package/dist/react/index.d.ts +4 -0
  16. package/dist/react/plugin-client.d.ts +9 -0
  17. package/dist/react/source-plugin.d.ts +14 -0
  18. package/dist/sdk/connection.d.ts +19 -0
  19. package/dist/sdk/describe-auth-methods.test.d.ts +1 -0
  20. package/dist/sdk/discover.d.ts +9 -0
  21. package/dist/sdk/elicitation.test.d.ts +1 -0
  22. package/dist/sdk/errors.d.ts +25 -0
  23. package/dist/sdk/index.d.ts +4 -0
  24. package/dist/sdk/invoke.d.ts +15 -0
  25. package/dist/sdk/manifest.d.ts +27 -0
  26. package/dist/sdk/owner-isolation.test.d.ts +1 -0
  27. package/dist/sdk/plugin.d.ts +151 -0
  28. package/dist/sdk/plugin.test.d.ts +1 -0
  29. package/dist/sdk/presets.d.ts +23 -0
  30. package/dist/sdk/probe-shape-real-servers.live.test.d.ts +1 -0
  31. package/dist/sdk/probe-shape.d.ts +53 -0
  32. package/dist/sdk/probe-shape.test.d.ts +1 -0
  33. package/dist/sdk/stdio-connector.d.ts +8 -0
  34. package/dist/sdk/testing-fixtures.test.d.ts +1 -0
  35. package/dist/sdk/types.d.ts +110 -0
  36. package/dist/testing/index.d.ts +1 -0
  37. package/dist/testing/server.d.ts +76 -0
  38. package/package.json +17 -17
@@ -0,0 +1,110 @@
1
+ import { Schema } from "effect";
2
+ export declare const McpRemoteTransport: Schema.Literals<readonly ["streamable-http", "sse", "auto"]>;
3
+ export type McpRemoteTransport = typeof McpRemoteTransport.Type;
4
+ /** All transport types (used in the connector layer) */
5
+ export declare const McpTransport: Schema.Literals<readonly ["streamable-http", "sse", "stdio", "auto"]>;
6
+ export type McpTransport = typeof McpTransport.Type;
7
+ export declare const McpAuthTemplate: Schema.Union<readonly [Schema.Struct<{
8
+ readonly kind: Schema.Literal<"none">;
9
+ }>, Schema.Struct<{
10
+ readonly kind: Schema.Literal<"header">;
11
+ readonly headerName: Schema.String;
12
+ readonly prefix: Schema.optional<Schema.String>;
13
+ }>, Schema.Struct<{
14
+ readonly kind: Schema.Literal<"oauth2">;
15
+ }>]>;
16
+ export type McpAuthTemplate = typeof McpAuthTemplate.Type;
17
+ export declare const McpRemoteIntegrationConfig: Schema.Struct<{
18
+ readonly transport: Schema.Literal<"remote">;
19
+ /** The MCP server endpoint URL */
20
+ readonly endpoint: Schema.String;
21
+ /** Transport preference for this remote server */
22
+ readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
23
+ /** Static query params appended to the endpoint URL (non-credential) */
24
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
25
+ /** Static headers sent on every request (non-credential) */
26
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
27
+ /** Auth template — how the connection's value is rendered onto requests */
28
+ readonly auth: Schema.Union<readonly [Schema.Struct<{
29
+ readonly kind: Schema.Literal<"none">;
30
+ }>, Schema.Struct<{
31
+ readonly kind: Schema.Literal<"header">;
32
+ readonly headerName: Schema.String;
33
+ readonly prefix: Schema.optional<Schema.String>;
34
+ }>, Schema.Struct<{
35
+ readonly kind: Schema.Literal<"oauth2">;
36
+ }>]>;
37
+ }>;
38
+ export type McpRemoteIntegrationConfig = typeof McpRemoteIntegrationConfig.Type;
39
+ export declare const McpStdioIntegrationConfig: Schema.Struct<{
40
+ readonly transport: Schema.Literal<"stdio">;
41
+ /** The command to run */
42
+ readonly command: Schema.String;
43
+ /** Arguments to the command */
44
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
45
+ /** Environment variables */
46
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
47
+ /** Working directory */
48
+ readonly cwd: Schema.optional<Schema.String>;
49
+ }>;
50
+ export type McpStdioIntegrationConfig = typeof McpStdioIntegrationConfig.Type;
51
+ export declare const McpIntegrationConfig: Schema.Union<readonly [Schema.Struct<{
52
+ readonly transport: Schema.Literal<"remote">;
53
+ /** The MCP server endpoint URL */
54
+ readonly endpoint: Schema.String;
55
+ /** Transport preference for this remote server */
56
+ readonly remoteTransport: Schema.withConstructorDefault<Schema.optionalKey<Schema.Literals<readonly ["streamable-http", "sse", "auto"]>>>;
57
+ /** Static query params appended to the endpoint URL (non-credential) */
58
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
59
+ /** Static headers sent on every request (non-credential) */
60
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
61
+ /** Auth template — how the connection's value is rendered onto requests */
62
+ readonly auth: Schema.Union<readonly [Schema.Struct<{
63
+ readonly kind: Schema.Literal<"none">;
64
+ }>, Schema.Struct<{
65
+ readonly kind: Schema.Literal<"header">;
66
+ readonly headerName: Schema.String;
67
+ readonly prefix: Schema.optional<Schema.String>;
68
+ }>, Schema.Struct<{
69
+ readonly kind: Schema.Literal<"oauth2">;
70
+ }>]>;
71
+ }>, Schema.Struct<{
72
+ readonly transport: Schema.Literal<"stdio">;
73
+ /** The command to run */
74
+ readonly command: Schema.String;
75
+ /** Arguments to the command */
76
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
77
+ /** Environment variables */
78
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
79
+ /** Working directory */
80
+ readonly cwd: Schema.optional<Schema.String>;
81
+ }>]>;
82
+ export type McpIntegrationConfig = typeof McpIntegrationConfig.Type;
83
+ /** Parse an opaque integration `config` blob into a typed MCP config, or null
84
+ * if it isn't this plugin's shape. */
85
+ export declare const parseMcpIntegrationConfig: (config: unknown) => McpIntegrationConfig | null;
86
+ export declare const McpToolAnnotations: Schema.Struct<{
87
+ readonly title: Schema.optional<Schema.String>;
88
+ readonly readOnlyHint: Schema.optional<Schema.Boolean>;
89
+ readonly destructiveHint: Schema.optional<Schema.Boolean>;
90
+ readonly idempotentHint: Schema.optional<Schema.Boolean>;
91
+ readonly openWorldHint: Schema.optional<Schema.Boolean>;
92
+ }>;
93
+ export type McpToolAnnotations = typeof McpToolAnnotations.Type;
94
+ export declare const McpToolBinding: Schema.Struct<{
95
+ /** Sanitized, address-safe tool name (the `<tool>` address segment). */
96
+ readonly toolId: Schema.String;
97
+ /** The real MCP tool name as advertised by the server. */
98
+ readonly toolName: Schema.String;
99
+ readonly description: Schema.NullOr<Schema.String>;
100
+ readonly inputSchema: Schema.optional<Schema.Unknown>;
101
+ readonly outputSchema: Schema.optional<Schema.Unknown>;
102
+ readonly annotations: Schema.optional<Schema.Struct<{
103
+ readonly title: Schema.optional<Schema.String>;
104
+ readonly readOnlyHint: Schema.optional<Schema.Boolean>;
105
+ readonly destructiveHint: Schema.optional<Schema.Boolean>;
106
+ readonly idempotentHint: Schema.optional<Schema.Boolean>;
107
+ readonly openWorldHint: Schema.optional<Schema.Boolean>;
108
+ }>>;
109
+ }>;
110
+ export type McpToolBinding = typeof McpToolBinding.Type;
@@ -0,0 +1 @@
1
+ export { McpTestServerError, McpTestServerLayer, makeAnnotationsMcpServer, makeEchoMcpServer, makeElicitationMcpServer, makeGreetingMcpServer, serveMcpServer, serveMcpServerWithOAuth, type McpTestRequest, type McpTestServer, type McpTestServerOptions, } from "./server";
@@ -0,0 +1,76 @@
1
+ import { Context, Effect, Layer, Scope } from "effect";
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { OAuthTestServer } from "@executor-js/sdk/testing";
4
+ export type McpTestServer = {
5
+ readonly url: string;
6
+ readonly endpoint: string;
7
+ /** Number of MCP sessions created (each connect = 1 session) */
8
+ readonly sessionCount: () => number;
9
+ readonly requests: Effect.Effect<readonly McpTestRequest[]>;
10
+ readonly clearRequests: Effect.Effect<void>;
11
+ };
12
+ export type McpTestRequest = {
13
+ readonly method: string;
14
+ readonly url: string;
15
+ readonly authorization: string | undefined;
16
+ readonly sessionId: string | undefined;
17
+ };
18
+ export type McpTestServerOptions = {
19
+ readonly path?: string;
20
+ readonly auth?: {
21
+ readonly validateAuthorization: (authorization: string | undefined) => Effect.Effect<boolean>;
22
+ readonly authorizationServerUrls?: readonly string[];
23
+ readonly scopes?: readonly string[];
24
+ readonly wwwAuthenticate?: string;
25
+ };
26
+ };
27
+ declare const McpTestServerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
28
+ readonly _tag: "McpTestServerError";
29
+ } & Readonly<A>;
30
+ export declare class McpTestServerError extends McpTestServerError_base<{
31
+ readonly cause: unknown;
32
+ }> {
33
+ }
34
+ export declare const serveMcpServer: (factory: () => McpServer, options?: McpTestServerOptions) => Effect.Effect<{
35
+ url: string;
36
+ endpoint: string;
37
+ sessionCount: () => number;
38
+ requests: Effect.Effect<readonly McpTestRequest[], never, never>;
39
+ clearRequests: Effect.Effect<void, never, never>;
40
+ }, McpTestServerError, Scope.Scope>;
41
+ export declare const serveMcpServerWithOAuth: (factory: () => McpServer, options?: Omit<McpTestServerOptions, "auth"> & {
42
+ readonly scopes?: readonly string[];
43
+ readonly wwwAuthenticate?: string;
44
+ }) => Effect.Effect<{
45
+ url: string;
46
+ endpoint: string;
47
+ sessionCount: () => number;
48
+ requests: Effect.Effect<readonly McpTestRequest[], never, never>;
49
+ clearRequests: Effect.Effect<void, never, never>;
50
+ }, McpTestServerError, Scope.Scope | OAuthTestServer>;
51
+ declare const McpTestServerLayer_base: Context.ServiceClass<McpTestServerLayer, "@executor-js/plugin-mcp/testing/McpTestServer", McpTestServer>;
52
+ export declare class McpTestServerLayer extends McpTestServerLayer_base {
53
+ static readonly layer: (factory: () => McpServer, options?: McpTestServerOptions) => Layer.Layer<McpTestServerLayer, McpTestServerError, Scope.Scope>;
54
+ static readonly layerWithOAuth: (factory: () => McpServer, options?: Omit<McpTestServerOptions, "auth"> & {
55
+ readonly scopes?: readonly string[];
56
+ readonly wwwAuthenticate?: string;
57
+ }) => Layer.Layer<McpTestServerLayer, McpTestServerError, Scope.Scope | OAuthTestServer>;
58
+ }
59
+ export declare const makeGreetingMcpServer: (options?: {
60
+ readonly name?: string;
61
+ readonly version?: string;
62
+ readonly toolName?: string;
63
+ readonly toolDescription?: string;
64
+ readonly text?: string;
65
+ }) => McpServer;
66
+ export declare const makeEchoMcpServer: (options?: {
67
+ readonly name?: string;
68
+ readonly version?: string;
69
+ readonly toolName?: string;
70
+ readonly toolDescription?: string;
71
+ readonly inputName?: "name" | "value" | "marker";
72
+ readonly text?: (value: string) => string;
73
+ }) => McpServer;
74
+ export declare const makeElicitationMcpServer: () => McpServer;
75
+ export declare const makeAnnotationsMcpServer: () => McpServer;
76
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-mcp",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
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"
@@ -53,28 +53,28 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@cfworker/json-schema": "^4.1.1",
56
- "@effect/platform-node": "catalog:",
57
- "@executor-js/config": "1.5.2",
58
- "@executor-js/sdk": "1.5.2",
56
+ "@effect/platform-node": "4.0.0-beta.59",
57
+ "@executor-js/config": "1.5.4",
58
+ "@executor-js/sdk": "1.5.4",
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "zod": "^4.3.6"
61
61
  },
62
62
  "devDependencies": {
63
- "@effect/atom-react": "catalog:",
64
- "@effect/vitest": "catalog:",
65
- "@types/node": "catalog:",
66
- "@types/react": "catalog:",
67
- "bun-types": "catalog:",
68
- "effect": "catalog:",
69
- "react": "catalog:",
70
- "tsup": "catalog:",
71
- "vitest": "catalog:"
63
+ "@effect/atom-react": "4.0.0-beta.59",
64
+ "@effect/vitest": "4.0.0-beta.59",
65
+ "@types/node": "^24.3.1",
66
+ "@types/react": "^19.1.0",
67
+ "bun-types": "^1.2.22",
68
+ "effect": "4.0.0-beta.59",
69
+ "react": "^19.1.0",
70
+ "tsup": "^8.5.0",
71
+ "vitest": "^4.1.5"
72
72
  },
73
73
  "peerDependencies": {
74
- "@effect/atom-react": "catalog:",
75
- "@tanstack/react-router": "catalog:",
76
- "effect": "catalog:",
77
- "react": "catalog:"
74
+ "@effect/atom-react": "4.0.0-beta.59",
75
+ "@tanstack/react-router": "^1.168.10",
76
+ "effect": "4.0.0-beta.59",
77
+ "react": "^19.1.0"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "react": {