Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(e2e): restore runtime compatibility coverage
jkomyno719814486317
diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 39ae4a9f9..6caf7ce5f 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -505,18 +505,6 @@ importers:specifier: workspace:*version: link:../../../_utils- ts/e2e-tests/runtimes/node/openai-v7-zod4-compat:- devDependencies:- '@composio/core':- specifier: workspace:*- version: link:../../../../packages/core- '@composio/openai':- specifier: workspace:*- version: link:../../../../packages/providers/openai- '@e2e-tests/utils':- specifier: workspace:*- version: link:../../../_utils-ts/e2e-tests/runtimes/node/openai-zod4-compat:devDependencies:'@composio/core':diff --git a/ts/e2e-tests/_utils/Dockerfile.cli b/ts/e2e-tests/_utils/Dockerfile.cliindex 02bb19916..f79fdd598 100644--- a/ts/e2e-tests/_utils/Dockerfile.cli+++ b/ts/e2e-tests/_utils/Dockerfile.cli@@ -7,7 +7,9 @@ ARG CLI_VERSION=0.0.0FROM node:${NODE_VERSION}-slim AS builderENV MISE_DATA_DIR="/mise"+ENV MISE_CACHE_DIR="/mise/cache"ENV MISE_DISABLE_TOOLS="node,deno,python,uv"+ENV MISE_TRUSTED_CONFIG_PATHS="/app"ENV PATH="/mise/shims:$PATH"WORKDIR /app@@ -18,14 +20,12 @@ RUN apt-get update && \rm -rf /var/lib/apt/lists/*# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).-# mise is installed to /usr/local/bin and the tool binaries are symlinked there too;-# Node is disabled so the base image's Node is used.+# mise is installed to /usr/local/bin; its shared cache and shims expose bun and+# pnpm while Node stays on the base image.+ENV XDG_CACHE_HOME="/mise/cache"RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise shCOPY mise.toml mise.lock ./-RUN mise trust /app/mise.toml && \- mise install && \- ln -sf "$(mise which bun)" /usr/local/bin/bun && \- ln -sf "$(mise which pnpm)" /usr/local/bin/pnpm && \+RUN mise install && \pnpm --version && \bun --versiondiff --git a/ts/e2e-tests/_utils/Dockerfile.deno b/ts/e2e-tests/_utils/Dockerfile.denoindex 4ac7a584e..e110214f0 100644--- a/ts/e2e-tests/_utils/Dockerfile.deno+++ b/ts/e2e-tests/_utils/Dockerfile.deno@@ -14,7 +14,9 @@ FROM denoland/deno:${DENO_VERSION}ARG NODE_MAJORENV MISE_DATA_DIR="/mise"+ENV MISE_CACHE_DIR="/mise/cache"ENV MISE_DISABLE_TOOLS="node,deno,python,uv"+ENV MISE_TRUSTED_CONFIG_PATHS="/app"ENV PATH="/mise/shims:$PATH"# Switch to root for installation@@ -33,14 +35,12 @@ RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \rm -rf /var/lib/apt/lists/*# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).-# mise is installed to /usr/local/bin and the tool binaries are symlinked there too so-# they stay on PATH for the non-root runtime user (login shells reset PATH).+# mise is installed to /usr/local/bin; its shared cache and shims keep the tools+# available to the non-root runtime user.+ENV XDG_CACHE_HOME="/mise/cache"RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise shCOPY mise.toml mise.lock ./-RUN mise trust /app/mise.toml && \- mise install && \- ln -sf "$(mise which bun)" /usr/local/bin/bun && \- ln -sf "$(mise which pnpm)" /usr/local/bin/pnpm && \+RUN mise install && \pnpm --version && \bun --version@@ -82,4 +82,7 @@ RUN mkdir -p $DENO_DIR && chown -R deno:deno /home/denoUSER deno+RUN pnpm --version && \+ bun --version+CMD ["sh"]diff --git a/ts/e2e-tests/_utils/Dockerfile.node b/ts/e2e-tests/_utils/Dockerfile.nodeindex f530f15e3..3e8fda7df 100644--- a/ts/e2e-tests/_utils/Dockerfile.node+++ b/ts/e2e-tests/_utils/Dockerfile.node@@ -13,7 +13,9 @@ ARG NODE_VERSIONFROM node:${NODE_VERSION}-slimENV MISE_DATA_DIR="/mise"+ENV MISE_CACHE_DIR="/mise/cache"ENV MISE_DISABLE_TOOLS="node,deno,python,uv"+ENV MISE_TRUSTED_CONFIG_PATHS="/app"ENV PATH="/mise/shims:$PATH"WORKDIR /app@@ -24,14 +26,12 @@ RUN apt-get update && \rm -rf /var/lib/apt/lists/*# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).-# mise is installed to /usr/local/bin; the tool binaries are symlinked there too so-# they stay on PATH for the non-root runtime user (login shells reset PATH).+# mise is installed to /usr/local/bin; its shared cache and shims keep the tools+# available to the non-root runtime user.+ENV XDG_CACHE_HOME="/mise/cache"RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise shCOPY mise.toml mise.lock ./-RUN mise trust /app/mise.toml && \- mise install && \- ln -sf "$(mise which bun)" /usr/local/bin/bun && \- ln -sf "$(mise which pnpm)" /usr/local/bin/pnpm && \+RUN mise install && \pnpm --version && \bun --version@@ -82,4 +82,7 @@ RUN mkdir -p /home/node/.composio && chown node:node /home/node/.composioUSER node+RUN pnpm --version && \+ bun --version+CMD ["sh"]diff --git a/ts/e2e-tests/_utils/src/image-lifecycle.ts b/ts/e2e-tests/_utils/src/image-lifecycle.tsindex e17382818..738f6b4bd 100644--- a/ts/e2e-tests/_utils/src/image-lifecycle.ts+++ b/ts/e2e-tests/_utils/src/image-lifecycle.ts@@ -345,9 +345,9 @@ export async function runNodeContainer(options: RunNodeContainerOptions): Promis// Handle cmd as array for direct execution without shell interpretation.if (Array.isArray(cmd)) {dockerArgs.push(...cmd.map(String));- // Handle cmd as string by wrapping in login shell for proper environment setup.+ // Preserve the image's configured PATH instead of resetting it in a login shell.} else if (typeof cmd === 'string' && cmd.length > 0) {- dockerArgs.push('sh', '-lc', cmd);+ dockerArgs.push('sh', '-c', cmd);} else {throw new Error('runNodeContainer({ cmd, ... }): cmd must be a non-empty string or string[]');}@@ -530,10 +530,10 @@ export async function runDenoContainer(options: RunDenoContainerOptions): Promis// Handle cmd as array for direct execution without shell interpretation.if (Array.isArray(cmd)) {dockerArgs.push(...cmd.map(String));- // Handle cmd as string by wrapping in login shell for proper environment setup.+ // Preserve the image's configured PATH instead of resetting it in a login shell.// Callers must explicitly use 'deno run --allow-all <file>' when running Deno scripts.} else if (typeof cmd === 'string' && cmd.length > 0) {- dockerArgs.push('sh', '-lc', cmd);+ dockerArgs.push('sh', '-c', cmd);} else {throw new Error('runDenoContainer({ cmd, ... }): cmd must be a non-empty string or string[]');}diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/README.md b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/README.mddeleted file mode 100644index 7f0d6dc03..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/README.md+++ /dev/null@@ -1,16 +0,0 @@-# OpenAI v7 + Zod v4 Compatibility Test--Verifies that packed `@composio/core` and `@composio/openai` packages install,-typecheck, and run with explicit OpenAI 7 and Zod 4 versions.--The consumer typecheck covers exported Chat Completions and Responses types-without `skipLibCheck`. Runtime assertions construct clients with fake keys,-wrap tools through both providers, and make no network requests.--The Docker matrix covers Node.js 22.22.3, 24.17.0, and 25.9.0.--Run it from the repository root:--```bash-pnpm --filter @e2e-tests/node-openai-v7-zod4-compat test:e2e:node-```diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/e2e.test.ts b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/e2e.test.tsdeleted file mode 100644index d912c3303..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/e2e.test.ts+++ /dev/null@@ -1,52 +0,0 @@-/**- * Packed @composio/core and @composio/openai compatibility with OpenAI 7.- */--import { e2e, type E2ETestResultWithSetup } from '@e2e-tests/utils';-import { describe, it, expect, beforeAll } from 'bun:test';--e2e(import.meta.url, {- versions: { node: ['22.22.3', '24.17.0', '25.9.0'] },- usesFixtures: true,- defineTests: ({ runFixture }) => {- let result: E2ETestResultWithSetup;-- beforeAll(async () => {- result = await runFixture({- filename: 'index.mjs',- setup: 'npm run install:composio && npm run typecheck',- });- }, 300_000);-- describe('setup', () => {- it('installs and typechecks successfully', () => {- expect(result.setup.exitCode).toBe(0);- expect(result.setup.stdout).toContain('openai v7 compatibility typecheck passed');- });- });-- describe('OpenAI v7 + Zod v4 compatibility', () => {- it('exits successfully', () => {- expect(result.exitCode).toBe(0);- });-- it('loads OpenAI 7 and Zod 4', () => {- expect(result.stdout).toContain('zod@4 works');- expect(result.stdout).toContain('openai@7 works');- });-- it('constructs the Composio client', () => {- expect(result.stdout).toContain('@composio/core works');- });-- it('wraps tools through both providers', () => {- expect(result.stdout).toContain('core wrapTool works');- expect(result.stdout).toContain('responses wrapTool works');- });-- it('runs without network access', () => {- expect(result.stdout).toContain('All packages work together!');- });- });- },-});diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.mjs b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.mjsdeleted file mode 100644index bd98c014b..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.mjs+++ /dev/null@@ -1,45 +0,0 @@-import { z } from 'zod';-import OpenAI from 'openai';-import { Composio, OpenAIProvider } from '@composio/core';-import { OpenAIResponsesProvider } from '@composio/openai';--const schema = z.object({ name: z.string() });-schema.parse({ name: 'OpenAI 7' });-console.log('zod@4 works');--const openai = new OpenAI({ apiKey: 'test-key' });-if (!openai.responses) {- throw new Error('OpenAI client does not expose the Responses API');-}-console.log('openai@7 works');--const chatProvider = new OpenAIProvider();-const composio = new Composio({- provider: chatProvider,- apiKey: 'test-key',-});-if (!composio) {- throw new Error('Composio client construction failed');-}-console.log('@composio/core works');--const composioTool = {- slug: 'TEST',- description: 'Test tool',- inputParameters: { type: 'object', properties: {} },-};--const chatTool = chatProvider.wrapTool(composioTool);-if (chatTool.type !== 'function' || chatTool.function.name !== 'TEST') {- throw new Error('Core OpenAI provider returned an invalid tool');-}-console.log('core wrapTool works');--const responsesProvider = new OpenAIResponsesProvider();-const responsesTool = responsesProvider.wrapTool(composioTool);-if (responsesTool.type !== 'function' || responsesTool.name !== 'TEST') {- throw new Error('Responses provider returned an invalid tool');-}-console.log('responses wrapTool works');--console.log('All packages work together!');diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.ts b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.tsdeleted file mode 100644index f794dbc99..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.ts+++ /dev/null@@ -1,31 +0,0 @@-import OpenAI from 'openai';-import { OpenAIProvider, type Tool } from '@composio/core';-import { OpenAIResponsesProvider } from '@composio/openai';--const composioTool = {- slug: 'TEST_TOOL',- name: 'Test Tool',- description: 'A tool used by the OpenAI compatibility fixture',- version: '20260625_00',- availableVersions: ['20260625_00'],- inputParameters: {- type: 'object',- properties: {- query: { type: 'string' },- },- required: ['query'],- },- tags: [],-} satisfies Tool;--const chatProvider = new OpenAIProvider();-const chatTool = chatProvider.wrapTool(composioTool);-const _openAIChatTool: OpenAI.ChatCompletionTool = chatTool;--const responsesProvider = new OpenAIResponsesProvider();-const responsesTool = responsesProvider.wrapTool(composioTool);-const _openAIResponsesTool: OpenAI.Responses.FunctionTool = responsesTool;--type ProviderToolCall = Parameters<OpenAIResponsesProvider['executeToolCall']>[1];-declare const openAIToolCall: OpenAI.Responses.ResponseFunctionToolCall;-const _providerToolCall: ProviderToolCall = openAIToolCall;diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/package.json b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/package.jsondeleted file mode 100644index d855e2589..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/package.json+++ /dev/null@@ -1,13 +0,0 @@-{- "private": true,- "type": "module",- "scripts": {- "install:composio": "pnpm --dir /app/ts/packages/core pack --pack-destination . --silent >/dev/null && pnpm --dir /app/ts/packages/providers/openai pack --pack-destination . --silent >/dev/null && npm install --ignore-scripts --package-lock=false ./composio-core-*.tgz ./composio-openai-*.tgz",- "typecheck": "tsc --noEmit && echo openai v7 compatibility typecheck passed"- },- "dependencies": {- "openai": "7.2.0",- "typescript": "5.8.3",- "zod": "4.4.3"- }-}diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/tsconfig.json b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/tsconfig.jsondeleted file mode 100644index 9fb0d1b7a..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/tsconfig.json+++ /dev/null@@ -1,12 +0,0 @@-{- "$schema": "https://json.schemastore.org/tsconfig",- "compilerOptions": {- "target": "es2022",- "module": "nodenext",- "moduleResolution": "nodenext",- "strict": true,- "skipLibCheck": false,- "noEmit": true- },- "include": ["index.ts"]-}diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/package.json b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/package.jsondeleted file mode 100644index c96d40c10..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/package.json+++ /dev/null@@ -1,16 +0,0 @@-{- "name": "@e2e-tests/node-openai-v7-zod4-compat",- "version": "0.0.0",- "private": true,- "type": "module",- "scripts": {- "typecheck": "tsc --noEmit",- "test:e2e": "bun test e2e.test.ts",- "test:e2e:node": "bun test e2e.test.ts"- },- "devDependencies": {- "@composio/core": "workspace:*",- "@composio/openai": "workspace:*",- "@e2e-tests/utils": "workspace:*"- }-}diff --git a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/tsconfig.json b/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/tsconfig.jsondeleted file mode 100644index 3eeaa418d..000000000--- a/ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/tsconfig.json+++ /dev/null@@ -1,12 +0,0 @@-{- "$schema": "https://json.schemastore.org/tsconfig",- "compilerOptions": {- "target": "es2022",- "module": "esnext",- "moduleResolution": "bundler",- "strict": true,- "skipLibCheck": true,- "noEmit": true- },- "include": ["e2e.test.ts"]-}diff --git a/ts/e2e-tests/runtimes/node/openai-zod4-compat/README.md b/ts/e2e-tests/runtimes/node/openai-zod4-compat/README.mdindex f8bf6692d..c8a1ecebd 100644--- a/ts/e2e-tests/runtimes/node/openai-zod4-compat/README.md+++ b/ts/e2e-tests/runtimes/node/openai-zod4-compat/README.md@@ -1,7 +1,7 @@-# OpenAI v6 + Zod v4 Compatibility Test+# OpenAI v7 + Zod v4 Compatibility TestVerifies that packed `@composio/core` and `@composio/openai` packages work with-`openai@6` and `zod@4`.+`openai@7` and `zod@4`.## Background@@ -11,8 +11,8 @@ Issue [#2336](https://github.com/ComposioHQ/composio/issues/2336) reported peer| Test | Description || ------------------- | --------------------------------------------------------- |-| npm install | Installs packed Composio packages with OpenAI 6 and Zod 4 |-| TypeScript | Checks exported provider types against OpenAI 6 |+| npm install | Installs packed Composio packages with OpenAI 7 and Zod 4 |+| TypeScript | Checks exported provider types against OpenAI 7 || Package integration | Verifies all packages work together without conflicts || wrapTool | Confirms both OpenAI provider surfaces wrap tools |@@ -22,12 +22,12 @@ Issue [#2336](https://github.com/ComposioHQ/composio/issues/2336) reported peerfixtures/├── index.mjs # Offline runtime assertions├── index.ts # Exported-type compatibility checks-├── package.json # Explicit OpenAI 6 and Zod 4 dependencies+├── package.json # Explicit OpenAI 7 and Zod 4 dependencies└── tsconfig.json # Strict consumer compiler settings```The setup phase packs both Composio packages, installs them with explicit-OpenAI 6 and Zod 4 versions, and typechecks without `skipLibCheck`.+OpenAI 7 and Zod 4 versions, and typechecks without `skipLibCheck`.## Setupdiff --git a/ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts b/ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.tsindex 75333b703..f53017300 100644--- a/ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts+++ b/ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts@@ -1,8 +1,8 @@/**- * OpenAI v6 + Zod v4 compatibility e2e test+ * OpenAI v7 + Zod v4 compatibility e2e test** Verifies that packed @composio/core and @composio/openai packages install,- * typecheck, and run with openai@6 and zod@4.+ * typecheck, and run with openai@7 and zod@4.*/import { e2e, type E2ETestResultWithSetup } from '@e2e-tests/utils';@@ -25,11 +25,11 @@ e2e(import.meta.url, {describe('setup', () => {it('installs and typechecks successfully', () => {expect(result.setup.exitCode).toBe(0);- expect(result.setup.stdout).toContain('openai v6 compatibility typecheck passed');+ expect(result.setup.stdout).toContain('openai v7 compatibility typecheck passed');});});- describe('OpenAI v6 + Zod v4 compatibility', () => {+ describe('OpenAI v7 + Zod v4 compatibility', () => {it('exits successfully', () => {expect(result.exitCode).toBe(0);});@@ -38,8 +38,8 @@ e2e(import.meta.url, {expect(result.stdout).toContain('zod@4 works');});- it('openai@6 works', () => {- expect(result.stdout).toContain('openai@6 works');+ it('openai@7 works', () => {+ expect(result.stdout).toContain('openai@7 works');});it('@composio/core works', () => {diff --git a/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/index.mjs b/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/index.mjsindex a62ace691..640802acc 100644--- a/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/index.mjs+++ b/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/index.mjs@@ -1,5 +1,5 @@/**- * Simple test script to verify @composio/core works with openai@6 and zod@4+ * Simple test script to verify @composio/core works with openai@7 and zod@4** This test verifies that the packages can be imported and instantiated together* without peer dependency conflicts. It doesn't make actual API calls.@@ -13,14 +13,15 @@ import { OpenAIResponsesProvider } from '@composio/openai';// Verify zod@4 worksconst schema = z.object({ name: z.string() });+schema.parse({ name: 'OpenAI 7' });console.log('✅ zod@4 works');-// Verify openai@6 works without making a network request.+// Verify openai@7 works without making a network request.const openai = new OpenAI({ apiKey: 'test-key' });if (!openai.responses) {throw new Error('OpenAI client does not expose the Responses API');}-console.log('✅ openai@6 works');+console.log('✅ openai@7 works');// Verify @composio/core worksconst provider = new OpenAIProvider();diff --git a/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/package.json b/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/package.jsonindex f92112b51..3895c441f 100644--- a/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/package.json+++ b/ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/package.json@@ -2,12 +2,12 @@"private": true,"type": "module","scripts": {- "install:composio": "pnpm --dir /app/ts/packages/core pack --pack-destination . --silent >/dev/null && pnpm --dir /app/ts/packages/providers/openai pack --pack-destination . --silent >/dev/null && npm install --ignore-scripts --package-lock=false ./composio-core-*.tgz ./composio-openai-*.tgz",- "typecheck": "tsc --noEmit && echo openai v6 compatibility typecheck passed"+ "install:composio": "pnpm --dir /app/ts/packages/core pack --pack-destination \"$PWD\" --silent >/dev/null && pnpm --dir /app/ts/packages/providers/openai pack --pack-destination \"$PWD\" --silent >/dev/null && npm install --ignore-scripts --package-lock=false ./composio-core-*.tgz ./composio-openai-*.tgz",+ "typecheck": "tsc --noEmit && echo openai v7 compatibility typecheck passed"},"dependencies": {- "openai": "6.49.0",- "typescript": "5.8.3",+ "openai": "7.2.0",+ "typescript": "7.0.2","zod": "4.4.3"}}