active_harness 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 491b57221c1f401f55e454985bab3eb03da61bac7f03b87a0f3c0251784b3d66
4
- data.tar.gz: 7932e5787bed0fbf4b8f987b8f8e77c4f56e827b1a608ac10402199e09f8f28a
3
+ metadata.gz: 78572139b0f913adcfd708045581ad90989413a1a31535af37b723a7919c407b
4
+ data.tar.gz: 0b04931f1fec80dfd30e6f642b594ab7b1a26ba07a4722a7af79b44b48301e15
5
5
  SHA512:
6
- metadata.gz: 4bfd567d16e8d5b557462d351169b6b5f6a5f151c31a07728edb3665fe1095a03b8e15286b72aa0f0726a41809c071fc66b6d3cd794f91f0ed540cebd37d4c56
7
- data.tar.gz: 99784cf80f2aee2dd505643cbea083e09f79d188a75b6d782bcdcc8e6d17875febccf34df3fde9ceee07cd8b7c8996b2085b8e69f7839dcdde437260e4573810
6
+ metadata.gz: 79a7c9b4d7e803e5565cad3e3148c123ec5c28dff5cd09340ca613b1e69ed7a1523d737d9d7bff2acf01e08c4c827f489f5f4442d00b7925ade2a5be9ea0100f
7
+ data.tar.gz: 98a0c42415e8538d82f50579abd7720585da3bf990e59f53d49f5ab95fb93e7cff9a8dc0614d709a067028d1a77d9b57cd6aa5ce3fb89054d5ab79f4bd2bf2c8
@@ -28,8 +28,13 @@ module ActiveHarness
28
28
  # -------------------------------------------------------------------------
29
29
  # Instance API
30
30
  # -------------------------------------------------------------------------
31
- attr_accessor :input
32
- attr_reader :context, :result
31
+ attr_accessor :input, :context
32
+ attr_reader :result
33
+
34
+ def models=(list)
35
+ @models_override = Array(list)
36
+ @model_list_proxy = nil
37
+ end
33
38
 
34
39
  def initialize(input: nil, context: {}, models: nil, memory: nil, stream: nil)
35
40
  @input = input
@@ -64,7 +69,7 @@ module ActiveHarness
64
69
  save_to_memory(result)
65
70
  run_hook(:after_call, result)
66
71
  @result = result
67
- return result
72
+ return self
68
73
  rescue *RETRYABLE_ERRORS => e
69
74
  elapsed = (Process.clock_gettime(Process::CLOCK_MONOTONIC) - t0).round(3)
70
75
  attempts << attempt_entry(entry, e, elapsed)
@@ -122,6 +122,12 @@ module ActiveHarness
122
122
  # -------------------------------------------------------------------------
123
123
  attr_reader :original_input, :output, :stopped_at, :stop_reason,
124
124
  :execution_time, :step_results, :context
125
+ attr_writer :context
126
+
127
+ def input=(value)
128
+ @original_input = value
129
+ @payload = value
130
+ end
125
131
 
126
132
  def initialize(input:, context: {}, memory: nil)
127
133
  @original_input = input
@@ -94,7 +94,7 @@ module ActiveHarness
94
94
  end
95
95
  end
96
96
 
97
- attr_accessor :input
97
+ attr_accessor :input, :context
98
98
  attr_reader :results, :errors, :verdict, :execution_time, :agent_execution_times
99
99
 
100
100
  def initialize(input: nil, context: {}, agents: nil, timeout: 7)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_harness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - the-teacher