The Open Framework for Building Agents
feat(eve): add Shopify Storefront MCP connection (#2595)
Matt Lewisfbc3080e3abd
diff --git a/.changeset/curvy-pianos-shop.md b/.changeset/curvy-pianos-shop.mdnew file mode 100644index 000000000..de6da29f5--- /dev/null+++ b/.changeset/curvy-pianos-shop.md@@ -0,0 +1,5 @@+---+"eve": patch+---++Add Shopify registry setup for searching products and building UCP carts and checkouts. Setup now generates an anonymous UCP profile that the connection advertises in production.diff --git a/apps/docs/app/[lang]/integrations/[slug]/page.tsx b/apps/docs/app/[lang]/integrations/[slug]/page.tsxindex dae32f0bb..bd7f3d5d7 100644--- a/apps/docs/app/[lang]/integrations/[slug]/page.tsx+++ b/apps/docs/app/[lang]/integrations/[slug]/page.tsx@@ -135,7 +135,7 @@ const IntegrationDetailPage = async ({ params }: PageProps<"/[lang]/integrations</Markdown></Section><Section title="Quick start">- {setup ? (+ {setup && integration.quickStart === undefined ? (<Suspensefallback={<Markdown>@@ -157,7 +157,7 @@ const IntegrationDetailPage = async ({ params }: PageProps<"/[lang]/integrations)}</Section><Section id="configure" title="Configure">- {setup ? (+ {setup && integration.configure === undefined ? (<Suspensefallback={<Markdown>diff --git a/apps/docs/lib/integrations/connection-setup.test.ts b/apps/docs/lib/integrations/connection-setup.test.tsindex 03500da2a..0554c684f 100644--- a/apps/docs/lib/integrations/connection-setup.test.ts+++ b/apps/docs/lib/integrations/connection-setup.test.ts@@ -42,6 +42,23 @@ describe("Agentcard connection setup", () => {});});+describe("Shopify connection setup", () => {+ it("uses hand-authored sections without generating authentication variants", () => {+ const integration = getIntegration("shopify")!;+ const setup = buildConnectionSetup(integration);++ expect(setup.protocols).toEqual(["mcp"]);+ expect(setup.authModes).toEqual([]);+ expect(setup.variants).toEqual({});+ expect(setup.configureVariants).toEqual({});+ expect(integration.quickStart).toContain("defineMcpClientConnection");+ expect(integration.quickStart).toContain('process.env.EVE_DEV === "1"');+ expect(integration.quickStart).not.toContain("process.env.NODE_ENV");+ expect(integration.configure).toContain("SHOPIFY_STORE_DOMAIN");+ expect(integration.configure).not.toContain("UCP_AGENT_PROFILE_URL");+ });+});+describe("Kernel extension setup", () => {it("uses Kernel's eve extension with Vercel Connect", () => {const integration = getIntegration("kernel")!;diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.tsindex b4caabcd1..6212628e6 100644--- a/apps/docs/lib/integrations/data.ts+++ b/apps/docs/lib/integrations/data.ts@@ -84,8 +84,8 @@ export interface Integration {/** Searchable keywords beyond the name. */keywords?: string[];/**- * Channels and extensions author their setup as markdown. Connections leave- * these unset and supply a `connection` spec, from which content is generated.+ * Channels and extensions author their setup as markdown. Connections normally+ * generate it from `connection`, but may override Quick start and Configure.*/install?: string;quickStart?: string;@@ -120,6 +120,8 @@ interface ExtensionPresentation extends Presentation {/** Connection overlay: presentation plus Connect auth/config details. */interface ConnectionPresentation extends Presentation {authModes: AuthMode[];+ quickStart?: string;+ configure?: string;apiKey?: ApiKeySpec;connector?: string;connectors?: Partial<Record<AuthMode, string>>;@@ -1870,6 +1872,57 @@ const connectionPresentations: Record<string, ConnectionPresentation> = {keywords: ["mcp", "traffic", "market data", "competitive intelligence", "oauth", "connect"],authModes: ["user"],},+ shopify: {+ logo: "shopify",+ docsHref: "https://shopify.dev/docs/apps/build/storefront-mcp",+ keywords: ["mcp", "ucp", "commerce", "products", "carts", "checkouts"],+ authModes: [],+ quickStart: `Create \`agent/connections/shopify.ts\`:++\`\`\`ts+import { defineMcpClientConnection } from "eve/connections";++const SHOPIFY_EXAMPLE_PROFILE =+ "https://shopify.dev/ucp/agent-profiles/examples/2026-04-08/valid-with-capabilities.json";++// Shopify cannot reach localhost. Use its public profile, or expose this route with a tool like ngrok.+function agentProfileUrl(): string {+ if (process.env.EVE_DEV === "1") return SHOPIFY_EXAMPLE_PROFILE;++ return \`https://\${process.env.VERCEL_PROJECT_PRODUCTION_URL}/.well-known/ucp\`;+}++export default defineMcpClientConnection({+ url: \`https://\${process.env.SHOPIFY_STORE_DOMAIN!}/api/ucp/mcp\`,+ description: "Search products and build carts and checkouts on a Shopify storefront.",+ toolCall: {+ providedArguments: {+ meta: ({ callId, session, toolName }) => ({+ "ucp-agent": {+ profile: agentProfileUrl(),+ },++ // Include callId so sibling calls are unique while durable replays reuse the same key.+ ...(["cancel_cart", "complete_checkout", "cancel_checkout"].includes(toolName)+ ? {+ "idempotency-key": \`\${session.id}:\${session.turn.id}:\${toolName}:\${callId}\`,+ }+ : {}),+ }),+ },+ },+});+\`\`\``,+ configure: `Set your Shopify storefront domain:++\`\`\`bash+SHOPIFY_STORE_DOMAIN=your-store.myshopify.com+\`\`\`++During local development, the connection uses Shopify's public example because Shopify cannot reach localhost. To test your profile locally, expose \`/.well-known/ucp\` with [ngrok](https://ngrok.com/). In production, the connection uses the anonymous profile at \`/.well-known/ucp\`.++See Shopify's [agent profile documentation](https://shopify.dev/docs/agents/profiles) for profile requirements.`,+ },stripe: {logo: "stripe",docsHref: "/docs/connections/mcp",@@ -2289,6 +2342,8 @@ function buildConnection(entry: IntegrationEntry): Integration {logo: presentation.logo,docsHref: presentation.docsHref,keywords: presentation.keywords,+ quickStart: presentation.quickStart,+ configure: presentation.configure,connection: spec,};}diff --git a/apps/docs/lib/integrations/discovery.test.ts b/apps/docs/lib/integrations/discovery.test.tsindex fa441c030..ad3ab7265 100644--- a/apps/docs/lib/integrations/discovery.test.ts+++ b/apps/docs/lib/integrations/discovery.test.ts@@ -157,6 +157,16 @@ describe("integration discovery", () => {expect(markdown).toContain("agent/connections/notion.ts");});+ it("renders hand-authored connection setup without generated variant headings", () => {+ const shopify = getIntegration("shopify");+ expect(shopify).toBeDefined();++ const markdown = integrationMarkdown(shopify!);+ expect(markdown).toContain('process.env.EVE_DEV === "1"');+ expect(markdown).toContain("SHOPIFY_STORE_DOMAIN");+ expect(markdown).not.toContain("### MCP ·");+ });+it("renders instrumentation providers with registry installation", () => {const braintrust = getIntegration("braintrust");expect(braintrust).toBeDefined();diff --git a/apps/docs/lib/integrations/discovery.ts b/apps/docs/lib/integrations/discovery.tsindex a670551db..023856038 100644--- a/apps/docs/lib/integrations/discovery.ts+++ b/apps/docs/lib/integrations/discovery.ts@@ -40,12 +40,10 @@ export const integrationSearchText = (integration: Integration): string =>export const integrationMarkdown = (integration: Integration): string => {const isConnection = integration.connection !== undefined;const install = isConnection ? buildConnectionInstall(integration) : (integration.install ?? "");- const quickStart = isConnection- ? connectionQuickStart(integration)- : (integration.quickStart ?? "");- const configure = isConnection- ? buildConnectionConfigure(integration)- : (integration.configure ?? "");+ const quickStart =+ integration.quickStart ?? (isConnection ? connectionQuickStart(integration) : "");+ const configure =+ integration.configure ?? (isConnection ? buildConnectionConfigure(integration) : "");return [`${typeLabel[integration.type]} integration for eve. ${integration.tagline}`,diff --git a/apps/docs/lib/integrations/logos.tsx b/apps/docs/lib/integrations/logos.tsxindex 35857b25c..11731678f 100644--- a/apps/docs/lib/integrations/logos.tsx+++ b/apps/docs/lib/integrations/logos.tsx@@ -699,6 +699,23 @@ export const raindropLogo = (props: LogoProps) => (</svg>);+export const shopifyLogo = (props: LogoProps) => (+ <svg fill="none" viewBox="0 0 109.5 124.5" xmlns="http://www.w3.org/2000/svg" {...props}>+ <path+ d="M95.9 23.9c-.1-.6-.6-1-1.1-1-.5 0-9.3-.2-9.3-.2s-7.4-7.2-8.1-7.9c-.7-.7-2.2-.5-2.7-.3 0 0-1.4.4-3.7 1.1-.4-1.3-1-2.8-1.8-4.4-2.6-5-6.5-7.7-11.1-7.7h0c-.3 0-.6 0-1 .1-.1-.2-.3-.3-.4-.5-2-2.2-4.6-3.2-7.7-3.1-6 .2-12 4.5-16.8 12.2-3.4 5.4-6 12.2-6.8 17.5-6.9 2.1-11.7 3.6-11.8 3.7-3.5 1.1-3.6 1.2-4 4.5-.3 2.5-9.5 73-9.5 73l76.4 13.2 33.1-8.2S96 24.5 95.9 23.9ZM67.2 16.8c-1.8.5-3.8 1.2-5.9 1.8 0-3-.4-7.3-1.8-10.9 4.5.9 6.7 6 7.7 9.1Zm-10 3.1c-4 1.2-8.4 2.6-12.8 3.9 1.2-4.7 3.6-9.4 6.4-12.5 1.1-1.1 2.6-2.4 4.3-3.2 1.8 3.5 2.2 8.4 2.1 11.8ZM49.1 4c1.4 0 2.6.3 3.6.9-1.6.9-3.2 2.1-4.7 3.7-3.8 4.1-6.7 10.5-7.9 16.6-3.6 1.1-7.2 2.2-10.5 3.2C31.7 18.8 39.8 4.3 49.1 4Z"+ fill="#95BF47"+ />+ <path+ d="M94.8 22.9c-.5 0-9.3-.2-9.3-.2s-7.4-7.2-8.1-7.9c-.3-.3-.6-.4-1-.5V124l33.1-8.2S96.1 24.5 96 23.8c-.2-.5-.7-.9-1.2-.9Z"+ fill="#5E8E3E"+ />+ <path+ d="m58 39.9-3.8 14.4s-4.3-2-9.4-1.6c-7.5.5-7.5 5.2-7.5 6.4.4 6.4 17.3 7.8 18.3 22.9.7 11.9-6.3 20-16.4 20.6-12.2.8-18.9-6.4-18.9-6.4l2.6-11s6.7 5.1 12.1 4.7c3.5-.2 4.8-3.1 4.7-5.1-.5-8.4-14.3-7.9-15.2-21.7-.7-11.6 6.9-23.4 23.7-24.4C54.7 38.2 58 39.9 58 39.9Z"+ fill="#fff"+ />+ </svg>+);+export const logos = {eve: eveLogo,web: webLogo,@@ -750,6 +767,7 @@ export const logos = {razorpay: razorpayLogo,sanity: sanityLogo,sentry: sentryLogo,+ shopify: shopifyLogo,similarweb: similarwebLogo,stripe: stripeLogo,supabase: supabaseLogo,diff --git a/apps/docs/registry.json b/apps/docs/registry.jsonindex f0a076495..dcc419654 100644--- a/apps/docs/registry.json+++ b/apps/docs/registry.json@@ -1022,6 +1022,30 @@}]},+ {+ "name": "connection/shopify",+ "type": "registry:item",+ "title": "Shopify",+ "description": "Search products and manage carts and checkouts on a Shopify storefront.",+ "meta": {+ "eve": {+ "setup": {+ "command": "eve",+ "package": "eve",+ "bin": "eve",+ "args": ["integration", "setup", "shopify"]+ },+ "requires": ">=0.45.0"+ }+ },+ "files": [+ {+ "path": "registry/connections/shopify.ts",+ "type": "registry:file",+ "target": "agent/connections/shopify.ts"+ }+ ]+ },{"name": "connection/stripe","type": "registry:item",diff --git a/apps/docs/registry.staged-requirements.json b/apps/docs/registry.staged-requirements.jsonnew file mode 100644index 000000000..0153f2c82--- /dev/null+++ b/apps/docs/registry.staged-requirements.json@@ -0,0 +1,3 @@+{+ "items": ["connection/shopify"]+}diff --git a/apps/docs/registry/connections/shopify.ts b/apps/docs/registry/connections/shopify.tsnew file mode 100644index 000000000..9a4d229ab--- /dev/null+++ b/apps/docs/registry/connections/shopify.ts@@ -0,0 +1,32 @@+import { defineMcpClientConnection } from "eve/connections";++const SHOPIFY_EXAMPLE_PROFILE =+ "https://shopify.dev/ucp/agent-profiles/examples/2026-04-08/valid-with-capabilities.json";++// Shopify cannot reach localhost. Use its public profile, or expose this route with a tool like ngrok.+function agentProfileUrl(): string {+ if (process.env.EVE_DEV === "1") return SHOPIFY_EXAMPLE_PROFILE;++ return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}/.well-known/ucp`;+}++export default defineMcpClientConnection({+ url: `https://${process.env.SHOPIFY_STORE_DOMAIN!}/api/ucp/mcp`,+ description: "Search products and build carts and checkouts on a Shopify storefront.",+ toolCall: {+ providedArguments: {+ meta: ({ callId, session, toolName }) => ({+ "ucp-agent": {+ profile: agentProfileUrl(),+ },++ // Include callId so sibling calls are unique while durable replays reuse the same key.+ ...(["cancel_cart", "complete_checkout", "cancel_checkout"].includes(toolName)+ ? {+ "idempotency-key": `${session.id}:${session.turn.id}:${toolName}:${callId}`,+ }+ : {}),+ }),+ },+ },+});diff --git a/apps/docs/scripts/validate-connection-registry.ts b/apps/docs/scripts/validate-connection-registry.tsindex 2f5d8bc55..51d6772c4 100644--- a/apps/docs/scripts/validate-connection-registry.ts+++ b/apps/docs/scripts/validate-connection-registry.ts@@ -92,23 +92,33 @@ for (const item of items) {if (slug !== "browser-use") {const creationType = CONNECT_CREATION_TYPES[slug];const connectionMethod = CONNECT_METHODS[slug];- const expectedSetup = {- command: "eve",- package: "eve",- bin: "eve",- args: [- "integration",- "connect",- slug,- CONNECT_SERVICES[slug] ?? slug,- slug,- ...(creationType === undefined ? [] : ["--creation-type", creationType]),- ...(connectionMethod === undefined ? [] : ["--connection-method", connectionMethod]),- ],- };+ const expectedSetup =+ slug === "shopify"+ ? {+ command: "eve",+ package: "eve",+ bin: "eve",+ args: ["integration", "setup", "shopify"],+ }+ : {+ command: "eve",+ package: "eve",+ bin: "eve",+ args: [+ "integration",+ "connect",+ slug,+ CONNECT_SERVICES[slug] ?? slug,+ slug,+ ...(creationType === undefined ? [] : ["--creation-type", creationType]),+ ...(connectionMethod === undefined ? [] : ["--connection-method", connectionMethod]),+ ],+ };if (JSON.stringify(setups) !== JSON.stringify([expectedSetup])) {throw new Error(- `Registry item "${item.name}" must configure its Vercel Connect connector through eve.`,+ slug === "shopify"+ ? 'Registry item "connection/shopify" must run eve integration setup shopify.'+ : `Registry item "${item.name}" must configure its Vercel Connect connector through eve.`,);}}@@ -123,13 +133,30 @@ for (const item of items) {}await access(join(docsRoot, expectedPath));- if (slug === "browser-use") {- if (item.dependencies !== undefined || !("BROWSER_USE_API_KEY" in (item.envVars ?? {}))) {- throw new Error(- 'Registry item "connection/browser-use" must declare its API key without Vercel Connect.',- );+ switch (slug) {+ case "browser-use": {+ if (item.dependencies !== undefined || !("BROWSER_USE_API_KEY" in (item.envVars ?? {}))) {+ throw new Error(+ 'Registry item "connection/browser-use" must declare its API key without Vercel Connect.',+ );+ }+ break;+ }+ case "shopify": {+ if (item.dependencies !== undefined) {+ throw new Error('Registry item "connection/shopify" must not declare dependencies.');+ }+ if (item.envVars !== undefined) {+ throw new Error(+ 'Registry item "connection/shopify" must leave environment configuration to its guided setup.',+ );+ }+ break;+ }+ default: {+ if (!item.dependencies?.includes("@vercel/connect")) {+ throw new Error(`Registry item "${item.name}" must depend on @vercel/connect.`);+ }}- } else if (!item.dependencies?.includes("@vercel/connect")) {- throw new Error(`Registry item "${item.name}" must depend on @vercel/connect.`);}}diff --git a/packages/eve-catalog/src/index.ts b/packages/eve-catalog/src/index.tsindex f45a2925a..af882fd84 100644--- a/packages/eve-catalog/src/index.ts+++ b/packages/eve-catalog/src/index.ts@@ -707,6 +707,17 @@ export const INTEGRATIONS: readonly IntegrationEntry[] = [mcp: { url: "https://mcp.similarweb.com" },},},+ {+ slug: "shopify",+ name: "Shopify",+ kind: "connection",+ tagline: "Search products and manage carts and checkouts on a Shopify storefront.",+ surfaces: { scaffoldable: false, registry: true, gallery: true },+ connection: {+ description: "Search products and build carts and checkouts on a Shopify storefront.",+ mcp: { url: "https://{shop}.myshopify.com/api/ucp/mcp" },+ },+ },{slug: "stripe",name: "Stripe",diff --git a/packages/eve/src/setup/integrations/registry.test.ts b/packages/eve/src/setup/integrations/registry.test.tsindex 68fdec0af..4634be898 100644--- a/packages/eve/src/setup/integrations/registry.test.ts+++ b/packages/eve/src/setup/integrations/registry.test.ts@@ -32,6 +32,9 @@ describe("setup integrations", () => {it("registers GitHub", () => {expect(setupIntegration("github")).toMatchObject({ kind: "github", label: "GitHub" });});+ it("registers Shopify", () => {+ expect(setupIntegration("shopify")).toMatchObject({ kind: "shopify", label: "Shopify" });+ });it("rejects unknown integrations", () => {expect(() => setupIntegration("unknown")).toThrow('Integration setup "unknown" is not available',diff --git a/packages/eve/src/setup/integrations/registry.ts b/packages/eve/src/setup/integrations/registry.tsindex fddfbeb1a..3839ea5cf 100644--- a/packages/eve/src/setup/integrations/registry.ts+++ b/packages/eve/src/setup/integrations/registry.ts@@ -3,6 +3,7 @@ import { GITHUB_SETUP } from "./github/setup.js";import { LINEAR_SETUP } from "./linear/setup.js";import { LINQ_SETUP } from "./linq/setup.js";import { PHOTON_SETUP } from "./photon/setup.js";+import { SHOPIFY_SETUP } from "./shopify/setup.js";import { SLACK_SETUP } from "./slack/setup.js";import type { SetupIntegration } from "./types.js";import { WEB_SETUP } from "./web/setup.js";@@ -16,6 +17,7 @@ export const SETUP_INTEGRATIONS: readonly SetupIntegration[] = [LINEAR_SETUP,LINQ_SETUP,PHOTON_SETUP,+ SHOPIFY_SETUP,];/** Resolves one built-in setup integration by its registry setup name. */diff --git a/packages/eve/src/setup/integrations/shopify/setup.test.ts b/packages/eve/src/setup/integrations/shopify/setup.test.tsnew file mode 100644index 000000000..cbf0746d3--- /dev/null+++ b/packages/eve/src/setup/integrations/shopify/setup.test.ts@@ -0,0 +1,91 @@+import { describe, expect, it, vi } from "vitest";++import { createFakePrompter } from "#internal/testing/fake-prompter.js";+import { headlessAsker, InteractionRequired, withAnswers } from "#setup/ask.js";++import { integrationSetupEnvironment } from "../shared/environment.js";+import { createSetupContexts } from "../shared/ui.js";+import { applyShopifySetup, prepareShopifySetup, type ShopifySetupDeps } from "./setup.js";++function contexts(answers: Record<string, unknown>) {+ return createSetupContexts({+ appRoot: "/project",+ asker: withAnswers(answers)(headlessAsker()),+ environment: integrationSetupEnvironment("cli-missing", { kind: "unresolved" }),+ prompter: createFakePrompter().prompter,+ resolveVercelProject: vi.fn(async () => ({ orgId: "team", projectId: "project" })),+ });+}++function deps(): ShopifySetupDeps {+ return {+ appendEnv: vi.fn(async () => ({ written: [], skipped: [] })),+ writeTextFile: vi.fn(async () => {}),+ };+}++describe("Shopify setup", () => {+ it("requires the Shopify storefront domain", async () => {+ await expect(prepareShopifySetup(contexts({}).prepare)).rejects.toBeInstanceOf(+ InteractionRequired,+ );+ });++ it("strips the protocol and path from a storefront URL", async () => {+ const plan = await prepareShopifySetup(+ contexts({ "shopify.store-domain": "https://shop.example.com/products" }).prepare,+ );++ expect(plan.storeDomain).toBe("shop.example.com");+ });++ it("rejects an invalid storefront domain after normalization", async () => {+ await expect(+ prepareShopifySetup(contexts({ "shopify.store-domain": "https:///products" }).prepare),+ ).rejects.toThrow("Enter a valid Shopify storefront domain.");+ });++ it("writes the storefront environment and a UCP channel containing the anonymous profile", async () => {+ const effects = deps();+ const context = contexts({ "shopify.store-domain": " shop.example.com " });+ const plan = await prepareShopifySetup(context.prepare);++ await expect(applyShopifySetup(plan, context.apply, effects)).resolves.toEqual({+ deploymentRequired: true,+ facts: [{ label: "Store domain", value: "shop.example.com", kind: "text" }],+ });++ expect(effects.appendEnv).toHaveBeenCalledWith("/project/.env.local", {+ SHOPIFY_STORE_DOMAIN: "shop.example.com",+ });+ expect(effects.writeTextFile).toHaveBeenCalledOnce();+ expect(effects.writeTextFile).toHaveBeenCalledWith(+ "/project/agent/channels/ucp.ts",+ expect.stringContaining('"dev.ucp.shopping.cart"'),+ { force: undefined },+ );+ expect(effects.writeTextFile).toHaveBeenCalledWith(+ "/project/agent/channels/ucp.ts",+ expect.stringContaining('GET("/.well-known/ucp"'),+ { force: undefined },+ );+ expect(effects.writeTextFile).toHaveBeenCalledWith(+ "/project/agent/channels/ucp.ts",+ expect.stringContaining('"cache-control": "public, max-age=300"'),+ { force: undefined },+ );+ });++ it("does not advertise order support for anonymous traffic", async () => {+ const effects = deps();+ const context = contexts({ "shopify.store-domain": "shop.example.com" });++ await applyShopifySetup(await prepareShopifySetup(context.prepare), context.apply, effects);++ expect(effects.writeTextFile).toHaveBeenCalledWith(+ "/project/agent/channels/ucp.ts",+ expect.not.stringContaining("dev.ucp.shopping.order"),+ { force: undefined },+ );+ });+});diff --git a/packages/eve/src/setup/integrations/shopify/setup.ts b/packages/eve/src/setup/integrations/shopify/setup.tsnew file mode 100644index 000000000..4c9a2db90--- /dev/null+++ b/packages/eve/src/setup/integrations/shopify/setup.ts@@ -0,0 +1,91 @@+import { join } from "node:path";++import { appendEnv } from "#setup/append-env.js";+import { text } from "#setup/ask.js";+import { writeTextFile } from "#setup/scaffold/files.js";++import {+ defineSetupIntegration,+ type SetupApplyContext,+ type SetupPrepareContext,+} from "../types.js";+import { SHOPIFY_UCP_CHANNEL_TEMPLATE } from "./templates.js";++export interface ShopifySetupDeps {+ appendEnv: typeof appendEnv;+ writeTextFile: typeof writeTextFile;+}++const defaultDeps: ShopifySetupDeps = { appendEnv, writeTextFile };++export interface ShopifySetupPlan {+ storeDomain: string;+}++function normalizeStoreDomain(value: string): string {+ return value+ .trim()+ .replace(/^https?:\/\//i, "")+ .replace(/[/?#].*$/, "");+}++function validateStoreDomain(value: string): string | null {+ const domain = normalizeStoreDomain(value);+ try {+ const url = new URL(`https://${domain}`);+ return domain.length > 0 &&+ url.hostname.includes(".") &&+ !url.username &&+ !url.password &&+ !url.port+ ? null+ : "Enter a valid Shopify storefront domain.";+ } catch {+ return "Enter a valid Shopify storefront domain.";+ }+}++export async function prepareShopifySetup(context: SetupPrepareContext): Promise<ShopifySetupPlan> {+ const storeDomain = await context.asker.ask(+ text({+ key: "shopify.store-domain",+ message: "Shopify storefront domain",+ placeholder: "your-store.myshopify.com",+ required: true,+ validate: validateStoreDomain,+ }),+ );+ return { storeDomain: normalizeStoreDomain(storeDomain) };+}++export async function applyShopifySetup(+ plan: ShopifySetupPlan,+ context: SetupApplyContext,+ deps: ShopifySetupDeps = defaultDeps,+) {+ context.presenter.log.message("Scaffolding Shopify UCP channel and storefront environment...");+ await deps.appendEnv(join(context.appRoot, ".env.local"), {+ SHOPIFY_STORE_DOMAIN: plan.storeDomain,+ });+ await deps.writeTextFile(+ join(context.appRoot, "agent/channels/ucp.ts"),+ SHOPIFY_UCP_CHANNEL_TEMPLATE,+ { force: context.force },+ );+ context.presenter.log.success("Scaffolded channel: ucp");+ context.presenter.nextSteps([+ `Set SHOPIFY_STORE_DOMAIN in .env.local.`,+ "Shopify cannot reach localhost, so `eve dev` uses Shopify's example agent profile automatically. To test your own profile locally, expose the /.well-known/ucp route with a tool like ngrok.",+ ]);+ return {+ deploymentRequired: true as const,+ facts: [{ label: "Store domain", value: plan.storeDomain, kind: "text" as const }],+ };+}++export const SHOPIFY_SETUP = defineSetupIntegration({+ kind: "shopify",+ label: "Shopify",+ prepare: prepareShopifySetup,+ apply: applyShopifySetup,+});diff --git a/packages/eve/src/setup/integrations/shopify/templates.ts b/packages/eve/src/setup/integrations/shopify/templates.tsnew file mode 100644index 000000000..28254349c--- /dev/null+++ b/packages/eve/src/setup/integrations/shopify/templates.ts@@ -0,0 +1,88 @@+export const SHOPIFY_UCP_CHANNEL_TEMPLATE = `import { defineChannel, GET } from "eve/channels";++const profile = {+ ucp: {+ version: "2026-04-08",+ services: {+ "dev.ucp.shopping": [+ {+ version: "2026-04-08",+ spec: "https://ucp.dev/2026-04-08/specification/overview",+ transport: "mcp",+ schema: "https://ucp.dev/2026-04-08/services/shopping/mcp.openrpc.json",+ },+ ],+ },+ capabilities: {+ "dev.ucp.shopping.checkout": [{ version: "2026-04-08" }],+ "dev.ucp.shopping.fulfillment": [+ {+ version: "2026-04-08",+ extends: ["dev.ucp.shopping.checkout", "dev.ucp.shopping.cart"],+ },+ ],+ "dev.ucp.shopping.buyer_consent": [+ {+ version: "2026-04-08",+ extends: "dev.ucp.shopping.checkout",+ },+ ],+ "dev.ucp.shopping.discount": [+ {+ version: "2026-04-08",+ extends: ["dev.ucp.shopping.checkout", "dev.ucp.shopping.cart"],+ },+ ],+ "dev.ucp.shopping.cart": [+ {+ version: "2026-04-08",+ spec: "https://ucp.dev/2026-04-08/specification/cart",+ schema: "https://ucp.dev/2026-04-08/schemas/shopping/cart.json",+ },+ ],+ "dev.ucp.shopping.catalog.search": [+ {+ version: "2026-04-08",+ spec: "https://ucp.dev/2026-04-08/specification/catalog/search",+ schema: "https://ucp.dev/2026-04-08/schemas/shopping/catalog_search.json",+ },+ ],+ "dev.ucp.shopping.catalog.lookup": [+ {+ version: "2026-04-08",+ spec: "https://ucp.dev/2026-04-08/specification/catalog/lookup",+ schema: "https://ucp.dev/2026-04-08/schemas/shopping/catalog_lookup.json",+ },+ ],+ "dev.shopify.catalog": [+ {+ version: "2026-04-08",+ spec: "https://shopify.dev/docs/agents/catalog/storefront-catalog",+ schema: "https://shopify.dev/ucp/schemas/2026-04-08/shopify_catalog.json",+ extends: [+ "dev.ucp.shopping.catalog.lookup",+ "dev.ucp.shopping.catalog.search",+ ],+ },+ ],+ },+ payment_handlers: {},+ },+};++const body = JSON.stringify(profile);++export default defineChannel({+ cors: true,+ routes: [+ GET("/.well-known/ucp", async () => {+ return new Response(body, {+ headers: {+ "content-type": "application/json",+ "cache-control": "public, max-age=300",+ },+ });+ }),+ ],+});+`;