Skip to content

Releases

v1.1.0 — Onboarding, Jupyter Proxy Attach, MCP 2026, Chunked Transfer & Warm TUI

Choose a tag to compare

@NguyenQuocDat06-AI NguyenQuocDat06-AI released this 05 Dec 10:32

Added

  • Zero-to-One Onboarding, 8-Layer Diagnostics & Safe MCP Setup (onboarding.py, server.py):
    • Added kgsh init (interactive & --non-interactive credential setup with live Kaggle token validation, automatic KGAT_... username resolution, and atomic 0600 .env writes).
    • Added kgsh doctor [--comp <slug>] [--no-net] [--json] executing 8 zero-GPU-cost checks (Python/SDK versions, credentials & live auth, Kaggle API/phone verification & weekly GPU/TPU quota, optional competition rules check, trycloudflare.com reachability, GitHub Releases reachability, prebuilt kgsh-tui availability, and orphan running GPU kernel detection).
    • Added kgsh setup <claude|cursor|windsurf|codex|antigravity> [--dry-run] [--config <path>] to safely merge the kgsh MCP server block into JSON or TOML configs with atomic 0600 .bak backups and zero secret leaks.
  • MCP 2026 ToolAnnotations & Live kaggle_up Progress (server.py, launcher.py):
    • Annotated all 14 MCP tools with MCP 2026 ToolAnnotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) compatible with both mcp v1 and v2.
    • Upgraded kaggle_up to async with live ctx.report_progress(...) stage updates across kernel push, container boot, tunnel handshake, and readiness polling.
  • Interactive Notebook Attach Mode (attach.py, launcher.py, worker_template.py, server.py, bridge.py, tui/):
    • Added kgsh attach <jupyter_proxy_url> [-s <slot>] [-f] CLI command and kaggle_attach MCP tool (14th tool) to attach to an already-running Kaggle Interactive Notebook without consuming an extra headless commit slot.
    • Uses a zero-dependency Python stdlib RFC 6455 TLS WebSocket client over Jupyter Server's /api/kernels + /channels API to bootstrap worker_template.py (ATTACHED=True, no cloudflared/watchdog) on port 8765, then deletes the temporary kernel so notebook state stays untouched.
    • kgsh down / kaggle_down and TUI x cleanly detach attached sessions without pushing over or deleting the interactive notebook (even when local Kaggle API credentials are unset); kgsh ui displays [ATTACHED] badges across the header, Remote pane, status bar, and Workers modal.
  • Chunked Resumable Transfer & RAM-Only SecretsVault (client.py, sync.py, worker_template.py, server.py):
    • Added /fs/upload_chunk and /fs/download_range (default 16 MiB chunks, per-chunk SHA-256 verification, atomic .part finalize with EXDEV cross-device copy fallback, X-Total-Size lock, and automatic HTTP 404 fallback for older workers), enabling reliable multi-GB checkpoint/dataset transfers through Cloudflare Quick Tunnels with a 20 GiB disk-backed streaming tar ceiling.
    • Added in-memory SecretsVault (/secrets/set, /secrets/list, /secrets/clear) and kgsh secret set/list/clear CLI (KEY=VALUE, interactive getpass, --from-env NAME, --stdin NAME). Secrets live strictly in worker RAM (never written to disk), inject into PTY sessions (MAX_CANON-safe <=2048 B lines under set +o history with marker_seen version gating) and background jobs, and are redacted longest-first from PTY outputs, job logs, and events.
  • Warm TUI Bridge Daemon, FileEditor v2 & Transfer Progress HUD (bridge.py, tui/):
    • Added persistent NDJSON-RPC python -m kaggle_mcp.bridge --daemon sidecar with deadlock-free stderr draining, automatic one-shot fallback when busy (>500 ms) or unsupported, and one-time auto-restart—cutting TUI Kaggle API actions from ~1s cold Python startup to sub-100ms warm calls.
    • Upgraded FileEditor with 100-snapshot bounded Undo/Redo (Ctrl+Z, Ctrl+Y, Ctrl+Shift+Z), incremental Unicode-safe Find bar (Ctrl+F, Enter/F3, Shift+F3, Esc closes Find bar first), and unicode-width = "0.2" visual column/mouse hit-testing for Vietnamese combining marks and CJK characters.
    • Implemented full chunked upload/download parity in tui/src/worker.rs (pure-Rust FIPS 180-4 SHA-256, X-Upload-Filename-B64, streaming 20 GiB tar cap) with a live MB / total (%) transfer progress HUD and instant Esc cancellation (CancelToken + .part cleanup).

Security

  • SSRF IP-Pinned Attach & Local Proxy Token Redaction (attach.py, client.py, worker.rs):
    • Rejects loopback, private, link-local, CGNAT (100.64.0.0/10), multicast, reserved, metadata hostnames, and IPv6 transition addresses (IPv4-mapped, 6to4, Teredo, NAT64) before pinning the resolved IP on both HTTPS (httpcore/httpx) and TLS WebSocket (SNI) connections; local clients (attach.py, client.py, tui/src/worker.rs) scrub /k/<id>/<token> proxy paths across status outputs, diagnostics, and errors.
  • Vault Injection & Atomic Config Hardening (worker_template.py, onboarding.py):
    • Blocks dangerous env override keys (LD_PRELOAD, LD_LIBRARY_PATH, PYTHONPATH, PYTHONSTARTUP, PYTHONBREAKPOINT, BASH_ENV, ENV, PATH, etc.) with HTTP 403 on /secrets/set, redacts active vault secrets longest-first across worker PTY/job/event outputs, scrubs KGAT_* & secret env values before formatting onboarding diagnostics, and uses POSIX O_EXCL + nonce + short-write-safe atomic writes (0600) with atomic 0600 .bak backups in onboarding.py.

Install / Upgrade

pip install -U kaggle-shell-mcp
# or
uv tool upgrade kaggle-shell-mcp

Full Changelog: v1.0.1...v1.1.0

v1.0.1 — Reliability, Security & Multi-Platform TUI Hotfixes

Choose a tag to compare

@NguyenQuocDat06-AI NguyenQuocDat06-AI released this 27 Nov 18:43

Highlights in v1.0.1

Added

  • Linux ARM64 (�arch64 static musl) &
    ustls Prebuilt TUI
    : Added kgsh-tui-linux-aarch64.tar.gz alongside linux-x86_64, windows-x86_64, macos-arm64, and macos-x86_64, plus KGSH_TUI_BIN override.
  • SSH-Ready Clipboard (OSC 52 + Internal Yank Buffer + Bracketed Paste) & Multi-GPU HUD: Preserves Ctrl+X/Ctrl+C/Ctrl+V on headless SSH servers without X11/Wayland, displays all GPUs (GPU0, GPU1, ..., °C), and adds modal scrolling on compact terminals.
  • Offline Batch Auto-Harvest & Run-Scoped Batch Slugs: Automatically copies newly created/modified outputs (submission.csv, checkpoints/) from /tmp/kgsh_batch_work into /kaggle/working on exit and isolates batch runs under /kgsh-batch--.

Fixed & Hardened

  • Safe Remote FileEditor: 256 KB cap, automatic Read-Only lock on truncated/binary files, unsaved-change Esc guard, and HTTP 412 overwrite protection.
  • 3-Tier Verified kaggle_down & Provisioning Persistence: Never wipes sessions.json while a GPU VM is still running; supports --force ( orce=True) cancellation and resumes provisioning boots without pushing duplicate kernel versions.
  • Security: Default credential exclusion (.env*, kaggle.json, private keys) on s_sync/Push, child-env secret scrubbing,

v1.0.0 — Native Rust Dual-Panel TUI & Prebuilt Releases

Choose a tag to compare

@NguyenQuocDat06-AI NguyenQuocDat06-AI released this 27 Nov 07:08

kaggle-shell-mcp v1.0.0

Highlights

  • Native Rust 60-FPS Dual-Panel TUI Cockpit (kgsh ui / kgsh top):
    • 4 dual-panel presets (F1 Cockpit, F2 Files, F3 Jobs, F4 Hub), Yazi-style arrow navigation, cross-panel clipboard & transfers, preview drawer, Smart Inspector (.csv/.parquet/.zip/.safetensors/.pt), Kaggle Hub browser, and Boot Profiles.
    • Real-time foreground loop tailing (pty_live on /monitor + /term/interrupt) and clean content-only Shift/Ctrl+Shift & mouse drag text selection.
  • Zero-Setup Prebuilt Binary Auto-Download ( ui_bin.py,
    elease-tui.yml)
    :
    • PyPI / uv tool users can run kgsh ui without a Rust toolchain; kgsh downloads the matching Windows/Linux/macOS binary from GitHub Releases with SHA-256 verification.
  • MCP & CLI: 13 MCP tools + SSH-style REPL (kgsh shell) + Offline Competition Runner (L4x4 / RTX Pro 6000 + Host SSE logs).

v0.2.0 — Multi-Slot GPU VMs & Offline Competition Runner

Choose a tag to compare

@NguyenQuocDat06-AI NguyenQuocDat06-AI released this 24 Nov 19:46

Changelog

All notable changes to kaggle-shell-mcp (kgsh) will be documented in this file.

[0.2.0] - 2026-11-25

Added

  • Multi-Slot Concurrent GPU Architecture (slot="1", "2", "1,2"):
    • Run up to 2 parallel headless Kaggle GPU sessions simultaneously (4 × Tesla T4 = 60 GB VRAM) with isolated kernel slugs, isolated handshake datasets, and a cross-process file-locked .kaggle_mcp/sessions.json store (auto-migrating legacy active_session.json).
    • Added per-job GPU pinning (gpu_ids / --gpus) in job_spawn via isolated CUDA_VISIBLE_DEVICES, enabling up to 4 concurrent single-GPU experiments across 2 Dual-T4 VMs.
    • Added slot="all" support in kaggle_status and kaggle_down, plus automatic stale-session cleanup when Kaggle reports terminal kernel states (COMPLETE, ERROR, CANCEL_ACKNOWLEDGED).
  • Full Hardware Accelerator, Competition & Model Hub Support (accelerators.py):
    • Added accelerator aliases and passthrough shapes (NvidiaTeslaT4, NvidiaL4, NvidiaL4x4, NvidiaRtxPro6000, NvidiaH100, TpuV5E8, TpuV6E8, cpu).
    • Automatic TPU runtime window adjustment (8h35m SIGTERM drain / 8h40m clean exit before Kaggle's 9h TPU cap).
    • Added competition (competition_sources) and mount_models (model_sources) parameters with immediate source-validation error reporting from ApiSaveKernelResponse.
  • Offline Competition Runner & Live Host SSE Logs (batch.py):
    • kaggle_wheelhouse (kgsh wheels): Builds Linux manylinux_x86_64 binary wheel datasets for air-gapped kernels.
    • kaggle_batch_run (kgsh batch-run): Runs competition jobs with enable_internet=False using atomic inline code embedding (<= 512 KB) or .kgsh dataset archives (> 512 KB, preventing Kaggle auto-decompression races).
    • kaggle_batch_logs (kgsh batch-logs): Non-blocking windowed Host SSE log reader (kernels_logs_stream) that streams live logs even when container internet access is disabled.

[0.1.0] - 2026-11-24

Added

  • Headless 12h Kaggle Dual-T4 Provisioner (kaggle_up, kaggle_status, kaggle_down): Boots background Kaggle GPU kernels (NvidiaTeslaT4, 2×15 GB VRAM) via Kaggle API with zero browser interaction.
  • Zero-Setup Tunnel & Private Dataset Handshake: Automatic cloudflared Quick Tunnel supervisor paired with private Kaggle Dataset state sync (<user>/kaggle-mcp-state), plus optional Tailscale userspace networking (TS_AUTHKEY).
  • Stateful Remote PTY (term_exec): Persistent /bin/bash PTY preserving cwd, shell exports, Conda/venv environments, and native CUDA paths.
  • Detached Background Job Engine (job_spawn, job_list, job_logs, job_kill): Process-group isolated training jobs with persistent logs in /kaggle/working/mcp_logs and automatic tqdm carriage-return (\r) compaction.
  • Filtered Tar Streaming (fs_sync): Fast bidirectional directory/file sync ignoring .git, .venv, __pycache__, and node_modules.
  • Snapshot & Optional Idle Watchdogs: Graceful SIGTERM checkpoint flush at 11h35m + clean exit(0) at 11h40m (preserving /kaggle/working snapshots before Kaggle's 12h reaper), plus opt-in idle GPU auto-shutdown (idle_timeout_min, disabled by default).
  • Dual Interface: Full Model Context Protocol (stdio) server (mcp v1 & v2 compatible) and short kgsh CLI (kaggle-shell-mcp & kaggle-mcp aliases included).