AS AgentScopeAPI 手册 / API Reference

NotifyAndWaitGate

public class NotifyAndWaitGate implements SkillPromotionGate
源码Source io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:39–119

Notify 和 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

构造器Constructor说明Description
public NotifyAndWaitGate(List<NotificationSink> sinks, WorkspaceManager workspaceManager, String draftsDir)
初始化 `NotifyAndWaitGate` 实例。
Creates a new instance.
public NotifyAndWaitGate(List<NotificationSink> sinks, WorkspaceManager workspaceManager, String draftsDir, Duration retryAfter)
初始化 `NotifyAndWaitGate` 实例。
Creates a new instance.

方法摘要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.

参数Parameters
名称Name类型Type说明Description
sinksList<NotificationSink>sinks(类型 `List`)。The sinks.
workspaceManagerWorkspaceManager工作区管理器(类型 `WorkspaceManager`)。The workspace manager.
draftsDirStringdrafts 目录(类型 `String`)。The drafts dir.
源码Source io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:54–57

NotifyAndWaitGate

public NotifyAndWaitGate(List<NotificationSink> sinks, WorkspaceManager workspaceManager, String draftsDir, Duration retryAfter)

初始化 NotifyAndWaitGate 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
sinksList<NotificationSink>sinks(类型 `List`)。The sinks.
workspaceManagerWorkspaceManager工作区管理器(类型 `WorkspaceManager`)。The workspace manager.
draftsDirStringdrafts 目录(类型 `String`)。The drafts dir.
retryAfterDuration重试之后(类型 `Duration`)。The retry after.
源码Source 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.

参数Parameters
名称Name类型Type说明Description
candidateSkillCandidatecandidate(类型 `SkillCandidate`)。The candidate.
ctxRuntimeContext运行时上下文(类型 `RuntimeContext`)。The ctx.
返回Returns Mono<PromotionDecision>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/skill/curator/NotifyAndWaitGate.java:70–98
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.