[codex] Add Flash 3.1 Lite mobile harness for Telegram#5
Draft
JamesFincher wants to merge 5 commits intodicnunz:mainfrom
Draft
[codex] Add Flash 3.1 Lite mobile harness for Telegram#5JamesFincher wants to merge 5 commits intodicnunz:mainfrom
JamesFincher wants to merge 5 commits intodicnunz:mainfrom
Conversation
Owner
|
Parking this until the core Mission Control install path has more real-user feedback. The Gemini/queue/terminal/file-transfer scope is useful, but it widens the product before the current lane/approval/Relay core has enough installs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR turns Codex Relay into a stronger phone-first mobile harness for a local Mac Codex install, with the Gemini layer centered on the Flash 3.1 Lite model (
gemini-3.1-flash-lite-preview).The headline path is now: install the relay once, then send
/gemini key YOUR_GEMINI_API_KEYfrom Telegram. The relay saves the key privately, enables Gemini natural command routing and reply polish, reloads the running process immediately, and best-effort deletes the Telegram message containing the key. No Mac-side editor, restart, or manual.envedit is required after the first LaunchAgent install.What changed
Added Telegram-side Gemini setup:
/gemini key ...accepts a Gemini API key from Telegram./gemini on,/gemini off, and/gemini clearmanage the feature later.Made startup/runtime config support zero-intervention mobile enablement:
scripts/configure.pynow writes Gemini defaults during install.scripts/install_launch_agent.shnow copies the repo path into runtime config and seeds Gemini defaults into the LaunchAgent runtime.envwhile preserving explicit user choices..env, and to the repo.envwhen available, so/gemini key ...survives restarts.gemini-3.1-flash-lite-preview, max output tokens=4096, timeout, and error notices.Expanded the Telegram mobile harness:
/queue,/forget,/forgetphotos, and Gemini-planned queue edits./activityfor running jobs, pending work, terminals, and recent safe history./thinkto change Codex thinking mode per Telegram thread./terminalsessions for explicit terminal work from Telegram./filefor sending safe local files back to Telegram./recoverplusscripts/recover.shfor local self-repair checks.Improved mobile reliability and operator feedback:
/status,/health, doctor, and local status UI output.CODEX_BINpath.Updated docs:
PHONE_REMOTE.mdnow document the Flash 3.1 Lite mobile harness path./gemini key YOUR_GEMINI_API_KEY..env.exampleincludes the new runtime, queue, terminal, file transfer, polling, image, thinking-mode, and Gemini defaults.Why
The previous Gemini setup still assumed the user could edit local config or restart from the Mac. That breaks the actual phone-first use case: someone installs the LaunchAgent, leaves the Mac alone, and wants to enable the natural-language mobile harness later from Telegram.
This PR makes the Gemini token submission and feature enablement part of the Telegram control surface itself. The slash-command layer still works without Gemini; Flash 3.1 Lite only adds natural-language planning and phone-readable answer polish on top of the same relay actions.
Security and privacy notes
.envcontent, API tokens, private keys, and similar values bypass Gemini planning/polish guards./fileblocks obvious secret/runtime paths by default..env, bot token, runtime state, private logs, screenshots, or transcripts are committed.Validation
python3 -m py_compile codex_relay.py scripts/configure.pyPYTHONPATH=. python3 scripts/smoke_test.pyzsh -n scripts/install.sh scripts/install_launch_agent.sh scripts/doctor.sh scripts/recover.sh scripts/status.sh scripts/status_ui.sh scripts/update.shgit diff --checkpython3 codex_relay.py --check-configThe local check-config path reported Telegram and Gemini configured without printing secret values, and confirmed the Flash 3.1 Lite model plus natural commands and polish enabled.