Class: Mistri::SubAgent::Runtime
- Inherits:
-
Object
- Object
- Mistri::SubAgent::Runtime
- Defined in:
- lib/mistri/sub_agent/runtime.rb
Overview
The live dependencies a host constructs for one dispatched child. Mistri verifies the provider and tools against the durable spec; the host owns tenant scope, backend isolation, and the freshness of every object placed here.
Instance Attribute Summary collapse
-
#agent_options ⇒ Object
readonly
Returns the value of attribute agent_options.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
-
#system ⇒ Object
readonly
Returns the value of attribute system.
-
#tools ⇒ Object
readonly
Returns the value of attribute tools.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(provider:, system: nil, tools: [], schema: nil, cleanup: nil, **agent_options) ⇒ Runtime
constructor
A new instance of Runtime.
Constructor Details
#initialize(provider:, system: nil, tools: [], schema: nil, cleanup: nil, **agent_options) ⇒ Runtime
Returns a new instance of Runtime.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/mistri/sub_agent/runtime.rb', line 40 def initialize(provider:, system: nil, tools: [], schema: nil, cleanup: nil, **) raise ArgumentError, "runtime tools must be an Array" unless tools.is_a?(Array) unless cleanup.nil? || cleanup.respond_to?(:call) raise ArgumentError, "runtime cleanup must be callable" end @provider = provider @system = system @tools = Array.new(tools).freeze @schema = schema @cleanup = cleanup @agent_options = .dup.freeze freeze end |
Instance Attribute Details
#agent_options ⇒ Object (readonly)
Returns the value of attribute agent_options.
38 39 40 |
# File 'lib/mistri/sub_agent/runtime.rb', line 38 def @agent_options end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
38 39 40 |
# File 'lib/mistri/sub_agent/runtime.rb', line 38 def provider @provider end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
38 39 40 |
# File 'lib/mistri/sub_agent/runtime.rb', line 38 def schema @schema end |
#system ⇒ Object (readonly)
Returns the value of attribute system.
38 39 40 |
# File 'lib/mistri/sub_agent/runtime.rb', line 38 def system @system end |
#tools ⇒ Object (readonly)
Returns the value of attribute tools.
38 39 40 |
# File 'lib/mistri/sub_agent/runtime.rb', line 38 def tools @tools end |
Instance Method Details
#close ⇒ Object
56 |
# File 'lib/mistri/sub_agent/runtime.rb', line 56 def close = @cleanup&.call |