Class: OllamaAgent::Runtime::ExecutionContext
- Inherits:
-
Object
- Object
- OllamaAgent::Runtime::ExecutionContext
- Defined in:
- lib/ollama_agent/runtime/execution_context.rb
Overview
Immutable execution context carried through runtime boundaries.
Instance Attribute Summary collapse
-
#manifest_id ⇒ Object
readonly
Returns the value of attribute manifest_id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#workspace_root ⇒ Object
readonly
Returns the value of attribute workspace_root.
Instance Method Summary collapse
-
#initialize(mode:, workspace_root:, manifest_id:, metadata: {}) ⇒ ExecutionContext
constructor
A new instance of ExecutionContext.
Constructor Details
#initialize(mode:, workspace_root:, manifest_id:, metadata: {}) ⇒ ExecutionContext
Returns a new instance of ExecutionContext.
11 12 13 14 15 16 17 18 |
# File 'lib/ollama_agent/runtime/execution_context.rb', line 11 def initialize(mode:, workspace_root:, manifest_id:, metadata: {}) raise ArgumentError, "invalid execution mode: #{mode}" unless ExecutionMode.valid?(mode) @mode = mode.to_s @workspace_root = workspace_root @manifest_id = manifest_id @metadata = .dup.freeze end |
Instance Attribute Details
#manifest_id ⇒ Object (readonly)
Returns the value of attribute manifest_id.
9 10 11 |
# File 'lib/ollama_agent/runtime/execution_context.rb', line 9 def manifest_id @manifest_id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
9 10 11 |
# File 'lib/ollama_agent/runtime/execution_context.rb', line 9 def @metadata end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
9 10 11 |
# File 'lib/ollama_agent/runtime/execution_context.rb', line 9 def mode @mode end |
#workspace_root ⇒ Object (readonly)
Returns the value of attribute workspace_root.
9 10 11 |
# File 'lib/ollama_agent/runtime/execution_context.rb', line 9 def workspace_root @workspace_root end |