Class: KairosMcp::Daemon::TaskDag::Node

Inherits:
Struct
  • Object
show all
Defined in:
lib/kairos_mcp/daemon/task_dag.rb

Overview

Node represents a single tool invocation within the DAG.

‘args` is captured verbatim for downstream hashing; the DAG itself never interprets it. `failure_policy` is per-node so different branches of the DAG can have different tolerance semantics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def args
  @args
end

#depends_onObject

Returns the value of attribute depends_on

Returns:

  • (Object)

    the current value of depends_on



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def depends_on
  @depends_on
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def error
  @error
end

#failure_policyObject

Returns the value of attribute failure_policy

Returns:

  • (Object)

    the current value of failure_policy



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def failure_policy
  @failure_policy
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def id
  @id
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def status
  @status
end

#toolObject

Returns the value of attribute tool

Returns:

  • (Object)

    the current value of tool



36
37
38
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 36

def tool
  @tool
end

Instance Method Details

#cancelled?Boolean

Returns:

  • (Boolean)


44
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 44

def cancelled?;  status == :cancelled;  end

#completed?Boolean

Returns:

  • (Boolean)


42
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 42

def completed?;  status == :completed;  end

#failed?Boolean

Returns:

  • (Boolean)


43
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 43

def failed?;     status == :failed;     end

#pending?Boolean

Returns:

  • (Boolean)


40
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 40

def pending?;    status == :pending;    end

#running?Boolean

Returns:

  • (Boolean)


41
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 41

def running?;    status == :running;    end

#terminal?Boolean

Returns:

  • (Boolean)


45
# File 'lib/kairos_mcp/daemon/task_dag.rb', line 45

def terminal?;   %i[completed failed cancelled].include?(status); end