Commit Graph

15 Commits

Author SHA1 Message Date
delta-cloud-208e
34868eea72 fix(codex): sync codex_patcher.py with TOML inline-table fix
Mirrors claude_code_patcher@661eced — fixes Windows ucodex_install.ps1
crash 'Error loading config.toml: missing assignment' caused by
toml_value(dict) emitting Python str(dict) instead of TOML syntax.

Existing broken installs: re-run installer or manually delete the bad
section from ~/.codex/config.toml then re-run ucodex_install.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 16:53:52 +00:00
delta-cloud-208e
5525f6009a chore: change codex default reasoning effort from high to xhigh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 22:39:55 +00:00
delta-cloud-208e
df264a42ed fix(codex): remove unused import stat
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:57:18 +00:00
delta-cloud-208e
acd21cbcf0 fix(codex): model_catalog_json pointed to /var/root for all users
Root cause: generate_config_toml() used os.path.expanduser("~") which
always returns root's home under sudo. Every user's config.toml had
model_catalog_json = "/var/root/.codex/model_catalog.json" → Permission denied.

Fix: pass home_dir to generate_config_toml() so each user gets their own path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 18:38:00 +00:00
delta-cloud-208e
1f827cc9d8 fix(codex): replace pwd.getpwall() with directory scan for macOS
macOS Directory Services makes pwd.getpwall() unreliable — regular users
may not be returned. Now scans /Users/* directly on macOS, /home/* on Linux.
Also fixes chown to use actual directory ownership.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 18:28:10 +00:00
delta-cloud-208e
495ce916b3 fix(codex): fix TOML parser double-quoting section keys + add macOS trust paths
- Minimal TOML parser (Python < 3.11 fallback) now strips quotes from section
  keys like [projects."/home"] — prevents double-quoting on re-parse
- Add /Users and /var/root to trust_paths on macOS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:58:17 +00:00
delta-cloud-208e
ab6be896bd fix(codex): patch all users, not just root — add --all flag and fix macOS UID threshold
- Install script now runs patcher with --all to patch every user's ~/.codex/config.toml
- Fix list_users() UID threshold: macOS starts at 500, Linux at 1000
- Fix file ownership: chown config files to the actual user after patching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:54:43 +00:00
delta-cloud-208e
deb1c2cfd2 fix(codex): drop Python 3.11 requirement, auto-install python3
- tomllib fallback: try tomllib (3.11+) -> tomli -> minimal parser
- Works with Python 3.8+ (Ubuntu 20.04, Debian 11, etc.)
- Auto-install python3 if not found (like Gemini/Qwen scripts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:58:16 +00:00
delta-cloud-208e
0e5564732b fix(codex): model_catalog_json with correct Codex internal format
Previous attempt used OpenAI API format (bare array of {id, object}).
Codex expects ModelsResponse format: {"models": [{slug, display_name,
visibility, shell_type, supported_reasoning_levels, ...}]}.

Format reverse-engineered from codex-rs/core/models.json in official repo.
All 4 models (gpt-5.4, gpt-5.3-codex-spark, gpt-5.3-codex, gpt-5.2-codex)
now appear in interactive model picker.

Cleanup logic detects old bare-array format and replaces automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:58:33 +00:00
delta-cloud-208e
60703fc7db fix(codex): auto-cleanup broken model_catalog_json on install/update
All scripts now detect and fix leftover damage from previous installs:
- Remove model_catalog_json from config.toml (crashes Codex on startup)
- Delete stale model_catalog.json file
- Detect broken TOML with dotted key bug
Both PS1 scripts and Python patcher handle cleanup before patching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:50:33 +00:00
delta-cloud-208e
fa07058917 fix(codex): remove model_catalog_json — wrong format crashed Codex
model_catalog_json expects internal Codex ModelsResponse format with
complex ModelInfo structs (slug, display_name, visibility, shell_type,
supported_reasoning_levels, etc.), not simple OpenAI API format.
Removed from all configs to restore working state.

env_key = "OPENAI_API_KEY" fix is preserved (fixes 401 Unauthorized).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:48:31 +00:00
delta-cloud-208e
416720ae51 fix(codex): add env_key to custom provider + model_catalog_json for picker
- Add env_key = "OPENAI_API_KEY" to [model_providers.custom] in PS1 fallback
  templates (fixes 401 Unauthorized on machines without Python 3.11+)
- Add model_catalog_json config + model_catalog.json file generation
  (fixes empty model picker — all 4 models now visible in interactive mode)
- Both fixes applied in: codex_patcher.py, ucodex_install.ps1, ucodex_update.ps1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:43:25 +00:00
delta-cloud-208e
e4da4bdbb0 fix: TOML dotted key bug + PowerShell fallback for all Windows scripts
- codex: add [notice.model_migrations] with quoted keys to prevent
  Codex from writing unquoted dotted keys (gpt-5.4 → gpt-5 → 4)
  which causes "invalid type: map, expected a string" TOML error
- codex_patcher.py: add toml_key() to quote keys with dots,
  handle broken TOML gracefully in read_toml()
- claude install: remove unnecessary Python requirement
- claude update: rewrite as standalone (no git clone dependency)
- gemini update: add Python check with fallback, auth headers
- qwen install: add PowerShell fallback, auth headers, no exit on no Python
- qwen update: add Python check with fallback, auth headers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:26:52 +00:00
delta-cloud-208e
72ac0d75a0 chore: fix file permissions (644 → 755)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 07:46:35 +00:00
delta-cloud-208e
491b2a6854 feat(codex): add Codex CLI patcher — config+env based patching
Codex CLI is a Rust binary — patched via config.toml + env vars.
6 targets: api_endpoint, auth, telemetry, permissions, model, env.
Includes installer, binary updater, config validator, pipeline CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:30:57 +00:00