NotifyAndWaitGate
public class NotifyAndWaitGate implements SkillPromotionGate
io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:39–119Notify 和 Wait Gate,让智能体以受控方式调用外部能力。位于 io.agentscope.harness.agent.skill.curator 包,实现 SkillPromotionGate。核心成员包括 review、NotifyAndWaitGate。
Multi-replica gate. On review writes a .review_request.json file next to the
draft skill (so the file is visible to whichever replica gets the eventual approval call) and
fires every configured NotificationSink concurrently. Always returns
SkillPromotionGate.PromotionDecision.Defer — the actual approval comes from the
external system calling HarnessAgent.promoteSkill(...) on any replica.
Sinks are best-effort. A failed sink is logged but does not block the gate or the agent.
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<PromotionDecision> review(SkillCandidate candidate, RuntimeContext ctx) | 执行 `review` 方法。 Performs the review operation. |
构造器详情Constructor Detail
NotifyAndWaitGate
public NotifyAndWaitGate(List<NotificationSink> sinks, WorkspaceManager workspaceManager, String draftsDir)
初始化 NotifyAndWaitGate 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sinks | List<NotificationSink> | sinks(类型 `List`)。The sinks. |
workspaceManager | WorkspaceManager | 工作区管理器(类型 `WorkspaceManager`)。The workspace manager. |
draftsDir | String | drafts 目录(类型 `String`)。The drafts dir. |
io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:54–57NotifyAndWaitGate
public NotifyAndWaitGate(List<NotificationSink> sinks, WorkspaceManager workspaceManager, String draftsDir, Duration retryAfter)
初始化 NotifyAndWaitGate 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sinks | List<NotificationSink> | sinks(类型 `List`)。The sinks. |
workspaceManager | WorkspaceManager | 工作区管理器(类型 `WorkspaceManager`)。The workspace manager. |
draftsDir | String | drafts 目录(类型 `String`)。The drafts dir. |
retryAfter | Duration | 重试之后(类型 `Duration`)。The retry after. |
io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:59–68方法详情Method Detail
review
public Mono<PromotionDecision> review(SkillCandidate candidate, RuntimeContext ctx)
执行 review 方法。
Performs the review operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
candidate | SkillCandidate | candidate(类型 `SkillCandidate`)。The candidate. |
ctx | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。The ctx. |
Mono<PromotionDecision>io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:70–98