MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / count_codex_tools

Function count_codex_tools

eval/hermetic/score.py:177–202  ·  view source on GitHub ↗
(jsonl_path: Path)

Source from the content-addressed store, hash-verified

175
176
177def count_codex_tools(jsonl_path: Path) -> tuple[list[str], list[str], list[str]]:
178 td: list[str] = []
179 native: list[str] = []
180 commands: list[str] = []
181 try:
182 lines = jsonl_path.read_text().splitlines()
183 except OSError:
184 return td, native, commands
185
186 tools: list[str] = []
187 for ln in lines:
188 ln = ln.strip()
189 if not ln:
190 continue
191 try:
192 event = json.loads(ln)
193 except json.JSONDecodeError:
194 continue
195 collect_codex_evidence(event, tools, commands)
196
197 for name in tools:
198 if is_tracedecay_tool(name):
199 td.append(name)
200 else:
201 native.append(name)
202 return td, native, commands
203
204
205def cli_alias_text(value: str) -> str:

Callers 1

mainFunction · 0.85

Calls 2

collect_codex_evidenceFunction · 0.85
is_tracedecay_toolFunction · 0.70

Tested by

no test coverage detected