Enum Class SubagentDeclaration.Mode
java.lang.Object
java.lang.Enum<SubagentDeclaration.Mode>
io.agentscope.harness.agent.subagent.SubagentDeclaration.Mode
- All Implemented Interfaces:
Serializable,Comparable<SubagentDeclaration.Mode>,Constable
- Enclosing class:
- SubagentDeclaration
Whether a declaration can be used as a top-level primary agent, only as a delegated
subagent, or both.
The DefaultAgentManager.createAgentIfPresent(java.lang.String, io.agentscope.core.agent.RuntimeContext)
path rejects spawn requests for PRIMARY-only declarations so they can never be
invoked as workers; conversely, top-level launchers may want to reject SUBAGENT
declarations as entry points (current core does not own that check — top-level launch goes
through HarnessAgent.builder() directly, not through a declaration).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SubagentDeclaration.ModeReturns the enum constant of this class with the specified name.static SubagentDeclaration.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRIMARY
-
SUBAGENT
-
ALL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-