Class: KairosMcp::KairosChain::SkillTransition
- Inherits:
-
Object
- Object
- KairosMcp::KairosChain::SkillTransition
- Defined in:
- lib/kairos_mcp/kairos_chain/skill_transition.rb
Instance Attribute Summary collapse
-
#actor ⇒ Object
readonly
Returns the value of attribute actor.
-
#agent_id ⇒ Object
readonly
Returns the value of attribute agent_id.
-
#diff_hash ⇒ Object
readonly
Returns the value of attribute diff_hash.
-
#next_ast_hash ⇒ Object
readonly
Returns the value of attribute next_ast_hash.
-
#prev_ast_hash ⇒ Object
readonly
Returns the value of attribute prev_ast_hash.
-
#reason_ref ⇒ Object
readonly
Returns the value of attribute reason_ref.
-
#skill_id ⇒ Object
readonly
Returns the value of attribute skill_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(skill_id:, prev_ast_hash:, next_ast_hash:, diff_hash:, actor: "AI", agent_id: "Kairos", timestamp: Time.now.iso8601, reason_ref: nil) ⇒ SkillTransition
constructor
A new instance of SkillTransition.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(skill_id:, prev_ast_hash:, next_ast_hash:, diff_hash:, actor: "AI", agent_id: "Kairos", timestamp: Time.now.iso8601, reason_ref: nil) ⇒ SkillTransition
Returns a new instance of SkillTransition.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 10 def initialize(skill_id:, prev_ast_hash:, next_ast_hash:, diff_hash:, actor: "AI", agent_id: "Kairos", timestamp: Time.now.iso8601, reason_ref: nil) @skill_id = skill_id @prev_ast_hash = prev_ast_hash @next_ast_hash = next_ast_hash @diff_hash = diff_hash @actor = actor @agent_id = agent_id @timestamp = @reason_ref = reason_ref end |
Instance Attribute Details
#actor ⇒ Object (readonly)
Returns the value of attribute actor.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def actor @actor end |
#agent_id ⇒ Object (readonly)
Returns the value of attribute agent_id.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def agent_id @agent_id end |
#diff_hash ⇒ Object (readonly)
Returns the value of attribute diff_hash.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def diff_hash @diff_hash end |
#next_ast_hash ⇒ Object (readonly)
Returns the value of attribute next_ast_hash.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def next_ast_hash @next_ast_hash end |
#prev_ast_hash ⇒ Object (readonly)
Returns the value of attribute prev_ast_hash.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def prev_ast_hash @prev_ast_hash end |
#reason_ref ⇒ Object (readonly)
Returns the value of attribute reason_ref.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def reason_ref @reason_ref end |
#skill_id ⇒ Object (readonly)
Returns the value of attribute skill_id.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def skill_id @skill_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
7 8 9 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 7 def @timestamp end |
Class Method Details
.from_json(json_str) ⇒ Object
39 40 41 42 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 39 def self.from_json(json_str) data = JSON.parse(json_str, symbolize_names: true) new(**data) end |
Instance Method Details
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 22 def to_h { skill_id: @skill_id, prev_ast_hash: @prev_ast_hash, next_ast_hash: @next_ast_hash, diff_hash: @diff_hash, actor: @actor, agent_id: @agent_id, timestamp: @timestamp, reason_ref: @reason_ref } end |
#to_json(*args) ⇒ Object
35 36 37 |
# File 'lib/kairos_mcp/kairos_chain/skill_transition.rb', line 35 def to_json(*args) to_h.to_json(*args) end |