orchestrata_gateway

Reference › components › gateway › orchestrata_gateway

Orchestrata WebSocket Gateway -- SPEC-014.

orchestrata_gateway is the WebSocket gateway of SPEC-014. Its centre is web_socket_gateway (1,435 lines), whose WebSocketGateway class builds and coordinates the subsystems: an authenticator chosen from GatewayConfig, a ConnectionManager, a PubSubManager, a RedisRingBuffer, an AuditWriter, an RPCHandler and a MessageProcessor. It also tracks whether it reached the kernel over gRPC, through the in-process fallback, or not at all, and kernel_reprober re-probes the kernel. Incoming frames flow through message_processor to r_p_c_handler, which dispatches by the declarative method_table (ADR-0099) into the modules of the handlers subpackage.

The other parts, by role. Authentication: auth_handler, hmac_authenticator, static_token_authenticator, token_authenticator, secret_redactor. Configuration: gateway_config, runtime_config_store, config_change, config_snapshot. Observability: metrics (Prometheus instruments), http_surface (health, ready and metrics endpoints), audit_writer, test_runner. MCP support: mcp_transport, mcp_tool_spec, mcp_ledger, mcp_approval_gate. The entry point is cli, a thin wrapper whose main and run_serve start the server. The subpackage integrations holds the Fireflies client and the multi-agent coordinator, and gateway holds residue-only lifts. Where a page says "lifted from", the original is in the single-package tree. See the gateway narrative; shared error and workflow types are in contracts gateway.

73 modules, 13,439 lines of code.

Subpackages

Package Modules LOC
gateway 4 138
handlers 22 5,221
integrations 10 1,326

Modules

Module Summary LOC Lifted from
__init__ Orchestrata WebSocket Gateway -- SPEC-014. 22
audit_writer 209
auth_handler Authentication handlers for WebSocket gateway connections. 369 lifted from orchestrata_ultimate.gateway.auth_handler
cli Thin CLI wrapper for the WebSocket gateway. 115 lifted from orchestrata_ultimate.gateway.cli
config_change 30
config_snapshot 33
connection_info 46
connection_manager 183
connection_state 15
error_category 26
gateway_config 458
handshake_noise_filter 29
hmac_authenticator 148
http_surface Gateway HTTP surface — /health, /api/v1/health, /ready, /metrics. 160 lifted from orchestrata_ultimate.gateway.http_surface
kernel_connect_attempt 15
kernel_reprober 123
mcp_approval_gate 43 lifted from orchestrata_ultimate.gateway.mcp_approval_gate
mcp_ledger 62 lifted from orchestrata_ultimate.gateway.mcp_ledger
mcp_tool_spec 49 lifted from orchestrata_ultimate.gateway.mcp_tool_spec
mcp_transport 219 lifted from orchestrata_ultimate.gateway.mcp_transport
message_processor 238
message_type 54
method_spec 59 lifted from orchestrata_ultimate.gateway.method_spec
method_table The gateway's declarative method table (ADR-0099 rules 2 and 3). 445 lifted from orchestrata_ultimate.gateway.method_table
metrics Prometheus instruments for the WebSocket gateway (SPEC-014 US-009). 223 lifted from orchestrata_ultimate.gateway.metrics
pub_sub_manager 354
r_p_c_handler 461
redis_ring_buffer 184
runtime_config_store 187
secret_redactor 58
static_token_authenticator 127
subscription 44
test_runner 357 lifted from orchestrata_ultimate.gateway.test_runner
token_authenticator 100
viz_int_web_u_i 10
w_s_message 64
web_socket_gateway 1435

Dependency diagram

Package dependency diagram orchestrata_gateway

Truncated: showing 40 of 40 modules/subpackages (most connected first) and 10 of 21 outside packages.