legion-gaia 0.9.61 → 0.9.62

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: 12edcb61bebce4bbbd39edcbdb2db2281570ebea9fdf532b6b5ecf35a1d97fbb
4
- data.tar.gz: aa4e1afe3bae0e4159d2d1975726f9dcafb216d4f72f63582f22089feae5a323
3
+ metadata.gz: 71bb865569a9d7730467a7ef628b7d4518a138356a7643e193a48ab3007373a1
4
+ data.tar.gz: 9dc329a3c2a1965d89e24709eed516d50f4bc17dca0d721ed91152c6b9c7c799
5
5
  SHA512:
6
- metadata.gz: b404500f3c22a620c2ddb27957d1b163377cc0301059aaa5e7cf94d0b0880bf9377e9da9191a6680674a3ab5e3cce5f8c9d7019b0bd9874fd6180ebaf14cb1d4
7
- data.tar.gz: 27d9e1ea9bbc959c18c7ddc0e101feddb569e2c8fd52f16106e39a1b96af510d4c1abd371b8ded229ae8b6e3d391b62a0d9e872d67a4b941a2762abb5981c397
6
+ metadata.gz: d583fa1b87e559a140610e7c8dbef90f6f357833265c21f94ec87ac5bce166f3666250f371d498ce8752453a5e9e0cc33948e5e69f3945beb5e166153c1f7c8e
7
+ data.tar.gz: 4200917911b720000f7c029220180817546ba824a12af7ff1d970c0920aa82a56028a6f783ca312ead58ec37ee283d9a362b0f87e164fb97a8351e974bff6e90
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.62] - 2026-07-22
4
+ ### Added
5
+ - H8 prep: `BondRegistry.erase_partner!(identity:)` — thread-safe deletion of a single bond entry; marks registry dirty; emits `gaia.bond.erased` event if `Legion::Events` is defined; idempotent (no raise on missing identity)
6
+ - H8 prep: `Gaia.erase_attribution!(identity:)` — erases Apollo Local attribution records tagged `self-knowledge/attribution/partner:<identity>` via `store.delete_by_tags`; includes TODO for `legion-apollo` to implement `delete_by_tags(tags:)`, gracefully no-ops until available
7
+
3
8
  ## [0.9.61] - 2026-07-16
4
9
  ### Added
5
10
  - H4: `PartnerModel` — 7-slot working-memory competition (§12.4); only filter/transform/autonomous tier synapses compete, observe-tier excluded; unified ranking across synapses, traces, and preferences by `strength × (1 + emotional_intensity)`; `observe_mode_entries` transparency surface
@@ -249,6 +249,19 @@ module Legion
249
249
  handle_exception(e, level: :warn, operation: 'gaia.bond_registry.hydrate_from_apollo')
250
250
  end
251
251
 
252
+ def erase_partner!(identity:)
253
+ erased = false
254
+ @mutex.synchronize do
255
+ erased = @bonds.delete(identity.to_s)
256
+ @dirty = true if erased
257
+ end
258
+ log.info("[gaia] bond erased identity=#{identity}") if erased
259
+ if defined?(Legion::Events) && Legion::Events.respond_to?(:emit)
260
+ Legion::Events.emit('gaia.bond.erased', identity: identity)
261
+ end
262
+ { erased: !erased.nil?, identity: identity }
263
+ end
264
+
252
265
  def reset!
253
266
  @mutex.synchronize do
254
267
  @bonds = Concurrent::Hash.new
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Gaia
5
- VERSION = '0.9.61'
5
+ VERSION = '0.9.62'
6
6
  end
7
7
  end
data/lib/legion/gaia.rb CHANGED
@@ -246,6 +246,31 @@ module Legion
246
246
  end
247
247
  end
248
248
 
249
+ def erase_attribution!(identity:)
250
+ store = apollo_local_store
251
+ unless store
252
+ log.info("[gaia] erase_attribution! skipped identity=#{identity} reason=no_apollo_local")
253
+ return { erased: false, identity: identity, count: 0, reason: :no_apollo_local }
254
+ end
255
+
256
+ tags = %w[self-knowledge attribution] + ["partner:#{identity}"]
257
+ # TODO: legion-apollo needs delete_by_tags(tags:) — using query_by_tags + individual deletes once available
258
+ # Until then: store.delete_by_tags is the target API; this no-ops with count=0 until implemented
259
+ count = 0
260
+ if store.respond_to?(:delete_by_tags)
261
+ result = store.delete_by_tags(tags: tags)
262
+ count = result[:count].to_i if result.is_a?(Hash)
263
+ else
264
+ log.info("[gaia] erase_attribution! identity=#{identity} " \
265
+ 'reason=delete_by_tags_not_available count=0')
266
+ end
267
+ log.info("[gaia] erase_attribution! identity=#{identity} count=#{count}")
268
+ { erased: true, identity: identity, count: count }
269
+ rescue StandardError => e
270
+ handle_exception(e, level: :warn, operation: 'gaia.erase_attribution', identity: identity)
271
+ { erased: false, identity: identity, count: 0 }
272
+ end
273
+
249
274
  def record_advisory_meta(advisory_id:, advisory_types:)
250
275
  return unless started?
251
276
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-gaia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.61
4
+ version: 0.9.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity