hax 0.4.0-2
“Minimalist, terminal-native coding agent written in C”
AArch64 (ARM64) architecture stringBasename is uppercase README.md
SHA-2563a9661f4e58930ae84e12e41c9260389744eb2dcdf0ae798b3de69361f233603
MaleculeH₂(Cm₂Os)Md(Pa)
Evidence
1#!/usr/bin/env python3
2"""Live footprint monitor for coding agents: private memory and CPU per process tree.
3
4Discovers processes whose executable name matches a watch list (hax and well-known …
23:69… e of the agent under test.
24"""
25
26from __future__ import annotations
27
28import argparse
29import ctypes
30import math
31import os
32import select
33import signal
34import subprocess
35import sys
36import termios
37import time
38import tty
39from collections import defaultdict
40from collections.abc import Callable
41from dataclasses import dataclass
42from typing import Final
43
44signal.signal(signal.SIGPIPE, signal.SIG_DFL)
45
46DEFAULT_WATCH: Final[tuple[str, ...]] = (
⋯7 lines
112:43… dict[int, Proc]], Callable[[int], Metrics | None]]:
113 libc = ctypes.CDLL(None, use_errno=True)
114 timebase = MachTimebase()
115 libc.mach_timebase_info(ctypes.byref(timebase))
116 # rusage_info times …
117:53… 1e9
118
119 def ps_lines(columns: str) -> list[str]:
120 out = subprocess.run(
121 ["ps", "-axww", "-o", columns], capture_output=True, text=True, check=True
122 )
123 return out.stdout.splitlines()
124
125 def processes() -> dict[int, Proc]:
⋯4 lines
164:43… int, float, float] | None:
165 try:
166 with open(f"/proc/{pid}/stat") as f:
167 data = f.read()
168 except OSError:
169 return None
170 # comm may contain spaces and parenthes …
No evidence locations were recorded for this file. Raw result