code wiki / _hdl_build / nx_worklog_ingest.nx

nx_worklog_ingest.nx

buildroot/runtime/_hdl_build/nx_worklog_ingest.nx

1321 B21 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic worklog
docsdependenciesstructsconstsfunctions

about

nx_worklog_ingest.nx -- thin work-journal capture runner over the shared wli_capture entry point. Three trigger modes, all idempotent via the per-transcript cursor (zero duplicate lines): 1. hook stdin JSON -> reads "transcript_path" (Windows path auto-translated to WSL), ingests. 2. explicit arg -> nx_worklog_ingest <transcript_path> (manual / a cron with a path). 3. no input at all -> cron fallback: ingest the NEWEST *.jsonl in the project dir. SILENT BY DESIGN: never writes stdout, so a hook injects nothing into the model context = zero tokens. Degrades gracefully (no transcript yet -> exit 0, nothing logged). Sovereign. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_worklog_ingest_lib.nx nx_worklog_ingest.nx

imports: nx_syscalls.nxnx_worklog_ingest_lib.nx

imported by: nobody (leaf or entry point)

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

main wli_capture wl_ensure_dir sys_mkdir sys_mkdir ↻ sys_mmap wli_winpath_to_wsl jx_len wli_cat sys_read jx_get_str jx_len ↻ sys_mmap ↻ jx_find jx_len ↻ jx_copy_str wli_newest_transcript sys_openat_rd sys_mmap ↻ wli_is_jsonl jx_len ↻ wli_cat ↻ sys_fstatat sys_close wli_default_cursor jx_len ↻ wli_cat ↻ wli_ingest wli_read_cursor sys_openat_rd ↻ sys_mmap ↻ sys_read ↻ sys_close ↻ sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read ↻ sys_close ↻ jx_len ↻ jx_find ↻

structs

none

consts

12const WLI_PROJDIR: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder"
13const WLI_CURSORS: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory/worklog/cursors"

functions

15func main(argc: i64, argv: *i64) -> i64