Files
alkhttp/src/adapters/mod.rs
T
glm-5.3-flash 3a906cbd6a feat(adapters): from_wss consumer adapter behind the wss feature (ADR-070)
- FromWss: dial wss:// -> split_tungstenite_to_bytes (client-side twin
  of the axum WS byte-adapter; one seam, both directions, OQ-01) ->
  Connection::from_bidi(b"alk/channels") -> alkcall ChannelClient
  (channel 0 install + dispatch loop) -> alkcall from_call importer.
  No protocol fork: specs mirror the remote, provenance FromCall.
- Drop semantics (OQ-03 v1): session drop -> monitor fails all
  in-flight pendings retryable CONNECTION_CLOSED (WsPumps::read_eof
  Notify); no 30s-deadline hang.
- Bearer token via constructor/assembly layer (ADR-014 no-env-vars).

Production fix in the WS server half (upgrade.rs): the upgrade
identity now propagates to channel 0's CallConnection (was
AuthContext::anonymous -> dispatcher saw no identity, ACL checks ran
unauthenticated; services/list filtered scoped ops for all callers).

9 in-module tests incl. full round-trip consumer<->server (both halves
of the adapter together), ACL end-to-end, drop-no-hang.

Verified: cargo test (227 lib default), --all-features (227 lib + 5
MCP + 10 WS integration), clippy -D warnings (both), fmt.
2026-08-28 14:54:09 +00:00

31 lines
864 B
Rust

//! HTTP-backed call-protocol adapters: `from_openapi` / `from_jsonschema`
//! (import external HTTP APIs as operations), `to_openapi` / `to_mcp`
//! (project local operations onto HTTP surfaces), `from_mcp`, and
//! `from_wss` (feature `wss`).
pub mod forward;
pub mod from_jsonschema;
pub mod from_openapi;
pub mod openapi_spec;
pub mod to_openapi;
#[cfg(feature = "mcp")]
pub mod from_mcp;
#[cfg(feature = "wss")]
pub mod from_wss;
#[cfg(feature = "mcp")]
pub mod to_mcp;
pub use forward::{HttpAuthScheme, HttpServiceConfig};
pub use from_jsonschema::FromJsonSchema;
pub use from_openapi::FromOpenAPI;
pub use openapi_spec::OpenAPISpec;
pub use to_openapi::to_openapi;
#[cfg(feature = "mcp")]
pub use from_mcp::FromMCP;
#[cfg(feature = "wss")]
pub use from_wss::FromWss;
#[cfg(feature = "mcp")]
pub use to_mcp::{to_mcp_service, ToMcpGateway, ToMcpService};