eval_magic/adapters/codex/
mod.rs1pub mod transcript;
10
11#[cfg(test)]
12mod tests {
13 use crate::adapters::adapter_for;
14 use crate::core::Harness;
15
16 #[test]
17 fn codex_parse_cli_events_delegates_to_events_parser() {
18 use serde_json::json;
19 let dir = tempfile::TempDir::new().unwrap();
20 let path = dir.path().join("codex-events.jsonl");
21 let line = json!({"type": "item.completed", "item": {"id": "i1", "type": "command_execution", "command": "bun test", "output": "ok"}});
22 std::fs::write(&path, format!("{line}\n")).unwrap();
23
24 let inv = adapter_for(Harness::resolve("codex").unwrap())
25 .parse_cli_events(&path)
26 .unwrap();
27 assert_eq!(inv.len(), 1);
28 assert_eq!(inv[0].name, "command_execution");
29 }
30}