Skip to content

fix(nodejs): align discovery profile registries#123

Merged
damaz91 merged 2 commits into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:agent/fix-node-discovery-profile-shape
Jul 15, 2026
Merged

fix(nodejs): align discovery profile registries#123
damaz91 merged 2 commits into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:agent/fix-node-discovery-profile-shape

Conversation

@ShuoRen-TT

@ShuoRen-TT ShuoRen-TT commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • represent ucp.services["dev.ucp.shopping"] as an array of transport bindings
  • represent ucp.capabilities as a reverse-domain keyed registry whose values are declaration arrays
  • add a Hono regression test for the discovery response shape and an npm test script

Why

The Node.js sample was still emitting the legacy generated discovery shape: a capability array and a service object containing a nested rest property. Both the UCP 2026-01-23 schema and current profile examples require keyed capability registries and service-binding arrays.

This caused schema-validating clients to reject the Node sample's /.well-known/ucp response and made it inconsistent with other UCP samples.

Validation

  • npm test
  • changed-file TypeScript type check for discovery.ts and discovery.test.ts
  • Prettier, codespell, JSON, whitespace, and private-key checks

The repository-wide npm run build still reports existing strict TypeScript errors in unrelated checkout.ts, order.ts, and testing.ts code. The changed-file type check passes.

Closes #114

@ShuoRen-TT

Copy link
Copy Markdown
Contributor Author

Hi @damaz91 @carolinerg1, could I ask for a quick triage of this Node.js sample fix?

It closes #114, includes a focused regression test, and I have rechecked that it merges cleanly with the current main branch.

This and #125 are two independently scoped fixes needed to restore a clean rest/nodejs build. #126 is the follow-up CI gate and will remain deferred until both fixes land.

The fork-triggered Lint, Conventional Commits, and security workflows are currently marked action_required, so they also need maintainer approval before the checks can run.

Thank you!

@damaz91 damaz91 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 15, 2026
@damaz91
damaz91 self-requested a review July 15, 2026 10:37
@damaz91

damaz91 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This LGTM @ShuoRen-TT - thanks!

@damaz91
damaz91 merged commit af01203 into Universal-Commerce-Protocol:main Jul 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Node.js sample: /.well-known/ucp capabilities is an array (should be a keyed object) and services.<name> is an object (should be an array)

3 participants