SkillPromoter
@SuppressWarnings("deprecation") public class SkillPromoter
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
方法摘要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.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
draftsRepo | WorkspaceSkillRepository | drafts 仓库(类型 `WorkspaceSkillRepository`)。The drafts repo. |
mainRepo | WorkspaceSkillRepository | 主仓库(类型 `WorkspaceSkillRepository`)。The main repo. |
workspaceManager | WorkspaceManager | 工作区管理器(类型 `WorkspaceManager`)。The workspace manager. |
usageStore | SkillUsageStore | 用量存储(类型 `SkillUsageStore`)。The usage store. |
gate | SkillPromotionGate | gate(类型 `SkillPromotionGate`)。The gate. |
draftsDir | String | drafts 目录(类型 `String`)。The drafts dir. |
mainDir | String | 主目录(类型 `String`)。The main dir. |
io/agentscope/harness/agent/skill/curator/SkillPromoter.java:50–59SkillPromoter
public SkillPromoter(WorkspaceSkillRepository draftsRepo, WorkspaceSkillRepository mainRepo, WorkspaceManager workspaceManager, SkillUsageStore usageStore, SkillPromotionGate gate, String draftsDir, String mainDir, SkillAuditLog auditLog)
初始化 SkillPromoter 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
draftsRepo | WorkspaceSkillRepository | drafts 仓库(类型 `WorkspaceSkillRepository`)。The drafts repo. |
mainRepo | WorkspaceSkillRepository | 主仓库(类型 `WorkspaceSkillRepository`)。The main repo. |
workspaceManager | WorkspaceManager | 工作区管理器(类型 `WorkspaceManager`)。The workspace manager. |
usageStore | SkillUsageStore | 用量存储(类型 `SkillUsageStore`)。The usage store. |
gate | SkillPromotionGate | gate(类型 `SkillPromotionGate`)。The gate. |
draftsDir | String | drafts 目录(类型 `String`)。The drafts dir. |
mainDir | String | 主目录(类型 `String`)。The main dir. |
auditLog | SkillAuditLog | audit 日志(类型 `SkillAuditLog`)。The audit log. |
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.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。skill name (must exist under the drafts repo) |
reviewerId | String | reviewer 标识(类型 `String`)。tag stamped onto the sidecar's `promoted_by` |
ctx | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。runtime context (forwarded to gate / filesystem) |
Mono<PromotionResult>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.