Repository navigation
Bundle three CLI targets so 0.2.2 fits ClawHub's package size limit - #16
Merged
Merged
Conversation
ClawHub rejects a package whose files total more than 50 MiB. Each bundled AgentMail CLI executable is about 12 MiB, so the eight-target package from main (100.5 MB unpacked) cannot be published, which blocks shipping the SecretRef fix in 0.2.2. - Bundle darwin-arm64, linux-arm64, and linux-x64 only (35.7 MiB). - On other hosts, explain which targets are bundled and that the email channel does not use the CLI, instead of a bare "does not support". - pack:verify now also fails when a package exceeds ClawHub's 50 MiB limit, reading file sizes from the tarball or the npm pack file list. - pack:verify without a tarball crashed on npm 12, which prints pack results keyed by package name; parse both shapes. - plugin:validate fails when vendor/ still holds targets that are no longer declared, since cli:prepare never deletes them. - README: document the bundled platforms and publishing the verified .tgz, not the folder (the ClawHub CLI packs folders with --ignore-scripts, which is how 0.2.1 shipped a single target). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sidharth0612
approved these changes
Sep 30, 2026
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.
What was broken
0.2.2 (the SecretRef fix from #14) cannot be published to ClawHub from
main. A ClawHub dry run of the tarballnpm packbuilds fails:The ClawHub CLI rejects a package whose files total more than 50 MiB (
MAX_UNPACKED_BYTESin itsclawpack.js), or whose gunzipped tar exceeds 64 MiB. Each bundled AgentMail CLI executable is about 12 MiB, so the eight-target package #15 requires is 100.5 MB unpacked. At most three targets fit; four would leave about 100 KB of headroom, and the next CLI release would break it.This blocks the fix customers are waiting on: the channel's SecretRef
apiKeyfails on 0.2.1 (#13, plus support tickets).What changed
agentmail-cli-release.jsonnow declaresdarwin-arm64,linux-arm64, andlinux-x64, the common OpenClaw gateway hosts. The package is 35.7 MiB unpacked (13.4 MB packed).resolveAgentMailCliTargetnow names the bundled targets, says the email channel does not use the CLI, and links to the CLI releases, instead of a bare "does not support". The channel has no dependency on the CLI, so it works on every platform.pack:verifyfails when a package exceeds ClawHub's 50 MiB limit, in addition to checking for missing targets. It reads sizes from the.tgzitself (newlistTarballEntries, which reads the archive the way ClawHub does) or from thenpm packfile list.pack:verifywithout a tarball crashed on npm 12, which prints pack results as an object keyed by package name rather than an array.parseNpmPackEntriesaccepts both shapes.plugin:validatefails whenvendor/still holds targets that are no longer declared.cli:preparenever deletes targets, so a machine that prepared all eight would otherwise pack them again..tgz, not the folder. The ClawHub CLI packs a folder withnpm pack --ignore-scripts, which skipsprepack; that is how 0.2.1 shipped only the darwin-arm64 CLI.Verification
npm test: 239 passed. New tests: tarball parsing against a realnpm packoutput (including a path longer than the 100-byte ustar name field), both npm pack JSON shapes, and the unsupported-host message.vendor/:plugin:check,plugin:validate(3 targets prepared), andpack:verifyall pass. The same steps run in CI.pack:verifyon the old eight-target tarball fails with95.8 MiB unpacked; ClawHub rejects packages over 50.0 MiB.plugin:validatewith a stale eight-targetvendor/fails and names the five undeclared targets.clawhub package publish ./agentmail-agentmail-0.2.2.tgz --dry-runpasses: 78 files, 35.7 MB.Not in this PR
plugin:buildon a non-bundled developer machine (Intel Mac, Windows) now fails incli:preparewith "no packaged target". CI (linux-x64) and Apple silicon machines are unaffected.After merge
Publish 0.2.2 from the merge commit:
Then open a PR on openclaw/openclaw to move the official catalog pin (added in openclaw/openclaw#155097) from
clawhub:@agentmail/agentmail@0.2.1to 0.2.2 and its sha256. Existing ClawHub installs are trusted by package name andclawhubChannel, not by version, so 0.2.2 installs stay trusted before that PR lands.🤖 Generated with Claude Code