Fix/stateless client server#2
Open
ContextVM-org wants to merge 116 commits into
Open
Conversation
- Replace manual Default impl for EncryptionMode with #[derive(Default)] - Remove unused Instant import from server.rs - Rename is_public_server → is_announced_server to match TS SDK (cd7f411) - Update hardcoded protocol version to 2025-07-02 - Update examples, README, and DESIGN.md accordingly
- Add EPHEMERAL_GIFT_WRAP_KIND (21059) for CEP-19 - Add RELAY_LIST_METADATA_KIND (10002) for CEP-17 - Add tags: RELAY, SUPPORT_ENCRYPTION_EPHEMERAL - Add DEFAULT_BOOTSTRAP_RELAY_URLS matching TS SDK - Add DEFAULT_LRU_SIZE, DEFAULT_TIMEOUT_MS - Add INITIALIZE_METHOD, NOTIFICATIONS_INITIALIZED_METHOD - Add 11 unit tests verifying values against spec and NIP-01 kind ranges
- Update base transport to subscribe to both kind 1059 and 21059 - Handle kind 21059 in both client and server transport event loops - Advertise support_encryption_ephemeral tag in server announcements - Clean up unused imports in base.rs and client.rs tests
- Update gift wrap subscription to use since:now() per CEP-4 - Add rmcp v1.3.0 dependency - Use ProtocolVersion::LATEST in emulated client handshake and tests
- Implement discover_*_typed methods to parse Nostr discovery events into rmcp models - Add NostrMCPProxy::serve_client_handler to support rmcp client handler integration - Add parse_typed_list internal helper for discovery result deserialization
Adds an integration test matrix for RMCP transport, covering local, hybrid, and full relay-based communication scenarios.
…at and file paths
…licate constant - Remove KIND_GIFT_WRAP (duplicate of GIFT_WRAP_KIND); update usage in encryption tests - Remove orphaned doc comment that was attached to the wrong item (DEFAULT_LRU_SIZE) - Promote 6 const-value range assertions from runtime tests to a compile-time const block cargo clippy --all-targets now reports 0 warnings. All 101 tests pass.
…foundation for CEP-35
… emission and capability learning
…ty learning for CEP-35 (#57)
…d discovery tag emission
… pending-request leak
…rvices Introduce direct rmcp adapter entrypoints over the raw Nostr transports so native ContextVM servers and clients can follow the expected transport-first serve flow.
…acity clamp, rmcp feature gate
Remove NostrServerRmcpTransport and NostrClientRmcpTransport wrapper types, implementing IntoTransport directly on the raw Nostr transports instead. This simplifies the API by eliminating the redundant .into_rmcp_transport() call and reducing indirection in the transport layer.
Refactored native_echo_client and native_echo_server examples to use the builder pattern (with_*) instead of struct literal syntax for NostrClientTransportConfig and NostrServerTransportConfig initialization. This provides a more fluent and consistent API for configuring transport options.
…ubscriber from library
…to worker Moves the synthetic initialize/initialized message injection logic from the NostrServerTransport to the NostrServerWorker. This better separates concerns by having the rmcp layer handle MCP protocol lifecycle while the transport layer focuses on Nostr-specific communication. Also adds a HashSet to track initialized clients per pubkey for proper bootstrap injection.
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.
Stateless clients were being rejected by the server because RMCP imposed the initialization lifecycle.
initializefor first stateless inbound request insrc/transport/server/mod.rsnotifications/initializedinside the rmcp worker bridgesrc/rmcp_transport/worker.rssrc/rmcp_transport/worker.rssrc/rmcp_transport/pipeline_tests.rs