ares-runtime 2.0.1 → 2.0.3

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: f1e365203d1a9e9c5744f269c549442361f39cf36da8525f311bae426947b58e
4
- data.tar.gz: 96fc6b9900f2bea091cd6f90331eb09c51a7f751c5c42810fd9465e2d797d1b3
3
+ metadata.gz: c321feb80ab38315e30a032600325160b61fba7e2369fd731052c86ee4fa1341
4
+ data.tar.gz: f7409e906b26c98ed91a1fd2c77747b22dc359662d769adcda7ee47002ba2ac4
5
5
  SHA512:
6
- metadata.gz: a0a770802c524ee3dbdadda2b8d0842e23d19c2c42943a763151a20cdc185fe6a11d0326b925fdaa907d9e165696df290a9c81cc3c3e16749f295c8f18deef21
7
- data.tar.gz: be7b15ebe2c4cd3a4e80aadfdfa3ccddbe0c436876e9e9e115851acd9d2ce1c4b45db728c9c6d1f644e1a5b5ea45f1e9b2c8bf17c459456df036471c940414d0
6
+ metadata.gz: 3d7153a6fa16e1eccd05ced673a3527b1a13f50313066f517ea3cd240756ad23ee2feaeedb75a72cbab40e32a4444cb64625a742c5a8e0c0725534428b7d8482
7
+ data.tar.gz: 1eef6e2f4c9dd99ae5e037da0e5adab6e30d3573d88f193ff6678d4d928f1f2340a6464185b8edfe2ee0e62d9085c33a9868184449d889579ac2bfebf845d5ef
data/README.md CHANGED
@@ -106,5 +106,5 @@ Routed via `config/models.yml`:
106
106
  - [ ] **Rate Limiting**: Intelligent throttling to prevent mid-workflow blocks.
107
107
 
108
108
  ---
109
- **Author**: Antigravity (shubhamtaywade82@gmail.com)
109
+ **Author**: Shubham (shubhamtaywade82@gmail.com)
110
110
  **Repository**: [github.com/shubhamtaywade82/agent-orchestrator](https://github.com/shubhamtaywade82/agent-orchestrator)
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'ollama_client'
4
4
  require 'timeout'
5
- require_relative '../../../../config/planner_schema'
5
+ require_relative 'planner_schema'
6
6
  require_relative '../ollama_client_factory'
7
7
 
8
8
  module Ares
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ PLANNER_SCHEMA = {
4
+ 'type' => 'object',
5
+ 'required' => %w[task_type risk_level confidence slices],
6
+ 'additionalProperties' => false,
7
+ 'properties' => {
8
+ 'task_type' => {
9
+ 'type' => 'string',
10
+ 'enum' => %w[
11
+ architecture
12
+ refactor
13
+ bulk_patch
14
+ test_generation
15
+ summarization
16
+ interactive_edit
17
+ ]
18
+ },
19
+ 'risk_level' => {
20
+ 'type' => 'string',
21
+ 'enum' => %w[low medium high]
22
+ },
23
+ 'confidence' => {
24
+ 'type' => 'number',
25
+ 'minimum' => 0,
26
+ 'maximum' => 1
27
+ },
28
+ 'slices' => {
29
+ 'type' => 'array',
30
+ 'items' => { 'type' => 'string' }
31
+ }
32
+ }
33
+ }.freeze
@@ -238,7 +238,18 @@ module Ares
238
238
  raw = chain.call_fix(fix_prompt, adapter_opts, total: fallback_chain.size) do |current_engine|
239
239
  create_checkpoint(current_engine)
240
240
  end
241
- JSON.parse(raw)
241
+ parse_robust_json(raw)
242
+ end
243
+
244
+ def parse_robust_json(raw)
245
+ json_str = raw.match(/```(?:json)?\s*(.*?)\s*```/m)&.captures&.first || raw
246
+ begin
247
+ JSON.parse(json_str)
248
+ rescue JSON::ParserError => e
249
+ puts "\n⚠️ Failed to parse valid JSON from the AI engine's response."
250
+ puts "--- Raw Output ---\n#{raw}\n----------------"
251
+ raise e
252
+ end
242
253
  end
243
254
 
244
255
  def apply_patches(result)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ares
4
4
  module Runtime
5
- VERSION = '2.0.1'
5
+ VERSION = '2.0.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ares-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - Antigravity
7
+ - Shubham
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
@@ -200,6 +200,7 @@ files:
200
200
  - lib/ares/runtime/model_selector.rb
201
201
  - lib/ares/runtime/ollama_client_factory.rb
202
202
  - lib/ares/runtime/planner/ollama_planner.rb
203
+ - lib/ares/runtime/planner/planner_schema.rb
203
204
  - lib/ares/runtime/planner/tiny_task_processor.rb
204
205
  - lib/ares/runtime/prompt_builder.rb
205
206
  - lib/ares/runtime/quota_manager.rb