Skip to content

Conversation

@littlebee
Copy link
Owner

Summary

  • Implements outbound websocket client connections to solve firewall/NAT traversal for robots behind restrictive networks
  • Enables bidirectional hub-to-hub communication
  • Outbound clients act as regular clients, sending updateState messages to remote hubs
  • Auto-reconnection with 5-second retry on connection failure

Changes

  • Completes OutboundClients class implementation in commons/outbound_clients.py
  • Adds BB_CONFIG_FILE constant to centralize configuration path
  • Removes unnecessary iseeu message handler from central_hub
  • Renames MockRemoteHubMockOutboundClient for naming clarity
  • Adds comprehensive integration tests for bidirectional communication

Test plan

  • ✅ All 4 outbound client integration tests passing
  • ✅ Tests verify: connection/identity, local-to-remote propagation, remote-to-local propagation, bidirectional state sync
  • ✅ All original central_hub tests still passing
  • ✅ Linting passes

🤖 Generated with Claude Code

littlebee and others added 4 commits October 7, 2025 11:06
this is to facilitate central_hub ability to read the outbound_connections from the basic_bot.yml file
    - Created outbound_clients.py class to manage websocket connections that central_hub initiates (vs
  accepting inbound)
    - Extended config schema to support outbound_clients array with name, uri, identity, and
  shared_token_file fields
    - Changed from inline shared_token to shared_token_file (pointing to file) for better security
    - Added tokens/ directory to .gitignore for storing authentication tokens
    - Added example outbound client configuration in basic_bot.yml
    - Includes auto-reconnection logic (5 second retry on failure)
…ication

- Implemented OutboundClients class with connection management:
  - Auto-reconnection on disconnect (5 second retry)
  - Send identity with optional shared token authentication
  - Forward all message types to central_hub for processing
  - Broadcast state updates to all connected outbound clients

- Refactored central_hub message handling:
  - Split handle_message into handle_message (process single message) and handle_connect (connection lifecycle)
  - Extracted message processing logic to be reusable for both inbound and outbound connections
  - Added outbound client support to send_state_update_to_subscribers for bidirectional sync

- Enables full bidirectional communication:
  - Local state updates forwarded to remote servers
  - Remote state updates forwarded to local hub
  - Both inbound and outbound connections use same message processing logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Completes OutboundClients class implementation with auto-reconnection
- Adds BB_CONFIG_FILE constant to centralize config path
- Removes unnecessary iseeu message handler
- Renames MockRemoteHub to MockOutboundClient for clarity
- Adds comprehensive integration tests for bidirectional hub communication
- Tests verify: connection/identity, local-to-remote, remote-to-local, and bidirectional state sync

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@littlebee littlebee merged commit db372c2 into main Oct 13, 2025
1 check passed
@littlebee littlebee deleted the bee/centralHubOutbound branch October 13, 2025 16:38
@littlebee littlebee restored the bee/centralHubOutbound branch January 19, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants