language-operator 0.1.41 → 0.1.43
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 93ec6f2acf240eac8da803b1411e1a7b4132900fd3d6f162e398b5de2e8f536a
|
|
4
|
+
data.tar.gz: fdb53922b98facf4656035013c1890921eba18e767d88160316b8fa978b03fa2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b6d5078b3b83149f4c2a2cfbddc25bfcd18692804329cfeedf28f97135562b95cac91f3e89aab5d77eea1e0ad8dbb537c9e0d4e5772a27a771eec51ac11c9ca
|
|
7
|
+
data.tar.gz: 9dd639680cf1a3e351d1cb9ee8b24c14eb6bf17fc842f34d4b68057f95ff6afa5aef77d387c2858cee3ee1430b45af4ae174e9006fedf25afb14a0b1ba0bb241
|
data/Gemfile.lock
CHANGED
|
@@ -23,6 +23,7 @@ module LanguageOperator
|
|
|
23
23
|
# @example Creating a custom agent
|
|
24
24
|
# agent = LanguageOperator::Agent::Base.new(config)
|
|
25
25
|
# agent.execute_goal("Summarize daily news")
|
|
26
|
+
# rubocop:disable Metrics/ModuleLength
|
|
26
27
|
module Agent
|
|
27
28
|
# Module-level logger for Agent framework
|
|
28
29
|
@logger = LanguageOperator::Logger.new(component: 'Agent')
|
|
@@ -233,8 +234,8 @@ module LanguageOperator
|
|
|
233
234
|
# If symbolic implementation exists, use it
|
|
234
235
|
if output_config.symbolic?
|
|
235
236
|
logger.debug('Executing symbolic output handler')
|
|
236
|
-
#
|
|
237
|
-
output_config.
|
|
237
|
+
# call() takes (inputs, context) - outputs are the inputs, task_executor is context
|
|
238
|
+
output_config.call(outputs, task_executor)
|
|
238
239
|
elsif output_config.neural?
|
|
239
240
|
# Neural output - would need LLM access to execute
|
|
240
241
|
# For now, just log the instruction
|
|
@@ -257,11 +258,34 @@ module LanguageOperator
|
|
|
257
258
|
config = {}
|
|
258
259
|
|
|
259
260
|
if agent_def.constraints
|
|
260
|
-
|
|
261
|
+
if agent_def.constraints[:timeout]
|
|
262
|
+
timeout = agent_def.constraints[:timeout]
|
|
263
|
+
config[:timeout] = timeout.is_a?(String) ? parse_duration(timeout) : timeout
|
|
264
|
+
end
|
|
261
265
|
config[:max_retries] = agent_def.constraints[:max_retries] if agent_def.constraints[:max_retries]
|
|
262
266
|
end
|
|
263
267
|
|
|
264
268
|
config
|
|
265
269
|
end
|
|
270
|
+
|
|
271
|
+
# Parse duration string to seconds
|
|
272
|
+
#
|
|
273
|
+
# @param duration [String] Duration string (e.g., "10m", "2h", "30s")
|
|
274
|
+
# @return [Numeric] Duration in seconds
|
|
275
|
+
def self.parse_duration(duration)
|
|
276
|
+
case duration
|
|
277
|
+
when /^(\d+)s$/
|
|
278
|
+
::Regexp.last_match(1).to_i
|
|
279
|
+
when /^(\d+)m$/
|
|
280
|
+
::Regexp.last_match(1).to_i * 60
|
|
281
|
+
when /^(\d+)h$/
|
|
282
|
+
::Regexp.last_match(1).to_i * 3600
|
|
283
|
+
when Numeric
|
|
284
|
+
duration
|
|
285
|
+
else
|
|
286
|
+
raise ArgumentError, "Invalid duration format: #{duration}. Use format like '10m', '2h', '30s'"
|
|
287
|
+
end
|
|
288
|
+
end
|
|
266
289
|
end
|
|
290
|
+
# rubocop:enable Metrics/ModuleLength
|
|
267
291
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$id": "https://github.com/language-operator/language-operator-gem/schema/agent-dsl.json",
|
|
4
4
|
"title": "Language Operator Agent DSL",
|
|
5
5
|
"description": "Schema for defining autonomous AI agents using the Language Operator DSL",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.43",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"name": {
|