WakeupTarget
public interface WakeupTarget
源码Source
io/agentscope/harness/agent/gateway/WakeupDispatcher.java:61–94定义 Wakeup 目标契约的接口。位于 io.agentscope.harness.agent.gateway 包。核心成员包括 isSessionRunning、runWakeup。
Thin interface for the two gateway operations the dispatcher needs. HarnessGateway
implements this directly; tests can supply a stub.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isSessionRunning(String sessionId) | 判断是否会话运行中。 Returns whether the session running. |
public Mono<Msg> runWakeup(String sessionId)deprecated | 运行 `runWakeup`。 Triggers a wakeup run without an owning user id. |
default public Mono<Msg> runWakeup(String userId, String sessionId)default | 运行 `runWakeup`。 Triggers a wakeup run for an idle session, carrying the owning user id when present. |
方法详情Method Detail
isSessionRunning
public boolean isSessionRunning(String sessionId)
判断是否会话运行中。
Returns whether the session running.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/gateway/WakeupDispatcher.java:62runWakeup
public Mono<Msg> runWakeup(String sessionId)
deprecated
运行 runWakeup。
Triggers a wakeup run without an owning user id.
已弃用。Deprecated. 已弃用,请改用受支持的替代 API。implementers should override `#runWakeup(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.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。the session to wake up |
Mono<Msg>返回Mono。the agent's response, or `Mono#empty()` if the session is unknown
源码Source
io/agentscope/harness/agent/gateway/WakeupDispatcher.java:75–76runWakeup
default public Mono<Msg> runWakeup(String userId, String sessionId)
default
运行 runWakeup。
Triggers a wakeup run for an idle session, carrying the owning user id when present.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识(类型 `String`)。the owning user id carried by the wakeup entry; `null` or blank when the producer had none (e.g. single-tenant runtimes) |
sessionId | String | 会话标识(类型 `String`)。the session to wake up |
Mono<Msg>返回Mono。the agent's response, or `Mono#empty()` if the session is unknown
源码Source
io/agentscope/harness/agent/gateway/WakeupDispatcher.java:91–93