nxtask_main.nx
buildroot/runtime/nxtask_main.nx
about
nxtask_main.nx -- CLI driver for the sovereign agent task graph.
Usage:
nxtask demo build + dump sample graph as JSON
nxtask ready build + dump ready-task count
nxtask show N build + show task N's JSON
nxtask save <path> serialize demo graph to <path>
nxtask load <path> deserialize <path> + dump as JSON
nxtask roundtrip <path> save+load e2e smoke test
Once multi-agent merge + durable event log ship (see
docs/NXTASK_AGENT_TASK_GRAPH.md v0.1.0), the CLI will manage a
default store under ~/.nxtask/ so the <path> argument becomes
optional. Today every subcommand takes an explicit path.
When Mormon v0 picks this up, the shape becomes:
run("nxtask load ~/.nxtask/graph.bin | jq '.tasks[] | select(.state==\"open\")'")
let next_task = parse_json(...).id
...do the work...
run("nxtask close " + next_task.id + " 'summary' && nxtask save ~/.nxtask/graph.bin")
Exit codes:
0 success
1 no args
2 unknown subcommand / missing arg
3 I/O failure (open/read/write)
4 malformed input (deserialize failure)
dependencies 4 imports · 0 importers
imports: syscalls.nxjson_emit.nxnxtask.nxnxtask_store.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
| 39 | const STATE_OPEN: i64 = 0 |
| 40 | const STATE_CLAIMED: i64 = 1 |
| 41 | const STATE_CLOSED: i64 = 2 |
functions
| 43 | func state_name(s: i64) -> *u8 {
called by 1: emit_task |
| 50 | func state_name_len(s: i64) -> i64 {
called by 1: emit_task |
| 57 | func emit_task(w: *JsonWriter, t: *Task, idx: i64) -> i64 {
called by 2: emit_graphmain calls 7: json_begin_objectjson_emit_keyjson_emit_intjson_emit_stringstate_namestate_name_len+1 |
| 83 | func emit_graph(w: *JsonWriter, g: *TaskGraph) -> i64 {
called by 1: main calls 7: json_begin_objectjson_emit_keyjson_begin_arraytask_atemit_taskjson_end_array+1 |
| 103 | func build_demo_graph() -> *TaskGraph { |
| 125 | func streq(a: *u8, b: *u8, n: i64) -> i64 {
called by 1: main |
| 136 | func write_out(o: *u8, n: i64) -> i64 {
called by 1: main |
| 142 | func main(argc: i64, argv: *i64) -> i64 { |