Interface WakeupDispatcher.WakeupTarget
- All Known Implementing Classes:
HarnessGateway
- Enclosing class:
- WakeupDispatcher
public static interface WakeupDispatcher.WakeupTarget
Thin interface for the two gateway operations the dispatcher needs.
HarnessGateway
implements this directly; tests can supply a stub.-
Method Summary
Modifier and TypeMethodDescriptionbooleanisSessionRunning(String sessionId) reactor.core.publisher.Mono<io.agentscope.core.message.Msg>Deprecated.default reactor.core.publisher.Mono<io.agentscope.core.message.Msg>Triggers a wakeup run for an idle session, carrying the owning user id when present.
-
Method Details
-
isSessionRunning
-
runWakeup
Deprecated.implementers should overriderunWakeup(String, String)instead, so the dispatcher can propagate the owning user id. Required for runtimes that isolate agent state by(userId, sessionId): without it, a wakeup-driven round loads state from an anonymous slot and the original conversation is lost. This overload is retained for backward compatibility and defaults to ignoring the user id.Triggers a wakeup run without an owning user id.- Parameters:
sessionId- the session to wake up- Returns:
- the agent's response, or
Mono.empty()if the session is unknown
-
runWakeup
default reactor.core.publisher.Mono<io.agentscope.core.message.Msg> runWakeup(String userId, String sessionId) Triggers a wakeup run for an idle session, carrying the owning user id when present.Called by
WakeupDispatcherwhen a background task completes or a team message arrives. Implementations should set the user id on the agent runtime context when non-blank, so agent state is loaded from the same(userId, sessionId)slot as the original user-driven run.- Parameters:
userId- the owning user id carried by the wakeup entry;nullor blank when the producer had none (e.g. single-tenant runtimes)sessionId- the session to wake up- Returns:
- the agent's response, or
Mono.empty()if the session is unknown
-
runWakeup(String, String)instead, so the dispatcher can propagate the owning user id.