Class: Html2rss::MCP::Outcome::NextStep
- Inherits:
-
Data
- Object
- Data
- Html2rss::MCP::Outcome::NextStep
- Defined in:
- lib/html2rss/mcp/outcome.rb,
lib/html2rss/mcp/outcome.rb
Overview
Closed set of agent next actions. Invalid names cannot be constructed.
Constant Summary collapse
- NAMES =
Wire names for
next_step. %i[done inspect recon validate apply scrape capture read_runtime test].freeze
Instance Attribute Summary collapse
-
#guidance ⇒ Object
readonly
Returns the value of attribute guidance.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, guidance: nil) ⇒ NextStep
constructor
A new instance of NextStep.
Constructor Details
#initialize(name:, guidance: nil) ⇒ NextStep
Returns a new instance of NextStep.
24 25 26 27 28 29 |
# File 'lib/html2rss/mcp/outcome.rb', line 24 def initialize(name:, guidance: nil) step = name.to_sym raise ArgumentError, "unknown next_step: #{name.inspect}" unless NAMES.include?(step) super(name: step, guidance: (guidance || Playbook::GUIDANCE.fetch(step)).freeze) end |
Instance Attribute Details
#guidance ⇒ Object (readonly)
Returns the value of attribute guidance
13 14 15 |
# File 'lib/html2rss/mcp/outcome.rb', line 13 def guidance @guidance end |
#name ⇒ Object (readonly)
Returns the value of attribute name
13 14 15 |
# File 'lib/html2rss/mcp/outcome.rb', line 13 def name @name end |