code wiki / _hdl_build / nx_seat_drive.nx
nx_seat_drive.nx
buildroot/runtime/_hdl_build/nx_seat_drive.nx
about
nx_seat_drive.nx -- S2 SEAT-PROTOCOL DRIVER (agent-seat system, 2026-07-20).
Runs the seat lifecycle around a lane-configured work step so a NON-CLAUDE seat
(local maker ensemble, cron, any executor) closes rungs through the same protocol
and gates as a Claude seat: CHECKIN -> WORK -> VERIFY(gate) -> CHECKOUT, with an
append-only journal (fa_appendz, torn-proof) as the resume/standup surface.
Single responsibility: the PROTOCOL. The work itself, its success gate, and the
hub verbs are all LANE CONFIG DATA (no magic behavior, rule 11/22).
argv: <lanefile>
lanefile = KEY=VALUE lines (LF). Required: ws= actor= journal= workelf= workartifact= gateelf=
Optional: workarg1..workarg3, gatearg1..gatearg2, checkinelf= checkinarg1=, checkoutelf= checkoutarg1=
Hub-verb convention: checkin/checkout elfs are invoked as <elf> [argN] <ws> <actor>
so a live wrapper (nx_seat checkin over tools/call) and a fixture both fit.
ARTIFACT-TRUTH (banked law): the work step is judged by its DECLARED artifact
(workartifact unlinked before the run, must exist non-empty after), not only by
wait4 status. A work step that "succeeds" without producing its artifact is REFUSED.
exit: 0 OK | 2 config | 3 checkin-refused (fail-closed) | 4 work-fail | 5 gate-RED
6 artifact-missing | 7 checkout-fail
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 5 imports · 0 importers
imports: nx_seat_drive_lib.nxnx_seg_store.nxnx_deploy_lib.nxnx_framed_append.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 27 | const SD_MAGIC_1048576: i64 = 1048576 |
| 29 | const SD_CONF_CAP: i64 = 65536 |
| 30 | const SD_REC_CAP: i64 = 2048 |
functions
| 33 | func sd_frame(journal: *u8, ws: *u8, actor: *u8, tag: *u8, rcflag: i64, rc: i64) -> i64 |
| 52 | func main(argc: i64, argv: *i64) -> i64 |