feat(connectors/shopify): first-class Shopify→USD primitives + MCP/HTTP-SSE + Temporal#15
Merged
Conversation
This was referenced Jun 25, 2026
…TP-SSE + Temporal Add @shoploop/connector-shopify: Shopify catalog → product_twin.usda primitives modeled on daslabhq/openusd-mcp. Four primitives over a single internal core (client.ts + usd/*): catalog ingest, MCP read/inspect/manipulate (7 tools over HTTP/SSE), brand-constrained scene composition, and webhook→Temporal (4 workflows, idempotent ids). CPU-only; render stays in open-imagine (contracts referenced, not vendored). 20 tests green (golden USDA, in-proc MCP, webhook HMAC). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ninan-versioning
force-pushed
the
jared-shoploop/shopify-connector-mcp
branch
from
June 26, 2026 05:58
758d4a6 to
34ab98b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First-class Shopify →
product_twin.usda→ Scene Composer connector atconnectors/shopify/(@shoploop/connector-shopify). MCP-shaped, modeled ondaslabhq/openusd-mcp+ Griptape Nodes' agent-callable USD pattern — not a thin RESTwrapper. CPU-only; render stays in
open-imagine.The 4 primitives (one internal core, no duplication)
All four are importable from
@shoploop/connector-shopify, callable from MCP, and triggerablefrom webhooks — over the same core (
client.tsAdmin GraphQL 2025-07 +usd/*emit/inspect/manipulate).ingestCatalog/shoploop-shopify ingest) — paginated Admin GraphQL →one
<handle>.usdaper product +_manifest.json(shopify_id ↔ usda_path). Shopify options →USD variant sets; real GLB/USDZ from
Model3dmedia when present, else placeholderdef Mesh;commerce/brand schema attrs (
commerce:price|sku|inventory|vendor,brand:tags,brand:rules_ref).shoploop-shopify mcp) — Express + HTTP/SSE on:8787(/sse,/messages),bearer auth (
SHOPLOOP_MCP_TOKEN), CORS allowlist. 7 tools:list_products,get_product,get_variants,get_metafields,update_metafield,inspect_product_twin(prim tree + variantsets + LLM text summary),
manipulate_variant_set(agent-driven stage edits).composeScene) — enforces Kinfolk brand rules at the USD layer; emits acomposed stage sublayering
[brand_rules, product_twin, scene_preset]. Does not render.POST /webhooks/shopify+shoploop-shopify worker) — HMAC-verified(
SHOPIFY_WEBHOOK_SECRET); 4 workflows:ReingestProductWorkflow,RecomposeCreativePackWorkflow,PurgeProductTwinWorkflow,UpdateCommerceAttrWorkflow. Idempotent workflow idshopify:<shop>:<topic>:<productId>:<updated_at>(REJECT_DUPLICATE).Contracts (referenced, not vendored)
// CONTRACT:pointers toopen-imagine/contracts/product_twin.v1.json(emitted.usdavalidatesagainst it) and
open-imagine/contracts/render_job.v1.json(render-job body POSTed toOPEN_IMAGINE_ROUTER_URL).Cost footprint (decision gate #5)
CPU-only. ~$13/mo at Varitea dogfood scale (~30 SKUs, ~100 webhook events/day):
1× t4g.small co-locating MCP + worker ≈ $12, Temporal Cloud dev tier $0, S3 for
.usda(~50 MB) <$1.At 100 brands ≈ $60/mo (Fargate + Temporal starter). No GPU here — that cost lives in
open-imagine.Varitea dogfood acceptance checklist
.usdaper product with variant sets matching Shopify options (variantSet "size"→_50g/_100g/_250g) — golden intest/fixtures/varitea_product_twin.usda.product_twin.v1contract.inspect_product_twinreturns a prim tree + text summary readable by Claude/Cursor.products/updatewebhook →ReingestProductWorkflow(+RecomposeCreativePackWorkflow),idempotent id; HMAC-verified.
commerce:generated_at) — asserted in tests.Testing
pnpm test→ 20 passing across 3 files:primitives.test.ts— ingest matches golden modulo timestamp; options→variant sets; placeholdervs real mesh; add/rename/remove variant;
composeScenesublayers + Kinfolk rules.mcp.test.ts— in-process MCP server (linked transport), all 7 tools, shape assertions.webhook.test.ts— HMAC verify (valid/tampered/wrong-secret/empty), idempotent id, signed POSTfans out to the mapped workflows, invalid signature → 401 starts nothing.
pnpm typecheckandpnpm buildclean.Decision gate
Spec excerpts (
/home/user/workspace/shopify-connector-spec.md)Boundaries respected
No render/image code (→
open-imagine), no Polaris/Remix embed app (→shoploop-shopify), noad-buying (→
shoploop-growth).shoploop-core/shoploop-shopifyuntouched. AWS-only path; no Vercel.🤖 Generated with Claude Code