bdo-toolkit 1.0.12__tar.gz → 1.0.13__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.
- {bdo_toolkit-1.0.12/src/bdo_toolkit.egg-info → bdo_toolkit-1.0.13}/PKG-INFO +1 -1
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_version.py +1 -1
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_discovery.py +95 -30
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13/src/bdo_toolkit.egg-info}/PKG-INFO +1 -1
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_details.py +7 -6
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_replay.py +82 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/LICENSE +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/README.md +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/pyproject.toml +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/setup.cfg +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_async_sessions.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_async_utils.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/_constants.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/_records.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/analysis.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/capture.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/companions.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/live.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/observations.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/persistence.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/progress.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/validation.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/workflow.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_capture_backend.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_capture_options.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_capture_runtime.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_deposit_origin.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_engine.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_framing.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/_constants.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/_records.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/assembly.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/formatting.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/inventory.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/storage.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_observation_session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/discovery.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/manual.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/tracker.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_profile_io.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_profile_runtime.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_protocol.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_reassembly.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_record_geometry.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_specs.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_storage_hydration.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_tracked_capture.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_capture.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_discovery.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_profile.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_validation.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/async_session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/calibration.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/replay.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/calibration.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/capture.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/capture_diagnosis.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/character_state.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/cli.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/diagnostics.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/events.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/filters.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/_pipeline.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/item_state.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/origin_learning.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/profiles.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/py.typed +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/_collector.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/replay.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/remote_profiles.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_constants.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_detail_learning.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_details.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_live_tracker.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_result.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_scanner.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_validation.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/async_session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/replay.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/writers.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/__init__.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/_tracker.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/profile.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/replay.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/SOURCES.txt +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/requires.txt +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_async.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_cli.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_discovery.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_evidence.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_models.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_profiles.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_replay.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_agris_session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_async_sessions.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_calibration.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_calibration_conveniences.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_calibration_lifecycle.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_calibration_persistence.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_calibration_progress.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_calibration_retention.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_capture_backend.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_capture_diagnosis.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_capture_replay.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_capture_runtime.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_character_state.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_cli.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_decoder_diagnostics.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_deposit_origin.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_direction.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_engine.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_examples_and_writers.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_explicit_profile.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_fixture_catalog.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_fixture_regressions.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_framing.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_grind.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_initial_load_storage.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_inventory_snapshots.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_item_state.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_live_capture_session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_origin_learning.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_package_layout.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_profile_validation.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_raw.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_reassembly.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_remote_profiles.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_api.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_equipment.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_learning.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_learning_adversarial.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_real_captures.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_solare_session.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_storage_events.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_storage_hydration_tracker.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_storage_unknown_destination_calibration.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_toolkit_api.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_xp.py +0 -0
- {bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_xp_profiles.py +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import hashlib
|
|
6
|
+
import unicodedata
|
|
6
7
|
from collections import Counter, OrderedDict, defaultdict
|
|
7
8
|
from dataclasses import dataclass, field
|
|
8
9
|
from typing import DefaultDict, Iterable, Optional, Sequence, cast
|
|
@@ -148,24 +149,70 @@ class _NamePair:
|
|
|
148
149
|
|
|
149
150
|
|
|
150
151
|
def _is_player_identifier_codepoint(code: int) -> bool:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
#
|
|
154
|
-
|
|
152
|
+
if code in PLAYER_NAME_BYTES or 0xAC00 <= code <= 0xD7A3:
|
|
153
|
+
return True
|
|
154
|
+
# Assigned letters/marks/numbers in the requested scripts, not entire
|
|
155
|
+
# Unicode blocks (which also include punctuation and unassigned values).
|
|
156
|
+
if (0x0E00 <= code <= 0x0E7F # Thai
|
|
157
|
+
or 0x3040 <= code <= 0x30FF # Hiragana / Katakana
|
|
158
|
+
or 0x31F0 <= code <= 0x31FF # Katakana phonetic extensions
|
|
159
|
+
or 0xFF66 <= code <= 0xFF9F # Halfwidth Katakana
|
|
160
|
+
or 0x1AFF0 <= code <= 0x1AFFF # Kana Extended-B
|
|
161
|
+
or 0x1B000 <= code <= 0x1B16F): # Supplement / Extended-A / Small Kana
|
|
162
|
+
return unicodedata.category(chr(code))[0] in "LMN"
|
|
163
|
+
if code in (0x3005, 0x3006, 0x3007) or 0x3031 <= code <= 0x3035:
|
|
164
|
+
return True # Ideographic and kana iteration/letter marks.
|
|
165
|
+
if (0x3400 <= code <= 0x9FFF or 0xF900 <= code <= 0xFAFF
|
|
166
|
+
or 0x20000 <= code <= 0x3FFFF):
|
|
167
|
+
# Han is shared by Japanese Kanji and both Chinese writing systems.
|
|
168
|
+
return unicodedata.name(chr(code), "").startswith(
|
|
169
|
+
("CJK UNIFIED IDEOGRAPH-", "CJK COMPATIBILITY IDEOGRAPH-"))
|
|
170
|
+
if 0xFE00 <= code <= 0xFE0F or 0xE0100 <= code <= 0xE01EF:
|
|
171
|
+
return True # Preserve ideographic variation sequences verbatim.
|
|
172
|
+
return False
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def _identifier_scalar(data: bytes, position: int) -> Optional[tuple[int, int]]:
|
|
176
|
+
"""Read one strict UTF-16 scalar and its byte width within the field."""
|
|
177
|
+
if position < 0 or position + 1 >= len(data):
|
|
178
|
+
return None
|
|
179
|
+
code = data[position] | data[position + 1] << 8
|
|
180
|
+
if 0xD800 <= code <= 0xDBFF:
|
|
181
|
+
if position + 3 >= len(data):
|
|
182
|
+
return None
|
|
183
|
+
low = data[position + 2] | data[position + 3] << 8
|
|
184
|
+
if not 0xDC00 <= low <= 0xDFFF:
|
|
185
|
+
return None
|
|
186
|
+
return 0x10000 + ((code - 0xD800) << 10) + low - 0xDC00, 4
|
|
187
|
+
return None if 0xDC00 <= code <= 0xDFFF else (code, 2)
|
|
155
188
|
|
|
156
189
|
|
|
157
190
|
def _read_player_identifier(data: bytes, offset: int, max_chars: int = 32) -> str:
|
|
158
191
|
if offset < 0:
|
|
159
192
|
return ""
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
193
|
+
position = offset
|
|
194
|
+
limit = offset + max_chars * 2
|
|
195
|
+
previous_code = 0
|
|
196
|
+
while position + 1 < limit:
|
|
197
|
+
scalar = _identifier_scalar(data, position)
|
|
198
|
+
if scalar is None:
|
|
199
|
+
return ""
|
|
200
|
+
code, width = scalar
|
|
201
|
+
if position + width > limit:
|
|
163
202
|
return ""
|
|
164
|
-
code = data[position] | data[position + 1] << 8
|
|
165
203
|
if code == 0:
|
|
166
204
|
return data[offset:position].decode("utf-16-le")
|
|
167
205
|
if not _is_player_identifier_codepoint(code):
|
|
168
206
|
return ""
|
|
207
|
+
if position == offset and unicodedata.category(chr(code)).startswith("M"):
|
|
208
|
+
return ""
|
|
209
|
+
if (0xFE00 <= code <= 0xFE0F or 0xE0100 <= code <= 0xE01EF) and not (
|
|
210
|
+
unicodedata.name(chr(previous_code), "").startswith(
|
|
211
|
+
("CJK UNIFIED IDEOGRAPH-", "CJK COMPATIBILITY IDEOGRAPH-"))
|
|
212
|
+
):
|
|
213
|
+
return ""
|
|
214
|
+
previous_code = code
|
|
215
|
+
position += width
|
|
169
216
|
return ""
|
|
170
217
|
|
|
171
218
|
|
|
@@ -174,13 +221,14 @@ def _identifier_starts_here(data: bytes, offset: int) -> bool:
|
|
|
174
221
|
|
|
175
222
|
if not _read_player_identifier(data, offset):
|
|
176
223
|
return False
|
|
177
|
-
if
|
|
178
|
-
offset
|
|
179
|
-
and
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
224
|
+
if offset >= 2:
|
|
225
|
+
previous = data[offset - 2] | data[offset - 1] << 8
|
|
226
|
+
if 0xDC00 <= previous <= 0xDFFF and offset >= 4:
|
|
227
|
+
scalar = _identifier_scalar(data, offset - 4)
|
|
228
|
+
if scalar is not None:
|
|
229
|
+
previous = scalar[0]
|
|
230
|
+
if _is_player_identifier_codepoint(previous):
|
|
231
|
+
return False
|
|
184
232
|
return True
|
|
185
233
|
|
|
186
234
|
|
|
@@ -190,13 +238,19 @@ def _candidate_name_pairs(frames: Sequence[BDOFrame]) -> list[_NamePair]:
|
|
|
190
238
|
first = frames[0].message
|
|
191
239
|
columns: list[tuple[int, tuple[str, ...]]] = []
|
|
192
240
|
for offset in range(BDO_HEADER_SIZE, len(first) - 1):
|
|
193
|
-
if not
|
|
241
|
+
if not _read_player_identifier(first, offset):
|
|
194
242
|
continue
|
|
195
243
|
values = tuple(
|
|
196
244
|
_read_player_identifier(frame.message, offset) for frame in frames
|
|
197
245
|
)
|
|
198
246
|
if not all(values) or len(set(values)) != len(values):
|
|
199
247
|
continue
|
|
248
|
+
# A preceding binary word can coincidentally encode a supported Han
|
|
249
|
+
# character. Establish the column boundary using the whole response,
|
|
250
|
+
# rather than rejecting it solely on the first record's preceding word.
|
|
251
|
+
# A suffix of a genuine name has a supported predecessor in every row.
|
|
252
|
+
if not any(_identifier_starts_here(frame.message, offset) for frame in frames):
|
|
253
|
+
continue
|
|
200
254
|
columns.append((offset, values))
|
|
201
255
|
|
|
202
256
|
pairs: list[_NamePair] = []
|
|
@@ -601,29 +655,40 @@ def _discover_menu_context(
|
|
|
601
655
|
columns: list[tuple[int, tuple[str, ...]]] = []
|
|
602
656
|
first = frames[0].message
|
|
603
657
|
for offset in range(BDO_HEADER_SIZE, len(first) - 1):
|
|
604
|
-
#
|
|
605
|
-
#
|
|
606
|
-
|
|
607
|
-
if not _identifier_starts_here(first, offset):
|
|
658
|
+
# Reject non-text offsets cheaply, then prove the column boundary
|
|
659
|
+
# across records so neighboring binary words cannot suppress it.
|
|
660
|
+
if not _read_player_identifier(first, offset):
|
|
608
661
|
continue
|
|
609
662
|
values = tuple(
|
|
610
663
|
_read_player_identifier(frame.message, offset) for frame in frames
|
|
611
664
|
)
|
|
612
665
|
if not all(values) or len(set(values)) < 12:
|
|
613
666
|
continue
|
|
667
|
+
if not any(_identifier_starts_here(frame.message, offset) for frame in frames):
|
|
668
|
+
continue
|
|
614
669
|
columns.append((offset, values))
|
|
615
670
|
|
|
616
|
-
|
|
617
|
-
for
|
|
618
|
-
if
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
if len(
|
|
671
|
+
groups: list[list[tuple[int, tuple[str, ...]]]] = []
|
|
672
|
+
for column in columns:
|
|
673
|
+
if not groups or column[0] - groups[-1][0][0] > 64:
|
|
674
|
+
groups.append([])
|
|
675
|
+
groups[-1].append(column)
|
|
676
|
+
if len(groups) != 5:
|
|
622
677
|
return None
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
678
|
+
# Wider scripts can make a one-byte-shifted UTF-16 alias look like text.
|
|
679
|
+
# Select the unique evenly spaced five-column grid, not the first alias.
|
|
680
|
+
grids: list[tuple[int, ...]] = []
|
|
681
|
+
lookups = [dict(group) for group in groups]
|
|
682
|
+
for first_offset in lookups[0]:
|
|
683
|
+
for second_offset in lookups[1]:
|
|
684
|
+
stride = second_offset - first_offset
|
|
685
|
+
offsets = tuple(first_offset + index * stride for index in range(5))
|
|
686
|
+
if all(offset in group for offset, group in zip(offsets, lookups)):
|
|
687
|
+
grids.append(offsets)
|
|
688
|
+
if len(grids) != 1:
|
|
626
689
|
return None
|
|
690
|
+
offsets = grids[0]
|
|
691
|
+
collapsed = [(offset, group[offset]) for offset, group in zip(offsets, lookups)]
|
|
627
692
|
all_names = [name for _offset, values in collapsed for name in values]
|
|
628
693
|
if not 40 <= len(set(all_names)) <= len(all_names):
|
|
629
694
|
return None
|
|
@@ -634,7 +699,7 @@ def _discover_menu_context(
|
|
|
634
699
|
frame_length=frame_length,
|
|
635
700
|
frame_count=len(frames),
|
|
636
701
|
player_slots_per_frame=len(collapsed),
|
|
637
|
-
record_stride=
|
|
702
|
+
record_stride=offsets[1] - offsets[0],
|
|
638
703
|
unique_names=len(set(all_names)),
|
|
639
704
|
flow_generation=flow_generation,
|
|
640
705
|
)
|
|
@@ -443,18 +443,19 @@ def _synthetic_snapshot(
|
|
|
443
443
|
|
|
444
444
|
|
|
445
445
|
@pytest.mark.parametrize("layout", _LAYOUTS, ids=lambda item: item.layout_id)
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
@pytest.mark.parametrize("prefix", ("\uac00\ub098", "ผู้กล้า", "かなカナ漢", "简体汉字", "繁體漢字", "𠮷"))
|
|
447
|
+
def test_registered_details_preserve_asian_names_and_performance(layout: _Layout, prefix: str) -> None:
|
|
448
|
+
synthetic = _synthetic_snapshot(layout, name_prefix=prefix)
|
|
448
449
|
rich = decode_solare_details(synthetic.rich_frames, synthetic.rich)
|
|
449
450
|
overall = decode_solare_overall_details(synthetic.overall_frames, synthetic.overall)
|
|
450
451
|
assert rich is not None
|
|
451
452
|
assert overall is not None
|
|
452
|
-
assert rich.players[0].name == "
|
|
453
|
-
assert rich.players[-1].name == "
|
|
453
|
+
assert rich.players[0].name == prefix + "0001"
|
|
454
|
+
assert rich.players[-1].name == prefix + "0620"
|
|
454
455
|
assert rich.players[0].elo == 9999
|
|
455
456
|
assert rich.players[0].classes_played[0].matches == 101
|
|
456
|
-
assert overall.entries[0].name == "
|
|
457
|
-
assert overall.entries[-1].name == "
|
|
457
|
+
assert overall.entries[0].name == prefix + "0001"
|
|
458
|
+
assert overall.entries[-1].name == prefix + "0100"
|
|
458
459
|
assert "performance" in overall.capabilities
|
|
459
460
|
assert overall.entries[0].classes_played[0].wins == 120
|
|
460
461
|
|
|
@@ -343,6 +343,88 @@ def test_korean_name_reader_preserves_full_identifiers_and_rejects_suffixes(name
|
|
|
343
343
|
assert not _identifier_starts_here(data, 4)
|
|
344
344
|
|
|
345
345
|
|
|
346
|
+
@pytest.mark.parametrize("prefix", (
|
|
347
|
+
"ผู้กล้า", "ひらがな", "カタカナ", "日本語", "简体汉字", "繁體漢字",
|
|
348
|
+
"𠮷野家", "ガ", "か\u3099", "葛\U000e0100", "KR한_ไทย漢カ",
|
|
349
|
+
))
|
|
350
|
+
def test_asian_script_names_confirm_complete_tables_without_normalization(prefix):
|
|
351
|
+
frames = _complete_frames(name_prefix=prefix, include_agent=True)
|
|
352
|
+
result = build_solare_result(frames, _health(frames))
|
|
353
|
+
assert result.complete
|
|
354
|
+
assert result.snapshot is not None
|
|
355
|
+
assert result.evidence.exact_cross_check == 100
|
|
356
|
+
assert result.snapshot.players[0].name == prefix + "0001"
|
|
357
|
+
assert result.snapshot.overall_top_100[0].name == prefix + "0001"
|
|
358
|
+
assert result.evidence.rich_layout.name_offset == 20
|
|
359
|
+
assert result.evidence.overall_layout.name_offset == 30
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
@pytest.mark.parametrize("name", ("ผู้กล้า", "𠮷野家", "葛\U000e0100", "か\u3099", "繁體汉字"))
|
|
363
|
+
def test_asian_name_readers_reject_every_suffix(name):
|
|
364
|
+
from bdo_toolkit.solare._details import _read_name
|
|
365
|
+
from bdo_toolkit.solare._discovery import _identifier_starts_here
|
|
366
|
+
data = bytes(2) + name.encode("utf-16-le") + bytes(2)
|
|
367
|
+
assert _read_name(data, 2) == name
|
|
368
|
+
assert _identifier_starts_here(data, 2)
|
|
369
|
+
for offset in range(4, len(data) - 2, 2):
|
|
370
|
+
assert not _identifier_starts_here(data, offset)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
@pytest.mark.parametrize("name", (
|
|
374
|
+
"\u0e00", "\u0e3f", "\u3040", "\u30fb", "\u0e48Thai",
|
|
375
|
+
"\u3099かな", "\u3000漢", "漢\u200b字", "A\ufe00", "A\U000e0100",
|
|
376
|
+
"\U0001f600", "\ue000", "𠮷" * 16, "ก" * 32,
|
|
377
|
+
))
|
|
378
|
+
def test_asian_name_support_rejects_symbols_unassigned_and_overlong_names(name):
|
|
379
|
+
from bdo_toolkit.solare._discovery import _read_player_identifier
|
|
380
|
+
assert _read_player_identifier(name.encode("utf-16-le") + bytes(2), 0) == ""
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
@pytest.mark.parametrize("wire", (
|
|
384
|
+
b"\x00\xdc\x00\x00", b"\x00\xd8A\x00\x00\x00",
|
|
385
|
+
b"\x00\xd8\x00", b"\x00\xd8",
|
|
386
|
+
))
|
|
387
|
+
def test_asian_name_support_rejects_malformed_surrogate_pairs(wire):
|
|
388
|
+
from bdo_toolkit.solare._discovery import _read_player_identifier
|
|
389
|
+
assert _read_player_identifier(wire, 0) == ""
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
def test_supplementary_han_names_respect_utf16_unit_limit():
|
|
393
|
+
from bdo_toolkit.solare._discovery import _read_player_identifier
|
|
394
|
+
name = "𠮷" * 15 + "漢" # 31 code units plus terminator.
|
|
395
|
+
assert _read_player_identifier(name.encode("utf-16-le") + bytes(2), 0) == name
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
def test_name_column_survives_han_like_binary_word_before_first_record():
|
|
399
|
+
frames = list(_complete_frames())
|
|
400
|
+
message = bytearray(frames[0].message)
|
|
401
|
+
for base in (0, 4200):
|
|
402
|
+
message[base + 18:base + 20] = "漢".encode("utf-16-le")
|
|
403
|
+
frames[0] = replace(frames[0], message=bytes(message))
|
|
404
|
+
result = build_solare_result(tuple(frames), _health(tuple(frames)))
|
|
405
|
+
assert result.complete
|
|
406
|
+
assert result.snapshot.players[0].name == "Player0001"
|
|
407
|
+
assert result.evidence.rich_layout.name_offset == 20
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
@pytest.mark.parametrize("ambiguous", (False, True))
|
|
411
|
+
def test_menu_name_columns_require_unique_spacing_despite_byte_shift_aliases(ambiguous):
|
|
412
|
+
frames = []
|
|
413
|
+
for i, frame in enumerate(_menu_frames()):
|
|
414
|
+
message = bytearray(frame.message)
|
|
415
|
+
for slot, offset in enumerate((100, 1600, 3100, 4600, 6100)):
|
|
416
|
+
message[offset:offset + 64] = bytes(64)
|
|
417
|
+
# Latin-only text shifted by one byte also looks like assigned Han.
|
|
418
|
+
# A Thai first character breaks that alias in the middle column.
|
|
419
|
+
prefix = "ก" if slot == 2 and not ambiguous else "Menu"
|
|
420
|
+
_put_name(message, offset, prefix + chr(65 + i) + chr(65 + slot))
|
|
421
|
+
frames.append(replace(frame, message=bytes(message)))
|
|
422
|
+
result = build_solare_result(tuple(frames), _health(tuple(frames)))
|
|
423
|
+
assert result.status is (SolareDetectionStatus.INCONCLUSIVE if ambiguous
|
|
424
|
+
else SolareDetectionStatus.MENU_CONTEXT)
|
|
425
|
+
assert result.snapshot is None
|
|
426
|
+
|
|
427
|
+
|
|
346
428
|
@pytest.mark.parametrize("data", (
|
|
347
429
|
"\uac00".encode("utf-16-le"), # missing terminator
|
|
348
430
|
"\uac00".encode("utf-16-le") + b"\x00", # truncated code unit
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_storage_destination_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bdo_toolkit-1.0.12 → bdo_toolkit-1.0.13}/tests/test_storage_unknown_destination_calibration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|