Live data from Hacker News

Claude Code's source code has been leaked via a map file in their NPM registry

twitter.com

171–180 of 1001 posts

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#171

Earlier quoted context omitted.

An LLM company using regexes for sentiment analysis? That's like a truck company using horses to transport parts. Weird choice.

Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.

Why do you need to do it at the client side? You are leaking so much information on the client side. And considering the speed of Claude code, if you really want to do on the client side, a few seconds won't be a big deal.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#172
post #138

Earlier quoted context omitted.

what you are suggesting would be like a truck company using trucks to move things within the truck

That’s what they do. Ever heard of a hand truck?

Do we have a hand llm perchance?

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#173

Maybe the OP could clarify, I don't like reading leaked code, but I'm curious: my understanding is that is it the source code for "claude code", the coding assistant that remotely calls the LLMs. Is that correct ? The weights of the LLMs are _not_ in this repo, right ? It sure sucks for anthropic to get pawned like this, but it should not affect their bottom line much ?

Yes it's the claude code CLI tool / coding agent harness, not the weights.

This code hasn't been open source until now and contains information like the system prompts, internal feature flags, etc.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#174
post #149

Earlier quoted context omitted.

export function extractSearchToken(completionToken: { token: string; isQuoted?: boolean; }): string { if (completionToken.isQuoted) { // Remove @" prefix and optional closing " return completionToken.token.slice(2).replace(/"$/, ''); } else if (completionToken.token.startsWith('@')) { return completionToken.token.substring(1); } else { return completionToken.token; } } Why even use else if with return...

I always write code like that. I don't like early returns. This approximates `if` statements being an expression that returns something.

I’m not strongly opinionated, especially with such a short function, but in general early return makes it so you don’t need to keep the whole function body in your head to understand the logic. Often it saves you having to read the whole function body too.

But you can achieve a similar effect by keeping your functions small, in which case I think both styles are roughly equivalent.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#175
post #140
post #19

Would be interesting to run this through Malus [1] or literally just Claude Code and get open source Claude Code out of it. I jest, but in a world where these models have been trained on gigatons of open source I don't even see the moral problem. IANAL, don't actually do this. https://malus.sh/

Oh god, I was so close to believing Malus was a real product and not satire.

Yeah... look again.

https://www.youtube.com/watch?v=6godSEVvcmU

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#177

Undercover mode also pretends to be human, which I'm less ok with: https://github.com/chatgptprojects/claude-code/blob/642c7f94...

This is my pet peeve with LLMs, they almost always fails to write like a normal human would. Mentioning logs, or other meta-things which is not at all interesting.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#179
post #86
post #82

Earlier quoted context omitted.

https://github.com/instructkr/claude-code this one has more stars and more popular

won't they just try to dmca or take these down especially if they're more popular

Which is why you should clone it right now

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#180

Finally all spinner verbs revealed: https://github.com/instructkr/claude-code/blob/main/src/cons...

It's not hard to find them, they are in clear text in the binary, you can search for known ones with grep and find the rest nearby. You could even replace them inplace (but now its configurable).
Post reply on HN