legionio 1.5.21 → 1.5.23
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 +22 -0
- data/lib/legion/api/coldstart.rb +4 -3
- data/lib/legion/api/openapi.rb +4 -4
- data/lib/legion/cli/coldstart_command.rb +19 -6
- data/lib/legion/cli/groups/admin_group.rb +29 -0
- data/lib/legion/cli/groups/ai_group.rb +47 -0
- data/lib/legion/cli/groups/dev_group.rb +36 -0
- data/lib/legion/cli/groups/git_group.rb +26 -0
- data/lib/legion/cli/groups/ops_group.rb +41 -0
- data/lib/legion/cli/groups/pipeline_group.rb +35 -0
- data/lib/legion/cli/groups/serve_group.rb +23 -0
- data/lib/legion/cli.rb +32 -115
- data/lib/legion/service.rb +1 -1
- data/lib/legion/version.rb +1 -1
- metadata +8 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17deabb2b4dbb36f8f31d6e14d7a63f8f91974de927136695f578ec76754d9c5
|
|
4
|
+
data.tar.gz: cfe7c8e815606a027c4fd0fcf93ecc09af5020d2e90fee69e77f3d623496db7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5bf157c87db6916ffd800abfa0e84597f26dd4357ef64e7ce6072fdb20afeba4bf4d78260049107e67923d2aa872e44d58356cdb89ad3b599a8e92db3279a3e
|
|
7
|
+
data.tar.gz: 7d030a421b8bcb8f2ffae48d564339a7241b7febd6cd5142a8473dd6e67c4f00b661a571ff80ce0107b3cd69adf268427ad035368eaa1ed4e336afc85bbd5976
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Legion Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.23] - 2026-03-26
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Remove all lex-memory references from service.rb, API coldstart, and OpenAPI docs; use lex-agentic-memory namespace everywhere
|
|
7
|
+
|
|
8
|
+
## [1.5.22] - 2026-03-26
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- `coldstart ingest` no longer crashes when lex-memory is absent; uses lex-agentic-memory trace store instead
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Consolidate 48 root CLI commands into 7 groups + 19 root commands
|
|
15
|
+
- New groups: `ai`, `git`, `pipeline`, `ops`, `serve`, `admin`, `dev`
|
|
16
|
+
- `ai`: chat, llm, gaia, apollo, knowledge, memory, mind-growth, swarm, plan, trace
|
|
17
|
+
- `git`: commit, pr, review
|
|
18
|
+
- `pipeline`: skill, prompt, eval, dataset, image, notebook
|
|
19
|
+
- `ops`: telemetry, observe, detect, cost, payroll, audit, debug, failover
|
|
20
|
+
- `serve`: mcp, acp
|
|
21
|
+
- `admin`: rbac, auth, worker, team
|
|
22
|
+
- `dev`: generate, docs, openapi, completion, marketplace, features
|
|
23
|
+
- Root keepers: start, stop, status, version, check, doctor, setup, update, config, init, lex, task, chain, schedule, coldstart, tty, do, ask, dream, tree
|
|
24
|
+
|
|
3
25
|
## [1.5.21] - 2026-03-26
|
|
4
26
|
|
|
5
27
|
### Changed
|
data/lib/legion/api/coldstart.rb
CHANGED
|
@@ -19,12 +19,13 @@ module Legion
|
|
|
19
19
|
halt 503, json_error('coldstart_unavailable', 'lex-coldstart is not loaded', status_code: 503)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
unless defined?(Legion::Extensions::Memory)
|
|
23
|
-
Legion::Logging.warn 'API POST /api/coldstart/ingest returned 503: lex-memory is not loaded'
|
|
24
|
-
halt 503, json_error('memory_unavailable', 'lex-memory is not loaded', status_code: 503)
|
|
22
|
+
unless defined?(Legion::Extensions::Agentic::Memory::Trace)
|
|
23
|
+
Legion::Logging.warn 'API POST /api/coldstart/ingest returned 503: lex-agentic-memory is not loaded'
|
|
24
|
+
halt 503, json_error('memory_unavailable', 'lex-agentic-memory is not loaded', status_code: 503)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
runner = Object.new.extend(Legion::Extensions::Coldstart::Runners::Ingest)
|
|
28
|
+
runner.define_singleton_method(:log) { Legion::Logging } unless runner.respond_to?(:log)
|
|
28
29
|
|
|
29
30
|
result = if File.file?(path)
|
|
30
31
|
runner.ingest_file(file_path: File.expand_path(path))
|
data/lib/legion/api/openapi.rb
CHANGED
|
@@ -128,7 +128,7 @@ module Legion
|
|
|
128
128
|
{ name: 'Lex', description: 'Auto-registered LEX runner routes' },
|
|
129
129
|
{ name: 'Workers', description: 'Digital worker lifecycle management' },
|
|
130
130
|
{ name: 'Teams', description: 'Team-level worker and cost views' },
|
|
131
|
-
{ name: 'Coldstart', description: 'Cold-start memory ingestion (requires lex-coldstart + lex-memory)' },
|
|
131
|
+
{ name: 'Coldstart', description: 'Cold-start memory ingestion (requires lex-coldstart + lex-agentic-memory)' },
|
|
132
132
|
{ name: 'Gaia', description: 'Gaia cognitive layer status' },
|
|
133
133
|
{ name: 'Apollo', description: 'Apollo knowledge graph (requires lex-apollo + legion-data)' },
|
|
134
134
|
{ name: 'OpenAPI', description: 'OpenAPI spec endpoint' }
|
|
@@ -1384,8 +1384,8 @@ module Legion
|
|
|
1384
1384
|
'/api/coldstart/ingest' => {
|
|
1385
1385
|
post: {
|
|
1386
1386
|
tags: ['Coldstart'],
|
|
1387
|
-
summary: 'Ingest a file or directory into
|
|
1388
|
-
description: 'Requires lex-coldstart and lex-memory to be loaded.',
|
|
1387
|
+
summary: 'Ingest a file or directory into agentic memory',
|
|
1388
|
+
description: 'Requires lex-coldstart and lex-agentic-memory to be loaded.',
|
|
1389
1389
|
operationId: 'coldstartIngest',
|
|
1390
1390
|
requestBody: {
|
|
1391
1391
|
required: true,
|
|
@@ -1404,7 +1404,7 @@ module Legion
|
|
|
1404
1404
|
'401' => UNAUTH_RESPONSE,
|
|
1405
1405
|
'404' => NOT_FOUND_RESPONSE,
|
|
1406
1406
|
'422' => UNPROCESSABLE_RESPONSE,
|
|
1407
|
-
'503' => { description: 'lex-coldstart or lex-memory not loaded' }
|
|
1407
|
+
'503' => { description: 'lex-coldstart or lex-agentic-memory not loaded' }
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
@@ -11,10 +11,10 @@ module Legion
|
|
|
11
11
|
class_option :no_color, type: :boolean, default: false, desc: 'Disable color output'
|
|
12
12
|
class_option :verbose, type: :boolean, default: false, aliases: ['-V'], desc: 'Verbose logging'
|
|
13
13
|
|
|
14
|
-
desc 'ingest [PATH...]', 'Ingest Claude memory/CLAUDE.md files into
|
|
14
|
+
desc 'ingest [PATH...]', 'Ingest Claude memory/CLAUDE.md files into agentic memory traces'
|
|
15
15
|
long_desc <<~DESC
|
|
16
16
|
Parse Claude Code MEMORY.md or CLAUDE.md files and convert them into
|
|
17
|
-
|
|
17
|
+
agentic memory traces for cold start bootstrapping.
|
|
18
18
|
|
|
19
19
|
Accepts any number of file or directory paths. When given a directory,
|
|
20
20
|
all CLAUDE.md and MEMORY.md files are discovered recursively.
|
|
@@ -59,7 +59,7 @@ module Legion
|
|
|
59
59
|
require_coldstart!
|
|
60
60
|
paths = [Dir.pwd] if paths.empty?
|
|
61
61
|
|
|
62
|
-
runner =
|
|
62
|
+
runner = build_runner(Legion::Extensions::Coldstart::Runners::Ingest)
|
|
63
63
|
|
|
64
64
|
paths.each do |path|
|
|
65
65
|
if File.file?(path)
|
|
@@ -83,7 +83,7 @@ module Legion
|
|
|
83
83
|
out = formatter
|
|
84
84
|
require_coldstart!
|
|
85
85
|
|
|
86
|
-
runner =
|
|
86
|
+
runner = build_runner(Legion::Extensions::Coldstart::Runners::Coldstart)
|
|
87
87
|
progress = runner.coldstart_progress
|
|
88
88
|
|
|
89
89
|
if options[:json]
|
|
@@ -111,7 +111,7 @@ module Legion
|
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
def run_local_ingest(out, path, dry_run:)
|
|
114
|
-
runner =
|
|
114
|
+
runner = build_runner(Legion::Extensions::Coldstart::Runners::Ingest)
|
|
115
115
|
|
|
116
116
|
if File.file?(path)
|
|
117
117
|
result = dry_run ? runner.preview_ingest(file_path: File.expand_path(path)) : runner.ingest_file(file_path: File.expand_path(path))
|
|
@@ -152,10 +152,23 @@ module Legion
|
|
|
152
152
|
4567
|
|
153
153
|
end
|
|
154
154
|
|
|
155
|
+
def build_runner(mod)
|
|
156
|
+
obj = Object.new
|
|
157
|
+
obj.extend(mod)
|
|
158
|
+
obj.define_singleton_method(:log) { Legion::Logging } unless obj.respond_to?(:log)
|
|
159
|
+
obj
|
|
160
|
+
end
|
|
161
|
+
|
|
155
162
|
def require_coldstart!
|
|
156
163
|
require 'legion/logging'
|
|
157
164
|
Legion::Logging.setup(level: options[:verbose] ? 'debug' : 'warn') unless Legion::Logging.instance_variable_get(:@log)
|
|
158
|
-
|
|
165
|
+
|
|
166
|
+
begin
|
|
167
|
+
require 'legion/extensions/agentic/memory/trace'
|
|
168
|
+
rescue LoadError
|
|
169
|
+
Legion::Logging.debug('lex-agentic-memory not available, traces will be parsed but not stored') if defined?(Legion::Logging)
|
|
170
|
+
end
|
|
171
|
+
|
|
159
172
|
require 'legion/extensions/coldstart'
|
|
160
173
|
rescue LoadError => e
|
|
161
174
|
formatter.error("lex-coldstart not available: #{e.message}")
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Admin < Thor
|
|
9
|
+
namespace 'admin'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'rbac SUBCOMMAND', 'Role-based access control management'
|
|
16
|
+
subcommand 'rbac', Legion::CLI::Rbac
|
|
17
|
+
|
|
18
|
+
desc 'auth SUBCOMMAND', 'Authenticate with external services'
|
|
19
|
+
subcommand 'auth', Legion::CLI::Auth
|
|
20
|
+
|
|
21
|
+
desc 'worker SUBCOMMAND', 'Manage digital workers'
|
|
22
|
+
subcommand 'worker', Legion::CLI::Worker
|
|
23
|
+
|
|
24
|
+
desc 'team SUBCOMMAND', 'Team and multi-user management'
|
|
25
|
+
subcommand 'team', Legion::CLI::Team
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Ai < Thor
|
|
9
|
+
namespace 'ai'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'chat SUBCOMMAND', 'Interactive AI conversation'
|
|
16
|
+
subcommand 'chat', Legion::CLI::Chat
|
|
17
|
+
|
|
18
|
+
desc 'llm SUBCOMMAND', 'LLM provider diagnostics (status, ping, models)'
|
|
19
|
+
subcommand 'llm', Legion::CLI::Llm
|
|
20
|
+
|
|
21
|
+
desc 'gaia SUBCOMMAND', 'GAIA cognitive coordination'
|
|
22
|
+
subcommand 'gaia', Legion::CLI::Gaia
|
|
23
|
+
|
|
24
|
+
desc 'apollo SUBCOMMAND', 'Apollo knowledge graph'
|
|
25
|
+
subcommand 'apollo', Legion::CLI::Apollo
|
|
26
|
+
|
|
27
|
+
desc 'knowledge SUBCOMMAND', 'Search and manage the document knowledge base'
|
|
28
|
+
subcommand 'knowledge', Legion::CLI::Knowledge
|
|
29
|
+
|
|
30
|
+
desc 'memory SUBCOMMAND', 'Persistent project memory across sessions'
|
|
31
|
+
subcommand 'memory', Legion::CLI::Memory
|
|
32
|
+
|
|
33
|
+
desc 'mind-growth SUBCOMMAND', 'Autonomous cognitive architecture expansion'
|
|
34
|
+
subcommand 'mind-growth', Legion::CLI::MindGrowth
|
|
35
|
+
|
|
36
|
+
desc 'swarm SUBCOMMAND', 'Multi-agent swarm orchestration'
|
|
37
|
+
subcommand 'swarm', Legion::CLI::Swarm
|
|
38
|
+
|
|
39
|
+
desc 'plan', 'Start plan mode (read-only exploration, no writes)'
|
|
40
|
+
subcommand 'plan', Legion::CLI::Plan
|
|
41
|
+
|
|
42
|
+
desc 'trace SUBCOMMAND', 'Natural language trace search via LLM'
|
|
43
|
+
subcommand 'trace', Legion::CLI::TraceCommand
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Dev < Thor
|
|
9
|
+
namespace 'dev'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'generate SUBCOMMAND', 'Code generators for LEX components'
|
|
16
|
+
map 'g' => :generate
|
|
17
|
+
subcommand 'generate', Legion::CLI::Generate
|
|
18
|
+
|
|
19
|
+
desc 'docs SUBCOMMAND', 'Documentation site generator'
|
|
20
|
+
subcommand 'docs', Legion::CLI::Docs
|
|
21
|
+
|
|
22
|
+
desc 'openapi SUBCOMMAND', 'OpenAPI spec generation'
|
|
23
|
+
subcommand 'openapi', Legion::CLI::Openapi
|
|
24
|
+
|
|
25
|
+
desc 'completion SUBCOMMAND', 'Shell tab completion scripts'
|
|
26
|
+
subcommand 'completion', Legion::CLI::Completion
|
|
27
|
+
|
|
28
|
+
desc 'marketplace', 'Extension marketplace (search, info, scan)'
|
|
29
|
+
subcommand 'marketplace', Legion::CLI::Marketplace
|
|
30
|
+
|
|
31
|
+
desc 'features SUBCOMMAND', 'Install feature bundles (interactive selector)'
|
|
32
|
+
subcommand 'features', Legion::CLI::Features
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Git < Thor
|
|
9
|
+
namespace 'git'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'commit', 'Generate AI commit message from staged changes'
|
|
16
|
+
subcommand 'commit', Legion::CLI::Commit
|
|
17
|
+
|
|
18
|
+
desc 'pr', 'Create pull request with AI-generated title and description'
|
|
19
|
+
subcommand 'pr', Legion::CLI::Pr
|
|
20
|
+
|
|
21
|
+
desc 'review', 'AI code review of changes'
|
|
22
|
+
subcommand 'review', Legion::CLI::Review
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Ops < Thor
|
|
9
|
+
namespace 'ops'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'telemetry SUBCOMMAND', 'Session log analytics and telemetry'
|
|
16
|
+
subcommand 'telemetry', Legion::CLI::Telemetry
|
|
17
|
+
|
|
18
|
+
desc 'observe SUBCOMMAND', 'MCP tool observation stats'
|
|
19
|
+
subcommand 'observe', Legion::CLI::ObserveCommand
|
|
20
|
+
|
|
21
|
+
desc 'detect', 'Scan environment and recommend extensions'
|
|
22
|
+
subcommand 'detect', Legion::CLI::Detect
|
|
23
|
+
|
|
24
|
+
desc 'cost', 'Cost visibility and reporting'
|
|
25
|
+
subcommand 'cost', Legion::CLI::Cost
|
|
26
|
+
|
|
27
|
+
desc 'payroll SUBCOMMAND', 'Workforce cost and labor economics'
|
|
28
|
+
subcommand 'payroll', Legion::CLI::Payroll
|
|
29
|
+
|
|
30
|
+
desc 'audit SUBCOMMAND', 'Audit log inspection and verification'
|
|
31
|
+
subcommand 'audit', Legion::CLI::Audit
|
|
32
|
+
|
|
33
|
+
desc 'debug', 'Diagnostic dump for troubleshooting (pipe to LLM for analysis)'
|
|
34
|
+
subcommand 'debug', Legion::CLI::Debug
|
|
35
|
+
|
|
36
|
+
desc 'failover SUBCOMMAND', 'Region failover management'
|
|
37
|
+
subcommand 'failover', Legion::CLI::Failover
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Pipeline < Thor
|
|
9
|
+
namespace 'pipeline'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'skill', 'Manage skills (.legion/skills/ markdown files)'
|
|
16
|
+
subcommand 'skill', Legion::CLI::Skill
|
|
17
|
+
|
|
18
|
+
desc 'prompt SUBCOMMAND', 'Manage versioned LLM prompt templates'
|
|
19
|
+
subcommand 'prompt', Legion::CLI::Prompt
|
|
20
|
+
|
|
21
|
+
desc 'eval SUBCOMMAND', 'Eval gating and experiment management'
|
|
22
|
+
subcommand 'eval', Legion::CLI::Eval
|
|
23
|
+
|
|
24
|
+
desc 'dataset SUBCOMMAND', 'Manage versioned datasets'
|
|
25
|
+
subcommand 'dataset', Legion::CLI::Dataset
|
|
26
|
+
|
|
27
|
+
desc 'image SUBCOMMAND', 'Multimodal image analysis and comparison'
|
|
28
|
+
subcommand 'image', Legion::CLI::Image
|
|
29
|
+
|
|
30
|
+
desc 'notebook', 'Read and export Jupyter notebooks'
|
|
31
|
+
subcommand 'notebook', Legion::CLI::Notebook
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module CLI
|
|
7
|
+
module Groups
|
|
8
|
+
class Serve < Thor
|
|
9
|
+
namespace 'serve'
|
|
10
|
+
|
|
11
|
+
def self.exit_on_failure?
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'mcp SUBCOMMAND', 'Start MCP server for AI agent integration'
|
|
16
|
+
subcommand 'mcp', Legion::CLI::Mcp
|
|
17
|
+
|
|
18
|
+
desc 'acp SUBCOMMAND', 'Start ACP agent for editor integration'
|
|
19
|
+
subcommand 'acp', Legion::CLI::Acp
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/legion/cli.rb
CHANGED
|
@@ -65,6 +65,16 @@ module Legion
|
|
|
65
65
|
autoload :Features, 'legion/cli/features_command'
|
|
66
66
|
autoload :Debug, 'legion/cli/debug_command'
|
|
67
67
|
|
|
68
|
+
module Groups
|
|
69
|
+
autoload :Ai, 'legion/cli/groups/ai_group'
|
|
70
|
+
autoload :Git, 'legion/cli/groups/git_group'
|
|
71
|
+
autoload :Pipeline, 'legion/cli/groups/pipeline_group'
|
|
72
|
+
autoload :Ops, 'legion/cli/groups/ops_group'
|
|
73
|
+
autoload :Serve, 'legion/cli/groups/serve_group'
|
|
74
|
+
autoload :Admin, 'legion/cli/groups/admin_group'
|
|
75
|
+
autoload :Dev, 'legion/cli/groups/dev_group'
|
|
76
|
+
end
|
|
77
|
+
|
|
68
78
|
class Main < Thor
|
|
69
79
|
def self.exit_on_failure?
|
|
70
80
|
true
|
|
@@ -199,6 +209,7 @@ module Legion
|
|
|
199
209
|
exit(exit_code) if exit_code != 0
|
|
200
210
|
end
|
|
201
211
|
|
|
212
|
+
# --- Core framework ---
|
|
202
213
|
desc 'lex SUBCOMMAND', 'Manage Legion extensions (LEXs)'
|
|
203
214
|
subcommand 'lex', Legion::CLI::Lex
|
|
204
215
|
|
|
@@ -211,81 +222,18 @@ module Legion
|
|
|
211
222
|
desc 'config SUBCOMMAND', 'View and validate configuration'
|
|
212
223
|
subcommand 'config', Legion::CLI::Config
|
|
213
224
|
|
|
214
|
-
desc 'generate SUBCOMMAND', 'Code generators for LEX components'
|
|
215
|
-
map 'g' => :generate
|
|
216
|
-
subcommand 'generate', Legion::CLI::Generate
|
|
217
|
-
|
|
218
|
-
desc 'acp SUBCOMMAND', 'Start ACP agent for editor integration'
|
|
219
|
-
subcommand 'acp', Legion::CLI::Acp
|
|
220
|
-
|
|
221
|
-
desc 'mcp SUBCOMMAND', 'Start MCP server for AI agent integration'
|
|
222
|
-
subcommand 'mcp', Legion::CLI::Mcp
|
|
223
|
-
|
|
224
|
-
desc 'worker SUBCOMMAND', 'Manage digital workers'
|
|
225
|
-
subcommand 'worker', Legion::CLI::Worker
|
|
226
|
-
|
|
227
|
-
desc 'coldstart SUBCOMMAND', 'Cold start bootstrap and Claude memory ingestion'
|
|
228
|
-
subcommand 'coldstart', Legion::CLI::Coldstart
|
|
229
|
-
|
|
230
|
-
desc 'chat SUBCOMMAND', 'Interactive AI conversation'
|
|
231
|
-
subcommand 'chat', Legion::CLI::Chat
|
|
232
|
-
|
|
233
|
-
desc 'commit', 'Generate AI commit message from staged changes'
|
|
234
|
-
subcommand 'commit', Legion::CLI::Commit
|
|
235
|
-
|
|
236
|
-
desc 'pr', 'Create pull request with AI-generated title and description'
|
|
237
|
-
subcommand 'pr', Legion::CLI::Pr
|
|
238
|
-
|
|
239
|
-
desc 'review', 'AI code review of changes'
|
|
240
|
-
subcommand 'review', Legion::CLI::Review
|
|
241
|
-
|
|
242
|
-
desc 'memory SUBCOMMAND', 'Persistent project memory across sessions'
|
|
243
|
-
subcommand 'memory', Legion::CLI::Memory
|
|
244
|
-
|
|
245
|
-
desc 'mind-growth SUBCOMMAND', 'Autonomous cognitive architecture expansion'
|
|
246
|
-
subcommand 'mind-growth', Legion::CLI::MindGrowth
|
|
247
|
-
|
|
248
|
-
desc 'plan', 'Start plan mode (read-only exploration, no writes)'
|
|
249
|
-
subcommand 'plan', Legion::CLI::Plan
|
|
250
|
-
|
|
251
|
-
desc 'swarm SUBCOMMAND', 'Multi-agent swarm orchestration'
|
|
252
|
-
subcommand 'swarm', Legion::CLI::Swarm
|
|
253
|
-
|
|
254
|
-
desc 'gaia SUBCOMMAND', 'GAIA cognitive coordination'
|
|
255
|
-
subcommand 'gaia', Legion::CLI::Gaia
|
|
256
|
-
|
|
257
|
-
desc 'apollo SUBCOMMAND', 'Apollo knowledge graph'
|
|
258
|
-
subcommand 'apollo', Legion::CLI::Apollo
|
|
259
|
-
|
|
260
|
-
desc 'knowledge SUBCOMMAND', 'Search and manage the document knowledge base'
|
|
261
|
-
subcommand 'knowledge', Legion::CLI::Knowledge
|
|
262
|
-
|
|
263
225
|
desc 'schedule SUBCOMMAND', 'Manage schedules'
|
|
264
226
|
subcommand 'schedule', Legion::CLI::Schedule
|
|
265
227
|
|
|
266
|
-
desc '
|
|
267
|
-
subcommand '
|
|
268
|
-
|
|
269
|
-
desc 'openapi SUBCOMMAND', 'OpenAPI spec generation'
|
|
270
|
-
subcommand 'openapi', Legion::CLI::Openapi
|
|
228
|
+
desc 'coldstart SUBCOMMAND', 'Cold start bootstrap and Claude memory ingestion'
|
|
229
|
+
subcommand 'coldstart', Legion::CLI::Coldstart
|
|
271
230
|
|
|
231
|
+
# --- Health & maintenance ---
|
|
272
232
|
desc 'doctor', 'Diagnose environment and suggest fixes'
|
|
273
233
|
subcommand 'doctor', Legion::CLI::Doctor
|
|
274
234
|
|
|
275
|
-
desc '
|
|
276
|
-
subcommand '
|
|
277
|
-
|
|
278
|
-
desc 'auth SUBCOMMAND', 'Authenticate with external services'
|
|
279
|
-
subcommand 'auth', Legion::CLI::Auth
|
|
280
|
-
|
|
281
|
-
desc 'rbac SUBCOMMAND', 'Role-based access control management'
|
|
282
|
-
subcommand 'rbac', Legion::CLI::Rbac
|
|
283
|
-
|
|
284
|
-
desc 'audit SUBCOMMAND', 'Audit log inspection and verification'
|
|
285
|
-
subcommand 'audit', Legion::CLI::Audit
|
|
286
|
-
|
|
287
|
-
desc 'detect', 'Scan environment and recommend extensions'
|
|
288
|
-
subcommand 'detect', Legion::CLI::Detect
|
|
235
|
+
desc 'setup SUBCOMMAND', 'Install feature packs and configure IDE integrations'
|
|
236
|
+
subcommand 'setup', Legion::CLI::Setup
|
|
289
237
|
|
|
290
238
|
desc 'update', 'Update Legion gems to latest versions'
|
|
291
239
|
subcommand 'update', Legion::CLI::Update
|
|
@@ -293,62 +241,31 @@ module Legion
|
|
|
293
241
|
desc 'init', 'Initialize a new Legion workspace'
|
|
294
242
|
subcommand 'init', Legion::CLI::Init
|
|
295
243
|
|
|
296
|
-
|
|
297
|
-
subcommand 'setup', Legion::CLI::Setup
|
|
298
|
-
|
|
299
|
-
desc 'skill', 'Manage skills (.legion/skills/ markdown files)'
|
|
300
|
-
subcommand 'skill', Legion::CLI::Skill
|
|
301
|
-
|
|
302
|
-
desc 'prompt SUBCOMMAND', 'Manage versioned LLM prompt templates'
|
|
303
|
-
subcommand 'prompt', Legion::CLI::Prompt
|
|
304
|
-
|
|
305
|
-
desc 'dataset SUBCOMMAND', 'Manage versioned datasets'
|
|
306
|
-
subcommand 'dataset', Legion::CLI::Dataset
|
|
307
|
-
|
|
308
|
-
desc 'cost', 'Cost visibility and reporting'
|
|
309
|
-
subcommand 'cost', Legion::CLI::Cost
|
|
310
|
-
|
|
311
|
-
desc 'team SUBCOMMAND', 'Team and multi-user management'
|
|
312
|
-
subcommand 'team', Legion::CLI::Team
|
|
313
|
-
|
|
314
|
-
desc 'marketplace', 'Extension marketplace (search, info, scan)'
|
|
315
|
-
subcommand 'marketplace', Legion::CLI::Marketplace
|
|
316
|
-
|
|
317
|
-
desc 'notebook', 'Read and export Jupyter notebooks'
|
|
318
|
-
subcommand 'notebook', Legion::CLI::Notebook
|
|
319
|
-
|
|
320
|
-
desc 'llm', 'LLM provider diagnostics (status, ping, models)'
|
|
321
|
-
subcommand 'llm', Legion::CLI::Llm
|
|
322
|
-
|
|
244
|
+
# --- Interactive & shortcuts ---
|
|
323
245
|
desc 'tty', 'Rich terminal UI (onboarding, AI chat, dashboard)'
|
|
324
246
|
subcommand 'tty', Legion::CLI::Tty
|
|
325
247
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
desc 'observe SUBCOMMAND', 'MCP tool observation stats'
|
|
330
|
-
subcommand 'observe', Legion::CLI::ObserveCommand
|
|
331
|
-
|
|
332
|
-
desc 'image SUBCOMMAND', 'Multimodal image analysis and comparison'
|
|
333
|
-
subcommand 'image', Legion::CLI::Image
|
|
248
|
+
# --- Command groups ---
|
|
249
|
+
desc 'ai SUBCOMMAND', 'AI, cognitive, and knowledge commands'
|
|
250
|
+
subcommand 'ai', Legion::CLI::Groups::Ai
|
|
334
251
|
|
|
335
|
-
desc '
|
|
336
|
-
subcommand '
|
|
252
|
+
desc 'git SUBCOMMAND', 'AI-assisted git workflow (commit, pr, review)'
|
|
253
|
+
subcommand 'git', Legion::CLI::Groups::Git
|
|
337
254
|
|
|
338
|
-
desc '
|
|
339
|
-
subcommand '
|
|
255
|
+
desc 'pipeline SUBCOMMAND', 'LLM pipeline tools (prompts, evals, datasets, skills)'
|
|
256
|
+
subcommand 'pipeline', Legion::CLI::Groups::Pipeline
|
|
340
257
|
|
|
341
|
-
desc '
|
|
342
|
-
subcommand '
|
|
258
|
+
desc 'ops SUBCOMMAND', 'Observability, cost, audit, and operations'
|
|
259
|
+
subcommand 'ops', Legion::CLI::Groups::Ops
|
|
343
260
|
|
|
344
|
-
desc '
|
|
345
|
-
subcommand '
|
|
261
|
+
desc 'serve SUBCOMMAND', 'Protocol servers (MCP, ACP)'
|
|
262
|
+
subcommand 'serve', Legion::CLI::Groups::Serve
|
|
346
263
|
|
|
347
|
-
desc '
|
|
348
|
-
subcommand '
|
|
264
|
+
desc 'admin SUBCOMMAND', 'Auth, RBAC, workers, and teams'
|
|
265
|
+
subcommand 'admin', Legion::CLI::Groups::Admin
|
|
349
266
|
|
|
350
|
-
desc '
|
|
351
|
-
subcommand '
|
|
267
|
+
desc 'dev SUBCOMMAND', 'Generators, docs, marketplace, and shell completion'
|
|
268
|
+
subcommand 'dev', Legion::CLI::Groups::Dev
|
|
352
269
|
|
|
353
270
|
desc 'tree', 'Print a tree of all available commands'
|
|
354
271
|
def tree
|
data/lib/legion/service.rb
CHANGED
|
@@ -130,7 +130,7 @@ module Legion
|
|
|
130
130
|
|
|
131
131
|
Legion::Gaia.registry&.rediscover if gaia && defined?(Legion::Gaia) && Legion::Gaia.started?
|
|
132
132
|
|
|
133
|
-
Legion::Extensions::Memory::Helpers::ErrorTracer.setup if defined?(Legion::Extensions::Memory::Helpers::ErrorTracer)
|
|
133
|
+
Legion::Extensions::Agentic::Memory::Trace::Helpers::ErrorTracer.setup if defined?(Legion::Extensions::Agentic::Memory::Trace::Helpers::ErrorTracer)
|
|
134
134
|
|
|
135
135
|
Legion::Crypt.cs if crypt
|
|
136
136
|
|
data/lib/legion/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: legionio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esity
|
|
@@ -625,6 +625,13 @@ files:
|
|
|
625
625
|
- lib/legion/cli/gaia_command.rb
|
|
626
626
|
- lib/legion/cli/generate_command.rb
|
|
627
627
|
- lib/legion/cli/graph_command.rb
|
|
628
|
+
- lib/legion/cli/groups/admin_group.rb
|
|
629
|
+
- lib/legion/cli/groups/ai_group.rb
|
|
630
|
+
- lib/legion/cli/groups/dev_group.rb
|
|
631
|
+
- lib/legion/cli/groups/git_group.rb
|
|
632
|
+
- lib/legion/cli/groups/ops_group.rb
|
|
633
|
+
- lib/legion/cli/groups/pipeline_group.rb
|
|
634
|
+
- lib/legion/cli/groups/serve_group.rb
|
|
628
635
|
- lib/legion/cli/image_command.rb
|
|
629
636
|
- lib/legion/cli/init/config_generator.rb
|
|
630
637
|
- lib/legion/cli/init/environment_detector.rb
|