code wiki / (root) / nx_aimode_read.nx

nx_aimode_read.nx

buildroot/runtime/nx_aimode_read.nx

9071 B175 linesdepth 22pulls 151 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_aimode_read.nx -- CLI for BR50: read a Google AI Mode share link as its answer text. nx_aimode_read <share-url> [out-path] Writes knowledge/fetched/aimode_<id>.answer.txt (or <out-path>): # nx_aimode_read v1 # share_url=<the url the operator pasted -- the CITED url> # final_url=<the /search url the share resolved to> # fetched_at=<epoch> # citations=<N> <blank> <answer text> <blank> ## Citations (<N>) -- the server-rendered /url? beacon references (opaque Google redirect tokens) <one per line> then appends a provenance row prov|<epoch>|<share url>|<mirror>|<sha256>|<bytes>|<hops> to the shared fetch_provenance.jrnl (the CITED url is the SHARE url, never an internal endpoint -- refs-gate contract). Refuses BY NAME: REFUSED-CONSENT-WALL / REFUSED-SIGNIN / REFUSED-NO-ANSWER / REFUSED-EMPTY-BODY (+fetch). license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_aimode_lib.nx nx_sha256.nx nx_atomic_rewrite.nx nx_aimode_read.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_aimode_lib.nxnx_sha256.nxnx_atomic_rewrite.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main pe sys_write sys_exit sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ r_share_id rslen rcat nx_trust_store_load_from_c sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻

structs

none

consts

25const R_CERTCAP: i64 = 4194304
26const R_OUTCAP: i64 = 8388608
27const R_CITECAP: i64 = 262144
28const R_URLCAP: i64 = 16384
29const R_DOCCAP: i64 = 8912896

functions

31func pw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
32func pe(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(2, s, n); return 0 }
called by 1: main calls 1: sys_write
33func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
39func rcat(dst: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 1: main
40func rcatn(dst: *u8, o: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
48func rslen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: r_share_id
51func r_share_id(url: *u8, out: *u8) -> i64
called by 1: main calls 1: rslen
79func r_hex32(dst: *u8, o: i64, digest: *u8) -> i64
called by 1: main
92func main(argc: i64, argv: *i64) -> i64