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 +4 -4
- data/lib/active_harness/agent.rb +8 -3
- data/lib/active_harness/pipeline.rb +6 -0
- data/lib/active_harness/tribunal.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78572139b0f913adcfd708045581ad90989413a1a31535af37b723a7919c407b
|
|
4
|
+
data.tar.gz: 0b04931f1fec80dfd30e6f642b594ab7b1a26ba07a4722a7af79b44b48301e15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79a7c9b4d7e803e5565cad3e3148c123ec5c28dff5cd09340ca613b1e69ed7a1523d737d9d7bff2acf01e08c4c827f489f5f4442d00b7925ade2a5be9ea0100f
|
|
7
|
+
data.tar.gz: 98a0c42415e8538d82f50579abd7720585da3bf990e59f53d49f5ab95fb93e7cff9a8dc0614d709a067028d1a77d9b57cd6aa5ce3fb89054d5ab79f4bd2bf2c8
|
data/lib/active_harness/agent.rb
CHANGED
|
@@ -28,8 +28,13 @@ module ActiveHarness
|
|
|
28
28
|
# -------------------------------------------------------------------------
|
|
29
29
|
# Instance API
|
|
30
30
|
# -------------------------------------------------------------------------
|
|
31
|
-
attr_accessor :input
|
|
32
|
-
attr_reader :
|
|
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
|
|
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
|