Class AgentProtocolTaskEventBus
java.lang.Object
io.agentscope.extensions.agentprotocol.AgentProtocolTaskEventBus
- All Implemented Interfaces:
AgentProtocolEventBus
Per-task event bus for Agent Protocol SSE streaming. Uses a replay buffer so late subscribers /
reconnects can catch up from
fromSeq.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCompletes and removes the channel after a terminal event has been published.io.agentscope.harness.agent.subagent.protocol.RemoteAgentEventPublishes an event, assigning a monotonicseq.reactor.core.publisher.Flux<io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent>Subscribes to events fortaskId, optionally skipping those withseq <= fromSeq.
-
Constructor Details
-
AgentProtocolTaskEventBus
public AgentProtocolTaskEventBus() -
AgentProtocolTaskEventBus
public AgentProtocolTaskEventBus(int replayBufferSize)
-
-
Method Details
-
publish
public io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent publish(String taskId, io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent event) Publishes an event, assigning a monotonicseq.- Specified by:
publishin interfaceAgentProtocolEventBus
-
subscribe
public reactor.core.publisher.Flux<io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent> subscribe(String taskId, long fromSeq) Subscribes to events fortaskId, optionally skipping those withseq <= fromSeq.- Specified by:
subscribein interfaceAgentProtocolEventBus
-
complete
Completes and removes the channel after a terminal event has been published.- Specified by:
completein interfaceAgentProtocolEventBus
-