legionio 1.6.29 → 1.6.30
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/extensions/helpers/lex.rb +0 -27
- data/lib/legion/extensions/hooks/base.rb +7 -1
- 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: 397996eada137bc261c132386c1ec4e5a09e8c560e1ce39566719140fd045778
|
|
4
|
+
data.tar.gz: 4bedc4d2a46f064481aeba9cd29546600e585f29137861b95bc0a57fa9764d6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f407b39baba1f70752bb06c0cd83d5a757e14494a99c20e38fffa09197dbd0671ec25fe29974cafc9879138e1fa790272b0353bc73e92da46740515a23e827bc
|
|
7
|
+
data.tar.gz: bfd023f353db135a04ce05871e097465210633fb8c8c85fe27403056051f19452c7eb883e9a4b6631826b5f766d82a16591e59aeafec466856e6608f56d334bd
|
data/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.6.30] - 2026-03-28
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `Legion::Extensions::Hooks::Base` now defines the `mount(path)` DSL method and `mount_path` reader — fixes `NoMethodError` boot crash in any extension hook that calls `mount` (e.g. `lex-microsoft_teams` `Hooks::Auth`)
|
|
9
|
+
|
|
5
10
|
## [1.6.29] - 2026-03-28
|
|
6
11
|
|
|
12
|
+
### Removed
|
|
13
|
+
- `ClassMethods` module (`expose_as_mcp_tool`, `mcp_tool_prefix`) from `Legion::Extensions::Helpers::Lex` — deprecated since the definition DSL was introduced; zero extensions use them
|
|
14
|
+
|
|
7
15
|
### Fixed
|
|
8
16
|
- Fallback route guards in `api.rb` now check `router.library_names.include?` instead of `defined?` — prevents 404s when gem modules are loaded but routes are not yet mounted (fixes #53)
|
|
9
17
|
|
|
@@ -12,32 +12,6 @@ module Legion
|
|
|
12
12
|
include Legion::JSON::Helper
|
|
13
13
|
include Legion::Extensions::Helpers::Secret
|
|
14
14
|
|
|
15
|
-
module ClassMethods
|
|
16
|
-
# @deprecated Use mcp_exposed: flag in definition DSL instead
|
|
17
|
-
def expose_as_mcp_tool(value = :_unset)
|
|
18
|
-
if value == :_unset
|
|
19
|
-
return @expose_as_mcp_tool unless @expose_as_mcp_tool.nil?
|
|
20
|
-
|
|
21
|
-
if defined?(Legion::Settings) && Legion::Settings.respond_to?(:dig)
|
|
22
|
-
Legion::Settings.dig(:mcp, :auto_expose_runners) || false
|
|
23
|
-
else
|
|
24
|
-
false
|
|
25
|
-
end
|
|
26
|
-
else
|
|
27
|
-
@expose_as_mcp_tool = value
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# @deprecated Use mcp_exposed: flag in definition DSL instead
|
|
32
|
-
def mcp_tool_prefix(value = :_unset)
|
|
33
|
-
if value == :_unset
|
|
34
|
-
@mcp_tool_prefix
|
|
35
|
-
else
|
|
36
|
-
@mcp_tool_prefix = value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
15
|
def runner_desc(desc)
|
|
42
16
|
settings[:runners] = {} if settings[:runners].nil?
|
|
43
17
|
settings[:runners][actor_name.to_sym] = {} if settings[:runners][actor_name.to_sym].nil?
|
|
@@ -47,7 +21,6 @@ module Legion
|
|
|
47
21
|
def self.included(base)
|
|
48
22
|
base.send :extend, Legion::Extensions::Helpers::Core if base.instance_of?(Class)
|
|
49
23
|
base.send :extend, Legion::Extensions::Helpers::Logger if base.instance_of?(Class)
|
|
50
|
-
base.extend ClassMethods if base.instance_of?(Class)
|
|
51
24
|
base.extend base if base.instance_of?(Module)
|
|
52
25
|
end
|
|
53
26
|
|
|
@@ -47,8 +47,14 @@ module Legion
|
|
|
47
47
|
@verify_config = { header: header.upcase.tr('-', '_'), secret: secret }
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# DSL: declare a sub-path suffix appended to the auto-generated hook route
|
|
51
|
+
# mount '/callback' # e.g. /api/extensions/microsoft_teams/hooks/auth/callback
|
|
52
|
+
def mount(path)
|
|
53
|
+
@mount_path = path
|
|
54
|
+
end
|
|
55
|
+
|
|
50
56
|
attr_reader :route_type, :route_header_name, :route_field_name,
|
|
51
|
-
:route_mapping, :verify_type, :verify_config
|
|
57
|
+
:route_mapping, :verify_type, :verify_config, :mount_path
|
|
52
58
|
end
|
|
53
59
|
|
|
54
60
|
# Instance methods called by the API layer
|
data/lib/legion/version.rb
CHANGED