AS AgentScopeAPI 手册 / API Reference

SkillPromoter

@SuppressWarnings("deprecation") public class SkillPromoter
源码Source io/agentscope/harness/agent/skill/curator/SkillPromoter.java:36–327

技能 Promoter,让智能体以受控方式调用外部能力。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 promote、SkillPromoter。

Orchestrates the promotion pipeline: locate draft → run security scan → call gate → physically move _drafts/<name>/ to skills/<name>/ → update sidecar.

Surfaced via HarnessAgent.promoteSkill(name, reviewerId, ctx); standalone here so it can be unit tested without spinning up a full agent.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
PromotionResult记录record
承载 Promotion 结果数据的记录类型。
A record in io.agentscope.harness.agent.skill.curator that carries data used when components lets agents invoke external capabilities under control.

构造器摘要Constructor Summary

构造器Constructor说明Description
public SkillPromoter(WorkspaceSkillRepository draftsRepo, WorkspaceSkillRepository mainRepo, WorkspaceManager workspaceManager, SkillUsageStore usageStore, SkillPromotionGate gate, String draftsDir, String mainDir)
初始化 `SkillPromoter` 实例。
Creates a new instance.
public SkillPromoter(WorkspaceSkillRepository draftsRepo, WorkspaceSkillRepository mainRepo, WorkspaceManager workspaceManager, SkillUsageStore usageStore, SkillPromotionGate gate, String draftsDir, String mainDir, SkillAuditLog auditLog)
初始化 `SkillPromoter` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<PromotionResult> promote(String name, String reviewerId, RuntimeContext ctx)
执行 `promote` 方法。
Promote a draft.

构造器详情Constructor Detail

SkillPromoter

public SkillPromoter(WorkspaceSkillRepository draftsRepo, WorkspaceSkillRepository mainRepo, WorkspaceManager workspaceManager, SkillUsageStore usageStore, SkillPromotionGate gate, String draftsDir, String mainDir)

初始化 SkillPromoter 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
draftsRepoWorkspaceSkillRepositorydrafts 仓库(类型 `WorkspaceSkillRepository`)。The drafts repo.
mainRepoWorkspaceSkillRepository主仓库(类型 `WorkspaceSkillRepository`)。The main repo.
workspaceManagerWorkspaceManager工作区管理器(类型 `WorkspaceManager`)。The workspace manager.
usageStoreSkillUsageStore用量存储(类型 `SkillUsageStore`)。The usage store.
gateSkillPromotionGategate(类型 `SkillPromotionGate`)。The gate.
draftsDirStringdrafts 目录(类型 `String`)。The drafts dir.
mainDirString主目录(类型 `String`)。The main dir.
源码Source io/agentscope/harness/agent/skill/curator/SkillPromoter.java:50–59

SkillPromoter

public SkillPromoter(WorkspaceSkillRepository draftsRepo, WorkspaceSkillRepository mainRepo, WorkspaceManager workspaceManager, SkillUsageStore usageStore, SkillPromotionGate gate, String draftsDir, String mainDir, SkillAuditLog auditLog)

初始化 SkillPromoter 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
draftsRepoWorkspaceSkillRepositorydrafts 仓库(类型 `WorkspaceSkillRepository`)。The drafts repo.
mainRepoWorkspaceSkillRepository主仓库(类型 `WorkspaceSkillRepository`)。The main repo.
workspaceManagerWorkspaceManager工作区管理器(类型 `WorkspaceManager`)。The workspace manager.
usageStoreSkillUsageStore用量存储(类型 `SkillUsageStore`)。The usage store.
gateSkillPromotionGategate(类型 `SkillPromotionGate`)。The gate.
draftsDirStringdrafts 目录(类型 `String`)。The drafts dir.
mainDirString主目录(类型 `String`)。The main dir.
auditLogSkillAuditLogaudit 日志(类型 `SkillAuditLog`)。The audit log.
源码Source io/agentscope/harness/agent/skill/curator/SkillPromoter.java:61–78

方法详情Method Detail

promote

public Mono<PromotionResult> promote(String name, String reviewerId, RuntimeContext ctx)

执行 promote 方法。

Promote a draft.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。skill name (must exist under the drafts repo)
reviewerIdStringreviewer 标识(类型 `String`)。tag stamped onto the sidecar's `promoted_by`
ctxRuntimeContext运行时上下文(类型 `RuntimeContext`)。runtime context (forwarded to gate / filesystem)
返回Returns Mono<PromotionResult>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/skill/curator/SkillPromoter.java:87–119

嵌套类详情Nested Class Detail

PromotionResult

public record PromotionResult( Status status, String message, List<String> environments, String reviewerId, SkillSecurityScanner.ScanResult scan)

承载 Promotion 结果数据的记录类型。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 status、message、environments、reviewerId、scan、approved。

A record in io.agentscope.harness.agent.skill.curator that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.harness.agent.skill.curator.

基于官方固定版本源码静态生成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.