WNC LogoWNC
UsługiRozwiązaniaFirmaAcademyLabsKontakt
Otwórzcie Kanban

We No Code. We Architect.

Rozpocznijcie projekt daniel@we-nocode.com
WNC LogoWNC

Partner w zakresie AI i automatyzacji. Tworzone z troską w USA, Polsce, Estonii, Brazylii i Ukrainie.

daniel@we-nocode.com+38 (068) 758-94-22+38 (095) 411-95-37
Remote-first, na całym świecie

Rozwiązania

  • Atflow
  • Alt Auth
  • AdCrier
  • Pastukh
  • Olymp Hill

Portale

  • Portal klienta
  • Portal inwestora
  • Portal partnera

Firma

  • O nas
  • Nasz zespół
  • Case studies
  • Opinie
  • Inwestycje
  • Blog
  • Wiadomości
  • Kariera
  • Lokalizacje
  • Kontakt

Labs

  • Miltech
  • AI Labs
  • Internet of Things
  • Robotics

Inicjatywy

  • Startup Program
  • Academy
  • Olymp Hill

Usługi

Wszystkie usługi
AI
  • Agentowe systemy AI
  • Agenci AI i copiloty
  • Serwery MCP
  • Potoki RAG
  • Głosowi agenci AI
  • Oprogramowanie zorientowane na AI
  • Automatyzacja procesów
  • LLMOps i evale
  • Fine-tuning i modele
  • AI dla dokumentów
  • Widzenie komputerowe
Rozwój oprogramowania
  • Rozwój webowy
  • Rozwój mobilny
  • Tworzenie SaaS i MVP
  • Projektowanie UI/UX
  • Integracje i API
  • Tworzenie e-commerce
  • Modernizacja systemów legacy
  • QA i automatyzacja testów
  • No-code i low-code
  • Rozwój desktopowy
Systemy wbudowane i IoT
  • Rozwiązania IoT
  • Firmware dla systemów wbudowanych
  • Wbudowany Linux i SoC
  • Edge AI i TinyML
  • Technologie bezprzewodowe i łączność
  • Prototypowanie sprzętu
  • Platforma IoT i chmura
  • Zarządzanie flotą i aktualizacje OTA
  • Przemysłowy IoT (IIoT)
  • Bezpieczeństwo IoT
Chmura i dane
  • Inżynieria danych
  • Chmurowa infrastruktura AI
  • Rozwój serwerowy
  • DevOps i platformy
  • Migracja i FinOps
  • BI i dashboardy
  • Analityka wydajności
  • Wsparcie i SRE
Bezpieczeństwo
  • Pentesty
  • Red teaming AI
  • Zgodność
  • Uwierzytelnianie
  • Bezpieczeństwo chmury
  • Bezpieczny SDLC
  • Łańcuch dostaw
  • Audyty bezpieczeństwa
  • Monitoring bezpieczeństwa
  • Zero trust
  • Prywatność i RODO
Doradztwo
  • Konsulting i usługi doradcze
  • CTO-as-a-service
  • Strategia i ład AI
  • Due diligence
  • Dedykowany zespół
  • Szkolenia AI dla firm
R&D / innowacje
  • Proof of concept i wykonalność
  • Szybkie prototypowanie
  • Stosowane badania AI
  • Rozpoznanie i poszukiwanie technologii

© 2026 WNC. Wszelkie prawa zastrzeżone.

🇺🇦Solidarni z Ukrainą

We No Code

Back to News
Claude Code's Entire Source Code Got Leaked via a Sourcemap in npm, Let's Talk About It
March 31, 2026GitHub

Claude Code's Entire Source Code Got Leaked via a Sourcemap in npm, Let's Talk About It

How Did This Even Happen?

This is the part that honestly made me go "...really?" When you publish a JavaScript/TypeScript package to npm, the build toolchain often generates source map files (.map files). These files are a bridge between the minified/bundled production code and the original source, they exist so that when something crashes in production the stack trace can point you to the actual line of code in the original file, not some unintelligible line 1, column 48293 of a minified blob. But the fun part is source maps contain the original source code. The actual, literal, raw source code, embedded as strings inside a JSON file. The structure of a .map file looks something like this:

"{ "version": 3, "sources": ["../src/main.tsx", "../src/tools/BashTool.ts", "..."], "sourcesContent": ["// The ENTIRE original source code of each file", "..."], "mappings": "AAAA,SAAS,OAAO..." }"

That sourcesContent array? That's everything. Every file. Every comment. Every internal constant. Every system prompt. All of it, sitting right there in a JSON file that npm happily serves to anyone who runs npm pack or even just browses the package contents. This is not a novel attack vector. It's happened before and honestly it'll happen again. The mistake is almost always the same: someone forgets to add *.map to their .npmignore or doesn't configure their bundler to skip source map generation for production builds. With Bun's bundler (which Claude Code uses), source maps are generated by default unless you explicitly turn them off.

Claude Code's Entire Source Code Got Leaked via a Sourcemap in npm, Let's Talk About It

The funniest part is, there's an entire system called "Undercover Mode" specifically designed to prevent Anthropic's internal information from leaking. They built a whole subsystem to stop their AI from accidentally revealing internal codenames in git commits... and then shipped the entire source in a .map file, likely by Claude.

What's Claude Under The Hood?

If you've been living under a rock, Claude Code is Anthropic's official CLI tool for coding with Claude and the most popular AI coding agent. From the outside, it looks like a polished but relatively simple CLI. From the inside, It's a 785KB main.tsx entry point, a custom React terminal renderer, 40+ tools, a multi-agent orchestration system, a background memory consolidation engine called "dream," and much more Enough yapping, here's some parts about the source code that are genuinely cool that I found after an afternoon deep dive:

BUDDY - A Tamagotchi Inside Your Terminal

I am not making this up. Claude Code has a full Tamagotchi-style companion pet system called "Buddy." A deterministic gacha system with species rarity, shiny variants, procedurally generated stats, and a soul description written by Claude on first hatch like OpenClaw. The entire thing lives in buddy/ and is gated behind the BUDDY compile-time feature flag.

The Gacha System

Your buddy's species is determined by a Mulberry32 PRNG, a fast 32-bit pseudo-random number generator seeded from your userId hash with the salt 'friend-2026-401':

"// Mulberry32 PRNG - deterministic, reproducible per-user function mulberry32(seed: number): () => number { return function() { seed |= 0; seed = seed + 0x6D2B79F5 | 0; var t = Math.imul(seed ^ seed >>> 15, 1 | seed); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; } }"

Same user always gets the same buddy.

18 Species (Obfuscated in Code)

The species names are hidden via String.fromCharCode() arrays - Anthropic clearly didn't want these showing up in string searches. Decoded, the full species list is:

Claude Code's Entire Source Code Got Leaked via a Sourcemap in npm, Let's Talk About It

On top of that, there's a 1% shiny chance completely independent of rarity. So a Shiny Legendary Nebulynx has a 0.01% chance of being rolled. Dang.

Stats, Eyes, Hats, and Soul

Each buddy gets procedurally generated: 5 stats: DEBUGGING, PATIENCE, CHAOS, WISDOM, SNARK (0-100 each) 6 possible eye styles and 8 hat options (some gated by rarity) A "soul" as mentioned, the personality generated by Claude on first hatch, written in character The sprites are rendered as 5-line-tall, 12-character-wide ASCII art with multiple animation frames. There are idle animations, reaction animations, and they sit next to your input prompt.

The Lore

The code references April 1-7, 2026 as a teaser window (so probably for easter?), with a full launch gated for May 2026. The companion has a system prompt that tells Claude:

"A small {species} named {name} sits beside the user's input box and occasionally comments in a speech bubble. You're not {name} - it's a separate watcher."

So it's not just cosmetic - the buddy has its own personality and can respond when addressed by name. I really do hope they ship it.

Read more:

https://github.com/Kuberwastaken/claude-code

Back to all news