Repository navigation
feat: add broadcast messaging across registries - #77
Merged
Merged
Conversation
The claude-code-plugin-viche was sending empty params {} when joining
registry channels, causing the server to refuse with agent_id_required.
Also adds explicit Logger.warning calls on the server side so registry
join refusals include the reason in logs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When agent_id is missing, we have no agent to name — so log the socket ID and existing assigns to identify which connection attempted the join. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…identity in logs After register-on-join, the socket connects without an agent_id so socket.id is nil. Explicitly set socket.id = "agent_socket:<id>" on the returned socket so subsequent registry channel joins on the same socket carry the agent identity in Phoenix logs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
send_messagepath for per-recipient delivery, keeping message guarantees and routing unchangedfailedlist)Design Overview
Request Flow
Impact Map
Changes
Elixir Server
lib/viche/agents.exbroadcast_message/1,ensure_sender_registry_membership/2,deliver_broadcast_messages/4, new typesbroadcast_result,broadcast_failurelib/viche_web/controllers/broadcast_controller.exPOST /registry/:token/broadcast, derives sender fromconn.assigns.current_agent_idlib/viche_web/channels/agent_channel.exhandle_in("broadcast_message", ...)with field validation clauseslib/viche_web/controllers/well_known_controller.exbroadcast_messageclient event in descriptorlib/viche_web/router.expost "/:token/broadcast"in registry scopePlugins (TypeScript)
channel/claude-code-plugin-viche/tools.tsviche_broadcasttool + input validation helpers (validRegistryToken,validMessageType)channel/openclaw-plugin-viche/tools.tsviche_broadcasttool +validProtocolMessageTypeguardchannel/opencode-plugin-viche/tools.tsviche_broadcasttool +ProtocolMessageTypeSchemaZod enumchannel/opencode-plugin-viche/tools.tsviche_sendtype param fromz.string()toz.enum(["task","result","ping"])Tests
test/viche/agents_test.exsbroadcast_message/1test/viche_web/controllers/broadcast_controller_test.exstest/viche_web/channels/agent_channel_test.exsbroadcast_messageeventtest/viche_web/controllers/well_known_controller_test.exstest/viche_web/integration/broadcast_flow_test.exs*.argus.test.ts(x3)channel/claude-code-plugin-viche/tools.test.tsviche_broadcastchannel/openclaw-plugin-viche/tools-websocket.test.tsviche_broadcastchannel/opencode-plugin-viche/__tests__/tools.test.tsviche_broadcastDocumentation
AGENTS.mdREADME.mdSPEC.mdspecs/03-messaging.mdspecs/07-websockets.mdbroadcast_messageevent, client code example, acceptance criteriachannel/claude-code-plugin-viche/skills/viche/SKILL.mdviche_broadcasttool docs + exampleKey Design Decisions
send_message— no broadcast-specific message schema; each recipient gets a normalMessagewith a unique ID routed through the existing delivery pathauthorize_registry_join/2)failedlistBroadcastControllerderivesfromfromconn.assigns.current_agent_id;AgentChannelderives it fromsocket.assigns.agent_id. Client-suppliedfromis ignoredHow to Test
Version Bumps
claude-code-plugin-viche@ikatkov/viche-plugin(OpenClaw)opencode-plugin-vicheType of change
Checklist