Skip to content

Fix/stateless client server#2

Open
ContextVM-org wants to merge 116 commits into
k0sti:mainfrom
ContextVM:fix/stateless-client-server
Open

Fix/stateless client server#2
ContextVM-org wants to merge 116 commits into
k0sti:mainfrom
ContextVM:fix/stateless-client-server

Conversation

@ContextVM-org
Copy link
Copy Markdown

Stateless clients were being rejected by the server because RMCP imposed the initialization lifecycle.

aphrodoe and others added 30 commits April 3, 2026 10:51
- 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.
…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.
harsh04044 and others added 30 commits April 30, 2026 17:44
…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.
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.
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants