feat(tty): initialize alknet-tty crate skeleton

Create crates/alknet-tty with Cargo.toml (alknet-core path dep, tokio,
bytes, futures-core, tokio-stream, serde, serde_json, async-trait,
tracing, thiserror — no portable_pty/bollard/russh/alknet-call per
ADR-057), the `local` feature gate (dep wiring deferred to
tty/local-feature-reexport), src/lib.rs with the crate doc comment and
module declarations, and skeleton modules (wire, control, negotiation,
backend, adapter) with doc comments and TODO markers. Add the crate to
the workspace members list.

cargo check, clippy -D warnings, and fmt --check all pass.
This commit is contained in:
glm-5.2 committed 2026-07-07 13:46:11 +00:00
1 parent 8d20f89902
commit da6333c206
9 files changed
+76

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
[package]
name = "alknet-tty"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Terminal session protocol handler for the `alknet/tty` ALPN: wire format, TtyBackend trait, and TtyAdapter (ProtocolHandler)"
repository.workspace = true
[lib]
name = "alknet_tty"
[features]
default = []
# `local` re-exports `alknet_tty_local::LocalTtyBackend`. The
# `dep:alknet-tty-local` dependency is wired in task `tty/local-feature-reexport`.
local = []
[dependencies]
alknet-core = { path = "../alknet-core" }
tokio = { version = "1", features = ["full"] }
bytes = "1"
futures-core = "0.3"
tokio-stream = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
async-trait = "0.1"
tracing = "0.1"
thiserror = "2"
+4
View File
@@ -0,0 +1,4 @@
//! `TtyAdapter` (`ProtocolHandler` on `alknet/tty`) and the `drive_session`
//! three-pump bidirectional driver.
// TODO: implement
+4
View File
@@ -0,0 +1,4 @@
//! Backend trait and handle shapes: `TtyBackend`, `TtyHandle`, `TtyControl`,
//! `TtyControlHandle`, `TtyParams`, `TerminalParams`, and `TtyError`.
// TODO: implement
+4
View File
@@ -0,0 +1,4 @@
//! Control channel messages: the `ControlMessage` tagged enum and
//! `signal_from_name`.
// TODO: implement
+11
View File
@@ -0,0 +1,11 @@
//! alknet-tty: Terminal session protocol handler for the `alknet/tty` ALPN.
//!
//! Two-carriage model (ADR-052): a JSON negotiation frame, then raw chunks
//! (`[stream_type: u8][length: u32 be][payload]`). Backend-agnostic via the
//! `TtyBackend` trait (ADR-053). Depends on alknet-core only (ADR-057).
pub mod adapter;
pub mod backend;
pub mod control;
pub mod negotiation;
pub mod wire;
+4
View File
@@ -0,0 +1,4 @@
//! Negotiation carriage: `NegotiateRequest`, `TerminalParamsWire`,
//! length-prefixed framing reader/writer, and the error response shape.
// TODO: implement
+4
View File
@@ -0,0 +1,4 @@
//! Raw chunk wire format: `ChunkReader`/`ChunkWriter`, `Chunk`, `RawError`,
//! stream-type constants, and `MAX_CHUNK_LEN`.
// TODO: implement