legionio 1.6.32 → 1.6.33
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 +8 -0
- data/lib/legion/cli/setup_command.rb +12 -6
- data/lib/legion/cli.rb +3 -0
- data/lib/legion/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: 47493b86202b34c55a068f274c8b63c9840edb681728a80b5b301df2bf1913f5
|
|
4
|
+
data.tar.gz: 99480b62f0f5be82bea044e37f67b8e1fb22e4bc3a9d6885ff549b4decbcd90c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 619a2c7e66a072f6acc233b4a924e4129716174967a7d7ab470f7b3dcc81383618cb5b448805e1ab1b14ae0ba3a51df00fd4e2fa4c2ab091092d2fe8d17a37e3
|
|
7
|
+
data.tar.gz: '08dc265a6a6add0debffb0421ad81793929f6adaf137fb81bd5120aa745941ae733e6223763bc958c3b1d211ee2ca62aa599b39f53739cce306c4215420e97c3'
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.6.33] - 2026-03-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `knowledge` registered as top-level CLI subcommand (previously only accessible via `legionio ai knowledge`). Fixes knowledge capture hooks that call `legionio knowledge capture commit/transcript`.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Claude Code hook format in `setup claude-code`: PostToolUse and Stop hooks now emit the new `hooks` array wrapper format with `type: command` entries. Detection supports both old and new formats via `hook_commands` helper.
|
|
12
|
+
|
|
5
13
|
## [1.6.32] - 2026-03-28
|
|
6
14
|
|
|
7
15
|
### Added
|
|
@@ -350,8 +350,8 @@ module Legion
|
|
|
350
350
|
|
|
351
351
|
hooks = existing['hooks'] || {}
|
|
352
352
|
|
|
353
|
-
has_commit = Array(hooks['PostToolUse']).any? { |h| h
|
|
354
|
-
has_transcript = Array(hooks['Stop']).any? { |h| h
|
|
353
|
+
has_commit = Array(hooks['PostToolUse']).any? { |h| hook_commands(h).any? { |c| c.include?('knowledge capture commit') } }
|
|
354
|
+
has_transcript = Array(hooks['Stop']).any? { |h| hook_commands(h).any? { |c| c.include?('knowledge capture transcript') } }
|
|
355
355
|
if has_commit && has_transcript && !options[:force]
|
|
356
356
|
puts ' Write-back hooks already present (use --force to overwrite)' unless options[:json]
|
|
357
357
|
return
|
|
@@ -363,15 +363,14 @@ module Legion
|
|
|
363
363
|
unless has_commit
|
|
364
364
|
hooks['PostToolUse'] << {
|
|
365
365
|
'matcher' => 'Bash',
|
|
366
|
-
'command' => 'legionio knowledge capture commit',
|
|
367
|
-
'timeout' => 10_000
|
|
366
|
+
'hooks' => [{ 'type' => 'command', 'command' => 'legionio knowledge capture commit', 'timeout' => 10_000 }]
|
|
368
367
|
}
|
|
369
368
|
end
|
|
370
369
|
|
|
371
370
|
unless has_transcript
|
|
372
371
|
hooks['Stop'] << {
|
|
373
|
-
'
|
|
374
|
-
'timeout' => 30_000
|
|
372
|
+
'matcher' => '',
|
|
373
|
+
'hooks' => [{ 'type' => 'command', 'command' => 'legionio knowledge capture transcript', 'timeout' => 30_000 }]
|
|
375
374
|
}
|
|
376
375
|
end
|
|
377
376
|
|
|
@@ -381,6 +380,13 @@ module Legion
|
|
|
381
380
|
puts ' Installed write-back hooks for knowledge capture' unless options[:json]
|
|
382
381
|
end
|
|
383
382
|
|
|
383
|
+
def hook_commands(hook_entry)
|
|
384
|
+
# Support both old format (command at top level) and new format (hooks array)
|
|
385
|
+
cmds = Array(hook_entry['hooks']).filter_map { |h| h['command'] }
|
|
386
|
+
cmds << hook_entry['command'] if hook_entry['command']
|
|
387
|
+
cmds
|
|
388
|
+
end
|
|
389
|
+
|
|
384
390
|
def write_mcp_servers_json(_out, path, installed)
|
|
385
391
|
existing = load_json_file(path)
|
|
386
392
|
servers = existing['mcpServers'] || {}
|
data/lib/legion/cli.rb
CHANGED
|
@@ -254,6 +254,9 @@ module Legion
|
|
|
254
254
|
subcommand 'init', Legion::CLI::Init
|
|
255
255
|
|
|
256
256
|
# --- Interactive & shortcuts ---
|
|
257
|
+
desc 'knowledge SUBCOMMAND', 'Search and manage the document knowledge base'
|
|
258
|
+
subcommand 'knowledge', Legion::CLI::Knowledge
|
|
259
|
+
|
|
257
260
|
desc 'codegen SUBCOMMAND', 'Manage self-generating functions'
|
|
258
261
|
subcommand 'codegen', CodegenCommand
|
|
259
262
|
|
data/lib/legion/version.rb
CHANGED