feat(transport): route notifications/resources/updated to subscribed clients#48
feat(transport): route notifications/resources/updated to subscribed clients#48DevAnuragT wants to merge 1 commit intoContextVM:masterfrom
Conversation
|
It looks like the CI hit the same |
|
@DevAnuragT I have made a specifed PR for the corresponding issue - falky behaviour of the test runs. Can you try to run the tests again once it gets merged to verify the fix. Thanks! |
yeah sure, I'll keep an eye on it. |
d5ae7b4 to
8eb247c
Compare
Fixes #45
Description
This PR properly routes
notifications/resources/updatednotifications to only the specific clients that have actively subscribed to those resources, replacing the previous fallback behavior that broadcasted these notifications to all initialized sessions.This completes the missing handler tracking mentioned in the TODO comment in
nostr-server-transport.ts.Changes Made
resourceSubscriptionsMap toNostrServerTransportmapping resource URIs to the set of subscribed client public keys.handleIncomingRequestnow hooks intoresources/subscribeandresources/unsubscribeMCP method names to securely track intent.notifications/resources/updatednotification, the transport reads theuriand relays it specifically to the subscribed clients.constants.ts.Testing Performed
nostr-server-transportwhich passed successfully.