foobara-agent-backed-command 0.0.6 → 0.0.8
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/CHANGELOG.md +8 -0
- data/src/agent_backed_command.rb +23 -3
- 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: 68e97a54dce3803c000113406c5e14e66e410a96c4256a64bbac482897490461
|
4
|
+
data.tar.gz: cb249a40e7292d991553d32b728c96f3018855d9be58b9eb44269b6f5ea6a72f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78bfff33febf0d1fff1e74b0b5dc6ec194dd966250969ee676002a63bae099ca4f58310f8a05bee0551ee68c7a390607603b7a6f8e7b49e45d527c19a49c17f6
|
7
|
+
data.tar.gz: f128760ef5b31aaf58ffa21b7c457d4c8b39d6026c5662820b193202633db6555cdaabe448bcea00035830539148adb51f074fcfeac8ab314bb262e99a355690
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.0.8] - 2025-07-23
|
2
|
+
|
3
|
+
- Attempt to fix some regressions by reverting some construct goal changes
|
4
|
+
|
5
|
+
## [0.0.7] - 2025-07-23
|
6
|
+
|
7
|
+
- Do not let ABCs use the #agent_options input of other ABCs
|
8
|
+
|
1
9
|
## [0.0.6] - 2025-07-21
|
2
10
|
|
3
11
|
- Make sure foobara-ai gem is properly loaded
|
data/src/agent_backed_command.rb
CHANGED
@@ -126,13 +126,12 @@ module Foobara
|
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
129
|
-
agent_name = agent_options&.[](:agent_name) || self.class.agent_name ||
|
129
|
+
agent_name = agent_options&.[](:agent_name) || self.class.agent_name || self.class.scoped_short_name
|
130
130
|
|
131
131
|
verbose = agent_options&.[](:verbose)
|
132
132
|
verbose = self.class.verbose? if verbose.nil?
|
133
133
|
|
134
134
|
opts = {
|
135
|
-
command_classes:,
|
136
135
|
include_message_to_user_in_result:,
|
137
136
|
result_type: agent_result_type,
|
138
137
|
verbose:,
|
@@ -164,6 +163,27 @@ module Foobara
|
|
164
163
|
end
|
165
164
|
|
166
165
|
self.agent = Foobara::Agent.new(**opts)
|
166
|
+
|
167
|
+
command_classes.each do |klass|
|
168
|
+
if klass.is_a?(::Symbol)
|
169
|
+
real_class = Namespace.global.foobara_lookup_command(
|
170
|
+
klass,
|
171
|
+
mode: Namespace::LookupMode::ABSOLUTE
|
172
|
+
)
|
173
|
+
|
174
|
+
if real_class
|
175
|
+
klass = real_class
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
opts = if klass.is_a?(Class) && klass < AgentBackedCommand
|
180
|
+
{ inputs: { reject: [:agent_options] } }
|
181
|
+
else
|
182
|
+
{}
|
183
|
+
end
|
184
|
+
|
185
|
+
agent.connect(klass, **opts)
|
186
|
+
end
|
167
187
|
end
|
168
188
|
|
169
189
|
def agent_options
|
@@ -209,7 +229,7 @@ module Foobara
|
|
209
229
|
inputs_type,
|
210
230
|
association_depth:
|
211
231
|
)
|
212
|
-
goal += "
|
232
|
+
goal += "\n\nThe inputs to this command have the following type:\n\n#{json_inputs_type}\n\n"
|
213
233
|
|
214
234
|
serializer = if pass_aggregates_to_llm?
|
215
235
|
CommandConnectors::Serializers::AggregateSerializer
|