legion-data 1.8.2 → 1.8.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: 38a6acdfd8b43c7f28928e2c972b292d5f4dac76fe62049600c3cafe617e270c
4
- data.tar.gz: 00615b710b087d2d71683eca0424b44200cf9d2934d68169196ee9b13252f225
3
+ metadata.gz: d9f440b5e825e600fe33f7b07f6aa7aeb11cde67069eea1960e01ed6fcfb5ee2
4
+ data.tar.gz: b60960ed3f6cf3f870c92a309dd8ee53d11f7b1f672e747a35c0ca11e8267074
5
5
  SHA512:
6
- metadata.gz: 6dbf52624a9780173930c096f4fcd58216e6bcd59ffaa832d137446753dbb39eb293e17c6e2288dbce1451bc77cf5fa366d55d6ce99901794e82d871ca679ad7
7
- data.tar.gz: 50ea8e3806bdf7de608af572802c8edf6ba40c77c2c42857ed4d7a7ec85470c29c3345771aefa62bbb92d7fd466fad1f3fce1d8b9ab85d404fd42bed70e70554
6
+ metadata.gz: 345dd816ac680066d8964506e9c14f72638b694ef5a3d7bc17e135328ed6131ac57ca1180b376818985248b5bbd55d89a8739ce10009f4fa444bec7b374bddee
7
+ data.tar.gz: 54a8d886807da8bcddf8700bac674a5c6199f92f15e6f0ee76384a4651057c8af034024c1e4ca51de852acb15c81fee3e7e0b87ffdcf8950364d24bc0a6784b9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.8.3] - 2026-05-07
6
+
7
+ ### Removed
8
+ - Legacy top-level identity model files (`identity.rb`, `principal.rb`, `identity_provider.rb`, `identity_group.rb`, `identity_group_membership.rb`, `identity_audit_log.rb`) — superseded by the portable `identity/` namespace models backed by `portable_*` tables.
9
+
10
+ ### Fixed
11
+ - `TypeError: superclass mismatch for class Identity` on postgres startup caused by `model_helpers.rb` defining `class Identity` as a plain namespace before `identity.rb` tried to reopen it as `< Sequel::Model(:identities)`.
12
+
5
13
  ## [1.8.2] - 2026-05-07
6
14
 
7
15
  ### Changed
@@ -13,8 +13,7 @@ module Legion
13
13
  def models
14
14
  %w[extension function relationship chain task runner node setting digital_worker
15
15
  apollo_entry apollo_relation apollo_expertise apollo_access_log audit_log
16
- audit_record identity_provider principal identity identity_group
17
- identity_group_membership identity_audit_log extract_step_timing
16
+ audit_record extract_step_timing
18
17
  identity/identity identity/principal identity/providers identity/group
19
18
  identity/group_memberships identity/audit_log
20
19
  apollo/entries apollo/relation apollo/access_log apollo/expertise
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Data
5
- VERSION = '1.8.2'
5
+ VERSION = '1.8.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
@@ -262,7 +262,6 @@ files:
262
262
  - lib/legion/data/models/extension.rb
263
263
  - lib/legion/data/models/extract_step_timing.rb
264
264
  - lib/legion/data/models/function.rb
265
- - lib/legion/data/models/identity.rb
266
265
  - lib/legion/data/models/identity/audit_log.rb
267
266
  - lib/legion/data/models/identity/group.rb
268
267
  - lib/legion/data/models/identity/group_memberships.rb
@@ -270,10 +269,6 @@ files:
270
269
  - lib/legion/data/models/identity/model_helpers.rb
271
270
  - lib/legion/data/models/identity/principal.rb
272
271
  - lib/legion/data/models/identity/providers.rb
273
- - lib/legion/data/models/identity_audit_log.rb
274
- - lib/legion/data/models/identity_group.rb
275
- - lib/legion/data/models/identity_group_membership.rb
276
- - lib/legion/data/models/identity_provider.rb
277
272
  - lib/legion/data/models/llm/conversation.rb
278
273
  - lib/legion/data/models/llm/conversation_compaction.rb
279
274
  - lib/legion/data/models/llm/message.rb
@@ -288,7 +283,6 @@ files:
288
283
  - lib/legion/data/models/llm/tool_call.rb
289
284
  - lib/legion/data/models/llm/tool_call_attempt.rb
290
285
  - lib/legion/data/models/node.rb
291
- - lib/legion/data/models/principal.rb
292
286
  - lib/legion/data/models/rbac/cross_team_grants.rb
293
287
  - lib/legion/data/models/rbac/model_helpers.rb
294
288
  - lib/legion/data/models/rbac/role_assignments.rb
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- return unless Legion::Data::Connection.adapter == :postgres
4
-
5
- module Legion
6
- module Data
7
- module Model
8
- class Identity < Sequel::Model(:identities)
9
- require_relative 'identity/model_helpers'
10
- include ModelHelpers
11
-
12
- many_to_one :principal, class: 'Legion::Data::Model::Principal'
13
- many_to_one :provider, class: 'Legion::Data::Model::IdentityProvider', key: :provider_id
14
-
15
- def self.lookup_columns
16
- %i[id uuid provider_identity_key provider_identity]
17
- end
18
-
19
- if defined?(Legion::Data::Encryption::SequelPlugin)
20
- plugin Legion::Data::Encryption::SequelPlugin
21
- encrypted_column :profile
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- return unless Legion::Data::Connection.adapter == :postgres
4
-
5
- module Legion
6
- module Data
7
- module Model
8
- class IdentityAuditLog < Sequel::Model(:identity_audit_log)
9
- many_to_one :principal, class: 'Legion::Data::Model::Principal'
10
- many_to_one :identity, class: 'Legion::Data::Model::Identity'
11
- end
12
- end
13
- end
14
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'identity/model_helpers'
4
-
5
- return unless Legion::Data::Connection.adapter == :postgres
6
-
7
- module Legion
8
- module Data
9
- module Model
10
- class IdentityGroup < Sequel::Model(:identity_groups)
11
- include Identity::ModelHelpers
12
-
13
- one_to_many :memberships, class: 'Legion::Data::Model::IdentityGroupMembership', key: :group_id
14
- many_to_many :principals,
15
- class: 'Legion::Data::Model::Principal',
16
- join_table: :identity_group_memberships,
17
- left_key: :group_id,
18
- right_key: :principal_id
19
-
20
- def self.lookup_columns
21
- %i[id uuid name]
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- return unless Legion::Data::Connection.adapter == :postgres
4
-
5
- module Legion
6
- module Data
7
- module Model
8
- class IdentityGroupMembership < Sequel::Model(:identity_group_memberships)
9
- many_to_one :principal, class: 'Legion::Data::Model::Principal'
10
- many_to_one :group, class: 'Legion::Data::Model::IdentityGroup', key: :group_id
11
-
12
- def expired?
13
- status == 'expired' || (expires_at && Time.now >= expires_at)
14
- end
15
-
16
- def stale?
17
- status == 'stale'
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'identity/model_helpers'
4
-
5
- return unless Legion::Data::Connection.adapter == :postgres
6
-
7
- module Legion
8
- module Data
9
- module Model
10
- class IdentityProvider < Sequel::Model(:identity_providers)
11
- include Identity::ModelHelpers
12
-
13
- one_to_many :identities, class: 'Legion::Data::Model::Identity'
14
-
15
- def self.lookup_columns
16
- %i[id uuid name]
17
- end
18
-
19
- def parsed_capabilities
20
- Array(capabilities)
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'identity/model_helpers'
4
-
5
- return unless Legion::Data::Connection.adapter == :postgres
6
-
7
- module Legion
8
- module Data
9
- module Model
10
- class Principal < Sequel::Model(:principals)
11
- include Identity::ModelHelpers
12
-
13
- one_to_many :identities, class: 'Legion::Data::Model::Identity'
14
- one_to_many :group_memberships, class: 'Legion::Data::Model::IdentityGroupMembership'
15
- many_to_many :groups,
16
- class: 'Legion::Data::Model::IdentityGroup',
17
- join_table: :identity_group_memberships,
18
- left_key: :principal_id,
19
- right_key: :group_id
20
-
21
- def self.lookup_columns
22
- %i[id uuid canonical_name employee_key employee_id]
23
- end
24
-
25
- def active_groups
26
- group_memberships_dataset
27
- .where(status: 'active')
28
- .eager(:group)
29
- .all
30
- .map(&:group)
31
- end
32
- end
33
- end
34
- end
35
- end