bdo-toolkit 1.0.16__tar.gz → 1.1.1__tar.gz

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.
Files changed (181) hide show
  1. {bdo_toolkit-1.0.16/src/bdo_toolkit.egg-info → bdo_toolkit-1.1.1}/PKG-INFO +2 -1
  2. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/README.md +1 -0
  3. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/assembly.py +147 -5
  4. bdo_toolkit-1.1.1/src/bdo_toolkit/_item_state/character_discovery.py +258 -0
  5. bdo_toolkit-1.1.1/src/bdo_toolkit/_item_state/character_models.py +128 -0
  6. bdo_toolkit-1.1.1/src/bdo_toolkit/_item_state/character_profile.py +216 -0
  7. bdo_toolkit-1.1.1/src/bdo_toolkit/_item_state/character_slots.py +70 -0
  8. bdo_toolkit-1.1.1/src/bdo_toolkit/_item_state/character_witnesses.py +431 -0
  9. bdo_toolkit-1.1.1/src/bdo_toolkit/_item_state/characters.py +415 -0
  10. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/inventory.py +6 -5
  11. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/models.py +7 -1
  12. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/session.py +40 -0
  13. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/storage.py +135 -0
  14. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_version.py +1 -1
  15. bdo_toolkit-1.1.1/src/bdo_toolkit/character_calibration.py +226 -0
  16. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/character_state.py +1 -0
  17. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/cli.py +98 -0
  18. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/item_state.py +9 -0
  19. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/profiles.py +16 -0
  20. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_detail_learning.py +47 -16
  21. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_details.py +1 -1
  22. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_discovery.py +29 -0
  23. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_live_tracker.py +17 -0
  24. bdo_toolkit-1.1.1/src/bdo_toolkit/solare/_short_board.py +116 -0
  25. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1/src/bdo_toolkit.egg-info}/PKG-INFO +2 -1
  26. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit.egg-info/SOURCES.txt +10 -0
  27. bdo_toolkit-1.1.1/tests/test_character_calibration.py +263 -0
  28. bdo_toolkit-1.1.1/tests/test_character_loadouts.py +292 -0
  29. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_character_state.py +109 -12
  30. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_learning.py +4 -2
  31. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_learning_adversarial.py +42 -0
  32. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_replay.py +90 -0
  33. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/LICENSE +0 -0
  34. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/pyproject.toml +0 -0
  35. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/setup.cfg +0 -0
  36. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/__init__.py +0 -0
  37. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_async_sessions.py +0 -0
  38. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_async_utils.py +0 -0
  39. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/__init__.py +0 -0
  40. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/_constants.py +0 -0
  41. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
  42. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/_records.py +0 -0
  43. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/analysis.py +0 -0
  44. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/capture.py +0 -0
  45. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/companions.py +0 -0
  46. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/live.py +0 -0
  47. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/models.py +0 -0
  48. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/observations.py +0 -0
  49. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/persistence.py +0 -0
  50. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/progress.py +0 -0
  51. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/validation.py +0 -0
  52. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_calibration/workflow.py +0 -0
  53. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_capture_backend.py +0 -0
  54. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_capture_options.py +0 -0
  55. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_capture_runtime.py +0 -0
  56. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_deposit_origin.py +0 -0
  57. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_engine.py +0 -0
  58. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_framing.py +0 -0
  59. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/__init__.py +0 -0
  60. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/_constants.py +0 -0
  61. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/_records.py +0 -0
  62. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_item_state/formatting.py +0 -0
  63. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_observation_session.py +0 -0
  64. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_origin/__init__.py +0 -0
  65. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_origin/discovery.py +0 -0
  66. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_origin/manual.py +0 -0
  67. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_origin/models.py +0 -0
  68. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_origin/tracker.py +0 -0
  69. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_profile_io.py +0 -0
  70. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_profile_runtime.py +0 -0
  71. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_protocol.py +0 -0
  72. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_reassembly.py +0 -0
  73. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_record_geometry.py +0 -0
  74. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_specs.py +0 -0
  75. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
  76. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_storage_hydration.py +0 -0
  77. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/_tracked_capture.py +0 -0
  78. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/__init__.py +0 -0
  79. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
  80. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/_capture.py +0 -0
  81. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/_discovery.py +0 -0
  82. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/_profile.py +0 -0
  83. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/_validation.py +0 -0
  84. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/async_session.py +0 -0
  85. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/calibration.py +0 -0
  86. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/models.py +0 -0
  87. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/replay.py +0 -0
  88. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/agris/session.py +0 -0
  89. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/calibration.py +0 -0
  90. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/capture.py +0 -0
  91. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/capture_diagnosis.py +0 -0
  92. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/diagnostics.py +0 -0
  93. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/events.py +0 -0
  94. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/filters.py +0 -0
  95. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/grind/__init__.py +0 -0
  96. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/grind/_pipeline.py +0 -0
  97. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/grind/models.py +0 -0
  98. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/grind/session.py +0 -0
  99. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/origin_learning.py +0 -0
  100. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/py.typed +0 -0
  101. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/raw/__init__.py +0 -0
  102. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/raw/_collector.py +0 -0
  103. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/raw/models.py +0 -0
  104. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/raw/replay.py +0 -0
  105. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/raw/session.py +0 -0
  106. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/remote_profiles.py +0 -0
  107. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/__init__.py +0 -0
  108. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_constants.py +0 -0
  109. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
  110. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_result.py +0 -0
  111. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_scanner.py +0 -0
  112. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/_validation.py +0 -0
  113. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/async_session.py +0 -0
  114. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/models.py +0 -0
  115. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/replay.py +0 -0
  116. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/solare/session.py +0 -0
  117. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/writers.py +0 -0
  118. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/xp/__init__.py +0 -0
  119. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/xp/_tracker.py +0 -0
  120. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/xp/models.py +0 -0
  121. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/xp/profile.py +0 -0
  122. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/xp/replay.py +0 -0
  123. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit/xp/session.py +0 -0
  124. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
  125. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
  126. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit.egg-info/requires.txt +0 -0
  127. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
  128. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_async.py +0 -0
  129. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_cli.py +0 -0
  130. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_discovery.py +0 -0
  131. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_evidence.py +0 -0
  132. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_models.py +0 -0
  133. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_profiles.py +0 -0
  134. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_replay.py +0 -0
  135. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_agris_session.py +0 -0
  136. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_async_sessions.py +0 -0
  137. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_calibration.py +0 -0
  138. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_calibration_conveniences.py +0 -0
  139. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_calibration_lifecycle.py +0 -0
  140. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_calibration_persistence.py +0 -0
  141. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_calibration_progress.py +0 -0
  142. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_calibration_retention.py +0 -0
  143. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_capture_backend.py +0 -0
  144. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_capture_diagnosis.py +0 -0
  145. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_capture_replay.py +0 -0
  146. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_capture_runtime.py +0 -0
  147. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_cli.py +0 -0
  148. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_decoder_diagnostics.py +0 -0
  149. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_deposit_origin.py +0 -0
  150. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_direction.py +0 -0
  151. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
  152. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_engine.py +0 -0
  153. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_examples_and_writers.py +0 -0
  154. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_explicit_profile.py +0 -0
  155. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_fixture_catalog.py +0 -0
  156. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_fixture_regressions.py +0 -0
  157. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_framing.py +0 -0
  158. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_grind.py +0 -0
  159. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_initial_load_storage.py +0 -0
  160. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_inventory_snapshots.py +0 -0
  161. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_item_state.py +0 -0
  162. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_live_capture_session.py +0 -0
  163. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_origin_learning.py +0 -0
  164. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_package_layout.py +0 -0
  165. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_profile_validation.py +0 -0
  166. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_raw.py +0 -0
  167. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_reassembly.py +0 -0
  168. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_remote_profiles.py +0 -0
  169. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_api.py +0 -0
  170. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_details.py +0 -0
  171. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_equipment.py +0 -0
  172. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_history.py +0 -0
  173. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_real_captures.py +0 -0
  174. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_solare_session.py +0 -0
  175. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_storage_destination_validation.py +0 -0
  176. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_storage_events.py +0 -0
  177. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_storage_hydration_tracker.py +0 -0
  178. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_storage_unknown_destination_calibration.py +0 -0
  179. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_toolkit_api.py +0 -0
  180. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_xp.py +0 -0
  181. {bdo_toolkit-1.0.16 → bdo_toolkit-1.1.1}/tests/test_xp_profiles.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bdo-toolkit
3
- Version: 1.0.16
3
+ Version: 1.1.1
4
4
  Summary: Passive, read-only BDO packet parsing toolkit for app developers.
5
5
  Author: bdo-toolkit contributors
6
6
  License-Expression: MIT
@@ -68,6 +68,7 @@ combines supported observations in one live session.
68
68
  | --- | --- | --- | --- |
69
69
  | Item activity | A continuing stream of typed `BDOEvent` objects for supported loot, gathering, inventory, and storage changes | [Item events](https://ychwu.github.io/bdo-toolkit/#item-overview) | Stable |
70
70
  | Inventory and town storage | A finite `ItemStateSnapshot` assembled from character-load traffic, with inventory, known balances, and observed town storage | [Inventory & town storage](https://ychwu.github.io/bdo-toolkit/#item-state-overview) | Beta |
71
+ | Character inventories and equipment | Per-character bags, equipped gear and life-skill gear from a normal world login | [Character loadouts and calibration](CHARACTER_LOADOUTS.md) | Experimental |
71
72
  | Arena of Solare leaderboards | A finite `SolareCaptureResult` containing overall rankings, class tables, and player statistics when the capture is complete | [Arena of Solare](https://ychwu.github.io/bdo-toolkit/#solare-overview) | Beta |
72
73
  | Grind tracking | One capture for confirmed mob drops, with optional profile-based Agris and solo XP | [GrindSession](https://ychwu.github.io/bdo-toolkit/#grind-session) | Experimental |
73
74
  | Raw server messages | Every length-framed server-to-client message, opcode-free and undecoded, for protocol research | [Raw server messages](https://ychwu.github.io/bdo-toolkit/#raw-messages) | Experimental |
@@ -41,6 +41,7 @@ combines supported observations in one live session.
41
41
  | --- | --- | --- | --- |
42
42
  | Item activity | A continuing stream of typed `BDOEvent` objects for supported loot, gathering, inventory, and storage changes | [Item events](https://ychwu.github.io/bdo-toolkit/#item-overview) | Stable |
43
43
  | Inventory and town storage | A finite `ItemStateSnapshot` assembled from character-load traffic, with inventory, known balances, and observed town storage | [Inventory & town storage](https://ychwu.github.io/bdo-toolkit/#item-state-overview) | Beta |
44
+ | Character inventories and equipment | Per-character bags, equipped gear and life-skill gear from a normal world login | [Character loadouts and calibration](CHARACTER_LOADOUTS.md) | Experimental |
44
45
  | Arena of Solare leaderboards | A finite `SolareCaptureResult` containing overall rankings, class tables, and player statistics when the capture is complete | [Arena of Solare](https://ychwu.github.io/bdo-toolkit/#solare-overview) | Beta |
45
46
  | Grind tracking | One capture for confirmed mob drops, with optional profile-based Agris and solo XP | [GrindSession](https://ychwu.github.io/bdo-toolkit/#grind-session) | Experimental |
46
47
  | Raw server messages | Every length-framed server-to-client message, opcode-free and undecoded, for protocol research | [Raw server messages](https://ychwu.github.io/bdo-toolkit/#raw-messages) | Experimental |
@@ -3,12 +3,13 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import hashlib
6
+ from collections import OrderedDict
6
7
  from dataclasses import replace
7
8
  from pathlib import Path
8
9
  from threading import RLock
9
10
  from typing import Any, Iterable, Optional
10
11
 
11
- from .._engine import toolkit_event_from_record
12
+ from .._engine import _ITEM_MAX_ACTIVE_FLOWS, toolkit_event_from_record
12
13
  from .._protocol import (
13
14
  BDOFrame,
14
15
  EventSpec,
@@ -24,6 +25,9 @@ from ._records import (
24
25
  _frame_flow_generation_key,
25
26
  _frame_key,
26
27
  )
28
+ from .character_profile import CharacterLayoutProfile, NOVEMBER
29
+ from . import characters
30
+ from .character_models import CharacterRoster
27
31
  from .inventory import _assemble_inventory, _latest_inventory_generation
28
32
  from .models import (
29
33
  CharacterStateSnapshot,
@@ -39,16 +43,22 @@ from .storage import (
39
43
  _assemble_storage,
40
44
  _character_storage_snapshot_fallback,
41
45
  _reconcile_split_storage_hydration,
46
+ _small_character_storage_fallback,
47
+ _worker_adjacent_storage_sweep,
42
48
  )
43
49
 
44
50
 
45
51
  class _CharacterStateAccumulator:
52
+
46
53
  def __init__(
47
54
  self,
48
55
  *,
49
56
  profile_source: str,
50
57
  specs: Iterable[EventSpec],
51
58
  capture_mode: str = "unknown",
59
+ include_characters: bool = False,
60
+ character_profile: CharacterLayoutProfile | None = None,
61
+ character_profile_error: str | None = None,
52
62
  input_path: str | Path | None = None,
53
63
  saved_capture_path: str | Path | None = None,
54
64
  capture_limits: Optional[ItemStateCaptureLimits] = None,
@@ -57,6 +67,14 @@ class _CharacterStateAccumulator:
57
67
  capture_limits, ItemStateCaptureLimits
58
68
  ):
59
69
  raise TypeError("capture_limits must be an ItemStateCaptureLimits or None")
70
+ if not isinstance(include_characters, bool):
71
+ raise TypeError("include_characters must be a bool")
72
+ self.include_characters = include_characters or character_profile is not None
73
+ self.character_profile_error = character_profile_error
74
+ self.character_profile = character_profile or NOVEMBER
75
+ self.character_tables = {
76
+ t.opcode: t for t in self.character_profile.tables.values()
77
+ }
60
78
  self.profile_source = profile_source
61
79
  self.capture_mode = capture_mode
62
80
  self.input_path = str(input_path) if input_path is not None else None
@@ -74,6 +92,21 @@ class _CharacterStateAccumulator:
74
92
  self.relevant_opcodes = {
75
93
  spec.opcode for spec in self.inventory_specs + self.storage_specs
76
94
  }
95
+ self.character_layout_supported = character_profile is not None or (
96
+ include_characters
97
+ and any(
98
+ spec.opcode == 0x14BE
99
+ and spec.repeat_stride == 224
100
+ and spec.item_offset == 29
101
+ for spec in self.inventory_specs
102
+ )
103
+ )
104
+ if self.character_layout_supported and self.relevant_opcodes.intersection(self.character_tables):
105
+ self.character_profile_error = "Character layout conflicts with an item decoder opcode."
106
+ if self.character_profile_error:
107
+ self.character_layout_supported = False
108
+ if self.character_layout_supported:
109
+ self.relevant_opcodes.update(self.character_tables)
77
110
  self._lock = RLock()
78
111
  self._frames_seen = 0
79
112
  self._relevant_frames_retained = 0
@@ -82,6 +115,10 @@ class _CharacterStateAccumulator:
82
115
  self._limit_error: Optional[ItemStateCaptureLimitError] = None
83
116
  self._frames: list[BDOFrame] = []
84
117
  self._seen_frames: set[tuple[_FrameKey, bytes]] = set()
118
+ # Stream positions only. Non-character payloads need not be retained.
119
+ self._last_frame_end: OrderedDict[tuple[str, int, str, int, int], tuple[int, bool]] = OrderedDict()
120
+ self._remote_starts: set[_FrameKey] = set()
121
+ self._remote_ends: set[_FrameKey] = set()
85
122
  self._inventory_events: list[BDOEvent] = []
86
123
  self._storage_events: list[BDOEvent] = []
87
124
  self._neutral_storage_events: list[BDOEvent] = []
@@ -97,6 +134,8 @@ class _CharacterStateAccumulator:
97
134
  self._frames_seen += 1
98
135
  if self._limit_error is not None:
99
136
  raise self._limit_error
137
+ if self.character_layout_supported:
138
+ self._observe_remote_boundary(frame)
100
139
  if frame.opcode not in self.relevant_opcodes:
101
140
  return
102
141
  digest = hashlib.blake2b(frame.message, digest_size=16).digest()
@@ -117,11 +156,34 @@ class _CharacterStateAccumulator:
117
156
  self.capture_limits.max_relevant_bytes,
118
157
  attempted_bytes,
119
158
  )
159
+ if (
160
+ self.character_layout_supported
161
+ and frame.opcode in self.character_tables
162
+ ):
163
+ cost = characters.record_cost(frame,self.character_tables[frame.opcode])
164
+ attempted = self._snapshot_records_retained + cost + len(self._live_storage_boundaries)
165
+ if attempted > self.capture_limits.max_snapshot_records:
166
+ self._raise_limit("max_snapshot_records", self.capture_limits.max_snapshot_records, attempted)
167
+ self._snapshot_records_retained += cost
120
168
  self._seen_frames.add(dedupe_key)
121
169
  self._frames.append(frame)
122
170
  self._relevant_frames_retained = attempted_frames
123
171
  self._relevant_bytes_retained = attempted_bytes
124
172
 
173
+ def _observe_remote_boundary(self, frame: BDOFrame) -> None:
174
+ flow = _frame_flow_generation_key(frame)
175
+ previous = self._last_frame_end.pop(flow, None)
176
+ start = frame.stream_sequence
177
+ if start is None:
178
+ return
179
+ remote = frame.opcode == self.character_profile.tables["remote"].opcode
180
+ if previous is not None and previous[0] == start and previous[1] != remote:
181
+ boundary = self._remote_starts if remote else self._remote_ends
182
+ boundary.add(_frame_key(frame))
183
+ self._last_frame_end[flow] = (start + len(frame.message), remote)
184
+ if len(self._last_frame_end) > _ITEM_MAX_ACTIVE_FLOWS:
185
+ self._last_frame_end.popitem(last=False)
186
+
125
187
  def observe_record(self, record: Any, raw_message: bytes) -> None:
126
188
  del raw_message
127
189
  self.observe_event(toolkit_event_from_record(record))
@@ -132,7 +194,8 @@ class _CharacterStateAccumulator:
132
194
  with self._lock:
133
195
  if self._limit_error is not None:
134
196
  raise self._limit_error
135
- if event.event_type not in {
197
+ withdrawal = event.event_type == "item_received" and event.source == "Storage"
198
+ if not withdrawal and event.event_type not in {
136
199
  "inventory_snapshot",
137
200
  "storage_snapshot",
138
201
  "storage_record",
@@ -154,7 +217,7 @@ class _CharacterStateAccumulator:
154
217
  self._inventory_events.append(event)
155
218
  elif event.event_type == "storage_snapshot":
156
219
  self._storage_events.append(event)
157
- elif event.event_type == "storage_delta":
220
+ elif event.event_type == "storage_delta" or withdrawal:
158
221
  # A proven live mutation is not snapshot content, but it is a
159
222
  # semantic boundary: neutral records on opposite sides must
160
223
  # never be reconciled into one character-load sweep.
@@ -186,6 +249,8 @@ class _CharacterStateAccumulator:
186
249
  relevant_bytes_retained = self._relevant_bytes_retained
187
250
  snapshot_records_retained = self._snapshot_records_retained
188
251
  frames = tuple(self._frames)
252
+ remote_starts = self._remote_starts.copy()
253
+ remote_ends = self._remote_ends.copy()
189
254
  inventory_events = tuple(self._inventory_events)
190
255
  storage_events = tuple(self._storage_events)
191
256
  neutral_storage_events = tuple(self._neutral_storage_events)
@@ -200,6 +265,27 @@ class _CharacterStateAccumulator:
200
265
  inventory_anchors = inventory_generation.anchors
201
266
  generation_start = inventory_generation.start
202
267
  generations_seen = inventory_generation.generations_observed
268
+ character_frames: tuple[BDOFrame, ...] = ()
269
+ if self.character_layout_supported and generation_start is not None:
270
+ # The active portrait immediately precedes the inventory burst. On
271
+ # later generations do not borrow a portrait from an earlier load.
272
+ character_frames = tuple(
273
+ frame
274
+ for frame in frames
275
+ if frame.opcode in self.character_tables
276
+ and _frame_flow_generation_key(frame)
277
+ == inventory_generation.flow_generation_key
278
+ and generation_start
279
+ - (
280
+ 1
281
+ if self.character_tables[frame.opcode]
282
+ is self.character_profile.tables.get("portrait")
283
+ and generations_seen == 1
284
+ else 0
285
+ )
286
+ <= frame.context.timestamp
287
+ <= generation_start + 30
288
+ )
203
289
  if generation_start is not None:
204
290
  # Current captures send the compact inventory hydration first and
205
291
  # storage hydration afterward. It is therefore a clean boundary
@@ -236,6 +322,7 @@ class _CharacterStateAccumulator:
236
322
  fallback_observations: Optional[
237
323
  tuple[_StorageGroupObservation, ...]
238
324
  ] = None
325
+ small_fallback_used = False
239
326
  sparse_fallback_used = False
240
327
  split_reconciliation_used = False
241
328
  if not storage_events:
@@ -251,7 +338,29 @@ class _CharacterStateAccumulator:
251
338
  fallback_observations = selected_observations
252
339
  sparse_fallback_used = True
253
340
 
254
- if storage_events and neutral_storage_events:
341
+ if (
342
+ not storage_events
343
+ and fallback_observations is None
344
+ and (decoder_health is None or decoder_health.storage_status != "incompatible")
345
+ ):
346
+ storage_events = _small_character_storage_fallback(
347
+ neutral_storage_events, inventory_anchors, live_storage_boundaries,
348
+ )
349
+ small_fallback_used = bool(storage_events)
350
+
351
+ worker_sweep_used = False
352
+ if (
353
+ not storage_events
354
+ and fallback_observations is None
355
+ and decoder_health is not None
356
+ and decoder_health.storage_is_compatible
357
+ ):
358
+ storage_events = _worker_adjacent_storage_sweep(
359
+ neutral_storage_events, live_storage_boundaries, inventory_anchors,
360
+ )
361
+ worker_sweep_used = bool(storage_events)
362
+
363
+ if storage_events and neutral_storage_events and not worker_sweep_used:
255
364
  (
256
365
  reconciled_events,
257
366
  reconciled_observations,
@@ -260,7 +369,7 @@ class _CharacterStateAccumulator:
260
369
  frames,
261
370
  storage_events,
262
371
  neutral_storage_events,
263
- live_storage_boundaries,
372
+ tuple(e for e in live_storage_boundaries if e.event_type == "storage_delta"),
264
373
  inventory_anchors,
265
374
  self.storage_specs,
266
375
  )
@@ -326,6 +435,24 @@ class _CharacterStateAccumulator:
326
435
  "wrappers; the empty current state is preserved, but no record-level "
327
436
  "container metadata was available."
328
437
  )
438
+ if worker_sweep_used:
439
+ warnings.append(
440
+ "Storage hydration recovered from consecutive storage frames in TCP "
441
+ "stream order. Worker production was excluded."
442
+ )
443
+ if small_fallback_used:
444
+ warnings.append(
445
+ "Sparse storage state was inferred from one identity-complete cohort "
446
+ "within the dedicated character-load boundary, with no preceding "
447
+ "or intervening recognized storage mutation. Only observed towns "
448
+ "are included; this is not proof of account-wide completeness. "
449
+ "The ordinary live stream remained fail-neutral."
450
+ )
451
+ elif not storage_events and neutral_storage_events:
452
+ warnings.append(
453
+ "Storage records decoded, but there was insufficient unambiguous "
454
+ "character-load evidence to accept them as current storage state."
455
+ )
329
456
  if sparse_fallback_used:
330
457
  warnings.append(
331
458
  "Storage hydration was proven by the dedicated character-load "
@@ -447,7 +574,22 @@ class _CharacterStateAccumulator:
447
574
  generation_selection = "all_observed_storage_no_inventory_boundary"
448
575
  else:
449
576
  generation_selection = "none_no_hydration_boundary"
577
+ roster = None
578
+ if self.include_characters:
579
+ if self.character_layout_supported:
580
+ roster = characters.assemble_characters(
581
+ character_frames, inventory, self.character_profile,
582
+ remote_starts=remote_starts, remote_ends=remote_ends,
583
+ )
584
+ else:
585
+ roster = CharacterRoster(
586
+ warnings=(
587
+ self.character_profile_error
588
+ or "Character layout unsupported for this inventory profile.",
589
+ )
590
+ )
450
591
  return CharacterStateSnapshot(
592
+ characters=roster,
451
593
  inventory=inventory,
452
594
  storages=StorageContents(storages),
453
595
  provenance=ItemStateProvenance(
@@ -0,0 +1,258 @@
1
+ """Structural discovery of the remote-inventory family, without known owner IDs."""
2
+
3
+ from __future__ import annotations
4
+ from collections import defaultdict
5
+ from dataclasses import dataclass
6
+ from typing import Iterable, Iterator
7
+ from ..raw.models import RawMessage
8
+ from .character_profile import CharacterLayoutProfile, CharacterTable
9
+
10
+
11
+ def uint(b: bytes) -> int:
12
+ return int.from_bytes(b, "little")
13
+
14
+
15
+ @dataclass
16
+ class Candidate:
17
+ opcode: int
18
+ header: int
19
+ stride: int
20
+ count: int
21
+ rows: list[bytes]
22
+
23
+ def layout(self, **fields: int) -> CharacterTable:
24
+ return CharacterTable(
25
+ self.opcode, self.header, self.stride, self.count, None, fields
26
+ )
27
+
28
+
29
+ def counted(
30
+ messages: list[bytes], low: int, high: int, min_rows: int
31
+ ) -> Iterator[Candidate]:
32
+ first = messages[0]
33
+ for offset in range(5, min(30, len(first) - 1)):
34
+ n = uint(first[offset : offset + 2])
35
+ if n < min_rows:
36
+ continue
37
+ for stride in range(low, high + 1):
38
+ header = len(first) - n * stride
39
+ if not offset + 2 <= header <= 48:
40
+ continue
41
+ if all(
42
+ len(b) == header + stride * uint(b[offset : offset + 2])
43
+ for b in messages
44
+ ):
45
+ rows = [
46
+ b[p : p + stride]
47
+ for b in messages
48
+ for p in range(header, len(b), stride)
49
+ ]
50
+ yield Candidate(uint(first[3:5]), header, stride, offset, rows)
51
+
52
+
53
+ @dataclass
54
+ class Evidence:
55
+ remote: CharacterTable
56
+ roster: CharacterTable
57
+ stat_candidates: list[tuple[Candidate, int]]
58
+ chunk: Candidate
59
+ neighbors: list[RawMessage]
60
+
61
+
62
+ def _small(
63
+ frames: list[RawMessage],
64
+ ) -> Iterator[tuple[Candidate, int, frozenset[bytes]]]:
65
+ for f in frames:
66
+ if not 75 <= f.length <= 4096:
67
+ continue
68
+ for t in counted([f.message], 9, 36, 6):
69
+ if len(t.rows) > 128:
70
+ continue
71
+ for pos in range(t.stride - 7):
72
+ ids = frozenset(r[pos : pos + 8] for r in t.rows)
73
+ if len(ids) == len(t.rows) and bytes(8) not in ids:
74
+ yield t, pos, ids
75
+
76
+
77
+ def _bursts(frames: list[RawMessage]) -> Iterator[list[RawMessage]]:
78
+ groups: dict[tuple, list[RawMessage]] = defaultdict(list)
79
+ for f in frames:
80
+ groups[f.flow, f.connection_epoch, f.opcode].append(f)
81
+ for group in groups.values():
82
+ burst: list[RawMessage] = []
83
+ for f in sorted(group, key=lambda x: x.observed_at):
84
+ if burst and f.observed_at - burst[0].observed_at > 1:
85
+ yield burst
86
+ burst = []
87
+ burst.append(f)
88
+ if burst:
89
+ yield burst
90
+
91
+
92
+ def _remote_fields(t: Candidate, o: int) -> Iterator[CharacterTable]:
93
+ for c in range(t.stride):
94
+ if {r[c] for r in t.rows} != {0, 1, 17}:
95
+ continue
96
+ for s in range(t.stride):
97
+ if s == c or any(r[s] > 63 for r in t.rows if r[c] == 1):
98
+ continue
99
+ if len({(r[o : o + 8], r[c], r[s]) for r in t.rows}) != len(t.rows):
100
+ continue
101
+ qty = [
102
+ p
103
+ for p in range(t.stride - 7)
104
+ if all(
105
+ 1 <= uint(r[p : p + 8]) <= 2**40
106
+ and (r[c] != 1 or uint(r[p : p + 8]) == 1)
107
+ for r in t.rows
108
+ )
109
+ and any(uint(r[p : p + 8]) > 1 for r in t.rows)
110
+ ]
111
+ items = [
112
+ p
113
+ for p in range(t.stride - 3)
114
+ if all(
115
+ 0 < uint(r[p : p + 3]) < 0x400000 and r[p + 3] <= 32 for r in t.rows
116
+ )
117
+ and len({r[p : p + 4] for r in t.rows}) > len(t.rows) // 8
118
+ ]
119
+ for i in items:
120
+ for q in qty:
121
+ spans = [
122
+ range(o, o + 8),
123
+ range(c, c + 1),
124
+ range(s, s + 1),
125
+ range(i, i + 4),
126
+ range(q, q + 8),
127
+ ]
128
+ if len({v for span in spans for v in span}) == 22:
129
+ yield t.layout(owner=o, container=c, slot=s, item=i, quantity=q)
130
+
131
+
132
+ def _metadata_col(t: Candidate, owner: int) -> dict[str, int]:
133
+ cols = []
134
+ for p in range(t.stride - 1):
135
+ if p < owner + 8 and owner < p + 2:
136
+ continue
137
+ values = {uint(r[p : p + 2]) for r in t.rows}
138
+ if (
139
+ 65535 in values
140
+ and len(values) >= 3
141
+ and all(v == 65535 or v < 64 for v in values)
142
+ ):
143
+ cols.append(p)
144
+ return {"metadata": cols[0]} if len(cols) == 1 else {}
145
+
146
+
147
+ def discover_core(
148
+ frames: list[RawMessage], previous: CharacterLayoutProfile | None = None
149
+ ) -> list[Evidence]:
150
+ results = []
151
+ geometry_checks = 0
152
+ for burst in _bursts(frames):
153
+ blind = (
154
+ len({f.length for f in burst}) >= 2 and max(f.length for f in burst) > 4096
155
+ )
156
+ old = previous.tables["remote"] if previous else None
157
+ geometries: Iterable[Candidate]
158
+ if blind:
159
+ geometries = counted([f.message for f in burst], 48, 112, 6)
160
+ elif old and burst[0].opcode == old.opcode and old.count_offset is not None:
161
+ # A trusted layout can be checked with a single chunk. It still
162
+ # has to pass the independent owner, inventory and slot proofs.
163
+ try:
164
+ rows = [row for frame in burst for row in old.rows(frame.message)]
165
+ except ValueError:
166
+ continue
167
+ geometries = (
168
+ Candidate(old.opcode, old.header, old.stride, old.count_offset, rows),
169
+ )
170
+ else:
171
+ continue
172
+ anchor = burst[0]
173
+ near: list[RawMessage] | None = None
174
+ for t in geometries:
175
+ if near is None:
176
+ near = [
177
+ f
178
+ for f in frames
179
+ if f.flow == anchor.flow
180
+ and f.connection_epoch == anchor.connection_epoch
181
+ and abs(f.observed_at - anchor.observed_at) <= 30
182
+ ]
183
+ geometry_checks += 1
184
+ if geometry_checks > 128 or len(t.rows) > 32768:
185
+ raise ValueError(
186
+ "character calibration candidate search limit exceeded"
187
+ )
188
+ small = []
189
+ id_cells = 0
190
+ for candidate in _small(near):
191
+ id_cells += len(candidate[2])
192
+ if id_cells > 131072:
193
+ raise ValueError(
194
+ "character calibration owner-table search limit exceeded"
195
+ )
196
+ small.append(candidate)
197
+ for o in range(t.stride - 7):
198
+ ids = frozenset(r[o : o + 8] for r in t.rows)
199
+ if bytes(8) in ids or not 4 <= len(ids) <= min(128, len(t.rows) // 3):
200
+ continue
201
+ exact = [
202
+ (tab, pos)
203
+ for tab, pos, values in small
204
+ if values == ids and tab.opcode != t.opcode
205
+ ]
206
+ supersets: dict[frozenset[bytes], list[tuple[Candidate, int]]] = (
207
+ defaultdict(list)
208
+ )
209
+ for tab, pos, values in small:
210
+ if ids < values and tab.opcode != t.opcode:
211
+ supersets[values].append((tab, pos))
212
+ corroborated = [
213
+ group
214
+ for group in supersets.values()
215
+ if len({v.opcode for v, _ in group}) >= 2
216
+ ]
217
+ if not exact or len(corroborated) != 1:
218
+ continue
219
+ group = corroborated[0]
220
+ # Identify the compact roster by its independently varying uint16 field.
221
+ rosters = [
222
+ (tab, pos, col)
223
+ for tab, pos in group
224
+ if (col := _metadata_col(tab, pos))
225
+ ]
226
+ choices = {
227
+ (
228
+ tab.opcode,
229
+ tab.header,
230
+ tab.stride,
231
+ tab.count,
232
+ pos,
233
+ col["metadata"],
234
+ )
235
+ for tab, pos, col in rosters
236
+ }
237
+ if len(choices) != 1:
238
+ continue
239
+ tab, pos, col = rosters[0]
240
+ stats = [
241
+ (st, offset)
242
+ for st, offset in exact
243
+ if st.opcode not in {g.opcode for g, _ in group}
244
+ ]
245
+ if not stats:
246
+ continue
247
+ for remote in _remote_fields(t, o):
248
+ if not blind and (
249
+ old is None
250
+ or any(old.fields.get(k) != v for k, v in remote.fields.items())
251
+ ):
252
+ continue
253
+ results.append(
254
+ Evidence(remote, tab.layout(owner=pos, **col), stats, t, near)
255
+ )
256
+ if len(results) > 1:
257
+ return results
258
+ return results