Skip to content

fix(nodejs): align discovery profile registries#123

Open
ShuoRen-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:agent/fix-node-discovery-profile-shape
Open

fix(nodejs): align discovery profile registries#123
ShuoRen-TT wants to merge 1 commit 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

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
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!

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

Labels

status:needs-triage Signal that the PR is ready for human triage

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)

2 participants