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_url validate_config apply_config scrape_url capture_config read_runtime].freeze
- GUIDANCE =
Default guidance copy keyed by NAMES.
{ done: 'Done. Read payload for the result.', inspect_url: 'Call inspect_url next. Read payload for recon (final_url, status, ' \ 'scheme_downgrade, alternate_feeds).', validate_config: 'Call validate_config with payload.yaml or a config hash (XOR, not both).', apply_config: 'Call apply_config next. Confirm payload.item_count before shipping.', scrape_url: 'Call scrape_url for articles now. strategy auto already runs Faraday then Botasaurus.', capture_config: 'Call capture_config for a reusable YAML draft, then follow next_step.', read_runtime: 'Read html2rss://runtime. Set BOTASAURUS_SCRAPER_URL on the MCP process ' \ 'if botasaurus_configured is false.' }.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.
36 37 38 39 40 41 |
# File 'lib/html2rss/mcp/outcome.rb', line 36 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 || 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 |