refactor: remove main session key references and enhance agent-gateway associations

This commit is contained in:
Abhimanyu Saharan
2026-02-10 02:58:58 +05:30
parent 50f71960de
commit 6f070df74b
27 changed files with 552 additions and 672 deletions

View File

@@ -339,8 +339,7 @@ async def agent_onboarding_update(
gateway = await Gateway.objects.by_id(board.gateway_id).first(session)
if (
gateway
and agent.openclaw_session_id
and agent.openclaw_session_id != gateway_agent_session_key(gateway)
and (agent.gateway_id != gateway.id or agent.board_id is not None)
):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)