Commit Graph

13 Commits

Author SHA1 Message Date
delta-cloud-208e
06057f864b fix(installers): 8 critical bugs from gpt-5.5 + glm-5.1 audit (Item 17)
Sub-agents reviewed all 26 installer scripts. Fixed (TDD):

BLOCKERS (install fails on platform):
1. claude/uclaude_uninstall.sh: replace `sed -i` → portable `sedi()` helper
   (BSD sed on macOS requires `-i ''`, GNU uses `-i`). Same fix style as
   codex/ucodex_install.sh:sedi.
2. claude/uclaude_install.ps1: abort if $apiKey null after fetch attempt
   (was silently completing install with broken auth env vars). Guard
   added to all 8 ps1 scripts.
3. qwen/uqwen_install.ps1 + uqwen_update.ps1: build trustedFolders.json
   via [ordered]@{} | ConvertTo-Json (PowerShell single-quoted literal
   was preserving `\"` as backslash+quote, producing INVALID JSON).
4. codex/ucodex_update.ps1: check $LASTEXITCODE after Python patcher call
   (native command non-zero exit doesn't throw under
   ErrorActionPreference='Continue' — patcher failure was silent, no
   PowerShell fallback triggered).

HIGH (wrong behavior / regressions):
5. gemini/ugemini_install.ps1 + update.ps1: read $env:UGEMINI_API_KEY
   FIRST (was only checking $env:UCLAUDE_API_KEY — claude variable).
6. gemini/ugemini_update.ps1: download gemini_config.json from PRIVATE
   unlimitedcoding-config (was downloading from public — would 404 after
   Item 14 sanitization).
7. claude/uclaude_update.ps1: drop ANTHROPIC_API_KEY assignment + dynamic
   models fetch (regression — install.ps1 was fixed earlier but update.ps1
   still set both env vars, re-introducing Auth conflict warning).
8. codex/ucodex_install.sh + update.sh: GitHub API curl needs
   `-H "User-Agent: UnlimitedCoding-Installer"` and `-f` flag (default
   curl/X.Y UA gets 403 from GitHub API + silent fail on 5xx).

Bonus fixes pulled in:
- codex/ucodex_install.ps1: switch codex_config download URL to private
  repo (consistency with update.ps1 + Item 14 sanitization)
- codex/ucodex_install.ps1: add `--all` flag to patcher invocation
  (matched between install + update)

Tests: tests/test_installer_bugs_audit.py — 9 GREEN regression guards.
Total: 186 tests GREEN.

Audit transcripts: gpt-5.5 found 24 issues (claude+gemini), glm-5.1
found 11 issues (codex+qwen). Lower-priority items (heredoc unsafe
quoting, lock files, schema validation) deferred to next iteration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 17:16:43 +00:00
delta-cloud-208e
8924b75e91 SECURITY: redact api_key from public repo (Variant B)
CRITICAL: api_key 'ClauderAPI2' was committed to PUBLIC unlimitedcoding
repo (private:False on gitea) in 4 *_config.json + 8 ps1 scripts. Anyone
on the internet could read it via curl with no auth (HTTP 200 raw access).

This commit:
1. Sanitizes 4 *_config.json: api_key → "YOUR_API_KEY" + _note pointing
   users to private config repo for production credentials.
2. Removes 'ClauderAPI2' literal from 8 ps1 installer/updater scripts
   (claude/codex/gemini/qwen × install/update). Each script now has a
   sanitized block at top that fetches api_key from private
   unlimitedcoding-config repo at runtime via Authorization token.
3. Switches 6 sh installer scripts from public REPO_RAW to PRIVATE
   unlimitedcoding-config base URL for *_config.json downloads.
4. Removes stale .patcher.config.cache.json (will regen on next install).

Production configs MOVED to private repo (separate commit e839102 on
unlimitedcoding-config/main).

KNOWN UNCHANGED:
- releases/v2.1.119/sea/cli-wrapper.cjs still has api_key (part of npm
  package distribution; clients need it locally; sensey serves same).
- Read-only gitea token (cadffcb0...) remains in installers — needed
  for token-auth fetch from private repo. Scoped read-only.

RECOMMEND: api_key rotation in proxy auth list because ClauderAPI2 was
publicly exposed for an unknown period. Existing client installs would
need re-install or env override.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 16:43:08 +00:00
delta-cloud-208e
ceb39657a1 feat(installers): chain codex install + ps1 fallback includes gpt-5.5
User reported on Mac/Win:
1. gpt-5.5 not appearing in client model picker after install
2. codex CLI not installed by uclaude_install.{sh,ps1}

Root causes (TDD verified):
1. ps1 hardcoded fallback (when private config fetch fails) had only 5
   models without gpt-5.5; users behind firewall/with stale cache fall
   back to it. Updated fallback to include latest list including gpt-5.5,
   gemini-3.1-pro, gemini-3-flash, glm-5.1.
2. Codex has SEPARATE installer (codex/ucodex_install.{sh,ps1}). Users
   following claude install instructions miss it. README documents both
   but as separate steps. Now uclaude_install.{sh,ps1} optionally chain
   to codex installer at the end (skip via UCLAUDE_SKIP_CODEX=1).

Sh installer: also expanded sparse-checkout to include codex/ directory.

README versions: bumped Codex CLI 0.122.0 → 0.125.0 in all 4 locale files
(README.md, README_ru.md, README_es.md, README_zh.md).

3 new tests in claude_code_patcher/tests/test_installers_completeness.py
verify the fix sticks (ps1 fallback has gpt-5.5, both installers mention
codex chain, README codex version current via GitHub API check).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 16:22:33 +00:00
delta-cloud-208e
e982413591 fix(installer-ps1): downgrade fallback msg to Write-Warning per critic 2026-04-25 05:49:24 +00:00
delta-cloud-208e
136f60351c fix(installer-ps1): drop ANTHROPIC_API_KEY + dynamic models fetch
Auth conflict warning fix: setting both ANTHROPIC_AUTH_TOKEN and
ANTHROPIC_API_KEY simultaneously triggers Anthropic CLI to print
"Auth conflict" on every claude invocation. Drop API_KEY (we never
needed both — AUTH_TOKEN is the canonical for our proxy).

Best-effort cleanup: clear stale ANTHROPIC_API_KEY from User env (set
by previous installer versions).

Models stale fix: hardcoded list (qwen3-coder-plus, gemini-3.1-pro-preview,
glm-5, glm-4.7 etc.) was missing latest gemini-3.1-pro, gemini-3-flash,
glm-5.1. Now fetches CLAUDE_CUSTOM_MODELS from the private config repo
(unlimitedcoding-config/patcher.config.json) at install time, with
fallback to a small known-good list if fetch fails.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 05:46:48 +00:00
delta-cloud-208e
3381797148 fix(ps1): strip all non-ASCII Unicode from PowerShell scripts
Windows PowerShell 5.1 reads .ps1 files without BOM as Windows-1251 by
default. Em-dashes (-) and other Unicode chars in string literals get
mangled into invalid bytes (e.g. "session - no" becomes garbage that
breaks the parser with "Unexpected token" errors.

Replaced em-dash, en-dash, smart quotes, ellipsis, NBSP and arrows with
their ASCII equivalents across all 12 .ps1 scripts (install/update/
uninstall for claude/gemini/codex/qwen).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 10:53:15 +00:00
delta-cloud-208e
b13b44b98f feat: add Claude Opus 4.7 support — new flagship model
- patcher.config.json: opus-4-7 added to models list, set as default opus
- PS1 installers: ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-7
- CLAUDE_CUSTOM_MODELS includes opus-4-7 first
- v2.1.111 cli.js with patches applied

Opus 4.7 (released 2026-04-16):
- 1M context, 128K output
- New xhigh effort level
- Adaptive thinking (no more budget_tokens)
- High-res vision (2576px), high token efficiency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 17:52:09 +00:00
delta-cloud-208e
65c2671f9d chore: replace API key ClauderAPI → ClauderAPI2
Updated in all config files, installer/updater scripts across
claude/gemini/codex/qwen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 06:52:31 +00:00
delta-cloud-208e
c9fd4463c5 fix: add CLAUDE_CODE_EFFORT_LEVEL=high to Windows PS1 scripts
Without this env var, CLI defaults to medium effort. Linux updater
already sets it via /etc/environment, but PS1 scripts were missing it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 08:59:43 +00:00
delta-cloud-208e
2445932709 fix: Windows ExecutionPolicy error — set Bypass + remove .ps1 wrapper
npm creates claude.ps1 wrapper which gets blocked by default PS
ExecutionPolicy. Fix: set Bypass for CurrentUser and remove the .ps1
wrapper (claude.cmd still works fine).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 08:55:51 +00:00
delta-cloud-208e
ef964c6442 fix: Windows installer missing CLAUDE_CUSTOM_MODELS and other env vars
PS1 installer/updater only set ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL,
missing CLAUDE_CUSTOM_MODELS (required for model picker), AUTH_TOKEN,
default model vars, and telemetry disable vars.

Also added .claude.json pre-configuration (onboarding skip, dark theme)
and mcp__* permission to settings.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 08:46:52 +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
1fa1dbae11 feat(claude): add Windows PowerShell installer
Standalone uclaude_install.ps1: auto-install Node.js, npm registry
config, npm install, env vars, settings.json with permissions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 07:39:49 +00:00