@executor-js/plugin-mcp 1.5.12 → 1.5.14

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.
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  mcpPresets
3
- } from "./chunk-TW44CBXJ.js";
3
+ } from "./chunk-QEAVWCYB.js";
4
4
  import {
5
5
  addMcpServer,
6
6
  mcpAuthMethodInputFromEditorValue,
7
7
  mcpWireAuthInput,
8
8
  probeMcpEndpoint
9
- } from "./chunk-AL7N323J.js";
9
+ } from "./chunk-SJ4LKQVQ.js";
10
10
  import "./chunk-3H5Y7JCQ.js";
11
11
 
12
12
  // src/react/AddMcpSource.tsx
@@ -592,4 +592,4 @@ function AddMcpSource(props) {
592
592
  export {
593
593
  AddMcpSource as default
594
594
  };
595
- //# sourceMappingURL=AddMcpSource-HCJNPYGW.js.map
595
+ //# sourceMappingURL=AddMcpSource-BSJDTWMP.js.map
@@ -4,7 +4,7 @@ import {
4
4
  mcpAuthMethodInputFromEditorValue,
5
5
  mcpServerAtom,
6
6
  mcpWireAuthInput
7
- } from "./chunk-AL7N323J.js";
7
+ } from "./chunk-SJ4LKQVQ.js";
8
8
  import "./chunk-3H5Y7JCQ.js";
9
9
 
10
10
  // src/react/EditMcpSource.tsx
@@ -156,4 +156,4 @@ function EditMcpSource({ sourceId, onPendingChange }) {
156
156
  export {
157
157
  EditMcpSource as default
158
158
  };
159
- //# sourceMappingURL=EditMcpSource-BV5ZEWEY.js.map
159
+ //# sourceMappingURL=EditMcpSource-3S6FUVCR.js.map
@@ -4,7 +4,7 @@ import {
4
4
  mcpAuthMethodInputsFromPlacements,
5
5
  mcpServerAtom,
6
6
  mcpWireAuthInput
7
- } from "./chunk-AL7N323J.js";
7
+ } from "./chunk-SJ4LKQVQ.js";
8
8
  import "./chunk-3H5Y7JCQ.js";
9
9
 
10
10
  // src/react/McpAccountsPanel.tsx
@@ -80,4 +80,4 @@ function McpAccountsPanel(props) {
80
80
  export {
81
81
  McpAccountsPanel as default
82
82
  };
83
- //# sourceMappingURL=McpAccountsPanel-Y3D6HSPC.js.map
83
+ //# sourceMappingURL=McpAccountsPanel-273WNH3T.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mcpPresets
3
- } from "./chunk-TW44CBXJ.js";
3
+ } from "./chunk-QEAVWCYB.js";
4
4
  import {
5
5
  McpAuthMethodInput,
6
6
  McpAuthShorthand,
@@ -1365,4 +1365,4 @@ export {
1365
1365
  userFacingProbeMessage,
1366
1366
  mcpPlugin
1367
1367
  };
1368
- //# sourceMappingURL=chunk-QAG34CWT.js.map
1368
+ //# sourceMappingURL=chunk-ENRA2SPE.js.map
@@ -87,7 +87,7 @@ var mcpPresets = [
87
87
  summary: "Error monitoring, issues, and performance data.",
88
88
  url: "https://mcp.sentry.dev/mcp",
89
89
  endpoint: "https://mcp.sentry.dev/mcp",
90
- icon: "https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png"
90
+ icon: "https://svgl.app/library/sentry.svg"
91
91
  },
92
92
  {
93
93
  id: "cloudflare",
@@ -112,4 +112,4 @@ var mcpPresets = [
112
112
  export {
113
113
  mcpPresets
114
114
  };
115
- //# sourceMappingURL=chunk-TW44CBXJ.js.map
115
+ //# sourceMappingURL=chunk-QEAVWCYB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/sdk/presets.ts"],"sourcesContent":["export interface McpRemotePreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly url: string;\n readonly endpoint: string;\n readonly icon?: string;\n readonly featured?: boolean;\n readonly transport?: undefined;\n}\n\nexport interface McpStdioPreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly icon?: string;\n readonly featured?: boolean;\n readonly transport: \"stdio\";\n readonly command: string;\n readonly args?: readonly string[];\n readonly env?: Readonly<Record<string, string>>;\n}\n\nexport type McpPreset = McpRemotePreset | McpStdioPreset;\n\nexport const mcpPresets: readonly McpPreset[] = [\n {\n id: \"deepwiki\",\n name: \"DeepWiki\",\n summary: \"Search and read documentation from any GitHub repo.\",\n url: \"https://mcp.deepwiki.com/mcp\",\n endpoint: \"https://mcp.deepwiki.com/mcp\",\n icon: \"https://deepwiki.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"context7\",\n name: \"Context7\",\n summary: \"Up-to-date docs and code examples for any library.\",\n url: \"https://mcp.context7.com/mcp\",\n endpoint: \"https://mcp.context7.com/mcp\",\n icon: \"https://context7.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"browserbase\",\n name: \"Browserbase\",\n summary: \"Cloud browser sessions for web scraping and automation.\",\n url: \"https://mcp.browserbase.com/mcp\",\n endpoint: \"https://mcp.browserbase.com/mcp\",\n icon: \"https://www.browserbase.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"firecrawl\",\n name: \"Firecrawl\",\n summary: \"Crawl and scrape websites into structured data.\",\n url: \"https://mcp.firecrawl.dev/mcp\",\n endpoint: \"https://mcp.firecrawl.dev/mcp\",\n icon: \"https://www.firecrawl.dev/favicon.ico\",\n featured: true,\n },\n {\n id: \"neon\",\n name: \"Neon\",\n summary: \"Serverless Postgres — branches, queries, and management.\",\n url: \"https://mcp.neon.tech/mcp\",\n endpoint: \"https://mcp.neon.tech/mcp\",\n icon: \"https://neon.tech/favicon/favicon.ico\",\n featured: true,\n },\n {\n id: \"axiom\",\n name: \"Axiom\",\n summary: \"Query, analyze, and monitor your logs and event data.\",\n url: \"https://mcp.axiom.co/mcp\",\n endpoint: \"https://mcp.axiom.co/mcp\",\n icon: \"https://axiom.co/favicon.ico\",\n featured: true,\n },\n {\n id: \"stripe\",\n name: \"Stripe\",\n summary: \"Manage payments, subscriptions, and billing via MCP.\",\n url: \"https://mcp.stripe.com\",\n endpoint: \"https://mcp.stripe.com\",\n icon: \"https://stripe.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"linear\",\n name: \"Linear\",\n summary: \"Issues, projects, teams, and cycles via MCP.\",\n url: \"https://mcp.linear.app/mcp\",\n endpoint: \"https://mcp.linear.app/mcp\",\n icon: \"https://linear.app/favicon.ico\",\n featured: true,\n },\n {\n id: \"notion\",\n name: \"Notion\",\n summary: \"Databases, pages, blocks, and search via MCP.\",\n url: \"https://mcp.notion.com/mcp\",\n endpoint: \"https://mcp.notion.com/mcp\",\n icon: \"https://www.notion.com/front-static/favicon.ico\",\n featured: true,\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n summary: \"Error monitoring, issues, and performance data.\",\n url: \"https://mcp.sentry.dev/mcp\",\n endpoint: \"https://mcp.sentry.dev/mcp\",\n icon: \"https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png\",\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n summary: \"Workers, KV, D1, R2, and DNS management via MCP.\",\n url: \"https://mcp.cloudflare.com/mcp\",\n endpoint: \"https://mcp.cloudflare.com/mcp\",\n icon: \"https://cloudflare.com/favicon.ico\",\n },\n {\n id: \"chrome-devtools\",\n name: \"Chrome DevTools\",\n summary: \"Debug a live Chrome browser session via local stdio.\",\n icon: \"https://www.google.com/chrome/static/images/favicons/favicon-32x32.png\",\n featured: true,\n transport: \"stdio\",\n command: \"npx\",\n args: [\"-y\", \"chrome-devtools-mcp@latest\"],\n },\n];\n"],"mappings":";AAyBO,IAAM,aAAmC;AAAA,EAC9C;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAA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IACT,MAAM,CAAC,MAAM,4BAA4B;AAAA,EAC3C;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/sdk/presets.ts"],"sourcesContent":["export interface McpRemotePreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly url: string;\n readonly endpoint: string;\n readonly icon?: string;\n readonly featured?: boolean;\n readonly transport?: undefined;\n}\n\nexport interface McpStdioPreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly icon?: string;\n readonly featured?: boolean;\n readonly transport: \"stdio\";\n readonly command: string;\n readonly args?: readonly string[];\n readonly env?: Readonly<Record<string, string>>;\n}\n\nexport type McpPreset = McpRemotePreset | McpStdioPreset;\n\nexport const mcpPresets: readonly McpPreset[] = [\n {\n id: \"deepwiki\",\n name: \"DeepWiki\",\n summary: \"Search and read documentation from any GitHub repo.\",\n url: \"https://mcp.deepwiki.com/mcp\",\n endpoint: \"https://mcp.deepwiki.com/mcp\",\n icon: \"https://deepwiki.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"context7\",\n name: \"Context7\",\n summary: \"Up-to-date docs and code examples for any library.\",\n url: \"https://mcp.context7.com/mcp\",\n endpoint: \"https://mcp.context7.com/mcp\",\n icon: \"https://context7.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"browserbase\",\n name: \"Browserbase\",\n summary: \"Cloud browser sessions for web scraping and automation.\",\n url: \"https://mcp.browserbase.com/mcp\",\n endpoint: \"https://mcp.browserbase.com/mcp\",\n icon: \"https://www.browserbase.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"firecrawl\",\n name: \"Firecrawl\",\n summary: \"Crawl and scrape websites into structured data.\",\n url: \"https://mcp.firecrawl.dev/mcp\",\n endpoint: \"https://mcp.firecrawl.dev/mcp\",\n icon: \"https://www.firecrawl.dev/favicon.ico\",\n featured: true,\n },\n {\n id: \"neon\",\n name: \"Neon\",\n summary: \"Serverless Postgres — branches, queries, and management.\",\n url: \"https://mcp.neon.tech/mcp\",\n endpoint: \"https://mcp.neon.tech/mcp\",\n icon: \"https://neon.tech/favicon/favicon.ico\",\n featured: true,\n },\n {\n id: \"axiom\",\n name: \"Axiom\",\n summary: \"Query, analyze, and monitor your logs and event data.\",\n url: \"https://mcp.axiom.co/mcp\",\n endpoint: \"https://mcp.axiom.co/mcp\",\n icon: \"https://axiom.co/favicon.ico\",\n featured: true,\n },\n {\n id: \"stripe\",\n name: \"Stripe\",\n summary: \"Manage payments, subscriptions, and billing via MCP.\",\n url: \"https://mcp.stripe.com\",\n endpoint: \"https://mcp.stripe.com\",\n icon: \"https://stripe.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"linear\",\n name: \"Linear\",\n summary: \"Issues, projects, teams, and cycles via MCP.\",\n url: \"https://mcp.linear.app/mcp\",\n endpoint: \"https://mcp.linear.app/mcp\",\n icon: \"https://linear.app/favicon.ico\",\n featured: true,\n },\n {\n id: \"notion\",\n name: \"Notion\",\n summary: \"Databases, pages, blocks, and search via MCP.\",\n url: \"https://mcp.notion.com/mcp\",\n endpoint: \"https://mcp.notion.com/mcp\",\n icon: \"https://www.notion.com/front-static/favicon.ico\",\n featured: true,\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n summary: \"Error monitoring, issues, and performance data.\",\n url: \"https://mcp.sentry.dev/mcp\",\n endpoint: \"https://mcp.sentry.dev/mcp\",\n icon: \"https://svgl.app/library/sentry.svg\",\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n summary: \"Workers, KV, D1, R2, and DNS management via MCP.\",\n url: \"https://mcp.cloudflare.com/mcp\",\n endpoint: \"https://mcp.cloudflare.com/mcp\",\n icon: \"https://cloudflare.com/favicon.ico\",\n },\n {\n id: \"chrome-devtools\",\n name: \"Chrome DevTools\",\n summary: \"Debug a live Chrome browser session via local stdio.\",\n icon: \"https://www.google.com/chrome/static/images/favicons/favicon-32x32.png\",\n featured: true,\n transport: \"stdio\",\n command: \"npx\",\n args: [\"-y\", \"chrome-devtools-mcp@latest\"],\n },\n];\n"],"mappings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T,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,SAAS;AAAA,IACT,MAAM,CAAC,MAAM,4BAA4B;AAAA,EAC3C;AACF;","names":[]}
@@ -13,6 +13,7 @@ import { ReactivityKey } from "@executor-js/react/api/reactivity-keys";
13
13
  // src/react/client.ts
14
14
  import { createPluginAtomClient } from "@executor-js/sdk/client";
15
15
  import {
16
+ getExecutorOrganizationHeaders,
16
17
  getExecutorApiBaseUrl,
17
18
  getExecutorServerAuthorizationHeader
18
19
  } from "@executor-js/react/api/server-connection";
@@ -148,7 +149,8 @@ var McpGroup = HttpApiGroup.make("mcp").add(
148
149
  // src/react/client.ts
149
150
  var McpClient = createPluginAtomClient(McpGroup, {
150
151
  baseUrl: getExecutorApiBaseUrl,
151
- authorizationHeader: getExecutorServerAuthorizationHeader
152
+ authorizationHeader: getExecutorServerAuthorizationHeader,
153
+ headers: getExecutorOrganizationHeaders
152
154
  });
153
155
 
154
156
  // src/react/atoms.ts
@@ -217,4 +219,4 @@ export {
217
219
  authMethodsFromConfig,
218
220
  mcpAuthMethodInputsFromPlacements
219
221
  };
220
- //# sourceMappingURL=chunk-AL7N323J.js.map
222
+ //# sourceMappingURL=chunk-SJ4LKQVQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts","../src/react/auth-method-config.ts"],"sourcesContent":["import type { IntegrationSlug } from \"@executor-js/sdk/shared\";\nimport { ReactivityKey } from \"@executor-js/react/api/reactivity-keys\";\nimport { McpClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms (v2)\n//\n// An MCP server is an integration. `getServer` reads the integration row's\n// opaque config (transport, endpoint, auth template). Credentials are separate\n// owner-scoped connections, created through the core connections / oauth surface\n// — there is no per-server credential binding to read here anymore.\n// ---------------------------------------------------------------------------\n\nexport const mcpServerAtom = (slug: IntegrationSlug) =>\n McpClient.query(\"mcp\", \"getServer\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const probeMcpEndpoint = McpClient.mutation(\"mcp\", \"probeEndpoint\");\nexport const addMcpServer = McpClient.mutation(\"mcp\", \"addServer\");\nexport const removeMcpServer = McpClient.mutation(\"mcp\", \"removeServer\");\nexport const configureMcpServer = McpClient.mutation(\"mcp\", \"configureServer\");\n// Merge-append auth methods onto an integration's `authenticationTemplate`.\nexport const configureMcpAuth = McpClient.mutation(\"mcp\", \"configureAuth\");\n","import { createPluginAtomClient } from \"@executor-js/sdk/client\";\nimport {\n getExecutorOrganizationHeaders,\n getExecutorApiBaseUrl,\n getExecutorServerAuthorizationHeader,\n} from \"@executor-js/react/api/server-connection\";\nimport { McpGroup } from \"../api/group\";\n\nexport const McpClient = createPluginAtomClient(McpGroup, {\n baseUrl: getExecutorApiBaseUrl,\n authorizationHeader: getExecutorServerAuthorizationHeader,\n headers: getExecutorOrganizationHeaders,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport {\n IntegrationSlug,\n InternalError,\n IntegrationAlreadyExistsError,\n} from \"@executor-js/sdk/shared\";\n\nimport { McpConnectionError, McpToolDiscoveryError } from \"../sdk/errors\";\nimport {\n McpAuthMethod,\n McpAuthMethodInput,\n McpAuthShorthand,\n McpIntegrationConfig,\n} from \"../sdk/types\";\n\n// ---------------------------------------------------------------------------\n// Params\n// ---------------------------------------------------------------------------\n\nconst SlugParams = { slug: IntegrationSlug };\n\nconst StringMap = Schema.Record(Schema.String, Schema.String);\n\n// ---------------------------------------------------------------------------\n// Add server — discriminated union on transport. An MCP server is registered\n// as an integration; connections (credentials) are created separately through\n// the core connections / oauth surface.\n// ---------------------------------------------------------------------------\n\nconst AddRemoteServerPayload = Schema.Struct({\n transport: Schema.optional(Schema.Literal(\"remote\")),\n name: Schema.String,\n /** Agent-visible catalog description. Defaults to the display name. */\n description: Schema.optional(Schema.String),\n endpoint: Schema.String,\n remoteTransport: Schema.optional(Schema.Literals([\"streamable-http\", \"sse\", \"auto\"])),\n slug: Schema.optional(Schema.String),\n queryParams: Schema.optional(StringMap),\n headers: Schema.optional(StringMap),\n /** Declared auth methods a connection can be applied through. */\n authenticationTemplate: Schema.optional(Schema.Array(McpAuthMethodInput)),\n /** Single-method shorthand (legacy callers); ignored when\n * `authenticationTemplate` is present. */\n auth: Schema.optional(McpAuthShorthand),\n});\n\nconst AddStdioServerPayload = Schema.Struct({\n transport: Schema.Literal(\"stdio\"),\n name: Schema.String,\n description: Schema.optional(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 slug: Schema.optional(Schema.String),\n});\n\nconst AddServerPayload = Schema.Union([AddRemoteServerPayload, AddStdioServerPayload]);\n\nconst ProbeEndpointPayload = Schema.Struct({\n endpoint: Schema.String,\n headers: Schema.optional(StringMap),\n queryParams: Schema.optional(StringMap),\n});\n\nconst ProbeEndpointResponse = Schema.Struct({\n connected: Schema.Boolean,\n requiresAuthentication: Schema.Boolean,\n requiresOAuth: Schema.Boolean,\n supportsDynamicRegistration: Schema.Boolean,\n name: Schema.String,\n slug: Schema.String,\n toolCount: Schema.NullOr(Schema.Number),\n serverName: Schema.NullOr(Schema.String),\n /** Server `instructions` from initialize — prefills the description field. */\n instructions: Schema.NullOr(Schema.String),\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddServerResponse = Schema.Struct({\n slug: Schema.String,\n});\n\nconst RemoveServerResponse = Schema.Struct({\n removed: Schema.Boolean,\n});\n\nconst ConfigureServerPayload = Schema.Struct({\n config: McpIntegrationConfig,\n});\n\nconst ConfigureServerResponse = Schema.Struct({\n config: McpIntegrationConfig,\n});\n\n// The configureAuth payload/response — custom auth methods to merge-append\n// onto the integration's `authenticationTemplate` (or `replace` the set).\n// Mirrors the GraphQL/OpenAPI configure endpoints.\nconst ConfigureAuthPayload = Schema.Struct({\n authenticationTemplate: Schema.Array(McpAuthMethodInput),\n mode: Schema.optional(Schema.Literals([\"merge\", \"replace\"])),\n});\n\nconst ConfigureAuthResponse = Schema.Struct({\n authenticationTemplate: Schema.Array(McpAuthMethod),\n});\n\nconst GetServerResponse = Schema.NullOr(\n Schema.Struct({\n slug: IntegrationSlug,\n description: Schema.String,\n kind: Schema.String,\n canRemove: Schema.Boolean,\n canRefresh: Schema.Boolean,\n config: McpIntegrationConfig,\n }),\n);\n\n// ---------------------------------------------------------------------------\n// Group\n//\n// Integrations are tenant-level (no scope segment); plugin domain errors carry\n// their own `HttpApiSchema` status (4xx). `InternalError` is the shared opaque\n// 500 translated at the HTTP edge.\n// ---------------------------------------------------------------------------\n\nexport const McpGroup = HttpApiGroup.make(\"mcp\")\n .add(\n HttpApiEndpoint.post(\"probeEndpoint\", \"/mcp/probe\", {\n payload: ProbeEndpointPayload,\n success: ProbeEndpointResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addServer\", \"/mcp/servers\", {\n payload: AddServerPayload,\n success: AddServerResponse,\n error: [\n InternalError,\n McpConnectionError,\n McpToolDiscoveryError,\n IntegrationAlreadyExistsError,\n ],\n }),\n )\n .add(\n HttpApiEndpoint.delete(\"removeServer\", \"/mcp/servers/:slug\", {\n params: SlugParams,\n success: RemoveServerResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getServer\", \"/mcp/servers/:slug\", {\n params: SlugParams,\n success: GetServerResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configureServer\", \"/mcp/servers/:slug/config\", {\n params: SlugParams,\n payload: ConfigureServerPayload,\n success: ConfigureServerResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configureAuth\", \"/mcp/servers/:slug/auth\", {\n params: SlugParams,\n payload: ConfigureAuthPayload,\n success: ConfigureAuthResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n );\n","// ---------------------------------------------------------------------------\n// MCP ↔ generic auth-method converters — a thin oauth adapter over the shared\n// codec (`@executor-js/react/lib/shared-auth-method-codec`). The apikey/none\n// paths (multi-placement, multi-variable) live in the shared codec; MCP only\n// contributes its oauth flavor: endpoint-less methods whose metadata is\n// discovered at connect time (`discoveryUrl` = the MCP endpoint).\n// ---------------------------------------------------------------------------\n\nimport { AuthTemplateSlug } from \"@executor-js/sdk/shared\";\nimport type { AuthTemplateEditorValue } from \"@executor-js/react/components/auth-template-editor\";\nimport type { AuthMethod, Placement } from \"@executor-js/react/lib/auth-placements\";\nimport {\n authMethodFromSharedTemplate,\n editorValueFromSharedMethod,\n sharedMethodInputFromEditorValue,\n wirePlacementsFromEditor,\n} from \"@executor-js/react/lib/shared-auth-method-codec\";\n\nimport { wireAuthInputFromShared } from \"@executor-js/react/lib/shared-auth-method-codec\";\nimport type { McpAuthMethod, McpAuthMethodInput, McpCanonicalAuthMethodInput } from \"../sdk/types\";\n\n/** Serialize a canonical method into the wire input union (apikey → the\n * request-shaped dialect; none/oauth2 pass through). */\nexport const mcpWireAuthInput = (\n method: McpAuthMethod | McpCanonicalAuthMethodInput,\n): McpAuthMethodInput => wireAuthInputFromShared(method) as McpAuthMethodInput;\n\nconst oauthAuthMethod = (slug: string, endpoint: string): AuthMethod => ({\n id: slug,\n label: \"OAuth\",\n kind: \"oauth\",\n source: slug.startsWith(\"custom_\") ? \"custom\" : \"spec\",\n template: AuthTemplateSlug.make(slug),\n placements: [],\n oauth: { discoveryUrl: endpoint, supportsDynamicRegistration: true },\n});\n\n/** Convert a generic editor value into one MCP auth-method input (no slug —\n * the backend assigns carrier-derived slugs). An apikey value keeps every\n * named placement (headers and query params mix freely); one with no usable\n * placement falls back to `none`. */\nexport function mcpAuthMethodInputFromEditorValue(\n value: AuthTemplateEditorValue,\n): McpCanonicalAuthMethodInput {\n if (value.kind === \"oauth\") return { kind: \"oauth2\" };\n return (sharedMethodInputFromEditorValue(value) ?? {\n kind: \"none\",\n }) as McpCanonicalAuthMethodInput;\n}\n\n/** Convert one stored MCP method into the generic editor value. */\nexport function editorValueFromMcpAuthMethod(method: McpAuthMethod): AuthTemplateEditorValue {\n if (method.kind === \"oauth2\") {\n return { kind: \"oauth\", authorizationUrl: \"\", tokenUrl: \"\", scopes: [] };\n }\n return editorValueFromSharedMethod(method);\n}\n\n/** Project the stored methods into the generic `AuthMethod[]` the hub renders.\n * Mirrors the server's `describeMcpAuthMethods`; `custom_` slugs mark\n * user-created methods (removable from the hub). `endpoint` feeds the oauth\n * method's probe-at-connect `discoveryUrl`. */\nexport function authMethodsFromConfig(\n methods: readonly McpAuthMethod[],\n endpoint: string,\n): AuthMethod[] {\n return methods.map((method: McpAuthMethod): AuthMethod => {\n if (method.kind === \"oauth2\") return oauthAuthMethod(method.slug, endpoint);\n return authMethodFromSharedTemplate(method);\n });\n}\n\n/** Build the MCP method input for a custom method from generic placements —\n * ONE method carrying every named placement (header + query mix in a single\n * method; each placement renders from its own input variable, or shares one).\n * Empty when no placement is usable. */\nexport function mcpAuthMethodInputsFromPlacements(\n placements: readonly Placement[],\n): McpCanonicalAuthMethodInput[] {\n const wire = wirePlacementsFromEditor(placements);\n if (wire.length === 0) return [];\n return [{ kind: \"apikey\", placements: wire }];\n}\n"],"mappings":";;;;;;;;;;AACA,SAAS,qBAAqB;;;ACD9B,SAAS,8BAA8B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcP,IAAM,aAAa,EAAE,MAAM,gBAAgB;AAE3C,IAAM,YAAY,OAAO,OAAO,OAAO,QAAQ,OAAO,MAAM;AAQ5D,IAAM,yBAAyB,OAAO,OAAO;AAAA,EAC3C,WAAW,OAAO,SAAS,OAAO,QAAQ,QAAQ,CAAC;AAAA,EACnD,MAAM,OAAO;AAAA;AAAA,EAEb,aAAa,OAAO,SAAS,OAAO,MAAM;AAAA,EAC1C,UAAU,OAAO;AAAA,EACjB,iBAAiB,OAAO,SAAS,OAAO,SAAS,CAAC,mBAAmB,OAAO,MAAM,CAAC,CAAC;AAAA,EACpF,MAAM,OAAO,SAAS,OAAO,MAAM;AAAA,EACnC,aAAa,OAAO,SAAS,SAAS;AAAA,EACtC,SAAS,OAAO,SAAS,SAAS;AAAA;AAAA,EAElC,wBAAwB,OAAO,SAAS,OAAO,MAAM,kBAAkB,CAAC;AAAA;AAAA;AAAA,EAGxE,MAAM,OAAO,SAAS,gBAAgB;AACxC,CAAC;AAED,IAAM,wBAAwB,OAAO,OAAO;AAAA,EAC1C,WAAW,OAAO,QAAQ,OAAO;AAAA,EACjC,MAAM,OAAO;AAAA,EACb,aAAa,OAAO,SAAS,OAAO,MAAM;AAAA,EAC1C,SAAS,OAAO;AAAA,EAChB,MAAM,OAAO,SAAS,OAAO,MAAM,OAAO,MAAM,CAAC;AAAA,EACjD,KAAK,OAAO,SAAS,SAAS;AAAA,EAC9B,KAAK,OAAO,SAAS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M;AAAA,EAC5C,CAAC;AACH;AAMO,SAAS,kCACd,YAC+B;AAC/B,QAAM,OAAO,yBAAyB,UAAU;AAChD,MAAI,KAAK,WAAW,EAAG,QAAO,CAAC;AAC/B,SAAO,CAAC,EAAE,MAAM,UAAU,YAAY,KAAK,CAAC;AAC9C;","names":[]}
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mcpPresets
3
- } from "./chunk-TW44CBXJ.js";
3
+ } from "./chunk-QEAVWCYB.js";
4
4
 
5
5
  // src/react/plugin-client.tsx
6
6
  import { defineClientPlugin } from "@executor-js/sdk/client";
@@ -8,9 +8,9 @@ import { defineClientPlugin } from "@executor-js/sdk/client";
8
8
  // src/react/source-plugin.tsx
9
9
  import { lazy } from "react";
10
10
  import { jsx } from "react/jsx-runtime";
11
- var importAdd = () => import("./AddMcpSource-HCJNPYGW.js");
12
- var importEditSheet = () => import("./EditMcpSource-BV5ZEWEY.js");
13
- var importAccounts = () => import("./McpAccountsPanel-Y3D6HSPC.js");
11
+ var importAdd = () => import("./AddMcpSource-BSJDTWMP.js");
12
+ var importEditSheet = () => import("./EditMcpSource-3S6FUVCR.js");
13
+ var importAccounts = () => import("./McpAccountsPanel-273WNH3T.js");
14
14
  var LazyAddMcpSource = lazy(importAdd);
15
15
  var LazyEditMcpSheet = lazy(importEditSheet);
16
16
  var LazyMcpAccountsPanel = lazy(importAccounts);
package/dist/core.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  joinToolPath,
5
5
  mcpPlugin,
6
6
  userFacingProbeMessage
7
- } from "./chunk-QAG34CWT.js";
8
- import "./chunk-TW44CBXJ.js";
7
+ } from "./chunk-ENRA2SPE.js";
8
+ import "./chunk-QEAVWCYB.js";
9
9
  import {
10
10
  McpAuthMethod,
11
11
  McpAuthMethodInput,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  mcpPlugin
3
- } from "./chunk-QAG34CWT.js";
4
- import "./chunk-TW44CBXJ.js";
3
+ } from "./chunk-ENRA2SPE.js";
4
+ import "./chunk-QEAVWCYB.js";
5
5
  import "./chunk-3H5Y7JCQ.js";
6
6
  export {
7
7
  mcpPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-mcp",
3
- "version": "1.5.12",
3
+ "version": "1.5.14",
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"
@@ -54,8 +54,8 @@
54
54
  "dependencies": {
55
55
  "@cfworker/json-schema": "^4.1.1",
56
56
  "@effect/platform-node": "4.0.0-beta.59",
57
- "@executor-js/config": "1.5.12",
58
- "@executor-js/sdk": "1.5.12",
57
+ "@executor-js/config": "1.5.14",
58
+ "@executor-js/sdk": "1.5.14",
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "zod": "4.3.6"
61
61
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts","../src/react/auth-method-config.ts"],"sourcesContent":["import type { IntegrationSlug } from \"@executor-js/sdk/shared\";\nimport { ReactivityKey } from \"@executor-js/react/api/reactivity-keys\";\nimport { McpClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms (v2)\n//\n// An MCP server is an integration. `getServer` reads the integration row's\n// opaque config (transport, endpoint, auth template). Credentials are separate\n// owner-scoped connections, created through the core connections / oauth surface\n// — there is no per-server credential binding to read here anymore.\n// ---------------------------------------------------------------------------\n\nexport const mcpServerAtom = (slug: IntegrationSlug) =>\n McpClient.query(\"mcp\", \"getServer\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const probeMcpEndpoint = McpClient.mutation(\"mcp\", \"probeEndpoint\");\nexport const addMcpServer = McpClient.mutation(\"mcp\", \"addServer\");\nexport const removeMcpServer = McpClient.mutation(\"mcp\", \"removeServer\");\nexport const configureMcpServer = McpClient.mutation(\"mcp\", \"configureServer\");\n// Merge-append auth methods onto an integration's `authenticationTemplate`.\nexport const configureMcpAuth = McpClient.mutation(\"mcp\", \"configureAuth\");\n","import { createPluginAtomClient } from \"@executor-js/sdk/client\";\nimport {\n getExecutorApiBaseUrl,\n getExecutorServerAuthorizationHeader,\n} from \"@executor-js/react/api/server-connection\";\nimport { McpGroup } from \"../api/group\";\n\nexport const McpClient = createPluginAtomClient(McpGroup, {\n baseUrl: getExecutorApiBaseUrl,\n authorizationHeader: getExecutorServerAuthorizationHeader,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport {\n IntegrationSlug,\n InternalError,\n IntegrationAlreadyExistsError,\n} from \"@executor-js/sdk/shared\";\n\nimport { McpConnectionError, McpToolDiscoveryError } from \"../sdk/errors\";\nimport {\n McpAuthMethod,\n McpAuthMethodInput,\n McpAuthShorthand,\n McpIntegrationConfig,\n} from \"../sdk/types\";\n\n// ---------------------------------------------------------------------------\n// Params\n// ---------------------------------------------------------------------------\n\nconst SlugParams = { slug: IntegrationSlug };\n\nconst StringMap = Schema.Record(Schema.String, Schema.String);\n\n// ---------------------------------------------------------------------------\n// Add server — discriminated union on transport. An MCP server is registered\n// as an integration; connections (credentials) are created separately through\n// the core connections / oauth surface.\n// ---------------------------------------------------------------------------\n\nconst AddRemoteServerPayload = Schema.Struct({\n transport: Schema.optional(Schema.Literal(\"remote\")),\n name: Schema.String,\n /** Agent-visible catalog description. Defaults to the display name. */\n description: Schema.optional(Schema.String),\n endpoint: Schema.String,\n remoteTransport: Schema.optional(Schema.Literals([\"streamable-http\", \"sse\", \"auto\"])),\n slug: Schema.optional(Schema.String),\n queryParams: Schema.optional(StringMap),\n headers: Schema.optional(StringMap),\n /** Declared auth methods a connection can be applied through. */\n authenticationTemplate: Schema.optional(Schema.Array(McpAuthMethodInput)),\n /** Single-method shorthand (legacy callers); ignored when\n * `authenticationTemplate` is present. */\n auth: Schema.optional(McpAuthShorthand),\n});\n\nconst AddStdioServerPayload = Schema.Struct({\n transport: Schema.Literal(\"stdio\"),\n name: Schema.String,\n description: Schema.optional(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 slug: Schema.optional(Schema.String),\n});\n\nconst AddServerPayload = Schema.Union([AddRemoteServerPayload, AddStdioServerPayload]);\n\nconst ProbeEndpointPayload = Schema.Struct({\n endpoint: Schema.String,\n headers: Schema.optional(StringMap),\n queryParams: Schema.optional(StringMap),\n});\n\nconst ProbeEndpointResponse = Schema.Struct({\n connected: Schema.Boolean,\n requiresAuthentication: Schema.Boolean,\n requiresOAuth: Schema.Boolean,\n supportsDynamicRegistration: Schema.Boolean,\n name: Schema.String,\n slug: Schema.String,\n toolCount: Schema.NullOr(Schema.Number),\n serverName: Schema.NullOr(Schema.String),\n /** Server `instructions` from initialize — prefills the description field. */\n instructions: Schema.NullOr(Schema.String),\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddServerResponse = Schema.Struct({\n slug: Schema.String,\n});\n\nconst RemoveServerResponse = Schema.Struct({\n removed: Schema.Boolean,\n});\n\nconst ConfigureServerPayload = Schema.Struct({\n config: McpIntegrationConfig,\n});\n\nconst ConfigureServerResponse = Schema.Struct({\n config: McpIntegrationConfig,\n});\n\n// The configureAuth payload/response — custom auth methods to merge-append\n// onto the integration's `authenticationTemplate` (or `replace` the set).\n// Mirrors the GraphQL/OpenAPI configure endpoints.\nconst ConfigureAuthPayload = Schema.Struct({\n authenticationTemplate: Schema.Array(McpAuthMethodInput),\n mode: Schema.optional(Schema.Literals([\"merge\", \"replace\"])),\n});\n\nconst ConfigureAuthResponse = Schema.Struct({\n authenticationTemplate: Schema.Array(McpAuthMethod),\n});\n\nconst GetServerResponse = Schema.NullOr(\n Schema.Struct({\n slug: IntegrationSlug,\n description: Schema.String,\n kind: Schema.String,\n canRemove: Schema.Boolean,\n canRefresh: Schema.Boolean,\n config: McpIntegrationConfig,\n }),\n);\n\n// ---------------------------------------------------------------------------\n// Group\n//\n// Integrations are tenant-level (no scope segment); plugin domain errors carry\n// their own `HttpApiSchema` status (4xx). `InternalError` is the shared opaque\n// 500 translated at the HTTP edge.\n// ---------------------------------------------------------------------------\n\nexport const McpGroup = HttpApiGroup.make(\"mcp\")\n .add(\n HttpApiEndpoint.post(\"probeEndpoint\", \"/mcp/probe\", {\n payload: ProbeEndpointPayload,\n success: ProbeEndpointResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addServer\", \"/mcp/servers\", {\n payload: AddServerPayload,\n success: AddServerResponse,\n error: [\n InternalError,\n McpConnectionError,\n McpToolDiscoveryError,\n IntegrationAlreadyExistsError,\n ],\n }),\n )\n .add(\n HttpApiEndpoint.delete(\"removeServer\", \"/mcp/servers/:slug\", {\n params: SlugParams,\n success: RemoveServerResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getServer\", \"/mcp/servers/:slug\", {\n params: SlugParams,\n success: GetServerResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configureServer\", \"/mcp/servers/:slug/config\", {\n params: SlugParams,\n payload: ConfigureServerPayload,\n success: ConfigureServerResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configureAuth\", \"/mcp/servers/:slug/auth\", {\n params: SlugParams,\n payload: ConfigureAuthPayload,\n success: ConfigureAuthResponse,\n error: [InternalError, McpConnectionError, McpToolDiscoveryError],\n }),\n );\n","// ---------------------------------------------------------------------------\n// MCP ↔ generic auth-method converters — a thin oauth adapter over the shared\n// codec (`@executor-js/react/lib/shared-auth-method-codec`). The apikey/none\n// paths (multi-placement, multi-variable) live in the shared codec; MCP only\n// contributes its oauth flavor: endpoint-less methods whose metadata is\n// discovered at connect time (`discoveryUrl` = the MCP endpoint).\n// ---------------------------------------------------------------------------\n\nimport { AuthTemplateSlug } from \"@executor-js/sdk/shared\";\nimport type { AuthTemplateEditorValue } from \"@executor-js/react/components/auth-template-editor\";\nimport type { AuthMethod, Placement } from \"@executor-js/react/lib/auth-placements\";\nimport {\n authMethodFromSharedTemplate,\n editorValueFromSharedMethod,\n sharedMethodInputFromEditorValue,\n wirePlacementsFromEditor,\n} from \"@executor-js/react/lib/shared-auth-method-codec\";\n\nimport { wireAuthInputFromShared } from \"@executor-js/react/lib/shared-auth-method-codec\";\nimport type { McpAuthMethod, McpAuthMethodInput, McpCanonicalAuthMethodInput } from \"../sdk/types\";\n\n/** Serialize a canonical method into the wire input union (apikey → the\n * request-shaped dialect; none/oauth2 pass through). */\nexport const mcpWireAuthInput = (\n method: McpAuthMethod | McpCanonicalAuthMethodInput,\n): McpAuthMethodInput => wireAuthInputFromShared(method) as McpAuthMethodInput;\n\nconst oauthAuthMethod = (slug: string, endpoint: string): AuthMethod => ({\n id: slug,\n label: \"OAuth\",\n kind: \"oauth\",\n source: slug.startsWith(\"custom_\") ? \"custom\" : \"spec\",\n template: AuthTemplateSlug.make(slug),\n placements: [],\n oauth: { discoveryUrl: endpoint, supportsDynamicRegistration: true },\n});\n\n/** Convert a generic editor value into one MCP auth-method input (no slug —\n * the backend assigns carrier-derived slugs). An apikey value keeps every\n * named placement (headers and query params mix freely); one with no usable\n * placement falls back to `none`. */\nexport function mcpAuthMethodInputFromEditorValue(\n value: AuthTemplateEditorValue,\n): McpCanonicalAuthMethodInput {\n if (value.kind === \"oauth\") return { kind: \"oauth2\" };\n return (sharedMethodInputFromEditorValue(value) ?? {\n kind: \"none\",\n }) as McpCanonicalAuthMethodInput;\n}\n\n/** Convert one stored MCP method into the generic editor value. */\nexport function editorValueFromMcpAuthMethod(method: McpAuthMethod): AuthTemplateEditorValue {\n if (method.kind === \"oauth2\") {\n return { kind: \"oauth\", authorizationUrl: \"\", tokenUrl: \"\", scopes: [] };\n }\n return editorValueFromSharedMethod(method);\n}\n\n/** Project the stored methods into the generic `AuthMethod[]` the hub renders.\n * Mirrors the server's `describeMcpAuthMethods`; `custom_` slugs mark\n * user-created methods (removable from the hub). `endpoint` feeds the oauth\n * method's probe-at-connect `discoveryUrl`. */\nexport function authMethodsFromConfig(\n methods: readonly McpAuthMethod[],\n endpoint: string,\n): AuthMethod[] {\n return methods.map((method: McpAuthMethod): AuthMethod => {\n if (method.kind === \"oauth2\") return oauthAuthMethod(method.slug, endpoint);\n return authMethodFromSharedTemplate(method);\n });\n}\n\n/** Build the MCP method input for a custom method from generic placements —\n * ONE method carrying every named placement (header + query mix in a single\n * method; each placement renders from its own input variable, or shares one).\n * Empty when no placement is usable. */\nexport function mcpAuthMethodInputsFromPlacements(\n placements: readonly Placement[],\n): McpCanonicalAuthMethodInput[] {\n const wire = wirePlacementsFromEditor(placements);\n if (wire.length === 0) return [];\n return [{ kind: \"apikey\", placements: wire }];\n}\n"],"mappings":";;;;;;;;;;AACA,SAAS,qBAAqB;;;ACD9B,SAAS,8BAA8B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcP,IAAM,aAAa,EAAE,MAAM,gBAAgB;AAE3C,IAAM,YAAY,OAAO,OAAO,OAAO,QAAQ,OAAO,MAAM;AAQ5D,IAAM,yBAAyB,OAAO,OAAO;AAAA,EAC3C,WAAW,OAAO,SAAS,OAAO,QAAQ,QAAQ,CAAC;AAAA,EACnD,MAAM,OAAO;AAAA;AAAA,EAEb,aAAa,OAAO,SAAS,OAAO,MAAM;AAAA,EAC1C,UAAU,OAAO;AA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