Skip to content
Projetos

Sobre

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 infraestrutura

Como estes números são medidos

21 estrelas4 Forks +11 em 24 h

O que você pode fazer

  • 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

Crescimento medido de estrelas

em 24 h
+11
em 7 dias
Coletando histórico
em 15 dias
Coletando histórico
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original
Colab GPU Logo

Colab 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

Latest Release Version 1.3.2 Fastest GPU Grabbing Speed on GitHub Colab API + OAuth2 PKCE Platform Node >= 22 CI Status License: GPL-3.0 Attribution Required

🟢 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!

Colab GPU v1.3.2 Bilingual Sidecar Console (Real UI Screenshot)

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.2 currently 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-cli Is Awful, and Every Open-Source Tool I Tried Still Couldn't Land a GPU

Honestly, trying to use colab-cli in real multi-GPU / AI-Agent workflows is a miserable experience: single-account serial commands, zero concurrent racing, zero multi-spec fallback, zero per_account proxy routing or 429 AIMD isolation, silent A100 80G -> 40G downgrades without warning, no live proxyToken renewal for >60m runs, and zero idle-burn protection while your Compute Units quietly evaporate.

The author literally tried colab-cli and 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 ms worker 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_account independent exit IP routing, isolated per-account HTTP 429 AIMD throttling (2s account breather) & 412 cooldown (10 min) so one throttled account never slows healthy accounts.
  • Baseline-diff stopAndVerify (1.2s verify loop) & VRAM silent-downgrade guard: snapshots active assignments before racing, probes real VRAM to reject stealth A100 80G -> 40G downgrades (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 via colab_exec, colab_exec_logs, colab_files, colab_kernel, or zero-token dist/colab-run.mjs (even for pure-OAuth accounts without colab-cli). Manage multiple named HuggingFace tokens in the dedicated 🤗 Model Hub (🤗 模型凭据) tab (hub-secrets.json mode 0600) 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_status accept optional waitSec (0..45, blocking inside the MCP server via RaceManager.waitForUpdate) and autoClaim (atomically claiming won READY cards before returning), while colab_status exposes COLAB_CLI_CONFIG_DIR directly on READY lines.
  • Zero-Token Local Task Pool CLI & ETA-Aware Idle-Burn Watchdog: colab_task_create surfaces a standalone task-ping.mjs CLI (taskPingCommand) so long-running jobs update progress, steps, ETA and status locally at 0 LLM tokens (with proxy secret redaction). Background proxyToken auto-renewal (~15 minutes before expiry) refreshes leases and sessions.json under file locks while preserving live kernel_id / session_id / running state, and the idle-burn watchdog suppresses false keepalive_idle alerts while a bound kernel is busy within the Task Pool estimatedFinishAt window.
  • 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_card with endpoints / sessionNames / count, direct COLAB_CLI_CONFIG_DIR handoff), native multi-card Task Pool binding (assignedEndpoints + step-level assignedEndpoint + 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), enforce owner & optional maxAccounts bounds on colab_race_start, guard against silent A100 80G -> 40G downgrades, 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-accounts ADC files) and calls Colab endpoints directly over undici. 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): KeepAliveManager sends background 60s Colab 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 instant EN / 中文 & dark/light switching.
  • Multi-Exit Proxy Pool & Circuit Breaker: Route Colab control-plane traffic via direct, single, or a multi-node pool with per_account deterministic affinity (+ automatic failover), fastest EMA latency routing, or round_robin rotation. Every node keeps an isolated ProxyAgent, backs off exponentially on failure / 429, recovers cleanly via half-open probing, performs single transparent failover even when retries === 0, and scrubs all user:pass credentials 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_resident fallback 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-locked PluginStore prevent lost updates across parallel MCP servers (pruneMissingLeases grace-window protection + DashboardCache mutationEpoch split-brain guards); AI agents batch-claim 1..4 READY cards (colab_claim_card), track sharded tasks with mandatory ETA (colab_task_create), update progress locally at zero tokens (task-ping.mjs) or event-driven colab_task_update calls, 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 mandatory SHA256SUMS.txt verification, 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

Colab GPU four core feature pillars

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

Colab GPU dual-visibility MCP server 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_start is pure async and enforces required owner, userConfirmed: true, explicit GPU specs, max 4 cards/race, 30–900s timeout, and optional maxAccounts across disjoint accounts; colab_claim_card supports batch 1..4 claiming via endpoints / sessionNames / count with direct COLAB_CLI_CONFIG_DIR & colabRunCommand output; colab_exec* / colab_files / colab_kernel drive 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)
  1. 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, isolating owner/raceId stop signals, ranking clean non-412 / lower-lease accounts for maxAccounts, and auto-renewing 120s owner reservations across already-won READY cards during multi-card wins, heartbeats, and cleanup).
    • Before launching workers, RaceManager filters 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 stealth A100 80G -> 40G downgrades (unassignRuntime), while UPSTREAM_TIMEOUT, quota 403, and HTML upstream responses are classified separately from NETWORK_ERROR without poisoning HTTP 429 AIMD streaks.
  2. Default-On 60s Backend Keep-Alive & Credential Freeze Lifecycle (src/server/colab/keepalive.ts, auth.ts):

    • KeepAliveManager sends 60s Colab TFE heartbeats independently of Sidecar panel state (default ON for active leased runtimes, exempt for pure-OAuth [GHOST] GPUs, with global defaultKeepAlive & per-endpoint overrides).
    • Freezing a credential (app_account_set_frozen) verifies no active GPUs or running races exist (with force: true override 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.
  3. Multi-Exit Proxy Pool & Isolated Probes (src/server/net/proxy-pool.ts, http.ts):

    • Deterministic hash-pinned per_account affinity 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_pool runs ephemeral probe dispatchers (probeProxyNode, probeProxyPool, testProxyConnectivity) that never mutate live active ProxyAgent pools or clear healthy traffic caches.
    • Credential-bearing URLs (http://user:pass@host:port) are scrubbed immediately via maskProxyUrl and scrubProxyCredentialsFromText before hitting UI payloads, logs, or error banners.
  4. 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 stale READY leases (ready_timeout), and protects every endpoint returned by getActiveTaskBoundEndpoints (assignedEndpoint, assignedEndpoints, and running step assignedEndpoint) as long as Task Pool heartbeats stay < 10m.
  5. 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, and sessions.json serialize through domain-scoped async mutexes backed by cross-process OS file locks (withFileLock), guarded by pruneMissingLeases (eligibleUpdatedAt) and DashboardCache mutationEpoch checks to eliminate race-to-READY split-brain.
    • Every dashboard payload carries protocolVersion: 3 and serverBuildId compared against window.__AGY_DISK_BUILD_ID__ injected from dist/server.mjs so UI panels automatically warn when the host needs a plugin reload after an upgrade.
  6. 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 isolated python (kernelId) and companion shell (shellKernelId) kernels, detached /tmp/agy_jobs/<jobId>/ background jobs (waitSec log long-polling), chunked /api/contents uploads (>1.5 MiB), and automatic 401/403 proxy token refresh + single retry, backed by persisted runtime-sessions.json for pure-OAuth and legacy accounts alike.
    • Multi-token HuggingFace credentials reside solely in hub-secrets.json (0o600 inside ${PLUGIN_DATA}), managed exclusively via 🤗 Model Hub (🤗 模型凭据) UI (app_hub_* with online /api/whoami-v2 verification), silently injected into remote runtime HF_HOME / ~/.cache/huggingface/token + env (hfInjectedHash deduplicated), and scrubbed via scrubSecretsFromText from every MCP & dist/colab-run.mjs output.

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)

  1. Download agy-colab-v1.3.2.zip (Windows) or agy-colab-v1.3.2.tar.gz (macOS / Linux) from GitHub Releases (verify checksums against SHA256SUMS.txt).
  2. Extract the archive and run the bundled installer from the extracted agy-colab/ folder:
node install-portable.mjs
  1. 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 invoke colab_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 run node ~/.gemini/config/plugins/agy-colab/update-plugin.mjs from 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:

  1. Inspect & Discover: colab_status (prints READY endpoints, COLAB_CLI_CONFIG_DIR, colabRunCommand, and sanitized hubSummary) -> colab_discover_ready_cards (minVramGb) only if more detail is needed. Never steal another agent's in_use GPU or another session's reservedFor card.
  2. Confirmation-Guarded Server-Side Long-Poll Racing (When Needed): If no suitable READY card exists, confirm target GPU specs, count (<= 4), and CU billing with the user, then run colab_race_start (owner required, userConfirmed: true, optional maxAccounts, waitSec: 45, autoClaim: true) — the server blocks on RaceManager.waitForUpdate and atomically claims won READY cards in the same call. Only continue colab_race_status (waitSec: 45, knownWonCount, autoClaim: true) if still active — never poll with schedule timers or shell sleep loops (abort via colab_race_stop with matching raceId / owner).
  3. Single or Batch Fast-Path Atomic Claim: colab_claim_card (owner, endpoint or batch endpoints/sessionNames/count 1..4) returns endpoint, region, accountId, tokenTTL, COLAB_CLI_CONFIG_DIR, and colabRunCommand directly in its summary (never leaking proxyToken) — unnecessary when autoClaim already did it.
  4. Register Single or Sharded Task with Mandatory ETA: colab_task_create (estimatedMinutes > 0, assignedEndpoint or multi-card assignedEndpoints + step assignedEndpoints) drops a read-only progress card onto the user's panel and returns a zero-token taskPingCommand.
  5. 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 heavy upload --tar / hf-pull / logs --follow steps locally through zero-token dist/colab-run.mjs (both work seamlessly for pure-OAuth accounts). When pulling gated HuggingFace models, pass injectHfToken: true (and optional hfTokenId) so the server injects credentials silently from 🤗 Model Hub — never echo raw hf_* tokens in chat or prompts.
  6. Event-Driven, Zero-Token Progress Updates: The running job updates the Task Pool locally via task-ping.mjs (--progress, --text, --eta, --step, --status) or colab-run.mjs ... --task-id <id> at 0 LLM tokens; the Agent itself only calls colab_task_update on real state transitions — never schedule 5–8 minute LLM heartbeat loops, because the ETA-aware idle-burn watchdog already protects busy kernels inside the estimatedFinishAt window.
  7. Background Token Renewal & Early Shard Release: proxyTokens are auto-renewed in the background (~15 minutes before expiry) and synced to runtime-sessions.json + sessions.json under file locks without touching live kernels — manual colab_refresh_card_token is only needed as a fallback; release finished shards immediately via colab_release_card (action: "stop") while updating assignedEndpoints on the remaining shards.
  8. Clean Closeout: Finalize task (done / failed — one task-ping.mjs --status done --progress 100 --clear-gpu call 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 (0o600 permissions) behind app-only UI tools (app_hub_*). The LLM only sees token IDs, labels, and masked previews (hf_ab...xyz), and scrubSecretsFromText redacts all stored secrets from MCP responses and colab-run.mjs CLI outputs before anything returns to the model.
  • Do I need to configure my own Google Cloud OAuth app? No. src/server/colab/auth.ts uses Google's public installed desktop OAuth client parameters (RFC 8252 + PKCE) out of the box, or you can set AGY_COLAB_OAUTH_CLIENT_ID and AGY_COLAB_OAUTH_CLIENT_SECRET in mcp_config.json to 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-colab directory, isolated from plugin installation files in ~/.gemini/config/plugins/agy-colab.
  • Where are proxy passwords protected? Proxy URLs stored in config.json are normalized and validated strictly (http:// / https:// only) and scrubbed by maskProxyUrl / scrubProxyCredentialsFromText before 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:

  1. Same-License Copyleft: Any derivative plugin, bundled MCP server, or distribution incorporating code from Colab GPU must be released under GPL-3.0 with complete corresponding source code accessible. Proprietary bundling or closed-source resale is prohibited.
  2. Preserve Attribution Chain: Retain LICENSE, NOTICE, and THIRD_PARTY_NOTICES.md intact, and preserve visible credit linking back to @Gruu6y and Gruu6y/Colab-GPU.
  3. Mark Modifications & Non-Endorsement: Document modification summaries and dates on altered files, and do not distribute modified forks under the unmodified Colab GPU / agy-colab branding 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.md and .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.txt digest file covering both agy-colab-v<version>.zip and agy-colab-v<version>.tar.gz.

Explore projetos relacionados

Carregando…