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: a28b526235b379f3ecb5679ee815f0ca980518e20b57a749336c7cd0d7d64878
4
- data.tar.gz: 929721c9eee8f39ab5101dad244e15ced6875c12f128c44737eb572672b14501
3
+ metadata.gz: 93ec6f2acf240eac8da803b1411e1a7b4132900fd3d6f162e398b5de2e8f536a
4
+ data.tar.gz: fdb53922b98facf4656035013c1890921eba18e767d88160316b8fa978b03fa2
5
5
  SHA512:
6
- metadata.gz: 6ec126476379175477727dc34a9132dce2833b30c39925ff209a10176d33f36ffd5aaacdd417acc0bf6c2253be442e278daa4d85812228c024ae10fc50cce1ad
7
- data.tar.gz: af80908355cd1cce749a2c0ba1fd9d0c3320e37e8d7b6f0c446d2fb4d943db2b80f4fc614c91c08f9d111e8855fbcbe9ff9175dffa686ad755b180f80e1fcf9e
6
+ metadata.gz: 2b6d5078b3b83149f4c2a2cfbddc25bfcd18692804329cfeedf28f97135562b95cac91f3e89aab5d77eea1e0ad8dbb537c9e0d4e5772a27a771eec51ac11c9ca
7
+ data.tar.gz: 9dd639680cf1a3e351d1cb9ee8b24c14eb6bf17fc842f34d4b68057f95ff6afa5aef77d387c2858cee3ee1430b45af4ae174e9006fedf25afb14a0b1ba0bb241
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- language-operator (0.1.41)
4
+ language-operator (0.1.43)
5
5
  faraday (~> 2.0)
6
6
  k8s-ruby (~> 0.17)
7
7
  mcp (~> 0.4)
@@ -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
- # execute_symbolic takes (inputs, context) - outputs are the inputs, task_executor is context
237
- output_config.execute_symbolic(outputs, task_executor)
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
- config[:timeout] = agent_def.constraints[:timeout] if agent_def.constraints[:timeout]
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
@@ -2,7 +2,7 @@
2
2
  :openapi: 3.0.3
3
3
  :info:
4
4
  :title: Language Operator Agent API
5
- :version: 0.1.41
5
+ :version: 0.1.43
6
6
  :description: HTTP API endpoints exposed by Language Operator reactive agents
7
7
  :contact:
8
8
  :name: Language Operator
@@ -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.41",
6
+ "version": "0.1.43",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "name": {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LanguageOperator
4
- VERSION = '0.1.41'
4
+ VERSION = '0.1.43'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language-operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.41
4
+ version: 0.1.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Ryan