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

ci(ts/e2e): drop Deno, mirror Docker base images, cache layers (#4820)

This PR: - removes the Deno runtime E2E suites (`runtimes/deno/*`), `Dockerfile.deno`, the `test:e2e:deno` script and turbo task, and the Deno CI job - removes Deno from the E2E harness (`RuntimeKind`, `versions.deno`, `COMPOSIO_E2E_DENO_VERSION`) and from `mise.toml`, `mise.lock` and `toolchain-versions.json` - pulls the `node:*-slim` and `debian:bookworm-slim` base images from the ECR Public mirror (`public.ecr.aws/docker/library`) through a `BASE_REGISTRY` build arg, so E2E builds no longer touch Docker Hub - adds the `.github/actions/build-e2e-image` composite action, which builds with Buildx and restores and saves layers through the GitHub Actions cache - splits `Dockerfile.node` and `Dockerfile.cli` into a `toolchain` stage (base image, apt, mise) and the workspace stages, and saves only `toolchain` to the cache - pre-builds the installer image in `cli.install-e2e.yml` instead of building it inside the test's `beforeAll` hook ## Context All eight failures on https://github.com/ComposioHQ/composio/pull/4802 were Docker Hub errors while resolving base images (`504` from `auth.docker.io`, `429` from `registry-1.docker.io`), before any test ran. CI pulled anonymously, so it shared a per-IP quota with other tenants of the runner. Only the `toolchain` stage is saved because the later stages copy `ts/packages` and change on every commit: saving them would upload multi-GB layers that are never restored and evict caches that are. Cache writes use `ignore-error=true`, so a cache outage cannot fail a build. Not changed: Deno project detection in the CLI (`project-environment-detector.ts`, `core-dependency.ts`) and Deno runtime detection in `@composio/core` (`utils/session.ts`). Those serve users' own projects, so no published package changes and no changeset is needed. Buildx still resolves the base image manifest from the registry on every build, so an ECR Public outage would fail these jobs the same way.

Alberto Schiabel committed Oct 12, 2026 at 17:39 UTC 95e7f6296145593df68f1334e1b46791d6efd6ea
46 files changed +201 -1601
.agents/skills/repo-guidance/references/repository-workflow.md
+1 -1
@@ -17,7 +17,7 @@
17
18 ## Tooling
19
20 -Use `mise install` for Node, Bun, Deno, pnpm, Python, and uv. pnpm is managed through mise.
20 +Use `mise install` for Node, Bun, pnpm, Python, and uv. pnpm is managed through mise.
21
22 Common root commands:
23
.agents/skills/typescript-testing/references/test-commands.md
+1 -2
@@ -10,7 +10,6 @@ pnpm build:packages
10 pnpm test
11 pnpm test:e2e
12 pnpm test:e2e:node
13 -pnpm test:e2e:deno
13 pnpm test:e2e:cloudflare
14 pnpm test:e2e:cli
15 ```
@@ -28,7 +27,7 @@ pnpm --filter @composio/<provider> typecheck
27
28 ## When To Use E2E
29
31 -- Use Node/Deno/Cloudflare E2E for runtime packaging or module-resolution regressions.
30 +- Use Node/Cloudflare E2E for runtime packaging or module-resolution regressions.
31 - Use CLI E2E for CLI binary behavior and output contracts.
32 - Docker must be available for runtime and CLI E2E tests.
33
.github/actions/build-e2e-image/action.yml new
+69
@@ -0,0 +1,69 @@
1 +name: 'Build E2E Docker image'
2 +description: 'Builds an E2E test image with Buildx, restoring and saving layers through the GitHub Actions cache'
3 +
4 +inputs:
5 + dockerfile:
6 + description: 'Path to the Dockerfile, relative to the repository root'
7 + required: true
8 + tag:
9 + description: 'Tag for the image loaded into the local Docker daemon'
10 + required: true
11 + cache-scope:
12 + description: 'GitHub Actions cache scope. Use one scope per image variant so matrix jobs do not overwrite each other'
13 + required: true
14 + cache-target:
15 + description: >-
16 + Build stage whose layers are saved to the cache. Set it on images that
17 + copy the workspace in later stages: those layers change on every commit,
18 + so saving them would only evict caches that do get restored. Leave empty
19 + to save every layer.
20 + required: false
21 + default: ''
22 + build-args:
23 + description: 'Newline-separated KEY=VALUE build arguments'
24 + required: false
25 + default: ''
26 + labels:
27 + description: 'Newline-separated KEY=VALUE image labels'
28 + required: false
29 + default: ''
30 +
31 +runs:
32 + using: 'composite'
33 + steps:
34 + # The default `docker` driver cannot export to the GitHub Actions cache.
35 + - name: Set up Docker Buildx
36 + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
37 +
38 + # `ignore-error` keeps a cache-service outage from failing the build.
39 + - name: Build and cache the ${{ inputs.cache-target }} stage
40 + if: inputs.cache-target != ''
41 + uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
42 + env:
43 + DOCKER_BUILD_SUMMARY: 'false'
44 + DOCKER_BUILD_RECORD_UPLOAD: 'false'
45 + with:
46 + context: .
47 + file: ${{ inputs.dockerfile }}
48 + target: ${{ inputs.cache-target }}
49 + build-args: ${{ inputs.build-args }}
50 + provenance: false
51 + outputs: type=cacheonly
52 + cache-from: type=gha,scope=${{ inputs.cache-scope }}
53 + cache-to: type=gha,scope=${{ inputs.cache-scope }},mode=max,ignore-error=true
54 +
55 + - name: Build ${{ inputs.tag }}
56 + uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
57 + env:
58 + DOCKER_BUILD_SUMMARY: 'false'
59 + DOCKER_BUILD_RECORD_UPLOAD: 'false'
60 + with:
61 + context: .
62 + file: ${{ inputs.dockerfile }}
63 + build-args: ${{ inputs.build-args }}
64 + labels: ${{ inputs.labels }}
65 + tags: ${{ inputs.tag }}
66 + provenance: false
67 + load: true
68 + cache-from: type=gha,scope=${{ inputs.cache-scope }}
69 + cache-to: ${{ inputs.cache-target == '' && format('type=gha,scope={0},mode=max,ignore-error=true', inputs.cache-scope) || '' }}
.github/workflows/cli.install-e2e.yml
+33
@@ -13,6 +13,7 @@ on:
13 - 'ts/e2e-tests/cli/install/**'
14 - 'ts/e2e-tests/_utils/**'
15 - '.github/actions/setup-node-pnpm-bun/action.yml'
16 + - '.github/actions/build-e2e-image/action.yml'
17 - '.github/workflows/cli.install-e2e.yml'
18 - 'package.json'
19 - 'pnpm-lock.yaml'
@@ -62,6 +63,22 @@ jobs:
63 - name: Install dependencies
64 run: pnpm install --frozen-lockfile
65
66 + # Build the image here rather than inside the test's beforeAll hook, so
67 + # its layers come from the GitHub Actions cache and a registry failure
68 + # surfaces as a visible, retryable step failure.
69 + - name: Pre-build installer image
70 + uses: ./.github/actions/build-e2e-image
71 + with:
72 + dockerfile: ts/e2e-tests/_utils/Dockerfile.install
73 + tag: composio-e2e-install:${{ matrix.shell }}
74 + cache-scope: e2e-install-${{ matrix.shell }}
75 + build-args: |
76 + INSTALL_SHELL=${{ matrix.shell }}
77 + labels: |
78 + composio.e2e=true
79 + composio.runtime=cli-install
80 + composio.install_shell=${{ matrix.shell }}
81 +
82 - name: Test production installer
83 env:
84 COMPOSIO_INSTALL_E2E_MODE: prod
@@ -167,6 +184,22 @@ jobs:
184 name: cli-install-linux-x64
185 path: ${{ runner.temp }}/cli-install-fixture
186
187 + # Build the image here rather than inside the test's beforeAll hook, so
188 + # its layers come from the GitHub Actions cache and a registry failure
189 + # surfaces as a visible, retryable step failure.
190 + - name: Pre-build installer image
191 + uses: ./.github/actions/build-e2e-image
192 + with:
193 + dockerfile: ts/e2e-tests/_utils/Dockerfile.install
194 + tag: composio-e2e-install:${{ matrix.shell }}
195 + cache-scope: e2e-install-${{ matrix.shell }}
196 + build-args: |
197 + INSTALL_SHELL=${{ matrix.shell }}
198 + labels: |
199 + composio.e2e=true
200 + composio.runtime=cli-install
201 + composio.install_shell=${{ matrix.shell }}
202 +
203 - name: Test local installer
204 env:
205 COMPOSIO_INSTALL_E2E_MODE: local
.github/workflows/ts.test-e2e.yml
+32 -116
@@ -11,6 +11,7 @@ on:
11 - 'pnpm-workspace.yaml'
12 - 'pnpm-lock.yaml'
13 - '.github/actions/setup-node-pnpm-bun/action.yml'
14 + - '.github/actions/build-e2e-image/action.yml'
15 - '.github/workflows/ts.test-e2e.yml'
16 - 'mise.toml'
17 - 'mise.lock'
@@ -24,6 +25,7 @@ on:
25 - 'pnpm-workspace.yaml'
26 - 'pnpm-lock.yaml'
27 - '.github/actions/setup-node-pnpm-bun/action.yml'
28 + - '.github/actions/build-e2e-image/action.yml'
29 - '.github/workflows/ts.test-e2e.yml'
30 - 'mise.toml'
31 - 'mise.lock'
@@ -48,7 +50,6 @@ jobs:
50 permissions: read-all
51 outputs:
52 node: ${{ steps.versions.outputs.node }}
51 - deno: ${{ steps.versions.outputs.deno }}
53 steps:
54 - name: Checkout Code
55 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -57,7 +58,6 @@ jobs:
58 id: versions
59 run: |
60 echo "node=$(jq -c '.node' toolchain-versions.json)" >> "$GITHUB_OUTPUT"
60 - echo "deno=$(jq -c '.deno' toolchain-versions.json)" >> "$GITHUB_OUTPUT"
61
62 # Node.js E2E tests, running in Docker to isolate environment
63 # Each test suite defines its own versions.node in e2e.test.ts
@@ -132,116 +132,23 @@ jobs:
132
133 - name: Pre-build Docker image for e2e tests
134 if: steps.api-keys.outputs.available == 'true'
135 - run: |
136 - docker build -f ts/e2e-tests/_utils/Dockerfile.node \
137 - --build-arg NODE_VERSION=${{ matrix.node-version }} \
138 - --label composio.e2e=true \
139 - --label composio.runtime=node \
140 - --label "composio.node_version=${{ matrix.node-version }}" \
141 - -t "composio-e2e-node:${{ matrix.node-version }}" \
142 - .
135 + uses: ./.github/actions/build-e2e-image
136 + with:
137 + dockerfile: ts/e2e-tests/_utils/Dockerfile.node
138 + tag: composio-e2e-node:${{ matrix.node-version }}
139 + cache-scope: e2e-node-${{ matrix.node-version }}
140 + cache-target: toolchain
141 + build-args: |
142 + NODE_VERSION=${{ matrix.node-version }}
143 + labels: |
144 + composio.e2e=true
145 + composio.runtime=node
146 + composio.node_version=${{ matrix.node-version }}
147
148 - name: Run Node.js E2E Tests
149 if: steps.api-keys.outputs.available == 'true'
150 run: pnpm run test:e2e:node
151
148 - # Deno E2E tests, running in Docker to isolate environment
149 - # Each test suite defines its own versions.deno in e2e.test.ts
150 - # Tests that don't support the matrix version are automatically skipped
151 - test-e2e-deno-docker:
152 - name: E2E Test Deno ${{ matrix.deno-version }}
153 - needs: toolchain-versions
154 - runs-on: ubuntu-24.04
155 - permissions: read-all
156 - strategy:
157 - fail-fast: false
158 - matrix:
159 - deno-version: ${{ fromJSON(needs.toolchain-versions.outputs.deno) }}
160 - env:
161 - CI: 1
162 - COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
163 - COMPOSIO_BASE_URL: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
164 - COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
165 - COMPOSIO_E2E_DENO_VERSION: ${{ matrix.deno-version }}
166 - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
167 -
168 - steps:
169 - - name: Checkout Code
170 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
171 -
172 - - name: Normalize Composio API keys
173 - run: |
174 - {
175 - echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}"
176 - echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}"
177 - echo "COMPOSIO_BASE_URL=${COMPOSIO_BASE_URL}"
178 - } >> "$GITHUB_ENV"
179 -
180 - - name: Setup Deno
181 - uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
182 - with:
183 - deno-version: ${{ matrix.deno-version }}
184 -
185 - - name: Setup Node.js, pnpm, Bun
186 - id: setup-toolchain
187 - uses: ./.github/actions/setup-node-pnpm-bun
188 - with:
189 - enable-turbo-cache: 'true'
190 -
191 - - name: Install Dependencies
192 - run: pnpm install --frozen-lockfile
193 -
194 - - name: Build
195 - run: pnpm run build:packages
196 -
197 - - name: Check API keys
198 - id: api-keys
199 - env:
200 - IS_FORK_PR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
201 - run: |
202 - missing=()
203 - for name in COMPOSIO_API_KEY OPENAI_API_KEY; do
204 - if [ -z "${!name}" ]; then
205 - missing+=("$name")
206 - fi
207 - done
208 -
209 - if [ "${#missing[@]}" -gt 0 ]; then
210 - echo "available=false" >> "$GITHUB_OUTPUT"
211 - if [ "$GITHUB_ACTOR" = "dependabot[bot]" ] || [ "$IS_FORK_PR" = "true" ]; then
212 - echo "::notice::Skipping secret-backed E2E tests; missing ${missing[*]}."
213 - exit 0
214 - fi
215 -
216 - printf '::error::%s is not set\n' "${missing[@]}"
217 - exit 1
218 - fi
219 -
220 - echo "available=true" >> "$GITHUB_OUTPUT"
221 - echo "✅ API keys are configured"
222 -
223 - # Pre-build the Deno image like the Node and CLI jobs do. Without this,
224 - # ensureDenoImage() builds the image inside a bun:test beforeAll hook,
225 - # where the bun shell's quiet mode swallows all build output and a slow
226 - # registry or apt moment turns into an opaque hook timeout instead of a
227 - # visible, retryable step failure.
228 - - name: Pre-build Docker image for e2e tests
229 - if: steps.api-keys.outputs.available == 'true'
230 - run: |
231 - NODE_MAJOR="${{ steps.setup-toolchain.outputs.node-version }}"
232 - docker build -f ts/e2e-tests/_utils/Dockerfile.deno \
233 - --build-arg DENO_VERSION=${{ matrix.deno-version }} \
234 - --build-arg NODE_MAJOR=${NODE_MAJOR%%.*} \
235 - --label composio.e2e=true \
236 - --label composio.runtime=deno \
237 - --label "composio.deno_version=${{ matrix.deno-version }}" \
238 - -t "composio-e2e-deno:${{ matrix.deno-version }}" \
239 - .
240 -
241 - - name: Run Deno E2E Tests
242 - if: steps.api-keys.outputs.available == 'true'
243 - run: pnpm run test:e2e:deno
244 -
152 # CLI E2E tests, running in scratch Docker to isolate environment
153 test-e2e-cli-docker:
154 name: E2E Test CLI (scratch)
@@ -304,18 +211,27 @@ jobs:
211 echo "available=true" >> "$GITHUB_OUTPUT"
212 echo "✅ API keys are configured"
213
307 - - name: Pre-build Docker image for CLI e2e tests
214 + - name: Read CLI version
215 + id: cli-version
216 run: |
217 CLI_VERSION=$(node -p "require('./ts/packages/cli/package.json').version")
218 echo "COMPOSIO_E2E_CLI_VERSION=${CLI_VERSION}" >> "$GITHUB_ENV"
311 - docker build -f ts/e2e-tests/_utils/Dockerfile.cli \
312 - --build-arg CLI_VERSION="${CLI_VERSION}" \
313 - --build-arg NODE_VERSION="${{ steps.setup-toolchain.outputs.node-version }}" \
314 - --label composio.e2e=true \
315 - --label composio.runtime=cli \
316 - --label "composio.cli_version=${CLI_VERSION}" \
317 - -t "composio-e2e-cli:${CLI_VERSION}" \
318 - .
219 + echo "value=${CLI_VERSION}" >> "$GITHUB_OUTPUT"
220 +
221 + - name: Pre-build Docker image for CLI e2e tests
222 + uses: ./.github/actions/build-e2e-image
223 + with:
224 + dockerfile: ts/e2e-tests/_utils/Dockerfile.cli
225 + tag: composio-e2e-cli:${{ steps.cli-version.outputs.value }}
226 + cache-scope: e2e-cli
227 + cache-target: toolchain
228 + build-args: |
229 + CLI_VERSION=${{ steps.cli-version.outputs.value }}
230 + NODE_VERSION=${{ steps.setup-toolchain.outputs.node-version }}
231 + labels: |
232 + composio.e2e=true
233 + composio.runtime=cli
234 + composio.cli_version=${{ steps.cli-version.outputs.value }}
235
236 - name: Run CLI E2E Tests
237 if: steps.api-keys.outputs.available == 'true'
CONTRIBUTING.md
+1 -2
@@ -72,7 +72,7 @@ To propose a partnership, including a docs listing or integration, contact us th
72
73 ### Prerequisites
74
75 -Tool versions are pinned in [`mise.toml`](mise.toml), which is the source of truth for local development and CI. It pins Node.js, pnpm, Bun, Deno, Python, and uv. Install the toolchain with [mise](https://mise.jdx.dev):
75 +Tool versions are pinned in [`mise.toml`](mise.toml), which is the source of truth for local development and CI. It pins Node.js, pnpm, Bun, Python, and uv. Install the toolchain with [mise](https://mise.jdx.dev):
76
77 ```bash
78 mise install
@@ -269,7 +269,6 @@ Then add provider tests and run the relevant Python checks.
269 pnpm test # Unit tests
270 pnpm test:e2e # All end-to-end tests
271 pnpm test:e2e:node # Runtime-specific end-to-end tests
272 -pnpm test:e2e:deno
272 pnpm test:e2e:cli
273 pnpm test:e2e:cloudflare
274 pnpm test:ui # Vitest UI
docs/agent-guidance/context/pipelines.md
+1 -1
@@ -23,7 +23,7 @@ Reference for all GitHub Actions workflows related to docs.
23 | **Generate SDK Docs** | `generate-sdk-docs.yml` | Manual, schedule | Generates SDK reference documentation. |
24 | **TS Build** | `ts.build.yml` | PR changes to `ts/` | Builds TypeScript packages. |
25 | **TS Test** | `ts.test.yml` | PR changes to `ts/` | Runs TypeScript tests. |
26 -| **TS E2E** | `ts.test-e2e.yml` | PR changes to `ts/` | Runs E2E tests (Node, Deno, Cloudflare). |
26 +| **TS E2E** | `ts.test-e2e.yml` | PR changes to `ts/` | Runs E2E tests (Node, Cloudflare, CLI). |
27 | **TS Typecheck** | `ts.typecheck.yml` | PR changes to `ts/` | TypeScript type checking for SDK. |
28 | **TS Release** | `ts.release.yml` | Push to `next`, manual | Creates Changesets release PRs and publishes TypeScript packages. |
29 | **TS Audit** | `ts.audit.yml` | Cron | Security audit of npm dependencies. |
mise.lock
-20
@@ -20,26 +20,6 @@ url = "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-
20 checksum = "sha512:8be7845c3e9c52eeffa4fdd01af7d49643a463e27b3bc5ca820912292efbca0fbe114935a75bea7c6d25a105f01c1204c9c3d82fd4e9ee629c8b18804404fd9d"
21 url = "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.4.1.tgz"
22
23 -[[tools.deno]]
24 -version = "2.6.7"
25 -backend = "core:deno"
26 -
27 -[tools.deno."platforms.linux-arm64"]
28 -checksum = "sha256:d2aedfa8c73e258cce78dc80e8d0e764a69d4a09d946d32f0c29eef46592b82f"
29 -url = "https://dl.deno.land/release/v2.6.7/deno-aarch64-unknown-linux-gnu.zip"
30 -
31 -[tools.deno."platforms.linux-x64"]
32 -checksum = "sha256:c5626c9ee10e87201706fc5e64ed5a44b31527d98c130f164e149e1477c0a87d"
33 -url = "https://dl.deno.land/release/v2.6.7/deno-x86_64-unknown-linux-gnu.zip"
34 -
35 -[tools.deno."platforms.macos-arm64"]
36 -checksum = "sha256:71aaec50a92e06b2f5fed982b332c07a35e11798ca9a359db7603ae5f19c2d8b"
37 -url = "https://dl.deno.land/release/v2.6.7/deno-aarch64-apple-darwin.zip"
38 -
39 -[tools.deno."platforms.macos-x64"]
40 -checksum = "sha256:fae025e69cada67fb57affdda26abbe72991b02b515c3221e92c58aa8a642cec"
41 -url = "https://dl.deno.land/release/v2.6.7/deno-x86_64-apple-darwin.zip"
42 -
23 [[tools.node]]
24 version = "24.17.0"
25 backend = "core:node"
mise.toml
+1 -2
@@ -1,4 +1,4 @@
1 -# Single source of truth for Node, Bun, Deno, Python, uv, and pnpm versions.
1 +# Single source of truth for Node, Bun, 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: exact versions are read from `mise.lock` by the composite actions
@@ -16,7 +16,6 @@ bun = "http:bun"
16 [tools]
17 "npm:pnpm" = "11.8.0"
18 node = "24.17.0"
19 -deno = "2.6.7"
19 python = "3.12"
20 uv = "0.8.19"
21
package.json
-1
@@ -34,7 +34,6 @@
34 "test:examples": "tsx ts/scripts/validate-examples.ts",
35 "test:e2e": "turbo test:e2e --filter='@e2e-tests/*'",
36 "test:e2e:node": "turbo test:e2e:node --filter='@e2e-tests/node-*'",
37 - "test:e2e:deno": "turbo test:e2e:deno --filter='@e2e-tests/deno-*'",
37 "test:e2e:cli": "turbo test:e2e:cli --filter='@e2e-tests/cli-*'",
38 "test:e2e:install": "turbo test:e2e:install --filter='@e2e-tests/cli-install'",
39 "test:e2e:cloudflare": "turbo test:e2e:cloudflare --filter='@e2e-tests/cf-*'",
pnpm-lock.yaml
-22
@@ -374,28 +374,6 @@ importers:
374 specifier: 'catalog:'
375 version: 4.140.0(@cloudflare/workers-types@5.20260925.1)(@types/node@26.6.2)
376
377 - ts/e2e-tests/runtimes/deno/esm-basic:
378 - devDependencies:
379 - '@composio/core':
380 - specifier: workspace:*
381 - version: link:../../../../packages/core
382 - '@e2e-tests/utils':
383 - specifier: workspace:*
384 - version: link:../../../_utils
385 -
386 - ts/e2e-tests/runtimes/deno/tool-execution:
387 - dependencies:
388 - '@composio/core':
389 - specifier: workspace:*
390 - version: link:../../../../packages/core
391 - zod:
392 - specifier: 'catalog:'
393 - version: 4.5.4
394 - devDependencies:
395 - '@e2e-tests/utils':
396 - specifier: workspace:*
397 - version: link:../../../_utils
398 -
377 ts/e2e-tests/runtimes/node/cjs-basic:
378 devDependencies:
379 '@composio/core':
pnpm-workspace.yaml
-1
@@ -3,7 +3,6 @@ packages:
3 - ts/e2e-tests/cli/*
4 - ts/e2e-tests/cli/**/*
5 - ts/e2e-tests/runtimes/node/*
6 - - ts/e2e-tests/runtimes/deno/*
6 - ts/e2e-tests/runtimes/cloudflare/*
7 - ts/examples/*
8 - ts/packages/cli
python/providers/openai_agents/tests/test_openai_agents_provider.py renamed
toolchain-versions.json
-1
@@ -1,5 +1,4 @@
1 {
2 "node": ["22.22.3", "24.17.0", "25.9.0"],
3 - "deno": ["2.6.7"],
3 "python": ["3.10", "3.11", "3.12"]
4 }
ts/AGENTS.md
-1
@@ -24,7 +24,6 @@ pnpm typecheck
24 pnpm lint:packages
25 pnpm test
26 pnpm test:e2e:node
27 -pnpm test:e2e:deno
27 pnpm test:e2e:cloudflare
28 pnpm test:e2e:cli
29 ```
ts/README.md
+1 -2
@@ -40,7 +40,7 @@ Internal (unpublished) packages: `cli-keyring` supports the CLI; `ts-builders` g
40 ts/
41 packages/ Published and internal packages (see above)
42 examples/ Runnable examples per feature and framework
43 - e2e-tests/ Runtime E2E tests (Node, Deno, Cloudflare Workers, CLI)
43 + e2e-tests/ Runtime E2E tests (Node, Cloudflare Workers, CLI)
44 docs/ Workspace SDK docs: API notes and internal guides
45 scripts/ Build, validation, and scaffolding scripts
46 vendor/ Read-only reference submodules; do not edit
@@ -68,7 +68,6 @@ Runtime E2E suites (require credentials):
68
69 ```bash
70 pnpm test:e2e:node
71 -pnpm test:e2e:deno
71 pnpm test:e2e:cloudflare
72 pnpm test:e2e:cli
73 ```
ts/docs/internal/release.md
+1 -1
@@ -78,7 +78,7 @@ The manual release process is available for cases where direct control over the
78
79 ### Prerequisites
80
81 -- Node.js, Bun, Python, Deno, uv, and pnpm from `mise.toml`
81 +- Node.js, Bun, Python, uv, and pnpm from `mise.toml`
82 - Access to npm registry
83 - Write access to the repository
84
ts/e2e-tests/AGENTS.md
+1 -2
@@ -4,7 +4,7 @@ TypeScript runtime and CLI end-to-end test guidance.
4
5 ## Scope
6
7 -`ts/e2e-tests/` contains Docker-based runtime tests for Node.js, Deno, Cloudflare Workers, and CLI suites.
7 +`ts/e2e-tests/` contains Docker-based runtime tests for Node.js, Cloudflare Workers, and CLI suites.
8
9 ## Skill Routing
10
@@ -17,7 +17,6 @@ Run from the repository root:
17 ```bash
18 pnpm test:e2e
19 pnpm test:e2e:node
20 -pnpm test:e2e:deno
20 pnpm test:e2e:cloudflare
21 pnpm test:e2e:cli
22 ```
ts/e2e-tests/README.md
+2 -58
@@ -8,14 +8,13 @@ End-to-end tests for `@composio/core` and the CLI across different runtimes.
8 ts/e2e-tests/
9 ├── _utils/ # Shared test infrastructure
10 │ ├── Dockerfile.node # Docker image for Node.js tests
11 -│ ├── Dockerfile.deno # Docker image for Deno tests
11 │ ├── Dockerfile.cli # Docker image for CLI tests (scratch)
12 │ ├── scripts/ # Docker build and cleanup scripts
14 -│ │ ├── docker-build.ts # Pre-build images for all Node/Deno/CLI versions
13 +│ │ ├── docker-build.ts # Pre-build images for all Node/CLI versions
14 │ │ └── docker-clean.ts # Remove all e2e Docker images
15 │ ├── src/ # TypeScript runner utilities
16 │ │ ├── config.ts # Configuration utilities
18 -│ │ ├── const.ts # Well-known Node.js/Deno versions and timeouts
17 +│ │ ├── const.ts # Well-known Node.js versions and timeouts
18 │ │ ├── e2e.ts # Main e2e test entry point
19 │ │ ├── image-lifecycle.ts # Docker image build/run utilities
20 │ │ ├── index.ts # Public exports
@@ -39,8 +38,6 @@ ts/e2e-tests/
38 │ ├── tool-router-pagination/ # Tool Router session.toolkits() cursor pagination
39 │ ├── tool-router-session-update/ # Tool Router session.update() with default options (live API)
40 │ └── typescript-mjs-import-nodenext/ # TypeScript moduleResolution: nodenext tests
42 - ├── deno/ # Deno runtime tests
43 - │ └── esm-basic/ # ESM compatibility tests via npm: specifier
41 └── cloudflare/ # Cloudflare runtime tests
42 ├── cf-workers-basic/ # Basic Cloudflare Workers tests
43 ├── cf-workers-files/ # Cloudflare Workers file handling tests
@@ -76,20 +73,6 @@ To run with a specific Node.js version:
73 COMPOSIO_E2E_NODE_VERSION=22.22.3 pnpm test:e2e:node
74 ```
75
79 -### Deno Tests Only
80 -
81 -```bash
82 -pnpm test:e2e:deno
83 -```
84 -
85 -Runs Deno tests in Docker using `bun test`. The default Deno version is determined by `mise.toml`.
86 -
87 -To run with a specific Deno version:
88 -
89 -```bash
90 -COMPOSIO_E2E_DENO_VERSION=2.6.7 pnpm test:e2e:deno
91 -```
92 -
76 ### Cloudflare Workers Tests Only
77
78 ```bash
@@ -149,45 +132,6 @@ e2e(import.meta.url, {
132
133 5. Add fixture files in a `fixtures/` directory
134
152 -### Deno Runtime Tests
153 -
154 -1. Create a new directory under `runtimes/deno/` (e.g., `runtimes/deno/my-test`)
155 -2. Add a `package.json` with name `@e2e-tests/deno-my-test`
156 -3. Add `test:e2e` and `test:e2e:deno` scripts
157 -4. Create an `e2e.test.ts` file with inline configuration:
158 -
159 -```typescript
160 -import { e2e, type E2ETestResult } from '@e2e-tests/utils';
161 -import { TIMEOUTS } from '@e2e-tests/utils/const';
162 -import { describe, it, expect, beforeAll } from 'bun:test';
163 -
164 -e2e(import.meta.url, {
165 - versions: {
166 - deno: ['2.6.7'], // Optional: defaults to the current version in mise.toml
167 - },
168 - usesFixtures: true,
169 - defineTests: ({ runtime, runFixture }) => {
170 - let result: E2ETestResult;
171 -
172 - beforeAll(async () => {
173 - result = await runFixture({ filename: 'test.ts' });
174 - }, TIMEOUTS.FIXTURE);
175 -
176 - describe('output', () => {
177 - it('exits successfully', () => {
178 - expect(result.exitCode).toBe(0);
179 - });
180 -
181 - it('contains expected output', () => {
182 - expect(result.stdout).toContain('expected text');
183 - });
184 - });
185 - },
186 -});
187 -```
188 -
189 -5. Add fixture files in a `fixtures/` directory. Fixtures use Deno's `npm:` specifier to import packages.
190 -
135 ### Tests with External Dependencies (npm install)
136
137 For tests that need to install npm packages at runtime, use `usesFixtures: true` and the `setup` option:
ts/e2e-tests/_utils/Dockerfile.cli
+10 -3
@@ -3,12 +3,17 @@
3
4 ARG NODE_VERSION
5 ARG CLI_VERSION=0.0.0
6 +# Base images come from the ECR Public mirror of the Docker Official Images, so
7 +# builds do not depend on Docker Hub's availability or anonymous pull limits.
8 +ARG BASE_REGISTRY=public.ecr.aws/docker/library
9
7 -FROM node:${NODE_VERSION}-slim AS builder
10 +# The toolchain stage depends only on the base image and mise.toml/mise.lock, so
11 +# CI saves its layers to the GitHub Actions cache (see .github/actions/build-e2e-image).
12 +FROM ${BASE_REGISTRY}/node:${NODE_VERSION}-slim AS toolchain
13
14 ENV MISE_DATA_DIR="/mise"
15 ENV MISE_CACHE_DIR="/mise/cache"
11 -ENV MISE_DISABLE_TOOLS="node,deno,python,uv"
16 +ENV MISE_DISABLE_TOOLS="node,python,uv"
17 ENV MISE_TRUSTED_CONFIG_PATHS="/app"
18 ENV PATH="/mise/shims:$PATH"
19
@@ -30,6 +35,8 @@ RUN mise install && \
35 pnpm --version && \
36 bun --version
37
38 +FROM toolchain AS builder
39 +
40 # Copy lockfile first for optimal layer caching
41 COPY pnpm-lock.yaml ./
42
@@ -71,7 +78,7 @@ COPY ts/e2e-tests/cli/ /app/ts/e2e-tests/cli/
78 # Pre-create Composio CLI cache directory to work around Bun issue #7967
79 RUN mkdir -p /tmp/.composio
80
74 -FROM debian:bookworm-slim
81 +FROM ${BASE_REGISTRY}/debian:bookworm-slim
82
83 ENV PATH="/usr/local/bin:/bin"
84 ENV HOME="/tmp"
ts/e2e-tests/_utils/Dockerfile.deno deleted
-85
@@ -1,85 +0,0 @@
1 -# Reusable Dockerfile for Deno e2e tests
2 -# Usage: docker build -f Dockerfile.deno --build-arg DENO_VERSION=2.6.7 --build-arg NODE_MAJOR=22 -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 -# Deno is the test matrix axis (base image); Node comes from nodesource (needed by
8 -# pnpm and the build). bun and pnpm are installed from mise.toml/mise.lock, with
9 -# node/deno disabled in mise so it does not shadow the base/nodesource binaries.
10 -
11 -ARG DENO_VERSION
12 -
13 -FROM denoland/deno:${DENO_VERSION}
14 -ARG NODE_MAJOR
15 -
16 -ENV MISE_DATA_DIR="/mise"
17 -ENV MISE_CACHE_DIR="/mise/cache"
18 -ENV MISE_DISABLE_TOOLS="node,deno,python,uv"
19 -ENV MISE_TRUSTED_CONFIG_PATHS="/app"
20 -ENV PATH="/mise/shims:$PATH"
21 -
22 -# Switch to root for installation
23 -USER root
24 -
25 -WORKDIR /app
26 -
27 -# Install system dependencies
28 -RUN apt-get update && \
29 - apt-get install -y --no-install-recommends ca-certificates curl unzip && \
30 - rm -rf /var/lib/apt/lists/*
31 -
32 -# Install Node.js (needed for pnpm's npm backend and building packages)
33 -RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \
34 - apt-get install -y nodejs && \
35 - rm -rf /var/lib/apt/lists/*
36 -
37 -# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).
38 -# mise is installed to /usr/local/bin; its shared cache and shims keep the tools
39 -# available to the non-root runtime user.
40 -ENV XDG_CACHE_HOME="/mise/cache"
41 -COPY .github/scripts/install-mise.sh ./.github/scripts/install-mise.sh
42 -RUN MISE_INSTALL_PATH=/usr/local/bin/mise bash .github/scripts/install-mise.sh
43 -COPY mise.toml mise.lock ./
44 -RUN mise install && \
45 - pnpm --version && \
46 - bun --version
47 -
48 -# Copy lockfile first for optimal layer caching
49 -COPY pnpm-lock.yaml ./
50 -
51 -# Copy workspace configuration files
52 -COPY package.json \
53 - pnpm-workspace.yaml \
54 - .pnpmfile.cjs \
55 - tsconfig.base.json \
56 - tsdown.config.base.ts \
57 - toolchain-versions.json \
58 - ./
59 -
60 -# Copy all ts/packages (pre-built)
61 -COPY ts/packages/ ./ts/packages/
62 -
63 -# Install dependencies using pnpm
64 -# Note: We intentionally don't use --mount=type=cache for the pnpm store here
65 -# because it causes native binding issues (e.g., rolldown-binding) across builds
66 -RUN pnpm install --frozen-lockfile
67 -
68 -# Copy e2e tests last (changes frequently)
69 -COPY ts/e2e-tests/ ./ts/e2e-tests/
70 -
71 -# Create deno user and group (to match the official image's user)
72 -RUN groupadd -g 1000 deno 2>/dev/null || true && \
73 - useradd -u 1000 -g deno -m deno 2>/dev/null || true && \
74 - chown -R deno:deno /app
75 -
76 -# Pre-create Deno cache directory
77 -ENV DENO_DIR="/home/deno/.cache/deno"
78 -RUN mkdir -p $DENO_DIR && chown -R deno:deno /home/deno
79 -
80 -USER deno
81 -
82 -RUN pnpm --version && \
83 - bun --version
84 -
85 -CMD ["sh"]
ts/e2e-tests/_utils/Dockerfile.install
+5 -1
@@ -1,4 +1,8 @@
1 -FROM debian:bookworm-slim
1 +# Base images come from the ECR Public mirror of the Docker Official Images, so
2 +# builds do not depend on Docker Hub's availability or anonymous pull limits.
3 +ARG BASE_REGISTRY=public.ecr.aws/docker/library
4 +
5 +FROM ${BASE_REGISTRY}/debian:bookworm-slim
6
7 ARG INSTALL_SHELL=bash
8
ts/e2e-tests/_utils/Dockerfile.node
+10 -3
@@ -1,7 +1,7 @@
1 # Reusable Dockerfile for Node.js e2e tests
2 # Usage: docker build -f Dockerfile.node --build-arg NODE_VERSION=22.22.3 -t test-name .
3 #
4 -# Uses official node:slim images. For multi-version testing, run the build/run
4 +# Uses official node:slim images, pulled from the ECR Public mirror. For multi-version testing, run the build/run
5 # multiple times with different NODE_VERSION values from the shell script.
6 #
7 # bun and pnpm are installed from mise.toml/mise.lock (the single source of truth).
@@ -9,12 +9,17 @@
9 # mise (MISE_DISABLE_TOOLS) to avoid shadowing the base image's Node.
10
11 ARG NODE_VERSION
12 +# Base images come from the ECR Public mirror of the Docker Official Images, so
13 +# builds do not depend on Docker Hub's availability or anonymous pull limits.
14 +ARG BASE_REGISTRY=public.ecr.aws/docker/library
15
13 -FROM node:${NODE_VERSION}-slim
16 +# The toolchain stage depends only on the base image and mise.toml/mise.lock, so
17 +# CI saves its layers to the GitHub Actions cache (see .github/actions/build-e2e-image).
18 +FROM ${BASE_REGISTRY}/node:${NODE_VERSION}-slim AS toolchain
19
20 ENV MISE_DATA_DIR="/mise"
21 ENV MISE_CACHE_DIR="/mise/cache"
17 -ENV MISE_DISABLE_TOOLS="node,deno,python,uv"
22 +ENV MISE_DISABLE_TOOLS="node,python,uv"
23 ENV MISE_TRUSTED_CONFIG_PATHS="/app"
24 ENV PATH="/mise/shims:$PATH"
25
@@ -36,6 +41,8 @@ RUN mise install && \
41 pnpm --version && \
42 bun --version
43
44 +FROM toolchain
45 +
46 # Copy lockfile first for optimal layer caching
47 COPY pnpm-lock.yaml ./
48
ts/e2e-tests/_utils/README.md
+3 -21
@@ -9,7 +9,6 @@ Shared infrastructure for running `@composio/core` and CLI end-to-end tests in i
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 |
12 | `Dockerfile.cli` | Scratch Dockerfile for CLI test environments |
13
14 ## API
@@ -26,7 +25,6 @@ import { describe, it, expect, beforeAll } from 'bun:test';
25 e2e(import.meta.url, {
26 versions: {
27 node: ['22.22.3', '24.17.0', '25.9.0'], // optional, defaults to mise.toml
29 - deno: ['2.6.7'], // optional, defaults to mise.toml
28 cli: ['current'], // optional, defaults to CLI package.json version
29 },
30 env: { MY_VAR: 'value' }, // optional env vars
@@ -62,7 +60,6 @@ Configuration object passed to `e2e()`:
60 | Property | Type | Description |
61 | -------- | -------------------------------- | ------------------------------------------ |
62 | `node` | `readonly NodeVersionFromUser[]` | Node.js versions. Defaults to `mise.toml` |
65 -| `deno` | `readonly DenoVersionFromUser[]` | Deno versions. Defaults to `mise.toml` |
63 | `cli` | `readonly CliVersionFromUser[]` | CLI versions. Defaults to CLI package.json |
64
65 ### `DefineTestsContext`
@@ -71,7 +68,7 @@ The context passed to the `defineTests` callback:
68
69 | Property | Type/Signature | Description |
70 | ------------ | ---------------------------------------------------------------------------------- | ----------------------------------------- |
74 -| `runtime` | `'node' \| 'deno' \| 'cli'` | Current runtime being tested |
71 +| `runtime` | `'node' \| 'cli'` | Current runtime being tested |
72 | `runCmd` | `(command: string) => Promise<E2ETestResult>` | Run arbitrary command in Docker container |
73 | `runFixture` | `(options: RunFixtureOptions) => Promise<E2ETestResult \| E2ETestResultWithSetup>` | Run fixture with optional setup phase |
74
@@ -197,21 +194,6 @@ The following versions are pre-defined in `const.ts`:
194 - `25.9.0`
195 - `current` (resolves to `mise.toml` version)
196
200 -### Deno Version Resolution
201 -
202 -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
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`
213 -- `current` (resolves to `mise.toml` version)
214 -
197 ### CLI Version Resolution
198
199 CLI versions to test are resolved in this order:
@@ -265,10 +247,10 @@ e2e(import.meta.url, {
247 ## Scripts
248
249 ```bash
268 -# Pre-build Docker images for all well-known Node, Deno, and CLI versions
250 +# Pre-build Docker images for all well-known Node and CLI versions
251 pnpm docker:build
252
271 -# Remove all e2e Docker images (Node.js, Deno, and CLI)
253 +# Remove all e2e Docker images (Node.js and CLI)
254 pnpm docker:clean
255 ```
256
ts/e2e-tests/_utils/scripts/docker-build.ts
+9 -97
@@ -1,12 +1,12 @@
1 #!/usr/bin/env bun
2 /**
3 - * Builds Docker images for Node.js, Deno, and CLI e2e tests.
3 + * Builds Docker images for Node.js and CLI e2e tests.
4 *
5 - * In CI mode (COMPOSIO_E2E_NODE_VERSION or COMPOSIO_E2E_DENO_VERSION or COMPOSIO_E2E_CLI_VERSION set):
5 + * In CI mode (COMPOSIO_E2E_NODE_VERSION or COMPOSIO_E2E_CLI_VERSION set):
6 * Only builds the image for the specified version(s).
7 *
8 * In local mode:
9 - * Builds images for all versions in WELL_KNOWN_NODE_VERSIONS and WELL_KNOWN_DENO_VERSIONS.
9 + * Builds images for all versions in WELL_KNOWN_NODE_VERSIONS.
10 */
11
12 import { $ } from 'bun';
@@ -14,13 +14,12 @@ 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';
17 +import { WELL_KNOWN_NODE_VERSIONS } from '../src/const';
18
19 const __dirname = dirname(fileURLToPath(import.meta.url));
20
21 type DockerToolchain = {
22 nodeVersion: string;
23 - nodeMajorVersion: string;
23 };
24
25 function getRepoRoot(): string {
@@ -29,8 +28,8 @@ function getRepoRoot(): string {
28 }
29
30 // bun and pnpm are installed inside the images from mise.toml/mise.lock, so only the
32 -// matrixed runtimes (node, deno) need to be resolved on the host and threaded as build args.
33 -function getMiseVersion(repoRoot: string, tool: 'node' | 'deno'): string {
31 +// matrixed runtime (node) needs to be resolved on the host and threaded as a build arg.
32 +function getMiseVersion(repoRoot: string, tool: 'node'): string {
33 try {
34 return execFileSync('mise', ['current', tool], { cwd: repoRoot, encoding: 'utf-8' }).trim();
35 } catch (err) {
@@ -38,16 +37,8 @@ function getMiseVersion(repoRoot: string, tool: 'node' | 'deno'): string {
37 }
38 }
39
41 -function getMajorVersion(version: string): string {
42 - return version.split('.')[0] ?? version;
43 -}
44 -
40 function getDockerToolchain(repoRoot: string): DockerToolchain {
46 - const nodeVersion = getMiseVersion(repoRoot, 'node');
47 - return {
48 - nodeVersion,
49 - nodeMajorVersion: getMajorVersion(nodeVersion),
50 - };
41 + return { nodeVersion: getMiseVersion(repoRoot, 'node') };
42 }
43
44 function getCliPackageVersion(repoRoot: string): string {
@@ -100,51 +91,6 @@ async function buildNodeImage(nodeVersion: string, repoRoot: string): Promise<bo
91 return true;
92 }
93
103 -// ============================================================================
104 -// Deno image building
105 -// ============================================================================
106 -
107 -function imageTagForDenoVersion(denoVersion: string): string {
108 - return `composio-e2e-deno:${denoVersion}`;
109 -}
110 -
111 -function defaultDenoLabels(denoVersion: string): Record<string, string> {
112 - return {
113 - 'composio.e2e': 'true',
114 - 'composio.runtime': 'deno',
115 - 'composio.deno_version': denoVersion,
116 - };
117 -}
118 -
119 -async function buildDenoImage(
120 - denoVersion: string,
121 - toolchain: DockerToolchain,
122 - repoRoot: string
123 -): Promise<boolean> {
124 - const dockerfilePath = resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.deno');
125 - const imageTag = imageTagForDenoVersion(denoVersion);
126 - const labels = defaultDenoLabels(denoVersion);
127 - const labelArgs = Object.entries(labels)
128 - .map(([k, v]) => `--label=${k}=${v}`)
129 - .join(' ');
130 -
131 - console.log(`\nBuilding image for Deno ${denoVersion}...`);
132 -
133 - const result =
134 - await $`docker build -f ${dockerfilePath} --build-arg DENO_VERSION=${denoVersion} --build-arg NODE_MAJOR=${toolchain.nodeMajorVersion} ${{ raw: labelArgs }} -t ${imageTag} ${repoRoot}`
135 - .cwd(repoRoot)
136 - .nothrow();
137 -
138 - if (result.exitCode !== 0) {
139 - console.error(` Failed to build ${imageTag}:`);
140 - console.error(result.stderr.toString() || result.stdout.toString());
141 - return false;
142 - }
143 -
144 - console.log(` Built ${imageTag}`);
145 - return true;
146 -}
147 -
94 // ============================================================================
95 // CLI image building
96 // ============================================================================
@@ -198,21 +144,18 @@ async function main() {
144 const repoRoot = getRepoRoot();
145 const dockerToolchain = getDockerToolchain(repoRoot);
146 const currentNodeVersion = dockerToolchain.nodeVersion;
201 - const currentDenoVersion = getMiseVersion(repoRoot, 'deno');
147 const currentCliVersion = getCliPackageVersion(repoRoot);
148 const envNodeVersion = Bun.env.COMPOSIO_E2E_NODE_VERSION;
204 - const envDenoVersion = Bun.env.COMPOSIO_E2E_DENO_VERSION;
149 const envCliVersion = Bun.env.COMPOSIO_E2E_CLI_VERSION;
150
151 const nodeVersions = new Set<string>();
208 - const denoVersions = new Set<string>();
152 const cliVersions = new Set<string>();
153
154 // Determine which Node.js versions to build
155 if (envNodeVersion) {
156 nodeVersions.add(envNodeVersion);
157 console.log(`Building Docker image for CI matrix Node.js version: ${envNodeVersion}`);
215 - } else if (!envDenoVersion && !envCliVersion) {
158 + } else if (!envCliVersion) {
159 // Build all Node.js versions only if no specific runtime was requested
160 for (const version of WELL_KNOWN_NODE_VERSIONS) {
161 if (version === 'current') {
@@ -230,33 +173,11 @@ async function main() {
173 }
174 }
175
233 - // Determine which Deno versions to build
234 - if (envDenoVersion) {
235 - denoVersions.add(envDenoVersion);
236 - console.log(`Building Docker image for CI matrix Deno version: ${envDenoVersion}`);
237 - } else if (!envNodeVersion && !envCliVersion) {
238 - // Build all Deno versions only if no specific runtime was requested
239 - for (const version of WELL_KNOWN_DENO_VERSIONS) {
240 - if (version === 'current') {
241 - denoVersions.add(currentDenoVersion);
242 - } else {
243 - denoVersions.add(version);
244 - }
245 - }
246 - if (denoVersions.size > 0) {
247 - console.log('Building Docker images for Deno versions:');
248 - for (const v of denoVersions) {
249 - const isCurrent = v === currentDenoVersion ? ' (current)' : '';
250 - console.log(` - ${v}${isCurrent}`);
251 - }
252 - }
253 - }
254 -
176 // Determine which CLI versions to build
177 if (envCliVersion) {
178 cliVersions.add(envCliVersion);
179 console.log(`Building Docker image for CI matrix CLI version: ${envCliVersion}`);
259 - } else if (!envNodeVersion && !envDenoVersion) {
180 + } else if (!envNodeVersion) {
181 cliVersions.add(currentCliVersion);
182 console.log(`Building Docker image for CLI version: ${currentCliVersion}`);
183 }
@@ -273,15 +194,6 @@ async function main() {
194 }
195 }
196
276 - // Build Deno images
277 - for (const version of denoVersions) {
278 - total++;
279 - const success = await buildDenoImage(version, dockerToolchain, repoRoot);
280 - if (!success) {
281 - failed++;
282 - }
283 - }
284 -
197 // Build CLI images
198 for (const version of cliVersions) {
199 total++;
ts/e2e-tests/_utils/scripts/docker-clean.ts
+3 -6
@@ -1,13 +1,13 @@
1 #!/usr/bin/env bun
2 /**
3 - * Removes all Docker images used by Node.js, Deno, and CLI e2e tests.
3 + * Removes all Docker images used by Node.js and CLI e2e tests.
4 * Images are identified by the label `composio.e2e=true`.
5 */
6
7 import { $ } from 'bun';
8
9 -async function cleanImages(runtime: 'node' | 'deno' | 'cli'): Promise<number> {
10 - const runtimeLabel = runtime === 'node' ? 'Node.js' : runtime === 'deno' ? 'Deno' : 'CLI';
9 +async function cleanImages(runtime: 'node' | 'cli'): Promise<number> {
10 + const runtimeLabel = runtime === 'node' ? 'Node.js' : 'CLI';
11 console.log(`Finding e2e ${runtimeLabel} Docker images...`);
12
13 // Find all images with the e2e labels
@@ -57,9 +57,6 @@ async function main() {
57 // Clean Node.js images
58 totalFailures += await cleanImages('node');
59
60 - // Clean Deno images
61 - totalFailures += await cleanImages('deno');
62 -
60 // Clean CLI images
61 totalFailures += await cleanImages('cli');
62
ts/e2e-tests/_utils/src/config.ts
+1 -67
@@ -5,8 +5,6 @@ import { execFileSync } from 'node:child_process';
5 import type {
6 NodeVersionMeta,
7 NodeVersionFromUser,
8 - DenoVersionMeta,
9 - DenoVersionFromUser,
8 CliVersionMeta,
9 CliVersionFromUser,
10 SkipInCI,
@@ -28,7 +26,6 @@ declare module 'bun' {
26 interface Env {
27 CI?: string;
28 COMPOSIO_E2E_NODE_VERSION?: string;
31 - COMPOSIO_E2E_DENO_VERSION?: string;
29 COMPOSIO_E2E_CLI_VERSION?: string;
30 COMPOSIO_INSTALL_E2E_MODE?: string;
31 COMPOSIO_INSTALL_E2E_SHELL?: string;
@@ -178,7 +175,7 @@ function computeSkipForVersion(envVersion: string | undefined, versionValue: str
175 * Read a tool version from mise.toml.
176 * Used to determine the version for 'current' tests.
177 */
181 -export function getMiseVersion(tool: 'node' | 'deno'): string {
178 +export function getMiseVersion(tool: 'node'): string {
179 try {
180 return execFileSync('mise', ['current', tool], {
181 cwd: getRepoRoot(),
@@ -208,24 +205,6 @@ export function getCliPackageVersion(): string {
205 }
206 }
207
211 -/**
212 - * Compute skip state for a Deno version in CI mode.
213 - */
214 -function computeSkipForDenoVersion(envVersion: string | undefined, versionValue: string): SkipInCI {
215 - if (!isCI() || !envVersion) {
216 - return { value: false };
217 - }
218 -
219 - if (versionValue !== envVersion) {
220 - return {
221 - value: true,
222 - reason: `Deno ${versionValue} not selected (running ${envVersion})`,
223 - };
224 - }
225 -
226 - return { value: false };
227 -}
228 -
208 /**
209 * Compute skip state for a CLI version in CI mode.
210 */
@@ -244,51 +223,6 @@ function computeSkipForCliVersion(envVersion: string | undefined, versionValue:
223 return { value: false };
224 }
225
247 -/**
248 - * Resolve the Deno versions to test against, with CI skip state.
249 - *
250 - * The `'current'` version always resolves to the value in mise.toml.
251 - *
252 - * In CI mode (CI env var set + COMPOSIO_E2E_DENO_VERSION set):
253 - * - Versions not matching COMPOSIO_E2E_DENO_VERSION are marked to skip
254 - *
255 - * In local mode:
256 - * - COMPOSIO_E2E_DENO_VERSION overrides everything (single version, no skip)
257 - * - Otherwise returns all configured versions (no skip)
258 - */
259 -export function resolveDenoVersionMetaList(
260 - configDenoVersions?: readonly DenoVersionFromUser[]
261 -): NonEmptyArray<DenoVersionMeta> {
262 - const envVersion = Bun.env.COMPOSIO_E2E_DENO_VERSION;
263 -
264 - // Local mode with env override: single version, no skip
265 - // Check this BEFORE calling mise so env override works without the local toolchain installed.
266 - if (!isCI() && envVersion) {
267 - return [{ kind: 'overridden', value: envVersion, skip: { value: false } }];
268 - }
269 -
270 - // Only read mise.toml after env override check.
271 - const miseDenoVersion = getMiseVersion('deno');
272 -
273 - // No config provided: use mise.toml version
274 - if (configDenoVersions === undefined || configDenoVersions.length === 0) {
275 - return [{ kind: 'current', value: miseDenoVersion, skip: { value: false } }];
276 - }
277 -
278 - const resolvedVersions = configDenoVersions.map((v): DenoVersionMeta => {
279 - if (v === 'current') {
280 - return {
281 - kind: 'current',
282 - value: miseDenoVersion,
283 - skip: computeSkipForDenoVersion(envVersion, miseDenoVersion),
284 - };
285 - }
286 - return { kind: 'static', value: v, skip: computeSkipForDenoVersion(envVersion, v) };
287 - });
288 -
289 - return resolvedVersions as NonEmptyArray<DenoVersionMeta>;
290 -}
291 -
226 /**
227 * Resolve the CLI versions to test against, with CI skip state.
228 *
ts/e2e-tests/_utils/src/const.ts
-6
@@ -16,12 +16,6 @@ export const WELL_KNOWN_ENV_VARS = [
16 */
17 export const WELL_KNOWN_NODE_VERSIONS = [...toolchainVersions.node, 'current'] as const;
18
19 -/**
20 - * Deno versions that are well-known to the CI matrix strategy.
21 - * `current` refers to the Deno version specified in mise.toml.
22 - */
23 -export const WELL_KNOWN_DENO_VERSIONS = [...toolchainVersions.deno, 'current'] as const;
24 -
19 /**
20 * CLI versions that are well-known to the CI strategy.
21 * `current` refers to the version in ts/packages/cli/package.json.
ts/e2e-tests/_utils/src/image-lifecycle.ts
+2 -200
@@ -96,20 +96,6 @@ function defaultNodeLabels(nodeVersion?: string): Record<string, string> {
96 return labels;
97 }
98
99 -/**
100 - * Creates default Docker labels for Deno e2e images.
101 - */
102 -function defaultDenoLabels(denoVersion?: string): Record<string, string> {
103 - const labels: Record<string, string> = {
104 - 'composio.e2e': 'true',
105 - 'composio.runtime': 'deno',
106 - };
107 - if (denoVersion) {
108 - labels['composio.deno_version'] = denoVersion;
109 - }
110 - return labels;
111 -}
112 -
99 /**
100 * Creates default Docker labels for CLI e2e images.
101 */
@@ -199,8 +185,8 @@ export async function checkDocker(options: CheckDockerOptions = {}): Promise<Exe
185 }
186
187 // bun and pnpm are installed inside the images from mise.toml/mise.lock, so only the
202 -// matrixed runtimes (node, deno) need to be resolved on the host and threaded as build args.
203 -async function getMiseVersion(tool: 'node' | 'deno', repoRoot: string): Promise<string> {
188 +// matrixed runtime (node) needs to be resolved on the host and threaded as a build arg.
189 +async function getMiseVersion(tool: 'node', repoRoot: string): Promise<string> {
190 const result = await exec('mise', ['current', tool], { cwd: repoRoot });
191 const version = result.stdout.trim();
192 if (result.exitCode !== 0 || !version) {
@@ -211,10 +197,6 @@ async function getMiseVersion(tool: 'node' | 'deno', repoRoot: string): Promise<
197 return version;
198 }
199
214 -function getMajorVersion(version: string): string {
215 - return version.split('.')[0] ?? version;
216 -}
217 -
200 /**
201 * Creates image tag for a given Node version.
202 */
@@ -362,186 +344,6 @@ export async function runNodeContainer(options: RunNodeContainerOptions): Promis
344 return exec('docker', dockerArgs);
345 }
346
365 -// ============================================================================
366 -// Deno Docker utilities
367 -// ============================================================================
368 -
369 -/**
370 - * Options for running a Deno container.
371 - */
372 -export interface RunDenoContainerOptions {
373 - imageTag: string;
374 - cmd: string | string[];
375 - cwd?: string;
376 - mounts?: DockerMount[];
377 - /** Named volume mounts (volumes must be created beforehand with `docker volume create`) */
378 - volumes?: DockerVolumeMount[];
379 - env?: Record<string, string | undefined>;
380 - labels?: Record<string, string>;
381 - name?: string;
382 - /** Whether to auto-remove the container after exit (default: true) */
383 - remove?: boolean;
384 -}
385 -
386 -/**
387 - * Options for ensureDenoImage.
388 - */
389 -export interface EnsureDenoImageOptions {
390 - repoRoot?: string;
391 - dockerfilePath?: string;
392 -}
393 -
394 -/**
395 - * Creates image tag for a given Deno version.
396 - */
397 -function imageTagForDenoVersion(denoVersion: string): string {
398 - return `composio-e2e-deno:${denoVersion}`;
399 -}
400 -
401 -/**
402 - * Parses Deno version from an image tag.
403 - */
404 -function parseDenoVersionFromImageTag(imageTag: string): string | undefined {
405 - const match = /^composio-e2e-deno:(.+)$/.exec(imageTag);
406 - return match?.[1];
407 -}
408 -
409 -/**
410 - * Ensures a Docker image exists for the given Deno version, building it if necessary.
411 - */
412 -export async function ensureDenoImage(
413 - denoVersion: string,
414 - options: EnsureDenoImageOptions = {}
415 -): Promise<string> {
416 - if (!denoVersion || typeof denoVersion !== 'string') {
417 - throw new Error(`ensureDenoImage(${denoVersion}): denoVersion must be a non-empty string`);
418 - }
419 -
420 - const repoRoot = options.repoRoot ?? getRepoRoot();
421 - const dockerfilePath =
422 - options.dockerfilePath ?? resolve(repoRoot, 'ts/e2e-tests/_utils/Dockerfile.deno');
423 - const imageTag = imageTagForDenoVersion(denoVersion);
424 - const nodeVersion = await getMiseVersion('node', repoRoot);
425 -
426 - const inspect = await exec('docker', ['image', 'inspect', imageTag], { cwd: repoRoot });
427 - if (inspect.exitCode === 0) {
428 - return imageTag;
429 - }
430 -
431 - const buildArgs = [
432 - 'build',
433 - '-f',
434 - dockerfilePath,
435 - '--build-arg',
436 - `DENO_VERSION=${denoVersion}`,
437 - '--build-arg',
438 - `NODE_MAJOR=${getMajorVersion(nodeVersion)}`,
439 - ...labelsToArgs(defaultDenoLabels(denoVersion)),
440 - '-t',
441 - imageTag,
442 - repoRoot,
443 - ];
444 -
445 - const built = await exec('docker', buildArgs, { cwd: repoRoot });
446 - if (built.exitCode !== 0) {
447 - // Handle race condition: concurrent builds may fail because another build
448 - // already tagged the image. If the image now exists, treat it as success.
449 - const output = built.stderr || built.stdout;
450 - if (output.includes('already exists')) {
451 - const recheck = await exec('docker', ['image', 'inspect', imageTag], { cwd: repoRoot });
452 - if (recheck.exitCode === 0) {
453 - return imageTag;
454 - }
455 - }
456 -
457 - const err = new Error(`Failed to build Docker image ${imageTag}`);
458 - (err as Error & { cause: Error }).cause = new Error(output);
459 - throw err;
460 - }
461 -
462 - return imageTag;
463 -}
464 -
465 -/**
466 - * Runs a command in a Deno Docker container.
467 - */
468 -export async function runDenoContainer(options: RunDenoContainerOptions): Promise<ExecResult> {
469 - const { imageTag, cmd, cwd, mounts, volumes, env, labels, name, remove } = options;
470 -
471 - // Validate imageTag is provided, as it determines which Docker image to run.
472 - if (!imageTag || typeof imageTag !== 'string') {
473 - throw new Error('runDenoContainer({ imageTag, ... }): imageTag must be a non-empty string');
474 - }
475 -
476 - const denoVersion = parseDenoVersionFromImageTag(imageTag);
477 -
478 - const dockerArgs = ['run'];
479 - if (remove !== false) {
480 - dockerArgs.push('--rm');
481 - }
482 -
483 - dockerArgs.push(...labelsToArgs({ ...defaultDenoLabels(denoVersion), ...(labels ?? {}) }));
484 -
485 - // Assign a custom container name for easier identification and cleanup.
486 - if (name) {
487 - dockerArgs.push('--name', name);
488 - }
489 -
490 - // Set the working directory inside the container, defaulting relative paths to /app.
491 - if (cwd) {
492 - const containerCwd = cwd.startsWith('/') ? cwd : `/app/${cwd}`;
493 - dockerArgs.push('--workdir', containerCwd);
494 - }
495 -
496 - addHostComposioMount(dockerArgs, '/root/.composio');
497 -
498 - // Pass environment variables to the container for runtime configuration.
499 - dockerArgs.push(...envToArgs(env));
500 -
501 - // Configure bind mounts to share host directories with the container.
502 - if (mounts) {
503 - for (const m of mounts) {
504 - // Ensure each mount has required source and target paths.
505 - if (!m?.source || !m?.target) {
506 - throw new Error('runDenoContainer(...): each mount must have { source, target }');
507 - }
508 - const parts = [`type=bind`, `src=${m.source}`, `dst=${m.target}`];
509 - // Mark mount as read-only to prevent container from modifying host files.
510 - if (m.readonly) parts.push('readonly');
511 - dockerArgs.push('--mount', parts.join(','));
512 - }
513 - }
514 -
515 - // Configure named volume mounts for sharing state between container runs.
516 - if (volumes) {
517 - for (const v of volumes) {
518 - // Ensure each volume mount has required volume name and target path.
519 - if (!v?.volume || !v?.target) {
520 - throw new Error('runDenoContainer(...): each volume must have { volume, target }');
521 - }
522 - const parts = [`type=volume`, `src=${v.volume}`, `dst=${v.target}`];
523 - // Mark mount as read-only if specified.
524 - if (v.readonly) parts.push('readonly');
525 - dockerArgs.push('--mount', parts.join(','));
526 - }
527 - }
528 -
529 - dockerArgs.push(imageTag);
530 -
531 - // Handle cmd as array for direct execution without shell interpretation.
532 - if (Array.isArray(cmd)) {
533 - dockerArgs.push(...cmd.map(String));
534 - // Preserve the image's configured PATH instead of resetting it in a login shell.
535 - // Callers must explicitly use 'deno run --allow-all <file>' when running Deno scripts.
536 - } else if (typeof cmd === 'string' && cmd.length > 0) {
537 - dockerArgs.push('sh', '-c', cmd);
538 - } else {
539 - throw new Error('runDenoContainer({ cmd, ... }): cmd must be a non-empty string or string[]');
540 - }
541 -
542 - return exec('docker', dockerArgs);
543 -}
544 -
347 // ============================================================================
348 // CLI Docker utilities
349 // ============================================================================
ts/e2e-tests/_utils/src/index.ts
-1
@@ -6,7 +6,6 @@ export type {
6 RunFixtureOptions,
7 DefineTestsContext,
8 NodeVersionMeta as NodeVersion,
9 - DenoVersionMeta as DenoVersion,
9 CliVersionMeta as CliVersion,
10 RuntimeVersions,
11 RuntimeKind,
ts/e2e-tests/_utils/src/runner.ts
+7 -192
@@ -10,7 +10,6 @@ import type {
10 E2ETestResultWithSetup,
11 E2ETestResultWithFiles,
12 NodeVersionMeta,
13 - DenoVersionMeta,
13 CliVersionMeta,
14 NonEmptyString,
15 RunFixtureOptions,
@@ -21,15 +20,12 @@ import type {
20 import {
21 getRepoRoot,
22 resolveNodeVersionMetaList,
24 - resolveDenoVersionMetaList,
23 resolveCliVersionMetaList,
24 } from './config';
25 import type { ExecResult } from './image-lifecycle';
26 import {
27 ensureNodeImage,
28 runNodeContainer,
31 - ensureDenoImage,
32 - runDenoContainer,
29 ensureCliImage,
30 runCliContainer,
31 } from './image-lifecycle';
@@ -142,7 +138,7 @@ class DebugLogManager {
138 private formatVersionSection(result: VersionResult): string {
139 const dividerHeavy = '#'.repeat(80);
140 const runtimeLabel =
145 - result.runtime === 'node' ? 'Node.js' : result.runtime === 'deno' ? 'Deno' : 'CLI';
141 + result.runtime === 'node' ? 'Node.js' : 'CLI';
142 const lines: string[] = [
143 '',
144 dividerHeavy,
@@ -201,7 +197,7 @@ class DebugLogManager {
197
198 for (const result of this.versionResults) {
199 const runtimeLabel =
204 - result.runtime === 'node' ? 'Node.js' : result.runtime === 'deno' ? 'Deno' : 'CLI';
200 + result.runtime === 'node' ? 'Node.js' : 'CLI';
201 if (result.status === 'skipped') {
202 lines.push(`${runtimeLabel} ${result.version}: SKIPPED`);
203 } else {
@@ -354,7 +350,7 @@ interface VersionExecutionContext {
350
351 /**
352 * A function that runs a command inside a Docker container.
357 - * All runtime-specific container runners (Node, Deno, CLI) share this signature
353 + * All runtime-specific container runners (Node, CLI) share this signature
354 * for the subset of options used by `createRunCmd`.
355 */
356 type ContainerRunner = (options: {
@@ -513,7 +509,7 @@ function createNodeDockerExecutors(
509
510 try {
511 await createVolume(volumeName);
516 - await initializeVolumeOwnership(volumeName, imageTag, 'node');
512 + await initializeVolumeOwnership(volumeName, imageTag);
513
514 const setupContainerName = `${containerBaseName}-setup`;
515 const setupStartTime = Date.now();
@@ -579,127 +575,6 @@ function createNodeDockerExecutors(
575 return { runCmd, runFixture, finalizeVersionLog, context };
576 }
577
582 -// ============================================================================
583 -// Deno Docker Executors
584 -// ============================================================================
585 -
586 -/**
587 - * Creates Docker execution utilities for a specific Deno version.
588 - */
589 -function createDenoDockerExecutors(
590 - config: RunE2EInternalConfig,
591 - denoVersion: string,
592 - imageTag: string,
593 - repoRoot: string,
594 - logManager: DebugLogManager
595 -) {
596 - const { cwd, suiteName, env, usesFixtures } = config;
597 - const containerEnv = buildContainerEnv(env);
598 - const effectiveCwd = usesFixtures ? `${cwd}/fixtures` : cwd;
599 -
600 - const context: VersionExecutionContext = {
601 - phases: [],
602 - versionStartTime: Date.now(),
603 - imageTag,
604 - };
605 -
606 - const containerPrefix = `e2e-${suiteName}-deno-${denoVersion.replace(/\./g, '-')}`;
607 -
608 - const runCmd = createRunCmd({
609 - runContainer: runDenoContainer,
610 - containerPrefix,
611 - effectiveCwd,
612 - containerEnv,
613 - imageTag,
614 - context,
615 - });
616 -
617 - function runFixture(options: { filename: string }): Promise<E2ETestResult>;
618 - function runFixture(options: { filename: string; setup: string }): Promise<E2ETestResultWithSetup>;
619 - async function runFixture(options: RunFixtureOptions): Promise<E2ETestResult | E2ETestResultWithSetup> {
620 - const { filename, setup } = options;
621 - // Deno scripts need explicit 'deno run' with permissions
622 - const denoRunCmd = `deno run --allow-all ${filename}`;
623 -
624 - // For Deno without setup, just run the file directly
625 - if (!setup) {
626 - return runCmd(denoRunCmd);
627 - }
628 -
629 - // Deno with setup: use Docker volumes for caching
630 - const volumeName = generateVolumeName(suiteName, denoVersion);
631 - const containerBaseName = `${containerPrefix}-${Date.now()}`;
632 - // Deno caches to DENO_DIR, but we also support node_modules for npm packages
633 - const volumeTarget = `${effectiveCwd.startsWith('/') ? effectiveCwd : `/app/${effectiveCwd}`}/node_modules`;
634 -
635 - try {
636 - await createVolume(volumeName);
637 - await initializeVolumeOwnership(volumeName, imageTag, 'deno');
638 -
639 - const setupContainerName = `${containerBaseName}-setup`;
640 - const setupStartTime = Date.now();
641 - const setupResult = await runDenoContainer({
642 - imageTag,
643 - cmd: setup,
644 - cwd: effectiveCwd,
645 - env: containerEnv,
646 - name: setupContainerName,
647 - volumes: [{ volume: volumeName, target: volumeTarget, readonly: false }],
648 - });
649 - const setupDurationMs = Date.now() - setupStartTime;
650 -
651 - context.phases.push({
652 - phase: 'setup',
653 - phaseIndex: 1,
654 - totalPhases: 2,
655 - command: setup,
656 - containerName: setupContainerName,
657 - durationMs: setupDurationMs,
658 - exitCode: setupResult.exitCode,
659 - stdout: setupResult.stdout,
660 - stderr: setupResult.stderr,
661 - });
662 -
663 - const fixtureContainerName = `${containerBaseName}-fixture`;
664 - const fixtureStartTime = Date.now();
665 - const fixtureResult = await runDenoContainer({
666 - imageTag,
667 - cmd: denoRunCmd,
668 - cwd: effectiveCwd,
669 - env: containerEnv,
670 - name: fixtureContainerName,
671 - volumes: [{ volume: volumeName, target: volumeTarget, readonly: true }],
672 - });
673 - const fixtureDurationMs = Date.now() - fixtureStartTime;
674 -
675 - context.phases.push({
676 - phase: 'fixture',
677 - phaseIndex: 2,
678 - totalPhases: 2,
679 - command: denoRunCmd,
680 - containerName: fixtureContainerName,
681 - durationMs: fixtureDurationMs,
682 - exitCode: fixtureResult.exitCode,
683 - stdout: fixtureResult.stdout,
684 - stderr: fixtureResult.stderr,
685 - });
686 -
687 - return { ...fixtureResult, setup: setupResult };
688 - } finally {
689 - await removeVolume(volumeName);
690 - }
691 - }
692 -
693 - const finalizeVersionLog = createFinalizeVersionLog({
694 - runtime: 'deno',
695 - version: denoVersion,
696 - context,
697 - logManager,
698 - });
699 -
700 - return { runCmd, runFixture, finalizeVersionLog, context };
701 -}
702 -
578 // ============================================================================
579 // CLI Docker Executors
580 // ============================================================================
@@ -758,8 +633,8 @@ function normalizeVersionConfig(config: E2EConfig): RuntimeVersions {
633 if (config.versions) {
634 return config.versions;
635 }
761 - // Default: use current version for Node.js and Deno (CLI is opt-in)
762 - return { node: ['current'], deno: ['current'] };
636 + // Default: use current version for Node.js (CLI is opt-in)
637 + return { node: ['current'] };
638 }
639
640 /**
@@ -776,20 +651,6 @@ function renderNodeVersionMeta({ kind, value }: NodeVersionMeta): string {
651 }
652 }
653
779 -/**
780 - * Render a Deno version meta for display in test names.
781 - */
782 -function renderDenoVersionMeta({ kind, value }: DenoVersionMeta): string {
783 - switch (kind) {
784 - case 'current':
785 - return `Deno ${value} [current]`;
786 - case 'overridden':
787 - return `Deno ${value} [overridden]`;
788 - case 'static':
789 - return `Deno ${value}`;
790 - }
791 -}
792 -
654 /**
655 * Render a CLI version meta for display in test names.
656 */
@@ -823,7 +684,7 @@ const IMAGE_ENSURE_TIMEOUT_MS = 1_200_000;
684 * Runs e2e tests using bun:test.
685 * Creates a describe block per runtime version and passes test utilities to defineTests.
686 *
826 - * Supports Node.js, Deno, and CLI runtimes.
687 + * Supports Node.js and CLI runtimes.
688 * In CI mode, versions not matching their respective env vars are skipped.
689 */
690 export function runE2E(config: RunE2EInternalConfig): void {
@@ -837,13 +698,11 @@ export function runE2E(config: RunE2EInternalConfig): void {
698
699 // Resolve versions for each runtime
700 const nodeVersionMetaList = versions.node ? resolveNodeVersionMetaList(versions.node) : [];
840 - const denoVersionMetaList = versions.deno ? resolveDenoVersionMetaList(versions.deno) : [];
701 const cliVersionMetaList = versions.cli ? resolveCliVersionMetaList(versions.cli) : [];
702
703 // Build runtime version labels for logging
704 const allRuntimeVersions = [
705 ...nodeVersionMetaList.map(v => `Node.js ${v.value}`),
846 - ...denoVersionMetaList.map(v => `Deno ${v.value}`),
706 ...cliVersionMetaList.map(v => `CLI ${v.value}`),
707 ];
708
@@ -907,50 +766,6 @@ export function runE2E(config: RunE2EInternalConfig): void {
766 });
767 }
768
910 - // =========== Deno Tests ===========
911 - for (const denoVersionMeta of denoVersionMetaList) {
912 - const testName = renderDenoVersionMeta(denoVersionMeta);
913 -
914 - // Skip this version in CI if not selected
915 - if (denoVersionMeta.skip.value) {
916 - describe(`${testName} - skipped: ${denoVersionMeta.skip.reason}`, () => {
917 - beforeAll(async () => {
918 - await logManager.writeVersionSection({
919 - runtime: 'deno',
920 - version: denoVersionMeta.value,
921 - status: 'skipped',
922 - reason: denoVersionMeta.skip.reason || 'Skipped in CI',
923 - phases: [],
924 - });
925 - });
926 -
927 - it('this version should not run in this CI matrix job', () => {});
928 - });
929 - continue;
930 - }
931 -
932 - describe(testName, () => {
933 - let executors: ReturnType<typeof createDenoDockerExecutors>;
934 -
935 - beforeAll(async () => {
936 - const imageTag = await ensureDenoImage(denoVersionMeta.value, { repoRoot });
937 - executors = createDenoDockerExecutors(config, denoVersionMeta.value, imageTag, repoRoot, logManager);
938 - }, IMAGE_ENSURE_TIMEOUT_MS);
939 -
940 - defineTests({
941 - runtime: 'deno',
942 - runCmd: ((cmd: RunCmdInput) => executors.runCmd(cmd)) as DefineTestsContext['runCmd'],
943 - runFixture: ((opts: RunFixtureOptions) => executors.runFixture(opts)) as DefineTestsContext['runFixture'],
944 - });
945 -
946 - afterAll(async () => {
947 - if (executors) {
948 - await executors.finalizeVersionLog();
949 - }
950 - });
951 - });
952 - }
953 -
769 // =========== CLI Tests ===========
770 for (const cliVersionMeta of cliVersionMetaList) {
771 const testName = renderCliVersionMeta(cliVersionMeta);
ts/e2e-tests/_utils/src/types.ts
+4 -25
@@ -1,8 +1,4 @@
1 -import {
2 - WELL_KNOWN_NODE_VERSIONS,
3 - WELL_KNOWN_DENO_VERSIONS,
4 - WELL_KNOWN_CLI_VERSIONS,
5 -} from './const';
1 +import { WELL_KNOWN_NODE_VERSIONS, WELL_KNOWN_CLI_VERSIONS } from './const';
2
3 export type NonEmptyArray<T> = [T, ...T[]];
4
@@ -18,7 +14,6 @@ export type NonEmptyArray<T> = [T, ...T[]];
14 export type NonEmptyString<T extends string> = T extends '' ? never : T;
15
16 export type NodeVersionFromUser = (typeof WELL_KNOWN_NODE_VERSIONS)[number];
21 -export type DenoVersionFromUser = (typeof WELL_KNOWN_DENO_VERSIONS)[number];
17 export type CliVersionFromUser = (typeof WELL_KNOWN_CLI_VERSIONS)[number];
18
19 /**
@@ -42,19 +37,6 @@ export type NodeVersionMeta =
37 | { kind: 'overridden'; value: string; skip: SkipInCI }
38 | { kind: 'current'; value: string; skip: SkipInCI };
39
45 -/**
46 - * Metadata for a resolved Deno version to test against.
47 - * Includes skip state for CI mode.
48 - */
49 -export type DenoVersionMeta =
50 - | {
51 - kind: 'static';
52 - value: Exclude<(typeof WELL_KNOWN_DENO_VERSIONS)[number], 'current'>;
53 - skip: SkipInCI;
54 - }
55 - | { kind: 'overridden'; value: string; skip: SkipInCI }
56 - | { kind: 'current'; value: string; skip: SkipInCI };
57 -
40 /**
41 * Metadata for a resolved CLI version to test against.
42 * Includes skip state for CI mode.
@@ -66,13 +48,11 @@ export type CliVersionMeta =
48
49 /**
50 * Runtime versions to test against.
69 - * Supports Node.js, Deno, and CLI runtimes.
51 + * Supports Node.js and CLI runtimes.
52 */
53 export interface RuntimeVersions {
54 /** Node.js versions to test */
55 node?: readonly NodeVersionFromUser[];
74 - /** Deno versions to test */
75 - deno?: readonly DenoVersionFromUser[];
56 /** CLI versions to test */
57 cli?: readonly CliVersionFromUser[];
58 }
@@ -119,7 +99,7 @@ export interface RunFixtureOptions {
99 /**
100 * Supported runtime environments for e2e tests.
101 */
122 -export type RuntimeKind = 'node' | 'deno' | 'cli';
102 +export type RuntimeKind = 'node' | 'cli';
103
104 /**
105 * Options for runCmd.
@@ -183,13 +163,12 @@ export interface DefineTestsContext {
163 export interface E2EConfig {
164 /**
165 * Runtime versions to test against.
186 - * Supports Node.js, Deno, and CLI runtimes.
166 + * Supports Node.js and CLI runtimes.
167 *
168 * @example
169 * ```typescript
170 * versions: {
171 * node: ['22.22.3', '24.17.0', '25.9.0'],
192 - * deno: ['2.6.7'],
172 * }
173 * ```
174 */
ts/e2e-tests/_utils/src/volume.ts
+3 -5
@@ -54,15 +54,13 @@ export async function removeVolume(name: string): Promise<void> {
54 *
55 * @param volumeName - Name of the volume to initialize
56 * @param imageTag - Docker image to use for the initialization container
57 - * @param runtime - Runtime type ('node' or 'deno') to determine the correct user/group
57 */
58 export async function initializeVolumeOwnership(
59 volumeName: string,
61 - imageTag: string,
62 - runtime: 'node' | 'deno'
60 + imageTag: string
61 ): Promise<void> {
64 - // Node images use node:node, Deno images use deno:deno
65 - const user = runtime === 'node' ? 'node:node' : 'deno:deno';
62 + // Node images run as node:node
63 + const user = 'node:node';
64
65 // Run a quick container as root to chown the volume contents
66 const result = await $`docker run --rm --user root -v ${volumeName}:/mnt/vol ${imageTag} chown -R ${user} /mnt/vol`.nothrow().quiet();
ts/e2e-tests/runtimes/deno/esm-basic/README.md deleted
-47
@@ -1,47 +0,0 @@
1 -# Deno ESM Compatibility Test
2 -
3 -Verifies that `@composio/core` works correctly when imported via `npm:` specifier in Deno.
4 -
5 -## Why This Exists
6 -
7 -Deno v2.0+ supports npm packages via the `npm:` specifier. This suite ensures:
8 -
9 -- `import('npm:@composio/core')` resolves without errors
10 -- Named imports work
11 -- All public exports are accessible
12 -- No Node.js-only patterns break Deno consumers
13 -
14 -## What It Tests
15 -
16 -| Test | Description |
17 -| --------------------- | ------------------------------------------------ |
18 -| Dynamic import | `import('npm:@composio/core')` doesn't throw |
19 -| Composio class | Main class is exported and constructible |
20 -| OpenAIProvider | Provider class exports and instantiation |
21 -| AuthScheme | Auth enum is accessible |
22 -| ComposioError | Error classes are exported |
23 -| jsonSchemaToZodSchema | Utility function is exported |
24 -| constants | Constants namespace is accessible |
25 -| logger | Logger instance is exported |
26 -
27 -## Fixture
28 -
29 -```
30 -fixtures/
31 -├── deno.jsonc # Deno config to use local workspace packages
32 -└── test.ts # Deno test script using npm: specifier
33 -```
34 -
35 -The fixture uses Deno's native `npm:` specifier to import `@composio/core` and validates each export.
36 -
37 -The `deno.jsonc` file configures `nodeModulesDir: "auto"`, which tells Deno to resolve `npm:` imports from the local `node_modules` directory (populated by pnpm with symlinks to workspace packages). This ensures we test the local build of `@composio/core` rather than the published npm version.
38 -
39 -## Isolation Tool
40 -
41 -**Docker** with Deno version: 2.6.7
42 -
43 -## Running
44 -
45 -```bash
46 -pnpm test:e2e:deno
47 -```
ts/e2e-tests/runtimes/deno/esm-basic/e2e.test.ts deleted
-69
@@ -1,69 +0,0 @@
1 -/**
2 - * ESM compatibility e2e test for Deno
3 - *
4 - * Verifies that @composio/core can be imported using npm: specifier in Deno.
5 - */
6 -
7 -import { e2e, type E2ETestResult } from '@e2e-tests/utils';
8 -import { TIMEOUTS } from '@e2e-tests/utils/const';
9 -import { describe, it, expect, beforeAll } from 'bun:test';
10 -
11 -e2e(import.meta.url, {
12 - versions: {
13 - deno: ['2.6.7'],
14 - },
15 - usesFixtures: true,
16 - defineTests: ({ runFixture }) => {
17 - let result: E2ETestResult;
18 -
19 - beforeAll(async () => {
20 - result = await runFixture({ filename: 'test.ts' });
21 - }, TIMEOUTS.FIXTURE);
22 -
23 - describe('ESM compatibility (Deno)', () => {
24 - it('exits successfully', () => {
25 - expect(result.exitCode).toBe(0);
26 - });
27 -
28 - it('import npm:@composio/core succeeds', () => {
29 - expect(result.stdout).toContain('Test 1 passed: import() succeeded');
30 - });
31 -
32 - it('exports Composio class', () => {
33 - expect(result.stdout).toContain('Test 2 passed: Composio class is exported');
34 - });
35 -
36 - it('exports OpenAIProvider class', () => {
37 - expect(result.stdout).toContain('Test 3 passed: OpenAIProvider class is exported');
38 - });
39 -
40 - it('instantiates OpenAIProvider successfully', () => {
41 - expect(result.stdout).toContain('Test 4 passed: OpenAIProvider instantiated successfully');
42 - });
43 -
44 - it('exports AuthScheme', () => {
45 - expect(result.stdout).toContain('Test 5 passed: AuthScheme is exported');
46 - });
47 -
48 - it('exports Error classes', () => {
49 - expect(result.stdout).toContain('Test 6 passed: Error classes are exported');
50 - });
51 -
52 - it('exports jsonSchemaToZodSchema', () => {
53 - expect(result.stdout).toContain('Test 7 passed: jsonSchemaToZodSchema is exported');
54 - });
55 -
56 - it('exports constants namespace', () => {
57 - expect(result.stdout).toContain('Test 8 passed: constants namespace is exported');
58 - });
59 -
60 - it('exports logger', () => {
61 - expect(result.stdout).toContain('Test 9 passed: logger is exported');
62 - });
63 -
64 - it('completes all tests', () => {
65 - expect(result.stdout).toContain('All ESM compatibility tests passed!');
66 - });
67 - });
68 - },
69 -});
ts/e2e-tests/runtimes/deno/esm-basic/fixtures/deno.jsonc deleted
-6
@@ -1,6 +0,0 @@
1 -{
2 - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
3 - // Use the existing node_modules from pnpm workspace
4 - // This resolves npm:@composio/core to the local workspace package
5 - "nodeModulesDir": "auto"
6 -}
ts/e2e-tests/runtimes/deno/esm-basic/fixtures/test.ts deleted
-76
@@ -1,76 +0,0 @@
1 -/**
2 - * ESM compatibility test for @composio/core in Deno
3 - * Uses npm: specifier to import the package
4 - */
5 -
6 -import { assert } from 'jsr:@std/assert@^1.0.0';
7 -
8 -console.log('Testing ESM compatibility for @composio/core in Deno...\n');
9 -
10 -// Test 1: Dynamic import works via npm: specifier
11 -console.log('Test 1: import("npm:@composio/core") should not throw...');
12 -let composioModule: Record<string, unknown>;
13 -try {
14 - composioModule = await import('npm:@composio/core');
15 - console.log('Test 1 passed: import() succeeded\n');
16 -} catch (error) {
17 - console.error('Test 1 failed: import() threw an error');
18 - console.error(error);
19 - Deno.exit(1);
20 -}
21 -
22 -// Test 2: Composio class is exported
23 -console.log('Test 2: Composio class should be exported...');
24 -assert(composioModule.Composio, 'Composio class should be exported');
25 -assert(typeof composioModule.Composio === 'function', 'Composio should be a constructor');
26 -console.log('Test 2 passed: Composio class is exported\n');
27 -
28 -// Test 3: OpenAIProvider class is exported
29 -console.log('Test 3: OpenAIProvider class should be exported...');
30 -assert(composioModule.OpenAIProvider, 'OpenAIProvider class should be exported');
31 -assert(typeof composioModule.OpenAIProvider === 'function', 'OpenAIProvider should be a constructor');
32 -console.log('Test 3 passed: OpenAIProvider class is exported\n');
33 -
34 -// Test 4: Can instantiate OpenAIProvider
35 -console.log('Test 4: OpenAIProvider should be instantiable...');
36 -try {
37 - const OpenAIProvider = composioModule.OpenAIProvider as new () => unknown;
38 - const provider = new OpenAIProvider();
39 - assert(provider, 'Provider instance should exist');
40 - console.log('Test 4 passed: OpenAIProvider instantiated successfully\n');
41 -} catch (error) {
42 - console.error('Test 4 failed: Could not instantiate OpenAIProvider');
43 - console.error(error);
44 - Deno.exit(1);
45 -}
46 -
47 -// Test 5: AuthScheme is exported
48 -console.log('Test 5: AuthScheme should be exported...');
49 -assert(composioModule.AuthScheme, 'AuthScheme should be exported');
50 -console.log('Test 5 passed: AuthScheme is exported\n');
51 -
52 -// Test 6: Error classes are exported
53 -console.log('Test 6: Error classes should be exported...');
54 -assert(composioModule.ComposioError, 'ComposioError should be exported');
55 -console.log('Test 6 passed: Error classes are exported\n');
56 -
57 -// Test 7: jsonSchemaToZodSchema utility is exported
58 -console.log('Test 7: jsonSchemaToZodSchema should be exported...');
59 -assert(composioModule.jsonSchemaToZodSchema, 'jsonSchemaToZodSchema should be exported');
60 -assert(typeof composioModule.jsonSchemaToZodSchema === 'function', 'jsonSchemaToZodSchema should be a function');
61 -console.log('Test 7 passed: jsonSchemaToZodSchema is exported\n');
62 -
63 -// Test 8: constants namespace is exported
64 -console.log('Test 8: constants namespace should be exported...');
65 -assert(composioModule.constants, 'constants should be exported');
66 -console.log('Test 8 passed: constants namespace is exported\n');
67 -
68 -// Test 9: logger is exported
69 -console.log('Test 9: logger should be exported...');
70 -assert(composioModule.logger, 'logger should be exported');
71 -console.log('Test 9 passed: logger is exported\n');
72 -
73 -console.log('========================================');
74 -console.log('All ESM compatibility tests passed!');
75 -console.log('========================================');
76 -Deno.exit(0);
ts/e2e-tests/runtimes/deno/esm-basic/package.json deleted
-15
@@ -1,15 +0,0 @@
1 -{
2 - "name": "@e2e-tests/deno-esm-basic",
3 - "version": "0.0.0",
4 - "private": true,
5 - "type": "module",
6 - "scripts": {
7 - "typecheck": "tsc --noEmit",
8 - "test:e2e": "bun test e2e.test.ts",
9 - "test:e2e:deno": "bun test e2e.test.ts"
10 - },
11 - "devDependencies": {
12 - "@composio/core": "workspace:*",
13 - "@e2e-tests/utils": "workspace:*"
14 - }
15 -}
ts/e2e-tests/runtimes/deno/esm-basic/tsconfig.json deleted
-12
@@ -1,12 +0,0 @@
1 -{
2 - "$schema": "https://json.schemastore.org/tsconfig",
3 - "compilerOptions": {
4 - "target": "es2022",
5 - "module": "esnext",
6 - "moduleResolution": "bundler",
7 - "strict": true,
8 - "skipLibCheck": true,
9 - "noEmit": true
10 - },
11 - "include": ["e2e.test.ts"]
12 -}
ts/e2e-tests/runtimes/deno/tool-execution/CHANGELOG.md deleted
-73
@@ -1,73 +0,0 @@
1 -# @e2e-tests/deno-tool-execution
2 -
3 -## 0.0.5
4 -
5 -### Patch Changes
6 -
7 -- Updated dependencies [67e80e3]
8 -- Updated dependencies [a7b4943]
9 -- Updated dependencies [077ceb3]
10 -- Updated dependencies [e3999c4]
11 -- Updated dependencies [55ed9e2]
12 -- Updated dependencies [ec55dd1]
13 -- Updated dependencies [8c7e40a]
14 -- Updated dependencies [d9f6291]
15 -- Updated dependencies [48d3559]
16 - - @composio/core@0.23.0
17 -
18 -## 0.0.4
19 -
20 -### Patch Changes
21 -
22 -- Updated dependencies [f478a3d]
23 -- Updated dependencies [f478a3d]
24 -- Updated dependencies [485c09d]
25 -- Updated dependencies [e7580cf]
26 -- Updated dependencies [ae3c069]
27 -- Updated dependencies [e182bc8]
28 - - @composio/core@0.22.0
29 -
30 -## 0.0.3
31 -
32 -### Patch Changes
33 -
34 -- Updated dependencies [461c6c3]
35 -- Updated dependencies [3721d04]
36 -- Updated dependencies [5ec0bdf]
37 -- Updated dependencies [0833c1b]
38 -- Updated dependencies [de5e3f6]
39 -- Updated dependencies [de5e3f6]
40 -- Updated dependencies [5d07582]
41 - - @composio/core@0.21.0
42 -
43 -## 0.0.2
44 -
45 -### Patch Changes
46 -
47 -- Updated dependencies [a4a40a1]
48 -- Updated dependencies [6c56b73]
49 -- Updated dependencies [6c56b73]
50 -- Updated dependencies [a4a40a1]
51 -- Updated dependencies [6c56b73]
52 - - @composio/core@0.20.0
53 -
54 -## 0.0.1
55 -
56 -### Patch Changes
57 -
58 -- Updated dependencies [62e51e8]
59 -- Updated dependencies [7055914]
60 -- Updated dependencies [b4b9fc4]
61 -- Updated dependencies [d4d3060]
62 -- Updated dependencies [efc2e52]
63 -- Updated dependencies [9d0cb2c]
64 -- Updated dependencies [4b5920b]
65 -- Updated dependencies [c7843d8]
66 -- Updated dependencies [ba85f4d]
67 -- Updated dependencies [ba85f4d]
68 -- Updated dependencies [85996c4]
69 -- Updated dependencies [eccb80e]
70 -- Updated dependencies [8bb1d29]
71 -- Updated dependencies [e9fcbe3]
72 -- Updated dependencies [9a69683]
73 - - @composio/core@0.19.0
ts/e2e-tests/runtimes/deno/tool-execution/README.md deleted
-60
@@ -1,60 +0,0 @@
1 -# Deno Core Tool Execution Test
2 -
3 -Verifies that `@composio/core`'s runtime — not just its import surface — works in Deno:
4 -session creation over `fetch`, custom-tool registration, Zod input validation, and
5 -in-process local tool execution on the Effect v4 build.
6 -
7 -## Why This Exists
8 -
9 -The `esm-basic` suite proves the package can be imported under Deno. It deliberately stops
10 -there. This suite drives the actual runtime machinery — the code most likely to break on a
11 -non-Node runtime (provider wiring, schema validation, session context injection, tool
12 -routing) — inside the same Deno 2.6.7 image.
13 -
14 -Local tools execute in-process, so the only backend call is `composio.create()`. Remote
15 -coverage (tool chaining, missing-tool errors, weathermap execution) lives in the node
16 -`custom-tools` suite, which this mirrors.
17 -
18 -Requires `COMPOSIO_API_KEY` in the environment. CI provides it and the runner passes it
19 -into the container.
20 -
21 -## What It Tests
22 -
23 -| Test | Description |
24 -| ---------------------- | ------------------------------------------------------- |
25 -| Session create | `composio.create()` succeeds over `fetch` |
26 -| Local execute | Custom tool runs in-process and returns data |
27 -| Zod defaults | `.default()` values applied to omitted input |
28 -| Error handling | Thrown tool errors wrap into `{ data, error }` |
29 -| Zod validation failure | Wrong-typed input surfaces a validation error, no crash |
30 -| Multiple tools | Each slug routes to its own execute fn |
31 -| Session context | `ctx.userId` matches the session's user |
32 -| Case-insensitive slugs | `get_user_context` resolves |
33 -| Prefixed slugs | `LOCAL_GET_USER_CONTEXT` resolves |
34 -
35 -## Fixture
36 -
37 -```
38 -fixtures/
39 -└── test.ts # Deno test script
40 -```
41 -
42 -The fixture imports the workspace's **built dist directly** via a relative path
43 -(`../../../../../packages/core/dist/index.mjs`), so it exercises the local Effect v4 build
44 -baked into the image by the CI Build step — not whatever version `npm:@composio/core`
45 -would resolve to from the registry. A version-less `npm:` specifier ignores the pnpm
46 -workspace symlink and downloads the published package, which is why the direct path is
47 -load-bearing here.
48 -
49 -`zod` comes in via `npm:zod/v3`, matching the node `custom-tools` fixture's schema
50 -surface.
51 -
52 -## Isolation Tool
53 -
54 -**Docker** with Deno version: 2.6.7
55 -
56 -## Running
57 -
58 -```bash
59 -pnpm test:e2e:deno
60 -```
ts/e2e-tests/runtimes/deno/tool-execution/e2e.test.ts deleted
-84
@@ -1,84 +0,0 @@
1 -/**
2 - * Core tool execution E2E test for Deno.
3 - *
4 - * The `esm-basic` suite proves `@composio/core` imports under Deno;
5 - * this suite proves the runtime works there — session creation over
6 - * fetch, custom-tool registration, Zod validation, and in-process
7 - * local tool execution on the Effect v4 build.
8 - *
9 - * Requires COMPOSIO_API_KEY in the environment (CI provides it; the
10 - * runner passes it into the container).
11 - */
12 -
13 -import { e2e, type E2ETestResult } from '@e2e-tests/utils';
14 -import { TIMEOUTS } from '@e2e-tests/utils/const';
15 -import { describe, it, expect, beforeAll } from 'bun:test';
16 -
17 -declare module 'bun' {
18 - interface Env {
19 - COMPOSIO_API_KEY: string;
20 - }
21 -}
22 -
23 -e2e(import.meta.url, {
24 - versions: {
25 - deno: ['2.6.7'],
26 - },
27 - usesFixtures: true,
28 - env: {
29 - COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
30 - },
31 - defineTests: ({ runFixture }) => {
32 - let result: E2ETestResult;
33 -
34 - beforeAll(async () => {
35 - result = await runFixture({ filename: 'test.ts' });
36 - }, TIMEOUTS.FIXTURE);
37 -
38 - describe('Core tool execution (Deno)', () => {
39 - it('exits successfully', () => {
40 - expect(result.exitCode).toBe(0);
41 - });
42 -
43 - it('creates a session over fetch', () => {
44 - expect(result.stdout).toContain('SESSION_CREATE_OK');
45 - });
46 -
47 - it('executes a local custom tool', () => {
48 - expect(result.stdout).toContain('LOCAL_EXECUTE_OK');
49 - });
50 -
51 - it('applies Zod defaults', () => {
52 - expect(result.stdout).toContain('ZOD_DEFAULTS_OK');
53 - });
54 -
55 - it('wraps a thrown tool error into { data, error }', () => {
56 - expect(result.stdout).toContain('ERROR_HANDLING_OK');
57 - });
58 -
59 - it('surfaces Zod validation failures as errors', () => {
60 - expect(result.stdout).toContain('ZOD_VALIDATION_FAIL_OK');
61 - });
62 -
63 - it('routes multiple local tools to the right execute fn', () => {
64 - expect(result.stdout).toContain('MULTIPLE_TOOLS_OK');
65 - });
66 -
67 - it('injects session context (userId)', () => {
68 - expect(result.stdout).toContain('SESSION_CONTEXT_OK');
69 - });
70 -
71 - it('matches slugs case-insensitively', () => {
72 - expect(result.stdout).toContain('CASE_INSENSITIVE_OK');
73 - });
74 -
75 - it('resolves LOCAL_-prefixed slugs', () => {
76 - expect(result.stdout).toContain('PREFIXED_SLUG_OK');
77 - });
78 -
79 - it('completes all tests', () => {
80 - expect(result.stdout).toContain('ALL_OK');
81 - });
82 - });
83 - },
84 -});
ts/e2e-tests/runtimes/deno/tool-execution/fixtures/test.ts deleted
-179
@@ -1,179 +0,0 @@
1 -/**
2 - * Tool execution E2E fixture for @composio/core in Deno.
3 - *
4 - * Exercises the runtime path, not just the import surface: session
5 - * creation over fetch, custom-tool registration, Zod validation, and
6 - * in-process local tool execution.
7 - *
8 - * The core import is a relative path into the workspace's built dist
9 - * (baked into the e2e image by the CI Build step), so this suite tests
10 - * the local Effect v4 build rather than whatever `npm:@composio/core`
11 - * would resolve to from the registry. Requires COMPOSIO_API_KEY in the
12 - * environment (the e2e runner passes it into the container).
13 - */
14 -
15 -import {
16 - Composio,
17 - experimental_createTool as createCustomTool,
18 -} from '../../../../../packages/core/dist/index.mjs';
19 -import { z } from 'npm:zod/v3';
20 -
21 -const apiKey = Deno.env.get('COMPOSIO_API_KEY');
22 -if (!apiKey) {
23 - console.error('COMPOSIO_API_KEY is required');
24 - Deno.exit(1);
25 -}
26 -
27 -// ── Define custom tools (local execute fns) ──────────────────
28 -
29 -const getUserContext = createCustomTool('GET_USER_CONTEXT', {
30 - name: 'Get user context',
31 - description: 'Retrieve user preferences and history',
32 - inputParams: z.object({
33 - category: z.string().default('all'),
34 - }),
35 - execute: async input => ({ preferences: { category: input.category, source: 'local' } }),
36 -});
37 -
38 -const enrichedSearch = createCustomTool('ENRICHED_SEARCH', {
39 - name: 'Enriched search',
40 - description: 'Search and enrich results with user context',
41 - inputParams: z.object({
42 - query: z.string(),
43 - }),
44 - execute: async (input, ctx) => ({
45 - query: input.query,
46 - userId: ctx.userId,
47 - }),
48 -});
49 -
50 -const throwingTool = createCustomTool('THROWING_TOOL', {
51 - name: 'Throwing tool',
52 - description: 'A tool that always throws an error',
53 - inputParams: z.object({}),
54 - execute: async () => {
55 - throw new Error('intentional error for testing');
56 - },
57 -});
58 -
59 -const strictTool = createCustomTool('STRICT_TOOL', {
60 - name: 'Strict tool',
61 - description: 'Tool with strict numeric input',
62 - inputParams: z.object({
63 - count: z.number(),
64 - }),
65 - execute: async input => ({ doubled: input.count * 2 }),
66 -});
67 -
68 -// ── Create session and run tests ─────────────────────────────
69 -
70 -const composio = new Composio({ apiKey });
71 -
72 -async function main() {
73 - const userId = `e2e-deno-tools-${Date.now()}`;
74 -
75 - const session = await composio.create(userId, {
76 - toolkits: ['weathermap'],
77 - manageConnections: false,
78 - experimental: {
79 - customTools: [getUserContext, enrichedSearch, throwingTool, strictTool],
80 - },
81 - });
82 - if (!session.sessionId) {
83 - throw new Error('SESSION_CREATE failed: missing sessionId');
84 - }
85 - console.log('SESSION_CREATE_OK');
86 -
87 - // ── Test 1: Single local tool execution ──
88 - {
89 - const result = await session.execute('GET_USER_CONTEXT', { category: 'prefs' });
90 - if (result.data?.preferences?.category !== 'prefs') {
91 - throw new Error(`LOCAL_EXECUTE failed: ${JSON.stringify(result)}`);
92 - }
93 - if (result.data?.preferences?.source !== 'local') {
94 - throw new Error(`LOCAL_EXECUTE source mismatch: ${JSON.stringify(result)}`);
95 - }
96 - console.log('LOCAL_EXECUTE_OK');
97 - }
98 -
99 - // ── Test 2: Zod defaults applied ──
100 - {
101 - const result = await session.execute('GET_USER_CONTEXT', {});
102 - if (result.data?.preferences?.category !== 'all') {
103 - throw new Error(`ZOD_DEFAULTS failed: ${JSON.stringify(result)}`);
104 - }
105 - console.log('ZOD_DEFAULTS_OK');
106 - }
107 -
108 - // ── Test 3: Error handling — throw wrapped into { data, error } ──
109 - {
110 - const result = await session.execute('THROWING_TOOL', {});
111 - if (!result.error || !result.error.includes('intentional error')) {
112 - throw new Error(`ERROR_HANDLING failed: ${JSON.stringify(result)}`);
113 - }
114 - if (result.data === undefined) {
115 - throw new Error(`ERROR_HANDLING no data field: ${JSON.stringify(result)}`);
116 - }
117 - console.log('ERROR_HANDLING_OK');
118 - }
119 -
120 - // ── Test 4: Zod validation failure — wrong type wrapped into error ──
121 - {
122 - const result = await session.execute('STRICT_TOOL', { count: 'not-a-number' });
123 - if (!result.error) {
124 - throw new Error(`ZOD_VALIDATION_FAIL expected error: ${JSON.stringify(result)}`);
125 - }
126 - if (!result.error.toLowerCase().includes('validation')) {
127 - throw new Error(`ZOD_VALIDATION_FAIL expected validation error: ${result.error}`);
128 - }
129 - console.log('ZOD_VALIDATION_FAIL_OK');
130 - }
131 -
132 - // ── Test 5: Multiple local tools route correctly ──
133 - {
134 - const r1 = await session.execute('GET_USER_CONTEXT', { category: 'a' });
135 - const r2 = await session.execute('ENRICHED_SEARCH', { query: 'test' });
136 - if (r1.data?.preferences?.category !== 'a') {
137 - throw new Error(`MULTIPLE_TOOLS r1 failed: ${JSON.stringify(r1)}`);
138 - }
139 - if (r2.data?.query !== 'test') {
140 - throw new Error(`MULTIPLE_TOOLS r2 failed: ${JSON.stringify(r2)}`);
141 - }
142 - console.log('MULTIPLE_TOOLS_OK');
143 - }
144 -
145 - // ── Test 6: Session context injection (userId) ──
146 - {
147 - const result = await session.execute('ENRICHED_SEARCH', { query: 'context-test' });
148 - if (result.data?.userId !== userId) {
149 - throw new Error(`SESSION_CONTEXT userId mismatch: expected ${userId}, got ${JSON.stringify(result)}`);
150 - }
151 - console.log('SESSION_CONTEXT_OK');
152 - }
153 -
154 - // ── Test 7: Case-insensitive slug ──
155 - {
156 - const result = await session.execute('get_user_context', { category: 'case-test' });
157 - if (result.data?.preferences?.category !== 'case-test') {
158 - throw new Error(`CASE_INSENSITIVE failed: ${JSON.stringify(result)}`);
159 - }
160 - console.log('CASE_INSENSITIVE_OK');
161 - }
162 -
163 - // ── Test 8: Prefixed slug (LOCAL_) ──
164 - {
165 - const result = await session.execute('LOCAL_GET_USER_CONTEXT', { category: 'prefix-test' });
166 - if (result.data?.preferences?.category !== 'prefix-test') {
167 - throw new Error(`PREFIXED_SLUG failed: ${JSON.stringify(result)}`);
168 - }
169 - console.log('PREFIXED_SLUG_OK');
170 - }
171 -
172 - console.log('ALL_OK');
173 -}
174 -
175 -main().catch((err: unknown) => {
176 - const message = err instanceof Error ? err.message : String(err);
177 - console.log('ERROR:', message);
178 - Deno.exit(1);
179 -});
ts/e2e-tests/runtimes/deno/tool-execution/package.json deleted
-18
@@ -1,18 +0,0 @@
1 -{
2 - "name": "@e2e-tests/deno-tool-execution",
3 - "version": "0.0.5",
4 - "private": true,
5 - "type": "module",
6 - "scripts": {
7 - "typecheck": "tsc --noEmit",
8 - "test:e2e": "bun test e2e.test.ts",
9 - "test:e2e:deno": "bun test e2e.test.ts"
10 - },
11 - "dependencies": {
12 - "@composio/core": "workspace:*",
13 - "zod": "catalog:"
14 - },
15 - "devDependencies": {
16 - "@e2e-tests/utils": "workspace:*"
17 - }
18 -}
ts/e2e-tests/runtimes/deno/tool-execution/tsconfig.json deleted
-12
@@ -1,12 +0,0 @@
1 -{
2 - "$schema": "https://json.schemastore.org/tsconfig",
3 - "compilerOptions": {
4 - "target": "es2022",
5 - "module": "esnext",
6 - "moduleResolution": "bundler",
7 - "strict": true,
8 - "skipLibCheck": true,
9 - "noEmit": true
10 - },
11 - "include": ["e2e.test.ts"]
12 -}
turbo.jsonc
-5
@@ -40,11 +40,6 @@
40 "env": ["ANTHROPIC_API_KEY", "COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_NODE_VERSION", "OPENAI_API_KEY"],
41 "cache": false
42 },
43 - "test:e2e:deno": {
44 - "dependsOn": ["^build"],
45 - "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_DENO_VERSION", "OPENAI_API_KEY"],
46 - "cache": false
47 - },
43 "test:e2e:cli": {
44 "dependsOn": ["^build"],
45 "env": ["COMPOSIO_API_KEY", "COMPOSIO_BASE_URL", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_CLI_VERSION", "OPENAI_API_KEY"],