@devries-cameron20 / composio Mirror · read-only / commits / 4fe776898
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 19:45 UTC

chore(toolchain): finish mise migration (#3493)

## Summary Depends on #3492. This completes the Phase 2 migration by removing the transitional version-file layer and making `mise.toml` plus `mise.lock` the repository toolchain source of truth. It also moves runtime test matrices into `toolchain-versions.json`, so CI matrix changes are explicit and reviewable without reintroducing `.nvmrc`, `.dvmrc`, `.bun-version`, or `.python-version`. The Node.js e2e matrix now starts at the latest Node 22 LTS line and also covers the latest Node 24 and Node 25 lines. That removes Node 20 from the well-known e2e versions while keeping us covered on the runtimes SDK users are moving toward. ## Rationale Phase 1 introduced mise side by side with the existing version files to keep the first PR low-risk. Phase 2 removes that compatibility layer so there is one place to update tool versions. That avoids silent drift between local setup, GitHub Actions, Docker E2E images, release docs, and install-time checks. The composite setup actions now install Node, Bun, Python, and uv through mise by default, with explicit version overrides only where a matrix needs them. New GitHub actions added in this PR are pinned by release commit SHA and include the release version comment. ## What changed - Deleted the transitional root/version files: `.nvmrc`, `.bun-version`, `.dvmrc`, root `.python-version`, and `python/.python-version`. - Removed `idiomatic_version_file_enable_tools` from `mise.toml` and added a committed `mise.lock` for linux/macOS x64/arm64 tool resolution. - Replaced `BYPASS_BUN_VERSION_CHECK` with `BYPASS_TOOLCHAIN_CHECK`, and made Docker E2E image installs use that bypass because they receive explicit build args instead of installing mise. - Updated Node/Bun and Python/uv composite actions to default to mise, remove `*-version-file` inputs, report resolved versions, and cache pnpm after `corepack enable`. - Centralized CI runtime matrices in `toolchain-versions.json` for TS E2E, Python tests, and CLI npm fallback coverage. - Updated the Node E2E matrix to `22.22.3`, `24.16.0`, and `25.9.0`, removing Node 20 from the well-known runtime versions. - Updated workflows, docs, E2E helpers, Dockerfiles, and release guidance to reference `mise.toml` / `mise.lock`. ## Verification - Verified latest Node 22/24/25 releases from the official Node dist index: `22.22.3`, `24.16.0`, `25.9.0` (https://nodejs.org/dist/index.json). - `pnpm install --frozen-lockfile` - `pnpm --filter @e2e-tests/utils typecheck` - `pnpm --filter @e2e-tests/utils exec tsc --noEmit --target es2022 --module esnext --moduleResolution bundler --types bun --resolveJsonModule --skipLibCheck --strict scripts/docker-build.ts` - `bash -n ts/scripts/pre-install.sh && bun run ts/scripts/pre-install/check-toolchain.ts && BYPASS_TOOLCHAIN_CHECK=1 bash ts/scripts/pre-install.sh` - `pnpm exec prettier --check ...` on touched YAML/Markdown/TS/JSON files - `ruby -e "require \"yaml\"; ARGV.each { |f| YAML.load_file(f) }" ...` on touched actions/workflows - `mise lock --platform linux-x64,linux-arm64,macos-arm64,macos-x64 && git diff --exit-code mise.lock` - `mise exec node@22.22.3 -- pnpm --filter @e2e-tests/utils typecheck` - `mise exec node@22.22.3 -- pnpm --filter @e2e-tests/node-esm-basic typecheck` - `mise exec node@22.22.3 -- pnpm --filter @e2e-tests/node-cjs-basic typecheck` - `docker manifest inspect node:24.16.0-slim` - `docker manifest inspect node:25.9.0-slim` - `git diff --check`

Alberto Schiabel committed Jun 15, 2026 at 14:03 UTC 4fe776898a38101357bf014f5fdf31b013599e88
70 files changed +862 -426
.bun-version deleted
-1
@@ -1 +0,0 @@
1 -1.3.10
.dvmrc deleted
-1
@@ -1 +0,0 @@
1 -2.6.7
.github/actions/setup-node-pnpm-bun/action.yml
+72 -20
@@ -1,43 +1,95 @@
1 -name: 'Setup Node.js, pnpm, Bun'
2 -description: 'Sets up Node.js and pnpm with caching (using .nvmrc for version), and Bun (using .bun-version for version)'
1 +name: 'Setup Node.js, pnpm, Bun via mise'
2 +description: 'Sets up Node.js, pnpm, and Bun from mise.toml unless explicit matrix overrides are provided'
3
4 inputs:
5 node-version:
6 - description: 'Node.js version to use. Defaults to .nvmrc file'
6 + description: 'Node.js version to use. Defaults to mise.toml'
7 required: false
8 default: ''
9 - node-version-file:
10 - description: 'Path to .nvmrc or similar file'
11 - required: false
12 - default: '.nvmrc'
9 bun-version:
14 - description: 'Bun version to use. Defaults to .bun-version file'
10 + description: 'Bun version to use. Defaults to mise.toml'
11 required: false
12 default: ''
17 - bun-version-file:
18 - description: 'Path to .bun-version or similar file'
19 - required: false
20 - default: '.bun-version'
13 enable-caching:
22 - description: 'Enable pnpm caching'
14 + description: 'Enable pnpm/tool cache'
15 required: false
16 default: 'true'
17
18 +outputs:
19 + node-version:
20 + description: 'The installed Node.js version'
21 + value: ${{ steps.versions.outputs.node }}
22 + bun-version:
23 + description: 'The installed Bun version'
24 + value: ${{ steps.versions.outputs.bun }}
25 + pnpm-version:
26 + description: 'The installed pnpm version'
27 + value: ${{ steps.versions.outputs.pnpm }}
28 +
29 runs:
30 using: 'composite'
31 steps:
29 - - name: Setup pnpm
30 - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
32 + - name: Setup mise
33 + uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
34 + with:
35 + version: 2026.5.18
36 + install: false
37 + cache: ${{ inputs.enable-caching }}
38
32 - - name: Setup Node.js
39 + - name: Install mise-managed Node.js and Bun
40 + shell: bash
41 + env:
42 + NODE_VERSION: ${{ inputs.node-version }}
43 + BUN_VERSION: ${{ inputs.bun-version }}
44 + run: |
45 + tools=()
46 + if [ -z "$NODE_VERSION" ]; then
47 + tools+=(node)
48 + fi
49 + if [ -z "$BUN_VERSION" ]; then
50 + tools+=(bun)
51 + fi
52 + if [ "${#tools[@]}" -gt 0 ]; then
53 + mise install "${tools[@]}"
54 + fi
55 +
56 + - name: Setup Node.js override
57 + if: inputs.node-version != ''
58 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
59 with:
60 node-version: ${{ inputs.node-version }}
36 - node-version-file: ${{ inputs.node-version == '' && inputs.node-version-file || '' }}
37 - cache: ${{ inputs.enable-caching == 'true' && 'pnpm' || '' }}
61
39 - - name: Setup Bun
62 + - name: Setup Bun override
63 + if: inputs.bun-version != ''
64 uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
65 with:
66 bun-version: ${{ inputs.bun-version }}
43 - bun-version-file: ${{ inputs.bun-version == '' && inputs.bun-version-file || '' }}
67 +
68 + - name: Install mise-managed pnpm
69 + shell: bash
70 + run: mise install npm:pnpm
71 +
72 + - name: Resolve pnpm store path and Node version
73 + if: inputs.enable-caching == 'true'
74 + id: pnpm-store
75 + shell: bash
76 + run: |
77 + echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
78 + echo "NODE_VERSION=$(node --version | sed 's/^v//')" >> "$GITHUB_OUTPUT"
79 +
80 + - name: Cache pnpm store
81 + if: inputs.enable-caching == 'true'
82 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
83 + with:
84 + path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
85 + key: ${{ runner.os }}-node${{ steps.pnpm-store.outputs.NODE_VERSION }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
86 + restore-keys: |
87 + ${{ runner.os }}-node${{ steps.pnpm-store.outputs.NODE_VERSION }}-pnpm-store-
88 +
89 + - name: Report versions
90 + id: versions
91 + shell: bash
92 + run: |
93 + echo "node=$(node --version | sed 's/^v//')" >> "$GITHUB_OUTPUT"
94 + echo "bun=$(bun --version)" >> "$GITHUB_OUTPUT"
95 + echo "pnpm=$(pnpm --version)" >> "$GITHUB_OUTPUT"
.github/actions/setup-python-uv/action.yml
+40 -15
@@ -1,41 +1,66 @@
1 -name: 'Setup Python with UV'
2 -description: 'Sets up Python and UV package manager, using .python-version for version'
1 +name: 'Setup Python with uv via mise'
2 +description: 'Sets up Python and uv from mise.toml unless explicit matrix overrides are provided'
3
4 inputs:
5 python-version:
6 - description: 'Python version to use. Defaults to .python-version file'
6 + description: 'Python version to use. Defaults to mise.toml'
7 required: false
8 default: ''
9 - python-version-file:
10 - description: 'Path to .python-version or similar file'
11 - required: false
12 - default: '.python-version'
9 uv-version:
14 - description: 'UV version to install'
10 + description: 'uv version to install. Defaults to mise.toml'
11 required: false
16 - default: 'latest'
12 + default: ''
13 enable-caching:
18 - description: 'Enable UV caching'
14 + description: 'Enable uv/tool cache'
15 required: false
16 default: 'true'
17
18 outputs:
19 python-version:
20 description: 'The installed Python version (e.g., 3.12.0)'
25 - value: ${{ steps.setup-python.outputs.python-version }}
21 + value: ${{ steps.versions.outputs.python }}
22
23 runs:
24 using: 'composite'
25 steps:
30 - - name: Setup Python
31 - id: setup-python
26 + - name: Setup mise
27 + uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
28 + with:
29 + version: 2026.5.18
30 + install: false
31 + cache: ${{ inputs.enable-caching }}
32 +
33 + - name: Install mise-managed Python and uv
34 + shell: bash
35 + env:
36 + PYTHON_VERSION: ${{ inputs.python-version }}
37 + UV_VERSION: ${{ inputs.uv-version }}
38 + run: |
39 + tools=()
40 + if [ -z "$PYTHON_VERSION" ]; then
41 + tools+=(python)
42 + fi
43 + if [ -z "$UV_VERSION" ]; then
44 + tools+=(uv)
45 + fi
46 + if [ "${#tools[@]}" -gt 0 ]; then
47 + mise install "${tools[@]}"
48 + fi
49 +
50 + - name: Setup Python override
51 + if: inputs.python-version != ''
52 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
53 with:
54 python-version: ${{ inputs.python-version }}
35 - python-version-file: ${{ inputs.python-version == '' && inputs.python-version-file || '' }}
55
37 - - name: Install UV
56 + - name: Setup uv override
57 + if: inputs.uv-version != ''
58 uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
59 with:
60 version: ${{ inputs.uv-version }}
61 enable-cache: ${{ inputs.enable-caching }}
62 +
63 + - name: Report versions
64 + id: versions
65 + shell: bash
66 + run: echo "python=$(python --version | awk '{print $2}')" >> "$GITHUB_OUTPUT"
.github/workflows/build-cli-binaries.yml
+4
@@ -6,6 +6,10 @@ on:
6 paths:
7 - 'ts/packages/cli/**'
8 - 'ts/packages/cli-local-tools/**'
9 + - '.github/actions/setup-node-pnpm-bun/action.yml'
10 + - '.github/workflows/build-cli-binaries.yml'
11 + - 'mise.toml'
12 + - 'mise.lock'
13 workflow_dispatch:
14 inputs:
15 action:
.github/workflows/cli.test-installation.yml
+23 -2
@@ -20,6 +20,19 @@ on:
20 type: string
21
22 jobs:
23 + toolchain-versions:
24 + name: Read toolchain test matrix
25 + runs-on: ubuntu-latest
26 + outputs:
27 + node_install_compat: ${{ steps.versions.outputs.node_install_compat }}
28 + steps:
29 + - name: Checkout
30 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31 +
32 + - name: Read versions
33 + id: versions
34 + run: echo "node_install_compat=$(jq -c '.node_install_compat' toolchain-versions.json)" >> "$GITHUB_OUTPUT"
35 +
36 install-script-unit-tests:
37 name: Install Script Unit Tests
38 runs-on: ubuntu-latest
@@ -419,12 +432,13 @@ jobs:
432
433 test-npm-fallback:
434 name: Test npm Installation Fallback
435 + needs: toolchain-versions
436 runs-on: ${{ matrix.os }}
437 strategy:
438 fail-fast: false
439 matrix:
440 os: [ubuntu-latest, macos-15]
427 - node-version: [18, 20, 22]
441 + node-version: ${{ fromJSON(needs.toolchain-versions.outputs.node_install_compat) }}
442
443 steps:
444 - name: Checkout
@@ -558,7 +572,14 @@ jobs:
572
573 summary:
574 name: Installation Test Summary
561 - needs: [install-script-unit-tests, test-install-script, test-npm-fallback, test-architecture-detection, test-prerequisites]
575 + needs:
576 + [
577 + install-script-unit-tests,
578 + test-install-script,
579 + test-npm-fallback,
580 + test-architecture-detection,
581 + test-prerequisites,
582 + ]
583 runs-on: ubuntu-latest
584 if: always()
585
.github/workflows/docs-check-links.yml
+6 -4
@@ -4,6 +4,10 @@ on:
4 pull_request:
5 paths:
6 - 'docs/**'
7 + - '.github/actions/setup-node-pnpm-bun/action.yml'
8 + - '.github/workflows/docs-check-links.yml'
9 + - 'mise.toml'
10 + - 'mise.lock'
11
12 jobs:
13 check-links:
@@ -16,10 +20,8 @@ jobs:
20 - name: Checkout repository
21 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
22
19 - - name: Setup Bun
20 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
21 - with:
22 - bun-version-file: '.bun-version'
23 + - name: Setup Node.js, pnpm, Bun
24 + uses: ./.github/actions/setup-node-pnpm-bun
25
26 - name: Install dependencies
27 run: bun install
.github/workflows/docs-search-sync.yml
+6 -4
@@ -6,6 +6,10 @@ on:
6 - next
7 paths:
8 - 'docs/**'
9 + - '.github/actions/setup-node-pnpm-bun/action.yml'
10 + - '.github/workflows/docs-search-sync.yml'
11 + - 'mise.toml'
12 + - 'mise.lock'
13 workflow_dispatch:
14
15 permissions:
@@ -26,10 +30,8 @@ jobs:
30 - name: Checkout repository
31 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
32
29 - - name: Setup Bun
30 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
31 - with:
32 - bun-version-file: '.bun-version'
33 + - name: Setup Node.js, pnpm, Bun
34 + uses: ./.github/actions/setup-node-pnpm-bun
35
36 - name: Install dependencies
37 run: bun install
.github/workflows/docs-tests.yml
+6 -4
@@ -4,6 +4,10 @@ on:
4 pull_request:
5 paths:
6 - 'docs/**'
7 + - '.github/actions/setup-node-pnpm-bun/action.yml'
8 + - '.github/workflows/docs-tests.yml'
9 + - 'mise.toml'
10 + - 'mise.lock'
11
12 jobs:
13 test:
@@ -16,10 +20,8 @@ jobs:
20 - name: Checkout repository
21 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
22
19 - - name: Setup Bun
20 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
21 - with:
22 - bun-version-file: '.bun-version'
23 + - name: Setup Node.js, pnpm, Bun
24 + uses: ./.github/actions/setup-node-pnpm-bun
25
26 - name: Install dependencies
27 run: bun install
.github/workflows/docs-typescript-check.yml
+6 -4
@@ -4,6 +4,10 @@ on:
4 pull_request:
5 paths:
6 - 'docs/**'
7 + - '.github/actions/setup-node-pnpm-bun/action.yml'
8 + - '.github/workflows/docs-typescript-check.yml'
9 + - 'mise.toml'
10 + - 'mise.lock'
11
12 jobs:
13 typescript-check:
@@ -16,10 +20,8 @@ jobs:
20 - name: Checkout repository
21 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
22
19 - - name: Setup Bun
20 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
21 - with:
22 - bun-version-file: '.bun-version'
23 + - name: Setup Node.js, pnpm, Bun
24 + uses: ./.github/actions/setup-node-pnpm-bun
25
26 - name: Install dependencies
27 run: bun install
.github/workflows/docs-update-data.yml
+2 -4
@@ -36,10 +36,8 @@ jobs:
36 echo "Timestamp: $DEPLOY_TIMESTAMP"
37 fi
38
39 - - name: Setup Bun
40 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
41 - with:
42 - bun-version-file: '.bun-version'
39 + - name: Setup Node.js, pnpm, Bun
40 + uses: ./.github/actions/setup-node-pnpm-bun
41
42 - name: Install dependencies
43 run: bun install
.github/workflows/generate-sdk-docs.yml
+5
@@ -6,6 +6,11 @@ on:
6 paths:
7 - 'ts/packages/core/src/**'
8 - 'python/composio/**'
9 + - '.github/actions/setup-node-pnpm-bun/action.yml'
10 + - '.github/actions/setup-python-uv/action.yml'
11 + - '.github/workflows/generate-sdk-docs.yml'
12 + - 'mise.toml'
13 + - 'mise.lock'
14 workflow_dispatch:
15
16 jobs:
.github/workflows/py.check.yaml
+10 -4
@@ -4,13 +4,19 @@ on:
4 branches:
5 - master
6 paths:
7 - - "python/**/*.py"
8 - - ".github/workflows/py.check.yaml"
7 + - 'python/**/*.py'
8 + - '.github/actions/setup-python-uv/action.yml'
9 + - '.github/workflows/py.check.yaml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 pull_request:
13 types: [opened, synchronize]
14 paths:
12 - - "python/**/*.py"
13 - - ".github/workflows/py.check.yaml"
15 + - 'python/**/*.py'
16 + - '.github/actions/setup-python-uv/action.yml'
17 + - '.github/workflows/py.check.yaml'
18 + - 'mise.toml'
19 + - 'mise.lock'
20
21 jobs:
22 common-checks:
.github/workflows/py.test.yml
+46 -23
@@ -4,25 +4,47 @@ on:
4 push:
5 branches: [master, next]
6 paths:
7 - - "python/**/*.py"
8 - - ".github/workflows/py.test.yml"
9 - - "python/pyproject.toml"
10 - - "python/requirements*.txt"
7 + - 'python/**/*.py'
8 + - '.github/workflows/py.test.yml'
9 + - '.github/actions/setup-python-uv/action.yml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 + - 'toolchain-versions.json'
13 + - 'python/pyproject.toml'
14 + - 'python/requirements*.txt'
15 pull_request:
16 branches: [master, next]
17 paths:
14 - - "python/**/*.py"
15 - - ".github/workflows/py.test.yml"
16 - - "python/pyproject.toml"
17 - - "python/requirements*.txt"
18 + - 'python/**/*.py'
19 + - '.github/workflows/py.test.yml'
20 + - '.github/actions/setup-python-uv/action.yml'
21 + - 'mise.toml'
22 + - 'mise.lock'
23 + - 'toolchain-versions.json'
24 + - 'python/pyproject.toml'
25 + - 'python/requirements*.txt'
26
27 jobs:
28 + toolchain-versions:
29 + name: Read toolchain test matrix
30 + runs-on: ubuntu-latest
31 + outputs:
32 + python: ${{ steps.versions.outputs.python }}
33 + steps:
34 + - name: Checkout Code
35 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
36 +
37 + - name: Read versions
38 + id: versions
39 + run: echo "python=$(jq -c '.python' toolchain-versions.json)" >> "$GITHUB_OUTPUT"
40 +
41 test:
42 name: Test Python SDK
43 + needs: toolchain-versions
44 runs-on: ubuntu-latest
45 strategy:
46 matrix:
25 - python-version: ["3.10", "3.11", "3.12"]
47 + python-version: ${{ fromJSON(needs.toolchain-versions.outputs.python) }}
48
49 steps:
50 - name: Checkout Code
@@ -42,7 +64,9 @@ jobs:
64 pip-${{ matrix.python-version }}-
65
66 - name: Install UV
45 - run: pip install uv
67 + run: |
68 + UV_VERSION="$(sed -n 's/^uv[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' mise.toml)"
69 + pip install "uv==${UV_VERSION}"
70
71 - name: Install Dependencies
72 run: |
@@ -104,30 +128,30 @@ jobs:
128 python -c "
129 # Test various import combinations that previously caused circular imports
130 import sys
107 -
131 +
132 # Test 1: Basic imports
133 from composio import Composio
134 print('✓ Basic Composio import')
111 -
135 +
136 # Test 2: Import toolkit version types
137 from composio import ToolkitVersionParam
138 from composio.core.types import ToolkitVersion
139 print('✓ Toolkit version types import')
116 -
140 +
141 # Test 3: Import from types module
142 from composio.types import Modifiers
143 print('✓ Types module import')
120 -
144 +
145 # Test 4: Import core models
146 from composio.core.models.tools import Tools
147 print('✓ Core models import')
124 -
148 +
149 # Test 5: Cross-module imports that caused the original circular import
150 from composio.core.models.tools import Modifiers as CoreModifiers
151 from composio.types import Modifiers as TypesModifiers
152 assert CoreModifiers is TypesModifiers
153 print('✓ Cross-module import consistency')
130 -
154 +
155 print('✓ All circular import prevention tests passed!')
156 "
157
@@ -164,27 +188,27 @@ jobs:
188
189 integration-tests:
190 name: Integration Tests
167 - runs-on: ubuntu-22.04 # Use Ubuntu 22.04 for stability
191 + runs-on: ubuntu-22.04 # Use Ubuntu 22.04 for stability
192 permissions: read-all
193 env:
194 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
195 + COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
196
197 steps:
198 - name: Checkout repository
199 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
200
201 - name: Install UV
177 - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
178 - with:
179 - version: '0.8.19'
202 + id: setup-python
203 + uses: ./.github/actions/setup-python-uv
204
205 - name: Cache UV dependencies
206 uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
207 with:
208 path: ~/.cache/uv
185 - key: uv-0.8.19-py3.12-${{ hashFiles('python/pyproject.toml') }}
209 + key: uv-${{ hashFiles('mise.lock') }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('python/pyproject.toml') }}
210 restore-keys: |
187 - uv-0.8.19-py3.12-
211 + uv-${{ hashFiles('mise.lock') }}-py${{ steps.setup-python.outputs.python-version }}-
212
213 - name: Install Python Dependencies
214 working-directory: ./python
@@ -201,7 +225,6 @@ jobs:
225 echo "✅ COMPOSIO_API_KEY is configured"
226
227 - name: Run Integration Tests
204 - continue-on-error: true
228 working-directory: ./python
229 run: |
230 echo "🧪 Running Integration Tests..."
.github/workflows/ts.audit.yml
+15 -2
@@ -4,11 +4,19 @@ on:
4 push:
5 branches: [master, next]
6 paths:
7 - - "ts/**"
7 + - 'ts/**'
8 + - '.github/actions/setup-node-pnpm-bun/action.yml'
9 + - '.github/workflows/ts.audit.yml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 pull_request:
13 branches: [master, next]
14 paths:
11 - - "ts/**"
15 + - 'ts/**'
16 + - '.github/actions/setup-node-pnpm-bun/action.yml'
17 + - '.github/workflows/ts.audit.yml'
18 + - 'mise.toml'
19 + - 'mise.lock'
20
21 jobs:
22 audit:
@@ -26,6 +34,11 @@ jobs:
34 with:
35 enable-caching: 'false'
36
37 + - name: Verify mise.lock is fresh
38 + run: |
39 + mise lock --platform linux-x64,linux-arm64,macos-arm64,macos-x64
40 + git diff --exit-code mise.lock
41 +
42 - name: Run pnpm audit (production dependencies only)
43 id: audit
44 continue-on-error: true
.github/workflows/ts.build.yml
+10 -2
@@ -4,10 +4,18 @@ on:
4 push:
5 branches: [master]
6 paths:
7 - - "ts/**"
7 + - 'ts/**'
8 + - '.github/actions/setup-node-pnpm-bun/action.yml'
9 + - '.github/workflows/ts.build.yml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 pull_request:
13 paths:
10 - - "ts/**"
14 + - 'ts/**'
15 + - '.github/actions/setup-node-pnpm-bun/action.yml'
16 + - '.github/workflows/ts.build.yml'
17 + - 'mise.toml'
18 + - 'mise.lock'
19
20 jobs:
21 build:
.github/workflows/ts.test-e2e.yml
+47 -3
@@ -5,26 +5,55 @@ on:
5 branches: [master, next]
6 paths:
7 - 'ts/**'
8 + - '.github/actions/setup-node-pnpm-bun/action.yml'
9 + - '.github/workflows/ts.test-e2e.yml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 + - 'toolchain-versions.json'
13 pull_request:
14 paths:
15 - 'ts/**'
16 + - '.github/actions/setup-node-pnpm-bun/action.yml'
17 + - '.github/workflows/ts.test-e2e.yml'
18 + - 'mise.toml'
19 + - 'mise.lock'
20 + - 'toolchain-versions.json'
21 workflow_dispatch:
22
23 jobs:
24 + toolchain-versions:
25 + name: Read toolchain test matrix
26 + runs-on: ubuntu-24.04
27 + permissions: read-all
28 + outputs:
29 + node: ${{ steps.versions.outputs.node }}
30 + deno: ${{ steps.versions.outputs.deno }}
31 + steps:
32 + - name: Checkout Code
33 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34 +
35 + - name: Read versions
36 + id: versions
37 + run: |
38 + echo "node=$(jq -c '.node' toolchain-versions.json)" >> "$GITHUB_OUTPUT"
39 + echo "deno=$(jq -c '.deno' toolchain-versions.json)" >> "$GITHUB_OUTPUT"
40 +
41 # Node.js E2E tests, running in Docker to isolate environment
42 # Each test suite defines its own nodeVersions in e2e.test.ts
43 # Tests that don't support the matrix version are automatically skipped
44 test-e2e-node-docker:
45 name: E2E Test Node.js ${{ matrix.node-version }}
46 + needs: toolchain-versions
47 runs-on: ubuntu-24.04
48 permissions: read-all
49 strategy:
50 fail-fast: false
51 matrix:
24 - node-version: ['20.18.0', '20.19.0', '22.12.0']
52 + node-version: ${{ fromJSON(needs.toolchain-versions.outputs.node) }}
53 env:
54 CI: 1
55 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
56 + COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
57 COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
58 COMPOSIO_E2E_NODE_VERSION: ${{ matrix.node-version }}
59 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -37,8 +66,10 @@ jobs:
66 run: |
67 echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
68 echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
69 + echo "COMPOSIO_BASE_URL=${COMPOSIO_BASE_URL}" >> "$GITHUB_ENV"
70
71 - name: Setup Node.js, pnpm, Bun
72 + id: setup-toolchain
73 uses: ./.github/actions/setup-node-pnpm-bun
74
75 - name: Install Dependencies
@@ -51,6 +82,7 @@ jobs:
82 run: |
83 docker build -f ts/e2e-tests/_utils/Dockerfile.node \
84 --build-arg NODE_VERSION=${{ matrix.node-version }} \
85 + --build-arg BUN_VERSION=${{ steps.setup-toolchain.outputs.bun-version }} \
86 --label composio.e2e=true \
87 --label composio.runtime=node \
88 --label "composio.node_version=${{ matrix.node-version }}" \
@@ -65,15 +97,17 @@ jobs:
97 # Tests that don't support the matrix version are automatically skipped
98 test-e2e-deno-docker:
99 name: E2E Test Deno ${{ matrix.deno-version }}
100 + needs: toolchain-versions
101 runs-on: ubuntu-24.04
102 permissions: read-all
103 strategy:
104 fail-fast: false
105 matrix:
73 - deno-version: ['2.6.7']
106 + deno-version: ${{ fromJSON(needs.toolchain-versions.outputs.deno) }}
107 env:
108 CI: 1
109 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
110 + COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
111 COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
112 COMPOSIO_E2E_DENO_VERSION: ${{ matrix.deno-version }}
113 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -86,6 +120,7 @@ jobs:
120 run: |
121 echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
122 echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
123 + echo "COMPOSIO_BASE_URL=${COMPOSIO_BASE_URL}" >> "$GITHUB_ENV"
124
125 - name: Setup Deno
126 uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
@@ -93,6 +128,7 @@ jobs:
128 deno-version: ${{ matrix.deno-version }}
129
130 - name: Setup Node.js, pnpm, Bun
131 + id: setup-toolchain
132 uses: ./.github/actions/setup-node-pnpm-bun
133
134 - name: Install Dependencies
@@ -113,6 +149,7 @@ jobs:
149 CI: 1
150 COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
151 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
152 + COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
153 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
154
155 steps:
@@ -123,8 +160,10 @@ jobs:
160 run: |
161 echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
162 echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
163 + echo "COMPOSIO_BASE_URL=${COMPOSIO_BASE_URL}" >> "$GITHUB_ENV"
164
165 - name: Setup Node.js, pnpm, Bun
166 + id: setup-toolchain
167 uses: ./.github/actions/setup-node-pnpm-bun
168
169 - name: Install Dependencies
@@ -139,6 +178,8 @@ jobs:
178 echo "COMPOSIO_E2E_CLI_VERSION=${CLI_VERSION}" >> "$GITHUB_ENV"
179 docker build -f ts/e2e-tests/_utils/Dockerfile.cli \
180 --build-arg CLI_VERSION="${CLI_VERSION}" \
181 + --build-arg NODE_VERSION="${{ steps.setup-toolchain.outputs.node-version }}" \
182 + --build-arg BUN_VERSION="${{ steps.setup-toolchain.outputs.bun-version }}" \
183 --label composio.e2e=true \
184 --label composio.runtime=cli \
185 --label "composio.cli_version=${CLI_VERSION}" \
@@ -155,6 +196,7 @@ jobs:
196 permissions: read-all
197 env:
198 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
199 + COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
200 COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
201 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
202
@@ -166,11 +208,12 @@ jobs:
208 run: |
209 echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
210 echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
211 + echo "COMPOSIO_BASE_URL=${COMPOSIO_BASE_URL}" >> "$GITHUB_ENV"
212
213 - name: Setup Node.js, pnpm, Bun
214 uses: ./.github/actions/setup-node-pnpm-bun
215 with:
173 - node-version: '22.12.0'
216 + node-version: '22.22.3'
217
218 - name: Install Dependencies
219 run: pnpm install --frozen-lockfile
@@ -196,4 +239,5 @@ jobs:
239 env:
240 COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
241 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
242 + COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
243 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
.github/workflows/ts.test.yml
+10 -2
@@ -4,11 +4,19 @@ on:
4 push:
5 branches: [master, next]
6 paths:
7 - - "ts/**"
7 + - 'ts/**'
8 + - '.github/actions/setup-node-pnpm-bun/action.yml'
9 + - '.github/workflows/ts.test.yml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 pull_request:
13 branches: [master, next]
14 paths:
11 - - "ts/**"
15 + - 'ts/**'
16 + - '.github/actions/setup-node-pnpm-bun/action.yml'
17 + - '.github/workflows/ts.test.yml'
18 + - 'mise.toml'
19 + - 'mise.lock'
20
21 jobs:
22 test:
.github/workflows/ts.typecheck.yml
+10 -2
@@ -4,11 +4,19 @@ on:
4 push:
5 branches: [master, next]
6 paths:
7 - - "ts/**"
7 + - 'ts/**'
8 + - '.github/actions/setup-node-pnpm-bun/action.yml'
9 + - '.github/workflows/ts.typecheck.yml'
10 + - 'mise.toml'
11 + - 'mise.lock'
12 pull_request:
13 branches: [master, next]
14 paths:
11 - - "ts/**"
15 + - 'ts/**'
16 + - '.github/actions/setup-node-pnpm-bun/action.yml'
17 + - '.github/workflows/ts.typecheck.yml'
18 + - 'mise.toml'
19 + - 'mise.lock'
20
21 jobs:
22 typecheck:
.gitignore
+1
@@ -17,6 +17,7 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17
18 # dotenv environment variable files
19 .env
20 +.envrc
21 .env.development.local
22 .env.test.local
23 .env.production.local
.nvmrc deleted
-1
@@ -1 +0,0 @@
1 -20.20.2
.python-version deleted
-1
@@ -1 +0,0 @@
1 -3.12
AGENTS.md
+28 -4
@@ -14,6 +14,7 @@ This is the Composio SDK v3 repository containing both TypeScript and Python SDK
14 ## Common Development Commands
15
16 ### Build and Development
17 +
18 ```bash
19 pnpm build # Build all packages
20 pnpm build:packages # Build only TypeScript packages
@@ -25,6 +26,7 @@ pnpm test # Run tests
26 ```
27
28 ### Package Management
29 +
30 ```bash
31 mise install # Install Node, Bun, Deno, Python, uv (one-time; needs mise — https://mise.jdx.dev/installing-mise.html)
32 corepack enable # Activate pnpm from package.json#packageManager
@@ -34,12 +36,14 @@ pnpm update:peer-deps # Update peer dependencies
36 ```
37
38 ### Creating New Components
39 +
40 ```bash
41 pnpm create:provider <provider-name> [--agentic]
42 pnpm create:example <example-name>
43 ```
44
45 ### Release Management
46 +
47 ```bash
48 pnpm changeset # Create changeset for releases
49 pnpm changeset:version # Version packages
@@ -49,6 +53,7 @@ pnpm changeset:release # Publish packages
53 ## Project Architecture
54
55 ### Repository Structure
56 +
57 ```
58 composio/
59 ├── ts/ # TypeScript SDK (main development)
@@ -68,6 +73,7 @@ composio/
73 ### Core Packages
74
75 **@composio/core** — Main SDK functionality:
76 +
77 - `src/composio.ts` — Main Composio class
78 - `src/models/` — Core models (Tools, Toolkits, ConnectedAccounts, etc.)
79 - `src/provider/` — Base provider implementations
@@ -76,6 +82,7 @@ composio/
82 - `src/utils/` — Utility functions and helpers
83
84 **Provider Packages** — AI integrations:
85 +
86 - `@composio/openai`, `@composio/anthropic`, `@composio/google`
87 - `@composio/langchain`, `@composio/vercel`, `@composio/mastra`
88
@@ -92,17 +99,20 @@ composio/
99 ## Development Workflow
100
101 ### Testing
102 +
103 - Unit tests use **Vitest** — run with `pnpm test`
104 - Tests are in `test/` directories within each package
105 - Mock implementations in `test/utils/mocks/`
106
107 ### Code Quality
108 +
109 - **ESLint** — config in `eslint.config.mjs`
110 - **Prettier** — for code formatting
111 - **TypeScript** — strict mode enabled
112 - **Husky** — pre-commit hooks for quality checks
113
114 ### TypeScript E2E Tests
115 +
116 ```bash
117 pnpm test:e2e # All (Node.js + Deno + Cloudflare)
118 pnpm test:e2e:node # Node.js CJS/ESM compatibility (Docker)
@@ -131,15 +141,19 @@ COMPOSIO_DISABLE_TELEMETRY # Optional: Set to "true" to disable telemetry
141 ## Common Patterns
142
143 ### Tool Execution
144 +
145 ```typescript
146 const composio = new Composio({ apiKey: 'your-key' });
147 const result = await composio.tools.execute('TOOL_NAME', {
148 userId: 'user-id',
138 - arguments: { /* tool args */ }
149 + arguments: {
150 + /* tool args */
151 + },
152 });
153 ```
154
155 ### Provider Integration
156 +
157 ```typescript
158 import { OpenAIProvider } from '@composio/openai';
159 const provider = new OpenAIProvider({ apiKey: 'openai-key' });
@@ -148,6 +162,7 @@ const wrappedTools = provider.wrapTools(tools);
162 ```
163
164 ### Custom Tool Creation
165 +
166 ```typescript
167 import { Composio, experimental_createTool } from '@composio/core';
168 import { z } from 'zod';
@@ -161,11 +176,11 @@ const myTool = experimental_createTool('MY_TOOL', {
176 name: 'My Tool',
177 description: 'Tool description',
178 inputParams: z.object({
164 - param: z.string().describe('Parameter description')
179 + param: z.string().describe('Parameter description'),
180 }),
181 execute: async input => {
182 return { result: input.param };
168 - }
183 + },
184 });
185
186 const session = await composio.create('user-id', {
@@ -176,6 +191,7 @@ const session = await composio.create('user-id', {
191 ## Python SDK Development
192
193 ### Setup
194 +
195 ```bash
196 cd python
197 make env # Create virtual env with all dependencies
@@ -183,6 +199,7 @@ source .venv/bin/activate
199 ```
200
201 ### Commands
202 +
203 ```bash
204 make fmt # Format code (ruff)
205 make chk # Check linting and type issues
@@ -192,6 +209,7 @@ make build # Build packages
209 ```
210
211 ### Code Quality
212 +
213 - **Formatter**: Ruff (Black-compatible, 88 char line length)
214 - **Linter**: Ruff
215 - **Type Checker**: mypy with strict optional typing
@@ -211,6 +229,12 @@ Toolchain versions are coalesced in `mise.toml`. To check the current values:
229 - **uv**: `mise current uv`
230 - **pnpm**: `node -p "require('./package.json').packageManager"`
231
214 -To bump, edit `mise.toml` (or `package.json#packageManager` for pnpm). The "Prerequisites" section in `ts/docs/internal/release.md` references `mise.toml` so it stays current automatically.
232 +To bump, edit `mise.toml` (or `package.json#packageManager` for pnpm), then run:
233 +
234 +```bash
235 +mise lock --platform linux-x64,linux-arm64,macos-arm64,macos-x64
236 +```
237 +
238 +Commit `mise.lock` with the version bump. The "Prerequisites" section in `ts/docs/internal/release.md` references `mise.toml` so it stays current automatically.
239
240 This monorepo uses pnpm workspaces and Turbo for efficient builds and development.
CLAUDE.md
+4 -4
@@ -31,7 +31,7 @@ composio/
31 ```bash
32 mise install # Installs Node, Bun, Deno, Python, uv from mise.toml (one-time per machine)
33 corepack enable # Activates pnpm pinned in package.json#packageManager
34 -pnpm install # First-time setup. Use BYPASS_BUN_VERSION_CHECK=1 if .bun-version mismatch
34 +pnpm install # First-time setup
35 pnpm build # Build all packages (Turbo)
36 pnpm build:packages # TS packages only
37 pnpm lint / lint:fix
@@ -47,7 +47,7 @@ pnpm create:provider <name> [--agentic]
47 pnpm create:example <name>
48 ```
49
50 -Toolchain versions are pinned in `mise.toml` (Node, Bun, Deno, Python, uv) and `package.json#packageManager` (pnpm via corepack). Install mise once with `brew install mise` (macOS), `winget install jdx.mise` (Windows), or `curl https://mise.run | sh` (any), then activate it in your shell — see https://mise.jdx.dev/installing-mise.html. Legacy `.nvmrc` / `.bun-version` / `.python-version` are still read during the transition. CI sets `BYPASS_BUN_VERSION_CHECK=1`; local sandboxes often need it too.
50 +Toolchain versions are pinned in `mise.toml` (Node, Bun, Deno, Python, uv) and `package.json#packageManager` (pnpm via corepack). Install mise once with `brew install mise` (macOS), `winget install jdx.mise` (Windows), or `curl https://mise.run | sh` (any), then activate it in your shell — see https://mise.jdx.dev/installing-mise.html. CI can set `BYPASS_TOOLCHAIN_CHECK=1` only when using prebuilt toolchain images.
51
52 ## Python Commands
53
@@ -77,7 +77,7 @@ COMPOSIO_DISABLE_TELEMETRY # "true" to disable
77
78 - **Default branch is `next`**, not `main`/`master`. Branch from `next` and target `next` for PRs.
79 - **Docs PRs also target `next`** (see `docs/CLAUDE.md` rule).
80 -- `pnpm install` hard-fails on Bun version mismatch — use `BYPASS_BUN_VERSION_CHECK=1`.
80 +- `pnpm install` checks Bun against `mise.toml`; run `mise install` when it fails.
81 - `ts/vendor/effect/` and `ts/vendor/clack/` are **read-only reference submodules** — npm provides the actual deps.
82 - The CLI is **Effect.ts + Bun**, not plain Node — see `ts/packages/cli/AGENTS.md` (CLI's `CLAUDE.md` is a symlink to it).
83 - E2E tests run in **Docker** and require Docker daemon access; skip them in restricted sandboxes.
@@ -89,7 +89,7 @@ COMPOSIO_DISABLE_TELEMETRY # "true" to disable
89 - Core Composio class: `ts/packages/core/src/composio.ts`
90 - Types: `ts/packages/core/src/types/`, errors: `ts/packages/core/src/errors/`
91 - Build configs: `turbo.jsonc`, `tsconfig.base.json`, `tsdown.config.base.ts`
92 -- Toolchain pins: `mise.toml` (Node, Bun, Deno, Python, uv), `package.json#packageManager` (pnpm), `.dvmrc` (Deno; mirrors mise.toml for `denoland/setup-deno` and `_utils/src/config.ts`)
92 +- Toolchain pins: `mise.toml` (Node, Bun, Deno, Python, uv), `mise.lock`, `toolchain-versions.json` (test matrices), `package.json#packageManager` (pnpm)
93 - CI release docs to update when bumping toolchain: `ts/docs/internal/release.md`
94 - Python config: `python/Makefile`, `python/noxfile.py`, `python/config/{pytest.ini,ruff.toml}`
95
mise.lock new
+129
@@ -0,0 +1,129 @@
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
42 +
43 +[[tools.deno]]
44 +version = "2.6.7"
45 +backend = "core:deno"
46 +
47 +[tools.deno."platforms.linux-arm64"]
48 +checksum = "sha256:d2aedfa8c73e258cce78dc80e8d0e764a69d4a09d946d32f0c29eef46592b82f"
49 +url = "https://dl.deno.land/release/v2.6.7/deno-aarch64-unknown-linux-gnu.zip"
50 +
51 +[tools.deno."platforms.linux-x64"]
52 +checksum = "sha256:c5626c9ee10e87201706fc5e64ed5a44b31527d98c130f164e149e1477c0a87d"
53 +url = "https://dl.deno.land/release/v2.6.7/deno-x86_64-unknown-linux-gnu.zip"
54 +
55 +[tools.deno."platforms.macos-arm64"]
56 +checksum = "sha256:71aaec50a92e06b2f5fed982b332c07a35e11798ca9a359db7603ae5f19c2d8b"
57 +url = "https://dl.deno.land/release/v2.6.7/deno-aarch64-apple-darwin.zip"
58 +
59 +[tools.deno."platforms.macos-x64"]
60 +checksum = "sha256:fae025e69cada67fb57affdda26abbe72991b02b515c3221e92c58aa8a642cec"
61 +url = "https://dl.deno.land/release/v2.6.7/deno-x86_64-apple-darwin.zip"
62 +
63 +[[tools.node]]
64 +version = "20.20.2"
65 +backend = "core:node"
66 +
67 +[tools.node."platforms.linux-arm64"]
68 +checksum = "sha256:47ef73d543ecf6eb19435f6c03a0ac4809b3bf0dd6b26c7c571efc2a6572a74d"
69 +url = "https://nodejs.org/dist/v20.20.2/node-v20.20.2-linux-arm64.tar.gz"
70 +
71 +[tools.node."platforms.linux-x64"]
72 +checksum = "sha256:19e56f0825510207dd904f087fe52faa0a4eb6b2aab5f0ea7a33830d04888b8b"
73 +url = "https://nodejs.org/dist/v20.20.2/node-v20.20.2-linux-x64.tar.gz"
74 +
75 +[tools.node."platforms.macos-arm64"]
76 +checksum = "sha256:466e05f3477c20dfb723054dfebffe55bc74660ee77f612166fca121dacb65b6"
77 +url = "https://nodejs.org/dist/v20.20.2/node-v20.20.2-darwin-arm64.tar.gz"
78 +
79 +[tools.node."platforms.macos-x64"]
80 +checksum = "sha256:8be6f5e4bb128c82774f8a0b8d7a1cc1365a7977d9657cece0ca647b3fe04e61"
81 +url = "https://nodejs.org/dist/v20.20.2/node-v20.20.2-darwin-x64.tar.gz"
82 +
83 +[[tools."npm:pnpm"]]
84 +version = "10.28.2"
85 +backend = "npm:pnpm"
86 +
87 +[[tools.python]]
88 +version = "3.12.13"
89 +backend = "core:python"
90 +
91 +[tools.python."platforms.linux-arm64"]
92 +checksum = "sha256:eb85c6903552b1cb40b183a119681a9326fa97e31cf0e4b8c78bf26735ff1552"
93 +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.12.13+20260610-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz"
94 +provenance = "github-attestations"
95 +
96 +[tools.python."platforms.linux-x64"]
97 +checksum = "sha256:6682afef6b510037a0ad84e61150e5121af2e2785c9ca27b047e029270a840fe"
98 +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.12.13+20260610-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz"
99 +provenance = "github-attestations"
100 +
101 +[tools.python."platforms.macos-arm64"]
102 +checksum = "sha256:f0a7fa7decc75df2b1a789329a44f657c4a15c0a683f197ce46a5cb621bc6ef4"
103 +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.12.13+20260610-aarch64-apple-darwin-install_only_stripped.tar.gz"
104 +provenance = "github-attestations"
105 +
106 +[tools.python."platforms.macos-x64"]
107 +checksum = "sha256:c56c2dfe3fb5569430f4eabcff1fc1334c66db708bf17c103eef3dd237f3e3ab"
108 +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.12.13+20260610-x86_64-apple-darwin-install_only_stripped.tar.gz"
109 +provenance = "github-attestations"
110 +
111 +[[tools.uv]]
112 +version = "0.8.19"
113 +backend = "aqua:astral-sh/uv"
114 +
115 +[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 +
119 +[tools.uv."platforms.linux-x64"]
120 +checksum = "sha256:6a37f712ae90c7b8cf364fe751144d7acc2479d6b336378111e74cc7fb14fa7b"
121 +url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-unknown-linux-musl.tar.gz"
122 +
123 +[tools.uv."platforms.macos-arm64"]
124 +checksum = "sha256:bb63d43c40a301d889a985223ee8ce540be199e98b3f27ed8477823869a0a605"
125 +url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-apple-darwin.tar.gz"
126 +
127 +[tools.uv."platforms.macos-x64"]
128 +checksum = "sha256:b5f91770e55761b32c9618757ef23ded6671bb9ca0ddf5737eea60dddd493fe9"
129 +url = "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-apple-darwin.tar.gz"
mise.toml
+7 -13
@@ -1,11 +1,10 @@
1 -# Single source of truth for Node, Bun, Deno, Python, and uv versions.
1 +# Single source of truth for Node, Bun, Deno, Python, uv, and pnpm versions.
2 #
3 # Local dev: `mise install` (after `brew install mise` / `winget install jdx.mise` / `curl https://mise.run | sh`)
4 -# CI: driven by `jdx/mise-action@v4` in the composite actions under `.github/actions/`
4 +# CI: driven by `jdx/mise-action` in the composite actions under `.github/actions/`
5 #
6 -# pnpm is intentionally NOT pinned here. Pattern A (corepack-driven) is in effect:
7 -# the version comes from `packageManager` in `package.json` and corepack shims it.
8 -# See https://github.com/jdx/mise/discussions/7622 for why pinning pnpm in [tools] can shadow corepack.
6 +# pnpm is pinned through mise's npm backend so mise owns the full local and CI
7 +# toolchain. CI cannot assume Corepack has created a pnpm shim before caching.
8
9 min_version = "2026.1.0"
10
@@ -15,16 +14,11 @@ bun = "1.3.10"
14 deno = "2.6.7"
15 python = "3.12"
16 uv = "0.8.19"
17 +"npm:pnpm" = "10.28.2"
18
19 [env]
20 _.path = ["{{config_root}}/node_modules/.bin"]
21
22 [settings]
23 -# Read .nvmrc / .python-version / .bun-version during the transition window.
24 -# Removed in Phase 3 once the legacy files are deleted.
25 -idiomatic_version_file_enable_tools = ["node", "python", "bun"]
26 -
27 -# uv integration: mise installs Python, uv owns the venv.
28 -# "source" activates an existing .venv when entering the repo;
29 -# use "create|source" if you want mise to also create the venv automatically.
30 -python.uv_venv_auto = "source"
23 +lockfile = true
24 +locked = true
python/.python-version deleted
-1
@@ -1 +0,0 @@
1 -3.12
python/Makefile
+1 -1
@@ -31,7 +31,7 @@ env:
31 @echo "* creating new environment"
32 @if [ -z "$$VIRTUAL_ENV" ];\
33 then\
34 - uv venv --seed --prompt composio --python 3.11;\
34 + uv venv --seed --prompt composio --python 3.12;\
35 uv sync;\
36 uv sync --dev;\
37 make provider;\
python/composio/sdk.py
+1 -1
@@ -146,7 +146,7 @@ class Composio(t.Generic[TTool, TToolCollection], WithLogger):
146 environment=kwargs.get("environment", "production"),
147 provider=actual_provider.name,
148 api_key=api_key,
149 - base_url=kwargs.get("base_url"),
149 + base_url=kwargs.get("base_url") or os.environ.get("COMPOSIO_BASE_URL"),
150 timeout=kwargs.get("timeout"),
151 max_retries=kwargs.get("max_retries", DEFAULT_MAX_RETRIES),
152 )
toolchain-versions.json new
+6
@@ -0,0 +1,6 @@
1 +{
2 + "node": ["22.22.3", "24.16.0", "25.9.0"],
3 + "node_install_compat": ["22.22.3", "24.16.0", "25.9.0"],
4 + "deno": ["2.6.7"],
5 + "python": ["3.10", "3.11", "3.12"]
6 +}
ts/docs/internal/release.md
+4 -10
@@ -60,7 +60,6 @@ The automated release process is triggered when code is merged into the `main` b
60 ### Using Automated Release
61
62 1. **For Regular Releases (via main branch)**
63 -
63 - Make sure your changeset is added to the PR you are merging to main. Run `pnpm changeset` on your branch before submiting the PR
64 - Get your PR merged to main
65 - The workflow will automatically:
@@ -79,9 +78,8 @@ The manual release process is available for cases where direct control over the
78
79 ### Prerequisites
80
82 -- Node.js (version: `20.20.2`)
83 -- Bun (version: `1.3.10`)
84 -- pnpm (version: `10.28.2`)
81 +- Node.js, Bun, Python, Deno, and uv from `mise.toml`
82 +- pnpm from `package.json#packageManager` via corepack
83 - Access to npm registry
84 - Write access to the repository
85
@@ -95,6 +93,8 @@ The manual release process is available for cases where direct control over the
93 git pull origin main
94
95 # Install dependencies
96 + mise install
97 + corepack enable
98 pnpm install
99
100 # Run quality checks
@@ -142,13 +142,11 @@ The manual release process is available for cases where direct control over the
142 ### Troubleshooting
143
144 1. **Authentication Issues**
145 -
145 - Ensure you're logged in to npm (`npm login`)
146 - Check npm token validity
147 - Verify registry settings in `.npmrc`
148
149 2. **Build Failures**
151 -
150 - Clear node_modules: `pnpm clean`
151 - Reinstall dependencies: `pnpm install`
152 - Check for peer dependency issues
@@ -161,13 +159,11 @@ The manual release process is available for cases where direct control over the
159 ## Best Practices
160
161 1. **Changesets**
164 -
162 - Write clear, descriptive changeset messages
163 - Include breaking changes prominently
164 - Reference relevant issues/PRs
165
166 2. **Version Management**
170 -
167 - Follow semver strictly
168 - Document breaking changes
169 - Update peer dependencies appropriately
@@ -180,13 +176,11 @@ The manual release process is available for cases where direct control over the
176 ## Post-Release
177
178 1. **Verification**
183 -
179 - Check npm registry for new versions
180 - Verify package installations
181 - Test example projects
182
183 2. **Documentation**
189 -
184 - Update changelog if needed
185 - Update version numbers in docs
186 - Announce breaking changes
ts/e2e-tests/README.md
+17 -16
@@ -66,12 +66,12 @@ pnpm test:e2e
66 pnpm test:e2e:node
67 ```
68
69 -Runs Node.js tests in Docker using `bun test`. The default Node.js version is determined by `.nvmrc`.
69 +Runs Node.js tests in Docker using `bun test`. The default Node.js version is determined by `mise.toml`.
70
71 To run with a specific Node.js version:
72
73 ```bash
74 -COMPOSIO_E2E_NODE_VERSION=22.12.0 pnpm test:e2e:node
74 +COMPOSIO_E2E_NODE_VERSION=22.22.3 pnpm test:e2e:node
75 ```
76
77 ### Deno Tests Only
@@ -80,7 +80,7 @@ COMPOSIO_E2E_NODE_VERSION=22.12.0 pnpm test:e2e:node
80 pnpm test:e2e:deno
81 ```
82
83 -Runs Deno tests in Docker using `bun test`. The default Deno version is determined by `.dvmrc`.
83 +Runs Deno tests in Docker using `bun test`. The default Deno version is determined by `mise.toml`.
84
85 To run with a specific Deno version:
86
@@ -122,9 +122,9 @@ import { describe, it, expect, beforeAll } from 'bun:test';
122
123 e2e(import.meta.url, {
124 versions: {
125 - node: ['20.18.0', '22.12.0'], // Optional: defaults to .nvmrc version
125 + node: ['22.22.3', '24.16.0', '25.9.0'], // Optional: defaults to the current version in mise.toml
126 },
127 - env: { MY_VAR: process.env.MY_VAR }, // Optional: env vars (validated at startup)
127 + env: { MY_VAR: process.env.MY_VAR }, // Optional: env vars (validated at startup)
128 defineTests: ({ runtime, runFixture }) => {
129 let result: E2ETestResult;
130
@@ -161,7 +161,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
161
162 e2e(import.meta.url, {
163 versions: {
164 - deno: ['2.6.7'], // Optional: defaults to .dvmrc version
164 + deno: ['2.6.7'], // Optional: defaults to the current version in mise.toml
165 },
166 usesFixtures: true,
167 defineTests: ({ runtime, runFixture }) => {
@@ -196,8 +196,8 @@ import { TIMEOUTS } from '@e2e-tests/utils/const';
196 import { describe, it, expect, beforeAll } from 'bun:test';
197
198 e2e(import.meta.url, {
199 - nodeVersions: ['20.19.0', '22.12.0'],
200 - usesFixtures: true, // Sets cwd to fixtures/ directory
199 + nodeVersions: ['22.22.3', '24.16.0', '25.9.0'],
200 + usesFixtures: true, // Sets cwd to fixtures/ directory
201 env: { MY_API_KEY: process.env.MY_API_KEY },
202 defineTests: ({ runFixture }) => {
203 let result: E2ETestResultWithSetup;
@@ -205,7 +205,7 @@ e2e(import.meta.url, {
205 beforeAll(async () => {
206 result = await runFixture({
207 filename: 'index.mjs',
208 - setup: 'npm install --legacy-peer-deps', // Runs before fixture
208 + setup: 'npm install --legacy-peer-deps', // Runs before fixture
209 });
210 }, TIMEOUTS.FIXTURE);
211
@@ -276,16 +276,16 @@ Each test suite generates an ephemereal `DEBUG.log` file in its directory with s
276 E2E Test: my-test
277 Started: 2026-01-30T12:18:42.000Z
278 Test file: ts/e2e-tests/runtimes/node/my-test/e2e.test.ts
279 -Node versions: 20.19.0, 22.12.0
279 +Runtime versions: Node.js 22.22.3, Node.js 24.16.0, Node.js 25.9.0
280 ================================================================================
281
282 ################################################################################
283 -### Node.js 20.19.0
283 +### Node.js 22.22.3
284 ################################################################################
285 -Image: composio-e2e-node:20.19.0
285 +Image: composio-e2e-node:22.22.3
286
287 --- Phase 1/2: setup ---
288 -Container: e2e-my-test-20-19-0-1769775520382-setup
288 +Container: e2e-my-test-22-22-3-1769775520382-setup
289 Command: npm install
290 Duration: 2.55s
291 Exit Code: 0 (success)
@@ -297,7 +297,7 @@ added 3 packages in 2s
297 (empty)
298
299 --- Phase 2/2: fixture ---
300 -Container: e2e-my-test-20-19-0-1769775520382-fixture
300 +Container: e2e-my-test-22-22-3-1769775520382-fixture
301 Command: node index.mjs
302 Duration: 0.56s
303 Exit Code: 0 (success)
@@ -311,8 +311,9 @@ Test passed!
311 ================================================================================
312 Summary
313 ================================================================================
314 -Node.js 20.19.0: PASS (2 phases, 3.11s total)
315 -Node.js 22.12.0: SKIPPED
314 +Node.js 22.22.3: PASS (2 phases, 3.11s total)
315 +Node.js 24.16.0: PASS (2 phases, 3.09s total)
316 +Node.js 25.9.0: PASS (2 phases, 3.08s total)
317
318 Finished: 2026-01-30T12:18:46.500Z
319 Total duration: 4.50s
ts/e2e-tests/_utils/Dockerfile.cli
+5 -5
@@ -1,8 +1,8 @@
1 # Reusable Dockerfile for CLI e2e tests (debian runtime)
2 -# Usage: docker build -f Dockerfile.cli --build-arg CLI_VERSION=0.1.24 -t test-name .
2 +# Usage: docker build -f Dockerfile.cli --build-arg CLI_VERSION=0.1.24 --build-arg NODE_VERSION=22.22.3 --build-arg BUN_VERSION=1.3.10 -t test-name .
3
4 -ARG NODE_VERSION=20.19.0
5 -ARG BUN_VERSION=1.3.10
4 +ARG NODE_VERSION
5 +ARG BUN_VERSION
6 ARG CLI_VERSION=0.0.0
7
8 FROM oven/bun:${BUN_VERSION} AS bun
@@ -29,7 +29,7 @@ COPY package.json \
29 .pnpmfile.cjs \
30 tsconfig.base.json \
31 tsdown.config.base.ts \
32 - .bun-version \
32 + toolchain-versions.json \
33 ./
34
35 # Copy pre-install scripts (rarely change)
@@ -42,7 +42,7 @@ COPY ts/packages/ ./ts/packages/
42 # Install dependencies using pnpm
43 # Note: We intentionally don't use --mount=type=cache for the pnpm store here
44 # because it causes native binding issues across builds
45 -RUN pnpm install --frozen-lockfile
45 +RUN BYPASS_TOOLCHAIN_CHECK=1 pnpm install --frozen-lockfile
46
47 # Build composio CLI binary
48 WORKDIR /app/ts/packages/cli
ts/e2e-tests/_utils/Dockerfile.deno
+9 -7
@@ -1,12 +1,14 @@
1 # Reusable Dockerfile for Deno e2e tests
2 -# Usage: docker build -f Dockerfile.deno --build-arg DENO_VERSION=2.6.7 -t test-name .
2 +# Usage: docker build -f Dockerfile.deno --build-arg DENO_VERSION=2.6.7 --build-arg NODE_MAJOR=20 --build-arg BUN_VERSION=1.3.10 -t test-name .
3 #
4 # Uses official denoland/deno images. For multi-version testing, run the build/run
5 # multiple times with different DENO_VERSION values from the shell script.
6
7 -ARG DENO_VERSION=2.6.7
7 +ARG DENO_VERSION
8
9 FROM denoland/deno:${DENO_VERSION}
10 +ARG NODE_MAJOR
11 +ARG BUN_VERSION
12
13 ENV PNPM_HOME="/pnpm"
14 ENV BUN_INSTALL="/usr/local"
@@ -23,7 +25,7 @@ RUN apt-get update && \
25 rm -rf /var/lib/apt/lists/*
26
27 # Install Node.js (needed for pnpm and building packages)
26 -RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
28 +RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \
29 apt-get install -y nodejs && \
30 rm -rf /var/lib/apt/lists/*
31
@@ -31,9 +33,8 @@ RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
33 RUN npm i -g corepack@latest && \
34 corepack enable
35
34 -# Install bun (version from .bun-version)
35 -COPY .bun-version ./
36 -RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash -s "bun-v$(cat .bun-version)" && \
36 +# Install Bun
37 +RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash -s "bun-v${BUN_VERSION}" && \
38 bun --version
39
40 # Copy lockfile first for optimal layer caching
@@ -45,6 +46,7 @@ COPY package.json \
46 .pnpmfile.cjs \
47 tsconfig.base.json \
48 tsdown.config.base.ts \
49 + toolchain-versions.json \
50 ./
51
52 # Copy pre-install scripts (rarely change)
@@ -57,7 +59,7 @@ COPY ts/packages/ ./ts/packages/
59 # Install dependencies using pnpm
60 # Note: We intentionally don't use --mount=type=cache for the pnpm store here
61 # because it causes native binding issues (e.g., rolldown-binding) across builds
60 -RUN pnpm install --frozen-lockfile
62 +RUN BYPASS_TOOLCHAIN_CHECK=1 pnpm install --frozen-lockfile
63
64 # Copy e2e tests last (changes frequently)
65 COPY ts/e2e-tests/ ./ts/e2e-tests/
ts/e2e-tests/_utils/Dockerfile.node
+8 -7
@@ -1,12 +1,13 @@
1 # Reusable Dockerfile for Node.js e2e tests
2 -# Usage: docker build -f Dockerfile.node --build-arg NODE_VERSION=20.19.0 -t test-name .
2 +# Usage: docker build -f Dockerfile.node --build-arg NODE_VERSION=22.22.3 --build-arg BUN_VERSION=1.3.10 -t test-name .
3 #
4 # Uses official node:slim images. For multi-version testing, run the build/run
5 # multiple times with different NODE_VERSION values from the shell script.
6
7 -ARG NODE_VERSION=20.19.0
7 +ARG NODE_VERSION
8
9 FROM node:${NODE_VERSION}-slim
10 +ARG BUN_VERSION
11
12 ENV PNPM_HOME="/pnpm"
13 ENV BUN_INSTALL="/usr/local"
@@ -20,12 +21,11 @@ RUN apt-get update && \
21 rm -rf /var/lib/apt/lists/*
22
23 # Install corepack (for pnpm)
23 -RUN npm i -g corepack@latest && \
24 +RUN npm i -g corepack@latest --force && \
25 corepack enable
26
26 -# Install bun (version from .bun-version)
27 -COPY .bun-version ./
28 -RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash -s "bun-v$(cat .bun-version)" && \
27 +# Install Bun
28 +RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash -s "bun-v${BUN_VERSION}" && \
29 bun --version
30
31 # Copy lockfile first for optimal layer caching
@@ -37,6 +37,7 @@ COPY package.json \
37 .pnpmfile.cjs \
38 tsconfig.base.json \
39 tsdown.config.base.ts \
40 + toolchain-versions.json \
41 ./
42
43 # Copy pre-install scripts (rarely change)
@@ -49,7 +50,7 @@ COPY ts/packages/ ./ts/packages/
50 # Install dependencies using pnpm
51 # Note: We intentionally don't use --mount=type=cache for the pnpm store here
52 # because it causes native binding issues (e.g., rolldown-binding) across builds
52 -RUN pnpm install --frozen-lockfile
53 +RUN BYPASS_TOOLCHAIN_CHECK=1 pnpm install --frozen-lockfile
54
55 # Build and install composio CLI binary
56 # This is a simplified version of ts/packages/cli/scripts/build-binary.ts + install-binary.ts
ts/e2e-tests/_utils/README.md
+60 -60
@@ -4,13 +4,13 @@ Shared infrastructure for running `@composio/core` and CLI end-to-end tests in i
4
5 ## What's Here
6
7 -| File/Directory | Purpose |
8 -| ----------------- | ------------------------------------------------------ |
9 -| `src/` | TypeScript utilities (e2e runner, config, types) |
10 -| `scripts/` | Docker build and cleanup scripts |
11 -| `Dockerfile.node` | Multi-stage Dockerfile for Node.js test environments |
12 -| `Dockerfile.deno` | Dockerfile for Deno test environments |
13 -| `Dockerfile.cli` | Scratch Dockerfile for CLI test environments |
7 +| File/Directory | Purpose |
8 +| ----------------- | ---------------------------------------------------- |
9 +| `src/` | TypeScript utilities (e2e runner, config, types) |
10 +| `scripts/` | Docker build and cleanup scripts |
11 +| `Dockerfile.node` | Multi-stage Dockerfile for Node.js test environments |
12 +| `Dockerfile.deno` | Dockerfile for Deno test environments |
13 +| `Dockerfile.cli` | Scratch Dockerfile for CLI test environments |
14
15 ## API
16
@@ -25,11 +25,11 @@ import { describe, it, expect, beforeAll } from 'bun:test';
25
26 e2e(import.meta.url, {
27 versions: {
28 - node: ['20.18.0', '20.19.0', '22.12.0'], // optional, defaults to .nvmrc
29 - deno: ['2.6.7'], // optional, defaults to .dvmrc
30 - cli: ['current'], // optional, defaults to CLI package.json version
28 + node: ['22.22.3', '24.16.0', '25.9.0'], // optional, defaults to mise.toml
29 + deno: ['2.6.7'], // optional, defaults to mise.toml
30 + cli: ['current'], // optional, defaults to CLI package.json version
31 },
32 - env: { MY_VAR: 'value' }, // optional env vars
32 + env: { MY_VAR: 'value' }, // optional env vars
33 defineTests: ({ runtime, runCmd, runFixture }) => {
34 let result: E2ETestResult;
35
@@ -50,39 +50,39 @@ e2e(import.meta.url, {
50
51 Configuration object passed to `e2e()`:
52
53 -| Property | Type | Description |
54 -| -------------- | ------------------------------------- | ---------------------------------------------------------------- |
55 -| `versions` | `RuntimeVersions` | Runtime versions to test. See RuntimeVersions below |
56 -| `env` | `Record<string, string \| undefined>` | Environment variables for Docker. Validated at startup |
57 -| `usesFixtures` | `boolean` | When true, sets cwd to `{testDir}/fixtures`. Default: `false` |
58 -| `defineTests` | `(ctx: DefineTestsContext) => void` | Callback to define tests using bun:test primitives |
53 +| Property | Type | Description |
54 +| -------------- | ------------------------------------- | ------------------------------------------------------------- |
55 +| `versions` | `RuntimeVersions` | Runtime versions to test. See RuntimeVersions below |
56 +| `env` | `Record<string, string \| undefined>` | Environment variables for Docker. Validated at startup |
57 +| `usesFixtures` | `boolean` | When true, sets cwd to `{testDir}/fixtures`. Default: `false` |
58 +| `defineTests` | `(ctx: DefineTestsContext) => void` | Callback to define tests using bun:test primitives |
59
60 ### `RuntimeVersions`
61
62 -| Property | Type | Description |
63 -| -------- | -------------------------------- | ------------------------------------------------ |
64 -| `node` | `readonly NodeVersionFromUser[]` | Node.js versions. Defaults to `.nvmrc` |
65 -| `deno` | `readonly DenoVersionFromUser[]` | Deno versions. Defaults to `.dvmrc` |
66 -| `cli` | `readonly CliVersionFromUser[]` | CLI versions. Defaults to CLI package.json |
62 +| Property | Type | Description |
63 +| -------- | -------------------------------- | ------------------------------------------ |
64 +| `node` | `readonly NodeVersionFromUser[]` | Node.js versions. Defaults to `mise.toml` |
65 +| `deno` | `readonly DenoVersionFromUser[]` | Deno versions. Defaults to `mise.toml` |
66 +| `cli` | `readonly CliVersionFromUser[]` | CLI versions. Defaults to CLI package.json |
67
68 ### `DefineTestsContext`
69
70 The context passed to the `defineTests` callback:
71
72 -| Property | Type/Signature | Description |
73 -| ------------ | ---------------------------------------------------------------- | ---------------------------------------------- |
74 -| `runtime` | `'node' \| 'deno' \| 'cli'` | Current runtime being tested |
75 -| `runCmd` | `(command: string) => Promise<E2ETestResult>` | Run arbitrary command in Docker container |
76 -| `runFixture` | `(options: RunFixtureOptions) => Promise<E2ETestResult \| E2ETestResultWithSetup>` | Run fixture with optional setup phase |
72 +| Property | Type/Signature | Description |
73 +| ------------ | ---------------------------------------------------------------------------------- | ----------------------------------------- |
74 +| `runtime` | `'node' \| 'deno' \| 'cli'` | Current runtime being tested |
75 +| `runCmd` | `(command: string) => Promise<E2ETestResult>` | Run arbitrary command in Docker container |
76 +| `runFixture` | `(options: RunFixtureOptions) => Promise<E2ETestResult \| E2ETestResultWithSetup>` | Run fixture with optional setup phase |
77
78 ### `RunFixtureOptions`
79
80 Options for `runFixture()`:
81
82 -| Property | Type | Description |
83 -| ---------- | -------- | --------------------------------------------------------------------- |
84 -| `filename` | `string` | Fixture file path relative to cwd (e.g., `'index.mjs'`) |
85 -| `setup` | `string` | Optional setup command (e.g., `'npm install'`). Enables volume mode |
82 +| Property | Type | Description |
83 +| ---------- | -------- | ------------------------------------------------------------------- |
84 +| `filename` | `string` | Fixture file path relative to cwd (e.g., `'index.mjs'`) |
85 +| `setup` | `string` | Optional setup command (e.g., `'npm install'`). Enables volume mode |
86
87 **Behavior:**
88
@@ -98,8 +98,8 @@ const result = await runFixture({
98 filename: 'index.mjs',
99 setup: 'npm install --legacy-peer-deps',
100 });
101 -expect(result.setup.exitCode).toBe(0); // Check setup phase
102 -expect(result.exitCode).toBe(0); // Check fixture phase
101 +expect(result.setup.exitCode).toBe(0); // Check setup phase
102 +expect(result.exitCode).toBe(0); // Check fixture phase
103 ```
104
105 ### `E2ETestResult`
@@ -108,9 +108,9 @@ Result returned by `runCmd` and `runFixture`:
108
109 ```typescript
110 interface E2ETestResult {
111 - exitCode: number; // Exit code from the command (0 = success)
112 - stdout: string; // Captured stdout
113 - stderr: string; // Captured stderr
111 + exitCode: number; // Exit code from the command (0 = success)
112 + stdout: string; // Captured stdout
113 + stderr: string; // Captured stderr
114 }
115 ```
116
@@ -162,9 +162,13 @@ Predefined timeout constants for tests (in milliseconds):
162 ```typescript
163 import { TIMEOUTS } from '@e2e-tests/utils/const';
164
165 -it('calls LLM', async () => {
166 - // test code
167 -}, { timeout: TIMEOUTS.LLM_SHORT });
165 +it(
166 + 'calls LLM',
167 + async () => {
168 + // test code
169 + },
170 + { timeout: TIMEOUTS.LLM_SHORT }
171 +);
172 ```
173
174 | Constant | Value | Use Case |
@@ -182,16 +186,16 @@ Node.js versions to test are resolved in this order:
186
187 1. **`COMPOSIO_E2E_NODE_VERSION` env var** (highest priority): Use `[env_value]`
188 2. **`config.versions.node`**: Use the provided array
185 -3. **Default**: Use version from `.nvmrc` file
189 +3. **Default**: Use version from `mise.toml` file
190
191 ### Well-Known Node Versions
192
193 The following versions are pre-defined in `const.ts`:
194
191 -- `20.18.0`
192 -- `20.19.0`
193 -- `22.12.0`
194 -- `current` (resolves to `.nvmrc` version)
195 +- `22.22.3`
196 +- `24.16.0`
197 +- `25.9.0`
198 +- `current` (resolves to `mise.toml` version)
199
200 ### Deno Version Resolution
201
@@ -199,14 +203,14 @@ Deno versions to test are resolved in this order:
203
204 1. **`COMPOSIO_E2E_DENO_VERSION` env var** (highest priority): Use `[env_value]`
205 2. **`config.versions.deno`**: Use the provided array
202 -3. **Default**: Use version from `.dvmrc` file
206 +3. **Default**: Use version from `mise.toml` file
207
208 ### Well-Known Deno Versions
209
210 The following versions are pre-defined in `const.ts`:
211
212 - `2.6.7`
209 -- `current` (resolves to `.dvmrc` version)
213 +- `current` (resolves to `mise.toml` version)
214
215 ### CLI Version Resolution
216
@@ -250,8 +254,8 @@ e2e(import.meta.url, {
254 beforeAll(async () => {
255 // Both commands run in fixtures/ directory
256 result = await runFixture({
253 - filename: 'index.mjs', // Resolves to fixtures/index.mjs
254 - setup: 'npm install', // Runs in fixtures/
257 + filename: 'index.mjs', // Resolves to fixtures/index.mjs
258 + setup: 'npm install', // Runs in fixtures/
259 });
260 }, TIMEOUTS.FIXTURE);
261 },
@@ -277,16 +281,16 @@ Each test suite generates a `DEBUG.log` file with structured output grouped by r
281 E2E Test: openai-zod4-compat
282 Started: 2026-01-30T12:18:42.000Z
283 Test file: ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts
280 -Node versions: 20.19.0, 22.12.0
284 +Runtime versions: Node.js 22.22.3, Node.js 24.16.0, Node.js 25.9.0
285 ================================================================================
286
287 ################################################################################
284 -### Node.js 20.19.0
288 +### Node.js 22.22.3
289 ################################################################################
286 -Image: composio-e2e-node:20.19.0
290 +Image: composio-e2e-node:22.22.3
291
292 --- Phase 1/2: setup ---
289 -Container: e2e-openai-zod4-compat-20-19-0-1769775520382-setup
293 +Container: e2e-openai-zod4-compat-22-22-3-1769775520382-setup
294 Command: npm install --legacy-peer-deps
295 Duration: 2.55s
296 Exit Code: 0 (success)
@@ -298,7 +302,7 @@ added 3 packages, and audited 5 packages in 2s
302 (empty)
303
304 --- Phase 2/2: fixture ---
301 -Container: e2e-openai-zod4-compat-20-19-0-1769775520382-fixture
305 +Container: e2e-openai-zod4-compat-22-22-3-1769775520382-fixture
306 Command: node index.mjs
307 Duration: 0.56s
308 Exit Code: 0 (success)
@@ -311,16 +315,12 @@ All packages work together!
315 [stderr]
316 (empty)
317
314 -################################################################################
315 -### Node.js 22.12.0 (SKIPPED)
316 -################################################################################
317 -Reason: Not selected via COMPOSIO_E2E_NODE_VERSION
318 -
318 ================================================================================
319 Summary
320 ================================================================================
322 -Node.js 20.19.0: PASS (2 phases, 3.11s total)
323 -Node.js 22.12.0: SKIPPED
321 +Node.js 22.22.3: PASS (2 phases, 3.11s total)
322 +Node.js 24.16.0: PASS (2 phases, 3.09s total)
323 +Node.js 25.9.0: PASS (2 phases, 3.08s total)
324
325 Finished: 2026-01-30T12:18:46.500Z
326 Total duration: 4.50s
ts/e2e-tests/_utils/scripts/docker-build.ts
+56 -28
@@ -13,29 +13,41 @@ import { $ } from 'bun';
13 import { resolve, dirname } from 'node:path';
14 import { fileURLToPath } from 'node:url';
15 import { readFileSync } from 'node:fs';
16 +import { execFileSync } from 'node:child_process';
17 import { WELL_KNOWN_NODE_VERSIONS, WELL_KNOWN_DENO_VERSIONS } from '../src/const';
18
19 const __dirname = dirname(fileURLToPath(import.meta.url));
20
21 +type DockerToolchain = {
22 + nodeVersion: string;
23 + nodeMajorVersion: string;
24 + bunVersion: string;
25 +};
26 +
27 function getRepoRoot(): string {
28 // From scripts/ to repo root: scripts -> _utils -> e2e-tests -> ts -> composio
29 return resolve(__dirname, '../../../..');
30 }
31
25 -function getNvmrcVersion(repoRoot: string): string {
32 +function getMiseVersion(repoRoot: string, tool: 'node' | 'bun' | 'deno'): string {
33 try {
27 - return readFileSync(resolve(repoRoot, '.nvmrc'), 'utf-8').trim();
28 - } catch {
29 - return process.versions.node;
34 + return execFileSync('mise', ['current', tool], { cwd: repoRoot, encoding: 'utf-8' }).trim();
35 + } catch (err) {
36 + throw new Error(`Failed to resolve ${tool} version from mise.toml: ${(err as Error).message}`);
37 }
38 }
39
33 -function getDvmrcVersion(repoRoot: string): string {
34 - try {
35 - return readFileSync(resolve(repoRoot, '.dvmrc'), 'utf-8').trim();
36 - } catch {
37 - return '2.6.7'; // fallback default
38 - }
40 +function getMajorVersion(version: string): string {
41 + return version.split('.')[0] ?? version;
42 +}
43 +
44 +function getDockerToolchain(repoRoot: string): DockerToolchain {
45 + const nodeVersion = getMiseVersion(repoRoot, 'node');
46 + return {
47 + nodeVersion,
48 + nodeMajorVersion: getMajorVersion(nodeVersion),
49 + bunVersion: getMiseVersion(repoRoot, 'bun'),
50 + };
51 }
52
53 function getCliPackageVersion(repoRoot: string): string {
@@ -63,7 +75,11 @@ function defaultNodeLabels(nodeVersion: string): Record<string, string> {
75 };
76 }
77
66 -async function buildNodeImage(nodeVersion: string, repoRoot: string): Promise<boolean> {
78 +async function buildNodeImage(
79 + nodeVersion: string,
80 + toolchain: DockerToolchain,
81 + repoRoot: string
82 +): Promise<boolean> {
83 const dockerfilePath = resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.node');
84 const imageTag = imageTagForNodeVersion(nodeVersion);
85 const labels = defaultNodeLabels(nodeVersion);
@@ -73,9 +89,10 @@ async function buildNodeImage(nodeVersion: string, repoRoot: string): Promise<bo
89
90 console.log(`\nBuilding image for Node.js ${nodeVersion}...`);
91
76 - const result = await $`docker build -f ${dockerfilePath} --build-arg NODE_VERSION=${nodeVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
77 - .cwd(repoRoot)
78 - .nothrow();
92 + const result =
93 + await $`docker build -f ${dockerfilePath} --build-arg NODE_VERSION=${nodeVersion} --build-arg BUN_VERSION=${toolchain.bunVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
94 + .cwd(repoRoot)
95 + .nothrow();
96
97 if (result.exitCode !== 0) {
98 console.error(` Failed to build ${imageTag}:`);
@@ -103,7 +120,11 @@ function defaultDenoLabels(denoVersion: string): Record<string, string> {
120 };
121 }
122
106 -async function buildDenoImage(denoVersion: string, repoRoot: string): Promise<boolean> {
123 +async function buildDenoImage(
124 + denoVersion: string,
125 + toolchain: DockerToolchain,
126 + repoRoot: string
127 +): Promise<boolean> {
128 const dockerfilePath = resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.deno');
129 const imageTag = imageTagForDenoVersion(denoVersion);
130 const labels = defaultDenoLabels(denoVersion);
@@ -113,9 +134,10 @@ async function buildDenoImage(denoVersion: string, repoRoot: string): Promise<bo
134
135 console.log(`\nBuilding image for Deno ${denoVersion}...`);
136
116 - const result = await $`docker build -f ${dockerfilePath} --build-arg DENO_VERSION=${denoVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
117 - .cwd(repoRoot)
118 - .nothrow();
137 + const result =
138 + await $`docker build -f ${dockerfilePath} --build-arg DENO_VERSION=${denoVersion} --build-arg NODE_MAJOR=${toolchain.nodeMajorVersion} --build-arg BUN_VERSION=${toolchain.bunVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
139 + .cwd(repoRoot)
140 + .nothrow();
141
142 if (result.exitCode !== 0) {
143 console.error(` Failed to build ${imageTag}:`);
@@ -143,7 +165,11 @@ function defaultCliLabels(cliVersion: string): Record<string, string> {
165 };
166 }
167
146 -async function buildCliImage(cliVersion: string, repoRoot: string): Promise<boolean> {
168 +async function buildCliImage(
169 + cliVersion: string,
170 + toolchain: DockerToolchain,
171 + repoRoot: string
172 +): Promise<boolean> {
173 const dockerfilePath = resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.cli');
174 const imageTag = imageTagForCliVersion(cliVersion);
175 const labels = defaultCliLabels(cliVersion);
@@ -153,9 +179,10 @@ async function buildCliImage(cliVersion: string, repoRoot: string): Promise<bool
179
180 console.log(`\nBuilding image for CLI ${cliVersion}...`);
181
156 - const result = await $`docker build -f ${dockerfilePath} --build-arg CLI_VERSION=${cliVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
157 - .cwd(repoRoot)
158 - .nothrow();
182 + const result =
183 + await $`docker build -f ${dockerfilePath} --build-arg CLI_VERSION=${cliVersion} --build-arg NODE_VERSION=${toolchain.nodeVersion} --build-arg BUN_VERSION=${toolchain.bunVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
184 + .cwd(repoRoot)
185 + .nothrow();
186
187 if (result.exitCode !== 0) {
188 console.error(` Failed to build ${imageTag}:`);
@@ -173,8 +200,9 @@ async function buildCliImage(cliVersion: string, repoRoot: string): Promise<bool
200
201 async function main() {
202 const repoRoot = getRepoRoot();
176 - const currentNodeVersion = getNvmrcVersion(repoRoot);
177 - const currentDenoVersion = getDvmrcVersion(repoRoot);
203 + const dockerToolchain = getDockerToolchain(repoRoot);
204 + const currentNodeVersion = dockerToolchain.nodeVersion;
205 + const currentDenoVersion = getMiseVersion(repoRoot, 'deno');
206 const currentCliVersion = getCliPackageVersion(repoRoot);
207 const envNodeVersion = Bun.env.COMPOSIO_E2E_NODE_VERSION;
208 const envDenoVersion = Bun.env.COMPOSIO_E2E_DENO_VERSION;
@@ -243,7 +271,7 @@ async function main() {
271 // Build Node.js images
272 for (const version of nodeVersions) {
273 total++;
246 - const success = await buildNodeImage(version, repoRoot);
274 + const success = await buildNodeImage(version, dockerToolchain, repoRoot);
275 if (!success) {
276 failed++;
277 }
@@ -252,7 +280,7 @@ async function main() {
280 // Build Deno images
281 for (const version of denoVersions) {
282 total++;
255 - const success = await buildDenoImage(version, repoRoot);
283 + const success = await buildDenoImage(version, dockerToolchain, repoRoot);
284 if (!success) {
285 failed++;
286 }
@@ -261,7 +289,7 @@ async function main() {
289 // Build CLI images
290 for (const version of cliVersions) {
291 total++;
264 - const success = await buildCliImage(version, repoRoot);
292 + const success = await buildCliImage(version, dockerToolchain, repoRoot);
293 if (!success) {
294 failed++;
295 }
@@ -275,7 +303,7 @@ async function main() {
303 }
304 }
305
278 -main().catch((err) => {
306 +main().catch(err => {
307 console.error('Error:', err);
308 process.exit(1);
309 });
ts/e2e-tests/_utils/src/config.ts
+42 -55
@@ -1,7 +1,7 @@
1 import { dirname, resolve } from 'node:path';
2 import { fileURLToPath } from 'node:url';
3 import { readFileSync } from 'node:fs';
4 -import process from 'node:process';
4 +import { execFileSync } from 'node:child_process';
5 import type {
6 NodeVersionMeta,
7 NodeVersionFromUser,
@@ -42,7 +42,7 @@ export function getRepoRoot(): string {
42 /**
43 * Resolve the Node.js versions to test against, with CI skip state.
44 *
45 - * The `'current'` version always resolves to the value in `.nvmrc`.
45 + * The `'current'` version always resolves to the value in mise.toml.
46 *
47 * In CI mode (CI env var set + COMPOSIO_E2E_NODE_VERSION set):
48 * - Versions not matching COMPOSIO_E2E_NODE_VERSION are marked to skip
@@ -55,21 +55,27 @@ export function resolveNodeVersionMetaList(
55 configNodeVersions?: readonly NodeVersionFromUser[]
56 ): NonEmptyArray<NodeVersionMeta> {
57 const envVersion = Bun.env.COMPOSIO_E2E_NODE_VERSION;
58 - const nvmrcVersion = getNvmrcVersion();
58
59 // Local mode with env override: single version, no skip
60 if (!isCI() && envVersion) {
61 return [{ kind: 'overridden', value: envVersion, skip: { value: false } }];
62 }
63
65 - // No config provided: use .nvmrc version
64 + // Only read mise.toml after env override check.
65 + const miseNodeVersion = getMiseVersion('node');
66 +
67 + // No config provided: use mise.toml version
68 if (configNodeVersions === undefined || configNodeVersions.length === 0) {
67 - return [{ kind: 'current', value: nvmrcVersion, skip: { value: false } }];
69 + return [{ kind: 'current', value: miseNodeVersion, skip: { value: false } }];
70 }
71
72 const resolvedVersions = configNodeVersions.map((v): NodeVersionMeta => {
73 if (v === 'current') {
72 - return { kind: 'current', value: nvmrcVersion, skip: computeSkipForVersion(envVersion, nvmrcVersion) };
74 + return {
75 + kind: 'current',
76 + value: miseNodeVersion,
77 + skip: computeSkipForVersion(envVersion, miseNodeVersion),
78 + };
79 }
80 return { kind: 'static', value: v, skip: computeSkipForVersion(envVersion, v) };
81 });
@@ -80,10 +86,7 @@ export function resolveNodeVersionMetaList(
86 /**
87 * Compute skip state for a single version in CI mode.
88 */
83 -function computeSkipForVersion(
84 - envVersion: string | undefined,
85 - versionValue: string
86 -): SkipInCI {
89 +function computeSkipForVersion(envVersion: string | undefined, versionValue: string): SkipInCI {
90 if (!isCI() || !envVersion) {
91 return { value: false };
92 }
@@ -99,37 +102,17 @@ function computeSkipForVersion(
102 }
103
104 /**
102 - * Read the Node.js version from .nvmrc file.
105 + * Read a tool version from mise.toml.
106 * Used to determine the version for 'current' tests.
107 */
105 -export function getNvmrcVersion(): string {
108 +export function getMiseVersion(tool: 'node' | 'deno'): string {
109 try {
107 - const nvmrc = readFileSync(resolve(getRepoRoot(), '.nvmrc'), 'utf-8');
108 - return nvmrc.trim();
109 - } catch {
110 - console.warn(
111 - 'Failed to read .nvmrc, falling back to current Node.js version (as read by Bun, so its value is unpredictable)',
112 - process.versions.node
113 - );
114 - return process.versions.node;
115 - }
116 -}
117 -
118 -/**
119 - * Read the Deno version from .dvmrc file.
120 - * Used to determine the version for 'current' tests.
121 - *
122 - * @throws Error if .dvmrc file does not exist
123 - */
124 -export function getDvmrcVersion(): string {
125 - try {
126 - const dvmrc = readFileSync(resolve(getRepoRoot(), '.dvmrc'), 'utf-8');
127 - return dvmrc.trim();
128 - } catch {
129 - throw new Error(
130 - 'Failed to read .dvmrc for Deno version resolution. ' +
131 - 'Create a .dvmrc file at the repo root with the desired Deno version (e.g., "2.6.7").'
132 - );
110 + return execFileSync('mise', ['current', tool], {
111 + cwd: getRepoRoot(),
112 + encoding: 'utf-8',
113 + }).trim();
114 + } catch (err) {
115 + throw new Error(`Failed to resolve ${tool} version from mise.toml: ${(err as Error).message}`);
116 }
117 }
118
@@ -146,17 +129,16 @@ export function getCliPackageVersion(): string {
129 }
130 return String(parsed.version).trim();
131 } catch (err) {
149 - throw new Error(`Failed to read CLI version from ts/packages/cli/package.json: ${(err as Error).message}`);
132 + throw new Error(
133 + `Failed to read CLI version from ts/packages/cli/package.json: ${(err as Error).message}`
134 + );
135 }
136 }
137
138 /**
139 * Compute skip state for a Deno version in CI mode.
140 */
156 -function computeSkipForDenoVersion(
157 - envVersion: string | undefined,
158 - versionValue: string
159 -): SkipInCI {
141 +function computeSkipForDenoVersion(envVersion: string | undefined, versionValue: string): SkipInCI {
142 if (!isCI() || !envVersion) {
143 return { value: false };
144 }
@@ -174,10 +156,7 @@ function computeSkipForDenoVersion(
156 /**
157 * Compute skip state for a CLI version in CI mode.
158 */
177 -function computeSkipForCliVersion(
178 - envVersion: string | undefined,
179 - versionValue: string
180 -): SkipInCI {
159 +function computeSkipForCliVersion(envVersion: string | undefined, versionValue: string): SkipInCI {
160 if (!isCI() || !envVersion) {
161 return { value: false };
162 }
@@ -195,7 +174,7 @@ function computeSkipForCliVersion(
174 /**
175 * Resolve the Deno versions to test against, with CI skip state.
176 *
198 - * The `'current'` version always resolves to the value in `.dvmrc`.
177 + * The `'current'` version always resolves to the value in mise.toml.
178 *
179 * In CI mode (CI env var set + COMPOSIO_E2E_DENO_VERSION set):
180 * - Versions not matching COMPOSIO_E2E_DENO_VERSION are marked to skip
@@ -210,22 +189,26 @@ export function resolveDenoVersionMetaList(
189 const envVersion = Bun.env.COMPOSIO_E2E_DENO_VERSION;
190
191 // Local mode with env override: single version, no skip
213 - // Check this BEFORE calling getDvmrcVersion() so env override works without .dvmrc
192 + // Check this BEFORE calling mise so env override works without the local toolchain installed.
193 if (!isCI() && envVersion) {
194 return [{ kind: 'overridden', value: envVersion, skip: { value: false } }];
195 }
196
218 - // Only read .dvmrc after env override check (getDvmrcVersion throws if file missing)
219 - const dvmrcVersion = getDvmrcVersion();
197 + // Only read mise.toml after env override check.
198 + const miseDenoVersion = getMiseVersion('deno');
199
221 - // No config provided: use .dvmrc version
200 + // No config provided: use mise.toml version
201 if (configDenoVersions === undefined || configDenoVersions.length === 0) {
223 - return [{ kind: 'current', value: dvmrcVersion, skip: { value: false } }];
202 + return [{ kind: 'current', value: miseDenoVersion, skip: { value: false } }];
203 }
204
205 const resolvedVersions = configDenoVersions.map((v): DenoVersionMeta => {
206 if (v === 'current') {
228 - return { kind: 'current', value: dvmrcVersion, skip: computeSkipForDenoVersion(envVersion, dvmrcVersion) };
207 + return {
208 + kind: 'current',
209 + value: miseDenoVersion,
210 + skip: computeSkipForDenoVersion(envVersion, miseDenoVersion),
211 + };
212 }
213 return { kind: 'static', value: v, skip: computeSkipForDenoVersion(envVersion, v) };
214 });
@@ -263,7 +246,11 @@ export function resolveCliVersionMetaList(
246
247 const resolvedVersions = configCliVersions.map((v): CliVersionMeta => {
248 if (v === 'current') {
266 - return { kind: 'current', value: currentVersion, skip: computeSkipForCliVersion(envVersion, currentVersion) };
249 + return {
250 + kind: 'current',
251 + value: currentVersion,
252 + skip: computeSkipForCliVersion(envVersion, currentVersion),
253 + };
254 }
255 return { kind: 'static', value: v, skip: computeSkipForCliVersion(envVersion, v) };
256 });
ts/e2e-tests/_utils/src/const.ts
+11 -5
@@ -1,19 +1,25 @@
1 +import toolchainVersions from '../../../../toolchain-versions.json' with { type: 'json' };
2 +
3 /**
4 * Environment variables to automatically pass through to Docker containers.
5 */
4 -export const WELL_KNOWN_ENV_VARS = ['COMPOSIO_API_KEY', 'COMPOSIO_BASE_URL', 'OPENAI_API_KEY'] as const;
6 +export const WELL_KNOWN_ENV_VARS = [
7 + 'COMPOSIO_API_KEY',
8 + 'COMPOSIO_BASE_URL',
9 + 'OPENAI_API_KEY',
10 +] as const;
11
12 /**
13 * Node.js versions that are well-known to the CI matrix strategy.
8 - * `current` refers to the Node.js version specified in `.nvmrc`.
14 + * `current` refers to the Node.js version specified in mise.toml.
15 */
10 -export const WELL_KNOWN_NODE_VERSIONS = ['20.18.0', '20.19.0', '22.12.0', 'current'] as const;
16 +export const WELL_KNOWN_NODE_VERSIONS = [...toolchainVersions.node, 'current'] as const;
17
18 /**
19 * Deno versions that are well-known to the CI matrix strategy.
14 - * `current` refers to the Deno version specified in `.dvmrc`.
20 + * `current` refers to the Deno version specified in mise.toml.
21 */
16 -export const WELL_KNOWN_DENO_VERSIONS = ['2.6.7', 'current'] as const;
22 +export const WELL_KNOWN_DENO_VERSIONS = [...toolchainVersions.deno, 'current'] as const;
23
24 /**
25 * CLI versions that are well-known to the CI strategy.
ts/e2e-tests/_utils/src/e2e.ts
+1 -1
@@ -52,7 +52,7 @@ function inferCwd(importMetaUrl: string, repoRoot: string): string {
52 * import type { E2ETestResult } from '@e2e-tests/utils';
53 *
54 * e2e(import.meta.url, {
55 - * versions: { node: ['20.19.0', '22.12.0'] },
55 + * versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
56 * env: { COMPOSIO_API_KEY: process.env.COMPOSIO_API_KEY },
57 * defineTests: ({ describe, it, expect, beforeAll, runFixture }) => {
58 * let result: E2ETestResult;
ts/e2e-tests/_utils/src/image-lifecycle.ts
+40 -9
@@ -158,9 +158,7 @@ async function exec(cmd: string, args: string[], options: ExecOptions = {}): Pro
158 const { cwd, env } = options;
159 const escapedArgs = args.map(escapeShellArg).join(' ');
160
161 - let shell = $`${{ raw: cmd }} ${{ raw: escapedArgs }}`
162 - .nothrow()
163 - .quiet();
161 + let shell = $`${{ raw: cmd }} ${{ raw: escapedArgs }}`.nothrow().quiet();
162
163 if (cwd) {
164 shell = shell.cwd(cwd);
@@ -187,6 +185,21 @@ export async function checkDocker(options: CheckDockerOptions = {}): Promise<Exe
185 return exec('docker', ['info'], { cwd: repoRoot });
186 }
187
188 +async function getMiseVersion(tool: 'node' | 'bun' | 'deno', repoRoot: string): Promise<string> {
189 + const result = await exec('mise', ['current', tool], { cwd: repoRoot });
190 + const version = result.stdout.trim();
191 + if (result.exitCode !== 0 || !version) {
192 + throw new Error(
193 + `Failed to resolve ${tool} version from mise.toml: ${result.stderr || result.stdout}`
194 + );
195 + }
196 + return version;
197 +}
198 +
199 +function getMajorVersion(version: string): string {
200 + return version.split('.')[0] ?? version;
201 +}
202 +
203 /**
204 * Creates image tag for a given Node version.
205 */
@@ -214,8 +227,10 @@ export async function ensureNodeImage(
227 }
228
229 const repoRoot = options.repoRoot ?? getRepoRoot();
217 - const dockerfilePath = options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.node');
230 + const dockerfilePath =
231 + options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.node');
232 const imageTag = imageTagForNodeVersion(nodeVersion);
233 + const bunVersion = await getMiseVersion('bun', repoRoot);
234
235 const inspect = await exec('docker', ['image', 'inspect', imageTag], { cwd: repoRoot });
236 if (inspect.exitCode === 0) {
@@ -228,6 +243,8 @@ export async function ensureNodeImage(
243 dockerfilePath,
244 '--build-arg',
245 `NODE_VERSION=${nodeVersion}`,
246 + '--build-arg',
247 + `BUN_VERSION=${bunVersion}`,
248 ...labelsToArgs(defaultNodeLabels(nodeVersion)),
249 '-t',
250 imageTag,
@@ -329,7 +346,7 @@ export async function runNodeContainer(options: RunNodeContainerOptions): Promis
346 // Handle cmd as array for direct execution without shell interpretation.
347 if (Array.isArray(cmd)) {
348 dockerArgs.push(...cmd.map(String));
332 - // Handle cmd as string by wrapping in login shell for proper environment setup.
349 + // Handle cmd as string by wrapping in login shell for proper environment setup.
350 } else if (typeof cmd === 'string' && cmd.length > 0) {
351 dockerArgs.push('sh', '-lc', cmd);
352 } else {
@@ -395,8 +412,11 @@ export async function ensureDenoImage(
412 }
413
414 const repoRoot = options.repoRoot ?? getRepoRoot();
398 - const dockerfilePath = options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.deno');
415 + const dockerfilePath =
416 + options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.deno');
417 const imageTag = imageTagForDenoVersion(denoVersion);
418 + const nodeVersion = await getMiseVersion('node', repoRoot);
419 + const bunVersion = await getMiseVersion('bun', repoRoot);
420
421 const inspect = await exec('docker', ['image', 'inspect', imageTag], { cwd: repoRoot });
422 if (inspect.exitCode === 0) {
@@ -409,6 +429,10 @@ export async function ensureDenoImage(
429 dockerfilePath,
430 '--build-arg',
431 `DENO_VERSION=${denoVersion}`,
432 + '--build-arg',
433 + `NODE_MAJOR=${getMajorVersion(nodeVersion)}`,
434 + '--build-arg',
435 + `BUN_VERSION=${bunVersion}`,
436 ...labelsToArgs(defaultDenoLabels(denoVersion)),
437 '-t',
438 imageTag,
@@ -510,8 +534,8 @@ export async function runDenoContainer(options: RunDenoContainerOptions): Promis
534 // Handle cmd as array for direct execution without shell interpretation.
535 if (Array.isArray(cmd)) {
536 dockerArgs.push(...cmd.map(String));
513 - // Handle cmd as string by wrapping in login shell for proper environment setup.
514 - // Callers must explicitly use 'deno run --allow-all <file>' when running Deno scripts.
537 + // Handle cmd as string by wrapping in login shell for proper environment setup.
538 + // Callers must explicitly use 'deno run --allow-all <file>' when running Deno scripts.
539 } else if (typeof cmd === 'string' && cmd.length > 0) {
540 dockerArgs.push('sh', '-lc', cmd);
541 } else {
@@ -577,8 +601,11 @@ export async function ensureCliImage(
601 }
602
603 const repoRoot = options.repoRoot ?? getRepoRoot();
580 - const dockerfilePath = options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.cli');
604 + const dockerfilePath =
605 + options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.cli');
606 const imageTag = imageTagForCliVersion(cliVersion);
607 + const nodeVersion = await getMiseVersion('node', repoRoot);
608 + const bunVersion = await getMiseVersion('bun', repoRoot);
609
610 const inspect = await exec('docker', ['image', 'inspect', imageTag], { cwd: repoRoot });
611 if (inspect.exitCode === 0) {
@@ -591,6 +618,10 @@ export async function ensureCliImage(
618 dockerfilePath,
619 '--build-arg',
620 `CLI_VERSION=${cliVersion}`,
621 + '--build-arg',
622 + `NODE_VERSION=${nodeVersion}`,
623 + '--build-arg',
624 + `BUN_VERSION=${bunVersion}`,
625 ...labelsToArgs(defaultCliLabels(cliVersion)),
626 '-t',
627 imageTag,
ts/e2e-tests/_utils/src/types.ts
+1 -1
@@ -173,7 +173,7 @@ export interface E2EConfig {
173 * @example
174 * ```typescript
175 * versions: {
176 - * node: ['20.19.0', '22.12.0'],
176 + * node: ['22.22.3', '24.16.0', '25.9.0'],
177 * deno: ['2.6.7'],
178 * }
179 * ```
ts/e2e-tests/_utils/tsconfig.json
+1
@@ -4,6 +4,7 @@
4 "target": "es2022",
5 "module": "esnext",
6 "moduleResolution": "bundler",
7 + "resolveJsonModule": true,
8 "strict": true,
9 "skipLibCheck": true,
10 "noEmit": true,
ts/e2e-tests/runtimes/cloudflare/cf-workers-basic/src/index.ts
+4
@@ -8,6 +8,7 @@ import { Hono } from 'hono';
8
9 type Bindings = {
10 COMPOSIO_API_KEY: string;
11 + COMPOSIO_BASE_URL: string;
12 };
13
14 const app = new Hono<{ Bindings: Bindings }>();
@@ -59,6 +60,7 @@ app.get('/test/files/upload', async c => {
60 try {
61 const composio = new Composio({
62 apiKey: c.env.COMPOSIO_API_KEY,
63 + baseURL: c.env.COMPOSIO_BASE_URL,
64 });
65
66 // Attempt to call files.upload - should throw an error
@@ -98,6 +100,7 @@ app.get('/test/files/download', async c => {
100 try {
101 const composio = new Composio({
102 apiKey: c.env.COMPOSIO_API_KEY,
103 + baseURL: c.env.COMPOSIO_BASE_URL,
104 });
105
106 // Attempt to call files.download - should throw an error
@@ -138,6 +141,7 @@ app.get('/test/hackernews', async c => {
141 try {
142 const composio = new Composio({
143 apiKey: c.env.COMPOSIO_API_KEY,
144 + baseURL: c.env.COMPOSIO_BASE_URL,
145 });
146
147 const userDetails = await composio.tools.execute('HACKERNEWS_GET_USER', {
ts/e2e-tests/runtimes/cloudflare/cf-workers-basic/vitest.config.mts
+1
@@ -11,6 +11,7 @@ export default defineWorkersConfig({
11 miniflare: {
12 bindings: {
13 COMPOSIO_API_KEY: process.env.COMPOSIO_API_KEY!,
14 + COMPOSIO_BASE_URL: process.env.COMPOSIO_BASE_URL!,
15 },
16 },
17 },
ts/e2e-tests/runtimes/cloudflare/cf-workers-files/src/index.ts
+5
@@ -8,6 +8,7 @@ import { Hono } from 'hono';
8
9 type Bindings = {
10 COMPOSIO_API_KEY: string;
11 + COMPOSIO_BASE_URL: string;
12 };
13
14 const app = new Hono<{ Bindings: Bindings }>();
@@ -35,6 +36,7 @@ app.get('/test/files/upload', async c => {
36 try {
37 const composio = new Composio({
38 apiKey: c.env.COMPOSIO_API_KEY,
39 + baseURL: c.env.COMPOSIO_BASE_URL,
40 });
41
42 // Attempt to call files.upload - should throw an error
@@ -67,6 +69,7 @@ app.get('/test/files/download', async c => {
69 try {
70 const composio = new Composio({
71 apiKey: c.env.COMPOSIO_API_KEY,
72 + baseURL: c.env.COMPOSIO_BASE_URL,
73 });
74
75 // Attempt to call files.download - should throw an error
@@ -103,6 +106,7 @@ app.get('/test/auto-upload-disabled', async c => {
106 // Explicitly keep automatic file handling off (default everywhere)
107 const composio = new Composio({
108 apiKey: c.env.COMPOSIO_API_KEY,
109 + baseURL: c.env.COMPOSIO_BASE_URL,
110 dangerouslyAllowAutoUploadDownloadFiles: false,
111 });
112
@@ -141,6 +145,7 @@ app.get('/test/default-config', async c => {
145 // Should use the workerd default (false)
146 const composio = new Composio({
147 apiKey: c.env.COMPOSIO_API_KEY,
148 + baseURL: c.env.COMPOSIO_BASE_URL,
149 });
150
151 return c.json({
ts/e2e-tests/runtimes/cloudflare/cf-workers-files/vitest.config.mts
+1
@@ -11,6 +11,7 @@ export default defineWorkersConfig({
11 miniflare: {
12 bindings: {
13 COMPOSIO_API_KEY: process.env.COMPOSIO_API_KEY ?? 'test-key',
14 + COMPOSIO_BASE_URL: process.env.COMPOSIO_BASE_URL ?? 'https://backend.composio.dev',
15 },
16 },
17 },
ts/e2e-tests/runtimes/cloudflare/cf-workers-tool-router-ai/src/index.ts
+3
@@ -13,6 +13,7 @@ import { z } from 'zod/v4';
13
14 type Bindings = {
15 COMPOSIO_API_KEY: string;
16 + COMPOSIO_BASE_URL: string;
17 OPENAI_API_KEY: string;
18 };
19
@@ -38,6 +39,7 @@ app.get('/', c => {
39 app.get('/test/mcp-client', async c => {
40 const composio = new Composio({
41 apiKey: c.env.COMPOSIO_API_KEY,
42 + baseURL: c.env.COMPOSIO_BASE_URL,
43 provider: new VercelProvider(),
44 });
45
@@ -78,6 +80,7 @@ app.get('/test/mcp-client', async c => {
80 app.get('/test/agent', async c => {
81 const composio = new Composio({
82 apiKey: c.env.COMPOSIO_API_KEY,
83 + baseURL: c.env.COMPOSIO_BASE_URL,
84 provider: new VercelProvider(),
85 });
86
ts/e2e-tests/runtimes/cloudflare/cf-workers-tool-router-ai/vitest.config.mts
+1
@@ -11,6 +11,7 @@ export default defineWorkersConfig({
11 miniflare: {
12 bindings: {
13 COMPOSIO_API_KEY: process.env.COMPOSIO_API_KEY!,
14 + COMPOSIO_BASE_URL: process.env.COMPOSIO_BASE_URL!,
15 OPENAI_API_KEY: process.env.OPENAI_API_KEY!,
16 },
17 },
ts/e2e-tests/runtimes/node/cjs-basic/README.md
+1 -1
@@ -40,7 +40,7 @@ The fixture is a standalone `.cjs` file that:
40
41 ## Isolation Tool
42
43 -**Docker** with Node.js versions: 20.18.0, 20.19.0, 22.12.0.
43 +**Docker** with Node.js versions: 22.22.3, 24.16.0, 25.9.0.
44
45 ## Running
46
ts/e2e-tests/runtimes/node/cjs-basic/e2e.test.ts
+1 -7
@@ -10,13 +10,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
10
11 e2e(import.meta.url, {
12 versions: {
13 - node: [
14 - // may throw ERR_REQUIRE_ESM
15 - '20.18.0',
16 - // supports ESM by default
17 - '20.19.0',
18 - '22.12.0',
19 - ],
13 + node: ['22.22.3', '24.16.0', '25.9.0'],
14 },
15 usesFixtures: true,
16 defineTests: ({ runFixture }) => {
ts/e2e-tests/runtimes/node/custom-tools/e2e.test.ts
+1 -1
@@ -17,7 +17,7 @@ declare module 'bun' {
17 }
18
19 e2e(import.meta.url, {
20 - versions: { node: ['20.19.0', '22.12.0'] },
20 + versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
21 usesFixtures: true,
22 env: {
23 COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
ts/e2e-tests/runtimes/node/esm-basic/README.md
+1 -1
@@ -42,7 +42,7 @@ The fixture is a standalone `.mjs` file that:
42
43 ## Isolation Tool
44
45 -**Docker** with Node.js versions: 20.18.0, 20.19.0, 22.12.0.
45 +**Docker** with Node.js versions: 22.22.3, 24.16.0, 25.9.0.
46
47 ## Running
48
ts/e2e-tests/runtimes/node/esm-basic/e2e.test.ts
+1 -7
@@ -10,13 +10,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
10
11 e2e(import.meta.url, {
12 versions: {
13 - node: [
14 - // may throw ERR_REQUIRE_ESM
15 - '20.18.0',
16 - // supports ESM by default
17 - '20.19.0',
18 - '22.12.0',
19 - ],
13 + node: ['22.22.3', '24.16.0', '25.9.0'],
14 },
15 usesFixtures: true,
16 defineTests: ({ runFixture }) => {
ts/e2e-tests/runtimes/node/file-roundtrip/README.md
+6 -6
@@ -14,11 +14,11 @@ It performs a real round-trip:
14
15 ## What It Tests
16
17 -| Test | Description |
18 -| ---- | ----------- |
19 -| Upload | Uploads a deterministic binary payload via `composio.files.upload()` |
20 -| Download | Downloads the uploaded object back from storage |
21 -| Integrity | Compares byte length and SHA-256 checksum |
17 +| Test | Description |
18 +| --------- | -------------------------------------------------------------------- |
19 +| Upload | Uploads a deterministic binary payload via `composio.files.upload()` |
20 +| Download | Downloads the uploaded object back from storage |
21 +| Integrity | Compares byte length and SHA-256 checksum |
22
23 ## Requirements
24
@@ -31,7 +31,7 @@ If `COMPOSIO_API_KEY` is not set, the suite is skipped.
31
32 ## Isolation Tool
33
34 -**Docker** with Node.js versions: current (as specified in `.nvmrc`).
34 +**Docker** with Node.js versions: current (as specified in `mise.toml`).
35
36 This ensures the behavior is tested against specific Node.js versions independent of the developer's local setup.
37
ts/e2e-tests/runtimes/node/json-schema-to-zod-v3/README.md
+9 -9
@@ -13,14 +13,14 @@ The `@composio/json-schema-to-zod` package must support both Zod v3 and v4. This
13
14 ## What It Tests
15
16 -| Test | Description |
17 -| --------------------- | ---------------------------------------------------------------- |
18 -| Basic string schema | Converts `{ type: 'string' }` and validates |
19 -| Object schema | Required fields, nested properties, validation constraints |
20 -| Array schema | Typed array items with validation |
21 -| Email format | Format validation for email strings |
22 -| Nested schemas | Complex nested objects and arrays |
23 -| anyOf schemas | Union type conversion |
16 +| Test | Description |
17 +| --------------------- | ------------------------------------------------------------------ |
18 +| Basic string schema | Converts `{ type: 'string' }` and validates |
19 +| Object schema | Required fields, nested properties, validation constraints |
20 +| Array schema | Typed array items with validation |
21 +| Email format | Format validation for email strings |
22 +| Nested schemas | Complex nested objects and arrays |
23 +| anyOf schemas | Union type conversion |
24 | Round-trip conversion | JSON Schema -> Zod -> JSON Schema preserves `additionalProperties` |
25
26 ## Test Setup
@@ -36,7 +36,7 @@ Tests use `bun:test` assertions to verify schema conversion and round-trip behav
36
37 ## Isolation Tool
38
39 -**Docker** with Node.js versions: current (as specified in `.nvmrc`).
39 +**Docker** with Node.js versions: current (as specified in `mise.toml`).
40
41 ## Running
42
ts/e2e-tests/runtimes/node/json-schema-to-zod-v4/README.md
+1 -1
@@ -37,7 +37,7 @@ Tests use `bun:test` assertions to verify schema conversion and parsing behavior
37
38 ## Isolation Tool
39
40 -**Docker** with Node.js versions: current (as specified in `.nvmrc`).
40 +**Docker** with Node.js versions: current (as specified in `mise.toml`).
41
42 ## Running
43
ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v3/README.md
+1 -1
@@ -37,7 +37,7 @@ import { z } from 'zod';
37
38 ## Isolation Tool
39
40 -**Docker** with Node.js versions: 22.12.0.
40 +**Docker** with Node.js versions: 22.22.3, 24.16.0, 25.9.0.
41
42 ## Running
43
ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v3/e2e.test.ts
+1 -1
@@ -25,7 +25,7 @@ declare module 'bun' {
25 }
26
27 e2e(import.meta.url, {
28 - versions: { node: ['22.12.0'] },
28 + versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
29 env: {
30 COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
31 OPENAI_API_KEY: Bun.env.OPENAI_API_KEY,
ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v4/README.md
+1 -1
@@ -37,7 +37,7 @@ import { z } from 'zod';
37
38 ## Isolation Tool
39
40 -**Docker** with Node.js versions: 22.12.0.
40 +**Docker** with Node.js versions: 22.22.3, 24.16.0, 25.9.0.
41
42 ## Running
43
ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v4/e2e.test.ts
+1 -1
@@ -25,7 +25,7 @@ declare module 'bun' {
25 }
26
27 e2e(import.meta.url, {
28 - versions: { node: ['22.12.0'] },
28 + versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
29 env: {
30 COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
31 OPENAI_API_KEY: Bun.env.OPENAI_API_KEY,
ts/e2e-tests/runtimes/node/openai-zod4-compat/README.md
+1 -1
@@ -34,7 +34,7 @@ The `setup` phase runs `npm install --legacy-peer-deps` in a Docker volume, then
34
35 ## Isolation Tool
36
37 -**Docker** with Node.js versions: 20.19.0, 22.12.0.
37 +**Docker** with Node.js versions: 22.22.3, 24.16.0, 25.9.0.
38
39 ## Running
40
ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts
+1 -1
@@ -15,7 +15,7 @@ declare module 'bun' {
15 }
16
17 e2e(import.meta.url, {
18 - versions: { node: ['20.19.0', '22.12.0'] },
18 + versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
19 usesFixtures: true,
20 env: {
21 COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
ts/e2e-tests/runtimes/node/tool-router-files/e2e.test.ts
+1 -1
@@ -15,7 +15,7 @@ declare module 'bun' {
15 }
16
17 e2e(import.meta.url, {
18 - versions: { node: ['20.19.0', '22.12.0'] },
18 + versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
19 usesFixtures: true,
20 env: {
21 COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
ts/e2e-tests/runtimes/node/tool-router-pagination/e2e.test.ts
+1 -1
@@ -22,7 +22,7 @@ declare module 'bun' {
22 }
23
24 e2e(import.meta.url, {
25 - versions: { node: ['20.19.0', '22.12.0'] },
25 + versions: { node: ['22.22.3', '24.16.0', '25.9.0'] },
26 usesFixtures: true,
27 env: {
28 COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/README.md
+5 -5
@@ -16,11 +16,11 @@ This causes `TS2307: Cannot find module './foo.mjs'` errors.
16
17 ## What It Tests
18
19 -| Test | Description |
20 -| ---------------------- | -------------------------------------------------------------- |
19 +| Test | Description |
20 +| ---------------------- | ------------------------------------------------------------ |
21 | composio generate ts | Runs CLI to generate TypeScript files for hackernews toolkit |
22 -| File existence | Verifies generated .ts files exist |
23 -| TypeScript compilation | Runs `tsc --noEmit` to check import resolution |
22 +| File existence | Verifies generated .ts files exist |
23 +| TypeScript compilation | Runs `tsc --noEmit` to check import resolution |
24
25 ## Fixture
26
@@ -55,7 +55,7 @@ The fixture script:
55
56 ## Isolation Tool
57
58 -**Docker** with Node.js versions: current (as specified in `.nvmrc`).
58 +**Docker** with Node.js versions: current (as specified in `mise.toml`).
59
60 ## Running
61
ts/scripts/pre-install.sh
+5 -5
@@ -2,9 +2,9 @@
2
3 set -eo pipefail
4
5 -# Allow bypassing the entire Bun check (useful for CI workflows using pre-built images)
6 -if [ -n "$BYPASS_BUN_VERSION_CHECK" ]; then
7 - echo "Bypassing Bun version check (BYPASS_BUN_VERSION_CHECK is set)"
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
@@ -17,5 +17,5 @@ if ! command -v bun &> /dev/null; then
17 fi
18
19 echo "Bun is installed."
20 -echo "Checking if Bun version matches .bun-version file..."
21 -bun run "$SCRIPT_DIR/pre-install/check-bun-version.ts"
20 +echo "Checking if Bun version matches mise.toml..."
21 +bun run "$SCRIPT_DIR/pre-install/check-toolchain.ts"
ts/scripts/pre-install/check-bun-version.ts deleted
-43
@@ -1,43 +0,0 @@
1 -#!/usr/bin/env bun
2 -
3 -declare module "bun" {
4 - interface Env {
5 - /**
6 - * If set, bypasses the Bun version check.
7 - * Useful for those CI workflows relying on prebuild environments (e.g., ghcr.io/composiohq/dev-base).
8 - */
9 - BYPASS_BUN_VERSION_CHECK: string;
10 - }
11 -}
12 -
13 -/**
14 - * Check if the installed Bun version matches the required version in .bun-version.
15 - * Useful for CI workflows relying on the @oven-sh/setup-bun action.
16 - *
17 - * This check is needed because Bun doesn't enforce `.bun-version`, and is ignored by corepack.
18 - */
19 -async function main() {
20 - if (Bun.env.BYPASS_BUN_VERSION_CHECK) {
21 - return;
22 - }
23 -
24 - const requiredBunVersion = (
25 - await Bun.file('.bun-version').text()
26 - ).trim();
27 - const actualBunVersion = Bun.version.trim();
28 -
29 - if (actualBunVersion != requiredBunVersion) {
30 - console.error(
31 - `Bun version mismatch: expected ${requiredBunVersion}, got ${actualBunVersion}.
32 -You can install the required version by running
33 -
34 -\`curl -fsSl https://bun.sh/install | bash -s "bun-v${requiredBunVersion}"\`
35 -`,
36 - );
37 - process.exit(1);
38 - }
39 -}
40 -
41 -if (import.meta.path === Bun.main) {
42 - main();
43 -}
ts/scripts/pre-install/check-toolchain.ts new
+53
@@ -0,0 +1,53 @@
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 +function getRequiredBunVersion(): string {
16 + try {
17 + return execFileSync('mise', ['current', 'bun'], { encoding: 'utf-8' }).trim();
18 + } catch (err) {
19 + console.error(
20 + `Failed to resolve Bun version from mise.toml.
21 +Install mise and run:
22 +
23 +\`mise install\`
24 +
25 +Original error: ${(err as Error).message}`
26 + );
27 + process.exit(1);
28 + }
29 +}
30 +
31 +function main() {
32 + if (Bun.env.BYPASS_TOOLCHAIN_CHECK) {
33 + return;
34 + }
35 +
36 + const requiredBunVersion = getRequiredBunVersion();
37 + const actualBunVersion = Bun.version.trim();
38 +
39 + if (actualBunVersion !== requiredBunVersion) {
40 + console.error(
41 + `Bun version mismatch: expected ${requiredBunVersion}, got ${actualBunVersion}.
42 +Install the repository toolchain by running:
43 +
44 +\`mise install\`
45 +`
46 + );
47 + process.exit(1);
48 + }
49 +}
50 +
51 +if (import.meta.path === Bun.main) {
52 + main();
53 +}
turbo.jsonc
+5 -5
@@ -19,27 +19,27 @@
19 },
20 "test:e2e": {
21 "dependsOn": ["^build"],
22 - "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "OPENAI_API_KEY"],
22 + "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "OPENAI_API_KEY"],
23 "cache": false
24 },
25 "test:e2e:node": {
26 "dependsOn": ["^build"],
27 - "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_NODE_VERSION", "OPENAI_API_KEY"],
27 + "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_NODE_VERSION", "OPENAI_API_KEY"],
28 "cache": false
29 },
30 "test:e2e:deno": {
31 "dependsOn": ["^build"],
32 - "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_DENO_VERSION", "OPENAI_API_KEY"],
32 + "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_DENO_VERSION", "OPENAI_API_KEY"],
33 "cache": false
34 },
35 "test:e2e:cli": {
36 "dependsOn": ["^build"],
37 - "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_CLI_VERSION", "OPENAI_API_KEY"],
37 + "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_CLI_VERSION", "OPENAI_API_KEY"],
38 "cache": false
39 },
40 "test:e2e:cloudflare": {
41 "dependsOn": ["^build"],
42 - "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "OPENAI_API_KEY"],
42 + "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "OPENAI_API_KEY"],
43 "cache": false
44 },
45 "install:binary": {