Deep analysis of wire protocol transformations, null spaces, and feature deltas across four CLI harness implementations.
This repo documents the novel cross-wiring of LLM API wire protocols between CLI harnesses:
- NetBrah/codex (
apex/messages-wire-dev) — Anthropic/messageswire hooked into OpenAI Codex's Rust harness - NetBrah/qwen-code (
dev) — OpenAI/responseswire (and/messages) hooked into Gemini CLI's TypeScript harness - google/gemini-cli (
main) — Upstream reference, native GeminigenerateContentwire - openai/codex (
main) — Upstream reference, native OpenAI/responseswire
The two novel implementations:
- Codex + /messages: Anthropic models running natively in Codex's Rust harness via the
/messageswire protocol - Qwen-Code + /responses: OpenAI models running in Gemini CLI's fork via the
/responseswire protocol (everything transforms through Google's internal format)
docs/
architecture/
00-system-overview.md # Three-layer model: Models × APIs × Harnesses
01-wire-protocol-matrix.md # Complete mapping of all wire transformations
api-specs/
anthropic-messages.md # /v1/messages wire spec
openai-responses.md # /v1/responses wire spec
gemini-generatecontent.md # v1beta generateContent spec
null-space/
01-gemini-to-messages.md # Null space: Gemini CLI harness → /messages wire
02-gemini-to-responses.md # Null space: Gemini CLI harness → /responses wire
03-codex-native-vs-messages.md # Null space: Codex /responses vs /messages wire
04-cross-layer-invariants.md # Invariants across all three layers
feature-delta/
01-gemini-vs-qwen.md # Features: upstream Gemini CLI ↔ qwen-code
02-codex-harness-additions.md # Features added to codex beyond /messages wire
03-cross-implementation.md # Cross-comparison matrix (all 4)
sortie-board/
SORTIE-BOARD.md # Actionable code ops with priorities
active-sorties.md # In-flight sortie branches
refs/
[source code snapshots] # Key files from all repos for evidence
┌─────────────────────────────────────────────────────────┐
│ LAYER 1: MODELS │
│ Claude Opus/Sonnet │ GPT-4o/o3 │ Gemini Pro │ Qwen │
├─────────────────────────────────────────────────────────┤
│ LAYER 2: WIRE PROTOCOLS (APIs) │
│ /messages │ /responses │ generateContent │
├─────────────────────────────────────────────────────────┤
│ LAYER 3: HARNESSES │
│ Codex (Rust) │ Qwen-Code (TS) │ Gemini CLI (TS) │
└─────────────────────────────────────────────────────────┘
Each cross-wire implementation creates a transformation layer between Layer 2 and Layer 3, introducing potential null spaces where features/data are lost in translation.
| Repo | Branch | Role |
|---|---|---|
| NetBrah/codex | apex/messages-wire-dev |
/messages wire in Rust harness |
| NetBrah/qwen-code | dev |
/responses + /messages in TS harness |
| google-gemini/gemini-cli | main |
Upstream Gemini reference |
| anthropics/* | various | Official Anthropic SDKs & tools |
| Repo | Stars | Language | Purpose |
|---|---|---|---|
| anthropics/skills | 102K | Python | Agent Skills |
| anthropics/claude-code | 82K | Shell | Claude Code CLI |
| anthropics/anthropic-sdk-python | 3K | Python | Python SDK |
| anthropics/anthropic-sdk-typescript | 1.7K | TypeScript | TypeScript SDK |
| anthropics/anthropic-sdk-go | 927 | Go | Go SDK |
| anthropics/anthropic-sdk-ruby | 309 | Ruby | Ruby SDK |
| anthropics/anthropic-sdk-java | 264 | Kotlin | Java SDK |
| anthropics/anthropic-sdk-csharp | 201 | C# | C# SDK |
| anthropics/anthropic-sdk-php | 121 | PHP | PHP SDK |
| anthropics/claude-agent-sdk-python | 5.7K | Python | Agent SDK (Python) |
| anthropics/claude-agent-sdk-typescript | 1K | TypeScript | Agent SDK (TypeScript) |
| anthropics/claude-plugins-official | 14.6K | Python | Official Plugins |
| anthropics/claude-code-action | 6.5K | TypeScript | GitHub Actions |
See individual docs for full analysis. High-level:
- 12 null-space gaps identified across wire transformations
- 23 feature deltas between implementations
- 8 critical sortie items (P0/P1) for immediate action
- 15 portability candidates for cross-pollination between harnesses