TeamWakeups
public final class TeamWakeups
源码Source
io/agentscope/harness/agent/team/TeamWakeups.java:27–56团队 Wakeups,支持智能体之间的发现、委派与协作。位于 io.agentscope.harness.agent.team 包。核心成员包括 register、wake。
Bridge from TeamClient implementations to whatever runtime owns teammate sessions.
A TeamClient knows member names (lead, w1) but not runtime session ids,
so it cannot wake a teammate on its own. The middleware that hosts the teammate registers a
Hook here; clients then notify members without depending on the middleware package.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Hook | 接口interface | 定义钩子契约的接口。 Wakes a teammate, optionally injecting `notice` into its next turn. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static void register(Hook hook)static | 设置注册。 Registers the process-wide wakeup hook. |
public static boolean wake(String teamName, String memberName, String notice)static | 执行 `wake` 方法。 Wakes `memberName`; returns `false` when no hook or no live session. |
方法详情Method Detail
register
public static void register(Hook hook)
static
设置注册。
Registers the process-wide wakeup hook.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
hook | Hook | 钩子(类型 `Hook`)。The hook. |
源码Source
io/agentscope/harness/agent/team/TeamWakeups.java:40–42wake
public static boolean wake(String teamName, String memberName, String notice)
static
执行 wake 方法。
Wakes memberName; returns false when no hook or no live session.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
teamName | String | 团队名称(类型 `String`)。The team name. |
memberName | String | 成员名称(类型 `String`)。The member name. |
notice | String | notice(类型 `String`)。The notice. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/team/TeamWakeups.java:45–55嵌套类详情Nested Class Detail
Hook
@FunctionalInterface public interface Hook定义钩子契约的接口。位于 io.agentscope.harness.agent.team 包。核心成员包括 wake。
Wakes a teammate, optionally injecting notice into its next turn.