Repository navigation
Guard against shipping a platform-incomplete CLI, and fix the channel credential README - #15
Merged
Merged
Conversation
… credential README 0.2.1 shipped only the darwin-arm64 CLI because the pack skipped the all-platform prepare step. CI now fails a pack that is missing any CLI target, and the README says which channel credential setup works on which version. Support ticket: T-1919, T-1777 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plugin:validate already fails on a missing CLI target on disk, so the CI step alone could not catch a release that skipped prepack (the 0.2.1 cause). pack:verify now also accepts a .tgz path, so the exact artifact about to be uploaded can be checked, and the README release notes say to do that. npm output parsing moved into a tested helper, npm launches through a shell on Windows, and the README no longer claims the env var works on every version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Plugin 0.2.1 shipped on ClawHub with only the macOS arm64 CLI binary (
vendor/agentmail/darwin-arm64/agentmail). On Linux and Windows the bundled CLI failed with "Exec format error", so the CLI-backed skill could not run (support tickets T-1919, T-1777).The vendor tree is only complete when
prepackrunscli:prepare -- --allduringnpm pack/npm publish. If a publish skips lifecycle scripts (--ignore-scripts) or packs a host-only build,npm packstill succeeds and silently ships one platform. Nothing failed a platform-incomplete pack.The channel README also documented a SecretRef
apiKeythat only resolves on 0.2.2+. On 0.2.1 the channel fails to start withunresolved SecretRef "env:default:AGENTMAIL_API_KEY".What changed
scripts/assert-cli-targets-packed.mjs(npm run pack:verify): runsnpm pack --dry-run --json --ignore-scriptsand fails if any of the 8 CLI targets insrc/cli/agentmail-cli-release.jsonis missing from the tarball that would publish. Added as a CI step afterplugin:validate.--ignore-scriptsis deliberate so the guard inspects the on-disk tree that will ship, instead of re-running prepack and masking the gap.src/cli/pack-targets.ts+src/cli/pack-targets.test.ts: small pure helpers (findMissingCliTargets,expectedCliVendorPaths,normalizePackPath) with unit tests.AGENTMAIL_API_KEYin the Gateway environment works on every version and is the simplest channel credential, and that the SecretRefapiKeyform needs 0.2.2+.Not in this PR
npm viewreturns E404) and is distributed as a ClawHub artifact, so how a provenance-signed release should publish (npm vs ClawHub, token vs OIDC) is an ops decision rather than something to guess in CI. Whatever workflow is added should gate onnpm run plugin:validatethennpm run pack:verifybefore publishing. See follow-ups.main(0.2.2, commit d85426f) and just needs to ship.How it was tested
tsc -p tsconfig.json --noEmit: clean.vitest run src/cli/pack-targets.test.ts: 5/5 pass; removing the helper makes the test fail to collect, confirming it exercises the new code.Support tickets: T-1919, T-1777
Update after review:
plugin:validate(run byprepackand CI) already fails when a CLI target is missing on disk, so the CI step alone cannot catch a release that skippedprepack, which is what happened with 0.2.1.pack:verifynow also takes a tarball path (npm run pack:verify -- <package>.tgz), and the README tells release owners to run it on the exact file they upload. A CI release workflow that always does this is still the proper long-term fix.🤖 Generated with Claude Code