demo: compose capability descriptors via metaDataUrl + ANS_DNSAID - #98
Open
sparkmastergrape wants to merge 1 commit into
Open
Conversation
Fixes agentnameservice#95 Signed-off-by: J. DiMare <jdimare@pm.me>
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.
Adds a small runnable demo showing that an ANS-registered agent can advertise arbitrary capabilities through the existing
AgentEndpoint.metaDataUrl, pinned withmetaDataHashand published as acaplocator byANS_DNSAID. Zero code, schema, or wire changes.Fixes #95
Addresses both points from the issue discussion
Runnable demo with a committed fixture, not a docs file —
scripts/demo/payable-endpoints/, with the example card committed astestdata/agent-card.json. As you noted, a hash printed against a live card breaks as soon as that card changes, and drift is indistinguishable from a legitimate new version. The demo asserts against the fixture, so the worked example stays verifiable over time;--livefetches the real descriptor and reports a mismatch without failing, with that ambiguity spelled out as the teaching point.Protocol-neutral framing — the README leads on
metaDataUrlcomposing capability descriptors generally. x402 appears only as the worked example, called out as the case people most often assume needs new protocol machinery.The expected SVCB row is recorded output, not a derivation
testdata/expected-svcb.txtwas captured by runningscripts/demo/start.shagainstmainatd8ed4bb, registering the endpoint, driving it toPENDING_DNS, and takingdns-records.sh --jsonverbatim:verify.shderivescap-sha256from the fixture and asserts it against that row, so if the emit path ininternal/adapter/discovery/ans/dnsaid.gochanges shape the demo fails rather than agreeing with its own arithmetic. Reproduction steps are in the README.Note that
register.shdoes not sendmetaDataHash, so the fixture was produced by POSTing/v2/ans/agentsdirectly.Run it
No running stack required — it asserts against the committed fixtures.
Per the
pay.agentsquestion — agreed, keeping that out of scope for its own discussion.AI assistance:
Assisted-by: Claude Code (claude-opus-5)