interplane.Get Omega
Read in your language

omega-tool-model

First-party Omega tool-use model source, serving harnesses, and verification records

Brought by drakestapleton

branch main Branches Tags History

omega-tool-model / native-training / counter.om

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