code wiki / (root) / nx_legal_svc.nx

nx_legal_svc.nx

buildroot/runtime/nx_legal_svc.nx

24647 B474 linesdepth 8pulls 27 transitivereach 0 importersview sourcekind tooltopic legal
docsdependenciesstructsconstsfunctions

about

nx_legal_svc.nx -- LEGAL SERVICE FACADE. One agentic MCP tool over the sovereign legal-calc stack. The legal counterpart to nx_finance_svc: one verb-dispatched JSON tool over the exact legal-computation modules (nx_sol statute-of-limitations, nx_damages prejudgment interest), inheriting the envelope, the structured errors and the self-description from nx_service. No new domain logic -- every value comes from a gate-proven module. agentic-ready: `describe` emits the verb catalog (tools/list analog). workflow-ready: verbs COMPOSE -- sol.deadline emits a day number that sol.assess consumes; damages.days emits a day count that damages.simple consumes. A pipeline chains them with no shared state. fail-closed: a judgment date before accrual (422 REFUSED), a non-positive limitations period or negative input (400 BAD_ARGS) -- never a fabricated deadline or interest figure. USAGE: nx_legal_svc <verb> [args...] genealogy_id: legal_calc + service_infrastructure

dependencies 16 imports · 0 importers

nx_syscalls.nx nx_service.nx nx_grounding.nx nx_sol_lib.nx nx_damages_lib.nx nx_esign_lib.nx nx_ltv_lib.nx nx_hold_lib.nx nx_privlog_lib.nx nx_obligation_lib.nx nx_legal_svc.nx

diagram shows first 10 each side; +6 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_service.nxnx_grounding.nxnx_sol_lib.nxnx_damages_lib.nxnx_esign_lib.nxnx_ltv_lib.nxnx_hold_lib.nxnx_privlog_lib.nxnx_obligation_lib.nxnx_ledes_lib.nxnx_ipdock_lib.nxnx_privacy_lib.nxnx_efile_lib.nxnx_captable_lib.nxnx_clause_lib.nx

imported by: nobody (leaf or entry point)

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

main nx_json_new sys_mmap nsvc_arg nsvc_streq leg_describe nsvc_ok_open nj_putc nj_kv_int nj_key nj_putstr nj_putc ↻ nj_putc ↻ nj_puti nj_putc ↻ sys_mmap ↻ nj_comma nj_putc ↻ nj_kv_str nj_key ↻ nj_putstr ↻ nj_kv_bool nj_key ↻ nj_puts nj_putc ↻ nj_key ↻ nj_kv_str ↻ nj_comma ↻ nj_kv_int ↻ nj_kv_bool ↻ nj_key ↻ nj_puts ↻ nsvc_ok_close_g nsvc_ground nj_comma ↻ nj_kv_str ↻ gnd_name nj_kv_bool ↻ gnd_is_verified gnd_meaning

structs

none

consts

34const LEG_MAGIC_8192: i64 = 8192
36const LEG_SVC: *u8 = "legal" as *u8

functions

39func leg_describe(j: *NxJson) -> i64
60func leg_sol_deadline(j: *NxJson, y: i64, m: i64, d: i64, years: i64, tolled: i64) -> i64
73func leg_sol_assess(j: *NxJson, deadline: i64, ay: i64, am: i64, ad: i64) -> i64
86func leg_damages_days(j: *NxJson, y1: i64, m1: i64, d1: i64, y2: i64, m2: i64, d2: i64) -> i64
99func leg_damages_simple(j: *NxJson, principal: i64, annual_bp: i64, days: i64) -> i64
114func leg_damages_compound(j: *NxJson, principal: i64, annual_bp: i64, years: i64) -> i64
129func leg_esign_validity(j: *NxJson, intent: i64, consent: i64, assoc: i64, retention: i64, is_consumer: i64, paper: i64, withdrawal: i64, hwsw: i64, access: i64) -> i64
148func leg_esign_tier(j: *NxJson, sig_data: i64, unique: i64, sigid: i64, sole: i64, tamper: i64, qscd: i64, qcert: i64) -> i64
165func leg_ltv_verify(j: *NxJson, sa: i64, sc: i64, ts: i64, ch: i64, rv: i64, ar: i64, revoked: i64, asof: i64, expiry: i64) -> i64
187func leg_hold_sanction(j: *NxJson, lost: i64, steps: i64, restorable: i64, intent: i64) -> i64
200func leg_hold_defensible(j: *NxJson, duty_attached: i64, notice: i64, unacked: i64, unsuspended: i64) -> i64
210func leg_priv_assert(j: *NxJson, comm: i64, rel: i64, advice: i64, conf: i64, waived: i64) -> i64
220func leg_priv_waiver(j: *NxJson, disclosed: i64, common_interest: i64, inadvertent: i64, steps: i64, prompt: i64) -> i64
228func leg_obl_status(j: *NxJson, due: i64, asof: i64, satisfied: i64, waived: i64, notice_day: i64, cure_days: i64) -> i64
245func leg_obl_portfolio(j: *NxJson, overdue: i64, breach: i64, unknown: i64) -> i64
255func leg_ledes_check(j: *NxJson, task: i64, act: i64, task_count: i64, hours_hundredths: i64, rate_cents: i64, cap_cents: i64, billable: i64) -> i64
272func leg_ip_deadline(j: *NxJson, anchor: i64, period_days: i64, asof: i64, grace_days: i64) -> i64
291func leg_privacy_breach(j: *NxJson, aware_hour: i64, reported_hour: i64, personal: i64, risk: i64, high_risk: i64, encrypted: i64) -> i64
308func leg_privacy_dsar(j: *NxJson, received: i64, regime_ccpa: i64, ext_claimed: i64, ext_notice_day: i64, responded: i64) -> i64
322func leg_efile_status(j: *NxJson, submitted: i64, accepted: i64, rejected: i64, deadline: i64, relation_back: i64, cure_days: i64) -> i64
339func leg_captable_check(j: *NxJson, authorized: i64, issued: i64, treasury: i64, granted: i64, available: i64, warrants: i64, convertibles: i64, held: i64) -> i64
359func leg_clause_review(j: *NxJson, draft: *u8, standard: *u8, criticality: i64) -> i64
381func main(argc: i64, argv: *i64) -> i64