feat(http): initialize alknet-http crate with module skeleton
Add crates/alknet-http with Cargo.toml, src/lib.rs, and the five subsystem modules (server, gateway, client, adapters, websocket) per ADR-039 (server + client host colocated). The mcp feature gate pulls in rmcp with streamable HTTP transport features only (ADR-037 — no stdio); h3/WebTransport is absent (deferred per ADR-044). alknet-core and alknet-call use workspace path deps. The crate is added to the workspace members list.
This commit is contained in:
11
crates/alknet-http/src/adapters/mod.rs
Normal file
11
crates/alknet-http/src/adapters/mod.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
//! HTTP-backed call-protocol adapters: `from_openapi`, `to_openapi`,
|
||||
//! `from_mcp`, `to_mcp`.
|
||||
//!
|
||||
//! `from_openapi`/`from_mcp` are the no-env-vars credential injection point
|
||||
//! (ADR-014); `to_openapi`/`to_mcp` are projections of the local registry
|
||||
//! (ADR-017). `from_mcp`/`to_mcp` are feature-gated behind `mcp`
|
||||
//! (streamable HTTP only — ADR-037). See
|
||||
//! `docs/architecture/crates/http/http-adapters.md` and
|
||||
//! `docs/architecture/crates/http/http-mcp.md`.
|
||||
|
||||
// TODO: implement
|
||||
6
crates/alknet-http/src/client/mod.rs
Normal file
6
crates/alknet-http/src/client/mod.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
//! Shared HTTP client (`ClientWithMiddleware`): reqwest + retry middleware
|
||||
//! stack, used by `from_openapi`/`from_mcp` forwarding handlers.
|
||||
//!
|
||||
//! See `docs/architecture/crates/http/http-adapters.md` and OQ-40.
|
||||
|
||||
// TODO: implement
|
||||
7
crates/alknet-http/src/gateway/mod.rs
Normal file
7
crates/alknet-http/src/gateway/mod.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! Gateway: shared dispatch spine (`GatewayDispatch`) and error mapping.
|
||||
//!
|
||||
//! The 5 fixed gateway endpoints (`/search`, `/schema`, `/call`, `/batch`,
|
||||
//! `/subscribe`) are the sole HTTP invoke path (ADR-042/047). See
|
||||
//! `docs/architecture/crates/http/http-server.md`.
|
||||
|
||||
// TODO: implement
|
||||
13
crates/alknet-http/src/lib.rs
Normal file
13
crates/alknet-http/src/lib.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
//! alknet-http: HTTP interface for alknet — serves HTTP/1.1 + HTTP/2 on
|
||||
//! standard ALPNs (with WebSocket upgrade for browser bidirectional access)
|
||||
//! and hosts the HTTP-backed call-protocol adapters.
|
||||
//!
|
||||
//! Two roles in one crate (ADR-039): HTTP server (HttpAdapter, a
|
||||
//! ProtocolHandler for h2/http1.1 + WS upgrade) and HTTP client host
|
||||
//! (from_openapi/from_mcp forwarding, to_openapi/to_mcp projections).
|
||||
|
||||
pub mod adapters;
|
||||
pub mod client;
|
||||
pub mod gateway;
|
||||
pub mod server;
|
||||
pub mod websocket;
|
||||
9
crates/alknet-http/src/server/mod.rs
Normal file
9
crates/alknet-http/src/server/mod.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
//! HTTP server: `HttpAdapter`, axum-over-QUIC, gateway routes, `/healthz`,
|
||||
//! decoy, and custom routes.
|
||||
//!
|
||||
//! Implements `alknet_core::types::ProtocolHandler` for the standard HTTP
|
||||
//! ALPNs (`h2`, `http/1.1`) with WebSocket upgrade for browser
|
||||
//! bidirectional access (ADR-044). See
|
||||
//! `docs/architecture/crates/http/http-server.md`.
|
||||
|
||||
// TODO: implement
|
||||
7
crates/alknet-http/src/websocket/mod.rs
Normal file
7
crates/alknet-http/src/websocket/mod.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! WebSocket upgrade handler, framing, and dispatch handoff.
|
||||
//!
|
||||
//! WebSocket is the browser bidirectional path (ADR-044) and carries the
|
||||
//! native `EventEnvelope` call-protocol session, not the gateway shape
|
||||
//! (ADR-048). See `docs/architecture/crates/http/websocket.md`.
|
||||
|
||||
// TODO: implement
|
||||
Reference in New Issue
Block a user