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
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
# Changelog

All notable changes to this project will be documented in this file.
## [2.0.0-alpha.1] - 2026-07-25

Makes the schema/handler/MCP machinery transport-agnostic. The wire protocols are
unchanged — legacy `{method, seq, params}` frames and MCP JSON-RPC are byte-identical
to 1.9, so deployed frontends need no changes.

See `docs/2.0-migration.md` for the per-symbol migration table.

### Breaking

- `WsMessage` is no longer a re-export of `tungstenite::Message`; the canonical type is
`WireMessage`. The `WsMessage` alias covers type positions but NOT tungstenite's
inherent methods (`.into_text()`, `.into_data()`).
- `WsConnection.address: SocketAddr` replaced by `WsConnection.peer: PeerIdentity`. A
`#[deprecated]` `address()` accessor returns a loopback placeholder for local peers.
- `WsStream` trait renamed to `MessageStream` (alias retained).
- `Type`, `Field`, `EnumVariant`, `EndpointSchema` and `EndpointErrorSchema` are now
`#[non_exhaustive]`: out-of-crate matches need a wildcard arm, and construction goes
through `::new()` + `with_*` rather than struct literals.

### Features

- Transport seam: `Transport` (blanket Sink+Stream alias), `TransportStream`,
`serve_connection`, `serve_with`, `SessionListener`, `WsClient::from_stream`.
- `framed-transport` feature: `framed_json()` — length-delimited `WireMessage` framing
over any byte stream, with a documented wire format for non-Rust peers.
- Hooks: `BeforeRequest`, `AfterRequest`, `OnConnect`, active on both the legacy and
MCP dispatch paths.
- `PeerIdentity` / `LocalPeer` / `Attestation` carry verified peer code identity into
handlers and logs.
- `Extensions`, a type-keyed map on connections and requests.
- `Field.meta` / `EndpointSchema.meta`: reserved, empty, and the reason OpenAPI and
AsyncAPI emission can ship as a 2.1 minor rather than a 3.0.
- `examples/uds_echo.rs`: the endpoint machinery over a Unix socket, no TCP/TLS/HTTP.

### Notes

- `cargo test --all-features` cannot pass (`ws` and `ws-wtx` are mutually exclusive by
`compile_error!`). Use `cargo all-features test`, which CI runs.
- The deprecated `ws-wtx` backend is untouched and still does not build.
- `WsClient::from_stream` currently requires the `ws-client` feature, which pulls
tungstenite. Narrowing that is additive and deferred.

## [1.9.1] - 2026-07-18

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "endpoint-libs"
version = "1.9.1"
version = "2.0.0-alpha.1"
edition = "2024"
authors = ["Veon <dveonloch@protonmail.com>"]
description = "Common dependencies to be used with Pathscale projects, projects that use [endpoint-gen](https://github.com/pathscale/endpoint-gen), and projects that use honey_id-types."
Expand Down Expand Up @@ -33,6 +33,12 @@ ws-core = [
"dep:httpdate",
"dep:crossfire",
]
framed-transport = [
# Length-delimited WireMessage framing over any byte stream (Unix sockets,
# named pipes, inherited socketpairs). No WebSocket, no TLS, no HTTP.
"ws-core",
"dep:tokio-util",
]
ws-client = [
# WS client (WsClient, WsClientBuilder) - standalone
"ws-core",
Expand Down Expand Up @@ -199,6 +205,11 @@ uuid = { version = "1", features = ["v4", "serde"] }
rcgen = "0.14"
cert-provider = {git = "https://github.com/dVeon-loch/cert-provider.git", features = ["dns01"]}

[[example]]
name = "uds_echo"
path = "examples/uds_echo.rs"
required-features = ["full", "framed-transport", "ws-client"]

[[example]]
name = "mcp_echo"
required-features = ["ws-http1"]
Expand Down
Loading
Loading