language-operator 0.1.49 → 0.1.51

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: d89b743075960db9dd988ae5f887180b8516d195957926e51ab4b89d8a196d52
4
- data.tar.gz: cc225f6a8b35c482b67f23089011cf54d52317773f6fbbfc4cd1b5c07bf4ccd2
3
+ metadata.gz: bdbbc50e60a7e0341e554e5dfcf6a10d767f94a1fd0c0b3d38746de5931588be
4
+ data.tar.gz: d78094e29d83460178895a73a2eb68bf15669ac6ca5428972d8f12a26cd4ff05
5
5
  SHA512:
6
- metadata.gz: 616074e08d5e3910920bebdcab8cc0896edc196561497864706c054ef5ffd7a3a304bdb37d163e47ce461a60f228257977e081c38de074c4a22a3ff5732d57a0
7
- data.tar.gz: e24978393c2a38de8f0fecd130d3cad25507f6373a46a1e2d11db0af3d72f76e3a4d92f87c8337198cd5267c4f4fb5770f13d640019d4ac8905bceb6974e931f
6
+ metadata.gz: a3cd2f73fc44ce393039949de80d094d27137ef0c2c0d3ee1a3fea062da9aeeeb2a366b4471c21892109a7210ff289166907c58a56c56b4b2db2eae4cd1f289f
7
+ data.tar.gz: 61bcbfcd13a10cad764dfe1d09caef92e584f1a7b9adf3846e64c7f44cc0e0843069404fc2b0d510be901a181045021b78de884f1428bc4543c3158ca942c2f7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- language-operator (0.1.49)
4
+ language-operator (0.1.51)
5
5
  faraday (~> 2.0)
6
6
  k8s-ruby (~> 0.17)
7
7
  mcp (~> 0.4)
@@ -58,8 +58,13 @@ module LanguageOperator
58
58
  logger.info("Workspace: #{@agent.workspace_path}")
59
59
  logger.info("Connected to #{@agent.servers_info.length} MCP server(s)")
60
60
 
61
- # Extract schedule from agent definition or use default
62
- cron_schedule = agent_def.schedule&.cron || '0 6 * * *'
61
+ # Extract schedule from agent definition and validate
62
+ cron_schedule = agent_def.schedule
63
+ if cron_schedule.nil? || cron_schedule.empty?
64
+ raise ArgumentError,
65
+ "Schedule required for scheduled mode agent '#{agent_def.name}'. " \
66
+ 'Use schedule() method to provide a cron expression.'
67
+ end
63
68
 
64
69
  logger.info('Scheduling workflow', cron: cron_schedule, agent: agent_def.name)
65
70
 
@@ -95,8 +100,13 @@ module LanguageOperator
95
100
  logger.info("Workspace: #{@agent.workspace_path}")
96
101
  logger.info("Connected to #{@agent.servers_info.length} MCP server(s)")
97
102
 
98
- # Extract schedule from agent definition or use default
99
- cron_schedule = agent_def.schedule&.cron || '0 6 * * *'
103
+ # Extract schedule from agent definition and validate
104
+ cron_schedule = agent_def.schedule
105
+ if cron_schedule.nil? || cron_schedule.empty?
106
+ raise ArgumentError,
107
+ "Schedule required for scheduled mode agent '#{agent_def.name}'. " \
108
+ 'Use schedule() method to provide a cron expression.'
109
+ end
100
110
 
101
111
  logger.info('Scheduling main block execution', cron: cron_schedule, agent: agent_def.name)
102
112
 
@@ -1101,7 +1101,8 @@ module LanguageOperator
1101
1101
  'namespace' => ctx.namespace,
1102
1102
  'labels' => {
1103
1103
  'app.kubernetes.io/name' => name,
1104
- 'app.kubernetes.io/component' => 'test-agent'
1104
+ 'app.kubernetes.io/component' => 'test-agent',
1105
+ 'langop.io/kind' => 'LanguageAgent'
1105
1106
  }
1106
1107
  },
1107
1108
  'spec' => {
@@ -284,6 +284,13 @@ module LanguageOperator
284
284
  def mode(mode = nil)
285
285
  return @execution_mode if mode.nil?
286
286
 
287
+ # Validate that scheduled mode has a schedule
288
+ if mode == :scheduled && @schedule.nil?
289
+ raise ArgumentError,
290
+ 'Cannot set mode to :scheduled without a schedule. ' \
291
+ 'Use schedule() method to provide a cron expression first.'
292
+ end
293
+
287
294
  @execution_mode = mode
288
295
  end
289
296
 
@@ -2,7 +2,7 @@
2
2
  :openapi: 3.0.3
3
3
  :info:
4
4
  :title: Language Operator Agent API
5
- :version: 0.1.49
5
+ :version: 0.1.51
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.49",
6
+ "version": "0.1.51",
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.49'
4
+ VERSION = '0.1.51'
5
5
  end
data/synth/002/output.log CHANGED
@@ -5,18 +5,17 @@
5
5
  ⚬ Chat session initialized (with_tools=false)
6
6
  ⚬ Executing main block (agent=test-agent, task_count=1)
7
7
  ⚬ Executing main block (inputs_keys=[])
8
- ⚬ Executing task (task=tell_fortune, type=neural, timeout=120.0, max_retries=3)
9
- ⚠ Task execution timed out (task=tell_fortune, attempt=1, timeout=120.0, execution_time=120.001)
10
- ✗ Task execution failed (task=tell_fortune, error_category=TIMEOUT, error_class=LanguageOperator::Agent::TaskTimeoutError, error_message=Task 'tell_fortune' execution failed: timed out after 120.0s, execution_time=120.001, retry_count=0, retryable=false, backtrace=["/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:481:in 'LanguageOperator::Agent::TaskExecutor#execute_single_attempt'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:414:in 'LanguageOperator::Agent::TaskExecutor#execute_with_retry'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:126:in 'block in LanguageOperator::Agent::TaskExecutor#execute_task'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/instrumentation.rb:45:in 'block in LanguageOperator::Agent::Instrumentation#with_span'", "/usr/lib/ruby/gems/3.4.0/gems/opentelemetry-api-1.7.0/lib/opentelemetry/trace/tracer.rb:37:in 'block in OpenTelemetry::Trace::Tracer#in_span'"])
11
- ✗ Task execution failed (task=tell_fortune, error_category=SYSTEM, error_class=LanguageOperator::Agent::TaskTimeoutError, error_message=Task 'tell_fortune' execution failed: timed out after 120.0s, execution_time=120.001, retry_count=0, retryable=false, backtrace=["/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:481:in 'LanguageOperator::Agent::TaskExecutor#execute_single_attempt'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:414:in 'LanguageOperator::Agent::TaskExecutor#execute_with_retry'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:126:in 'block in LanguageOperator::Agent::TaskExecutor#execute_task'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/instrumentation.rb:45:in 'block in LanguageOperator::Agent::Instrumentation#with_span'", "/usr/lib/ruby/gems/3.4.0/gems/opentelemetry-api-1.7.0/lib/opentelemetry/trace/tracer.rb:37:in 'block in OpenTelemetry::Trace::Tracer#in_span'"])
12
- ✗ Main block execution failed (error=LanguageOperator::Agent::TaskTimeoutError, message=Task 'tell_fortune' execution failed: timed out after 120.0s, backtrace=["/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:481:in 'LanguageOperator::Agent::TaskExecutor#execute_single_attempt'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:414:in 'LanguageOperator::Agent::TaskExecutor#execute_with_retry'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:126:in 'block in LanguageOperator::Agent::TaskExecutor#execute_task'", "/usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/instrumentation.rb:45:in 'block in LanguageOperator::Agent::Instrumentation#with_span'", "/usr/lib/ruby/gems/3.4.0/gems/opentelemetry-api-1.7.0/lib/opentelemetry/trace/tracer.rb:37:in 'block in OpenTelemetry::Trace::Tracer#in_span'"])
13
- Error loading agent code: Task 'tell_fortune' execution failed: timed out after 120.0s
14
- /usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:481:in 'LanguageOperator::Agent::TaskExecutor#execute_single_attempt'
15
- /usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:414:in 'LanguageOperator::Agent::TaskExecutor#execute_with_retry'
16
- /usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/task_executor.rb:126:in 'block in LanguageOperator::Agent::TaskExecutor#execute_task'
17
- /usr/lib/ruby/gems/3.4.0/gems/language-operator-0.1.48/lib/language_operator/agent/instrumentation.rb:45:in 'block in LanguageOperator::Agent::Instrumentation#with_span'
18
- /usr/lib/ruby/gems/3.4.0/gems/opentelemetry-api-1.7.0/lib/opentelemetry/trace/tracer.rb:37:in 'block in OpenTelemetry::Trace::Tracer#in_span'
19
- No fallback configured, exiting
20
- ✗ Agent failed with exit code: 1
8
+ ⚬ Executing task (task=tell_fortune, type=neural, timeout=240.0, max_retries=3)
9
+ ⚬ Sending prompt to LLM (task=tell_fortune, prompt_length=417)
10
+ ⚬ LLM response received, extracting content (task=tell_fortune)
11
+ ⚬ Neural task response received (task=tell_fortune, response_length=3617)
12
+ ⚬ Parsing neural task response (task=tell_fortune)
13
+ ⚬ Response parsed successfully (task=tell_fortune, output_keys=[:fortune])
14
+ ⚬ Validating task outputs (task=tell_fortune)
15
+ ⚬ Main execution (33.916s)
16
+ ⚬ Main block completed
17
+ ⚬ Main block execution completed (result={fortune: "Your kindness will bring you much happiness."})
18
+ Your kindness will bring you much happiness.
19
+ ✔ Agent completed successfully
21
20
 
22
21
 
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.49
4
+ version: 0.1.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Ryan