feat(transport): ensure CEP-15 schemaHash consistency in announcement…#42
feat(transport): ensure CEP-15 schemaHash consistency in announcement…#42sagar-h007 wants to merge 1 commit intoContextVM:masterfrom
Conversation
|
Hi @sagar-h007, thanks for working on this. I took a closer look, and PR #38 already updates the announcement path as well, so the I also noticed this PR copies the schema helper files again under I think the remaining CEP-15 follow-up after PR #38 is the outer |
|
Hey @sagar-h007 I'm closing this pr in favour of #38 hope that's ok for you. We can continue the work and discussion there. Thanks |
CEP-15: Ensure schemaHash consistency in announcement events (kind:11317)
Problem
CEP-15 uses schemaHash so clients can recognize when two tools are actually the same across different providers. For that to work, the hash has to be consistent no matter how the tool is discovered.
Right now, direct
tools/listresponses already includeschemaHash(from PR #38), but announcement events (kind:11317) don’t. That means a client discovering a tool via relay announcements won’t see the same metadata as when it fetches the tool directly. As a result, it can’t reliably match or deduplicate tools across providers, which defeats the purpose ofschema-basedinteroperability.Solution
This PR fixes that gap by making announcement events consistent with direct responses. Inside
publishAnnouncementEvent(), it reuses the existing helper from PR #37 to enrichtools/listresults with schemaHash before serializing them. A schema check ensures this only applies totools/listpayloads, so other announcement types remain unchanged.Why this matters
After this change, both discovery paths produce the same
schemaHash, so clients can reliably compare tools regardless of how they were discovered. This makes CEP-15 actually usable in practice, enabling proper deduplication and smoother provider switching.