Add Link response headers for agent discovery (RFC 8288)#2442
Closed
kaankacar wants to merge 2 commits into
Closed
Add Link response headers for agent discovery (RFC 8288)#2442kaankacar wants to merge 2 commits into
kaankacar wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds standardized discovery metadata to developers.stellar.org so automated clients (AI agents, tooling) can find machine-readable API descriptions and documentation via RFC 8288 Link headers and an API catalog linkset.
Changes:
- Add multiple RFC 8288
Linkresponse headers (service descriptions/docs, API catalog,/llms.txt) from nginx. - Add
/.well-known/api-catalogas an RFC 9264 JSON linkset listing the major Stellar-related APIs and their specs/docs. - Publish bundled OpenAPI specs at stable
/openapi/*URLs (Horizon, Anchor Platform, Stellar Disbursement Platform).
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| nginx/nginx.conf | Emits Link headers for discovery and serves /.well-known/api-catalog as application/linkset+json. |
| static/.well-known/api-catalog | Adds a machine-readable API catalog (JSON linkset) pointing to specs and human docs. |
| static/openapi/horizon.yml | Publishes Horizon OpenAPI bundle at a stable URL for service-desc. |
| static/openapi/anchor-platform.yaml | Publishes Anchor Platform OpenAPI bundle at a stable URL for service-desc. |
| static/openapi/stellar-disbursement-platform.yaml | Publishes SDP OpenAPI bundle at a stable URL for service-desc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
17
to
+30
| location / { | ||
| rewrite ^/(.*)/$ /$1 permanent; | ||
| try_files $uri $uri.html $uri/index.html =404; | ||
|
|
||
| add_header Link "</.well-known/api-catalog>; rel=\"api-catalog\"; type=\"application/linkset+json\"" always; | ||
| add_header Link "</openapi/horizon.yml>; rel=\"service-desc\"; type=\"application/yaml\"; title=\"Horizon OpenAPI\"" always; | ||
| add_header Link "</openapi/anchor-platform.yaml>; rel=\"service-desc\"; type=\"application/yaml\"; title=\"Anchor Platform OpenAPI\"" always; | ||
| add_header Link "</openapi/stellar-disbursement-platform.yaml>; rel=\"service-desc\"; type=\"application/yaml\"; title=\"Stellar Disbursement Platform OpenAPI\"" always; | ||
| add_header Link "</stellar-rpc.openrpc.json>; rel=\"service-desc\"; type=\"application/json\"; title=\"Stellar RPC OpenRPC\"" always; | ||
| add_header Link "</docs/data/apis/horizon/api-reference>; rel=\"service-doc\"; title=\"Horizon API reference\"" always; | ||
| add_header Link "</docs/data/apis/rpc/api-reference>; rel=\"service-doc\"; title=\"Stellar RPC API reference\"" always; | ||
| add_header Link "</docs/platforms/anchor-platform/api-reference>; rel=\"service-doc\"; title=\"Anchor Platform API reference\"" always; | ||
| add_header Link "</docs/platforms/stellar-disbursement-platform/api-reference>; rel=\"service-doc\"; title=\"Stellar Disbursement Platform API reference\"" always; | ||
| add_header Link "</llms.txt>; rel=\"describedby\"; type=\"text/plain\"; title=\"LLM-friendly site description\"" always; |
| type: string | ||
| description: The memo type of the transaction in the Stellar network. Should be present if memo is not null. | ||
| enum: | ||
| - text id hash |
Comment on lines
+58
to
+60
| description: |- | ||
| Specifies order. Note, that when the field is null, all transactions with null value will be last, regardless of soring order (NULLS LAST). | ||
| For example, transfer time may not be specified for some transactions, resulting into `transfer_received_at` being null. If so, transactions with non-null values will be sorted and returned first, followed by all transactions with null timestamps. |
Comment on lines
+63
to
+65
| There are two parts to the registration flow. First, the wallet must authenticate and initiate a registration flow using the Anchor Platform Endpoints defined below. Note that these endpoints are hosted on a different host than the Stellar Disursement Platform. | ||
|
|
||
| The second part of the registration flow is handled by the webview that is opened within the wallet application. This webview uses the endpoints defined in the Stellar Disbursement Platfrom Endpoints section to complete the registration process. The wallet application can chose not to use the webview and intstead integrate directly with the API. |
| post: | ||
| tags: | ||
| - Authentication | ||
| summary: Reset Rassword |
Comment on lines
+910
to
+912
| message: File uploaded succesfully | ||
| example: | ||
| message: File uploaded succesfully |
|
Preview is available here: |
Collaborator
Author
|
Closing since this PR heavily overlaps with #2440 |
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.
Closes #2441.
Makes
developers.stellar.orgdiscoverable to AI agents and other automated clients via standard HTTP link relations (RFC 8288) and an API catalog (RFC 9727).Changes
nginx/nginx.conf: emits 10Linkheaders on/, covering all four Stellar APIs (Horizon, Stellar RPC, Anchor Platform, SDP) withrel="service-desc",rel="service-doc",rel="api-catalog", andrel="describedby"for/llms.txt. Headers live insidelocation /because nginxadd_headerinheritance is shadowed by inner location blocks.static/.well-known/api-catalog: RFC 9264 linkset (served asapplication/linkset+json) listing all four APIs with their service descriptions and human docs in one machine-readable document.static/openapi/{horizon.yml,anchor-platform.yaml,stellar-disbursement-platform.yaml}: raw OpenAPI bundles published at stable URLs so each API has aservice-desctarget (previously only Stellar RPC's OpenRPC spec was served).