Class LocalApprovalGate
java.lang.Object
io.agentscope.harness.agent.skill.curator.LocalApprovalGate
- All Implemented Interfaces:
SkillPromotionGate
Single-replica HITL gate. Calls a user-supplied prompter function that returns
approve / reject from human input (terminal, CLI, IDE prompt, …). Defers if the prompter
times out.
The default constructor wires a no-op prompter that always defers. Real deployments
should supply a prompter that bridges to whatever HITL surface is available — typically
via RequestStopEvent so the agent's outer loop can pause for the prompt.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.agentscope.harness.agent.skill.curator.SkillPromotionGate
SkillPromotionGate.PromotionDecision -
Constructor Summary
ConstructorsConstructorDescriptionLocalApprovalGate(Duration timeout) LocalApprovalGate(Duration timeout, LocalApprovalGate.Prompter prompter, List<String> targetEnvironments) -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalApprovalGate.PrompterDefault prompter: never approves.reactor.core.publisher.Mono<SkillPromotionGate.PromotionDecision> review(SkillCandidate candidate, io.agentscope.core.agent.RuntimeContext ctx) Review a draft.static LocalApprovalGate.PrompterstdinPrompter(InputStream in, PrintStream out) Sample prompter: stdin yes/no.
-
Constructor Details
-
LocalApprovalGate
public LocalApprovalGate() -
LocalApprovalGate
-
LocalApprovalGate
public LocalApprovalGate(Duration timeout, LocalApprovalGate.Prompter prompter, List<String> targetEnvironments)
-
-
Method Details
-
review
public reactor.core.publisher.Mono<SkillPromotionGate.PromotionDecision> review(SkillCandidate candidate, io.agentscope.core.agent.RuntimeContext ctx) Description copied from interface:SkillPromotionGateReview a draft. Implementations should perform whatever side effects they need (notification, prompt, etc.) and return aSkillPromotionGate.PromotionDecision.- Specified by:
reviewin interfaceSkillPromotionGate
-
defaultPrompter
Default prompter: never approves. Suitable for tests / when no prompter is wired. -
stdinPrompter
Sample prompter: stdin yes/no. Useful for CLI demos / tests. -
getTargetEnvironments
-