apostate 0.1.0__py3-none-any.whl

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.
apostate/__init__.py ADDED
@@ -0,0 +1,112 @@
1
+ """Public Python API for the Apostate native Chromium distribution."""
2
+
3
+ from .binary import (
4
+ BinaryManager,
5
+ DiscoveredBinary,
6
+ binary_info,
7
+ clear_cache,
8
+ discover_binary,
9
+ discovery_report,
10
+ ensure_binary,
11
+ target_platform,
12
+ )
13
+ from .config import (
14
+ CATALOGUE_VERSION,
15
+ CHROMIUM_VERSION,
16
+ DEFAULT_PERSONA_BY_HOST,
17
+ PACKAGE_VERSION,
18
+ PROFILE_SCHEMA_VERSION,
19
+ LaunchConfig,
20
+ default_persona_for_host,
21
+ host_persona,
22
+ normalize_platform,
23
+ resolve_profile as resolve_config_profile,
24
+ translate_options,
25
+ )
26
+ from .errors import (
27
+ ApostateError,
28
+ BinaryError,
29
+ BinaryNotFoundError,
30
+ ConfigurationError,
31
+ GeoIPError,
32
+ GeoIPUnavailableError,
33
+ IntegrityError,
34
+ LaunchError,
35
+ ManifestError,
36
+ ProfileError,
37
+ UnpublishedArtifactError,
38
+ UnsupportedArchiveError,
39
+ )
40
+ from .geoip import GeoIPProvider, GeoIPResult, normalize_result, redact_proxy, resolve_geoip
41
+ from .launch import (
42
+ DRIVERS,
43
+ DriverSelection,
44
+ LaunchPlan,
45
+ driver_info,
46
+ launch,
47
+ launch_async,
48
+ launch_context,
49
+ launch_context_async,
50
+ launch_persistent_context,
51
+ launch_persistent_context_async,
52
+ )
53
+ from .profile_validation import load_schema, validate_profile
54
+ from .resolver import DeterministicResolver, ProfileResolution, load_catalogue, resolve, resolve_profile
55
+ from .widevine import WidevineError, discover_widevine, provision_widevine
56
+
57
+ __all__ = [
58
+ "ApostateError",
59
+ "BinaryError",
60
+ "BinaryManager",
61
+ "BinaryNotFoundError",
62
+ "CATALOGUE_VERSION",
63
+ "CHROMIUM_VERSION",
64
+ "ConfigurationError",
65
+ "DEFAULT_PERSONA_BY_HOST",
66
+ "DeterministicResolver",
67
+ "DiscoveredBinary",
68
+ "GeoIPError",
69
+ "GeoIPProvider",
70
+ "GeoIPResult",
71
+ "IntegrityError",
72
+ "LaunchConfig",
73
+ "LaunchError",
74
+ "DRIVERS",
75
+ "DriverSelection",
76
+ "LaunchPlan",
77
+ "driver_info",
78
+ "ManifestError",
79
+ "PACKAGE_VERSION",
80
+ "PROFILE_SCHEMA_VERSION",
81
+ "ProfileError",
82
+ "ProfileResolution",
83
+ "UnpublishedArtifactError",
84
+ "UnsupportedArchiveError",
85
+ "binary_info",
86
+ "clear_cache",
87
+ "default_persona_for_host",
88
+ "discover_binary",
89
+ "discovery_report",
90
+ "ensure_binary",
91
+ "host_persona",
92
+ "launch",
93
+ "launch_async",
94
+ "launch_context",
95
+ "launch_context_async",
96
+ "launch_persistent_context",
97
+ "launch_persistent_context_async",
98
+ "load_catalogue",
99
+ "load_schema",
100
+ "normalize_platform",
101
+ "normalize_result",
102
+ "redact_proxy",
103
+ "resolve",
104
+ "resolve_geoip",
105
+ "resolve_profile",
106
+ "target_platform",
107
+ "translate_options",
108
+ "validate_profile",
109
+ "WidevineError",
110
+ "discover_widevine",
111
+ "provision_widevine",
112
+ ]
apostate/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())
@@ -0,0 +1 @@
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","anchor_policy":{"atomic":"An anchor is taken whole: WebGL1 and WebGL2 extension lists, parameter tables, shader precision, context attributes, sample counts, the pixel render digest, and the WebGPU feature and limit sets. Any mixture of two anchors is a device that does not exist.","coherence":"Any axis whose legal values are fixed by the claimed chip is conditioned on the resolved gpu_identity: cpu and memory directly, and panel, media_topology and battery through machine_class, which turns one chip into one machine. Drawing those independently produced machines that have never been sold, such as an Apple M4 Max with MacBook Air geometry and 32 GiB of memory.","identity_rotation":"Identity strings rotate within one anchor only. A measured member may always be presented. Any other identity must be REGISTERED on that anchor in resources/profiles/dispersion/gpu_identity.json through a `member` block naming the label the runtime reports and, when it carries one, the measured member whose WebGPU adapter it presents; scripts/generate-dispersion-tables.py folds those into the compiled member table and hard-fails on an identity that is neither measured nor registered, so the runtime membership check cannot be surprised. A registered identity carries evidence catalogue-value and states in its note exactly what is measured and what is derived. Cross-anchor rotation is the retired catalogue's failure and is never offered.","selection":"Anchors are filtered by what the host can actually serve, never by the platform persona. --fingerprint-platform does not move the GPU cluster: on a macOS host a Windows persona keeps an Apple Metal cluster and that mismatch is reported as a limitation rather than hidden."},"anchors":[{"backend":"ANGLE/SwiftShader","build_bindings":["same-major"],"build_caveat":"Measured on Chromium 152.0.7977.82 against release pin 152.0.7977.83: same major, different patch. Version-bearing fields will differ from a pinned-build reference and a V3 run must report that separately.","digests":{"webgl1_caps_sha256":"6087e24b280ce3092f30ff349c91d43c4565c5cf57f4890939783ecf96a0ed48","webgl1_pixels_sha256":"918f09f66eeb4cf809d0ea2bf69bd2fefa62f31f12c4d32fd2ac4b4e3f3b1e2b","webgl2_caps_sha256":"9b8362e1bb54529054317d260277f6df25340590fc176a135b74a72d89ad0e20","webgl2_pixels_sha256":"918f09f66eeb4cf809d0ea2bf69bd2fefa62f31f12c4d32fd2ac4b4e3f3b1e2b"},"evidence_class":"compatibility-capture","evidence_tier":"T0","file":"corpus/anchors/linux-swiftshader-google-6922d61bab83.json","host_requirements":{"backend":"ANGLE/SwiftShader","platform":"linux"},"id":"linux-swiftshader-google-6922d61bab83","member_count":1,"members":["SwiftShader Device (Subzero)"],"platform":"linux","rotation_status":"single-member","software_anchor":true,"vendor":"Google"},{"backend":"ANGLE/Vulkan","build_bindings":["same-major"],"build_caveat":"Measured on Chromium 152.0.7977.82 against release pin 152.0.7977.83: same major, different patch. Version-bearing fields will differ from a pinned-build reference and a V3 run must report that separately.","digests":{"webgl1_caps_sha256":"2327f6ae5fcbf3e56f721c3c5e6e490b05fd094e515f504dd2f4a651b157c6dc","webgl1_pixels_sha256":"7e8e3b73e7475148cb0f7dbbe7088d8cd96ab263f498f875cb6fd6d650e5be0e","webgl2_caps_sha256":"c7aa8b52c012099744a2151d830665be44193a8342675c6233c179b7f127d930","webgl2_pixels_sha256":"7e8e3b73e7475148cb0f7dbbe7088d8cd96ab263f498f875cb6fd6d650e5be0e"},"evidence_class":"physical-ground-truth","evidence_tier":"T0","file":"corpus/anchors/linux-vulkan-nvidia-adf287b8f0ee.json","host_requirements":{"backend":"ANGLE/Vulkan","platform":"linux"},"id":"linux-vulkan-nvidia-adf287b8f0ee","member_count":4,"members":["NVIDIA GeForce RTX 4070 Ti SUPER","NVIDIA GeForce RTX 4080 SUPER","NVIDIA GeForce RTX 3090","NVIDIA RTX PRO 4000 Blackwell"],"platform":"linux","rotation_status":"measured-safe","vendor":"NVIDIA"},{"backend":"ANGLE/Metal","build_bindings":["release"],"digests":{"webgl1_caps_sha256":"53ec118e9c7200627db025219996cd5a197b64a86a60ea92cf9009b561b3f2a3","webgl1_pixels_sha256":"918f09f66eeb4cf809d0ea2bf69bd2fefa62f31f12c4d32fd2ac4b4e3f3b1e2b","webgl2_caps_sha256":"102f6613b44aaee43d5f5b02dbab4dc951319730b5e6af0b0a4246131a565be2","webgl2_pixels_sha256":"918f09f66eeb4cf809d0ea2bf69bd2fefa62f31f12c4d32fd2ac4b4e3f3b1e2b"},"evidence_class":"physical-ground-truth","evidence_tier":"T0","file":"corpus/anchors/macos-metal-apple-850a91233555.json","host_requirements":{"backend":"ANGLE/Metal","platform":"macos"},"id":"macos-metal-apple-850a91233555","member_count":1,"members":["Apple M4 Max"],"platform":"macos","rotation_status":"single-member","vendor":"Apple"},{"backend":"ANGLE/D3D11","build_bindings":["release"],"digests":{"webgl1_caps_sha256":"be8acf335bdcf305fd3c4ba0e8e32474b330ca2f8391d246d496e11039399d24","webgl1_pixels_sha256":"918f09f66eeb4cf809d0ea2bf69bd2fefa62f31f12c4d32fd2ac4b4e3f3b1e2b","webgl2_caps_sha256":"e695c2da65d4f40c1c15e7d1831cbce31d5a8bac9d7b74db935cb16ae46e9c32","webgl2_pixels_sha256":"918f09f66eeb4cf809d0ea2bf69bd2fefa62f31f12c4d32fd2ac4b4e3f3b1e2b"},"evidence_class":"physical-ground-truth","evidence_tier":"T0","file":"corpus/anchors/windows-d3d11-intel-79dfeb5b4f99.json","host_requirements":{"backend":"ANGLE/D3D11","platform":"windows"},"id":"windows-d3d11-intel-79dfeb5b4f99","member_count":1,"members":["Intel(R) UHD Graphics 630"],"platform":"windows","rotation_status":"single-member","vendor":"Intel"},{"backend":"ANGLE/D3D11","build_bindings":["off-major"],"build_caveat":"Measured on Chromium 153.0.8010.37 against release pin 152.0.7977.83. Capability tables are build-bound, so equality of this cluster to a pinned-build capture is not established by this evidence.","digests":{"webgl1_caps_sha256":"ff87541425e28457183929cea3aeca7fac78aa1dc339592f0e81593f6306ae98","webgl1_pixels_sha256":"a895ab2a1a0a1e6cf208e906b4c5e207674d39ed37adaa1de2244a5c2539f6a2","webgl2_caps_sha256":"a34893d0a4a3f69e04efc010f68974355330bccbffa99f714f41243348171831","webgl2_pixels_sha256":"a895ab2a1a0a1e6cf208e906b4c5e207674d39ed37adaa1de2244a5c2539f6a2"},"evidence_class":"physical-ground-truth","evidence_tier":"T0","file":"corpus/anchors/windows-d3d11-nvidia-0947761dfbe9.json","host_requirements":{"backend":"ANGLE/D3D11","platform":"windows"},"id":"windows-d3d11-nvidia-0947761dfbe9","member_count":2,"members":["NVIDIA GeForce RTX 3070 Ti","NVIDIA RTX A4500"],"platform":"windows","rotation_status":"measured-safe","vendor":"NVIDIA"}],"axes":[{"axis":"os_release","conditioned_on":["platform"],"file":"dispersion/os_release.json","label":"os_release","option_sets":3,"options":7,"selection":"single","servability":"none"},{"axis":"gpu_identity","conditioned_on":["anchor"],"file":"dispersion/gpu_identity.json","label":"gpu_identity","option_sets":5,"options":81,"selection":"single","servability":"anchor-member"},{"axis":"machine_class","conditioned_on":["gpu_identity"],"file":"dispersion/machine_class.json","label":"machine_class","option_sets":81,"options":177,"selection":"single","servability":"none"},{"axis":"cpu","conditioned_on":["gpu_identity"],"file":"dispersion/cpu.json","label":"cpu","option_sets":81,"options":351,"selection":"single","servability":"clamp-down"},{"axis":"memory","conditioned_on":["gpu_identity"],"file":"dispersion/memory.json","label":"memory","option_sets":81,"options":260,"selection":"single","servability":"clamp-down"},{"axis":"panel","conditioned_on":["machine_class"],"file":"dispersion/panel.json","label":"panel","option_sets":14,"options":28,"selection":"single","servability":"window-bounds"},{"axis":"furniture","conditioned_on":["platform","os_release"],"file":"dispersion/furniture.json","label":"furniture","option_sets":7,"options":25,"selection":"single","servability":"none"},{"axis":"font_packs","conditioned_on":["platform","os_release"],"file":"dispersion/font_packs.json","label":"font_packs","option_sets":7,"options":48,"selection":"core-plus-subset","servability":"none"},{"axis":"media_topology","conditioned_on":["machine_class"],"file":"dispersion/media_topology.json","label":"media_topology","option_sets":14,"options":29,"selection":"single","servability":"none"},{"axis":"audio","conditioned_on":["platform"],"file":"dispersion/audio.json","label":"audio","option_sets":3,"options":3,"selection":"single","servability":"none"},{"axis":"network","conditioned_on":[],"file":"dispersion/network.json","label":"network","option_sets":1,"options":6,"selection":"single","servability":"none"},{"axis":"battery","conditioned_on":["machine_class"],"file":"dispersion/battery.json","label":"battery","option_sets":14,"options":42,"selection":"single","servability":"none"},{"axis":"voices","conditioned_on":["platform","os_release","languages"],"file":"dispersion/voices.json","label":"voices","option_sets":21,"options":21,"selection":"single","servability":"none"}],"axis_resolution_order":["platform","os_release","anchor","gpu_identity","machine_class","cpu","memory","panel","furniture","font_packs","media_topology","audio","network","battery","voices","locale"],"browser_build":"152.0.7977.83","catalogue_id":"apostate","catalogue_version":2,"invariants":{"fields":["chromium_version","brand_list","api_surface","function_prototype_tostring","compiled_codecs","cdm_registration","network_speech_voices"],"note":"A profile never varies these. When one is wrong it is a build or patch defect, not a profile defect (docs/FINGERPRINTS.md section 8).","owner":"the build"},"language_sets":["en-US,en","en-GB,en",""],"model":"anchors+dispersion","model_description":"A profile is composed, not selected from a list. Invariants belong to the build, anchors are measured GPU capability clusters taken atomically, and dispersion axes are enumerated real-world options drawn by seed. See docs/FINGERPRINTS.md.","native_loader":{"metadata_outside_runtime_profile":["profile_id","identity","catalogue_version","profile_schema_version","browser_build","anchor","axes","locale_source","provenance","servability","warnings"],"parser":"base::apostate::Profile","runtime_profile_sections":["id","cpu","memory","platform","browser","speech","screen","window","gpu","webgpu","gl_limits","gl_extensions","gl_precisions","locale","theme","input","audio","media","keyboard","fonts"],"transport":"--apostate-profile=<base64 JSON>","unsupported_fields":[]},"platforms":["linux","macos","windows"],"policies":{"locale":[{"evidence_class":"catalogue-value","id":"en-us","platform":"all","value":{"locale":{"accept_languages":"en-US,en","timezone":"America/New_York"}}},{"evidence_class":"catalogue-value","id":"en-gb","platform":"all","value":{"locale":{"accept_languages":"en-GB,en","timezone":"Europe/London"}}},{"evidence_class":"catalogue-value","id":"en-au","platform":"all","value":{"locale":{"accept_languages":"en-AU,en","timezone":"Australia/Sydney"}}},{"evidence_class":"catalogue-value","id":"en-sg","platform":"all","value":{"locale":{"accept_languages":"en-SG,en","timezone":"Asia/Singapore"}}}],"theme":[{"evidence_class":"catalogue-value","id":"light","platform":"all","value":{"theme":{"highlight_argb":4278190335,"highlight_text_argb":4294967295,"prefers_dark":false}}},{"evidence_class":"catalogue-value","id":"dark","platform":"all","value":{"theme":{"highlight_argb":3434338303,"highlight_text_argb":4278190080,"prefers_dark":true}}},{"evidence_class":"catalogue-value","id":"contrast","platform":"all","value":{"theme":{"highlight_argb":4294967295,"highlight_text_argb":4278190080,"prefers_dark":true}}}]},"policy_notes":"locale and theme are catalogue policies rather than dispersion axes. locale is launch precedence, then GeoIP of the effective egress, then the host (docs/FINGERPRINTS.md section 6) and theme is not one of the nine axes. The display and hardware policies of catalogue version 1 are gone: panel, furniture, cpu and memory replace them. The voices axis has measured option sets for the en-US and en-GB language lists; any other accept-languages value projects onto the empty language key, which leaves the speech section absent so the host's real providers stay in effect, and so does a launch that names no locale at all. The locale policy stays at four options on purpose, and since patch 0111 none of them is drawn: they are the set an explicit selection resolves through, which on the reference path is scripts/profile_resolver.py's --locale-policy, and each is an internally consistent pair rather than a language list beside another country's timezone. Widening the set by seed was never the answer and drawing from it at all was the defect. Two counts, both of which outweigh locale diversity. First, the voices axis is keyed on the resolved accept-languages list and only en-US,en and en-GB,en have measured option sets; every other list projects onto the empty-string set, which leaves speechSynthesis host-inherited. Measured: 2 of 4 locale options carry a measured voice list today, and 2 of 14 would after widening, so ten of fourteen seeds would have traded a measured voice list for the host's. Second, and decisively, the correct value of this surface is a function of the exit IP and not of the seed: a German timezone behind a US egress is a stronger and more commonly checked signal than a narrow timezone pool is, and a seeded draw does not merely risk that mismatch, it guarantees one, because the draw cannot see the egress. A drawn timezone is therefore worse than the host's own, which at least matches a direct connection. GeoIP-derived selection is what landed instead: the Python and Node packages resolve the exit IP before launch and pass --fingerprint-locale and --fingerprint-timezone, the compositor honours those and otherwise writes no locale section, and a failed or partial lookup invents nothing and leaves the host to serve the fields it could not answer for. Candidates for the selection set, each internally consistent (country matches timezone, keyboard layout matches the locale's standard layout): en-CA/America/Toronto, en-NZ/Pacific/Auckland, en-IE/Europe/Dublin, en-ZA/Africa/Johannesburg, de-DE/Europe/Berlin (QWERTZ), fr-FR/Europe/Paris (AZERTY), es-ES/Europe/Madrid, it-IT/Europe/Rome, nl-NL/Europe/Amsterdam, pt-BR/America/Sao_Paulo.","profile_schema_version":3,"provenance_policy":{"catalogue-value":"An Apostate-owned normalized value constrained by platform and Chromium rules. Authored, not measured, and labelled as such in the option's note.","compatibility-capture":"Measured from an external compatibility runtime. No longer used by this catalogue: every entry carrying it was retired, see retired_model.","host-inherited":"Omitted from the profile so the native host value remains in effect.","native-derived":"Emitted by the current Apostate/Chromium build from source inputs; assert-only in a profile.","physical-ground-truth":"A per-file verified, consented capture from a physical device held by this project.","proxy-derived":"Resolved at launch from the actual network exit and never stored in this catalogue."},"retired_model":{"catalogue_version":1,"family_count":14,"reason":"All fourteen families carried compatibility-capture provenance and were identity-string swaps taken on one Mac. Across the fourteen the WebGL1 capability digest, the WebGL2 capability digest and the canvas pixel digest were each a single shared value spanning supposedly distinct Intel, NVIDIA, AMD and Apple GPUs, which is exactly the failure a detector looks for. Fourteen fixed families also made two users who drew the same family byte-identical to each other, a stronger correlation signal than either user's real host.","removed":["resources/profiles/families/","resources/profiles/distributions/","resources/profiles/compatibility-acceptance.json"],"successor":"anchors+dispersion at catalogue version 2"},"seed":{"default_source":"os-entropy-once","domain":"apostate/fp/v1","draw":"sha256(root 0x00 label 0x00 uint32_be(index))","hash":"sha256","persist_path":"<user-data-dir>/apostate/seed","persist_reason":"A new fingerprint on every launch of the same browser profile is itself a signal: returning-visitor checks, long-lived cookies and storage all expect the machine to stay the same machine.","root_material":["domain","profile_schema_version","catalogue_version","chromium_version","fingerprint_platform","seed"],"subset_selection":"optional pack k (in file order, from 0) is included iff (high 64 bits of draw(label, k + 1)) * 100 >> 64 < weight; index 0 of every substream is reserved for the single-selection draw.","weighted_selection":"u64 = high 64 bits of draw(label, 0); index = (u64 * total_weight) >> 64 resolved against cumulative option weights in file order. No modulo, no rejection, no floating point."},"supported_browser_builds":["152.0.7977.83"],"version":2}