Spaces:
Paused
Paused
Commit History
-
refactor: extract startServer() + path abstraction for Electron reuse
icebear0828 +1: Claude Opus 4.6- Export startServer(options?) from src/index.ts so Electron can import it - Add src/paths.ts: centralized path getters (getConfigDir, getDataDir, etc.) with setPaths() hook for Electron to redirect to userData - Replace all process.cwd() calls with path getters across src/ - Extract shared/ from web/ (i18n, theme, hooks, utils) for desktop reuse - Add /desktop route in web.ts (serves desktop UI if built, no-op otherwise) CLI behavior is unchanged — all path getters default to process.cwd(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4a940a5
-
fix: window counter review issues — opacity modifier, catch-up spam, rounding
icebear0828 +1: Claude Opus 4.6- text-dim color uses <alpha-value> interpolation so dark:text-text-dim/70 works - Multi-window catch-up jumps to correct window in one step (no log spam) - formatWindowDuration uses Math.floor instead of Math.round Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>247b874 -
feat: add per-window usage counters with time-driven reset
icebear0828 +1: Claude Opus 4.6Dashboard previously showed cumulative token counts that never reset when the rate limit window rolled over. Now tracks per-window request/token counters that auto-reset via two layers: - Layer 1 (time-driven): refreshStatus() checks window_reset_at on every acquire/getAccounts call, zero API overhead - Layer 2 (backend sync): syncRateLimitWindow() corrects with actual backend values on Dashboard refresh Also syncs limit_window_seconds from backend and displays window duration badge (e.g. "3h") next to plan name in AccountCard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4f2220c
-
fix: stop resetting local usage counters on rate limit window rollover
icebear0828 +1: Claude Opus 4.6syncRateLimitWindow() was zeroing request_count, tokens, and empty_response_count whenever the backend rate limit window changed. This caused the dashboard to show 0 requests/tokens while the backend quota still reported usage (e.g. 50% used), because the two data sources are independent. Local counters now accumulate since account creation; users can still manually reset via the API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9d65acf
-
feat: add per-account empty response tracking with email in logs
icebear0828 +1: Claude Opus 4.6Track empty_response_count per account in AccountUsage, exposed via GET /auth/accounts. Logs now include account email for easier debugging. Counter resets on usage reset and rate limit window rollover. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b3dfc6c
-
feat: OpenCode platform support, vitest tests, changelog & Docker hardening
icebear0828 +1: Claude Opus 4.6- Add opencode.json provider config for OpenCode IDE integration - Add CHANGELOG.md covering all versions (v0.1.0–v0.8.0) - Add vitest with unit tests for account-pool, codex-api, codex-event-extractor - Add request-id middleware to global middleware chain - Harden Dockerfile: non-root user, HEALTHCHECK probe - Simplify /health endpoint to return pool summary only Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>92c5df7
-
refactor: remove dead code, unused config, and fix type violations
icebear0828 +1: Claude Opus 4.6- Remove deprecated public/dashboard.html (replaced by Preact frontend) - Remove unused streaming and environment config sections (zero references) - Fix all `any` type violations (CLAUDE.md rule) in yaml-mutate, update-checker, and web components - Extract duplicate OAuth callback setup into shared startOAuthFlow() helper - Fix Vite emptyOutDir to prevent stale build artifact accumulation - Simplify .gitignore to ignore entire public/ build output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>50ae780
-
fix: proxy_api_key from config not used in frontend or auth validation
icebear0828 +1: Claude Opus 4.6/auth/status now returns config.server.proxy_api_key when set instead of per-account random hash. validateProxyApiKey also accepts the configured key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1f63c38
-
refactor: architecture audit fixes (P0-P2 stability & reliability)
icebear0828 +1: Claude Opus 4.6P0: curl header parse timeout (30s), kill curl on stream disconnect via AbortController, cap error response body at 1MB. P1: acquireLock TTL (5min auto-release), atomic config hot-reload, encapsulate 429 counting in AccountPool, graceful shutdown with server.close() + 5s drain period. P2: send error SSE event on stream failure, structured JSON logger, O(1) session LRU eviction via Map insertion order. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b1107bc -
refactor: fingerprint alignment, auto-maintenance, Docker deployment
icebear0828 +1: Claude Opus 4.6Phase 1 - Eliminate fingerprint detection gaps: - Dynamic sec-ch-ua from config chromium_version (aligned with TLS profile) - Inject full fingerprint headers into curl-fetch (OAuth/appcast) - Unify Accept-Encoding based on curl-impersonate detection - Optimize header ordering (single sort pass) Phase 2 - Auto-maintenance: - Structured YAML mutation utility (replace regex hacks) - Auto full-update pipeline on new version detection - Config hot-reload after updates - Exponential backoff token refresh (5 attempts + 10m recovery) - Immediate persistence for critical data (tokens, cf_clearance) - Cookie v2 format with expiry timestamps - Graceful shutdown with 10s timeout protection - Usage counters auto-reset on rate limit window rollover Phase 3 - Docker deployment: - Dockerfile, docker-compose.yml, .dockerignore - Deployment docs in README Fixes: - Extract planType from JWT /auth claim (was looking in /profile) - Backfill missing planType on startup for existing accounts - Show full d…347f81b -
refactor: extract shared proxy handler, eliminate route duplication
icebear0828 +1: Claude Opus 4.6- Extract withRetry() to src/utils/retry.ts (was duplicated 3x) - Create shared proxy-handler.ts encapsulating acquire/stream/release lifecycle - Refactor chat.ts, messages.ts, gemini.ts to use shared handler (-264 lines net) - Convert models.ts from default export to named createModelRoutes() - Extract GEMINI_STATUS_MAP to types/gemini.ts (was duplicated in error-handler) - Add SessionManager.destroy() with interval cleanup + unref - Remove dead captureCookies() method from codex-api.ts - Add stack trace logging to error handler - Fix hardcoded localhost in startup message - Use atomic write-to-temp-then-rename for cookie-jar and account-pool - Add warning logs for previously silent catch blocks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8b777a2 -
fix: remove all `any` types from source code
icebear0828 +1: Claude Opus 4.6Replace `catch (err: any)` with `unknown` + type-safe access, and `(err as any).code` with intersection type cast. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8fc11c2 -
feat: desktop context injection, multi-turn sessions, TLS impersonation & auto-update
icebear0828 +1: Claude Opus 4.6- Inject Codex Desktop system prompt into every request for full feature parity - Add previous_response_id for multi-turn conversation continuity - Add curl-impersonate auto-detection with Chrome TLS fingerprint fallback - Fix appcast XML parsing for element-style Sparkle tags - Remove private maintenance scripts from public repo - Add README with setup and usage instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>22a7de1
-
feat: anti-detection hardening — curl TLS, auto-version, jitter & Chromium headers
icebear0828 +1: Claude Opus 4.6- Replace fetch() with curl subprocess for POST /codex/responses to match native TLS fingerprint (Cloudflare evasion) - Auto-apply version updates from Sparkle appcast to config file and runtime - Add timing jitter to all fixed intervals (refresh, retry, backoff, polling) to eliminate automation signatures - Add sec-ch-ua, sec-ch-ua-mobile, sec-ch-ua-platform, sec-fetch-* headers to match Chromium/Electron request fingerprint - Add CookieJar.captureRaw() for Set-Cookie handling from curl responses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0d2f54c -
feat: native OAuth PKCE login with fixed localhost:1455 redirect
icebear0828 +1: Claude Opus 4.6Implement native OAuth PKCE flow replacing Codex CLI dependency. - Always use http://localhost:1455/auth/callback as redirect_uri to match OpenAI's whitelist for the Codex CLI client_id - Add callback server lifecycle management (close old before starting new) - Handle EADDRINUSE gracefully instead of crashing - Listen on dual-stack (::) so localhost works on both IPv4 and IPv6 - Add account pool, refresh scheduler, and multi-account dashboard UI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5dd5107
-
feat: architecture audit — disguise hardening, update automation, robustness
icebear0828 +1: Claude Opus 4.6Disguise hardening (P0): - Enforce HTTP header order from fingerprint.yaml config - Add browser-level headers (Accept-Encoding, Accept-Language) - Add Codex-specific request body fields (tools, previous_response_id) - Protect /debug/fingerprint endpoint (dev/localhost only) Update automation (P0-P1): - Integrate appcast version checker into server process (30-min polling) - Expose update state via /health endpoint - Externalize model catalog to config/models.yaml - Fail fast on critical extraction failures (originator, api_base_url) - Update apply-update.ts to compare models against YAML config Robustness (P0-P1): - Add 5xx retry with exponential backoff in chat route (max 2 retries) - Wrap HTML file reads in try-catch to prevent server crashes - Add config load try-catch with friendly error messages - Log persistence errors instead of silently swallowing - Add retry (1 attempt, 5s delay) for token refresh failures Code hygiene: - Delete leftover WHAM dist files - Mark 6 backward-co…85aec43 -
refactor: remove dead code, extract hardcoded values into config
icebear0828 +1: Claude Opus 4.6- Delete unused AuthManager (src/auth/manager.ts, replaced by AccountPool) - Delete unused ProxyClient + serializePath (src/proxy/client.ts) - Replace hardcoded "Codex Desktop" in chatgpt-oauth.ts with config.client.originator - Extract magic timestamp 1700000000 into MODEL_CREATED_TIMESTAMP constant - Move session TTL and cleanup interval from hardcoded values to config schema - Fix unused `target` variable in models.ts route loop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ab21b87 -
Initial commit: Codex Proxy with quota API and Cloudflare bypass
icebear0828 +1: Claude Opus 4.6OpenAI-compatible proxy that translates Chat Completions API to ChatGPT's Codex Responses API. Includes multi-account management, official quota querying via curl subprocess (bypasses Cloudflare TLS fingerprinting), per-account cookie jar, and full API documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5d0a52f