bdo-toolkit 1.0.7__tar.gz → 1.0.9__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 (170) hide show
  1. {bdo_toolkit-1.0.7/src/bdo_toolkit.egg-info → bdo_toolkit-1.0.9}/PKG-INFO +4 -3
  2. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/README.md +3 -2
  3. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/__init__.py +2 -1
  4. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/inventory.py +21 -5
  5. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_protocol.py +4 -2
  6. bdo_toolkit-1.0.9/src/bdo_toolkit/_tracked_capture.py +218 -0
  7. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_version.py +1 -1
  8. bdo_toolkit-1.0.9/src/bdo_toolkit/raw/__init__.py +12 -0
  9. bdo_toolkit-1.0.9/src/bdo_toolkit/raw/_collector.py +49 -0
  10. bdo_toolkit-1.0.9/src/bdo_toolkit/raw/models.py +50 -0
  11. bdo_toolkit-1.0.9/src/bdo_toolkit/raw/replay.py +24 -0
  12. bdo_toolkit-1.0.9/src/bdo_toolkit/raw/session.py +31 -0
  13. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/__init__.py +2 -0
  14. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_constants.py +14 -0
  15. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_detail_learning.py +353 -40
  16. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_details.py +8 -7
  17. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_discovery.py +31 -13
  18. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_live_tracker.py +2 -0
  19. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_result.py +20 -2
  20. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/models.py +32 -0
  21. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9/src/bdo_toolkit.egg-info}/PKG-INFO +4 -3
  22. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit.egg-info/SOURCES.txt +8 -0
  23. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_character_state.py +94 -3
  24. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_examples_and_writers.py +19 -0
  25. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_fixture_regressions.py +17 -0
  26. bdo_toolkit-1.0.9/tests/test_raw.py +287 -0
  27. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_details.py +20 -9
  28. bdo_toolkit-1.0.9/tests/test_solare_equipment.py +82 -0
  29. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_learning.py +101 -2
  30. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_learning_adversarial.py +240 -0
  31. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_real_captures.py +44 -2
  32. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_replay.py +51 -4
  33. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_storage_events.py +34 -0
  34. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/LICENSE +0 -0
  35. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/pyproject.toml +0 -0
  36. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/setup.cfg +0 -0
  37. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_async_sessions.py +0 -0
  38. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_async_utils.py +0 -0
  39. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/__init__.py +0 -0
  40. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/_constants.py +0 -0
  41. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
  42. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/_records.py +0 -0
  43. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/analysis.py +0 -0
  44. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/capture.py +0 -0
  45. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/companions.py +0 -0
  46. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/live.py +0 -0
  47. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/models.py +0 -0
  48. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/observations.py +0 -0
  49. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/persistence.py +0 -0
  50. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/progress.py +0 -0
  51. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/validation.py +0 -0
  52. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_calibration/workflow.py +0 -0
  53. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_capture_backend.py +0 -0
  54. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_capture_options.py +0 -0
  55. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_capture_runtime.py +0 -0
  56. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_deposit_origin.py +0 -0
  57. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_engine.py +0 -0
  58. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_framing.py +0 -0
  59. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/__init__.py +0 -0
  60. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/_constants.py +0 -0
  61. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/_records.py +0 -0
  62. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/assembly.py +0 -0
  63. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/formatting.py +0 -0
  64. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/models.py +0 -0
  65. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/session.py +0 -0
  66. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_item_state/storage.py +0 -0
  67. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_observation_session.py +0 -0
  68. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_origin/__init__.py +0 -0
  69. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_origin/discovery.py +0 -0
  70. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_origin/manual.py +0 -0
  71. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_origin/models.py +0 -0
  72. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_origin/tracker.py +0 -0
  73. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_profile_io.py +0 -0
  74. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_profile_runtime.py +0 -0
  75. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_reassembly.py +0 -0
  76. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_record_geometry.py +0 -0
  77. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_specs.py +0 -0
  78. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
  79. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/_storage_hydration.py +0 -0
  80. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/__init__.py +0 -0
  81. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
  82. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/_capture.py +0 -0
  83. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/_discovery.py +0 -0
  84. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/_profile.py +0 -0
  85. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/_validation.py +0 -0
  86. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/async_session.py +0 -0
  87. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/calibration.py +0 -0
  88. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/models.py +0 -0
  89. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/replay.py +0 -0
  90. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/agris/session.py +0 -0
  91. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/calibration.py +0 -0
  92. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/capture.py +0 -0
  93. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/capture_diagnosis.py +0 -0
  94. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/character_state.py +0 -0
  95. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/cli.py +0 -0
  96. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/diagnostics.py +0 -0
  97. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/events.py +0 -0
  98. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/filters.py +0 -0
  99. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/grind/__init__.py +0 -0
  100. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/grind/_pipeline.py +0 -0
  101. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/grind/models.py +0 -0
  102. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/grind/session.py +0 -0
  103. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/item_state.py +0 -0
  104. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/origin_learning.py +0 -0
  105. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/profiles.py +0 -0
  106. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/py.typed +0 -0
  107. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/remote_profiles.py +0 -0
  108. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
  109. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_scanner.py +0 -0
  110. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/_validation.py +0 -0
  111. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/async_session.py +0 -0
  112. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/replay.py +0 -0
  113. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/solare/session.py +0 -0
  114. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/writers.py +0 -0
  115. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/xp/__init__.py +0 -0
  116. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/xp/_tracker.py +0 -0
  117. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/xp/models.py +0 -0
  118. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/xp/profile.py +0 -0
  119. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/xp/replay.py +0 -0
  120. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit/xp/session.py +0 -0
  121. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
  122. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
  123. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit.egg-info/requires.txt +0 -0
  124. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
  125. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_async.py +0 -0
  126. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_cli.py +0 -0
  127. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_discovery.py +0 -0
  128. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_evidence.py +0 -0
  129. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_models.py +0 -0
  130. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_profiles.py +0 -0
  131. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_replay.py +0 -0
  132. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_agris_session.py +0 -0
  133. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_async_sessions.py +0 -0
  134. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_calibration.py +0 -0
  135. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_calibration_conveniences.py +0 -0
  136. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_calibration_lifecycle.py +0 -0
  137. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_calibration_persistence.py +0 -0
  138. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_calibration_progress.py +0 -0
  139. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_calibration_retention.py +0 -0
  140. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_capture_backend.py +0 -0
  141. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_capture_diagnosis.py +0 -0
  142. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_capture_replay.py +0 -0
  143. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_capture_runtime.py +0 -0
  144. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_cli.py +0 -0
  145. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_decoder_diagnostics.py +0 -0
  146. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_deposit_origin.py +0 -0
  147. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_direction.py +0 -0
  148. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
  149. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_engine.py +0 -0
  150. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_explicit_profile.py +0 -0
  151. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_fixture_catalog.py +0 -0
  152. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_framing.py +0 -0
  153. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_grind.py +0 -0
  154. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_initial_load_storage.py +0 -0
  155. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_inventory_snapshots.py +0 -0
  156. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_item_state.py +0 -0
  157. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_live_capture_session.py +0 -0
  158. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_origin_learning.py +0 -0
  159. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_package_layout.py +0 -0
  160. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_profile_validation.py +0 -0
  161. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_reassembly.py +0 -0
  162. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_remote_profiles.py +0 -0
  163. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_api.py +0 -0
  164. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_solare_session.py +0 -0
  165. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_storage_destination_validation.py +0 -0
  166. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_storage_hydration_tracker.py +0 -0
  167. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_storage_unknown_destination_calibration.py +0 -0
  168. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_toolkit_api.py +0 -0
  169. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/tests/test_xp.py +0 -0
  170. {bdo_toolkit-1.0.7 → bdo_toolkit-1.0.9}/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.7
3
+ Version: 1.0.9
4
4
  Summary: Passive, read-only BDO packet parsing toolkit for app developers.
5
5
  Author: bdo-toolkit contributors
6
6
  License-Expression: MIT
@@ -31,7 +31,7 @@ Dynamic: license-file
31
31
  [![PyPI version](https://img.shields.io/pypi/v/bdo-toolkit?style=flat-square&label=version)](https://pypi.org/project/bdo-toolkit/)
32
32
  [![Python 3.14+](https://img.shields.io/badge/python-3.14%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://github.com/ychwu/bdo-toolkit/blob/main/pyproject.toml)
33
33
  ![Tested on NA/EU](https://img.shields.io/badge/tested-NA%2FEU-5b61a8?style=flat-square)
34
- [![Package: Stable](https://img.shields.io/badge/package-stable-2f855a?style=flat-square)](https://ychwu.github.io/bdo-toolkit/#stability)
34
+ [![Package: Stable](https://img.shields.io/badge/package-stable-2f855a?style=flat-square)](https://ychwu.github.io/bdo-toolkit/#overview/architecture)
35
35
  [![License: MIT](https://img.shields.io/badge/license-MIT-2f855a?style=flat-square)](https://github.com/ychwu/bdo-toolkit/blob/main/LICENSE)
36
36
 
37
37
  Passive, read-only Python tooling that turns live or recorded Black Desert
@@ -60,7 +60,7 @@ no usable adapter is found. Discovery does not apply settings or verify decoding
60
60
 
61
61
  ## Capabilities
62
62
 
63
- bdo-toolkit exposes four passive workflows. Item activity, item state, and
63
+ bdo-toolkit exposes these passive workflows. Item activity, item state, and
64
64
  Solare support live capture and saved PCAP or PCAPNG replay. Grind tracking
65
65
  combines supported observations in one live session.
66
66
 
@@ -70,6 +70,7 @@ combines supported observations in one live session.
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
71
  | 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
72
  | 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
+ | 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 |
73
74
 
74
75
  The standalone workflows include synchronous and
75
76
  [asyncio](https://ychwu.github.io/bdo-toolkit/#asyncio) sessions, capture and
@@ -4,7 +4,7 @@
4
4
  [![PyPI version](https://img.shields.io/pypi/v/bdo-toolkit?style=flat-square&label=version)](https://pypi.org/project/bdo-toolkit/)
5
5
  [![Python 3.14+](https://img.shields.io/badge/python-3.14%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://github.com/ychwu/bdo-toolkit/blob/main/pyproject.toml)
6
6
  ![Tested on NA/EU](https://img.shields.io/badge/tested-NA%2FEU-5b61a8?style=flat-square)
7
- [![Package: Stable](https://img.shields.io/badge/package-stable-2f855a?style=flat-square)](https://ychwu.github.io/bdo-toolkit/#stability)
7
+ [![Package: Stable](https://img.shields.io/badge/package-stable-2f855a?style=flat-square)](https://ychwu.github.io/bdo-toolkit/#overview/architecture)
8
8
  [![License: MIT](https://img.shields.io/badge/license-MIT-2f855a?style=flat-square)](https://github.com/ychwu/bdo-toolkit/blob/main/LICENSE)
9
9
 
10
10
  Passive, read-only Python tooling that turns live or recorded Black Desert
@@ -33,7 +33,7 @@ no usable adapter is found. Discovery does not apply settings or verify decoding
33
33
 
34
34
  ## Capabilities
35
35
 
36
- bdo-toolkit exposes four passive workflows. Item activity, item state, and
36
+ bdo-toolkit exposes these passive workflows. Item activity, item state, and
37
37
  Solare support live capture and saved PCAP or PCAPNG replay. Grind tracking
38
38
  combines supported observations in one live session.
39
39
 
@@ -43,6 +43,7 @@ combines supported observations in one live session.
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
44
  | 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
45
  | 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
+ | 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 |
46
47
 
47
48
  The standalone workflows include synchronous and
48
49
  [asyncio](https://ychwu.github.io/bdo-toolkit/#asyncio) sessions, capture and
@@ -41,7 +41,7 @@ from .origin_learning import (
41
41
  promote_origin_candidates,
42
42
  )
43
43
  from .writers import ConsoleEventWriter, JsonlEventWriter
44
- from . import agris, grind, solare, xp
44
+ from . import agris, grind, raw, solare, xp
45
45
  from ._version import __version__
46
46
 
47
47
  __all__ = [
@@ -88,6 +88,7 @@ __all__ = [
88
88
  "fetch_opcode_profile",
89
89
  "load_opcode_profile",
90
90
  "promote_origin_candidates",
91
+ "raw",
91
92
  "replay_pcap",
92
93
  "storage_location",
93
94
  "solare",
@@ -148,7 +148,19 @@ def _discover_inventory_tail_layout(
148
148
  window_start = max(0, stride - _INVENTORY_TRAILING_DISCOVERY_BYTES)
149
149
  candidates: list[tuple[int, int]] = []
150
150
 
151
- for slot_relative in range(window_start, stride):
151
+ # Slots can precede the item field while container codes remain at the
152
+ # end of that record. Search a bounded prefix as well as the tail; never
153
+ # substitute the next record's slot for a missing final-record field.
154
+ # The base length bounds the prefix to bytes outside the previous record's
155
+ # item-relative payload, avoiding a shifted copy of an existing tail slot.
156
+ prefix_start = max(
157
+ -4,
158
+ max(
159
+ int(spec.single_record_message_length or 0) - stride - spec.item_offset
160
+ for _, _, spec, _ in frame_groups
161
+ ),
162
+ )
163
+ for slot_relative in (*range(prefix_start, 0), *range(window_start, stride)):
152
164
  slot_groups: list[list[int]] = []
153
165
  for frame, group, _, _ in frame_groups:
154
166
  ordered = sorted(group, key=lambda event: int(event.record_offset or 0))
@@ -156,7 +168,7 @@ def _discover_inventory_tail_layout(
156
168
  frame.message[int(event.record_offset) + slot_relative]
157
169
  for event in ordered
158
170
  if event.record_offset is not None
159
- and int(event.record_offset) + slot_relative < len(frame.message)
171
+ and 0 <= int(event.record_offset) + slot_relative < len(frame.message)
160
172
  ]
161
173
  slot_groups.append(slots)
162
174
  if any(
@@ -176,9 +188,10 @@ def _discover_inventory_tail_layout(
176
188
  # Observed generations serialize these neighboring fields in both
177
189
  # orders. Keep the bounded tail search, but do not treat their order as
178
190
  # part of the protocol invariant.
191
+ slot_tail_position = slot_relative % stride
179
192
  for container_relative in range(
180
- max(window_start, slot_relative - 4),
181
- min(stride, slot_relative + 5),
193
+ max(window_start, slot_tail_position - 4),
194
+ min(stride, slot_tail_position + 5),
182
195
  ):
183
196
  if container_relative == slot_relative:
184
197
  continue
@@ -280,7 +293,10 @@ def _inventory_record_metadata(
280
293
  assert event.record_offset is not None
281
294
  slot_offset = event.record_offset + slot_relative
282
295
  container_offset = event.record_offset + container_relative
283
- if max(slot_offset, container_offset) >= len(frame.message):
296
+ if (
297
+ min(slot_offset, container_offset) < 0
298
+ or max(slot_offset, container_offset) >= len(frame.message)
299
+ ):
284
300
  return None
285
301
  slot = frame.message[slot_offset]
286
302
  code = frame.message[container_offset]
@@ -136,8 +136,10 @@ STORAGE_LOCATIONS: dict[int, StorageLocation] = {
136
136
  0x006B: StorageLocation("Keplan", "inferred"),
137
137
  0x007E: StorageLocation("Trent", "inferred"),
138
138
  0x00B6: StorageLocation("Iliya Island", "inferred"),
139
- 0x00E5: StorageLocation("Shakatu", "inferred"),
140
- 0x0259: StorageLocation("Valencia City", "inferred"),
139
+ # Corrected against region IDs and an operator-reported name swap. Equal
140
+ # snapshot counts alone cannot establish either name; retain inferred confidence.
141
+ 0x00E5: StorageLocation("Valencia City", "inferred"),
142
+ 0x0259: StorageLocation("Shakatu", "inferred"),
141
143
  0x026B: StorageLocation("Ancado Inner Harbor", "inferred"),
142
144
  0x02DF: StorageLocation("Grana", "inferred"),
143
145
  0x04BA: StorageLocation("Dalbeol Village", "inferred"),
@@ -0,0 +1,218 @@
1
+ """Shared flow, replay and live-session plumbing for per-message trackers (raw, position, resource)."""
2
+ from collections import deque
3
+ from collections.abc import Callable, Generator, Iterable, Iterator
4
+ from dataclasses import asdict, dataclass
5
+ from pathlib import Path
6
+ from types import TracebackType
7
+ from typing import NoReturn, Protocol, Self, cast
8
+
9
+ from ._capture_backend import iter_pcap_file, make_packet_handler, open_packet_writer, validate_server_ports
10
+ from ._capture_options import LiveCaptureOptions
11
+ from ._capture_runtime import LivePacketCapture
12
+ from ._framing import FrameCollectorScanner
13
+ from ._observation_session import ObservationSession
14
+ from ._protocol import BDOFrame, FlowKey
15
+ from ._reassembly import FlowManager
16
+
17
+ # Readings one packet may release at once, e.g. when a held-back gap fills.
18
+ MAX_PENDING_READINGS = 4096
19
+
20
+
21
+ class FrameTracker[S](Protocol):
22
+ def observe(self, frame: BDOFrame) -> None: ...
23
+
24
+ def close_flow(self, flow: FlowKey) -> None: ...
25
+
26
+ def snapshot(self) -> S: ...
27
+
28
+ def failed_snapshot(self, reason: str) -> S: ...
29
+
30
+ def invalidate(self, reason: str) -> NoReturn: ...
31
+
32
+
33
+ @dataclass(frozen=True)
34
+ class CaptureHealth:
35
+ packets_processed: int = 0
36
+ packets_accepted: int = 0
37
+ messages_observed: int = 0
38
+ packet_queue_overflows: int = 0
39
+ event_queue_overflows: int = 0
40
+ tcp_gap_resets: int = 0
41
+ flow_state_evictions: int = 0
42
+ pcap_received: int | None = None
43
+ pcap_dropped: int | None = None
44
+ pcap_interface_dropped: int | None = None
45
+ capture_buffer_bytes: int | None = None
46
+ cleanup_incomplete: bool = False
47
+
48
+ @property
49
+ def capture_is_clean(self) -> bool:
50
+ """No known loss/cleanup failure; None native counters remain unknown."""
51
+ return not (self.packet_queue_overflows or self.event_queue_overflows or self.tcp_gap_resets
52
+ or self.flow_state_evictions or self.pcap_dropped or self.pcap_interface_dropped
53
+ or self.cleanup_incomplete)
54
+
55
+ def to_dict(self) -> dict[str, object]:
56
+ return {**asdict(self), "capture_is_clean": self.capture_is_clean}
57
+
58
+
59
+ class TrackedFlowManager[S](FlowManager):
60
+ """Frames every server message into one tracker and counts them; gaps only miss readings."""
61
+
62
+ def __init__(self, tracker: FrameTracker[S], ports: Iterable[int], *, live: bool = False) -> None:
63
+ self.tracker = tracker
64
+ self.finishing = False
65
+ self.messages = 0
66
+ self.evictions = 0
67
+ super().__init__(server_ports=validate_server_ports(ports),
68
+ scanner_factory=lambda: FrameCollectorScanner(self.observe),
69
+ track_flow_generations=True, max_flows=64, max_pending_segments=2048,
70
+ max_pending_bytes=8 * 1024 * 1024, defer_gap_timeouts=live,
71
+ on_flow_close=self._closed, on_flow_eviction=self._evicted)
72
+
73
+ def observe(self, frame: BDOFrame) -> None:
74
+ self.messages += 1
75
+ self.tracker.observe(frame)
76
+
77
+ def _closed(self, flow: FlowKey) -> None:
78
+ # End of replay or capture is no logout.
79
+ if not self.finishing:
80
+ self.tracker.close_flow(flow)
81
+
82
+ def _evicted(self) -> None:
83
+ self.evictions += 1
84
+
85
+ def finish(self) -> None:
86
+ self.finishing = True
87
+ try:
88
+ super().finish()
89
+ finally:
90
+ self.finishing = False
91
+
92
+
93
+ class TrackedReplay[R, S](Iterator[R]):
94
+ """Bounded single-consumer replay. Close early exits, preferably with 'with'.
95
+
96
+ EOF retains the last observed state. On failure status becomes invalid
97
+ and iteration raises. Closing early does not flush an incomplete packet tail.
98
+ """
99
+
100
+ def __init__(self, path: str | Path, *, ports: Iterable[int], label: str,
101
+ make_tracker: Callable[[Callable[[R], None]], FrameTracker[S]],
102
+ max_pending: int = MAX_PENDING_READINGS) -> None:
103
+ self._label = label
104
+ self._max_pending = max_pending
105
+ self._pending: deque[R] = deque()
106
+ self._tracker = make_tracker(self._enqueue)
107
+ self._manager = TrackedFlowManager(self._tracker, ports)
108
+ self._packets = cast(Generator[None, None, None], iter_pcap_file(Path(path), self._manager))
109
+ self._processed = 0
110
+ self._closed = self._finished = False
111
+ self._error: BaseException | None = None
112
+
113
+ def _enqueue(self, reading: R) -> None:
114
+ if len(self._pending) >= self._max_pending:
115
+ self._tracker.invalidate(f"{self._label} replay event bound exceeded")
116
+ self._pending.append(reading)
117
+
118
+ @property
119
+ def error(self) -> BaseException | None:
120
+ return self._error
121
+
122
+ @property
123
+ def status(self) -> S:
124
+ return self._tracker.failed_snapshot(str(self._error)) if self._error else self._tracker.snapshot()
125
+
126
+ @property
127
+ def health(self) -> CaptureHealth:
128
+ return CaptureHealth(packets_processed=self._processed, packets_accepted=self._processed,
129
+ messages_observed=self._manager.messages,
130
+ tcp_gap_resets=self._manager.tcp_gap_resets,
131
+ flow_state_evictions=self._manager.evictions)
132
+
133
+ def __iter__(self) -> Self:
134
+ return self
135
+
136
+ def __next__(self) -> R:
137
+ if self._closed:
138
+ raise StopIteration
139
+ try:
140
+ while not self._pending:
141
+ if self._finished:
142
+ self.close()
143
+ raise StopIteration
144
+ try:
145
+ next(self._packets)
146
+ except StopIteration:
147
+ self._finished = True
148
+ else:
149
+ self._processed += 1
150
+ return self._pending.popleft()
151
+ except StopIteration:
152
+ raise
153
+ except BaseException as exc:
154
+ self._error = exc
155
+ try:
156
+ self.close()
157
+ except BaseException as cleanup:
158
+ exc.add_note(f"{self._label} replay cleanup also failed: {cleanup!r}")
159
+ raise
160
+
161
+ def close(self) -> None:
162
+ if not self._closed:
163
+ self._closed = True
164
+ self._pending.clear()
165
+ try:
166
+ self._packets.close()
167
+ except BaseException as exc:
168
+ self._error = self._error or exc
169
+ raise
170
+
171
+ def __enter__(self) -> Self:
172
+ return self
173
+
174
+ def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
175
+ traceback: TracebackType | None) -> None:
176
+ try:
177
+ self.close()
178
+ except BaseException as exc:
179
+ if exc_value is None:
180
+ raise
181
+ exc_value.add_note(f"{self._label} replay cleanup also failed: {exc!r}")
182
+
183
+
184
+ class TrackedLiveSession[R, S](ObservationSession[R, S]):
185
+ """Single-use live capture feeding one tracker; loss fails closed."""
186
+
187
+ def __init__(self, *, label: str, make_tracker: Callable[[Callable[[R], None]], FrameTracker[S]],
188
+ live_options: LiveCaptureOptions | None, capture_seconds: float | None,
189
+ save_pcap: str | Path | None) -> None:
190
+ if live_options is not None and not isinstance(live_options, LiveCaptureOptions):
191
+ raise TypeError("live_options must be LiveCaptureOptions or None")
192
+ options = live_options or LiveCaptureOptions()
193
+ self._tracker = make_tracker(self._publish)
194
+ self._tracked_manager: TrackedFlowManager[S] = TrackedFlowManager(self._tracker, options.ports, live=True)
195
+ super().__init__(label=label, snapshot=self._tracker.snapshot, manager=self._tracked_manager,
196
+ refresh=lambda now: None, live_options=options, capture_seconds=capture_seconds,
197
+ save_pcap=save_pcap, capture_factory=lambda **kw: LivePacketCapture(**kw),
198
+ handler_factory=lambda manager: make_packet_handler(manager),
199
+ writer_factory=lambda path: open_packet_writer(path))
200
+
201
+ @property
202
+ def status(self) -> S:
203
+ with self._state_lock:
204
+ status, error = self._status, self._error
205
+ return self._tracker.failed_snapshot(str(error)) if error else status
206
+
207
+ @property
208
+ def health(self) -> CaptureHealth:
209
+ with self._state_lock:
210
+ return CaptureHealth(
211
+ packets_processed=self._processed, packets_accepted=self._accepted,
212
+ messages_observed=self._tracked_manager.messages,
213
+ packet_queue_overflows=self._packet_overflows, event_queue_overflows=self._event_overflows,
214
+ tcp_gap_resets=self._manager.tcp_gap_resets, flow_state_evictions=self._tracked_manager.evictions,
215
+ pcap_received=self._stats.received, pcap_dropped=self._stats.dropped,
216
+ pcap_interface_dropped=self._stats.interface_dropped,
217
+ capture_buffer_bytes=self._stats.capture_buffer_bytes,
218
+ cleanup_incomplete=self._cleanup_incomplete)
@@ -1,3 +1,3 @@
1
1
  """Single source of truth for the BDO Toolkit release version."""
2
2
 
3
- __version__ = "1.0.7"
3
+ __version__ = "1.0.9"
@@ -0,0 +1,12 @@
1
+ """Raw server-to-client BDO messages for protocol research.
2
+
3
+ Every length-framed message, opcode-free: no opcode profile, decoding or
4
+ decryption. Framing waits for evidence of a message boundary, so a capture
5
+ that attaches mid-stream skips the bytes before the first one.
6
+ """
7
+ from .models import RawCaptureHealth, RawMessage
8
+ from .replay import RawReplay, replay_raw
9
+ from .session import DEFAULT_RAW_EVENT_QUEUE_SIZE, LiveRawSession
10
+
11
+ __all__ = ["DEFAULT_RAW_EVENT_QUEUE_SIZE", "LiveRawSession", "RawCaptureHealth", "RawMessage",
12
+ "RawReplay", "replay_raw"]
@@ -0,0 +1,49 @@
1
+ """Raw messages through the shared tracked-capture plumbing, opcode-free."""
2
+ from collections.abc import Callable, Iterable
3
+ from typing import NoReturn
4
+
5
+ from .._protocol import BDOFrame, FlowKey
6
+ from .._tracked_capture import TrackedFlowManager
7
+ from ..capture import CaptureIntegrityError
8
+ from ..events import Flow
9
+ from .models import RawMessage
10
+
11
+
12
+ def raw_message(frame: BDOFrame) -> RawMessage:
13
+ flow = frame.context.flow
14
+ return RawMessage(frame.message, frame.context.timestamp,
15
+ Flow(flow.source_ip, flow.source_port, flow.destination_ip, flow.destination_port),
16
+ frame.context.flow_generation, frame.index, frame.stream_sequence)
17
+
18
+
19
+ class RawTracker:
20
+ """Publishes every framed message; raw keeps no status.
21
+
22
+ TCP gaps and flow evictions are counted by the flow manager, not raised:
23
+ the scanner resyncs after a gap and per-message sequence numbers show
24
+ where bytes are missing. Only an exceeded delivery bound fails.
25
+ """
26
+
27
+ def __init__(self, on_message: Callable[[RawMessage], None]) -> None:
28
+ self._publish = on_message
29
+
30
+ def observe(self, frame: BDOFrame) -> None:
31
+ self._publish(raw_message(frame))
32
+
33
+ def close_flow(self, flow: FlowKey) -> None:
34
+ del flow
35
+
36
+ def snapshot(self) -> None:
37
+ return None
38
+
39
+ def failed_snapshot(self, reason: str) -> None:
40
+ del reason
41
+
42
+ def invalidate(self, reason: str) -> NoReturn:
43
+ raise CaptureIntegrityError(reason)
44
+
45
+
46
+ def raw_flow_manager(on_message: Callable[[RawMessage], None], ports: Iterable[int], *,
47
+ live: bool = False) -> TrackedFlowManager[None]:
48
+ """A flow manager that hands every framed message to ``on_message``."""
49
+ return TrackedFlowManager(RawTracker(on_message), ports, live=live)
@@ -0,0 +1,50 @@
1
+ """Immutable raw server-to-client messages; nothing is decoded or decrypted."""
2
+ from dataclasses import dataclass
3
+
4
+ from .._tracked_capture import CaptureHealth
5
+ from ..events import Flow
6
+
7
+
8
+ @dataclass(frozen=True)
9
+ class RawMessage:
10
+ """One length-framed server-to-client message, exactly as received.
11
+
12
+ ``message`` is the whole frame: u16 little-endian length (header
13
+ included), u8 flag, u16 little-endian opcode, then the payload. Flags and
14
+ payloads are reported verbatim; the toolkit assigns them no meaning.
15
+ ``index`` counts messages within one connection epoch. ``stream_sequence``
16
+ is the unwrapped TCP sequence of the first byte, so a gap between two
17
+ consecutive messages of one epoch stays visible.
18
+ """
19
+
20
+ message: bytes
21
+ observed_at: float
22
+ flow: Flow
23
+ connection_epoch: int
24
+ index: int
25
+ stream_sequence: int | None
26
+
27
+ @property
28
+ def length(self) -> int:
29
+ return int.from_bytes(self.message[0:2], "little")
30
+
31
+ @property
32
+ def flag(self) -> int:
33
+ return self.message[2]
34
+
35
+ @property
36
+ def opcode(self) -> int:
37
+ return int.from_bytes(self.message[3:5], "little")
38
+
39
+ @property
40
+ def payload(self) -> bytes:
41
+ return self.message[5:]
42
+
43
+ def to_dict(self) -> dict[str, object]:
44
+ return {"schema_version": 1, "event_type": "raw_message", "observed_at": self.observed_at,
45
+ "flow": self.flow.to_dict(), "connection_epoch": self.connection_epoch,
46
+ "index": self.index, "stream_sequence": self.stream_sequence, "length": self.length,
47
+ "flag": self.flag, "opcode": f"0x{self.opcode:04X}", "payload": self.payload.hex()}
48
+
49
+
50
+ RawCaptureHealth = CaptureHealth
@@ -0,0 +1,24 @@
1
+ """Streaming offline raw-message replay; no opcode profile is involved."""
2
+ from collections.abc import Iterable
3
+ from pathlib import Path
4
+
5
+ from .._protocol import DEFAULT_SERVER_PORTS
6
+ from .._tracked_capture import TrackedReplay
7
+ from ._collector import RawTracker
8
+ from .models import RawMessage
9
+
10
+ # Messages one packet may release at once, e.g. when a held-back gap fills;
11
+ # raw traffic is far denser than decoded readings.
12
+ MAX_PENDING_MESSAGES = 65536
13
+
14
+ RawReplay = TrackedReplay[RawMessage, None]
15
+
16
+
17
+ def replay_raw(path: str | Path, *, ports: Iterable[int] = DEFAULT_SERVER_PORTS) -> RawReplay:
18
+ """Every server-to-client message in a saved .pcap/.pcapng, in stream order.
19
+
20
+ Bounded single-consumer replay; close early exits, preferably with 'with'.
21
+ Closing early does not flush or certify an incomplete packet tail.
22
+ """
23
+ return TrackedReplay(path, ports=ports, label="Raw", make_tracker=RawTracker,
24
+ max_pending=MAX_PENDING_MESSAGES)
@@ -0,0 +1,31 @@
1
+ """Public single-use live raw-message capture."""
2
+ from pathlib import Path
3
+
4
+ from .._capture_options import LiveCaptureOptions
5
+ from .._tracked_capture import TrackedLiveSession
6
+ from ._collector import RawTracker
7
+ from .models import RawMessage
8
+
9
+ # Raw traffic is far denser than item or XP events: logins and zone loads
10
+ # arrive as thousands of messages per second.
11
+ DEFAULT_RAW_EVENT_QUEUE_SIZE = 16384
12
+
13
+
14
+ class LiveRawSession(TrackedLiveSession[RawMessage, None]):
15
+ """Every server-to-client message from a passive live capture.
16
+
17
+ No opcode profile, decoding or decryption. TCP gaps are counted in
18
+ ``health`` and visible in message sequence numbers; native packet drops
19
+ and queue overflows stop the session with ``CaptureIntegrityError``.
20
+ Without ``live_options`` the event queue holds
21
+ ``DEFAULT_RAW_EVENT_QUEUE_SIZE`` messages.
22
+ """
23
+
24
+ def __init__(self, *, live_options: LiveCaptureOptions | None = None,
25
+ capture_seconds: float | None = None,
26
+ save_pcap: str | Path | None = None) -> None:
27
+ if live_options is not None and not isinstance(live_options, LiveCaptureOptions):
28
+ raise TypeError("live_options must be LiveCaptureOptions or None")
29
+ super().__init__(label="Raw", make_tracker=RawTracker,
30
+ live_options=live_options or LiveCaptureOptions(event_queue_size=DEFAULT_RAW_EVENT_QUEUE_SIZE),
31
+ capture_seconds=capture_seconds, save_pcap=save_pcap)
@@ -14,6 +14,7 @@ from .models import (
14
14
  SolareClass,
15
15
  SolareClassPerformance,
16
16
  SolareDetectionStatus,
17
+ SolareEquipment,
17
18
  SolareEvidence,
18
19
  SolareFamilyLayout,
19
20
  SolareLeaderboardSnapshot,
@@ -36,6 +37,7 @@ __all__ = [
36
37
  "SolareClass",
37
38
  "SolareClassPerformance",
38
39
  "SolareDetectionStatus",
40
+ "SolareEquipment",
39
41
  "SolareEvidence",
40
42
  "SolareFamilyLayout",
41
43
  "SolareLeaderboardSnapshot",
@@ -76,8 +76,22 @@ CLASS_NAMES: dict[int, str] = {
76
76
  32: "Seraph",
77
77
  33: "Dosa",
78
78
  34: "Deadeye",
79
+ 35: "Agent",
79
80
  }
80
81
 
82
+ # Reviewed complete rosters; display-name additions must not invalidate history.
83
+ _HISTORICAL_CLASS_ROSTER = frozenset({
84
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17,
85
+ 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
86
+ })
87
+ SOLARE_CLASS_ROSTERS = (
88
+ _HISTORICAL_CLASS_ROSTER,
89
+ _HISTORICAL_CLASS_ROSTER | {35},
90
+ )
91
+ SOLARE_RICH_RECORD_COUNTS = frozenset(
92
+ len(roster) * 20 for roster in SOLARE_CLASS_ROSTERS
93
+ )
94
+
81
95
  ADVANCED_SPEC_BY_CLASS: dict[int, str] = {
82
96
  3: "Ascension",
83
97
  6: "Ascension",