code wiki / _hdl_build / nx_worklog_lib.nx

nx_worklog_lib.nx

buildroot/runtime/_hdl_build/nx_worklog_lib.nx

1918 B34 linesdepth 3pulls 3 transitivereach 7 importersview sourcekind librarytopic worklog
docsdependenciesstructsconstsfunctions

about

nx_worklog_lib.nx -- LIVE WORK-JOURNAL primitive (the "running logs of our work, as it goes"). ONE framed, flock-atomic, crash-durable line per action, built on the WMS-R0 fa_appendz floor (one-buffer-one-locked-write -> a concurrent appender can NEVER tear a line). This is the sovereign capture layer: invoked per-action by a silent PostToolUse hook, AND by the redundant transcript ingestor -- both write through THIS, so all paths share one durable, append-only log. Line schema (TAB-separated): <epoch>\t<event>\t<tool>\t<target> event = pre|post|ingest|turn tool = Edit|Write|Bash|... target = file/command/summary Sovereign: nx_framed_append + nx_syscalls only. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_framed_append.nx nx_syscalls.nx nx_worklog_lib.nx nx_worklog_append.nx nx_worklog_append_gate.nx nx_worklog_ingest_lib.nx

imports: nx_framed_append.nxnx_syscalls.nx

imported by: nx_worklog_append.nxnx_worklog_append_gate.nxnx_worklog_ingest_lib.nx

structs

none

consts

12const WL_DIR: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory/worklog"
13const WL_PATH: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory/worklog/worklog.tsv"
14const WL_CAP: i64 = 8192 // bounded record size (fa_appendz cap)

functions

17func wl_append3_t(path: *u8, epoch: i64, event: *u8, tool: *u8, target: *u8) -> i64
29func wl_append3(path: *u8, event: *u8, tool: *u8, target: *u8) -> i64
34func wl_ensure_dir(dir: *u8) -> i64 { sys_mkdir(dir, 511); return 0 }
called by 3: mainmainwli_capture calls 1: sys_mkdir