Commit Graph

15 Commits

Author SHA1 Message Date
delta-cloud-208e
e3d01fc341 feat(claude): bump latest=2.1.120 + verify ae2/ae3 markers in installer
- index.json latest: 2.1.119 → 2.1.120 (artifacts already published in
  releases/v2.1.120/sea/, manifest carries ae3 patched binary sha256
  eb126100...)
- uclaude_install.sh SEA verification expanded: now requires ae1 + ae2 +
  ae3 + bypass markers (was only ae1 + bypass). ae2 gates the /model
  picker for custom-prefixed models, ae3 gates Agent.model accepting
  gpt-5.5/glm-5.1 — both critical for the proxy workflow.

After this: new machines doing
  curl ... uclaude_install.sh | sudo bash
get v2.1.120 directly with all 9 patches; verification step catches
any missing patch with explicit "missing: ae3" diagnostic.
2026-04-26 10:06:33 +00:00
delta-cloud-208e
4e36a774be fix(updater): write models to settings.availableModels — v2.1.114+ removed CLAUDE_CUSTOM_MODELS env var
Root cause of "/model picker shows only 5 models": Anthropic removed
the CLAUDE_CUSTOM_MODELS env var sometime around v2.1.114. The picker
now reads exclusively from settings.json `availableModels` (a Zod-typed
allowlist field). We were:
  - Writing CLAUDE_CUSTOM_MODELS into env.* (no longer read)
  - Calling data.pop("availableModels", None) — actively REMOVING the
    field that the picker now needs

So the picker fell back to built-in models + the two ANTHROPIC_DEFAULT_*
models, giving exactly 4 entries. Confirmed via strings on the v2.1.119
SEA binary: zero hits for "CLAUDE_CUSTOM_MODELS", but Zod schema
defines availableModels as the model allowlist.

Fix:
- patch_user() writes config['models'] into data['availableModels']
  (still also sets the env var for backward-compat with side-by-side
  older binaries)
- Verification block in install.sh + updater.py now reports both:
    availableModels: N models  (env.CLAUDE_CUSTOM_MODELS legacy: N)

Tested locally on v2.1.119 SEA install → settings.json now contains
availableModels with all 19 models. Restart claude → /model should show
the full list.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 07:56:31 +00:00
delta-cloud-208e
0c2b9f056a fix(updater): SEA-aware install detection — recognise bin/claude.exe
After upstream switched to SEA (Single Executable Application) layout
in v2.1.114+, there is no cli.js anymore — only bin/claude.exe.

Before this fix:
- find_cli_js() searched only for cli.js → returned None on SEA installs
- get_installed_version() returned (None, None) → "Claude Code: not installed"
- is_patched() returned (False, [3 markers]) → false-negative even after
  successful patch
- cmd_check showed "not installed" right after a successful update
- cmd_update would loop reinstalling because patch markers seemed missing

This contributed to a user-facing incident where /model picker showed
only built-in models even though CLAUDE_CUSTOM_MODELS was set in
settings.json: the binary update path was triggering uninstall+reinstall
cycles instead of being recognised as already-patched.

Changes:
- New find_claude_artifact() finds either cli.js or bin/claude.exe,
  including the deeply-nested layout npm uses for SEA wrapper packages
- find_all_cli_js() returns both legacy and SEA artifacts
- is_patched() auto-detects layout: text scan for cli.js, bytes scan
  for claude.exe (markers: /*ae1_models_filter_patched*/,
  /*bypass_permissions_prompt*/)
- get_installed_version() reads package.json next to bin/ for SEA
- uclaude_install.sh adds binary marker verification at end of install
  so users immediately see if the SEA payload was patched

Tests: new tests/test_sea_detect.py covers all 4 detector functions
against fake SEA install layouts (including nested form). All 20 tests
pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 07:45:35 +00:00
delta-cloud-208e
696d8b4ced fix(installer): verbose diagnostics — show CLAUDE_CUSTOM_MODELS count
User reported: after install, claude /model picker shows only 5 models
(built-ins) instead of 19 — config DID land somewhere but CLAUDE_CUSTOM_
MODELS env block in settings.json was empty/missing.

Hard to debug without seeing user's settings.json. Add verbose diagnostic:

uclaude_updater.py patch_all_users():
- Pre-check: warn if config has 0 models OR placeholder api_key
- Post-patch per user: read back the JUST-WRITTEN settings.json, count
  CLAUDE_CUSTOM_MODELS entries, print:
    "Patched root: /root/.claude/settings.json (env.CLAUDE_CUSTOM_MODELS=19 models)"

uclaude_install.sh — final verification block:
- Show ANTHROPIC_BASE_URL + AUTH_TOKEN prefix + custom_models count
- Loud warning if 0 models or auth_token missing

Now user can immediately see "0 models" or "19 models" without manually
inspecting settings.json. If 0 — knows config fetch failed silently.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 18:35:47 +00:00
delta-cloud-208e
47e1978bef fix(installer): retry git ops + reject placeholder api_key + sync public configs
User hit two bugs in production:
1. uclaude_install.sh ERROR: Command failed at line 82 — gitea returned
   transient HTTP 502 to `git fetch`, `2>/dev/null` masked stderr but
   ERR trap fired with cryptic message.
2. After install, claude model picker showed only 5 models (built-in
   defaults) instead of 19. Root cause: load_config() fell back to the
   PUBLIC sanitized patcher.config.json (api_key='YOUR_API_KEY') after
   remote fetch failed → claude API auth broken → custom models invisible.

Fixes:

claude/uclaude_install.sh:
- New retry_git() helper: 3 attempts, 5s backoff, loud diagnostic
- Existing-clone branch: retry_git wraps `git fetch` AND `git reset`
- Fallback: if fetch fails 3x on existing clone, nuke and re-clone fresh
  (incremental fetch breaks more often than full clone on flaky gitea)
- Secondary fetch (before updater): tolerates failure with `|| true`
  (we already have a working clone)

claude/uclaude_updater.py:
- _config_is_usable() guard: rejects {"api_key": "YOUR_API_KEY"} etc.
- load_config() retries remote 3x with backoff before falling back
- Removed local-file fallback (was loading public sanitized = bait)
- Cache-only fallback now (from previous successful fetch)

Public configs synced from canonical (api_key sanitized, models list
fully refreshed):
- claude/patcher.config.json: 17 → 19 models (+gpt-5.5, +gemini-3.1-pro etc)
- codex/codex_config.json: 4 → 5 models (+gpt-5.5)
- gemini/gemini_config.json: refreshed
- target_version: 2.1.112 → 2.1.119

Tests: tests/test_installer_robustness.py — 6 new GREEN guards.
Total: 196 → 207 GREEN.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 18:25: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
91529ddc6c feat: use npm.sensey24.ru registry for @anthropic-ai/claude-code
- Add NPM_REGISTRY constant and set_npm_registry() function
- Configure npm to use https://npm.sensey24.ru/ for @anthropic-ai scope
- Pass --registry flag to npm install commands
- Configure registry in uclaude_install.sh before running updater

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-02-27 08:13:03 +00:00
delta-cloud-208e
ae06a26974 fix: lower Node.js requirement to v18, update repo before running updater
- Changed MIN_NODE_VERSION from (24, 13, 0) to (18, 0, 0) to match Claude Code requirements
- Updated uclaude_install.sh to fetch latest repo before running updater
- Rewrote uclaude_update.ps1 to require v18+ and update repo first
- Added multiple fallback methods for Node.js installation on Windows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:18:48 +00:00
delta-cloud-208e
245710dfea fix: use -H Authorization header instead of ?token= in all install commands
Fixes curl "bad/illegal format" error on some systems when ?token= is in URL.
All 8 READMEs + uclaude_install.sh updated to download-then-run approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:57:04 +00:00
delta-cloud-208e
6755713ad7 fix: use isolated read-only token for install commands
- Replace old aibot777 token with new scoped token (read:repository)
- Simplify curl commands: use ?token= query param instead of -H header
- Token embedded in uclaude_install.sh for git clone auth
- All repos remain private; token only allows reading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:46:46 +00:00
delta-cloud-208e
70712fa4f8 fix: add read-only API token for private repo access
- Embed GITEA_TOKEN in uclaude_install.sh for git clone auth
- Add Authorization header to all curl install commands in docs
- Add token to git clone URLs in Windows/manual install sections
- Token is read:repository scoped (read-only, can be revoked)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:37:48 +00:00
delta-cloud-208e
40188adf54 fix: replace bash <(curl) with curl | bash in all install instructions
Process substitution <(...) fails with sudo and on systems without /dev/fd.
Pipe syntax works universally on all Linux/macOS systems.

Also changed curl -s to curl -fsSL for proper error handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:27:52 +00:00
delta-cloud-208e
6479aacfd4 feat: full auto-install chain for all platforms
- Wire ensure_claude_code() into cmd_update() — auto npm install if missing
- uclaude_install.sh: auto-install git, python3, curl via apt/dnf/yum/brew
- uclaude_update.bat: prereq checks with winget install suggestions
- uclaude_update.ps1: auto-install via winget (git, python, node)
- install_node(): macOS support via brew, RHEL/Fedora via rpm.nodesource
- Increased npm install timeout to 300s for slow connections
2026-02-21 11:58:33 +00:00
delta-cloud-208e
903520b0f9 refactor: перенос файлов в claude/ + мульти-продуктовая структура
- Все claude-файлы перенесены в claude/ (uclaude_updater.py, скрипты, config)
- claude/README.md с инструкцией для Claude Code
- Корневой README — общий для всех продуктов (claude, codex, gemini, qwen, antigravity)
- Node.js v24.13+ автоустановка через nodesource
- Sparse checkout: клиент скачивает только latest версию cli.js

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:51:09 +00:00