legion-mcp 0.5.2 → 0.5.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/CHANGELOG.md +5 -0
- data/lib/legion/mcp/capability_generator.rb +2 -2
- data/lib/legion/mcp/tools/do_action.rb +2 -2
- data/lib/legion/mcp/tools/plan_action.rb +2 -1
- data/lib/legion/mcp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 918ab35b2f575f24b157f7f4aaf418e13a1f950b58bf387f17f921bd121f8b85
|
|
4
|
+
data.tar.gz: d1de3e68b031d1c7a169db411d188e54ebd0107a191aec584981a95c852746f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42f453718ebe7af183b93b86724f40ec31927fed7f562f17c7abe9732d7732df02f35108d498640a7f330425f5a24d4b3602e4f28cef9166af0d5751a3f49c1e
|
|
7
|
+
data.tar.gz: ccfce5e16a125063d3e4b74dff0b03fd4a6f0eab6e80b5480539c5de6adc9e61b8466acff2762a2501456a6ada0cb7743f7d0fe6c930ef50786438e5cba93a60
|
data/CHANGELOG.md
CHANGED
|
@@ -79,7 +79,7 @@ module Legion
|
|
|
79
79
|
'Follow the pattern: module with module_function methods returning hashes. ' \
|
|
80
80
|
'Include proper error handling. Return ONLY the Ruby code.'
|
|
81
81
|
|
|
82
|
-
Legion::LLM.ask(prompt)
|
|
82
|
+
Legion::LLM.ask(prompt, caller: { extension: 'legion-mcp', operation: 'capability_gen', phase: 'runner' })
|
|
83
83
|
rescue StandardError => e
|
|
84
84
|
Legion::Logging.warn("CapabilityGenerator#generate_runner failed: #{e.message}") if defined?(Legion::Logging)
|
|
85
85
|
nil
|
|
@@ -92,7 +92,7 @@ module Legion
|
|
|
92
92
|
"Description: #{description}. " \
|
|
93
93
|
'Use described_class pattern. Return ONLY the Ruby code.'
|
|
94
94
|
|
|
95
|
-
Legion::LLM.ask(prompt)
|
|
95
|
+
Legion::LLM.ask(prompt, caller: { extension: 'legion-mcp', operation: 'capability_gen', phase: 'spec' })
|
|
96
96
|
rescue StandardError => e
|
|
97
97
|
Legion::Logging.warn("CapabilityGenerator#generate_spec failed: #{e.message}") if defined?(Legion::Logging)
|
|
98
98
|
nil
|
|
@@ -84,7 +84,7 @@ module Legion
|
|
|
84
84
|
return nil unless defined?(Legion::LLM) && Legion::LLM.started?
|
|
85
85
|
|
|
86
86
|
hint = "Known pattern: #{pattern[:intent_text]}. Tools: #{Array(pattern[:tool_chain]).join(', ')}. "
|
|
87
|
-
Legion::LLM.ask("#{hint}User intent: #{intent}")
|
|
87
|
+
Legion::LLM.ask("#{hint}User intent: #{intent}", caller: { extension: 'legion-mcp', tool: 'do_action', tier: 1 })
|
|
88
88
|
rescue StandardError => e
|
|
89
89
|
Legion::Logging.debug("DoAction#try_tier1 failed: #{e.message}") if defined?(Legion::Logging)
|
|
90
90
|
nil
|
|
@@ -95,7 +95,7 @@ module Legion
|
|
|
95
95
|
|
|
96
96
|
catalog = ContextCompiler.respond_to?(:compressed_catalog) ? ContextCompiler.compressed_catalog : []
|
|
97
97
|
context_str = catalog.any? ? "Available tools: #{Legion::JSON.dump(catalog)}. " : ''
|
|
98
|
-
Legion::LLM.ask("#{context_str}User intent: #{intent}")
|
|
98
|
+
Legion::LLM.ask("#{context_str}User intent: #{intent}", caller: { extension: 'legion-mcp', tool: 'do_action', tier: 2 })
|
|
99
99
|
rescue StandardError => e
|
|
100
100
|
Legion::Logging.debug("DoAction#try_tier2 failed: #{e.message}") if defined?(Legion::Logging)
|
|
101
101
|
nil
|
|
@@ -37,7 +37,8 @@ module Legion
|
|
|
37
37
|
|
|
38
38
|
def generate_narrative(goal, steps)
|
|
39
39
|
tool_list = steps.map { |s| s[:tool] }.join(', ')
|
|
40
|
-
Legion::LLM.ask("Create a brief execution plan for: #{goal}. Available tools: #{tool_list}"
|
|
40
|
+
Legion::LLM.ask("Create a brief execution plan for: #{goal}. Available tools: #{tool_list}",
|
|
41
|
+
caller: { extension: 'legion-mcp', tool: 'plan_action' })
|
|
41
42
|
rescue StandardError => e
|
|
42
43
|
Legion::Logging.debug("PlanAction#generate_narrative failed: #{e.message}") if defined?(Legion::Logging)
|
|
43
44
|
nil
|
data/lib/legion/mcp/version.rb
CHANGED