Gruu6y/Colab-GPU
Acerca de
Fastest Colab GPU racer on GitHub — Direct Google Colab API + Isolated PKCE OAuth, Multi-Exit Proxy Pool, Idle-Burn Watchdog & Bilingual EN/ZH Cockpit for Antigravity (more harnesses added on Issue request).
Sistemas e infraestructuraWhat you can do
- 90-Day FIFO CU Ledger & API Glitch Protection: Track manual compute-unit refill batches with FIFO 90-day expiration estimates, real-time hourly burn rates, and single-sample zero-balance API glitch protection across every connected account.
- One-Click Verified Self-Updater (Sidecar UI + Standalone CLI): Check and apply GitHub Releases directly from Settings → Updates (or via node update-plugin.mjs / npm run update:plugin), with mandatory SHA256SUMS.txt verification, Zip-Slip/symlink protection, junction-safe atomic rollback, and zero impact on ${PLUGIN_DATA} accounts, leases, or tasks.
- Concurrent GPU Racer - Grab exact counts across multi-spec picks & disjoint-account sessions - Persisted race-state.json + server-side waitSec long-polling + autoClaim + baseline diff + AIMD 429 throttle + auto-renewed 120s owner reservation + maxAccounts + stopAndVerify
- Multi-Exit Proxy Pool & Auth - Resilient multi-region routing, isolated PKCE OAuth & credential freeze/delete - per_account / fastest / round_robin breaker + fail-closed app_account_set_frozen & app_account_remove
Crecimiento de estrellas medido
- in 24h
- +11
- in 7 days
- Recopilando historial
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalColab GPU
Fastest Colab GPU Racer on GitHub · Direct Google Colab API + Isolated PKCE OAuth · Bilingual EN/ZH Console
English (Current) | 简体中文
Sub-Second API GPU Racing · Direct Colab API + OAuth2 PKCE · Native GPU Data-Plane Exec & Zero-Token CLI · Multi-Token HuggingFace Hub · Multi-Exit Proxy Pool & Circuit Breaker · Bilingual EN/ZH Sidecar UI
Roadmap & Harness Support · Architecture · Changelog · Releases · Discussions · Issues
🟢 v1.3.2 Stable Release — Currently supports Google Antigravity first. Need another host/harness (Claude Code, Cursor, Codex, Windsurf, Cline, Zed, etc.)? Open an Issue and support for your requested harness will be added right away!
Real dark & light screenshots captured directly from the compiled dist/ui/index.html bundle using fictional @example.com accounts and sample tasks — zero real credentials, tokens, or user workspaces exposed. Switch EN / 中文 anytime from the top-right header toggle.
Non-Affiliation & Harness Support Notice
Colab GPU (
agy-colab) is an independent open-source project and is not affiliated with or endorsed by Google LLC. References to “Google”, “Google Colab”, and “Antigravity” are strictly for compatibility and descriptive purposes.Host Harness Scope:
v1.3.2currently targets Google Antigravity first. As soon as any user opens an Issue requesting another harness or MCP host, support for that harness will be implemented promptly — Request a Harness.
Why I Built This — Because
colab-cliIs Awful, and Every Open-Source Tool I Tried Still Couldn't Land a GPUHonestly, trying to use
colab-cliin real multi-GPU / AI-Agent workflows is a miserable experience: single-account serial commands, zero concurrent racing, zero multi-spec fallback, zeroper_accountproxy routing or429AIMD isolation, silentA100 80G -> 40Gdowngrades without warning, no liveproxyTokenrenewal for >60m runs, and zero idle-burn protection while your Compute Units quietly evaporate.The author literally tried
colab-cliand virtually every other open-source Google Colab project on GitHub, and still couldn't land scarce high-VRAM GPUs (G4 96G,H100,A100 80G) because clunky CLI loops, headless browsers, and DOM polling lose every sub-second capacity window. Out of sheer frustration, Colab GPU (agy-colab) was engineered from the ground up over direct Google Colab API calls (undici, zero browser overhead) specifically to deliver the fastest Colab GPU grabbing speed on GitHub:
- 450–900 ms no-capacity probe cadence with
<= 180 msworker launch stagger — zero CLI cold-start overhead, zero web UI hydration or DOM lag.- Parallel multi-account + 2-worker single-spec fan-out (
maxPerAccountConcurrency = 4) across multi-tier priorities (G4 > H100 > A100 80G > A100 40G > L4 > T4).per_accountindependent exit IP routing, isolated per-account HTTP429AIMD throttling (2saccount breather) &412cooldown (10 min) so one throttled account never slows healthy accounts.- Baseline-diff
stopAndVerify(1.2sverify loop) & VRAM silent-downgrade guard: snapshots active assignments before racing, probes real VRAM to reject stealthA100 80G -> 40Gdowngrades (unassignRuntime), and auto-cleans excess cards immediately.
Highlights
- Native GPU Data-Plane Execution & Zero-Leak HuggingFace Model Hub (
v1.3.2): Run Python & shell code, detached background jobs, log streaming, and file transfers directly over Colab Jupyter WebSocket/HTTP proxies viacolab_exec,colab_exec_logs,colab_files,colab_kernel, or zero-tokendist/colab-run.mjs(even for pure-OAuth accounts withoutcolab-cli). Manage multiple named HuggingFace tokens in the dedicated🤗 Model Hub(🤗 模型凭据) tab (hub-secrets.jsonmode0600) with online verification and silent runtime injection (HF_TOKEN,HF_HUB_ENABLE_HF_TRANSFER) that never leaks raw tokens into the LLM context. - Zero-Waste Agent Collaboration, Server-Side Long-Polling & Atomic Auto-Claim Racing: Replaces high-frequency timer polling and 5–8 minute LLM heartbeat loops with an event-driven workflow that preserves Prompt Cache locality and eliminates >70% idle orchestration token waste.
colab_race_start/colab_race_statusaccept optionalwaitSec(0..45, blocking inside the MCP server viaRaceManager.waitForUpdate) andautoClaim(atomically claiming wonREADYcards before returning), whilecolab_statusexposesCOLAB_CLI_CONFIG_DIRdirectly onREADYlines. - Zero-Token Local Task Pool CLI & ETA-Aware Idle-Burn Watchdog:
colab_task_createsurfaces a standalonetask-ping.mjsCLI (taskPingCommand) so long-running jobs update progress, steps, ETA and status locally at 0 LLM tokens (with proxy secret redaction). BackgroundproxyTokenauto-renewal (~15 minutes before expiry) refreshes leases andsessions.jsonunder file locks while preserving livekernel_id/session_id/runningstate, and the idle-burn watchdog suppresses falsekeepalive_idlealerts while a bound kernel is busy within the Task PoolestimatedFinishAtwindow. - Single-Session Multi-Card Sharding & Sub-Second Concurrent Racer (
AIMD 429+file-lock): Drive 2–4 GPUs in parallel from a single Agent session with batch & fast-path atomic claiming (colab_claim_cardwithendpoints/sessionNames/count, directCOLAB_CLI_CONFIG_DIRhandoff), native multi-card Task Pool binding (assignedEndpoints+ step-levelassignedEndpoint+ early shard release), and auto-renewed 120s owner reservations across already-won cards during multi-card races (renewReadyReservations). Arm multiple GPU tiers (G4 96G,H100,A100 80G,A100 40G,V100 16G,L4 24G,T4 16G), enforceowner& optionalmaxAccountsbounds oncolab_race_start, guard against silentA100 80G -> 40Gdowngrades, and auto-clean excess grabs (stopAndVerify). - Direct Google Colab API + Isolated PKCE OAuth + Credential Freeze / Safe Delete: Authenticates Google accounts with isolated OAuth2 PKCE tokens (zero GCP setup required; optional
AGY_COLAB_OAUTH_CLIENT_*overrides supported; scans existing~/.colab-accountsADC files) and calls Colab endpoints directly overundici. Supports freezing/unfreezing credentials in-place (suspending all API calls, OAuth refreshes, racing, background keep-alive, and dashboard polling with fail-closed active-GPU checks) and safe account deletion (pruning local keys, leases, ledger entries, and 412 rate limits). - Default-On 60s Backend Keep-Alive + Compact Runtime Telemetry (
EN / 中文Single Global Console):KeepAliveManagersends background60sColab TFE heartbeats even when the panel is closed (enabled by default for non-ghost GPUs, exempt for[GHOST]GPUs, with global & per-card overrides). Runtime cards show primary GPU/VRAM meters alongside compact secondary RAM and Disk progress bars, rendered inside a unified global Sidecar console with instantEN / 中文& dark/light switching. - Multi-Exit Proxy Pool & Circuit Breaker: Route Colab control-plane traffic via
direct,single, or a multi-nodepoolwithper_accountdeterministic affinity (+ automatic failover),fastestEMA latency routing, orround_robinrotation. Every node keeps an isolatedProxyAgent, backs off exponentially on failure /429, recovers cleanly via half-open probing, performs single transparent failover even whenretries === 0, and scrubs alluser:passcredentials from logs and responses. - 90-Day FIFO CU Ledger & API Glitch Protection: Track manual compute-unit refill batches with FIFO 90-day expiration estimates, real-time hourly burn rates, and single-sample zero-balance API glitch protection across every connected account.
- Multi-Signal Idle-Burn Watchdog, Ghost Radar & Persistent Snooze: Evaluates GPU utilization, VRAM deltas, host RAM/disk motion, keepalive Python sleep loops (
vram_residentfallback when GPU telemetry probes fail), cold-start grace windows, and multi-card Task Pool heartbeats (< 10m, protecting every active shard endpoint) before alerting — with per-runtime persisted Snooze and pure-OAuth[GHOST]detection. - Cross-Process Atomic Lease Pool & Zero-Downtime Token Renewal: Cross-process OS file locks (
withFileLock) + domain-lockedPluginStoreprevent lost updates across parallel MCP servers (pruneMissingLeasesgrace-window protection +DashboardCachemutationEpochsplit-brain guards); AI agents batch-claim1..4READYcards (colab_claim_card), track sharded tasks with mandatory ETA (colab_task_create), update progress locally at zero tokens (task-ping.mjs) or event-drivencolab_task_updatecalls, auto-renew expiring 60-minute proxy tokens in the background without stopping kernels, and cleanly return or stop billing (colab_release_card). - One-Click Verified Self-Updater (Sidecar UI + Standalone CLI): Check and apply GitHub Releases directly from Settings → Updates (or via
node update-plugin.mjs/npm run update:plugin), with mandatorySHA256SUMS.txtverification, Zip-Slip/symlink protection, junction-safe atomic rollback, and zero impact on${PLUGIN_DATA}accounts, leases, or tasks.
Why Colab GPU Instead of colab-cli or Browser / Cookie Scripts?
| Dimension | colab-cli (Painfully Barebones) |
Browser / Cookie Scripts | Colab GPU (Direct Colab API + OAuth) |
|---|---|---|---|
| Grabbing Speed | Clunky single-account serial retries; misses every scarce GPU window | Slow browser reloads, DOM polling, fragile selectors | Sub-second 450–900 ms parallel API racing across accounts + 2-worker single-spec fan-out |
| Multi-Spec & Downgrades | Manual single-spec attempts; blindly eats silent A100 40G downgrades |
No real VRAM verification or baseline-diff cleanup | Multi-tier priority racing, real VRAM check rejects stealth 40G downgrades, auto-cleans excess cards |
| Authentication | Awkward single-session/manual account switching | Shared browser profiles, volatile cookies, frequent relogin | Isolated multi-account OAuth2 PKCE (auto-refresh access_token, zero cookies, zero GCP setup) |
| Multi-Exit Egress & 429 | No proxy pool, no 429 AIMD isolation — one rate limit stalls you |
All tabs share one browser proxy profile | per_account / fastest / round_robin Proxy Pool + circuit breaker + isolated 429/412 cooldown |
| Idle Burn & Long Jobs | Zero idle-burn guardrails, zero ghost radar, no live token refresh | Forces brittle web tab keepalive; breaks on long runs | Multi-signal Idle-Burn Watchdog + colab_refresh_card_token live renewal (>60m) + Atomic Agent Task Pool |
| Runtime Exec & Weights | Brittle CLI wrappers, zero pure-OAuth execution, manual HF_TOKEN leaks in shell/prompts |
Manual notebook cells; insecure plain-text token paste | colab_exec / colab_exec_logs / colab_files / colab_kernel + zero-token dist/colab-run.mjs + silent 🤗 Model Hub injection |
Visual Overview
1. Core Capabilities at a Glance
| Pillar | What It Handles | Key Mechanism |
|---|---|---|
| Concurrent GPU Racer | Grab exact counts across multi-spec picks & disjoint-account sessions | Persisted race-state.json + server-side waitSec long-polling + autoClaim + baseline diff + AIMD 429 throttle + auto-renewed 120s owner reservation + maxAccounts + stopAndVerify |
| Multi-Exit Proxy Pool & Auth | Resilient multi-region routing, isolated PKCE OAuth & credential freeze/delete | per_account / fastest / round_robin breaker + fail-closed app_account_set_frozen & app_account_remove |
| Idle-Burn & Keep-Alive | Stop silent CU waste while keeping active kernels alive | Multi-signal telemetry + compact RAM/Disk bars + default-on 60s backend TFE heartbeats ([GHOST] exempt) |
| Multi-Card Lease & Task Cockpit | Cross-process & single-session 2–4 GPU sharding with live ETA board | OS file-lock + batch fast-path colab_claim_card + assignedEndpoints / step shards + mandatory ETA + zero-token task-ping.mjs + background token auto-renewal |
| Native GPU Execution & Model Hub | Run code, background jobs, file sync & gated weight pulls directly from MCP/CLI | Jupyter WS/HTTP RuntimeExecutor + detached /tmp/agy_jobs/ + zero-token dist/colab-run.mjs + hub-secrets.json (0600) multi-token vault |
2. Dual-Visibility MCP Architecture
Strict Tool Privilege Isolation (17 Model-Visible Agent Tools vs. 29 App-Only UI Tools):
- Model-Visible Agent Tools (
colab_*):colab_open_panel,colab_status,colab_discover_ready_cards,colab_claim_card,colab_refresh_card_token,colab_release_card,colab_exec,colab_exec_logs,colab_files,colab_kernel,colab_race_start,colab_race_status,colab_race_stop,colab_task_create,colab_task_update,colab_task_list,colab_task_remove. (colab_race_startis pure async and enforces requiredowner,userConfirmed: true, explicit GPU specs, max4cards/race,30–900stimeout, and optionalmaxAccountsacross disjoint accounts;colab_claim_cardsupports batch1..4claiming viaendpoints/sessionNames/countwith directCOLAB_CLI_CONFIG_DIR&colabRunCommandoutput;colab_exec*/colab_files/colab_kerneldrive the GPU directly without raw tokens entering LLM context.) - App-Only Sidecar UI Tools (
app_*,visibility: ['app']): Hidden from LLM context (app_get_dashboard,app_refresh_dashboard,app_set_config,app_test_proxy_pool,app_test_proxy,app_oauth_start,app_oauth_complete,app_legacy_scan,app_legacy_import,app_account_update,app_account_set_frozen,app_account_remove,app_add_balance_batch,app_stop_runtime,app_update_lease,app_snooze_idle,app_set_keepalive,app_race_start,app_race_status,app_race_stop,app_race_dismiss,app_check_update,app_apply_update,app_hub_get,app_hub_save_token,app_hub_delete_token,app_hub_verify_token,app_hub_save_settings,app_hub_sync_runtime).
Technical Deep Dive: Concurrency, Multi-Card Sharding, Keep-Alive, Proxy Circuit Breaker & State Safety (click to expand)
Disjoint-Account Multi-Session Racing, Auto-Renewed Reservations & Silent Downgrade Guard (
src/server/colab/racer.ts):- Coordinates multiple concurrent agent/UI race sessions across processes via persisted
race-state.json(locking disjoint account sets, recovering dead-PID leases cleanly, isolatingowner/raceIdstop signals, ranking clean non-412 / lower-lease accounts formaxAccounts, and auto-renewing120sownerreservations across already-wonREADYcards during multi-card wins, heartbeats, and cleanup). - Before launching workers,
RaceManagerfilters out frozen accounts, queries every candidate account's active assignments, and skips any account whose baseline preflight fails instead of racing against an empty baseline. - Each GPU candidate carries priority rankings (
G4 96G > H100 > A100 80G > A100 40G > V100 16G > L4 24G > T4 16G). Real VRAM probes reject stealthA100 80G -> 40Gdowngrades (unassignRuntime), whileUPSTREAM_TIMEOUT, quota403, and HTML upstream responses are classified separately fromNETWORK_ERRORwithout poisoning HTTP429AIMD streaks.
- Coordinates multiple concurrent agent/UI race sessions across processes via persisted
Default-On 60s Backend Keep-Alive & Credential Freeze Lifecycle (
src/server/colab/keepalive.ts,auth.ts):KeepAliveManagersends 60s Colab TFE heartbeats independently of Sidecar panel state (default ON for active leased runtimes, exempt for pure-OAuth[GHOST]GPUs, with globaldefaultKeepAlive& per-endpoint overrides).- Freezing a credential (
app_account_set_frozen) verifies no active GPUs or running races exist (withforce: trueoverride only when live checks fail due to network/auth), short-circuits dashboard polling with zero Google API calls, blocks token refreshes, and untracks keep-alive / 412 cooldown entries; frozen accounts can be safely deleted (app_account_remove) without remote auth calls.
Multi-Exit Proxy Pool & Isolated Probes (
src/server/net/proxy-pool.ts,http.ts):- Deterministic hash-pinned
per_accountaffinity pairs each Google account with its stable exit IP while failing over onto healthy alternate nodes if a node opens its circuit breaker. app_test_proxy_poolruns ephemeral probe dispatchers (probeProxyNode,probeProxyPool,testProxyConnectivity) that never mutate live activeProxyAgentpools or clear healthy traffic caches.- Credential-bearing URLs (
http://user:pass@host:port) are scrubbed immediately viamaskProxyUrlandscrubProxyCredentialsFromTextbefore hitting UI payloads, logs, or error banners.
- Deterministic hash-pinned
Multi-Signal Idle Watchdog, Multi-Card Task Binding & Compact Card Telemetry (
src/server/state/dashboard-cache.ts,colab/runtime.ts,tools/dashboard.ts):- Parses fractional (
0..1) and percentage (0..100) GPU utilization metrics alongside compact secondary System RAM and Disk progress bars, detects probe-failure blindspots, exempts cold starts, flags staleREADYleases (ready_timeout), and protects every endpoint returned bygetActiveTaskBoundEndpoints(assignedEndpoint,assignedEndpoints, andrunningstepassignedEndpoint) as long as Task Pool heartbeats stay< 10m.
- Parses fractional (
Cross-Process File Locks, Split-Brain Protection & Domain-Locked Persistence (
src/server/state/file-lock.ts,store.ts,server/index.ts):- All mutations to
leases,tasks,config,accounts,ledger,race-state, andsessions.jsonserialize through domain-scoped async mutexes backed by cross-process OS file locks (withFileLock), guarded bypruneMissingLeases(eligibleUpdatedAt) andDashboardCachemutationEpochchecks to eliminate race-to-READY split-brain. - Every dashboard payload carries
protocolVersion: 3andserverBuildIdcompared againstwindow.__AGY_DISK_BUILD_ID__injected fromdist/server.mjsso UI panels automatically warn when the host needs a plugin reload after an upgrade.
- All mutations to
Native Jupyter Data-Plane Execution & Multi-Token Model Hub (
src/server/colab/runtime-exec.ts,hub.ts,cli/colab-run.ts,ModelHubPage.tsx):- Connects directly over Colab's Jupyter Proxy HTTP +
undici.WebSocket(X-Colab-Runtime-Proxy-Token) with isolatedpython(kernelId) and companionshell(shellKernelId) kernels, detached/tmp/agy_jobs/<jobId>/background jobs (waitSeclog long-polling), chunked/api/contentsuploads (>1.5 MiB), and automatic401/403proxy token refresh + single retry, backed by persistedruntime-sessions.jsonfor pure-OAuth and legacy accounts alike. - Multi-token HuggingFace credentials reside solely in
hub-secrets.json(0o600inside${PLUGIN_DATA}), managed exclusively via🤗 Model Hub(🤗 模型凭据) UI (app_hub_*with online/api/whoami-v2verification), silently injected into remote runtimeHF_HOME/~/.cache/huggingface/token+ env (hfInjectedHashdeduplicated), and scrubbed viascrubSecretsFromTextfrom every MCP &dist/colab-run.mjsoutput.
- Connects directly over Colab's Jupyter Proxy HTTP +
Quick Start
Requires Node.js >= 22.0.0 and Google Antigravity (other harnesses added on request — see below!).
Option A: Portable Release Bundle (Recommended · Zero npm install)
- Download
agy-colab-v1.3.2.zip(Windows) oragy-colab-v1.3.2.tar.gz(macOS / Linux) from GitHub Releases (verify checksums againstSHA256SUMS.txt). - Extract the archive and run the bundled installer from the extracted
agy-colab/folder:
node install-portable.mjs
- Open Plugins Manager in Antigravity, toggle
Colab GPU(agy-colab) on (or off/on after an upgrade), and run"Open the Colab GPU panel"or invokecolab_open_panel.
Upgrading Later: Once
v1.1.0+is installed, open Settings → Updates inside the Sidecar panel for one-click SHA-256 verified upgrades, or runnode ~/.gemini/config/plugins/agy-colab/update-plugin.mjsfrom a terminal.
Option B: Build & Install from Source (Developers)
git clone https://github.com/Gruu6y/Colab-GPU.git
cd Colab-GPU
npm ci
npm run build
npm run install:plugin
npm run install:plugin deploys cleanly to ~/.gemini/config/plugins/agy-colab (symlink/junction for node_modules by default, or pass -- --copy-deps for a standalone copy).
Need Another Harness? (Claude Code / Cursor / Codex / Windsurf / Cline / etc.)
v1.3.2 temporarily supports Google Antigravity first (MCP Stdio + ui:// MCP App global sidecar panel).
If you want Colab GPU running on another coding harness or MCP client, please open a Harness Support Issue naming your harness — we will add native adapter/UI/skill support right away!
Agent Collaboration Protocol (colab-agent-workflow)
The bundled skill skills/colab-agent-workflow/SKILL.md teaches Antigravity agents to coordinate safely on single- and multi-GPU workloads:
- Inspect & Discover:
colab_status(printsREADYendpoints,COLAB_CLI_CONFIG_DIR,colabRunCommand, and sanitizedhubSummary) ->colab_discover_ready_cards(minVramGb) only if more detail is needed. Never steal another agent'sin_useGPU or another session'sreservedForcard. - Confirmation-Guarded Server-Side Long-Poll Racing (When Needed): If no suitable
READYcard exists, confirm target GPU specs, count (<= 4), and CU billing with the user, then runcolab_race_start(ownerrequired,userConfirmed: true, optionalmaxAccounts,waitSec: 45,autoClaim: true) — the server blocks onRaceManager.waitForUpdateand atomically claims wonREADYcards in the same call. Only continuecolab_race_status(waitSec: 45,knownWonCount,autoClaim: true) if still active — never poll withscheduletimers or shellsleeploops (abort viacolab_race_stopwith matchingraceId/owner). - Single or Batch Fast-Path Atomic Claim:
colab_claim_card(owner,endpointor batchendpoints/sessionNames/count1..4) returnsendpoint,region,accountId,tokenTTL,COLAB_CLI_CONFIG_DIR, andcolabRunCommanddirectly in its summary (never leakingproxyToken) — unnecessary whenautoClaimalready did it. - Register Single or Sharded Task with Mandatory ETA:
colab_task_create(estimatedMinutes > 0,assignedEndpointor multi-cardassignedEndpoints+ stepassignedEndpoints) drops a read-only progress card onto the user's panel and returns a zero-tokentaskPingCommand. - Run Workloads & Pull Weights Without Token Leaks: Execute short checks or launch detached training via
colab_exec/colab_exec_logs/colab_files/colab_kernel, or offload heavyupload --tar/hf-pull/logs --followsteps locally through zero-tokendist/colab-run.mjs(both work seamlessly for pure-OAuth accounts). When pulling gated HuggingFace models, passinjectHfToken: true(and optionalhfTokenId) so the server injects credentials silently from🤗 Model Hub— never echo rawhf_*tokens in chat or prompts. - Event-Driven, Zero-Token Progress Updates: The running job updates the Task Pool locally via
task-ping.mjs(--progress,--text,--eta,--step,--status) orcolab-run.mjs ... --task-id <id>at 0 LLM tokens; the Agent itself only callscolab_task_updateon real state transitions — never schedule 5–8 minute LLM heartbeat loops, because the ETA-aware idle-burn watchdog already protects busy kernels inside theestimatedFinishAtwindow. - Background Token Renewal & Early Shard Release:
proxyTokens are auto-renewed in the background (~15 minutes before expiry) and synced toruntime-sessions.json+sessions.jsonunder file locks without touching live kernels — manualcolab_refresh_card_tokenis only needed as a fallback; release finished shards immediately viacolab_release_card(action: "stop") while updatingassignedEndpointson the remaining shards. - Clean Closeout: Finalize task (
done/failed— onetask-ping.mjs --status done --progress 100 --clear-gpucall is enough), and verify every finished card is stopped (action: "stop").
FAQ
- Which host harnesses are currently supported?
Google Antigravity is fully supported out of the box in
v1.3.2. Because this plugin speaks standard MCP (@modelcontextprotocol/sdk+@modelcontextprotocol/ext-apps), adapting to other harnesses (Claude Code, Cursor, Codex, Windsurf, Cline, Zed, etc.) is straightforward — open an Issue and we will add support immediately. - Where are HuggingFace tokens stored, and can the LLM ever read them?
Tokens saved in the
🤗 Model Hub(🤗 模型凭据) tab are stored solely in${PLUGIN_DATA}/hub-secrets.json(0o600permissions) behind app-only UI tools (app_hub_*). The LLM only sees token IDs, labels, and masked previews (hf_ab...xyz), andscrubSecretsFromTextredacts all stored secrets from MCP responses andcolab-run.mjsCLI outputs before anything returns to the model. - Do I need to configure my own Google Cloud OAuth app?
No.
src/server/colab/auth.tsuses Google's public installed desktop OAuth client parameters (RFC 8252 + PKCE) out of the box, or you can setAGY_COLAB_OAUTH_CLIENT_IDandAGY_COLAB_OAUTH_CLIENT_SECRETinmcp_config.jsonto use your own GCP OAuth client. Credentials stay strictly inside~/.gemini/antigravity/plugin_data/agy-colab(or your${PLUGIN_DATA}directory). - Will updating or toggling the plugin delete my active GPU leases or credentials?
No. Runtime state, credentials, balance batches, snoozes, and tasks live in Antigravity's separate
plugin_data/agy-colabdirectory, isolated from plugin installation files in~/.gemini/config/plugins/agy-colab. - Where are proxy passwords protected?
Proxy URLs stored in
config.jsonare normalized and validated strictly (http:///https://only) and scrubbed bymaskProxyUrl/scrubProxyCredentialsFromTextbefore entering UI payloads, dashboard caches, error messages, or logs.
CLI Utilities & Repository Structure (Click to expand)
Common CLI Commands
npm run version:check # Verify single SemVer SSOT across package, manifests, code & docs
npm run typecheck # Typecheck both UI (React/Vite) and MCP Server (TypeScript)
npm run build # Build single-file UI HTML and bundled ESM MCP server
npm run test:gates # Run architecture, XSS/secret hygiene, zero-demo & asset-budget gates
npm test # Run full zero-mocked-network + MCP stdio integration suite
npm run install:plugin # Install into ~/.gemini/config/plugins/agy-colab (-- --copy-deps supported)
npm run update:plugin # Check or apply verified GitHub Release updates (-- --check supported)
npm run package:release # Build portable .zip / .tar.gz bundles + SHA256SUMS.txt into release/
Repository Layout
Colab-GPU/
├── plugin.json / mcp_config.json # Antigravity plugin & MCP server manifest (ID: agy-colab)
├── LICENSE / NOTICE / CITATION.cff # GPL-3.0-only license, Section 7 NOTICE & citation metadata
├── THIRD_PARTY_NOTICES.md # MIT / Apache-2.0 dependency attributions
├── AGENTS.md / CHANGELOG.md # Engineering redlines & bilingual release history
├── assets/logo.svg # Compact vector plugin emblem (< 256 KiB budget)
├── docs/ # README.zh-CN.md, ROADMAP.md, ADRs, CONTRIBUTORS & showcase images
├── skills/colab-agent-workflow/ # Bundled Agent collaboration protocol skill (SKILL.md)
├── scripts/ # install-plugin.mjs, update-plugin.mjs, check-version.mjs, package-release.mjs
├── src/
│ ├── server/
│ │ ├── index.ts # MCP stdio entry, ui:// resource host & build-id injection
│ │ ├── colab/ # auth.ts (PKCE OAuth), api.ts, racer.ts (AIMD), keepalive.ts, runtime.ts, runtime-exec.ts, hub.ts
│ │ ├── cli/ # task-ping.ts (dist/task-ping.mjs) & colab-run.ts (dist/colab-run.mjs)
│ │ ├── net/ # http.ts (failover/scrubbing), proxy-pool.ts (affinity/fastest/breaker)
│ │ ├── state/ # file-lock.ts, store.ts (domain locks), balance-ledger.ts (FIFO), dashboard-cache.ts, legacy-sync.ts
│ │ ├── updater/ # updater.ts (GitHub Release check, SHA-256 verify, Zip-Slip guard & rollback)
│ │ └── tools/ # agent-tools.ts (17 colab_* tools), app-tools.ts (29 app_* UI tools), dashboard.ts
│ └── ui/ # React 19 single-file MCP App console (App.tsx, components/, lib/, theme.css)
└── tests/ # 10 domain suites + architectural/security gates (node:test)
License, Derivative Rules & Citation
1. Open-Source License & Mandatory Attribution (GPL-3.0-only + NOTICE)
Colab GPU (agy-colab) (Copyright (C) 2026 Gruu6y) is licensed under the GNU General Public License v3.0 (GPL-3.0-only) with mandatory Section 7 attribution terms in NOTICE.
Any fork, modification, port, or redistribution must comply with all three requirements:
- Same-License Copyleft: Any derivative plugin, bundled MCP server, or distribution incorporating code from Colab GPU must be released under
GPL-3.0with complete corresponding source code accessible. Proprietary bundling or closed-source resale is prohibited. - Preserve Attribution Chain: Retain
LICENSE,NOTICE, andTHIRD_PARTY_NOTICES.mdintact, and preserve visible credit linking back to@Gruu6yandGruu6y/Colab-GPU. - Mark Modifications & Non-Endorsement: Document modification summaries and dates on altered files, and do not distribute modified forks under the unmodified
Colab GPU/agy-colabbranding as official releases without permission.
Downstream Attribution Snippet
> Built upon [Colab GPU](https://github.com/Gruu6y/Colab-GPU) by [@Gruu6y](https://github.com/Gruu6y), licensed under [GPL-3.0](https://www.gnu.org/licenses/gpl-3.0.html). Attribution and third-party notices are preserved in `NOTICE` and `THIRD_PARTY_NOTICES.md`.
Citation (CITATION.cff / BibTeX)
@software{gruu6y_colab_gpu_2026,
author = {Gruu6y},
title = {{Colab GPU (agy-colab): Direct Google Colab GPU Orchestrator, Multi-Exit Proxy Pool & Agent Task Cockpit}},
year = {2026},
version = {1.3.2},
license = {GPL-3.0-only},
url = {https://github.com/Gruu6y/Colab-GPU}
}
2. Community Contributors & Release Verification
- Contributors: Thank you to everyone testing, filing bugs, requesting new harnesses, and opening PRs — see
docs/CONTRIBUTORS.mdand.github/CONTRIBUTING.md. - Security Policy: Report vulnerabilities privately via GitHub Security Advisories — see
.github/SECURITY.md. - Verifying Releases: Every official GitHub Release attaches a CI-generated
SHA256SUMS.txtdigest file covering bothagy-colab-v<version>.zipandagy-colab-v<version>.tar.gz.
Explorar proyectos relacionados
Cargando…