Mechanical pass for the alkcall 0.5.0 bump (review 006 sequencing: ADR-049 → alkcall 0.5.0 → alkhttp mechanical pass): - bump alkcall 0.4 → 0.5 (gateway feature unchanged) - OpenableAlpn gains establisher: Option<OpenEstablisher> and establisher_timeout: Option<Duration> (both default None via OpenableAlpn::new — existing constructions compile unchanged) plus a with_establisher(establisher, timeout) builder - the install_channel_zero ferry calls register_openable_with_establisher, threading both fields through - docs updated (websocket.md, adapter.rs doc comments) The alkcall 0.5.0 open_channel error-type change (ADR-049 §4) needs no change here — this crate never calls open_channel (from_wss uses ChannelClient::from_connection only). Verification: cargo test (454 passed), cargo test --all-features (587 passed), cargo clippy --all-targets/-D warnings (default + all-features), cargo fmt --check
118 lines
4.6 KiB
TOML
118 lines
4.6 KiB
TOML
[package]
|
|
name = "alkhttp"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.85"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "HTTP interface for the alk stack: serves HTTP/1.1 + HTTP/2 on standard ALPNs (with WebSocket upgrade carrying the channels protocol) and hosts the HTTP-backed call-protocol adapters"
|
|
readme = "README.md"
|
|
repository = "https://git.alk.dev/alkdev/alkhttp"
|
|
keywords = ["http", "websocket", "rpc", "openapi", "mcp"]
|
|
categories = ["network-programming", "web-programming", "asynchronous"]
|
|
exclude = [".opencode/", "AGENTS.md", "docs/", "tasks/", "scripts/"]
|
|
|
|
[lib]
|
|
name = "alkhttp"
|
|
|
|
[features]
|
|
default = ["server", "client", "h2", "http1"]
|
|
# Producer side: the axum `Router` host (gateway routes, /healthz,
|
|
# /openapi.json, /mcp, the WS upgrade path) and the hyper connection
|
|
# driver. `openapi` rides along because /openapi.json is part of the
|
|
# default surface (ADR-042/045); `http1` rides along so the hyper
|
|
# auto-builder always has at least one protocol compiled.
|
|
server = ["dep:axum", "dep:hyper", "dep:hyper-util", "dep:uuid", "openapi", "http1"]
|
|
# Consumer side: the shared outbound client host and the HTTP-backed
|
|
# import adapters (`from_jsonschema`, `from_openapi` with `openapi`,
|
|
# `from_mcp` with `mcp`).
|
|
client = ["dep:arc-swap", "dep:httpdate", "dep:percent-encoding", "dep:reqwest", "dep:reqwest-middleware", "dep:reqwest-retry", "dep:url", "openapi"]
|
|
# Shared OpenAPI document model: `from_openapi` parsing (client side)
|
|
# and the `to_openapi` gateway projection (server side).
|
|
openapi = ["dep:yaml_serde"]
|
|
# MCP adapters: `from_mcp` needs `client`, `to_mcp` needs `server`.
|
|
mcp = ["dep:rmcp"]
|
|
# WebSocket transport (from_wss consumer; tungstenite flavor of the
|
|
# WS ↔ byte-stream adapter).
|
|
wss = ["dep:tokio-tungstenite"]
|
|
# Test-only WS client helpers (downstream deployment tests); implies
|
|
# `server` — the helpers live with the upgrade path.
|
|
test-support = ["server", "dep:tokio-tungstenite"]
|
|
# HTTP protocol features of the server connection driver (ADR-001).
|
|
h2 = ["server", "dep:hyper", "hyper-util/http2", "hyper/http2"]
|
|
http1 = ["server", "dep:hyper", "hyper-util/http1", "hyper/http1"]
|
|
|
|
[dependencies]
|
|
alkcall = { version = "0.5", features = ["gateway"] }
|
|
arc-swap = { version = "1", optional = true }
|
|
axum = { version = "0.8", optional = true, features = ["ws"] }
|
|
bytes = "1"
|
|
futures = "0.3"
|
|
http = "1"
|
|
httpdate = { version = "1", optional = true }
|
|
hyper = { version = "1", optional = true, features = ["server"] }
|
|
hyper-util = { version = "0.1", optional = true, features = ["server", "service", "tokio"] }
|
|
jsonschema = { version = "0.46", default-features = false }
|
|
parking_lot = "0.12"
|
|
percent-encoding = { version = "2", optional = true }
|
|
reqwest = { version = "0.13", optional = true, default-features = false, features = ["json", "stream", "rustls"] }
|
|
reqwest-middleware = { version = "0.5", optional = true }
|
|
reqwest-retry = { version = "0.9", optional = true }
|
|
tokio = { version = "1", features = ["macros", "rt-multi-thread", "io-util", "net", "fs", "time", "sync"] }
|
|
tokio-tungstenite = { version = "0.29", optional = true, default-features = false, features = ["connect", "rustls-tls-webpki-roots", "handshake"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
async-trait = "0.1"
|
|
tracing = "0.1"
|
|
thiserror = "2"
|
|
uuid = { version = "1", optional = true, features = ["v4"] }
|
|
url = { version = "2", optional = true }
|
|
yaml_serde = { version = "0.10", optional = true }
|
|
rmcp = { version = "1.8", optional = true, default-features = false, features = [
|
|
"client",
|
|
"server",
|
|
"transport-streamable-http-client-reqwest",
|
|
"transport-streamable-http-server",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
http-body-util = "0.1"
|
|
tower = { version = "0.5", features = ["util"] }
|
|
tokio-tungstenite = { version = "0.29", default-features = false, features = ["connect"] }
|
|
openapiv3 = "2"
|
|
rcgen = "0.14"
|
|
tokio-rustls = "0.26"
|
|
rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "std", "tls12"] }
|
|
rustls-pki-types = "1"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
[[test]]
|
|
name = "ws_upgrade_session"
|
|
required-features = ["test-support"]
|
|
|
|
[[test]]
|
|
name = "ws_overlay_ops"
|
|
required-features = ["test-support"]
|
|
|
|
[[test]]
|
|
name = "from_mcp_integration"
|
|
required-features = ["server", "client", "mcp"]
|
|
|
|
[[test]]
|
|
name = "full_surface"
|
|
required-features = ["server", "client", "openapi", "mcp", "test-support"]
|
|
|
|
[[test]]
|
|
name = "client_config_reload"
|
|
required-features = ["client"]
|
|
|
|
[[test]]
|
|
name = "client_tls"
|
|
required-features = ["client"]
|
|
|
|
[[test]]
|
|
name = "retry_after_budget"
|
|
required-features = ["client"]
|
|
|
|
[[test]]
|
|
name = "retry_policy_wire"
|
|
required-features = ["client"] |