Repository navigation
Added
- Zero-to-One Onboarding, 8-Layer Diagnostics & Safe MCP Setup (
onboarding.py,server.py):- Added
kgsh init(interactive &--non-interactivecredential setup with live Kaggle token validation, automaticKGAT_...username resolution, and atomic0600.envwrites). - 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.comreachability, GitHub Releases reachability, prebuiltkgsh-tuiavailability, and orphan running GPU kernel detection). - Added
kgsh setup <claude|cursor|windsurf|codex|antigravity> [--dry-run] [--config <path>]to safely merge thekgshMCP server block into JSON or TOML configs with atomic0600.bakbackups and zero secret leaks.
- Added
- MCP 2026
ToolAnnotations& Livekaggle_upProgress (server.py,launcher.py):- Annotated all 14 MCP tools with MCP 2026
ToolAnnotations(readOnlyHint,destructiveHint,idempotentHint,openWorldHint) compatible with bothmcpv1 and v2. - Upgraded
kaggle_uptoasyncwith livectx.report_progress(...)stage updates across kernel push, container boot, tunnel handshake, and readiness polling.
- Annotated all 14 MCP tools with MCP 2026
- 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 andkaggle_attachMCP 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+/channelsAPI to bootstrapworker_template.py(ATTACHED=True, no cloudflared/watchdog) on port8765, then deletes the temporary kernel so notebook state stays untouched. kgsh down/kaggle_downand TUIxcleanly detach attached sessions without pushing over or deleting the interactive notebook (even when local Kaggle API credentials are unset);kgsh uidisplays[ATTACHED]badges across the header, Remote pane, status bar, and Workers modal.
- Added
- Chunked Resumable Transfer & RAM-Only
SecretsVault(client.py,sync.py,worker_template.py,server.py):- Added
/fs/upload_chunkand/fs/download_range(default16 MiBchunks, per-chunkSHA-256verification, atomic.partfinalize withEXDEVcross-device copy fallback,X-Total-Sizelock, and automatic HTTP 404 fallback for older workers), enabling reliable multi-GB checkpoint/dataset transfers through Cloudflare Quick Tunnels with a20 GiBdisk-backed streaming tar ceiling. - Added in-memory
SecretsVault(/secrets/set,/secrets/list,/secrets/clear) andkgsh secret set/list/clearCLI (KEY=VALUE, interactivegetpass,--from-env NAME,--stdin NAME). Secrets live strictly in worker RAM (never written to disk), inject into PTY sessions (MAX_CANON-safe<=2048 Blines underset +o historywithmarker_seenversion gating) and background jobs, and are redacted longest-first from PTY outputs, job logs, and events.
- Added
- Warm TUI Bridge Daemon,
FileEditorv2 & Transfer Progress HUD (bridge.py,tui/):- Added persistent NDJSON-RPC
python -m kaggle_mcp.bridge --daemonsidecar 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
FileEditorwith 100-snapshot bounded Undo/Redo (Ctrl+Z,Ctrl+Y,Ctrl+Shift+Z), incremental Unicode-safe Find bar (Ctrl+F,Enter/F3,Shift+F3,Esccloses Find bar first), andunicode-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, streaming20 GiBtar cap) with a liveMB / total (%)transfer progress HUD and instantEsccancellation (CancelToken+.partcleanup).
- Added persistent NDJSON-RPC
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.
- Rejects loopback, private, link-local, CGNAT (
- 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 HTTP403on/secrets/set, redacts active vault secrets longest-first across worker PTY/job/event outputs, scrubsKGAT_*& secret env values before formatting onboarding diagnostics, and uses POSIXO_EXCL+ nonce + short-write-safe atomic writes (0600) with atomic0600.bakbackups inonboarding.py.
- Blocks dangerous env override keys (
Install / Upgrade
pip install -U kaggle-shell-mcp
# or
uv tool upgrade kaggle-shell-mcpFull Changelog: v1.0.1...v1.1.0