Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
`payment_interaction` tag when it did not itself request `explicit_gating`, since such
a tag is a server availability advertisement rather than this session's negotiated
mode.
- A targeted server response sender: `send_targeted_response` publishes a JSON-RPC
response to a specific client and request event without consuming the request's
correlation route, so a transport-level gate can answer a request without ending
it. It composes the same tags every other server response carries (discovery
replay on the first response, the CEP-8 effective-mode disclosure, and `cap`
pricing on capability-list results), mirrors the inbound gift-wrap kind, and
no-ops with a warning when the client has no session. `targeted_response_sender`
returns the same publish as an injectable closure for callers that have no
`&self`, such as a detached middleware. That closure captures the announcement
tag sets when it is built, so build it after those tags are set.
Both `send_targeted_response` and the `TargetedResponseSender` alias are
re-exported from `contextvm_sdk::transport`.

### Fixed

Expand All @@ -39,6 +51,10 @@

### Changed

- The server transport's two response paths (the normal path and the CEP-41 deferred
stream path) now compose their outbound tags through a single shared function
instead of each writing the same routing, discovery, disclosure and pricing policy
by hand. Internal refactor with no behavior or wire-format change.
- **Breaking:** `ClientSession` and `SessionSnapshot` are now `#[non_exhaustive]`. Both
gain fields as new CEPs land (CEP-8 adds three to each), so downstream code must
construct `ClientSession` via `ClientSession::new` and destructure either struct with
Expand Down
4 changes: 3 additions & 1 deletion src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ pub use open_stream::{
OpenStreamConfig, OpenStreamError, OpenStreamFrame, OpenStreamRegistry,
OpenStreamRegistryPolicy, OpenStreamSession, OpenStreamWriter,
};
pub use server::{NostrServerTransport, NostrServerTransportConfig, ServerEventRouteStore};
pub use server::{
NostrServerTransport, NostrServerTransportConfig, ServerEventRouteStore, TargetedResponseSender,
};
Loading
Loading