legion-mcp 0.5.4 → 0.5.5
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 +14 -0
- data/lib/legion/mcp/server.rb +13 -1
- data/lib/legion/mcp/tools/mind_growth_approve.rb +49 -0
- data/lib/legion/mcp/tools/mind_growth_build_queue.rb +44 -0
- data/lib/legion/mcp/tools/mind_growth_cognitive_profile.rb +44 -0
- data/lib/legion/mcp/tools/mind_growth_health.rb +44 -0
- data/lib/legion/mcp/tools/mind_growth_propose.rb +56 -0
- data/lib/legion/mcp/tools/mind_growth_status.rb +44 -0
- data/lib/legion/mcp/version.rb +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38c734e99f13544dcd04f25b33dbbaf996202518518ac5a900788d7d47a6f2ba
|
|
4
|
+
data.tar.gz: be38e1cba9d680076813e67ea08ca9dcdf264f146c809daa9345e302c3c6000d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 340cd8ca1944b59f12bcbd32eb9338a284398477cc18fff805100dd60dab8ca71c27fbd37b1359d6e3936773063919515f21c9cbeb62c00d4f9bfa3c500c93c5
|
|
7
|
+
data.tar.gz: 926cb453173fc145b569da97c6168483622005a2b112b3831025a58f013135f66fd3a4110f8bd47e8f83b0459fc7022b8638e00f1844d52b530f1ad863fe9b12
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# legion-mcp Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.5] - 2026-03-24
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Mind Growth Phase 7.2: 6 MCP tools for lex-mind-growth integration
|
|
7
|
+
- `legion.mind_growth_status` — growth status including proposals and cognitive coverage
|
|
8
|
+
- `legion.mind_growth_propose` — propose a new cognitive extension concept
|
|
9
|
+
- `legion.mind_growth_approve` — evaluate and score a proposal for approval
|
|
10
|
+
- `legion.mind_growth_build_queue` — list approved proposals in the build queue
|
|
11
|
+
- `legion.mind_growth_cognitive_profile` — analyze cognitive architecture coverage against reference models
|
|
12
|
+
- `legion.mind_growth_health` — extension fitness scores, prune candidates, and improvement candidates
|
|
13
|
+
- All 6 tools registered in `TOOL_CLASSES`; total tool count raised from 50 to 56
|
|
14
|
+
- Specs for all 6 new tools (38 examples)
|
|
15
|
+
- Updated `server_spec.rb` tool count assertion from 50 to 56
|
|
16
|
+
|
|
3
17
|
## [0.5.4] - 2026-03-24
|
|
4
18
|
|
|
5
19
|
### Added
|
data/lib/legion/mcp/server.rb
CHANGED
|
@@ -58,6 +58,12 @@ require_relative 'tools/list_peers'
|
|
|
58
58
|
require_relative 'tools/notify_peer'
|
|
59
59
|
require_relative 'tools/broadcast_peers'
|
|
60
60
|
require_relative 'tools/mesh_status'
|
|
61
|
+
require_relative 'tools/mind_growth_status'
|
|
62
|
+
require_relative 'tools/mind_growth_propose'
|
|
63
|
+
require_relative 'tools/mind_growth_approve'
|
|
64
|
+
require_relative 'tools/mind_growth_build_queue'
|
|
65
|
+
require_relative 'tools/mind_growth_cognitive_profile'
|
|
66
|
+
require_relative 'tools/mind_growth_health'
|
|
61
67
|
require_relative 'catalog_bridge'
|
|
62
68
|
require_relative 'resources/runner_catalog'
|
|
63
69
|
require_relative 'resources/extension_info'
|
|
@@ -115,7 +121,13 @@ module Legion
|
|
|
115
121
|
Tools::ListPeers,
|
|
116
122
|
Tools::NotifyPeer,
|
|
117
123
|
Tools::BroadcastPeers,
|
|
118
|
-
Tools::MeshStatus
|
|
124
|
+
Tools::MeshStatus,
|
|
125
|
+
Tools::MindGrowthStatus,
|
|
126
|
+
Tools::MindGrowthPropose,
|
|
127
|
+
Tools::MindGrowthApprove,
|
|
128
|
+
Tools::MindGrowthBuildQueue,
|
|
129
|
+
Tools::MindGrowthCognitiveProfile,
|
|
130
|
+
Tools::MindGrowthHealth
|
|
119
131
|
].freeze
|
|
120
132
|
|
|
121
133
|
class << self
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module MCP
|
|
5
|
+
module Tools
|
|
6
|
+
class MindGrowthApprove < ::MCP::Tool
|
|
7
|
+
tool_name 'legion.mind_growth_approve'
|
|
8
|
+
description 'Evaluate and score a mind growth proposal for approval.'
|
|
9
|
+
|
|
10
|
+
input_schema(
|
|
11
|
+
properties: {
|
|
12
|
+
proposal_id: { type: 'string', description: 'ID of the proposal to evaluate' }
|
|
13
|
+
},
|
|
14
|
+
required: ['proposal_id']
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
class << self
|
|
18
|
+
def call(proposal_id:)
|
|
19
|
+
return error_response('lex-mind-growth is not available') unless mind_growth_available?
|
|
20
|
+
|
|
21
|
+
result = mind_growth_client.evaluate_proposal(proposal_id: proposal_id)
|
|
22
|
+
text_response(result)
|
|
23
|
+
rescue StandardError => e
|
|
24
|
+
Legion::Logging.warn("MindGrowthApprove#call failed: #{e.message}") if defined?(Legion::Logging)
|
|
25
|
+
error_response("Failed to evaluate proposal: #{e.message}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def mind_growth_available?
|
|
31
|
+
defined?(Legion::Extensions::MindGrowth::Client)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def mind_growth_client
|
|
35
|
+
@mind_growth_client ||= Legion::Extensions::MindGrowth::Client.new
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def text_response(data)
|
|
39
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump(data) }])
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def error_response(msg)
|
|
43
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump({ error: msg }) }], error: true)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module MCP
|
|
5
|
+
module Tools
|
|
6
|
+
class MindGrowthBuildQueue < ::MCP::Tool
|
|
7
|
+
tool_name 'legion.mind_growth_build_queue'
|
|
8
|
+
description 'List the current build queue of approved mind growth proposals.'
|
|
9
|
+
|
|
10
|
+
input_schema(properties: {})
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
def call
|
|
14
|
+
return error_response('lex-mind-growth is not available') unless mind_growth_available?
|
|
15
|
+
|
|
16
|
+
result = mind_growth_client.list_proposals(status: :approved)
|
|
17
|
+
text_response(result)
|
|
18
|
+
rescue StandardError => e
|
|
19
|
+
Legion::Logging.warn("MindGrowthBuildQueue#call failed: #{e.message}") if defined?(Legion::Logging)
|
|
20
|
+
error_response("Failed to get build queue: #{e.message}")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def mind_growth_available?
|
|
26
|
+
defined?(Legion::Extensions::MindGrowth::Client)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def mind_growth_client
|
|
30
|
+
@mind_growth_client ||= Legion::Extensions::MindGrowth::Client.new
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def text_response(data)
|
|
34
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump(data) }])
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def error_response(msg)
|
|
38
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump({ error: msg }) }], error: true)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module MCP
|
|
5
|
+
module Tools
|
|
6
|
+
class MindGrowthCognitiveProfile < ::MCP::Tool
|
|
7
|
+
tool_name 'legion.mind_growth_cognitive_profile'
|
|
8
|
+
description 'Analyze the current cognitive architecture coverage against reference models.'
|
|
9
|
+
|
|
10
|
+
input_schema(properties: {})
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
def call
|
|
14
|
+
return error_response('lex-mind-growth is not available') unless mind_growth_available?
|
|
15
|
+
|
|
16
|
+
result = mind_growth_client.cognitive_profile
|
|
17
|
+
text_response(result)
|
|
18
|
+
rescue StandardError => e
|
|
19
|
+
Legion::Logging.warn("MindGrowthCognitiveProfile#call failed: #{e.message}") if defined?(Legion::Logging)
|
|
20
|
+
error_response("Failed to get cognitive profile: #{e.message}")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def mind_growth_available?
|
|
26
|
+
defined?(Legion::Extensions::MindGrowth::Client)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def mind_growth_client
|
|
30
|
+
@mind_growth_client ||= Legion::Extensions::MindGrowth::Client.new
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def text_response(data)
|
|
34
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump(data) }])
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def error_response(msg)
|
|
38
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump({ error: msg }) }], error: true)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module MCP
|
|
5
|
+
module Tools
|
|
6
|
+
class MindGrowthHealth < ::MCP::Tool
|
|
7
|
+
tool_name 'legion.mind_growth_health'
|
|
8
|
+
description 'Get extension fitness scores, prune candidates, and improvement candidates.'
|
|
9
|
+
|
|
10
|
+
input_schema(properties: {})
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
def call
|
|
14
|
+
return error_response('lex-mind-growth is not available') unless mind_growth_available?
|
|
15
|
+
|
|
16
|
+
result = mind_growth_client.validate_fitness(extensions: [])
|
|
17
|
+
text_response(result)
|
|
18
|
+
rescue StandardError => e
|
|
19
|
+
Legion::Logging.warn("MindGrowthHealth#call failed: #{e.message}") if defined?(Legion::Logging)
|
|
20
|
+
error_response("Failed to get mind growth health: #{e.message}")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def mind_growth_available?
|
|
26
|
+
defined?(Legion::Extensions::MindGrowth::Client)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def mind_growth_client
|
|
30
|
+
@mind_growth_client ||= Legion::Extensions::MindGrowth::Client.new
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def text_response(data)
|
|
34
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump(data) }])
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def error_response(msg)
|
|
38
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump({ error: msg }) }], error: true)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module MCP
|
|
5
|
+
module Tools
|
|
6
|
+
class MindGrowthPropose < ::MCP::Tool
|
|
7
|
+
tool_name 'legion.mind_growth_propose'
|
|
8
|
+
description 'Propose a new cognitive extension concept for the architecture.'
|
|
9
|
+
|
|
10
|
+
input_schema(
|
|
11
|
+
properties: {
|
|
12
|
+
category: { type: 'string',
|
|
13
|
+
description: 'Cognitive category (cognition, perception, introspection, ' \
|
|
14
|
+
'safety, communication, memory, motivation, coordination)' },
|
|
15
|
+
description: { type: 'string', description: 'Description of the proposed extension' },
|
|
16
|
+
name: { type: 'string', description: 'Optional extension name' }
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
class << self
|
|
21
|
+
def call(params = {})
|
|
22
|
+
return error_response('lex-mind-growth is not available') unless mind_growth_available?
|
|
23
|
+
|
|
24
|
+
result = mind_growth_client.propose_concept(
|
|
25
|
+
category: params[:category]&.to_sym,
|
|
26
|
+
description: params[:description],
|
|
27
|
+
name: params[:name]
|
|
28
|
+
)
|
|
29
|
+
text_response(result)
|
|
30
|
+
rescue StandardError => e
|
|
31
|
+
Legion::Logging.warn("MindGrowthPropose#call failed: #{e.message}") if defined?(Legion::Logging)
|
|
32
|
+
error_response("Failed to propose concept: #{e.message}")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def mind_growth_available?
|
|
38
|
+
defined?(Legion::Extensions::MindGrowth::Client)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def mind_growth_client
|
|
42
|
+
@mind_growth_client ||= Legion::Extensions::MindGrowth::Client.new
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def text_response(data)
|
|
46
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump(data) }])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def error_response(msg)
|
|
50
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump({ error: msg }) }], error: true)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module MCP
|
|
5
|
+
module Tools
|
|
6
|
+
class MindGrowthStatus < ::MCP::Tool
|
|
7
|
+
tool_name 'legion.mind_growth_status'
|
|
8
|
+
description 'Get current mind growth status including proposals and cognitive coverage.'
|
|
9
|
+
|
|
10
|
+
input_schema(properties: {})
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
def call
|
|
14
|
+
return error_response('lex-mind-growth is not available') unless mind_growth_available?
|
|
15
|
+
|
|
16
|
+
result = mind_growth_client.growth_status
|
|
17
|
+
text_response(result)
|
|
18
|
+
rescue StandardError => e
|
|
19
|
+
Legion::Logging.warn("MindGrowthStatus#call failed: #{e.message}") if defined?(Legion::Logging)
|
|
20
|
+
error_response("Failed to get mind growth status: #{e.message}")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def mind_growth_available?
|
|
26
|
+
defined?(Legion::Extensions::MindGrowth::Client)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def mind_growth_client
|
|
30
|
+
@mind_growth_client ||= Legion::Extensions::MindGrowth::Client.new
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def text_response(data)
|
|
34
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump(data) }])
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def error_response(msg)
|
|
38
|
+
::MCP::Tool::Response.new([{ type: 'text', text: Legion::JSON.dump({ error: msg }) }], error: true)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
data/lib/legion/mcp/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.5.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esity
|
|
@@ -177,6 +177,12 @@ files:
|
|
|
177
177
|
- lib/legion/mcp/tools/list_tasks.rb
|
|
178
178
|
- lib/legion/mcp/tools/list_workers.rb
|
|
179
179
|
- lib/legion/mcp/tools/mesh_status.rb
|
|
180
|
+
- lib/legion/mcp/tools/mind_growth_approve.rb
|
|
181
|
+
- lib/legion/mcp/tools/mind_growth_build_queue.rb
|
|
182
|
+
- lib/legion/mcp/tools/mind_growth_cognitive_profile.rb
|
|
183
|
+
- lib/legion/mcp/tools/mind_growth_health.rb
|
|
184
|
+
- lib/legion/mcp/tools/mind_growth_propose.rb
|
|
185
|
+
- lib/legion/mcp/tools/mind_growth_status.rb
|
|
180
186
|
- lib/legion/mcp/tools/notify_peer.rb
|
|
181
187
|
- lib/legion/mcp/tools/plan_action.rb
|
|
182
188
|
- lib/legion/mcp/tools/prompt_list.rb
|