2026-04-28 10:56:09 +00:00
|
|
|
//! Gateway HTTP handlers — thin transport shells for the gateway service.
|
|
|
|
|
//!
|
|
|
|
|
//! Each handler calls `service::gateway::*` for business logic and formats
|
|
|
|
|
//! the response. No inline business logic, no `reqwest`, no filesystem access.
|
|
|
|
|
//!
|
|
|
|
|
//! Submodules:
|
|
|
|
|
//! - [`jsonrpc`] — JSON-RPC 2.0 types and helpers
|
|
|
|
|
//! - [`mcp`] — MCP POST/GET handlers and gateway tool dispatch
|
|
|
|
|
//! - [`websocket`] — WebSocket handlers (CRDT-sync, event push)
|
|
|
|
|
//! - [`rest`] — REST API handlers (agents, projects, bot config, pipeline)
|
|
|
|
|
|
2026-04-29 21:35:55 +00:00
|
|
|
/// JSON-RPC 2.0 request/response types shared across gateway handlers.
|
|
|
|
|
pub(crate) mod jsonrpc;
|
2026-04-28 10:56:09 +00:00
|
|
|
mod mcp;
|
|
|
|
|
mod rest;
|
|
|
|
|
mod websocket;
|
|
|
|
|
|
|
|
|
|
pub use mcp::{gateway_mcp_get_handler, gateway_mcp_post_handler};
|
|
|
|
|
pub use rest::{
|
2026-04-28 12:03:16 +00:00
|
|
|
gateway_add_project_handler, gateway_api_handler, gateway_assign_agent_handler,
|
|
|
|
|
gateway_bot_config_get_handler, gateway_bot_config_page_handler,
|
2026-04-28 13:36:45 +00:00
|
|
|
gateway_bot_config_save_handler, gateway_generate_token_handler, gateway_mode_handler,
|
|
|
|
|
gateway_remove_project_handler,
|
2026-04-28 10:56:09 +00:00
|
|
|
};
|
2026-05-12 21:29:04 +00:00
|
|
|
pub use websocket::{
|
|
|
|
|
gateway_crdt_sync_handler, gateway_event_push_handler, gateway_sled_uplink_handler,
|
|
|
|
|
};
|