Class: RubynCode::SubAgents::AgentType
- Inherits:
-
Data
- Object
- Data
- RubynCode::SubAgents::AgentType
- Defined in:
- lib/rubyn_code/sub_agents/agent_type.rb
Overview
A sub-agent type: the built-in ‘explore`/`worker`, or a user-defined agent loaded from .rubyn-code/agents/*.md. Captures everything spawn_agent needs to run it — display name, system prompt, the tool allowlist (nil = access-based default), access level, and turn budget.
Instance Attribute Summary collapse
-
#access ⇒ Object
readonly
Returns the value of attribute access.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#max_iterations ⇒ Object
readonly
Returns the value of attribute max_iterations.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#system_prompt ⇒ Object
readonly
Returns the value of attribute system_prompt.
-
#tool_names ⇒ Object
readonly
Returns the value of attribute tool_names.
Instance Method Summary collapse
- #custom? ⇒ Boolean
-
#read_only? ⇒ Boolean
Read-only agents may only call read-risk tools.
Instance Attribute Details
#access ⇒ Object (readonly)
Returns the value of attribute access
9 10 11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 9 def access @access end |
#description ⇒ Object (readonly)
Returns the value of attribute description
9 10 11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 9 def description @description end |
#max_iterations ⇒ Object (readonly)
Returns the value of attribute max_iterations
9 10 11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 9 def max_iterations @max_iterations end |
#name ⇒ Object (readonly)
Returns the value of attribute name
9 10 11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 9 def name @name end |
#system_prompt ⇒ Object (readonly)
Returns the value of attribute system_prompt
9 10 11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 9 def system_prompt @system_prompt end |
#tool_names ⇒ Object (readonly)
Returns the value of attribute tool_names
9 10 11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 9 def tool_names @tool_names end |
Instance Method Details
#custom? ⇒ Boolean
14 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 14 def custom? = !%w[explore worker].include?(name) |
#read_only? ⇒ Boolean
Returns read-only agents may only call read-risk tools.
11 |
# File 'lib/rubyn_code/sub_agents/agent_type.rb', line 11 def read_only? = access == :read |