1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! API layer for shell-tunnel.
//!
//! This module provides REST API and WebSocket endpoints for interacting
//! with shell sessions programmatically.
//!
//! ## Endpoints
//!
//! ### Health & Info
//! - `GET /health` - Health check
//! - `GET /api/v1/` - API information
//!
//! ### Sessions
//! - `GET /api/v1/sessions` - List all sessions
//! - `POST /api/v1/sessions` - Create a new session
//! - `GET /api/v1/sessions/{id}` - Get session status
//! - `DELETE /api/v1/sessions/{id}` - Delete a session
//! - `POST /api/v1/sessions/{id}/execute` - Execute command in session
//! - `WS /api/v1/sessions/{id}/ws` - WebSocket for streaming
//!
//! ### One-shot Execution
//! - `POST /api/v1/execute` - Execute command without session
//! - `WS /api/v1/ws` - WebSocket for one-shot streaming
//!
//! ## Example
//!
//! ```no_run
//! use shell_tunnel::api::{ServerConfig, serve};
//!
//! #[tokio::main]
//! async fn main() -> shell_tunnel::Result<()> {
//! let config = ServerConfig::new("127.0.0.1", 3000);
//! serve(config).await
//! }
//! ```
// Re-export commonly used types
pub use AppState;
pub use ;
pub use ;