feat: add GATEWAY_OPERATOR_SCOPES and update connection parameters for operator role

This commit is contained in:
Abhimanyu Saharan
2026-02-13 23:37:10 +05:30
parent 7b16b49218
commit 68b6029ac3
2 changed files with 31 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ from app.core.logging import TRACE_LEVEL, get_logger
PROTOCOL_VERSION = 3
logger = get_logger(__name__)
GATEWAY_OPERATOR_SCOPES = (
"operator.admin",
"operator.approvals",
"operator.pairing",
)
# NOTE: These are the base gateway methods from the OpenClaw gateway repo.
# The gateway can expose additional methods at runtime via channel plugins.
@@ -229,6 +234,8 @@ def _build_connect_params(config: GatewayConfig) -> dict[str, Any]:
params: dict[str, Any] = {
"minProtocol": PROTOCOL_VERSION,
"maxProtocol": PROTOCOL_VERSION,
"role": "operator",
"scopes": list(GATEWAY_OPERATOR_SCOPES),
"client": {
"id": "gateway-client",
"version": "1.0.0",