language-operator 0.1.47 → 0.1.48

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: 6a7f1f7e5550c2118f096f8dad4eaba602d36c99bee49ed7c0bdf09b6c3a5098
4
- data.tar.gz: e1c4b977724e311aadc28788d4d83affb87cc0bc21c34c423984e6fe8c3a5b79
3
+ metadata.gz: e9abeed9980c39ca3748905b04a564cc331a31d51e2c7ea7cec64af9e706ebae
4
+ data.tar.gz: d8a0fcb4f2091819e58cd5f15963ed06f2282af03ed739eeba98584bacc0dd38
5
5
  SHA512:
6
- metadata.gz: 2261ac662c454529aa1e56e2ae3c59bcd989f523a314ff5a4cf8b769a727fb9544def42d570271c9529761d9fd32366347f89262922ecef43e0f73f2fbe56409
7
- data.tar.gz: dc31892136d0702e32c6e107b50c8a90d5b439bacc32e59015c84f2490196526177f5825c04537a3c0ef1d6b65f9367ba3a340ee14fcd0ca7f9dceca77e7ce55
6
+ metadata.gz: 4771c989514116d9ea6b9910e603a8c803ca0ff7fbc6df08989ce5074962bb91204aaab20040a8dba27eb317be2edbb4ffd7296e7f77d4375321faccedf56e94
7
+ data.tar.gz: e12b6e974277518cae6a338920ece81506c9181d055462ccd97c56521e91a76130bdfec95e9ff0fe16ccaeef84cd9befbb95405019d749eb5874f659d2fdbce4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- language-operator (0.1.47)
4
+ language-operator (0.1.48)
5
5
  faraday (~> 2.0)
6
6
  k8s-ruby (~> 0.17)
7
7
  mcp (~> 0.4)
@@ -288,7 +288,10 @@ module LanguageOperator
288
288
  end
289
289
  prompt += "\n"
290
290
 
291
- prompt += 'Return ONLY valid JSON matching the output schema. '
291
+ prompt += "## Response Format\n"
292
+ prompt += "Return ONLY valid JSON matching the output schema above.\n"
293
+ prompt += "Do NOT include any explanations, thinking, or text before or after the JSON.\n"
294
+ prompt += "Do NOT use [THINK] tags or any other markup.\n"
292
295
  prompt += "Use available tools as needed to complete the task.\n"
293
296
 
294
297
  prompt
@@ -301,15 +304,18 @@ module LanguageOperator
301
304
  # @return [Hash] Parsed outputs
302
305
  # @raise [RuntimeError] If parsing fails
303
306
  def parse_neural_response(response_text, task)
307
+ # Strip thinking tags that some models add (e.g., [THINK]...[/THINK])
308
+ cleaned_text = response_text.gsub(%r{\[THINK\].*?\[/THINK\]}m, '').strip
309
+
304
310
  # Try to extract JSON from response
305
311
  # Look for JSON code blocks first
306
- json_match = response_text.match(/```json\s*\n(.*?)\n```/m)
312
+ json_match = cleaned_text.match(/```json\s*\n(.*?)\n```/m)
307
313
  json_text = if json_match
308
314
  json_match[1]
309
315
  else
310
316
  # Try to find raw JSON object
311
- json_object_match = response_text.match(/\{.*\}/m)
312
- json_object_match ? json_object_match[0] : response_text
317
+ json_object_match = cleaned_text.match(/\{.*\}/m)
318
+ json_object_match ? json_object_match[0] : cleaned_text
313
319
  end
314
320
 
315
321
  # Parse JSON
@@ -292,18 +292,18 @@ module LanguageOperator
292
292
  label_selector = "app.kubernetes.io/name=#{name}"
293
293
 
294
294
  # Use kubectl logs with label selector
295
- cmd = "#{ctx.kubectl_prefix} logs -l #{label_selector} #{tail_arg} #{follow_arg} --prefix --all-containers"
295
+ cmd = "#{ctx.kubectl_prefix} logs -l #{label_selector} #{tail_arg} #{follow_arg} --all-containers"
296
296
 
297
297
  Formatters::ProgressFormatter.info("Streaming logs for agent '#{name}'...")
298
298
  puts
299
299
 
300
- # Stream and format logs in real-time
300
+ # Stream raw logs in real-time without formatting
301
301
  require 'open3'
302
302
  Open3.popen3(cmd) do |_stdin, stdout, stderr, wait_thr|
303
303
  # Handle stdout (logs)
304
304
  stdout_thread = Thread.new do
305
305
  stdout.each_line do |line|
306
- puts Formatters::LogFormatter.format_line(line.chomp)
306
+ puts line
307
307
  $stdout.flush
308
308
  end
309
309
  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.47
5
+ :version: 0.1.48
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.47",
6
+ "version": "0.1.48",
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.47'
4
+ VERSION = '0.1.48'
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.47
4
+ version: 0.1.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Ryan