fix(discovery): full upstream OpenAPI + per-origin agent-registration#777
Open
bussyjd wants to merge 1 commit into
Open
fix(discovery): full upstream OpenAPI + per-origin agent-registration#777bussyjd wants to merge 1 commit into
bussyjd wants to merge 1 commit into
Conversation
Hostname-bound offers previously advertised a thin route-table OpenAPI (under-selling multi-route products like hl-intel) and fell through to the cluster-global AgentIdentity mega-doc for /.well-known/agent-registration.json (registration bleed across origins). - Prefer full upstream OAS (/v1/openapi.json) in host openapi.json bundles (x402scan OpenAPI-first; see Merit-Systems/x402scan docs/DISCOVERY.md) - Expand /.well-known/x402 paid resources from that OAS when available - Publish single-offer ERC-8004 agent-registration.json per dedicated origin and Exact-route it so it wins over the global well-known route Live-verified on hyperliquid-data (96 paths, 88 x402 resources, no bleed) and hyperliquid-analyst (HyperAnalyst identity only).
bussyjd
added a commit
that referenced
this pull request
Jul 16, 2026
…/v0.14.0-rc0 Resolved with #767 hostRouteRules + chat widget: keep hostRouteRules helper, add /.well-known/agent-registration.json as fourth discovery Exact rule, and retain both chat-widget and upstream-OpenAPI test suites.
Contributor
Author
|
Merged into |
OisinKyne
approved these changes
Jul 16, 2026
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.
Summary
Fixes two related production issues on dedicated offer origins (validated against x402scan DISCOVERY.md):
/openapi.jsonwas a thin route-table doc (often ~8 free paths). x402scan is OpenAPI-first at/openapi.json, so multi-route products (e.g. hl-intel, 95+ paths) were under-indexed./.well-known/agent-registration.jsonhad no host-scoped route, so every origin returned the cluster-global AgentIdentity mega-doc (Hyperliquid-data + solar + predictfun + …).Changes
GET /openapi.json(hostname)/v1/openapi.jsonor metadataopenapiPath)GET /.well-known/x402x-payment-info/ 402 opsGET /.well-known/agent-registration.jsonImplementation
upstream_openapi.go— fetch + rewrite servers + x402 fan-out + per-offer registrationbuildOfferBundles— prefer upstream OAS; always emitagent-registration.jsonbuildHostHTTPRoute— Exact match for/.well-known/agent-registration.json(wins over global AgentIdentity route)Live verification (silvernuc3)
Free samples still 200; paid leaderboard still 402.
Test plan
go test ./internal/serviceoffercontroller/Related: discovery completeness + registration bleed from Hyperliquid health review.