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 +4 -4
- data/README.md +1 -1
- data/lib/ares/runtime/planner/ollama_planner.rb +1 -1
- data/lib/ares/runtime/planner/planner_schema.rb +33 -0
- data/lib/ares/runtime/router.rb +12 -1
- data/lib/ares/runtime/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c321feb80ab38315e30a032600325160b61fba7e2369fd731052c86ee4fa1341
|
|
4
|
+
data.tar.gz: f7409e906b26c98ed91a1fd2c77747b22dc359662d769adcda7ee47002ba2ac4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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**:
|
|
109
|
+
**Author**: Shubham (shubhamtaywade82@gmail.com)
|
|
110
110
|
**Repository**: [github.com/shubhamtaywade82/agent-orchestrator](https://github.com/shubhamtaywade82/agent-orchestrator)
|
|
@@ -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
|
data/lib/ares/runtime/router.rb
CHANGED
|
@@ -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
|
-
|
|
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)
|
data/lib/ares/runtime/version.rb
CHANGED
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.
|
|
4
|
+
version: 2.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
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
|