Repository navigation
Conversation
…tree dist/surface/cli.js has been one esbuild bundle since the cold-start fix, and package.json has no main/exports, so the 150 other tsc outputs under dist/ were never loaded. Ship cli.js, the dist/index.js back-compat shim and dist/guides/pack.json; leave CHANGELOG.md (346 KB) on GitHub. Tarball 1.94 MB -> 1.26 MB, unpacked 8.1 MB -> 5.8 MB, 193 -> 41 files. The .mcpb bundle copies the same set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BKm7nbpP8aK35EfAYVt7NL
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Amr · project thread
Summary
dist/surface/cli.jshas been a single esbuild bundle since the cold-start fix (scripts/bundle-cli.mjs), andpackage.jsonhas nomainorexports. That means the other ~150 tsc output files underdist/are published but never loaded. This PR ships only what runs, and leaves the 346 KB CHANGELOG on GitHub. This is 2 of 5 separate simplification PRs.Fewer files also helps the cold-install problem the bundle was built for, since Defender scans every file.
Changes
package.jsonfiles:dist/→dist/surface/cli.js,dist/index.js(the v0.x back-compat shim), anddist/guides/(the app-guide pack, read from disk at runtime).CHANGELOG.mdis dropped from the package. README links to it still resolve on npm, which points relative links at the repo.scripts/build-mcpb.mjs: copies the same set, as its comment says it should.Left out on purpose: I didn't remove the HTTP server, the dashboard,
notes/or the add-on packages. HTTP MCP is a documented feature, so removing it is a product decision.notes/internal/README.mdsays those notes are kept on purpose, and the add-ons are already opt-in and not part of the core package.Test plan
npm pack, then install the tarball into an empty project:clawdcursor --versionandnode dist/index.js --versionboth print 2.3.0mcp --compactlists 6 toolsmcplists 90 tools, andget_screen_sizereturns real values, so the lazy-loaded platform code is inside the bundledist/index.jsshim serves the same resultnpm run build:mcpb: not run here. The change is one copy list, and CI's extension-bundle job covers it.Risk / scope
The one risk is a runtime
requireof a siblingdist/file outside the bundle. I checked every__dirname,require.resolve,forkand spawn insrc/. The only on-diskdistread isdist/guides/pack.json, which ships. No guarantees in SECURITY.md are touched.Generated by Claude Code