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/pilot/tool_cycles.py # 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 / pilot / tool_cycles.py` 31 lines ยท 1560 bytes Raw Blame History 1 """External measuring instrument for three complete fixture-only tool cycles.""" 2 from pathlib import Path 3 import json,subprocess,os 4 R=Path(__file__).parent 5 assert os.environ.get('SPARK_WINDOW') 6 ck=json.loads((R/'selection.json').read_text())['selected']['checkpoint'] 7 merges='$HOME/handoffs/omega-llm-`20261101`/v1-data/merges4096.bin' 8 fix=R/'cycle-fixtures/notes';fix.mkdir(parents=True,exist_ok=True) 9 def gen(prompt): 10 p=subprocess.run([str(R/'build/sample'),ck,'100',prompt,merges],capture_output=True,timeout=90) 11 assert p.returncode==0,p.stderr 12 return p.stdout.decode().split('\nDone.')[0].strip() 13 rows=[] 14 for n in (180,183,199): 15 rel=f'notes/item{n}.txt' 16 content=f'message{n}' 17 (fix/f'item{n}.txt').write_text(content) 18 request=gen(f'Task: Read {rel}. Use a tool.\nAnswer:\n') 19 row={'file':rel,'request_output':request,'request_ok':False,'report_ok':False} 20 try:d=json.loads(request) 21 except Exception:d=None 22 if d=={'tool':'read_file','path':rel}: 23 row['request_ok']=True 24 observed=(R/'cycle-fixtures'/d['path']).read_text() 25 row['observed_tool_result']=observed 26 row['report_output']=gen(f'Task: The read_file tool returned: {observed}. Report its result.\nAnswer:\n') 27 row['report_ok']=row['report_output']==f'The file contains: {observed}.' 28 rows.append(row) 29 result={'rows':rows,'pass':sum(x['request_ok'] and x['report_ok'] for x in rows),'total':len(rows),'fixture_only':True} 30 (R/'tool-cycles.json').write_text(json.dumps(result,indent=2)) 31 print(json.dumps(result),flush=True)