code wiki / (root) / nx_fetch_rights.nx

nx_fetch_rights.nx

buildroot/runtime/nx_fetch_rights.nx

3372 B107 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic fetch
docsdependenciesstructsconstsfunctions

about

nx_fetch_rights.nx -- rights-status policy for acquisition, modelled on how modern search engines treat content. Four statuses: CRAWLABLE unknown rights, public -> may index (robots/ToS-respecting), like Google/Bing; NOT usable in our products. BLOCKED rights NOT available (Getty, DMCA-flagged) -> never fetch/index. OWNED licensed talent/partner -> full product use. TO_ACQUIRE flagged: we want to license -> may index, NOT product-usable yet, and pursue the agent/contact to make an offer. Unknown host defaults to CRAWLABLE. This is the policy layer; the fetcher (nx_crawl_https) checks nx_fr_may_index AND robots.txt before fetching, and only OWNED content is used in products. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_fetch_rights.nx nx_fetch_rights_gate.nx nx_offer_ledger_gate.nx

imports: nx_syscalls.nx

imported by: nx_fetch_rights_gate.nxnx_offer_ledger_gate.nx

structs

26struct NxFrEntry
31struct NxFrPolicy

consts

17const NX_MAGIC_1469598103934665603: i64 = 1469598103934665603
18const NX_MAGIC_1099511628211: i64 = 1099511628211
20const NX_FR_CRAWLABLE: i64 = 0
21const NX_FR_BLOCKED: i64 = 1
22const NX_FR_OWNED: i64 = 2
23const NX_FR_TO_ACQUIRE: i64 = 3
24const NX_FR_N: i64 = 4
37const NX_FR_ENTRY_BYTES: i64 = 16

functions

40func _fr_hash(host: *u8) -> i64
53func nx_fr_new(capacity: i64) -> *NxFrPolicy
called by 2: mainmain calls 1: sys_mmap
61func _fr_at(p: *NxFrPolicy, i: i64) -> *NxFrEntry
66func nx_fr_set(p: *NxFrPolicy, host: *u8, status: i64) -> i64
called by 2: mainmain calls 2: _fr_at_fr_hash
79func nx_fr_classify(p: *NxFrPolicy, host: *u8) -> i64
called by 2: mainmain calls 2: _fr_hash_fr_at
92func nx_fr_may_index(status: i64) -> i64
called by 1: main
98func nx_fr_may_use_in_product(status: i64) -> i64
called by 2: mainmain
104func nx_fr_is_to_acquire(status: i64) -> i64
called by 1: main