language-operator 0.1.39 → 0.1.41

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: a3674b7904fe01e280096b7e7c37ce8be922379d75a194e31ffd5239b082e7b8
4
- data.tar.gz: 61cd4ab21b5495b537cb4babbe5e0a14c4890a93b9b1f2a1d4d4069c53c3ddc1
3
+ metadata.gz: a28b526235b379f3ecb5679ee815f0ca980518e20b57a749336c7cd0d7d64878
4
+ data.tar.gz: 929721c9eee8f39ab5101dad244e15ced6875c12f128c44737eb572672b14501
5
5
  SHA512:
6
- metadata.gz: 33714e1bd58eb58d54101a038954a1fbd425ffa34904fdfc8cb3dcb9ba83b0090d445343071190b7bb48e599d8691d99b4918f8a9eab2ecf135634f92c7825ac
7
- data.tar.gz: 235149dfa2f126e31b8450426d70ebb25f39badb30b343e274c7b50ab0d7b3674f224ffae251589967c4ea47022b171af3f0212cd466bc6c994171534e0b48ef
6
+ metadata.gz: 6ec126476379175477727dc34a9132dce2833b30c39925ff209a10176d33f36ffd5aaacdd417acc0bf6c2253be442e278daa4d85812228c024ae10fc50cce1ad
7
+ data.tar.gz: af80908355cd1cce749a2c0ba1fd9d0c3320e37e8d7b6f0c446d2fb4d943db2b80f4fc614c91c08f9d111e8855fbcbe9ff9175dffa686ad755b180f80e1fcf9e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- language-operator (0.1.39)
4
+ language-operator (0.1.41)
5
5
  faraday (~> 2.0)
6
6
  k8s-ruby (~> 0.17)
7
7
  mcp (~> 0.4)
@@ -50,6 +50,27 @@ module LanguageOperator
50
50
  load_and_run(agent)
51
51
  end
52
52
 
53
+ # Load and run agent from a specific file path
54
+ #
55
+ # @param code_path [String] Path to agent DSL code file
56
+ # @param agent_name [String, nil] Name of the agent definition to run
57
+ # @param config_path [String, nil] Path to configuration file
58
+ # @return [void]
59
+ def self.load_and_run_from_file(code_path, agent_name = nil, config_path: nil)
60
+ # Disable stdout buffering for real-time logging in containers
61
+ $stdout.sync = true
62
+ $stderr.sync = true
63
+
64
+ config_path ||= ENV.fetch('CONFIG_PATH', 'config.yaml')
65
+ config = LanguageOperator::Client::Config.load_with_fallback(config_path)
66
+
67
+ # Create agent instance
68
+ agent = LanguageOperator::Agent::Base.new(config)
69
+
70
+ # Load and run the specified agent code
71
+ load_synthesized_agent(agent, code_path, agent_name)
72
+ end
73
+
53
74
  # Load synthesized agent code and run with definition if available
54
75
  #
55
76
  # @param agent [LanguageOperator::Agent::Base] The agent instance
@@ -130,7 +151,7 @@ module LanguageOperator
130
151
 
131
152
  # Check if agent uses DSL v1 (task/main) or v0 (workflow/step)
132
153
  uses_dsl_v1 = agent_def.main&.defined?
133
- uses_dsl_v0 = agent_def.workflow
154
+ uses_dsl_v0 = agent_def.respond_to?(:workflow) && agent_def.workflow
134
155
 
135
156
  case agent.mode
136
157
  when 'autonomous', 'interactive'
@@ -2,7 +2,7 @@
2
2
  :openapi: 3.0.3
3
3
  :info:
4
4
  :title: Language Operator Agent API
5
- :version: 0.1.39
5
+ :version: 0.1.41
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.39",
6
+ "version": "0.1.41",
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.39'
4
+ VERSION = '0.1.41'
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.39
4
+ version: 0.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Ryan