Repository navigation
Add shared zmqruntime comms server, unified CLI client, and live server events - #5282
Merged
Merged
Conversation
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
PR 3a of the #comms 12554 architectural & UX overhaul (OpenHCS blueprint): adds the shared
zmqruntimetransport layer for unified external CLI connections and live comms server-state feedback.Mechanisms
CommsZMQConfig(ZMQConfig)(src/agent_comms/transport/zmq_comms_server.py): bus-root-scoped IPC/TCP port-pair topology (default port 7790, control offset 1000) with Linuxsun_pathlength safety for deeply nested roots.CliTransportMode.zmq_transport_name()(src/agent_comms/registry/thread_settings.py): projectsCliTransportMode(ZMQ_IPC/ZMQ_TCP) ontozmqruntime.TransportModewithout string branching.CommsPongResponse(PongResponse): carries livebus_root,connected_clis,registered_threads,wire_revision, andWorkerStateentries for every attached CLI, compatible withformbridge.services.zmq_server_scan_service.ZMQServerScanServiceandpyqt_reactive.widgets.shared.ZMQServerBrowserWidgetABC.CommsServerEvent(DeclaredFamily)(ServerReadyEvent,CliAttachedEvent,CliDetachedEvent,ToolExecutedEvent): broadcast over the ZMQ PUB data socket on server start, CLI attach/detach, and tool execution.CommsZmqRequest(DeclaredFamily)(CliAttachRequest,CliHeartbeatRequest,CliDetachRequest,CommsStatusRequest,CliToolCallRequest): polymorphic control-socket RPCs with.apply(server).CommsZMQServer(ZMQServer)&CommsZMQClient(ZMQClient, CoreAccess): unified server and client executing any CoreToolRequest[R] -> R, emittingEndpointStartupStatusconnection callbacks, and providingpython -m agent_comms.transport.zmq_comms_server.Verification
PYTHONPATH=src:tools /home/ts/.local/share/agent-comms/current/bin/python -m pytest -p no:xdist tests/test_zmq_comms_server.py tests/test_agent_settings.py -q: 11 passed (parametrized overCliTransportMode.ZMQ_IPCandCliTransportMode.ZMQ_TCP, plusagent_settingscold-start guard).ruff check src/agent_comms/transport/zmq_comms_server.py tests/test_zmq_comms_server.py: 0 errors, 0 relative imports.