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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d595c78d49bd3c3a7fc1a9fdde240f6a969b30b0aae59d2edbfaf246187f31a5
4
- data.tar.gz: 680ce4836c3d6dc3351d9af4f8a312596b865d92038506782f1c203af8083de3
3
+ metadata.gz: 918ab35b2f575f24b157f7f4aaf418e13a1f950b58bf387f17f921bd121f8b85
4
+ data.tar.gz: d1de3e68b031d1c7a169db411d188e54ebd0107a191aec584981a95c852746f2
5
5
  SHA512:
6
- metadata.gz: 2d0f20c472bcd79155cfa7e159887f2b40121945224bfcd5298b56ad27da71f100b4e7d516f87b55d9634ca08e42b2cb7288e4e8870ebd452634200975302ff4
7
- data.tar.gz: 59fc5625a6779a9e5c1dd95d75793ae6effdfffcafd014144888784b72a9e6454605d87476b1e5990afd1a097129b7673e4a5904d2f4420f4266eb8e28c9e002
6
+ metadata.gz: 42f453718ebe7af183b93b86724f40ec31927fed7f562f17c7abe9732d7732df02f35108d498640a7f330425f5a24d4b3602e4f28cef9166af0d5751a3f49c1e
7
+ data.tar.gz: ccfce5e16a125063d3e4b74dff0b03fd4a6f0eab6e80b5480539c5de6adc9e61b8466acff2762a2501456a6ada0cb7743f7d0fe6c930ef50786438e5cba93a60
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # legion-mcp Changelog
2
2
 
3
+ ## [0.5.3] - 2026-03-23
4
+
5
+ ### Changed
6
+ - Add `caller:` identity to all LLM call sites (do_action tier 1/2, plan_action, capability_generator runner/spec)
7
+
3
8
  ## [0.5.2] - 2026-03-23
4
9
 
5
10
  ### 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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module MCP
5
- VERSION = '0.5.2'
5
+ VERSION = '0.5.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity