Skip to content

liuyaclever900717-del/Codex-remote

Repository files navigation

Codex-remote

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.

Scope

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.

Safety Notes

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.

Setup

python -m pytest tests -q
python -m compileall codex_remote scripts tests

Copy .env.example to .env for local use and replace placeholder paths with your own local paths.

Common Commands

Inspect the current Codex desktop composer:

python -m codex_remote.cli inspect

Enqueue 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-once

Process a v2 delivery contract:

python -m codex_remote.cli enqueue-v2 --contract-json '{...DeliveryContractV2...}'
python -m codex_remote.cli run-once-v2

Start the bridge loop:

powershell -ExecutionPolicy Bypass -File scripts\start_dual_bridge.ps1 -Mode v2

Check bridge status:

powershell -ExecutionPolicy Bypass -File scripts\status_dual_bridge.ps1

Public Data Policy

Examples in this repository are synthetic. Real Feishu/DingTalk ids, Codex session ids, local usernames, account names, reports, and message bodies should not be committed.

About

Public-safe local bridge for refined Feishu/DingTalk events into Codex desktop delivery contracts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors