active_harness 0.2.26 → 0.2.27

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: e251d772ac23a015473080cd54ec79dcd1d707b3ca9fa1c8de6132f8152fa873
4
- data.tar.gz: 68674b1744f7696cb26cc02a505e60e8c6ae117c7f20a118a2e8102c8f0821f5
3
+ metadata.gz: 5b406bc5feeebdb4cc26e215a65d25dd931605684c6f05ee7cdd71de5910a1d6
4
+ data.tar.gz: a34d2e22840ae906d47b0e27fe271d97b42d97a0fce64a19a58e15c296f00bf7
5
5
  SHA512:
6
- metadata.gz: 99ef61764b9c6b7564f1064c191cb89780670c7e24966556f3f52e3fa15b631e492c9c29a3ac7f601249db9515afed291fe2e6d6e333f9fb6c2043dbad22dac1
7
- data.tar.gz: 8c8609086bc572183398cf20ff0ea2957e8acd8337db9dadfcb8045f1bbdbb7a708b3f3b27273809a717e91196abe4bf272778d521bfa0926338f0df03486e84
6
+ metadata.gz: f53ee25213ac7404840349cee732aa59b1dc25168b4e362028e7542fd51a0c51e9f2a2af4b8cbad9a552e74a9c4769d147b7d642e3b051df9c293af58bc87f34
7
+ data.tar.gz: d56efdd52b38afd9153903611fd860e316a59eb8f5d5b5c3ed0510b22647b8008a3b22f4e0c8430322548bb82a50c69cc4d6c086e8d965653c22d795fd43cae7
@@ -53,6 +53,7 @@ module ActiveHarness
53
53
  obj.instance_variable_set(:@input, @input)
54
54
  obj.instance_variable_set(:@context, @context)
55
55
  obj.instance_variable_set(:@config, @config)
56
+ obj.instance_variable_set(:@memory, @memory)
56
57
  end
57
58
  end
58
59
  end
@@ -14,6 +14,7 @@ module ActiveHarness
14
14
  input: nil,
15
15
  context: {},
16
16
  params: {},
17
+ memory: nil,
17
18
  models: nil,
18
19
  streams: {}
19
20
  )
@@ -21,6 +22,7 @@ module ActiveHarness
21
22
  input: input,
22
23
  context: context,
23
24
  params: params,
25
+ memory: memory,
24
26
  models: models,
25
27
  streams: streams
26
28
  ).call
@@ -49,7 +51,8 @@ module ActiveHarness
49
51
  # -------------------------------------------------------------------------
50
52
  attr_accessor :input,
51
53
  :context,
52
- :params
54
+ :params,
55
+ :memory
53
56
  attr_reader :result,
54
57
  :token_stream,
55
58
  :event_stream
@@ -63,6 +66,7 @@ module ActiveHarness
63
66
  input: nil,
64
67
  context: {},
65
68
  params: {},
69
+ memory: nil,
66
70
  models: nil,
67
71
  streams: {}
68
72
  )
@@ -71,6 +75,7 @@ module ActiveHarness
71
75
  normalize_input!
72
76
  @context = context
73
77
  @params = params
78
+ @memory = memory
74
79
  @models_override = Array(models) if models
75
80
  @token_stream = streams[:token]
76
81
  @event_stream = streams[:agent]
@@ -25,7 +25,14 @@ module ActiveHarness
25
25
  "anthropic-version" => ANTHROPIC_VERSION
26
26
  }
27
27
 
28
- return call_streaming(url: config.anthropic_api_url, headers: headers, body: body, stream: stream, provider: :anthropic, model: model) if stream
28
+ return call_streaming(
29
+ url: config.anthropic_api_url,
30
+ headers: headers,
31
+ body: body,
32
+ stream: stream,
33
+ provider: :anthropic,
34
+ model: model
35
+ ) if stream
29
36
 
30
37
  raw = post_json(URI(config.anthropic_api_url), headers: headers, body: body)
31
38
  data = parse!(raw)
@@ -48,7 +48,8 @@ module ActiveHarness
48
48
  # -------------------------------------------------------------------------
49
49
  attr_accessor :input,
50
50
  :context,
51
- :params
51
+ :params,
52
+ :memory
52
53
  attr_reader :results,
53
54
  :errors,
54
55
  :verdict,
@@ -62,6 +63,7 @@ module ActiveHarness
62
63
  input: nil,
63
64
  context: {},
64
65
  params: {},
66
+ memory: nil,
65
67
  agents: nil,
66
68
  timeout: 7,
67
69
  streams: {},
@@ -72,6 +74,7 @@ module ActiveHarness
72
74
  @input = input
73
75
  @context = context
74
76
  @params = params
77
+ @memory = memory
75
78
  @agents = agents || config[:agents]
76
79
  @timeout = timeout
77
80
  @process_block = config[:process]
@@ -30,7 +30,7 @@ require_relative "active_harness/pipeline"
30
30
  require_relative "active_harness/railtie" if defined?(Rails::Railtie)
31
31
 
32
32
  module ActiveHarness
33
- VERSION = "0.2.26"
33
+ VERSION = "0.2.27"
34
34
 
35
35
  class << self
36
36
  # Configure ActiveHarness.
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.26
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - the-teacher