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/native-training/counter.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 / native-training / counter.om` 77 lines ยท 1342 bytes Raw Blame History 1 om2 2 text lt1 "notes/item" 3 text lt2 ".txt" 4 text lt3 "Task: Read the note and report its value.\nFile: " 5 text lt4 "\nState: unread\nAnswer:\n{\"tool\":\"read_file\",\"path\":\"" 6 text lt5 "\"}" 7 text lt6 "\nState: read\nTool result: value = " 8 text lt7 "\nAnswer:\n" 9 text lt8 "\nState: denied\nTool result: Permission denied.\nAnswer:\nPermission denied." 10 text lt9 "\nState: missing\nTool result: File not found.\nAnswer:\nFile not found." 11 note Emit synthetic tool-call and observation lessons with disjoint numeric identifiers. 12 global term uchar 1 13 global digits uchar 12 14 fn lsout s view uchar * to void 15 r = write 1 s 0 len s 16 if ne r long len s 17 exit 3 18 end 19 end 20 fn lsnum n ulong to void 21 x = n 22 j = ulong 0 23 while gt x 0 bound 12 24 put digits j uchar add 48 rem x 10 25 x = div x 10 26 j = add j 1 27 end 28 for i ulong j 29 r = write 1 digits sub sub j i 1 1 30 if ne r 1 31 exit 3 32 end 33 end 34 end 35 fn lspath n ulong to void 36 lsout lt1 37 lsnum n 38 lsout lt2 39 end 40 fn main to int 41 for i ulong 8192 42 n = add 10000 rem mul div i 8 7919 65521 43 lsout lt3 44 lspath n 45 s = rem i 8 46 v = add 100 rem mul i 7907 900 47 if eq s 2 48 v = add 10 rem mul i 571 90 49 end 50 if eq s 5 51 v = add 1000 rem mul i 7841 9000 52 end 53 if eq s 0 54 lsout lt4 55 lspath n 56 lsout lt5 57 else 58 if lt s 6 59 lsout lt6 60 lsnum v 61 lsout lt7 62 lsnum v 63 else 64 if eq s 2 65 lsout lt8 66 else 67 lsout lt9 68 end 69 end 70 end 71 r = write 1 term 0 1 72 if ne r 1 73 exit 3 74 end 75 end 76 ret 0 77 end