Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-tool-model/blob/main/deployment/fast/transport.om # omega-tool-model First-party Omega tool-use model source, serving harnesses, and verification records Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-tool-model / deployment / fast / transport.om` 82 lines ยท 1386 bytes Raw Blame History 1 note Private local protocol. No model-generated bytes are executed. 2 global naddr uchar 110 3 global nbuf uchar 8192 4 global nfd int 1 5 global nerr ulong 1 6 text nsock "$HOME/.local/share/omega-tool-model/run/model.sock" 7 text nlock "$HOME/.local/share/omega-tool-model/run/model.lock" 8 9 fn naddress to void 10 put naddr 0 1 11 for i ulong len nsock 12 put naddr add i 2 get nsock i 13 end 14 end 15 16 fn nreceive off ulong n ulong timeout long to bool 17 p = ulong 0 18 deadline = add monons timeout 19 while lt p n bound 8192 20 left = sub deadline monons 21 if le left 0 22 ret false 23 end 24 r = waitio get nfd 0 1 left 25 if le r 0 26 ret false 27 end 28 r = recv get nfd 0 nbuf add off p sub n p 64 29 if eq r neg long 11 30 continue 31 end 32 if le r 0 33 ret false 34 end 35 p = add p ulong r 36 end 37 ret true 38 end 39 40 fn nsend off ulong n ulong to bool 41 p = ulong 0 42 deadline = add monons long `2000000000` 43 while lt p n bound 8192 44 left = sub deadline monons 45 if le left 0 46 ret false 47 end 48 r = waitio get nfd 0 4 left 49 if le r 0 50 ret false 51 end 52 r = send get nfd 0 nbuf add off p sub n p 64 53 if eq r neg long 11 54 continue 55 end 56 if le r 0 57 ret false 58 end 59 p = add p ulong r 60 end 61 ret true 62 end 63 64 fn nlength to ulong 65 ret add ulong get nbuf 0 mul ulong get nbuf 1 256 66 end 67 68 fn nheader n ulong to void 69 put nbuf 0 uchar and n 255 70 put nbuf 1 uchar and shr n 8 255 71 end 72 73 fn nstatus code ulong to void 74 if eq code 0 75 nheader 0 76 r = nsend 0 2 77 else 78 nheader 65535 79 put nbuf 2 uchar code 80 r = nsend 0 3 81 end 82 end