@devries-cameron20 / composio-1 / commits / 64406ff35
Fork 0

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

chore(cli): bump Bun to 1.4.0 and replace tar with Bun.Archive (#4183)

Bumps the mise-pinned Bun toolchain from 1.3.10 to 1.4.0 and replaces the one CLI dependency that a Bun 1.4 built-in can verifiably take over. ## Binary size: Linux shrinks a lot, macOS grows a little Measured per target, byte counts from `build:binary:all` on a darwin-arm64 host. | Target | Before (1.3.10) | After runtime (1.4.0) | After full | Δ total | Δ % | |---|---:|---:|---:|---:|---:| | `composio-darwin-aarch64` | 80,850,704 (77.1 MiB) | 83,790,962 (79.9 MiB) | 83,790,962 (79.9 MiB) | +2,940,258 (+2.8 MiB) | +3.6% | | `composio-darwin-x64` | 85,710,240 (81.7 MiB) | 90,430,880 (86.2 MiB) | 90,430,880 (86.2 MiB) | +4,720,640 (+4.5 MiB) | +5.5% | | `composio-linux-x64` | 123,666,298 (117.9 MiB) | 102,270,152 (97.5 MiB) | 102,270,152 (97.5 MiB) | -21,396,146 (-20.4 MiB) | -17.3% | | `composio-linux-aarch64` | 121,153,270 (115.5 MiB) | 102,221,816 (97.5 MiB) | 102,221,816 (97.5 MiB) | -18,931,454 (-18.1 MiB) | -15.6% | **Attribution — read this before quoting the numbers.** Every byte of movement above comes from the **Bun runtime bump**, not from dependency removal. The "after runtime" and "after full" columns are byte-identical: the only dependency dropped here is `tar`, a devDependency used by one build script that never reaches the binary. Its size contribution is exactly **0 bytes**. (The identical columns also confirm the compiled build is reproducible across runs.) Linux users — the large majority of installs — get a ~18-20 MiB smaller binary. macOS grows 2.8-4.5 MiB. This matches the direction upstream reports for the standalone Bun binary. ## What changed - `mise.toml` pins `bun = "1.4.0"`; `mise.lock` regenerated with the exact platform list `ts.audit` uses. - `scripts/_acp-adapters.ts` extracts npm tarballs with `Bun.Archive` instead of the `tar` package. - `tar` dropped from `@composio/cli` devDependencies (plus `@isaacs/fs-minipass`, `chownr`, `minizlib`, `yallist` from the lockfile). ## Verified negative results These are the two adjacent candidates a reviewer would expect to see replaced. Both were probed against a real Bun 1.4.0 binary and both fail — recorded here so nobody re-derives the dead ends: - **`extract-zip` stays.** `Bun.Archive` cannot read zip: `new Bun.Archive(zipBytes)` throws `Unrecognized archive format`, and `ArchiveOptions.compress` accepts only `"gzip"`. Still used at three call sites. - **`semver` stays.** `Object.keys(Bun.semver)` returns exactly `["satisfies", "order"]`. The CLI also needs `valid`, `prerelease`, `compare`, `gt`, and `lt`. `valid` and `prerelease` have no equivalent, so a partial migration would only add a second semver dialect. ## `json5` → `Bun.JSON5` was attempted and backed out `parse-json.ts` is covered by the CLI's Vitest suite, which runs on **Node**, where the `Bun` global does not exist — `Bun.JSON5.parse` throws `ReferenceError` under test. The suite cannot move to the Bun runtime (88 of 122 files fail there on unrelated zod resolution errors), and `bun test` for a single file would conflict with the repo's `@effect/vitest` lint rule. The swap itself is sound — `Bun.JSON5.parse` matched the `json5` package on all nine contract cases against a real 1.4.0 binary, including `SyntaxError` on malformed input. It is the test harness, not the parser, that blocks it. Deferred rather than shipped with weakened coverage. For sizing the follow-up: `--metafile-md` puts `json5` at **28,045 bytes (0.1%)** of the JS bundle, imported only by `src/utils/parse-json.ts` — roughly 0.03% of a compiled binary. Worth doing for dependency-surface reasons, not for size. ## Verification - All four release targets cross-compile on Bun 1.4.0. - `mise lock --platform linux-x64,linux-arm64,macos-arm64,macos-x64` then `git diff --exit-code mise.lock` is clean, replayed in a CI-like environment. - `pnpm typecheck` clean; CLI suite green (122 files, 1248 passed, 1 skipped). - `Bun.Archive` adapter build against the live npm registry produces codex-acp binaries **byte-identical** (SHA-256) to the `tar`-produced ones, at the same `package/bin/<name>` paths, executable after `chmod`, extracted concurrently. A truncated tarball throws `ReadError` rather than silently yielding an empty directory. - Runtime smoke on the 1.4.0 binary: `composio version`, `composio --help`, and the `composio run` companion-module spawn path (reports `process.version` v26.3.0 — no Node 26 stream regression). `extract-zip` verified working under the new runtime. ### Not run locally `pnpm test:e2e:cli` needs Docker, which was unavailable on this machine. CI covers it. Worth a look at that job: the e2e image is version-keyed and has served a stale Bun binary from a cached layer before, so confirm the container reports 1.4.0. ## Notes - `@types/bun` is deliberately not bumped: `Bun.JSON5` and `Bun.Archive` are already declared in the installed `bun-types@1.3.14`, no `@types/bun` 1.4.x exists yet, and `minimumReleaseAge` would block a fresh pin anyway. - No changeset: `@composio/cli` is in `.changeset/config.json`'s `ignore` list and no published package is touched. - `mise lock` locally adds a stray `[[tools.node]] 24.19.0` block sourced from the developer's global mise config. It was stripped; the committed lock is stable under the audit gate's exact command.

Alberto Schiabel committed Aug 20, 2026 at 20:02 UTC 64406ff359d250cb4bc41f03b8dd90031efe8cfd
5 files changed +22 -66
mise.lock
+19 -19
@@ -1,44 +1,44 @@
1 # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html
2
3 [[tools.bun]]
4 -version = "1.3.10"
4 +version = "1.4.0"
5 backend = "core:bun"
6
7 [tools.bun."platforms.linux-arm64"]
8 -checksum = "sha256:fa5ecb25cafa8e8f5c87a0f833719d46dd0af0a86c7837d806531212d55636d3"
9 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-linux-aarch64.zip"
8 +checksum = "sha256:4b1a332ee861983eb93bcfe6f770fff94e3e31b2c388bdaea3c8ed35e58eed0e"
9 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-aarch64.zip"
10
11 [tools.bun."platforms.linux-arm64-musl"]
12 -checksum = "sha256:d2c81365a2e529b78a42330d3a0056e8dbd7896b4a6782c8e392b6532141e34d"
13 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-linux-aarch64-musl.zip"
12 +checksum = "sha256:576300ce33ff16ffcd455bf178c2f095f9df845c6cc3d0284ba1c96ca0e80473"
13 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-aarch64-musl.zip"
14
15 [tools.bun."platforms.linux-x64"]
16 -checksum = "sha256:f57bc0187e39623de716ba3a389fda5486b2d7be7131a980ba54dc7b733d2e08"
17 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-linux-x64.zip"
16 +checksum = "sha256:2d03fb5fb83ac8b567aca0a281b2ce1a1a19d488f56c2968d88c3f25e92fe452"
17 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64.zip"
18
19 [tools.bun."platforms.linux-x64-baseline"]
20 -checksum = "sha256:41201a8c5ee74a9dcbb1ce25a1104f1f929838b57a845aa78d98379b0ce7cde2"
21 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-linux-x64-baseline.zip"
20 +checksum = "sha256:184fb4595f0d401a217cf7c78c1bc430ba83314dab7a8b94805babbf7fa7097f"
21 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64-baseline.zip"
22
23 [tools.bun."platforms.linux-x64-musl"]
24 -checksum = "sha256:48a6c32277d343db0148ce066336472ffd380358a4d26bb1329714742492d824"
25 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-linux-x64-musl.zip"
24 +checksum = "sha256:83b5f12fd258dd8d4fdcaea65ede954366aa717dab399e20093ecab280d54e7a"
25 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64-musl.zip"
26
27 [tools.bun."platforms.linux-x64-musl-baseline"]
28 -checksum = "sha256:a7bc4cdea1ef255a83adbf39c7aafcd30e09f2b8f74deec4b10ee318bc024d1f"
29 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-linux-x64-musl-baseline.zip"
28 +checksum = "sha256:618c4bc1f94b02337ee210003c0b7c066f11548a8cdc5109df10db043dc47ca2"
29 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64-musl-baseline.zip"
30
31 [tools.bun."platforms.macos-arm64"]
32 -checksum = "sha256:82034e87c9d9b4398ea619aee2eed5d2a68c8157e9a6ae2d1052d84d533ccd8d"
33 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-darwin-aarch64.zip"
32 +checksum = "sha256:c669e97f6164e1c96e0701748db98dfa77492908cbd8394c7557134a735de381"
33 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-darwin-aarch64.zip"
34
35 [tools.bun."platforms.macos-x64"]
36 -checksum = "sha256:c1d90bf6140f20e572c473065dc6b37a4b036349b5e9e4133779cc642ad94323"
37 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-darwin-x64.zip"
36 +checksum = "sha256:1d0211b8f1dc991182344687ad15e72ee86f154845a5f7fa477994cd341dd9b0"
37 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-darwin-x64.zip"
38
39 [tools.bun."platforms.macos-x64-baseline"]
40 -checksum = "sha256:f9686c4e4e760db4cde77a0f1fad05e552648b9c9cbfa4f7fc9a7ec26b9f3267"
41 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-darwin-x64-baseline.zip"
40 +checksum = "sha256:da9b9f1b4ba766c6f299711f38dfaa98623e1ed9c40896aa53db803c52ec1fa0"
41 +url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-darwin-x64-baseline.zip"
42
43 [[tools.deno]]
44 version = "2.6.7"
mise.toml
+1 -1
@@ -13,7 +13,7 @@ min_version = "2026.1.0"
13 [tools]
14 "npm:pnpm" = "11.8.0"
15 node = "24.17.0"
16 -bun = "1.3.10"
16 +bun = "1.4.0"
17 deno = "2.6.7"
18 python = "3.12"
19 uv = "0.8.19"
pnpm-lock.yaml
-43
@@ -1297,9 +1297,6 @@ importers:
1297 '@types/semver':
1298 specifier: ^7.8.0
1299 version: 7.8.0
1300 - tar:
1301 - specifier: ^7.5.22
1302 - version: 7.5.22
1300 tempy:
1301 specifier: ^3.2.0
1302 version: 3.2.0
@@ -2886,10 +2883,6 @@ packages:
2883 '@types/node':
2884 optional: true
2885
2889 - '@isaacs/fs-minipass@4.0.1':
2890 - resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==}
2891 - engines: {node: '>=18.0.0'}
2892 -
2886 '@isaacs/ttlcache@2.1.5':
2887 resolution: {integrity: sha512-VwGZqqjAWPICTmxUZnbpEfO60LhPWzquik+bmyXGY7pYRn6diEvCI5i6Ca+J6o2y4vS73HrpuMTo2dOvUevH8w==}
2888 engines: {node: '>=12'}
@@ -4744,10 +4737,6 @@ packages:
4737 zod:
4738 optional: true
4739
4747 - chownr@3.0.0:
4748 - resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
4749 - engines: {node: '>=18'}
4750 -
4740 chrome-devtools-mcp@1.7.0:
4741 resolution: {integrity: sha512-6xFW7oiUxTxZuHcfyYBkKQtmttjCbfifKZMSEk5CV8H2FucvKweYiJr8CblddYHtYjA4C14K9VAs1r49906RBA==}
4742 engines: {node: ^20.19.0 || ^22.12.0 || >=23}
@@ -5890,10 +5879,6 @@ packages:
5879 resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==}
5880 engines: {node: '>=16 || 14 >=14.17'}
5881
5893 - minizlib@3.1.0:
5894 - resolution: {integrity: sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==}
5895 - engines: {node: '>= 18'}
5896 -
5882 mri@1.2.0:
5883 resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
5884 engines: {node: '>=4'}
@@ -6645,10 +6630,6 @@ packages:
6630 resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==}
6631 engines: {node: '>=14.18'}
6632
6648 - tar@7.5.22:
6649 - resolution: {integrity: sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==}
6650 - engines: {node: '>=18'}
6651 -
6633 temp-dir@3.0.0:
6634 resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==}
6635 engines: {node: '>=14.16'}
@@ -7157,10 +7138,6 @@ packages:
7138 resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
7139 engines: {node: '>=10'}
7140
7160 - yallist@5.0.0:
7161 - resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==}
7162 - engines: {node: '>=18'}
7163 -
7141 yaml-ast-parser@0.0.43:
7142 resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==}
7143
@@ -8496,10 +8473,6 @@ snapshots:
8473 optionalDependencies:
8474 '@types/node': 26.2.0
8475
8499 - '@isaacs/fs-minipass@4.0.1':
8500 - dependencies:
8501 - minipass: 7.1.3
8502 -
8476 '@isaacs/ttlcache@2.1.5': {}
8477
8478 '@jridgewell/resolve-uri@3.1.2': {}
@@ -10196,8 +10169,6 @@ snapshots:
10169 transitivePeerDependencies:
10170 - supports-color
10171
10199 - chownr@3.0.0: {}
10200 -
10172 chrome-devtools-mcp@1.7.0: {}
10173
10174 cjs-module-lexer@1.2.3: {}
@@ -11481,10 +11452,6 @@ snapshots:
11452
11453 minipass@7.1.3: {}
11454
11484 - minizlib@3.1.0:
11485 - dependencies:
11486 - minipass: 7.1.3
11487 -
11455 mri@1.2.0: {}
11456
11457 mrmime@2.0.1: {}
@@ -12317,14 +12284,6 @@ snapshots:
12284 has-flag: 4.0.0
12285 supports-color: 7.2.0
12286
12320 - tar@7.5.22:
12321 - dependencies:
12322 - '@isaacs/fs-minipass': 4.0.1
12323 - chownr: 3.0.0
12324 - minipass: 7.1.3
12325 - minizlib: 3.1.0
12326 - yallist: 5.0.0
12327 -
12287 temp-dir@3.0.0: {}
12288
12289 tempy@3.2.0:
@@ -12753,8 +12712,6 @@ snapshots:
12712
12713 y18n@5.0.8: {}
12714
12756 - yallist@5.0.0: {}
12757 -
12715 yaml-ast-parser@0.0.43: {}
12716
12717 yaml@2.9.0: {}
ts/packages/cli/package.json
-1
@@ -65,7 +65,6 @@
65 "@effect/workflow": "^0.19.1",
66 "@types/bun": "catalog:",
67 "@types/semver": "^7.8.0",
68 - "tar": "^7.5.22",
68 "tempy": "^3.2.0",
69 "tsdown": "catalog:",
70 "tsx": "catalog:",
ts/packages/cli/scripts/_acp-adapters.ts
+2 -2
@@ -1,7 +1,6 @@
1 import { chmod, copyFile, mkdir, mkdtemp, readFile, rename, rm, writeFile } from 'node:fs/promises';
2 import { createRequire } from 'node:module';
3 import * as path from 'node:path';
4 -import { extract as extractTarball } from 'tar';
4 import {
5 RUN_CODEX_ACP_BINARY_TARGETS,
6 type RunCodexAcpBinaryTarget,
@@ -264,7 +263,8 @@ const extractCodexBinaryFromTarball = async ({
263
264 await downloadTarball(tarballUrl, tempArchivePath);
265 await mkdir(tempExtractDir, { recursive: true });
267 - await extractTarball({ file: tempArchivePath, cwd: tempExtractDir });
266 + const archive = new Bun.Archive(await Bun.file(tempArchivePath).bytes());
267 + await archive.extract(tempExtractDir);
268
269 const extractedBinaryPath = path.join(tempExtractDir, 'package', 'bin', binaryFileName);
270 if (!(await fileExists(extractedBinaryPath))) {