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/final.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 / final.om` 220 lines ยท 2885 bytes Raw Blame History 1 note Two unseen real fixture reads. Count the first request, the isolated result reply and the complete cycle separately. 2 text qhead "Task: Read the note and report its value.\nFile: " 3 text q1 "notes/item97233.txt" 4 text q2 "notes/item97984.txt" 5 text ask "\nState: unread\nAnswer:\n" 6 text result "\nState: read\nTool result: value = " 7 text answer "\nAnswer:\n" 8 text req1 "{\"tool\":\"read_file\",\"path\":\"notes/item97233.txt\"}" 9 text req2 "{\"tool\":\"read_file\",\"path\":\"notes/item97984.txt\"}" 10 text denied "\nState: denied\nTool result: Permission denied.\nAnswer:\n" 11 text noauth "Permission denied." 12 text missing "\nState: missing\nTool result: File not found.\nAnswer:\n" 13 text nofile "File not found." 14 global qdata uchar 3 15 fn qlen t ulong to ulong 16 if eq t 0 17 ret len qhead 18 end 19 if eq t 1 20 ret len q1 21 end 22 if eq t 2 23 ret len q2 24 end 25 if eq t 3 26 ret len ask 27 end 28 if eq t 4 29 ret len result 30 end 31 if eq t 5 32 ret len answer 33 end 34 if eq t 6 35 ret len req1 36 end 37 if eq t 7 38 ret len req2 39 end 40 if eq t 8 41 ret len denied 42 end 43 if eq t 9 44 ret len noauth 45 end 46 if eq t 10 47 ret len missing 48 end 49 if eq t 11 50 ret len nofile 51 end 52 if eq t 12 53 ret len qdata 54 end 55 exit 77 56 end 57 fn qbyte t ulong i ulong to uchar 58 if eq t 0 59 ret get qhead i 60 end 61 if eq t 1 62 ret get q1 i 63 end 64 if eq t 2 65 ret get q2 i 66 end 67 if eq t 3 68 ret get ask i 69 end 70 if eq t 4 71 ret get result i 72 end 73 if eq t 5 74 ret get answer i 75 end 76 if eq t 6 77 ret get req1 i 78 end 79 if eq t 7 80 ret get req2 i 81 end 82 if eq t 8 83 ret get denied i 84 end 85 if eq t 9 86 ret get noauth i 87 end 88 if eq t 10 89 ret get missing i 90 end 91 if eq t 11 92 ret get nofile i 93 end 94 if eq t 12 95 ret get qdata i 96 end 97 exit 77 98 end 99 fn qadd s ulong to void 100 n = get icount 0 101 for i ulong qlen s 102 put iprom add n i qbyte s i 103 end 104 put icount 0 add n qlen s 105 end 106 fn qmake p ulong to void 107 put icount 0 0 108 qadd 0 109 qadd p 110 end 111 fn qinfer to void 112 put og 9 0 113 ocpush 0 114 n = obprompt 3 115 for i ulong n 116 ocpush get obtk i 117 end 118 put oon 0 0 119 for j ulong 64 120 c = gsnext 121 if eq c 0 122 ret 123 end 124 obtput c 125 ocpush c 126 end 127 end 128 fn qeq s ulong to bool 129 if ne get oon 0 qlen s 130 ret false 131 end 132 for i ulong qlen s 133 if ne get oout i qbyte s i 134 ret false 135 end 136 end 137 ret true 138 end 139 fn qcase p ulong want ulong to void 140 qmake p 141 qadd 3 142 qinfer 143 asked = qeq want 144 if not asked 145 put oon 0 0 146 oputc 82 147 oputc 32 148 oputc 48 149 oputc 32 150 oputc 48 151 oputc 10 152 oflush 153 ret 154 end 155 fd = long 0 156 if eq p 1 157 fd = fopen q1 0 len q1 0 0 158 else 159 fd = fopen q2 0 len q2 0 0 160 end 161 if lt fd 0 162 exit 71 163 end 164 r = read int fd qdata 0 len qdata 165 cl = fclose int fd 166 if ne r 3 167 exit 72 168 end 169 qmake p 170 qadd 4 171 qadd 12 172 qadd 5 173 qinfer 174 got = qeq 12 175 put oon 0 0 176 oputc 82 177 oputc 32 178 if asked 179 oputc 49 180 else 181 oputc 48 182 end 183 oputc 32 184 if got 185 oputc 49 186 else 187 oputc 48 188 end 189 oputc 10 190 oflush 191 end 192 fn qstate st ulong expected ulong to void 193 qmake 1 194 qadd st 195 qinfer 196 ok = qeq expected 197 put oon 0 0 198 oputc 83 199 oputc 32 200 if ok 201 oputc 49 202 else 203 oputc 48 204 end 205 oputc 10 206 oflush 207 end 208 fn main to int 209 ockload 1 210 put og 6 1 211 obload 4 get og 0 212 ggopen 213 ggupw 214 qcase 1 6 215 qcase 2 7 216 qstate 8 9 217 qstate 10 11 218 r = nvstop 219 ret 0 220 end