Codex-remote is a local bridge that turns refined Feishu or DingTalk reply events into guarded delivery contracts for a native Codex desktop session.
The project focuses on fail-closed delivery:
- parse a structured
DeliveryContractV2; - validate source, binding, target window, route, risk, and policy;
- draft into the Codex composer only after the target is verified;
- optionally submit after readback and post-send verification;
- write redacted local results for the upstream publisher.
Included:
- local queue processing for v1 and v2 events;
- Hermes-style Feishu/DingTalk adapter helpers;
- Codex desktop target resolution through a local DevTools endpoint;
- safe draft/autosend policy;
- remote-custody package helpers;
- session-end notification and review-loop helpers;
- tests covering contracts, routing, queue behavior, notification payloads, and Windows supervisor scripts.
Not included:
- credentials or platform authorization material;
- real event archives, reports, logs, screenshots, or chat transcripts;
- any live Hermes gateway code;
- production deployment state.
Runtime inputs can contain private message text and local session details. Keep these files local:
.env.local/reports/events/**/*.json- platform CLI credentials
The repository only tracks queue directory placeholders.
python -m pytest tests -q
python -m compileall codex_remote scripts testsCopy .env.example to .env for local use and replace placeholder paths with your own local paths.
Inspect the current Codex desktop composer:
python -m codex_remote.cli inspectEnqueue and process a local dry-run event:
python -m codex_remote.cli enqueue --task-id TASK-001 --thread-hint "Codex" --reply-text "Continue" --expected-title Codex
python -m codex_remote.cli run-onceProcess a v2 delivery contract:
python -m codex_remote.cli enqueue-v2 --contract-json '{...DeliveryContractV2...}'
python -m codex_remote.cli run-once-v2Start the bridge loop:
powershell -ExecutionPolicy Bypass -File scripts\start_dual_bridge.ps1 -Mode v2Check bridge status:
powershell -ExecutionPolicy Bypass -File scripts\status_dual_bridge.ps1Examples in this repository are synthetic. Real Feishu/DingTalk ids, Codex session ids, local usernames, account names, reports, and message bodies should not be committed.