src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…
> This should be at minimum 8–10 separate modules. Can't really say that for sure. The way humans structure code isn't some ideal best possible state of computer code, it's the ideal organization of computer code for human coders . Nesting and cyclomatic complexity are indicators ("code smells"). They aren't guaranteed to lead to worse outcomes. If you have a function with 12 levels of nesting, but in each nest the f…
Claude Code's source code has been leaked via a map file in their NPM registry
611–620 of 1001 posts
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#612src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…
> This should be at minimum 8–10 separate modules. Can't really say that for sure. The way humans structure code isn't some ideal best possible state of computer code, it's the ideal organization of computer code for human coders . Nesting and cyclomatic complexity are indicators ("code smells"). They aren't guaranteed to lead to worse outcomes. If you have a function with 12 levels of nesting, but in each nest the f…
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#613src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…
How is it that a AI coding agent that is supposedly _so great at coding_ is running on this kind of slop behind the scenes. /s
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#614Really surprising how many people are downplaying this leak! "Google and OpenAi have already open sourced their Agents, so this leak isn't that relevant " What Google and OpenAi have open sourced is their Agents SDK, a toolkit, not the secret sauce of how their flagship agents are wired under the hood! expect the takedown hammer on the tweet, the R2 link, and any public repos soon
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#615src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…
here's another gem. src/ink/termio/osc.ts:192–210 void execFileNoThrow('wl-copy', [], opts).then(r => { if (r.code === 0) { linuxCopy = 'wl-copy'; return } void execFileNoThrow('xclip', ...).then(r2 => { if (r2.code === 0) { linuxCopy = 'xclip'; return } void execFileNoThrow('xsel', ...).then(r3 => { linuxCopy = r3.code === 0 ? 'xsel' : null }) }) }) are we doing async or not?
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#616Was searching for the rumored Mythos/Capybara release, and what even is this file? https://github.com/chatgptprojects/claude-code/blob/642c7f94...
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#617Amusingly, they deprecated it with a message of "Unpublished" instead of actually unpublishing it [1]. When you use npm unpublish it removes the package version from the registry, when you use npm deprecate it leaves it there and simply marks the package as deprecated with your message. I have to imagine the point was to make it harder for people to download the source map, so to deprecate it with this message gives…
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#618Earlier quoted context omitted.
> Someone said 10,000x slower, but that's off - in my experience - by about four orders of magnitude. You do know that 10,000x _is_ four orders of magnitude, right? :-D
OP is saying that in their experience it is more like eight orders of magnitude
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#619Earlier quoted context omitted.
(spoiler alert) Buddy system is this year's April Fool's joke, you roll your own gacha pet that you get to keep. There are legendary pulls. They expect it to go viral on Twitter so they are staggering the reveals.
lol that's funny, I have been working seriously [1] on a feature like this after first writing about it jokingly [2] earlier this year. The joke was the assistant is a cat who is constantly sabotaging you, and you have to take care of it like a gacha pet. The seriousness though is that actually, disembodied intelligences are weird, so giving them a face and a body and emotions is a natural thing, and we already see t…
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#620Earlier quoted context omitted.
You'll never win this battle, so why waste feelings and energy on it? That's where the internet is headed. There's no magical human verification technology coming to save us.
I am actively building non-magical human verification technology that doesn't require you uploading your retinal scans or ID to billionaires or incompetent outsourcing firms.