Class CanaryFilter

java.lang.Object
io.agentscope.harness.agent.skill.curator.AbstractAgentCreatedFilter
io.agentscope.harness.agent.skill.curator.CanaryFilter
All Implemented Interfaces:
SkillVisibilityFilter

public class CanaryFilter extends AbstractAgentCreatedFilter
Percentage-based rollout for agent-authored skills. Hashes userId × skillName, and admits the skill iff hash mod 100 < percent.

Only applies to agent-authored skills (via AbstractAgentCreatedFilter). Hand- authored / hub-installed skills always pass through.

The rampUpDays parameter is currently a placeholder — accepted on construction but the current implementation does not yet ramp; it always uses the configured static percentage. A future version will interpolate using SkillUsageRecord.promotedAt.

  • Constructor Details

    • CanaryFilter

      public CanaryFilter(int percent, SkillUsageStore usageStore)
    • CanaryFilter

      public CanaryFilter(int percent, int rampUpDays, SkillUsageStore usageStore)
  • Method Details

    • shouldPassForAgentCreated

      protected boolean shouldPassForAgentCreated(io.agentscope.core.skill.AgentSkill skill, SkillUsageRecord rec, io.agentscope.core.agent.RuntimeContext ctx)
      Description copied from class: AbstractAgentCreatedFilter
      Return true to keep an agent-authored skill visible for this context, false to filter it out. rec is guaranteed non-null with createdBy == "agent".
      Specified by:
      shouldPassForAgentCreated in class AbstractAgentCreatedFilter
    • getRampUpDays

      public int getRampUpDays()