Skip to content

feat(container_events): Add functionality to broadcast events to collaborators#41

Merged
9trocode merged 1 commit intomainfrom
feat/email-collab-invitations
Mar 6, 2026
Merged

feat(container_events): Add functionality to broadcast events to collaborators#41
9trocode merged 1 commit intomainfrom
feat/email-collab-invitations

Conversation

@9trocode
Copy link
Contributor

@9trocode 9trocode commented Mar 6, 2026

This pull request enhances the notification system for agent connection and disconnection events by ensuring that all collaborators with access to a given agent are notified, not just the owner. It introduces new logic to identify collaborators and broadcast relevant events to them, and adds a database method to efficiently retrieve collaborator user IDs for a specific container or agent.

Event Broadcasting Improvements:

  • Updated NotifyAgentConnected and NotifyAgentDisconnected methods in container_events.go to broadcast agent connection and disconnection events to all collaborators who have access to the agent, in addition to the owner.
  • Added a new helper method broadcastToCollaborators in container_events.go to handle broadcasting events to all relevant collaborators based on agent/container ID.

Database Support for Collaboration:

  • Added GetCollaboratorUserIDsForContainer method to PostgresStore in postgres.go, which queries the database to return all unique user IDs of active participants in collaborative sessions for a specific container or agent. This supports the new event broadcasting logic.

@9trocode 9trocode merged commit 6524cc4 into main Mar 6, 2026
2 checks passed
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.

1 participant