Commit ad9ea52
authored
feat(adapters): add Codex engine adapter with app-server JSON-RPC protocol (#412)
## Summary
- CodexAdapter implementing AgentAdapter protocol with bidirectional JSON-RPC over stdio
- Full 4-step handshake, turn streaming with event routing, auto-approval (configurable)
- Timeout enforcement via selectors (turn, read, stall — no blocking readline deadlocks)
- Token usage tracking, sandbox_mode forwarding, git-based modified file detection
- Registered in engine_registry, CLI help text updated, OPENAI_API_KEY validator added
- Shared git_utils.detect_modified_files() extracted from duplicated code
## Validation
- Review feedback: All addressed (3 rounds — code reviewer, CodeRabbit, claude-review)
- Demo: All 8 acceptance criteria verified
- Tests: 24 unit tests, 1681 total core tests passing
- CI: All checks green (Backend Tests, Lint, GitGuardian, claude-review, CodeRabbit)
- Linting: Clean
Closes #4121 parent 81fe3fc commit ad9ea52
8 files changed
Lines changed: 887 additions & 42 deletions
File tree
- codeframe
- cli
- core
- adapters
- tests/core/adapters
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1998 | 1998 | | |
1999 | 1999 | | |
2000 | 2000 | | |
2001 | | - | |
| 2001 | + | |
2002 | 2002 | | |
2003 | 2003 | | |
2004 | 2004 | | |
| |||
2059 | 2059 | | |
2060 | 2060 | | |
2061 | 2061 | | |
2062 | | - | |
2063 | 2062 | | |
2064 | 2063 | | |
2065 | | - | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2066 | 2068 | | |
2067 | 2069 | | |
2068 | 2070 | | |
| |||
2888 | 2890 | | |
2889 | 2891 | | |
2890 | 2892 | | |
2891 | | - | |
| 2893 | + | |
2892 | 2894 | | |
2893 | 2895 | | |
2894 | 2896 | | |
| |||
2989 | 2991 | | |
2990 | 2992 | | |
2991 | 2993 | | |
2992 | | - | |
2993 | 2994 | | |
2994 | | - | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
2995 | 2999 | | |
2996 | 3000 | | |
2997 | 3001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
0 commit comments