Class AbstractAgentCreatedFilter
java.lang.Object
io.agentscope.harness.agent.skill.curator.AbstractAgentCreatedFilter
- All Implemented Interfaces:
SkillVisibilityFilter
- Direct Known Subclasses:
AllowListFilter,CanaryFilter
Base class for visibility filters that should ONLY constrain agent-authored skills. User-
authored / hub-installed / pre-existing skills (those with
createdBy == null in the
sidecar) pass through untouched, so a CanaryFilter doesn't accidentally hide the
hand-crafted skills the agent's owners shipped.
Subclasses implement shouldPassForAgentCreated(io.agentscope.core.skill.AgentSkill, io.agentscope.harness.agent.skill.curator.SkillUsageRecord, io.agentscope.core.agent.RuntimeContext) for the agent-tracked skills.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal List<io.agentscope.core.skill.AgentSkill>Filter the skill list down to those visible for the current runtime context.protected abstract booleanshouldPassForAgentCreated(io.agentscope.core.skill.AgentSkill skill, SkillUsageRecord rec, io.agentscope.core.agent.RuntimeContext ctx) Returntrueto keep an agent-authored skill visible for this context,falseto filter it out.
-
Field Details
-
usageStore
-
-
Constructor Details
-
AbstractAgentCreatedFilter
-
-
Method Details
-
filter
public final List<io.agentscope.core.skill.AgentSkill> filter(List<io.agentscope.core.skill.AgentSkill> all, io.agentscope.core.agent.RuntimeContext ctx) Description copied from interface:SkillVisibilityFilterFilter the skill list down to those visible for the current runtime context.- Specified by:
filterin interfaceSkillVisibilityFilter
-
shouldPassForAgentCreated
protected abstract boolean shouldPassForAgentCreated(io.agentscope.core.skill.AgentSkill skill, SkillUsageRecord rec, io.agentscope.core.agent.RuntimeContext ctx) Returntrueto keep an agent-authored skill visible for this context,falseto filter it out.recis guaranteed non-null withcreatedBy == "agent".
-