(jsonl_path: Path)
| 175 | |
| 176 | |
| 177 | def 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 | |
| 205 | def cli_alias_text(value: str) -> str: |
no test coverage detected