Class: Html2rss::MCP::Outcome::NextStep

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(name:, guidance: nil) ⇒ NextStep

Returns a new instance of NextStep.

Parameters:

  • name (Symbol, String)
  • guidance (String, nil) (defaults to: nil)

Raises:

  • (ArgumentError)


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

#guidanceObject (readonly)

Returns the value of attribute guidance

Returns:

  • (Object)

    the current value of guidance



13
14
15
# File 'lib/html2rss/mcp/outcome.rb', line 13

def guidance
  @guidance
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



13
14
15
# File 'lib/html2rss/mcp/outcome.rb', line 13

def name
  @name
end