@devries-cameron20 / composio-1 / commits / be8e978c3
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.

fix(toolchain): pin Bun canary for valid macOS signatures (#4315)

This PR: - closes #4284 - makes `mise.toml` the editable source of truth for Bun and pins `1.4.1-canary.1+d9b769812`, the first Bun build whose compiled macOS binaries carry strictly valid signatures - maps that revision to the immutable per-platform `@oven/bun-*` npm tarballs via mise's `http` backend, so mise extracts the exact checksum-verified binary with no npm lifecycle, Node dependency, or postinstall script - installs Bun through mise in CI and Docker E2E images, removing the independent `bun-version` input and the `oven-sh/setup-bun` channel - updates the checksum-verified mise installer to `2026.8.15`, reuses it in the Docker E2E images, and regenerates `mise.lock` with that release - teaches the preinstall toolchain check to compare the full Bun revision (via `Bun.version_with_sha`, in-process) when the pinned version carries build metadata - verifies the exact `bun --revision`, a strictly valid Bun-compiled macOS signature, a Linux container install, the release-workflow contract, and formatting/linting EOF -R ComposioHQ/composio

Alberto Schiabel committed Sep 3, 2026 at 11:51 UTC be8e978c3a9f19cd52028b38004bf6a48b26e88d
11 files changed +175 -185
.github/actions/setup-node-pnpm-bun/action.yml
+5 -14
@@ -6,10 +6,6 @@ inputs:
6 description: 'Node.js version to use. Defaults to mise.lock'
7 required: false
8 default: ''
9 - bun-version:
10 - description: 'Bun version to use. Defaults to mise.lock'
11 - required: false
12 - default: ''
9 enable-caching:
10 description: 'Enable pnpm/tool cache'
11 required: false
@@ -49,21 +45,15 @@ runs:
45 shell: bash
46 env:
47 NODE_VERSION: ${{ inputs.node-version }}
52 - BUN_VERSION: ${{ inputs.bun-version }}
48 run: |
49 resolver="$GITHUB_ACTION_PATH/../../scripts/read-mise-lock-version.sh"
50 node_version="$NODE_VERSION"
56 - bun_version="$BUN_VERSION"
51
52 if [[ -z "$node_version" ]]; then
53 node_version=$(bash "$resolver" node)
54 fi
61 - if [[ -z "$bun_version" ]]; then
62 - bun_version=$(bash "$resolver" bun)
63 - fi
55
56 echo "node=$node_version" >> "$GITHUB_OUTPUT"
66 - echo "bun=$bun_version" >> "$GITHUB_OUTPUT"
57 echo "pnpm=$(bash "$resolver" pnpm)" >> "$GITHUB_OUTPUT"
58
59 - name: Setup Node.js
@@ -72,9 +62,10 @@ runs:
62 node-version: ${{ steps.tool-versions.outputs.node }}
63
64 - name: Setup Bun
75 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
76 - with:
77 - bun-version: ${{ steps.tool-versions.outputs.bun }}
65 + shell: bash
66 + run: |
67 + mise install bun
68 + dirname "$(mise which bun)" >> "$GITHUB_PATH"
69
70 - name: Setup pnpm
71 uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
@@ -136,5 +127,5 @@ runs:
127 shell: bash
128 run: |
129 echo "node=$(node --version | sed 's/^v//')" >> "$GITHUB_OUTPUT"
139 - echo "bun=$(bun --version)" >> "$GITHUB_OUTPUT"
130 + echo "bun=$(bun --revision)" >> "$GITHUB_OUTPUT"
131 echo "pnpm=$(pnpm --version)" >> "$GITHUB_OUTPUT"
.github/scripts/install-mise.sh
+28 -11
@@ -2,28 +2,34 @@
2
3 set -euo pipefail
4
5 -if command -v mise >/dev/null 2>&1; then
6 - exit 0
5 +version='2026.8.15'
6 +
7 +if [[ -n "${MISE_INSTALL_PATH:-}" ]]; then
8 + existing_binary="$MISE_INSTALL_PATH"
9 +else
10 + existing_binary=$(command -v mise 2>/dev/null || true)
11 fi
12
9 -version='2026.5.18'
13 +if [[ -x "$existing_binary" ]] && [[ "$("$existing_binary" --version | awk '{print $1}')" == "$version" ]]; then
14 + exit 0
15 +fi
16
17 case "$(uname -s)-$(uname -m)" in
18 Linux-x86_64)
19 target='linux-x64'
14 - checksum='cfac593469d028d7ae5fe36e37bd7c59118b5238e92d8a876209578464f24a84'
20 + checksum='a6dea05e896f1e6090f821588f45397262270e0e0b456252f8d1da28a416f3f2'
21 ;;
22 Linux-aarch64|Linux-arm64)
23 target='linux-arm64'
18 - checksum='3c19d4861684e4ed5b8d020bcbdd99f478df43583fb767bd8a663983d4a4e209'
24 + checksum='124ea8f7c8cb9a6a3c99c763cbf37ca48c9beaa816735f011d9fd99e6cd463e9'
25 ;;
26 Darwin-x86_64)
27 target='macos-x64'
22 - checksum='c3dd600be59c1ada5aa7b178da8324f5ad40bf6a10e98d4109728d727ac9ccb9'
28 + checksum='6a1cef931e299d7392cd7008dd97fcef2d9b41fbdfe79df4fd9f7ab0cc33d9f7'
29 ;;
30 Darwin-arm64)
31 target='macos-arm64'
26 - checksum='998428f820e22301bab9273cba8b4e59d05a40f77a9a8411d75b2de85fbb0335'
32 + checksum='17a6e37ac2aaeee78206abc601568e1fe5010e398bf3c7320e1683584124d3c7'
33 ;;
34 *)
35 echo "Unsupported mise platform: $(uname -s)-$(uname -m)" >&2
@@ -31,15 +37,24 @@ case "$(uname -s)-$(uname -m)" in
37 ;;
38 esac
39
34 -install_dir="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/mise-bin"
35 -binary="$install_dir/mise"
40 +default_install_dir="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/mise-bin"
41 +binary="${MISE_INSTALL_PATH:-$default_install_dir/mise}"
42 +install_dir=$(dirname "$binary")
43 asset="mise-v${version}-${target}"
44 url="https://github.com/jdx/mise/releases/download/v${version}/${asset}"
45
46 mkdir -p "$install_dir"
47 curl --fail --location --retry 3 --silent --show-error --output "$binary" "$url"
48
42 -actual_checksum=$(shasum -a 256 "$binary" | awk '{print $1}')
49 +if command -v shasum >/dev/null 2>&1; then
50 + actual_checksum=$(shasum -a 256 "$binary" | awk '{print $1}')
51 +elif command -v sha256sum >/dev/null 2>&1; then
52 + actual_checksum=$(sha256sum "$binary" | awk '{print $1}')
53 +else
54 + echo 'Neither shasum nor sha256sum is available to verify mise' >&2
55 + rm -f "$binary"
56 + exit 1
57 +fi
58 if [[ "$actual_checksum" != "$checksum" ]]; then
59 echo "Checksum mismatch for $asset" >&2
60 rm -f "$binary"
@@ -47,4 +62,6 @@ if [[ "$actual_checksum" != "$checksum" ]]; then
62 fi
63
64 chmod +x "$binary"
50 -echo "$install_dir" >> "$GITHUB_PATH"
65 +if [[ -n "${GITHUB_PATH:-}" ]]; then
66 + echo "$install_dir" >> "$GITHUB_PATH"
67 +fi
mise.lock
+16 -36
@@ -1,44 +1,24 @@
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.4.0"
5 -backend = "core:bun"
4 +version = "1.4.1-canary.1+d9b769812"
5 +backend = "http:bun"
6
7 [tools.bun."platforms.linux-arm64"]
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:576300ce33ff16ffcd455bf178c2f095f9df845c6cc3d0284ba1c96ca0e80473"
13 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-aarch64-musl.zip"
8 +checksum = "sha512:c9136e10a2ea707d36978fa3713fba2930764068636dfd95a06264823c892532d69d3926e3a304084d704a2be301635d5af21faf06efed1b8aaa58ac591a8acb"
9 +url = "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.4.0-canary.20260831.1.tgz"
10
11 [tools.bun."platforms.linux-x64"]
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: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: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:618c4bc1f94b02337ee210003c0b7c066f11548a8cdc5109df10db043dc47ca2"
29 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64-musl-baseline.zip"
12 +checksum = "sha512:d5d0db11b22ad51ea66ebe96de83790109d753b678998d30b22b10cc8e3553e324d59581401ce07b5053282fb5e206c882fc96ae06b774b6162b3620fee5cf59"
13 +url = "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.4.0-canary.20260831.1.tgz"
14
15 [tools.bun."platforms.macos-arm64"]
32 -checksum = "sha256:c669e97f6164e1c96e0701748db98dfa77492908cbd8394c7557134a735de381"
33 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-darwin-aarch64.zip"
16 +checksum = "sha512:2cba511e3cc074290676eea0cf2a16c7086bae4504edc5db58c93ddf4999c424386cf1c53ae2fdfd4ffca0eb93e80a51abfb58806ad7cc32aaa31f724d36b290"
17 +url = "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.4.0-canary.20260831.1.tgz"
18
19 [tools.bun."platforms.macos-x64"]
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:da9b9f1b4ba766c6f299711f38dfaa98623e1ed9c40896aa53db803c52ec1fa0"
41 -url = "https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-darwin-x64-baseline.zip"
20 +checksum = "sha512:2cce674fb3a605ce1e33e4079afc418157001116767d1cfdc3bd640149ab51289bf87fb5f518fe840bcf82712db1b53e765b074f96386704136f7f8d4e8c70ea"
21 +url = "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.4.0-canary.20260831.1.tgz"
22
23 [[tools.deno]]
24 version = "2.6.7"
@@ -113,14 +93,14 @@ version = "0.8.19"
93 backend = "aqua:astral-sh/uv"
94
95 [tools.uv."platforms.linux-arm64"]
116 -checksum = "sha256:87925376fa1e59de23582e1cbd81d6aabd16611e871ad085e09be2c2fa12689d"
117 -url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-unknown-linux-musl.tar.gz"
118 -url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/295160192"
96 +checksum = "sha256:ffd29feed13cdd30b27def8e80e64223325fbe4f7cfc4d4c906ec2531f746bde"
97 +url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-unknown-linux-gnu.tar.gz"
98 +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/295160191"
99
100 [tools.uv."platforms.linux-x64"]
121 -checksum = "sha256:6a37f712ae90c7b8cf364fe751144d7acc2479d6b336378111e74cc7fb14fa7b"
122 -url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-unknown-linux-musl.tar.gz"
123 -url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/295160235"
101 +checksum = "sha256:cfc674e9b83d1becfca4d70386e5f7ace4c1fa8c47c518abeebb8ef2b30da4b8"
102 +url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-unknown-linux-gnu.tar.gz"
103 +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/295160233"
104
105 [tools.uv."platforms.macos-arm64"]
106 checksum = "sha256:bb63d43c40a301d889a985223ee8ce540be199e98b3f27ed8477823869a0a605"
mise.toml
+40 -3
@@ -2,22 +2,59 @@
2 #
3 # Local dev: `mise install` (after `brew install mise` / `winget install jdx.mise` / `curl https://mise.run | sh`)
4 # CI: exact versions are read from `mise.lock` by the composite actions
5 -# under `.github/actions/` and installed with allowlisted setup actions
5 +# under `.github/actions/`; Bun is installed directly by mise
6 #
7 # pnpm is pinned through mise's npm backend so mise owns the full local and CI
8 # toolchain. We do not rely on Corepack because Node.js no longer distributes it
9 # starting with v25.
10
11 -min_version = "2026.1.0"
11 +min_version = "2026.8.15"
12 +
13 +[tool_alias]
14 +bun = "http:bun"
15
16 [tools]
17 "npm:pnpm" = "11.8.0"
18 node = "24.17.0"
16 -bun = "1.4.0"
19 deno = "2.6.7"
20 python = "3.12"
21 uv = "0.8.19"
22
23 +# Bun's exact canary revision is not a GitHub release tag. These immutable npm
24 +# platform packages contain the binaries with valid macOS signatures; mise
25 +# extracts the matching one directly, with no npm lifecycle involved.
26 +#
27 +# `version` below is only a label: the http backend downloads whatever the
28 +# platform URLs point at, and the checksums prove a tarball is the one we named,
29 +# not that it holds the revision we claimed. The two are deliberately allowed to
30 +# read differently -- the tarballs are published under Bun's canary date scheme
31 +# (1.4.0-canary.20260831.1) while the binaries inside report their own revision
32 +# (1.4.1-canary.1+d9b769812), which is what `bun --revision` prints.
33 +#
34 +# So when bumping Bun, change the URLs *and* `version` together, then run
35 +# `mise install`. `pnpm run test:toolchain` (test/mise-bun-pin.test.ts) compares
36 +# the label against the installed binary and is the only thing that catches a
37 +# half-finished bump.
38 +[tools.bun]
39 +version = "1.4.1-canary.1+d9b769812"
40 +bin_path = "package/bin"
41 +
42 +[tools.bun.platforms.macos-arm64]
43 +url = "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.4.0-canary.20260831.1.tgz"
44 +checksum = "sha512:2cba511e3cc074290676eea0cf2a16c7086bae4504edc5db58c93ddf4999c424386cf1c53ae2fdfd4ffca0eb93e80a51abfb58806ad7cc32aaa31f724d36b290"
45 +
46 +[tools.bun.platforms.macos-x64]
47 +url = "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.4.0-canary.20260831.1.tgz"
48 +checksum = "sha512:2cce674fb3a605ce1e33e4079afc418157001116767d1cfdc3bd640149ab51289bf87fb5f518fe840bcf82712db1b53e765b074f96386704136f7f8d4e8c70ea"
49 +
50 +[tools.bun.platforms.linux-arm64]
51 +url = "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.4.0-canary.20260831.1.tgz"
52 +checksum = "sha512:c9136e10a2ea707d36978fa3713fba2930764068636dfd95a06264823c892532d69d3926e3a304084d704a2be301635d5af21faf06efed1b8aaa58ac591a8acb"
53 +
54 +[tools.bun.platforms.linux-x64]
55 +url = "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.4.0-canary.20260831.1.tgz"
56 +checksum = "sha512:d5d0db11b22ad51ea66ebe96de83790109d753b678998d30b22b10cc8e3553e324d59581401ce07b5053282fb5e206c882fc96ae06b774b6162b3620fee5cf59"
57 +
58 [env]
59 _.path = ["{{config_root}}/node_modules/.bin"]
60
package.json
+2 -2
@@ -26,9 +26,10 @@
26 "build:packages": "turbo build --filter=./ts/packages/**",
27 "cli:record": "turbo run record --filter=./ts/packages/cli",
28 "record": "turbo run record",
29 - "test": "pnpm run test:install-sh && pnpm run test:release-workflow && turbo test --filter=./ts/packages/** --filter=!@e2e-tests/* && pnpm run test:examples",
29 + "test": "pnpm run test:toolchain && pnpm run test:install-sh && pnpm run test:release-workflow && turbo test --filter=./ts/packages/** --filter=!@e2e-tests/* && pnpm run test:examples",
30 "test:install-sh": "bash test/install-sh-release-resolution.test.sh && bash test/install-sh-atomic-replace.test.sh",
31 "test:release-workflow": "bun run test/release-workflow.test.ts",
32 + "test:toolchain": "bun run test/mise-bun-pin.test.ts",
33 "test:examples": "tsx ts/scripts/validate-examples.ts",
34 "test:e2e": "turbo test:e2e --filter='@e2e-tests/*'",
35 "test:e2e:node": "turbo test:e2e:node --filter='@e2e-tests/node-*'",
@@ -45,7 +46,6 @@
46 "lint:fix": "oxlint --fix .",
47 "lint:fix:packages": "oxlint --fix ts/packages",
48 "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
48 - "preinstall": "./ts/scripts/pre-install.sh",
49 "prepare": "husky",
50 "create:provider": "bash ts/scripts/create-provider.sh",
51 "create:example": "bash ts/scripts/create-example.sh",
test/mise-bun-pin.test.ts new
+75
@@ -0,0 +1,75 @@
1 +#!/usr/bin/env bun
2 +
3 +/**
4 + * Asserts that the Bun revision declared in `mise.toml` matches the binary mise
5 + * actually installs.
6 + *
7 + * `[tool_alias] bun = "http:bun"` decouples the version label from the tarball
8 + * URLs, and mise never cross-checks the two: the per-platform checksums prove a
9 + * tarball is the one we named, not that it contains the revision we claimed. So
10 + * bumping the URLs without the `version` string (or the reverse) silently ships
11 + * the wrong Bun to every contributor and every CI job. This is the only check
12 + * that catches that.
13 + *
14 + * The binary is resolved through `mise which bun` rather than `$PATH`, so a
15 + * contributor running their own Bun does not get a spurious failure. When mise
16 + * cannot resolve Bun the check skips locally, but fails under CI, where the
17 + * toolchain is installed by `.github/actions/setup-node-pnpm-bun`.
18 + */
19 +
20 +import { execFileSync } from 'node:child_process';
21 +
22 +function run(command: string, args: string[]): string {
23 + return execFileSync(command, args, {
24 + encoding: 'utf-8',
25 + stdio: ['ignore', 'pipe', 'pipe'],
26 + }).trim();
27 +}
28 +
29 +function skipOrFail(reason: string) {
30 + if (process.env.CI) {
31 + console.error(
32 + `mise-bun-pin: ${reason}
33 +CI must run under the mise-installed toolchain, so this is a failure here.`
34 + );
35 + process.exit(1);
36 + }
37 +
38 + console.log(
39 + `mise-bun-pin: skipped (${reason}).
40 +Run \`mise install\` to enable this check locally.`
41 + );
42 + process.exit(0);
43 +}
44 +
45 +function main() {
46 + let declaredRevision: string;
47 + let bunPath: string;
48 +
49 + try {
50 + declaredRevision = run('mise', ['current', 'bun']);
51 + bunPath = run('mise', ['which', 'bun']);
52 + } catch (err) {
53 + skipOrFail(`could not resolve Bun from mise (${(err as Error).message})`);
54 + return;
55 + }
56 +
57 + const installedRevision = run(bunPath, ['--revision']);
58 +
59 + if (installedRevision !== declaredRevision) {
60 + console.error(
61 + `Bun revision mismatch between mise.toml and the installed binary.
62 +
63 + mise.toml declares: ${declaredRevision}
64 + ${bunPath} is: ${installedRevision}
65 +
66 +The \`version\` under [tools.bun] and the per-platform tarball URLs are set
67 +independently. Update whichever one is stale, then run \`mise install\`.`
68 + );
69 + process.exit(1);
70 + }
71 +
72 + console.log(`mise-bun-pin: ok (${installedRevision})`);
73 +}
74 +
75 +main();
ts/e2e-tests/_utils/Dockerfile.cli
+3 -6
@@ -23,7 +23,8 @@ RUN apt-get update && \
23 # mise is installed to /usr/local/bin; its shared cache and shims expose bun and
24 # pnpm while Node stays on the base image.
25 ENV XDG_CACHE_HOME="/mise/cache"
26 -RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
26 +COPY .github/scripts/install-mise.sh ./.github/scripts/install-mise.sh
27 +RUN MISE_INSTALL_PATH=/usr/local/bin/mise bash .github/scripts/install-mise.sh
28 COPY mise.toml mise.lock ./
29 RUN mise install && \
30 pnpm --version && \
@@ -41,17 +42,13 @@ COPY package.json \
42 toolchain-versions.json \
43 ./
44
44 -# Copy pre-install scripts (rarely change)
45 -COPY ts/scripts/pre-install.sh ./ts/scripts/pre-install.sh
46 -COPY ts/scripts/pre-install/ ./ts/scripts/pre-install/
47 -
45 # Copy all ts/packages (pre-built)
46 COPY ts/packages/ ./ts/packages/
47
48 # Install dependencies using pnpm
49 # Note: We intentionally don't use --mount=type=cache for the pnpm store here
50 # because it causes native binding issues across builds
54 -RUN BYPASS_TOOLCHAIN_CHECK=1 pnpm install --frozen-lockfile
51 +RUN pnpm install --frozen-lockfile
52
53 # Build composio CLI binary
54 WORKDIR /app/ts/packages/cli
ts/e2e-tests/_utils/Dockerfile.deno
+3 -6
@@ -38,7 +38,8 @@ RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \
38 # mise is installed to /usr/local/bin; its shared cache and shims keep the tools
39 # available to the non-root runtime user.
40 ENV XDG_CACHE_HOME="/mise/cache"
41 -RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
41 +COPY .github/scripts/install-mise.sh ./.github/scripts/install-mise.sh
42 +RUN MISE_INSTALL_PATH=/usr/local/bin/mise bash .github/scripts/install-mise.sh
43 COPY mise.toml mise.lock ./
44 RUN mise install && \
45 pnpm --version && \
@@ -56,17 +57,13 @@ COPY package.json \
57 toolchain-versions.json \
58 ./
59
59 -# Copy pre-install scripts (rarely change)
60 -COPY ts/scripts/pre-install.sh ./ts/scripts/pre-install.sh
61 -COPY ts/scripts/pre-install/ ./ts/scripts/pre-install/
62 -
60 # Copy all ts/packages (pre-built)
61 COPY ts/packages/ ./ts/packages/
62
63 # Install dependencies using pnpm
64 # Note: We intentionally don't use --mount=type=cache for the pnpm store here
65 # because it causes native binding issues (e.g., rolldown-binding) across builds
69 -RUN BYPASS_TOOLCHAIN_CHECK=1 pnpm install --frozen-lockfile
66 +RUN pnpm install --frozen-lockfile
67
68 # Copy e2e tests last (changes frequently)
69 COPY ts/e2e-tests/ ./ts/e2e-tests/
ts/e2e-tests/_utils/Dockerfile.node
+3 -6
@@ -29,7 +29,8 @@ RUN apt-get update && \
29 # mise is installed to /usr/local/bin; its shared cache and shims keep the tools
30 # available to the non-root runtime user.
31 ENV XDG_CACHE_HOME="/mise/cache"
32 -RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
32 +COPY .github/scripts/install-mise.sh ./.github/scripts/install-mise.sh
33 +RUN MISE_INSTALL_PATH=/usr/local/bin/mise bash .github/scripts/install-mise.sh
34 COPY mise.toml mise.lock ./
35 RUN mise install && \
36 pnpm --version && \
@@ -47,17 +48,13 @@ COPY package.json \
48 toolchain-versions.json \
49 ./
50
50 -# Copy pre-install scripts (rarely change)
51 -COPY ts/scripts/pre-install.sh ./ts/scripts/pre-install.sh
52 -COPY ts/scripts/pre-install/ ./ts/scripts/pre-install/
53 -
51 # Copy all ts/packages (pre-built)
52 COPY ts/packages/ ./ts/packages/
53
54 # Install dependencies using pnpm
55 # Note: We intentionally don't use --mount=type=cache for the pnpm store here
56 # because it causes native binding issues (e.g., rolldown-binding) across builds
60 -RUN BYPASS_TOOLCHAIN_CHECK=1 pnpm install --frozen-lockfile
57 +RUN pnpm install --frozen-lockfile
58
59 # Build and install composio CLI binary
60 # This is a simplified version of ts/packages/cli/scripts/build-binary.ts + install-binary.ts
ts/scripts/pre-install.sh deleted
-21
@@ -1,21 +0,0 @@
1 -#!/bin/bash
2 -
3 -set -eo pipefail
4 -
5 -# Allow bypassing the local toolchain check (useful for CI workflows using prebuilt images)
6 -if [ -n "$BYPASS_TOOLCHAIN_CHECK" ]; then
7 - echo "Bypassing toolchain check (BYPASS_TOOLCHAIN_CHECK is set)"
8 - exit 0
9 -fi
10 -
11 -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12 -
13 -echo "Checking if Bun is installed..."
14 -if ! command -v bun &> /dev/null; then
15 - echo "Bun is not installed. Please install it from https://bun.sh" >&2
16 - exit 1
17 -fi
18 -
19 -echo "Bun is installed."
20 -echo "Checking if toolchain versions match mise.toml..."
21 -bun run "$SCRIPT_DIR/pre-install/check-toolchain.ts"
ts/scripts/pre-install/check-toolchain.ts deleted
-80
@@ -1,80 +0,0 @@
1 -#!/usr/bin/env bun
2 -
3 -import { execFileSync } from 'node:child_process';
4 -
5 -declare module 'bun' {
6 - interface Env {
7 - /**
8 - * If set, bypasses the local toolchain check.
9 - * Useful for CI workflows relying on prebuilt environments.
10 - */
11 - BYPASS_TOOLCHAIN_CHECK: string;
12 - }
13 -}
14 -
15 -type CheckedTool = 'bun' | 'pnpm';
16 -
17 -const miseTool: Record<CheckedTool, string> = {
18 - bun: 'bun',
19 - pnpm: 'npm:pnpm',
20 -};
21 -
22 -function getRequiredVersion(tool: CheckedTool): string {
23 - try {
24 - return execFileSync('mise', ['current', miseTool[tool]], { encoding: 'utf-8' }).trim();
25 - } catch (err) {
26 - console.error(
27 - `Failed to resolve ${tool} version from mise.toml.
28 -Install mise and run:
29 -
30 -\`mise install\`
31 -
32 -Original error: ${(err as Error).message}`
33 - );
34 - process.exit(1);
35 - }
36 -}
37 -
38 -function getPnpmVersion(): string {
39 - try {
40 - return execFileSync('pnpm', ['--version'], { encoding: 'utf-8' }).trim();
41 - } catch (err) {
42 - console.error(
43 - `Failed to resolve pnpm version.
44 -Install the repository toolchain by running:
45 -
46 -\`mise install\`
47 -
48 -Original error: ${(err as Error).message}`
49 - );
50 - process.exit(1);
51 - }
52 -}
53 -
54 -function assertVersion(tool: CheckedTool, actualVersion: string) {
55 - const requiredVersion = getRequiredVersion(tool);
56 -
57 - if (actualVersion !== requiredVersion) {
58 - console.error(
59 - `${tool} version mismatch: expected ${requiredVersion}, got ${actualVersion}.
60 -Install the repository toolchain by running:
61 -
62 -\`mise install\`
63 -`
64 - );
65 - process.exit(1);
66 - }
67 -}
68 -
69 -function main() {
70 - if (Bun.env.BYPASS_TOOLCHAIN_CHECK) {
71 - return;
72 - }
73 -
74 - assertVersion('bun', Bun.version.trim());
75 - assertVersion('pnpm', getPnpmVersion());
76 -}
77 -
78 -if (import.meta.path === Bun.main) {
79 - main();
80 -}