Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(cli): ship every codex-acp binary in release archives (#4186)

Alberto Schiabel5e7432372aca
diff --git a/ts/packages/cli/CHANGELOG.md b/ts/packages/cli/CHANGELOG.md
index 1e7bdef63..d8bbf9e43 100644
--- a/ts/packages/cli/CHANGELOG.md
+++ b/ts/packages/cli/CHANGELOG.md
@@ -4,6 +4,12 @@
### Patch Changes
+- `composio upgrade` works again from any previously released CLI. Release
+ archives had been narrowed to carry only the `codex-acp` binary their own
+ platform can run, but a CLI installed before that change verifies a downloaded
+ package against all four platforms' binaries and rejects one that is missing
+ any of them, failing with `Downloaded binary package is incomplete`. Archives
+ ship the full set again.
- `COMPOSIO_ENVIRONMENT=staging` now opens the staging dashboard at
`https://staging-dashboard.composio.dev/`.
- `composio dev auth-configs create` now sends custom OAuth credentials and scopes
diff --git a/ts/packages/cli/scripts/_release-artifacts.ts b/ts/packages/cli/scripts/_release-artifacts.ts
index 9716d80ce..aaa1f831c 100644
--- a/ts/packages/cli/scripts/_release-artifacts.ts
+++ b/ts/packages/cli/scripts/_release-artifacts.ts
@@ -68,6 +68,12 @@ export const releaseArtifactTargetFor = (
* An archive already carries a platform-specific `composio` binary, so a
* darwin-arm64 archive is unusable on linux-x64 no matter which codex-acp
* binaries travel with it. Shipping foreign ones only inflates the download.
+ *
+ * Packaging deliberately does not call this yet. A CLI released before
+ * 2026-08-18 verifies a downloaded upgrade package against all four codex-acp
+ * paths, so an archive narrowed this way breaks `composio upgrade` for every
+ * client already in the field. Wire it back into `package-binaries.ts` once no
+ * supported client still performs that check.
*/
export const archiveCompanionRelativePaths = ({
allRelativePaths,
diff --git a/ts/packages/cli/scripts/package-binaries.ts b/ts/packages/cli/scripts/package-binaries.ts
index ef6fdbaab..6708b52ba 100644
--- a/ts/packages/cli/scripts/package-binaries.ts
+++ b/ts/packages/cli/scripts/package-binaries.ts
@@ -25,11 +25,7 @@ import {
collectExpectedRunCompanionAssetRelativePaths,
RUN_COMPANION_ALL_STATIC_ASSET_RELATIVE_PATHS,
} from '../src/services/run-companion-modules';
-import {
- archiveCompanionRelativePaths,
- ARTIFACT_NAMES,
- releaseArtifactTargetFor,
-} from './_release-artifacts';
+import { ARTIFACT_NAMES } from './_release-artifacts';
const BINARIES_DIR = './dist/binaries';
const COMPANIONS_DIR = path.join(BINARIES_DIR, 'companions');
@@ -49,8 +45,7 @@ export function packageBinaries() {
}
// One packaging host produces all four archives, so `COMPANIONS_DIR` must hold
- // every platform's codex-acp binary before packaging starts. Validate that full
- // set up front; each archive then receives only the slice it can execute.
+ // every platform's codex-acp binary before packaging starts.
const allCompanionRelativePaths = yield* collectExpectedRunCompanionAssetRelativePaths(
COMPANIONS_DIR,
{ staticAssetRelativePaths: RUN_COMPANION_ALL_STATIC_ASSET_RELATIVE_PATHS }
@@ -70,13 +65,16 @@ export function packageBinaries() {
yield* Console.log(`Packaging ${binaries.length} binaries...`);
for (const binary of binaries) {
- // An archive's `composio` binary is already platform-specific, so a foreign
- // codex-acp binary inside it could never run. Ship only this platform's.
- const target = yield* releaseArtifactTargetFor(binary);
- const companionRelativePaths = archiveCompanionRelativePaths({
- allRelativePaths: allCompanionRelativePaths,
- target,
- });
+ // Every archive ships every platform's codex-acp, even though its own
+ // `composio` binary can only ever execute one of them.
+ //
+ // A CLI released before 2026-08-18 verifies a downloaded upgrade package
+ // against all four codex-acp paths and refuses to install one that is
+ // missing any of them, so an archive carrying only its own binary breaks
+ // `composio upgrade` for every client already in the field. Narrowing the
+ // set is worth roughly 651 MB per archive, but it can only ship once no
+ // supported client still performs that check.
+ const companionRelativePaths = allCompanionRelativePaths;
const binaryPath = path.join(BINARIES_DIR, binary);
const zipPath = path.join(BINARIES_DIR, `${binary}.zip`);
diff --git a/ts/packages/cli/test/src/scripts/release-artifacts.test.ts b/ts/packages/cli/test/src/scripts/release-artifacts.test.ts
index f84bcf5df..093a67a72 100644
--- a/ts/packages/cli/test/src/scripts/release-artifacts.test.ts
+++ b/ts/packages/cli/test/src/scripts/release-artifacts.test.ts
@@ -138,3 +138,30 @@ describe('archiveCompanionRelativePaths', () => {
expect(archiveCompanionRelativePaths({ allRelativePaths: selected, target })).toEqual(selected);
});
});
+
+/**
+ * Packaging ships {@link RUN_COMPANION_ALL_STATIC_ASSET_RELATIVE_PATHS} into every
+ * archive rather than the narrowed slice, because a CLI released before
+ * 2026-08-18 verifies an upgrade package against all four codex-acp paths and
+ * refuses one that is missing any of them.
+ */
+describe('published archive companion coverage', () => {
+ it.each(RUN_CODEX_ACP_BINARY_TARGETS)(
+ 'ships the $platform-$arch codex-acp binary in every archive',
+ codexTarget => {
+ expect(RUN_COMPANION_ALL_STATIC_ASSET_RELATIVE_PATHS).toContain(codexTarget.relativePath);
+ }
+ );
+
+ it('covers one codex-acp binary per release artifact', () => {
+ expect(codexAcpRelativePathsIn(RUN_COMPANION_ALL_STATIC_ASSET_RELATIVE_PATHS)).toHaveLength(
+ RELEASE_ARTIFACT_TARGETS.length
+ );
+ });
+
+ it('keeps the portable assets alongside them', () => {
+ expect(RUN_COMPANION_ALL_STATIC_ASSET_RELATIVE_PATHS).toEqual(
+ expect.arrayContaining([...RUN_COMPANION_SHARED_STATIC_ASSET_RELATIVE_PATHS])
+ );
+ });
+});