Skip to content

feat: add UCP JavaScript SDK#39

Open
artemii-karkusha wants to merge 1 commit intosourcemeta:masterfrom
artemii-karkusha:add-ucp-js-sdk
Open

feat: add UCP JavaScript SDK#39
artemii-karkusha wants to merge 1 commit intosourcemeta:masterfrom
artemii-karkusha:add-ucp-js-sdk

Conversation

@artemii-karkusha
Copy link
Copy Markdown

@artemii-karkusha artemii-karkusha commented Mar 31, 2026

Adds the UCP JavaScript SDK as a tool entry in data.yaml.

What it is

The official JavaScript/TypeScript SDK for the Universal Commerce Protocol — runtime-validated Zod schemas auto-generated from the UCP JSON Schema spec (Draft 2020-12).

Coverage:

  • 100 schemas auto-generated from the UCP JSON Schema spec
  • Checkout, orders, payments, payment handlers, fulfillment
  • Discovery profiles (platform & business), identity linking, catalog, cart
  • All inline enums as standalone named exports

Features:

  • Runtime validation via Zod.parse() and .safeParse()
  • Uses $RefParser to fully dereference and bundle JSON Schema $refs
  • Dual ESM/CJS build
  • Available on npm as @omnixhq/ucp-js-sdk

Why it belongs here

A real-world production example of tooling built on JSON Schema Draft 2020-12 — the full UCP spec is defined in JSON Schema and this SDK auto-generates TypeScript validators from it.

@jviotti
Copy link
Copy Markdown
Member

jviotti commented Apr 1, 2026

Hey @artemii-karkusha ,

I'm a bit confused about this one. The tagline of the repo says "Runtime-validated Zod schemas and TypeScript types for the Universal Commerce Protocol (UCP)", so not JSON Schema? Even though then it says "100 schemas including checkout, orders, payments, fulfillment, discovery profiles, and all inline enums"?

Is there a way you can keep the JSON Schemas you generate in git?

Asking because I wonder if it makes more sense to be showcased as a JSON Schema collection in https://schemas.sourcemeta.com.

Or if it is mostly a library, might be worth submitting it to https://json-schema.org/tools. That page is a more comprehensive tooling page and we try to not compete with it by not listing tooling in this repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants