@executor-js/plugin-mcp 1.4.32 → 1.5.0
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-4LLERUW5.js +602 -0
- package/dist/AddMcpSource-4LLERUW5.js.map +1 -0
- package/dist/EditMcpSource-GKJRP75X.js +313 -0
- package/dist/EditMcpSource-GKJRP75X.js.map +1 -0
- package/dist/McpAccountsPanel-UX7MHEIG.js +132 -0
- package/dist/McpAccountsPanel-UX7MHEIG.js.map +1 -0
- package/dist/api/group.d.ts +79 -143
- package/dist/api/index.d.ts +99 -155
- package/dist/chunk-2TXHTMKM.js +1298 -0
- package/dist/chunk-2TXHTMKM.js.map +1 -0
- package/dist/chunk-6OEQZ72N.js +124 -0
- package/dist/chunk-6OEQZ72N.js.map +1 -0
- package/dist/chunk-7FJ3PUUL.js +21 -0
- package/dist/chunk-7FJ3PUUL.js.map +1 -0
- package/dist/chunk-N4EAF5CA.js +146 -0
- package/dist/chunk-N4EAF5CA.js.map +1 -0
- package/dist/client.js +9 -9
- package/dist/client.js.map +1 -1
- package/dist/core.js +36 -26
- package/dist/index.js +2 -2
- package/dist/promise.d.ts +1 -1
- package/dist/react/AddMcpSource.d.ts +1 -1
- package/dist/react/McpAccountsPanel.d.ts +6 -0
- package/dist/react/McpRemoteSourceFields.d.ts +4 -2
- package/dist/react/McpSignInButton.d.ts +2 -0
- package/dist/react/atoms.d.ts +93 -313
- package/dist/react/auth-method-config.d.ts +8 -0
- package/dist/react/client.d.ts +78 -142
- package/dist/react/index.d.ts +3 -3
- package/dist/react/source-plugin.d.ts +5 -5
- package/dist/sdk/connection.d.ts +4 -4
- package/dist/sdk/errors.d.ts +0 -19
- package/dist/sdk/index.d.ts +4 -3
- package/dist/sdk/invoke.d.ts +9 -16
- package/dist/sdk/plugin.d.ts +101 -236
- package/dist/sdk/types.d.ts +25 -130
- package/package.json +5 -4
- package/dist/AddMcpSource-PADMBVX2.js +0 -688
- package/dist/AddMcpSource-PADMBVX2.js.map +0 -1
- package/dist/EditMcpSource-L5GC2B4J.js +0 -281
- package/dist/EditMcpSource-L5GC2B4J.js.map +0 -1
- package/dist/McpSourceSummary-LE3WXFUE.js +0 -170
- package/dist/McpSourceSummary-LE3WXFUE.js.map +0 -1
- package/dist/chunk-6OYEXHU3.js +0 -156
- package/dist/chunk-6OYEXHU3.js.map +0 -1
- package/dist/chunk-FMTVLO5L.js +0 -179
- package/dist/chunk-FMTVLO5L.js.map +0 -1
- package/dist/chunk-LEGVPKYH.js +0 -2391
- package/dist/chunk-LEGVPKYH.js.map +0 -1
- package/dist/chunk-ZIRGIRGP.js +0 -115
- package/dist/chunk-ZIRGIRGP.js.map +0 -1
- package/dist/react/McpSourceSummary.d.ts +0 -5
- package/dist/sdk/binding-store.d.ts +0 -31
- package/dist/sdk/stored-source.d.ts +0 -42
- /package/dist/{sdk/connection-pool.test.d.ts → react/auth-method-config.test.d.ts} +0 -0
- /package/dist/sdk/{cross-user-isolation.test.d.ts → describe-auth-methods.test.d.ts} +0 -0
- /package/dist/sdk/{per-user-auth-isolation.test.d.ts → owner-isolation.test.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/McpSourceSummary.tsx","../src/react/McpSignInButton.tsx"],"sourcesContent":["import { useAtomValue } from \"@effect/atom-react\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\n\nimport { connectionsAtom } from \"@executor-js/react/api/atoms\";\nimport { useScope, useScopeStack, useUserScope } from \"@executor-js/react/api/scope-context\";\nimport { Button } from \"@executor-js/react/components/button\";\nimport {\n SourceCredentialNotice,\n SourceCredentialStatusBadge,\n missingSourceCredentialLabels,\n type SourceCredentialSlot,\n} from \"@executor-js/react/plugins/source-credential-status\";\nimport { ScopeId } from \"@executor-js/sdk/shared\";\n\nimport { mcpSourceAtom, mcpSourceBindingsAtom } from \"./atoms\";\nimport McpSignInButton from \"./McpSignInButton\";\nimport type { McpStoredSourceSchemaType } from \"../sdk/stored-source\";\n\nconst sourceCredentialSlots = (\n source: McpStoredSourceSchemaType,\n): readonly SourceCredentialSlot[] => {\n if (source.config.transport !== \"remote\") return [];\n const slots: SourceCredentialSlot[] = [];\n for (const [name, value] of Object.entries(source.config.headers ?? {})) {\n if (typeof value !== \"string\") slots.push({ kind: \"secret\", slot: value.slot, label: name });\n }\n for (const [name, value] of Object.entries(source.config.queryParams ?? {})) {\n if (typeof value !== \"string\") slots.push({ kind: \"secret\", slot: value.slot, label: name });\n }\n const auth = source.config.auth;\n if (auth.kind === \"header\") {\n slots.push({\n kind: \"secret\",\n slot: auth.secretSlot,\n label: auth.headerName,\n });\n }\n if (auth.kind === \"oauth2\") {\n if (auth.clientIdSlot) {\n slots.push({ kind: \"secret\", slot: auth.clientIdSlot, label: \"Client ID\" });\n }\n if (auth.clientSecretSlot) {\n slots.push({ kind: \"secret\", slot: auth.clientSecretSlot, label: \"Client Secret\" });\n }\n slots.push({\n kind: \"connection\",\n slot: auth.connectionSlot,\n label: \"OAuth sign-in\",\n });\n }\n return slots;\n};\n\nexport default function McpSourceSummary(props: {\n readonly sourceId: string;\n readonly variant?: \"badge\" | \"panel\";\n readonly onAction?: () => void;\n}) {\n const displayScope = useScope();\n const userScope = useUserScope();\n const scopeStack = useScopeStack();\n const sourceResult = useAtomValue(mcpSourceAtom(displayScope, props.sourceId));\n const source =\n AsyncResult.isSuccess(sourceResult) && sourceResult.value ? sourceResult.value : null;\n const sourceScope = source ? ScopeId.make(source.scope) : displayScope;\n const bindingsResult = useAtomValue(\n mcpSourceBindingsAtom(userScope, props.sourceId, sourceScope),\n );\n const connectionsResult = useAtomValue(connectionsAtom(userScope));\n\n if (!source) return null;\n const slots = sourceCredentialSlots(source as McpStoredSourceSchemaType);\n if (slots.length === 0) return null;\n if (!AsyncResult.isSuccess(bindingsResult) || !AsyncResult.isSuccess(connectionsResult)) {\n return props.variant === \"panel\" ? null : (\n <SourceCredentialStatusBadge missing={[\"credentials\"]} />\n );\n }\n\n const scopeRanks = new Map(scopeStack.map((scope, index) => [scope.id, index] as const));\n const liveConnectionIds = new Set(connectionsResult.value.map((connection) => connection.id));\n const missing = missingSourceCredentialLabels({\n slots,\n bindings: bindingsResult.value,\n targetScope: userScope,\n scopeRanks,\n liveConnectionIds,\n });\n\n if (props.variant === \"panel\") {\n const needsOAuth = missing.includes(\"OAuth sign-in\");\n const needsConfiguration = missing.some((label) => label !== \"OAuth sign-in\");\n return (\n <SourceCredentialNotice\n missing={missing}\n action={\n <div className=\"flex shrink-0 items-center gap-2\">\n {needsOAuth && <McpSignInButton sourceId={props.sourceId} />}\n {needsConfiguration && props.onAction && (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" onClick={props.onAction}>\n Configure\n </Button>\n )}\n </div>\n }\n />\n );\n }\n\n return <SourceCredentialStatusBadge missing={missing} />;\n}\n","import { useAtomSet, useAtomValue } from \"@effect/atom-react\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\n\nimport { ScopeId } from \"@executor-js/sdk/shared\";\nimport { useScope, useUserScope } from \"@executor-js/react/api/scope-context\";\nimport { connectionWriteKeys, sourceWriteKeys } from \"@executor-js/react/api/reactivity-keys\";\nimport { connectionsAtom, setSourceCredentialBinding } from \"@executor-js/react/api/atoms\";\nimport { SourceOAuthSignInButton } from \"@executor-js/react/plugins/oauth-sign-in\";\nimport { slugifyNamespace } from \"@executor-js/react/plugins/source-identity\";\nimport { secretBackedValuesFromConfiguredCredentialBindings } from \"@executor-js/react/plugins/credential-bindings\";\n\nimport { mcpSourceAtom, mcpSourceBindingsAtom } from \"./atoms\";\nimport type { McpStoredSourceSchemaType } from \"../sdk/stored-source\";\n\n// ---------------------------------------------------------------------------\n// McpSignInButton — top-bar action on the source detail page.\n//\n// Reads the source's stored endpoint + oauth2 slot, re-runs the DCR /\n// authorization-code flow against a stable `mcp-oauth2-${namespace}`\n// connection id, and on success writes the user's credential binding.\n// ---------------------------------------------------------------------------\n\nexport default function McpSignInButton(props: { sourceId: string }) {\n const scopeId = useScope();\n const userScopeId = useUserScope();\n const sourceResult = useAtomValue(\n mcpSourceAtom(scopeId, props.sourceId),\n ) as AsyncResult.AsyncResult<McpStoredSourceSchemaType | null, unknown>;\n const source =\n AsyncResult.isSuccess(sourceResult) && sourceResult.value ? sourceResult.value : null;\n const sourceScope = source ? ScopeId.make(source.scope) : scopeId;\n const bindingsResult = useAtomValue(\n mcpSourceBindingsAtom(userScopeId, props.sourceId, sourceScope),\n );\n const connectionsResult = useAtomValue(connectionsAtom(userScopeId));\n const setBinding = useAtomSet(setSourceCredentialBinding, { mode: \"promise\" });\n\n const remote = source && source.config.transport === \"remote\" ? source.config : null;\n const oauth2 = remote && remote.auth.kind === \"oauth2\" ? remote.auth : null;\n const connections = AsyncResult.isSuccess(connectionsResult)\n ? (connectionsResult.value as readonly { readonly id: string }[])\n : null;\n const bindings = AsyncResult.isSuccess(bindingsResult) ? bindingsResult.value : null;\n const connectionBinding = bindings?.find(\n (binding) => binding.slotKey === oauth2?.connectionSlot && binding.value.kind === \"connection\",\n );\n const connectionId =\n connectionBinding?.value.kind === \"connection\" ? connectionBinding.value.connectionId : null;\n const isConnected =\n oauth2 !== null &&\n connections !== null &&\n connectionId !== null &&\n connections.some((c) => c.id === connectionId);\n\n if (!remote || !oauth2 || !source) return null;\n const namespaceSlug = slugifyNamespace(source.namespace) || \"mcp\";\n\n return (\n <SourceOAuthSignInButton\n popupName=\"mcp-oauth\"\n pluginId=\"mcp\"\n namespace={namespaceSlug}\n fallbackNamespace=\"mcp\"\n endpoint={remote.endpoint}\n tokenScope={userScopeId}\n connectionId={connectionId}\n sourceLabel={`${source.name.trim() || source.namespace || \"MCP\"} OAuth`}\n headers={secretBackedValuesFromConfiguredCredentialBindings(remote.headers, bindings ?? [])}\n queryParams={secretBackedValuesFromConfiguredCredentialBindings(\n remote.queryParams,\n bindings ?? [],\n )}\n isConnected={isConnected}\n detectPopupClosed={false}\n onConnected={async (nextConnectionId) => {\n await setBinding({\n params: { scopeId: userScopeId },\n payload: {\n scope: userScopeId,\n source: { id: props.sourceId, scope: sourceScope },\n slotKey: oauth2.connectionSlot,\n value: { kind: \"connection\", connectionId: nextConnectionId },\n },\n reactivityKeys: [...sourceWriteKeys, ...connectionWriteKeys],\n });\n }}\n reconnectingLabel=\"Reconnecting…\"\n signingInLabel=\"Signing in…\"\n />\n );\n}\n"],"mappings":";;;;;;;AAAA,SAAS,gBAAAA,qBAAoB;AAC7B,YAAYC,kBAAiB;AAE7B,SAAS,mBAAAC,wBAAuB;AAChC,SAAS,YAAAC,WAAU,eAAe,gBAAAC,qBAAoB;AACtD,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,WAAAC,gBAAe;;;ACZxB,SAAS,YAAY,oBAAoB;AACzC,YAAY,iBAAiB;AAE7B,SAAS,eAAe;AACxB,SAAS,UAAU,oBAAoB;AACvC,SAAS,qBAAqB,uBAAuB;AACrD,SAAS,iBAAiB,kCAAkC;AAC5D,SAAS,+BAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,0DAA0D;AAiD/D;AApCW,SAAR,gBAAiC,OAA6B;AACnE,QAAM,UAAU,SAAS;AACzB,QAAM,cAAc,aAAa;AACjC,QAAM,eAAe;AAAA,IACnB,cAAc,SAAS,MAAM,QAAQ;AAAA,EACvC;AACA,QAAM,SACQ,sBAAU,YAAY,KAAK,aAAa,QAAQ,aAAa,QAAQ;AACnF,QAAM,cAAc,SAAS,QAAQ,KAAK,OAAO,KAAK,IAAI;AAC1D,QAAM,iBAAiB;AAAA,IACrB,sBAAsB,aAAa,MAAM,UAAU,WAAW;AAAA,EAChE;AACA,QAAM,oBAAoB,aAAa,gBAAgB,WAAW,CAAC;AACnE,QAAM,aAAa,WAAW,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7E,QAAM,SAAS,UAAU,OAAO,OAAO,cAAc,WAAW,OAAO,SAAS;AAChF,QA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MAAK,UAAS,MAAK,MAAK,SAAQ,WAAU,SAAS,MAAM,UAAU,uBAE3E;AAAA,WAEJ;AAAA;AAAA,IAEJ;AAAA,EAEJ;AAEA,SAAO,gBAAAA,KAAC,+BAA4B,SAAkB;AACxD;","names":["useAtomValue","AsyncResult","connectionsAtom","useScope","useUserScope","ScopeId","jsx","useScope","useUserScope","useAtomValue","ScopeId","connectionsAtom"]}
|
package/dist/chunk-6OYEXHU3.js
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
// src/sdk/types.ts
|
|
2
|
-
import { Effect, Schema } from "effect";
|
|
3
|
-
import {
|
|
4
|
-
ConfiguredCredentialValue,
|
|
5
|
-
credentialSlotKey,
|
|
6
|
-
SecretBackedMap,
|
|
7
|
-
SecretBackedValue
|
|
8
|
-
} from "@executor-js/sdk/shared";
|
|
9
|
-
import {
|
|
10
|
-
HttpConfiguredValueInput,
|
|
11
|
-
HttpCredentialInput,
|
|
12
|
-
HttpOAuthConfigureInput
|
|
13
|
-
} from "@executor-js/sdk/http-source";
|
|
14
|
-
var McpRemoteTransport = Schema.Literals(["streamable-http", "sse", "auto"]);
|
|
15
|
-
var McpTransport = Schema.Literals(["streamable-http", "sse", "stdio", "auto"]);
|
|
16
|
-
var ConfiguredMcpCredentialValue = ConfiguredCredentialValue;
|
|
17
|
-
var McpConfiguredValueInput = HttpConfiguredValueInput;
|
|
18
|
-
var McpCredentialInput = HttpCredentialInput;
|
|
19
|
-
var mcpHeaderSlot = (name) => credentialSlotKey("header", name);
|
|
20
|
-
var mcpQueryParamSlot = (name) => credentialSlotKey("query_param", name);
|
|
21
|
-
var MCP_HEADER_AUTH_SLOT = "auth:header";
|
|
22
|
-
var MCP_OAUTH_CONNECTION_SLOT = "auth:oauth2:connection";
|
|
23
|
-
var MCP_OAUTH_CLIENT_ID_SLOT = "auth:oauth2:client-id";
|
|
24
|
-
var MCP_OAUTH_CLIENT_SECRET_SLOT = "auth:oauth2:client-secret";
|
|
25
|
-
var JsonObject = Schema.Record(Schema.String, Schema.Unknown);
|
|
26
|
-
var McpConnectionAuth = Schema.Union([
|
|
27
|
-
Schema.Struct({ kind: Schema.Literal("none") }),
|
|
28
|
-
Schema.Struct({
|
|
29
|
-
kind: Schema.Literal("header"),
|
|
30
|
-
headerName: Schema.String,
|
|
31
|
-
secretSlot: Schema.String,
|
|
32
|
-
prefix: Schema.optional(Schema.String)
|
|
33
|
-
}),
|
|
34
|
-
Schema.Struct({
|
|
35
|
-
kind: Schema.Literal("oauth2"),
|
|
36
|
-
connectionSlot: Schema.String,
|
|
37
|
-
clientIdSlot: Schema.optional(Schema.String),
|
|
38
|
-
clientSecretSlot: Schema.optional(Schema.String)
|
|
39
|
-
})
|
|
40
|
-
]);
|
|
41
|
-
var McpConnectionAuthInput = Schema.Union([
|
|
42
|
-
Schema.Struct({
|
|
43
|
-
kind: Schema.Literal("none")
|
|
44
|
-
}),
|
|
45
|
-
Schema.Struct({
|
|
46
|
-
oauth2: Schema.optional(HttpOAuthConfigureInput)
|
|
47
|
-
})
|
|
48
|
-
]);
|
|
49
|
-
var StringMap = Schema.Record(Schema.String, Schema.String);
|
|
50
|
-
var McpRemoteSourceData = Schema.Struct({
|
|
51
|
-
transport: Schema.Literal("remote"),
|
|
52
|
-
/** The MCP server endpoint URL */
|
|
53
|
-
endpoint: Schema.String,
|
|
54
|
-
/** Transport preference for this remote source */
|
|
55
|
-
remoteTransport: McpRemoteTransport.pipe(
|
|
56
|
-
Schema.optionalKey,
|
|
57
|
-
Schema.withConstructorDefault(Effect.succeed("auto"))
|
|
58
|
-
),
|
|
59
|
-
/** Extra query params appended to the endpoint URL */
|
|
60
|
-
queryParams: Schema.optional(Schema.Record(Schema.String, ConfiguredMcpCredentialValue)),
|
|
61
|
-
/** Extra headers sent on every request */
|
|
62
|
-
headers: Schema.optional(Schema.Record(Schema.String, ConfiguredMcpCredentialValue)),
|
|
63
|
-
/** Auth configuration */
|
|
64
|
-
auth: McpConnectionAuth
|
|
65
|
-
});
|
|
66
|
-
var McpStdioSourceData = Schema.Struct({
|
|
67
|
-
transport: Schema.Literal("stdio"),
|
|
68
|
-
/** The command to run */
|
|
69
|
-
command: Schema.String,
|
|
70
|
-
/** Arguments to the command */
|
|
71
|
-
args: Schema.optional(Schema.Array(Schema.String)),
|
|
72
|
-
/** Environment variables */
|
|
73
|
-
env: Schema.optional(StringMap),
|
|
74
|
-
/** Working directory */
|
|
75
|
-
cwd: Schema.optional(Schema.String)
|
|
76
|
-
});
|
|
77
|
-
var McpStoredSourceData = Schema.Union([McpRemoteSourceData, McpStdioSourceData]);
|
|
78
|
-
var McpToolAnnotations = Schema.Struct({
|
|
79
|
-
title: Schema.optional(Schema.String),
|
|
80
|
-
readOnlyHint: Schema.optional(Schema.Boolean),
|
|
81
|
-
destructiveHint: Schema.optional(Schema.Boolean),
|
|
82
|
-
idempotentHint: Schema.optional(Schema.Boolean),
|
|
83
|
-
openWorldHint: Schema.optional(Schema.Boolean)
|
|
84
|
-
});
|
|
85
|
-
var McpToolBinding = Schema.Struct({
|
|
86
|
-
toolId: Schema.String,
|
|
87
|
-
toolName: Schema.String,
|
|
88
|
-
description: Schema.NullOr(Schema.String),
|
|
89
|
-
inputSchema: Schema.optional(Schema.Unknown),
|
|
90
|
-
outputSchema: Schema.optional(Schema.Unknown),
|
|
91
|
-
annotations: Schema.optional(McpToolAnnotations)
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// src/sdk/errors.ts
|
|
95
|
-
import { Data, Schema as Schema2 } from "effect";
|
|
96
|
-
var McpConnectionError = class extends Schema2.TaggedErrorClass()(
|
|
97
|
-
"McpConnectionError",
|
|
98
|
-
{
|
|
99
|
-
transport: Schema2.String,
|
|
100
|
-
message: Schema2.String
|
|
101
|
-
},
|
|
102
|
-
{ httpApiStatus: 400 }
|
|
103
|
-
) {
|
|
104
|
-
};
|
|
105
|
-
var McpToolDiscoveryError = class extends Schema2.TaggedErrorClass()(
|
|
106
|
-
"McpToolDiscoveryError",
|
|
107
|
-
{
|
|
108
|
-
stage: Schema2.Literals(["connect", "list_tools"]),
|
|
109
|
-
message: Schema2.String
|
|
110
|
-
},
|
|
111
|
-
{ httpApiStatus: 400 }
|
|
112
|
-
) {
|
|
113
|
-
};
|
|
114
|
-
var McpInvocationError = class extends Schema2.TaggedErrorClass()(
|
|
115
|
-
"McpInvocationError",
|
|
116
|
-
{
|
|
117
|
-
toolName: Schema2.String,
|
|
118
|
-
message: Schema2.String
|
|
119
|
-
},
|
|
120
|
-
{ httpApiStatus: 400 }
|
|
121
|
-
) {
|
|
122
|
-
};
|
|
123
|
-
var McpOAuthError = class extends Schema2.TaggedErrorClass()(
|
|
124
|
-
"McpOAuthError",
|
|
125
|
-
{
|
|
126
|
-
message: Schema2.String
|
|
127
|
-
},
|
|
128
|
-
{ httpApiStatus: 400 }
|
|
129
|
-
) {
|
|
130
|
-
};
|
|
131
|
-
var McpAuthRequiredError = class extends Data.TaggedError("McpAuthRequiredError") {
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export {
|
|
135
|
-
SecretBackedValue,
|
|
136
|
-
McpRemoteTransport,
|
|
137
|
-
ConfiguredMcpCredentialValue,
|
|
138
|
-
McpConfiguredValueInput,
|
|
139
|
-
McpCredentialInput,
|
|
140
|
-
mcpHeaderSlot,
|
|
141
|
-
mcpQueryParamSlot,
|
|
142
|
-
MCP_HEADER_AUTH_SLOT,
|
|
143
|
-
MCP_OAUTH_CONNECTION_SLOT,
|
|
144
|
-
MCP_OAUTH_CLIENT_ID_SLOT,
|
|
145
|
-
MCP_OAUTH_CLIENT_SECRET_SLOT,
|
|
146
|
-
McpConnectionAuth,
|
|
147
|
-
McpConnectionAuthInput,
|
|
148
|
-
McpStoredSourceData,
|
|
149
|
-
McpToolAnnotations,
|
|
150
|
-
McpToolBinding,
|
|
151
|
-
McpConnectionError,
|
|
152
|
-
McpToolDiscoveryError,
|
|
153
|
-
McpInvocationError,
|
|
154
|
-
McpAuthRequiredError
|
|
155
|
-
};
|
|
156
|
-
//# sourceMappingURL=chunk-6OYEXHU3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sdk/types.ts","../src/sdk/errors.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\";\nimport {\n ConfiguredCredentialValue,\n credentialSlotKey,\n SecretBackedMap,\n SecretBackedValue,\n} from \"@executor-js/sdk/shared\";\nimport {\n HttpConfiguredValueInput,\n HttpCredentialInput,\n HttpOAuthConfigureInput,\n} from \"@executor-js/sdk/http-source\";\n\nexport { SecretBackedMap, SecretBackedValue };\n\n// ---------------------------------------------------------------------------\n// Remote transport type\n// ---------------------------------------------------------------------------\n\nexport const McpRemoteTransport = Schema.Literals([\"streamable-http\", \"sse\", \"auto\"]);\nexport type McpRemoteTransport = typeof McpRemoteTransport.Type;\n\n/** All transport types (used in the connector layer) */\nexport const McpTransport = Schema.Literals([\"streamable-http\", \"sse\", \"stdio\", \"auto\"]);\nexport type McpTransport = typeof McpTransport.Type;\n\nexport const ConfiguredMcpCredentialValue = ConfiguredCredentialValue;\nexport type ConfiguredMcpCredentialValue = typeof ConfiguredMcpCredentialValue.Type;\n\nexport const McpConfiguredValueInput = HttpConfiguredValueInput;\nexport type McpConfiguredValueInput = typeof McpConfiguredValueInput.Type;\n\nexport const McpCredentialInput = HttpCredentialInput;\nexport type McpCredentialInput = typeof McpCredentialInput.Type;\n\nexport const mcpHeaderSlot = (name: string): string => credentialSlotKey(\"header\", name);\nexport const mcpQueryParamSlot = (name: string): string => credentialSlotKey(\"query_param\", name);\nexport const MCP_HEADER_AUTH_SLOT = \"auth:header\";\nexport const MCP_OAUTH_CONNECTION_SLOT = \"auth:oauth2:connection\";\nexport const MCP_OAUTH_CLIENT_ID_SLOT = \"auth:oauth2:client-id\";\nexport const MCP_OAUTH_CLIENT_SECRET_SLOT = \"auth:oauth2:client-secret\";\n\n// ---------------------------------------------------------------------------\n// Connection auth (only applies to remote sources)\n//\n// `oauth2` is a source-owned credential slot. Concrete per-user or\n// per-workspace connection ids live in core credential_binding rows.\n// ---------------------------------------------------------------------------\n\n/** JSON object loosely typed — used for opaque OAuth state we just round-trip. */\nconst JsonObject = Schema.Record(Schema.String, Schema.Unknown);\nexport { JsonObject as McpJsonObject };\n\nexport const McpConnectionAuth = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"none\") }),\n Schema.Struct({\n kind: Schema.Literal(\"header\"),\n headerName: Schema.String,\n secretSlot: Schema.String,\n prefix: Schema.optional(Schema.String),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"oauth2\"),\n connectionSlot: Schema.String,\n clientIdSlot: Schema.optional(Schema.String),\n clientSecretSlot: Schema.optional(Schema.String),\n }),\n]);\nexport type McpConnectionAuth = typeof McpConnectionAuth.Type;\n\nexport const McpConnectionAuthInput = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"none\"),\n }),\n Schema.Struct({\n oauth2: Schema.optional(HttpOAuthConfigureInput),\n }),\n]);\nexport type McpConnectionAuthInput = typeof McpConnectionAuthInput.Type;\n\n// ---------------------------------------------------------------------------\n// Stored source data — discriminated union on transport\n// ---------------------------------------------------------------------------\n\n/** Common fields for remote string map schemas */\nconst StringMap = Schema.Record(Schema.String, Schema.String);\n\nexport const McpRemoteSourceData = Schema.Struct({\n transport: Schema.Literal(\"remote\"),\n /** The MCP server endpoint URL */\n endpoint: Schema.String,\n /** Transport preference for this remote source */\n remoteTransport: McpRemoteTransport.pipe(\n Schema.optionalKey,\n Schema.withConstructorDefault(Effect.succeed(\"auto\" as const)),\n ),\n /** Extra query params appended to the endpoint URL */\n queryParams: Schema.optional(Schema.Record(Schema.String, ConfiguredMcpCredentialValue)),\n /** Extra headers sent on every request */\n headers: Schema.optional(Schema.Record(Schema.String, ConfiguredMcpCredentialValue)),\n /** Auth configuration */\n auth: McpConnectionAuth,\n});\nexport type McpRemoteSourceData = typeof McpRemoteSourceData.Type;\n\nexport const McpStdioSourceData = Schema.Struct({\n transport: Schema.Literal(\"stdio\"),\n /** The command to run */\n command: Schema.String,\n /** Arguments to the command */\n args: Schema.optional(Schema.Array(Schema.String)),\n /** Environment variables */\n env: Schema.optional(StringMap),\n /** Working directory */\n cwd: Schema.optional(Schema.String),\n});\nexport type McpStdioSourceData = typeof McpStdioSourceData.Type;\n\nexport const McpStoredSourceData = Schema.Union([McpRemoteSourceData, McpStdioSourceData]);\nexport type McpStoredSourceData = typeof McpStoredSourceData.Type;\n\n// ---------------------------------------------------------------------------\n// Tool binding — maps a registered ToolId back to the MCP tool name\n// ---------------------------------------------------------------------------\n\nexport const McpToolAnnotations = Schema.Struct({\n title: Schema.optional(Schema.String),\n readOnlyHint: Schema.optional(Schema.Boolean),\n destructiveHint: Schema.optional(Schema.Boolean),\n idempotentHint: Schema.optional(Schema.Boolean),\n openWorldHint: Schema.optional(Schema.Boolean),\n});\nexport type McpToolAnnotations = typeof McpToolAnnotations.Type;\n\nexport const McpToolBinding = Schema.Struct({\n toolId: Schema.String,\n toolName: Schema.String,\n description: Schema.NullOr(Schema.String),\n inputSchema: Schema.optional(Schema.Unknown),\n outputSchema: Schema.optional(Schema.Unknown),\n annotations: Schema.optional(McpToolAnnotations),\n});\nexport type McpToolBinding = typeof McpToolBinding.Type;\n","// MCP plugin tagged errors. Each carries an `HttpApiSchema` annotation so\n// it can be `.addError(...)` directly on the API group — handlers return\n// these and HttpApi encodes them as 4xx responses with a typed body. No\n// per-handler sanitisation step.\n\nimport { Data, Schema } from \"effect\";\nimport type { AuthToolFailureCode } from \"@executor-js/sdk/core\";\n\nexport class McpConnectionError extends Schema.TaggedErrorClass<McpConnectionError>()(\n \"McpConnectionError\",\n {\n transport: Schema.String,\n message: Schema.String,\n },\n { httpApiStatus: 400 },\n) {}\n\nexport class McpToolDiscoveryError extends Schema.TaggedErrorClass<McpToolDiscoveryError>()(\n \"McpToolDiscoveryError\",\n {\n stage: Schema.Literals([\"connect\", \"list_tools\"]),\n message: Schema.String,\n },\n { httpApiStatus: 400 },\n) {}\n\nexport class McpInvocationError extends Schema.TaggedErrorClass<McpInvocationError>()(\n \"McpInvocationError\",\n {\n toolName: Schema.String,\n message: Schema.String,\n },\n { httpApiStatus: 400 },\n) {}\n\nexport class McpOAuthError extends Schema.TaggedErrorClass<McpOAuthError>()(\n \"McpOAuthError\",\n {\n message: Schema.String,\n },\n { httpApiStatus: 400 },\n) {}\n\nexport class McpAuthRequiredError extends Data.TaggedError(\"McpAuthRequiredError\")<{\n readonly code: AuthToolFailureCode;\n readonly message: string;\n readonly sourceId: string;\n readonly sourceScope: string;\n readonly credentialKind: \"secret\" | \"connection\" | \"oauth\" | \"upstream\";\n readonly credentialLabel?: string;\n readonly slotKey?: string;\n readonly secretId?: string;\n readonly connectionId?: string;\n readonly status?: number;\n readonly details?: unknown;\n readonly cause?: unknown;\n}> {}\n"],"mappings":";AAAA,SAAS,QAAQ,cAAc;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQA,IAAM,qBAAqB,OAAO,SAAS,CAAC,mBAAmB,OAAO,MAAM,CAAC;AAI7E,IAAM,eAAe,OAAO,SAAS,CAAC,mBAAmB,OAAO,SAAS,MAAM,CAAC;AAGhF,IAAM,+BAA+B;AAGrC,IAAM,0BAA0B;AAGhC,IAAM,qBAAqB;AAG3B,IAAM,gBAAgB,CAAC,SAAyB,kBAAkB,UAAU,IAAI;AAChF,IAAM,oBAAoB,CAAC,SAAyB,kBAAkB,eAAe,IAAI;AACzF,IAAM,uBAAuB;AAC7B,IAAM,4BAA4B;AAClC,IAAM,2BAA2B;AACjC,IAAM,+BAA+B;AAU5C,IAAM,aAAa,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO;AAGvD,IAAM,oBAAoB,OAAO,MAAM;AAAA,EAC5C,OAAO,OAAO,EAAE,MAAM,OAAO,QAAQ,MAAM,EAAE,CAAC;AAAA,EAC9C,OAAO,OAAO;AAAA,IACZ,MAA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,gBAAN,cAA4BA,QAAO,iBAAgC;AAAA,EACxE;AAAA,EACA;AAAA,IACE,SAASA,QAAO;AAAA,EAClB;AAAA,EACA,EAAE,eAAe,IAAI;AACvB,EAAE;AAAC;AAEI,IAAM,uBAAN,cAAmC,KAAK,YAAY,sBAAsB,EAa9E;AAAC;","names":["Schema"]}
|
package/dist/chunk-FMTVLO5L.js
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
McpConfiguredValueInput,
|
|
3
|
-
McpConnectionAuthInput,
|
|
4
|
-
McpConnectionError,
|
|
5
|
-
McpCredentialInput,
|
|
6
|
-
McpStoredSourceData,
|
|
7
|
-
McpToolDiscoveryError
|
|
8
|
-
} from "./chunk-6OYEXHU3.js";
|
|
9
|
-
|
|
10
|
-
// src/react/atoms.ts
|
|
11
|
-
import * as Atom from "effect/unstable/reactivity/Atom";
|
|
12
|
-
import * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
|
|
13
|
-
import { sourceCredentialBindingsAtom, sourcesOptimisticAtom } from "@executor-js/react/api/atoms";
|
|
14
|
-
import { ReactivityKey } from "@executor-js/react/api/reactivity-keys";
|
|
15
|
-
|
|
16
|
-
// src/react/client.ts
|
|
17
|
-
import { createPluginAtomClient } from "@executor-js/sdk/client";
|
|
18
|
-
import { getBaseUrl } from "@executor-js/react/api/base-url";
|
|
19
|
-
|
|
20
|
-
// src/api/group.ts
|
|
21
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
22
|
-
import { Schema as Schema2 } from "effect";
|
|
23
|
-
import { InternalError, ScopeId as ScopeId2, SecretBackedMap } from "@executor-js/sdk/shared";
|
|
24
|
-
|
|
25
|
-
// src/sdk/stored-source.ts
|
|
26
|
-
import { Schema } from "effect";
|
|
27
|
-
import { ScopeId } from "@executor-js/sdk/shared";
|
|
28
|
-
var McpStoredSourceSchema = Schema.Struct({
|
|
29
|
-
namespace: Schema.String,
|
|
30
|
-
scope: ScopeId,
|
|
31
|
-
name: Schema.String,
|
|
32
|
-
config: McpStoredSourceData
|
|
33
|
-
}).annotate({ identifier: "McpStoredSource" });
|
|
34
|
-
|
|
35
|
-
// src/api/group.ts
|
|
36
|
-
import { OAuth2SourceConfig } from "@executor-js/sdk/http-source";
|
|
37
|
-
var ScopeParams = { scopeId: ScopeId2 };
|
|
38
|
-
var SourceParams = { scopeId: ScopeId2, namespace: Schema2.String };
|
|
39
|
-
var StringMap = Schema2.Record(Schema2.String, Schema2.String);
|
|
40
|
-
var AddRemoteSourcePayload = Schema2.Struct({
|
|
41
|
-
transport: Schema2.Literal("remote"),
|
|
42
|
-
name: Schema2.String,
|
|
43
|
-
endpoint: Schema2.String,
|
|
44
|
-
remoteTransport: Schema2.optional(Schema2.Literals(["streamable-http", "sse", "auto"])),
|
|
45
|
-
namespace: Schema2.optional(Schema2.String),
|
|
46
|
-
queryParams: Schema2.optional(Schema2.Record(Schema2.String, McpConfiguredValueInput)),
|
|
47
|
-
headers: Schema2.optional(Schema2.Record(Schema2.String, McpConfiguredValueInput)),
|
|
48
|
-
oauth2: Schema2.optional(OAuth2SourceConfig),
|
|
49
|
-
credentials: Schema2.optional(
|
|
50
|
-
Schema2.Struct({
|
|
51
|
-
scope: ScopeId2,
|
|
52
|
-
headers: Schema2.optional(Schema2.Record(Schema2.String, McpCredentialInput)),
|
|
53
|
-
queryParams: Schema2.optional(Schema2.Record(Schema2.String, McpCredentialInput)),
|
|
54
|
-
auth: Schema2.optional(McpConnectionAuthInput)
|
|
55
|
-
})
|
|
56
|
-
)
|
|
57
|
-
});
|
|
58
|
-
var AddStdioSourcePayload = Schema2.Struct({
|
|
59
|
-
transport: Schema2.Literal("stdio"),
|
|
60
|
-
name: Schema2.String,
|
|
61
|
-
command: Schema2.String,
|
|
62
|
-
args: Schema2.optional(Schema2.Array(Schema2.String)),
|
|
63
|
-
env: Schema2.optional(StringMap),
|
|
64
|
-
cwd: Schema2.optional(Schema2.String),
|
|
65
|
-
namespace: Schema2.optional(Schema2.String)
|
|
66
|
-
});
|
|
67
|
-
var AddSourcePayload = Schema2.Union([AddRemoteSourcePayload, AddStdioSourcePayload]);
|
|
68
|
-
var ProbeEndpointPayload = Schema2.Struct({
|
|
69
|
-
endpoint: Schema2.String,
|
|
70
|
-
headers: Schema2.optional(SecretBackedMap),
|
|
71
|
-
queryParams: Schema2.optional(SecretBackedMap)
|
|
72
|
-
});
|
|
73
|
-
var ProbeEndpointResponse = Schema2.Struct({
|
|
74
|
-
connected: Schema2.Boolean,
|
|
75
|
-
requiresOAuth: Schema2.Boolean,
|
|
76
|
-
supportsDynamicRegistration: Schema2.Boolean,
|
|
77
|
-
name: Schema2.String,
|
|
78
|
-
namespace: Schema2.String,
|
|
79
|
-
toolCount: Schema2.NullOr(Schema2.Number),
|
|
80
|
-
serverName: Schema2.NullOr(Schema2.String)
|
|
81
|
-
});
|
|
82
|
-
var NamespacePayload = Schema2.Struct({
|
|
83
|
-
namespace: Schema2.String
|
|
84
|
-
});
|
|
85
|
-
var AddSourceResponse = Schema2.Struct({
|
|
86
|
-
toolCount: Schema2.Number,
|
|
87
|
-
namespace: Schema2.String
|
|
88
|
-
});
|
|
89
|
-
var RefreshSourceResponse = Schema2.Struct({
|
|
90
|
-
toolCount: Schema2.Number
|
|
91
|
-
});
|
|
92
|
-
var RemoveSourceResponse = Schema2.Struct({
|
|
93
|
-
removed: Schema2.Boolean
|
|
94
|
-
});
|
|
95
|
-
var McpGroup = HttpApiGroup.make("mcp").add(
|
|
96
|
-
HttpApiEndpoint.post("probeEndpoint", "/scopes/:scopeId/mcp/probe", {
|
|
97
|
-
params: ScopeParams,
|
|
98
|
-
payload: ProbeEndpointPayload,
|
|
99
|
-
success: ProbeEndpointResponse,
|
|
100
|
-
error: [InternalError, McpConnectionError, McpToolDiscoveryError]
|
|
101
|
-
})
|
|
102
|
-
).add(
|
|
103
|
-
HttpApiEndpoint.post("addSource", "/scopes/:scopeId/mcp/sources", {
|
|
104
|
-
params: ScopeParams,
|
|
105
|
-
payload: AddSourcePayload,
|
|
106
|
-
success: AddSourceResponse,
|
|
107
|
-
error: [InternalError, McpConnectionError, McpToolDiscoveryError]
|
|
108
|
-
})
|
|
109
|
-
).add(
|
|
110
|
-
HttpApiEndpoint.post("removeSource", "/scopes/:scopeId/mcp/sources/remove", {
|
|
111
|
-
params: ScopeParams,
|
|
112
|
-
payload: NamespacePayload,
|
|
113
|
-
success: RemoveSourceResponse,
|
|
114
|
-
error: [InternalError, McpConnectionError, McpToolDiscoveryError]
|
|
115
|
-
})
|
|
116
|
-
).add(
|
|
117
|
-
HttpApiEndpoint.post("refreshSource", "/scopes/:scopeId/mcp/sources/refresh", {
|
|
118
|
-
params: ScopeParams,
|
|
119
|
-
payload: NamespacePayload,
|
|
120
|
-
success: RefreshSourceResponse,
|
|
121
|
-
error: [InternalError, McpConnectionError, McpToolDiscoveryError]
|
|
122
|
-
})
|
|
123
|
-
).add(
|
|
124
|
-
HttpApiEndpoint.get("getSource", "/scopes/:scopeId/mcp/sources/:namespace", {
|
|
125
|
-
params: SourceParams,
|
|
126
|
-
success: Schema2.NullOr(McpStoredSourceSchema),
|
|
127
|
-
error: [InternalError, McpConnectionError, McpToolDiscoveryError]
|
|
128
|
-
})
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
// src/react/client.ts
|
|
132
|
-
var McpClient = createPluginAtomClient(McpGroup, {
|
|
133
|
-
baseUrl: getBaseUrl
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
// src/react/atoms.ts
|
|
137
|
-
var mcpSourceAtom = (scopeId, namespace) => McpClient.query("mcp", "getSource", {
|
|
138
|
-
params: { scopeId, namespace },
|
|
139
|
-
timeToLive: "15 seconds",
|
|
140
|
-
reactivityKeys: [ReactivityKey.sources, ReactivityKey.tools]
|
|
141
|
-
});
|
|
142
|
-
var mcpSourceBindingsAtom = (scopeId, namespace, sourceScopeId) => sourceCredentialBindingsAtom(scopeId, namespace, sourceScopeId);
|
|
143
|
-
var probeMcpEndpoint = McpClient.mutation("mcp", "probeEndpoint");
|
|
144
|
-
var addMcpSource = McpClient.mutation("mcp", "addSource");
|
|
145
|
-
var addMcpSourceOptimistic = Atom.family(
|
|
146
|
-
(scopeId) => sourcesOptimisticAtom(scopeId).pipe(
|
|
147
|
-
Atom.optimisticFn({
|
|
148
|
-
reducer: (current, arg) => AsyncResult.map(current, (rows) => {
|
|
149
|
-
const id = arg.payload.namespace ?? `pending-${Math.random().toString(36).slice(2)}`;
|
|
150
|
-
const source = {
|
|
151
|
-
id,
|
|
152
|
-
scopeId,
|
|
153
|
-
kind: "mcp",
|
|
154
|
-
pluginId: "mcp",
|
|
155
|
-
name: arg.payload.name ?? id,
|
|
156
|
-
...arg.payload.transport === "remote" ? { url: arg.payload.endpoint } : {},
|
|
157
|
-
canRemove: false,
|
|
158
|
-
canRefresh: false,
|
|
159
|
-
canEdit: false,
|
|
160
|
-
runtime: false
|
|
161
|
-
};
|
|
162
|
-
return [source, ...rows.filter((row) => row.id !== id)].sort(
|
|
163
|
-
(a, b) => a.name.localeCompare(b.name)
|
|
164
|
-
);
|
|
165
|
-
}),
|
|
166
|
-
fn: addMcpSource
|
|
167
|
-
})
|
|
168
|
-
)
|
|
169
|
-
);
|
|
170
|
-
var removeMcpSource = McpClient.mutation("mcp", "removeSource");
|
|
171
|
-
var refreshMcpSource = McpClient.mutation("mcp", "refreshSource");
|
|
172
|
-
|
|
173
|
-
export {
|
|
174
|
-
mcpSourceAtom,
|
|
175
|
-
mcpSourceBindingsAtom,
|
|
176
|
-
probeMcpEndpoint,
|
|
177
|
-
addMcpSourceOptimistic
|
|
178
|
-
};
|
|
179
|
-
//# sourceMappingURL=chunk-FMTVLO5L.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts","../src/sdk/stored-source.ts"],"sourcesContent":["import type { ScopeId } from \"@executor-js/sdk/shared\";\nimport * as Atom from \"effect/unstable/reactivity/Atom\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\nimport { sourceCredentialBindingsAtom, sourcesOptimisticAtom } from \"@executor-js/react/api/atoms\";\nimport { ReactivityKey } from \"@executor-js/react/api/reactivity-keys\";\nimport { McpClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms\n// ---------------------------------------------------------------------------\n\nexport const mcpSourceAtom = (scopeId: ScopeId, namespace: string) =>\n McpClient.query(\"mcp\", \"getSource\", {\n params: { scopeId, namespace },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.sources, ReactivityKey.tools],\n });\n\nexport const mcpSourceBindingsAtom = (\n scopeId: ScopeId,\n namespace: string,\n sourceScopeId: ScopeId,\n) => sourceCredentialBindingsAtom(scopeId, namespace, sourceScopeId);\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const probeMcpEndpoint = McpClient.mutation(\"mcp\", \"probeEndpoint\");\nexport const addMcpSource = McpClient.mutation(\"mcp\", \"addSource\");\nexport const addMcpSourceOptimistic = Atom.family((scopeId: ScopeId) =>\n sourcesOptimisticAtom(scopeId).pipe(\n Atom.optimisticFn({\n reducer: (current, arg) =>\n AsyncResult.map(current, (rows) => {\n const id = arg.payload.namespace ?? `pending-${Math.random().toString(36).slice(2)}`;\n const source = {\n id,\n scopeId,\n kind: \"mcp\",\n pluginId: \"mcp\",\n name: arg.payload.name ?? id,\n ...(arg.payload.transport === \"remote\" ? { url: arg.payload.endpoint } : {}),\n canRemove: false,\n canRefresh: false,\n canEdit: false,\n runtime: false,\n };\n return [source, ...rows.filter((row) => row.id !== id)].sort((a, b) =>\n a.name.localeCompare(b.name),\n );\n }),\n fn: addMcpSource,\n }),\n ),\n);\nexport const removeMcpSource = McpClient.mutation(\"mcp\", \"removeSource\");\nexport const refreshMcpSource = McpClient.mutation(\"mcp\", \"refreshSource\");\n","import { createPluginAtomClient } from \"@executor-js/sdk/client\";\nimport { getBaseUrl } from \"@executor-js/react/api/base-url\";\nimport { McpGroup } from \"../api/group\";\n\nexport const McpClient = createPluginAtomClient(McpGroup, {\n baseUrl: getBaseUrl,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport { InternalError, ScopeId, SecretBackedMap } from \"@executor-js/sdk/shared\";\n\nimport { McpConnectionError, McpToolDiscoveryError } from \"../sdk/errors\";\nimport { McpStoredSourceSchema } from \"../sdk/stored-source\";\nimport { McpConfiguredValueInput, McpConnectionAuthInput, McpCredentialInput } from \"../sdk/types\";\nimport { OAuth2SourceConfig } from \"@executor-js/sdk/http-source\";\n\n// ---------------------------------------------------------------------------\n// Params\n// ---------------------------------------------------------------------------\n\nconst ScopeParams = { scopeId: ScopeId };\nconst SourceParams = { scopeId: ScopeId, namespace: Schema.String };\n\nconst StringMap = Schema.Record(Schema.String, Schema.String);\n// ---------------------------------------------------------------------------\n// Add source — discriminated union on transport\n// ---------------------------------------------------------------------------\n\nconst AddRemoteSourcePayload = Schema.Struct({\n transport: Schema.Literal(\"remote\"),\n name: Schema.String,\n endpoint: Schema.String,\n remoteTransport: Schema.optional(Schema.Literals([\"streamable-http\", \"sse\", \"auto\"])),\n namespace: Schema.optional(Schema.String),\n queryParams: Schema.optional(Schema.Record(Schema.String, McpConfiguredValueInput)),\n headers: Schema.optional(Schema.Record(Schema.String, McpConfiguredValueInput)),\n oauth2: Schema.optional(OAuth2SourceConfig),\n credentials: Schema.optional(\n Schema.Struct({\n scope: ScopeId,\n headers: Schema.optional(Schema.Record(Schema.String, McpCredentialInput)),\n queryParams: Schema.optional(Schema.Record(Schema.String, McpCredentialInput)),\n auth: Schema.optional(McpConnectionAuthInput),\n }),\n ),\n});\n\nconst AddStdioSourcePayload = Schema.Struct({\n transport: Schema.Literal(\"stdio\"),\n name: Schema.String,\n command: Schema.String,\n args: Schema.optional(Schema.Array(Schema.String)),\n env: Schema.optional(StringMap),\n cwd: Schema.optional(Schema.String),\n namespace: Schema.optional(Schema.String),\n});\n\nconst AddSourcePayload = Schema.Union([AddRemoteSourcePayload, AddStdioSourcePayload]);\n\nconst ProbeEndpointPayload = Schema.Struct({\n endpoint: Schema.String,\n headers: Schema.optional(SecretBackedMap),\n queryParams: Schema.optional(SecretBackedMap),\n});\n\nconst ProbeEndpointResponse = Schema.Struct({\n connected: Schema.Boolean,\n requiresOAuth: Schema.Boolean,\n supportsDynamicRegistration: Schema.Boolean,\n name: Schema.String,\n namespace: Schema.String,\n toolCount: Schema.NullOr(Schema.Number),\n serverName: Schema.NullOr(Schema.String),\n});\n\nconst NamespacePayload = Schema.Struct({\n namespace: Schema.String,\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddSourceResponse = Schema.Struct({\n toolCount: Schema.Number,\n namespace: Schema.String,\n});\n\nconst RefreshSourceResponse = Schema.Struct({\n toolCount: Schema.Number,\n});\n\nconst RemoveSourceResponse = Schema.Struct({\n removed: Schema.Boolean,\n});\n\n// ---------------------------------------------------------------------------\n// Group\n//\n// Plugin SDK errors (McpOAuthError etc.) are declared once at the group\n// level via `.addError(...)` — every endpoint inherits them. The errors\n// themselves carry their HTTP status via `HttpApiSchema.annotations`\n// in errors.ts, so handlers just `return yield* ext.foo(...)` and the\n// schema encodes whatever it gets.\n//\n// 5xx is handled at the API level: `CoreExecutorApi.addError(InternalError)`\n// adds a single shared opaque-by-schema 500 surface to every endpoint in\n// the entire API. Defects are captured + downgraded to it by an\n// HttpApiBuilder middleware (see apps/cloud/src/observability.ts).\n// No per-handler wrapping, no per-plugin InternalError.\n// ---------------------------------------------------------------------------\n\nexport const McpGroup = HttpApiGroup.make(\"mcp\")\n .add(\n HttpApiEndpoint.post(\"probeEndpoint\", \"/scopes/:scopeId/mcp/probe\", {\n params: ScopeParams,\n payload: ProbeEndpointPayload,\n success: ProbeEndpointResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addSource\", \"/scopes/:scopeId/mcp/sources\", {\n params: ScopeParams,\n payload: AddSourcePayload,\n success: AddSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"removeSource\", \"/scopes/:scopeId/mcp/sources/remove\", {\n params: ScopeParams,\n payload: NamespacePayload,\n success: RemoveSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"refreshSource\", \"/scopes/:scopeId/mcp/sources/refresh\", {\n params: ScopeParams,\n payload: NamespacePayload,\n success: RefreshSourceResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getSource\", \"/scopes/:scopeId/mcp/sources/:namespace\", {\n params: SourceParams,\n success: Schema.NullOr(McpStoredSourceSchema),\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n );\n// Errors declared once at the group level — every endpoint inherits.\n// Plugin domain errors carry their own HttpApiSchema status (4xx);\n// `InternalError` is the shared opaque 500 translated at the HTTP\n// edge by `withCapture`. We only list errors an MCP *group*\n// endpoint can surface: `McpInvocationError` is thrown inside\n// `invokeTool` which is reached via the core `tools.invoke`\n// endpoint, not any MCP-group endpoint, so it doesn't belong here.\n// OAuth errors live on the shared `/oauth/*` group in `@executor-js/api`\n// now — the MCP group only declares its own plugin-domain errors.\n","import { Schema } from \"effect\";\nimport { ScopeId } from \"@executor-js/sdk/shared\";\n\nimport { McpStoredSourceData } from \"./types\";\n\n// ---------------------------------------------------------------------------\n// Stored source — the shape persisted by the binding store and exposed\n// via the getSource HTTP endpoint.\n// ---------------------------------------------------------------------------\n\nexport const McpStoredSourceSchema = Schema.Struct({\n namespace: Schema.String,\n scope: ScopeId,\n name: Schema.String,\n config: McpStoredSourceData,\n}).annotate({ identifier: \"McpStoredSource\" });\nexport type McpStoredSourceSchema = typeof McpStoredSourceSchema.Type;\n\nexport type Mcp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