Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 17:15 UTC
fix(e2e): restore runtime compatibility coverage
jkomyno committed
Aug 3, 2026 at 18:04 UTC
71981448631776b66b3838a3d4390fb0a87e1d8c
17 files changed
+48
-250
pnpm-lock.yaml
-12
@@ -505,18 +505,6 @@ importers:
505
specifier: workspace:*
506
version: link:../../../_utils
507
508
- ts/e2e-tests/runtimes/node/openai-v7-zod4-compat:
509
- devDependencies:
510
- '@composio/core':
511
- specifier: workspace:*
512
- version: link:../../../../packages/core
513
- '@composio/openai':
514
- specifier: workspace:*
515
- version: link:../../../../packages/providers/openai
516
- '@e2e-tests/utils':
517
- specifier: workspace:*
518
- version: link:../../../_utils
519
-
508
ts/e2e-tests/runtimes/node/openai-zod4-compat:
509
devDependencies:
510
'@composio/core':
ts/e2e-tests/_utils/Dockerfile.cli
+6
-6
@@ -7,7 +7,9 @@ ARG CLI_VERSION=0.0.0
7
FROM node:${NODE_VERSION}-slim AS builder
8
9
ENV MISE_DATA_DIR="/mise"
10
+ENV MISE_CACHE_DIR="/mise/cache"
11
ENV MISE_DISABLE_TOOLS="node,deno,python,uv"
12
+ENV MISE_TRUSTED_CONFIG_PATHS="/app"
13
ENV PATH="/mise/shims:$PATH"
14
15
WORKDIR /app
@@ -18,14 +20,12 @@ RUN apt-get update && \
20
rm -rf /var/lib/apt/lists/*
21
22
# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).
21
-# mise is installed to /usr/local/bin and the tool binaries are symlinked there too;
22
-# Node is disabled so the base image's Node is used.
23
+# mise is installed to /usr/local/bin; its shared cache and shims expose bun and
24
+# pnpm while Node stays on the base image.
25
+ENV XDG_CACHE_HOME="/mise/cache"
26
RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
27
COPY mise.toml mise.lock ./
25
-RUN mise trust /app/mise.toml && \
26
- mise install && \
27
- ln -sf "$(mise which bun)" /usr/local/bin/bun && \
28
- ln -sf "$(mise which pnpm)" /usr/local/bin/pnpm && \
28
+RUN mise install && \
29
pnpm --version && \
30
bun --version
31
ts/e2e-tests/_utils/Dockerfile.deno
+9
-6
@@ -14,7 +14,9 @@ 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
@@ -33,14 +35,12 @@ RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \
35
rm -rf /var/lib/apt/lists/*
36
37
# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).
36
-# mise is installed to /usr/local/bin and the tool binaries are symlinked there too so
37
-# they stay on PATH for the non-root runtime user (login shells reset PATH).
38
+# mise is installed to /usr/local/bin; its shared cache and shims keep the tools
39
+# available to the non-root runtime user.
40
+ENV XDG_CACHE_HOME="/mise/cache"
41
RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
42
COPY mise.toml mise.lock ./
40
-RUN mise trust /app/mise.toml && \
41
- mise install && \
42
- ln -sf "$(mise which bun)" /usr/local/bin/bun && \
43
- ln -sf "$(mise which pnpm)" /usr/local/bin/pnpm && \
43
+RUN mise install && \
44
pnpm --version && \
45
bun --version
46
@@ -82,4 +82,7 @@ RUN mkdir -p $DENO_DIR && chown -R deno:deno /home/deno
82
83
USER deno
84
85
+RUN pnpm --version && \
86
+ bun --version
87
+
88
CMD ["sh"]
ts/e2e-tests/_utils/Dockerfile.node
+9
-6
@@ -13,7 +13,9 @@ ARG NODE_VERSION
13
FROM node:${NODE_VERSION}-slim
14
15
ENV MISE_DATA_DIR="/mise"
16
+ENV MISE_CACHE_DIR="/mise/cache"
17
ENV MISE_DISABLE_TOOLS="node,deno,python,uv"
18
+ENV MISE_TRUSTED_CONFIG_PATHS="/app"
19
ENV PATH="/mise/shims:$PATH"
20
21
WORKDIR /app
@@ -24,14 +26,12 @@ RUN apt-get update && \
26
rm -rf /var/lib/apt/lists/*
27
28
# Install bun + pnpm via mise (versions pinned in mise.toml/mise.lock).
27
-# mise is installed to /usr/local/bin; the tool binaries are symlinked there too so
28
-# they stay on PATH for the non-root runtime user (login shells reset PATH).
29
+# mise is installed to /usr/local/bin; its shared cache and shims keep the tools
30
+# available to the non-root runtime user.
31
+ENV XDG_CACHE_HOME="/mise/cache"
32
RUN curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
33
COPY mise.toml mise.lock ./
31
-RUN mise trust /app/mise.toml && \
32
- mise install && \
33
- ln -sf "$(mise which bun)" /usr/local/bin/bun && \
34
- ln -sf "$(mise which pnpm)" /usr/local/bin/pnpm && \
34
+RUN mise install && \
35
pnpm --version && \
36
bun --version
37
@@ -82,4 +82,7 @@ RUN mkdir -p /home/node/.composio && chown node:node /home/node/.composio
82
83
USER node
84
85
+RUN pnpm --version && \
86
+ bun --version
87
+
88
CMD ["sh"]
ts/e2e-tests/_utils/src/image-lifecycle.ts
+4
-4
@@ -345,9 +345,9 @@ export async function runNodeContainer(options: RunNodeContainerOptions): Promis
345
// Handle cmd as array for direct execution without shell interpretation.
346
if (Array.isArray(cmd)) {
347
dockerArgs.push(...cmd.map(String));
348
- // Handle cmd as string by wrapping in login shell for proper environment setup.
348
+ // Preserve the image's configured PATH instead of resetting it in a login shell.
349
} else if (typeof cmd === 'string' && cmd.length > 0) {
350
- dockerArgs.push('sh', '-lc', cmd);
350
+ dockerArgs.push('sh', '-c', cmd);
351
} else {
352
throw new Error('runNodeContainer({ cmd, ... }): cmd must be a non-empty string or string[]');
353
}
@@ -530,10 +530,10 @@ export async function runDenoContainer(options: RunDenoContainerOptions): Promis
530
// Handle cmd as array for direct execution without shell interpretation.
531
if (Array.isArray(cmd)) {
532
dockerArgs.push(...cmd.map(String));
533
- // Handle cmd as string by wrapping in login shell for proper environment setup.
533
+ // Preserve the image's configured PATH instead of resetting it in a login shell.
534
// Callers must explicitly use 'deno run --allow-all <file>' when running Deno scripts.
535
} else if (typeof cmd === 'string' && cmd.length > 0) {
536
- dockerArgs.push('sh', '-lc', cmd);
536
+ dockerArgs.push('sh', '-c', cmd);
537
} else {
538
throw new Error('runDenoContainer({ cmd, ... }): cmd must be a non-empty string or string[]');
539
}
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/README.md
deleted
-16
@@ -1,16 +0,0 @@
1
-# OpenAI v7 + Zod v4 Compatibility Test
2
-
3
-Verifies that packed `@composio/core` and `@composio/openai` packages install,
4
-typecheck, and run with explicit OpenAI 7 and Zod 4 versions.
5
-
6
-The consumer typecheck covers exported Chat Completions and Responses types
7
-without `skipLibCheck`. Runtime assertions construct clients with fake keys,
8
-wrap tools through both providers, and make no network requests.
9
-
10
-The Docker matrix covers Node.js 22.22.3, 24.17.0, and 25.9.0.
11
-
12
-Run it from the repository root:
13
-
14
-```bash
15
-pnpm --filter @e2e-tests/node-openai-v7-zod4-compat test:e2e:node
16
-```
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/e2e.test.ts
deleted
-52
@@ -1,52 +0,0 @@
1
-/**
2
- * Packed @composio/core and @composio/openai compatibility with OpenAI 7.
3
- */
4
-
5
-import { e2e, type E2ETestResultWithSetup } from '@e2e-tests/utils';
6
-import { describe, it, expect, beforeAll } from 'bun:test';
7
-
8
-e2e(import.meta.url, {
9
- versions: { node: ['22.22.3', '24.17.0', '25.9.0'] },
10
- usesFixtures: true,
11
- defineTests: ({ runFixture }) => {
12
- let result: E2ETestResultWithSetup;
13
-
14
- beforeAll(async () => {
15
- result = await runFixture({
16
- filename: 'index.mjs',
17
- setup: 'npm run install:composio && npm run typecheck',
18
- });
19
- }, 300_000);
20
-
21
- describe('setup', () => {
22
- it('installs and typechecks successfully', () => {
23
- expect(result.setup.exitCode).toBe(0);
24
- expect(result.setup.stdout).toContain('openai v7 compatibility typecheck passed');
25
- });
26
- });
27
-
28
- describe('OpenAI v7 + Zod v4 compatibility', () => {
29
- it('exits successfully', () => {
30
- expect(result.exitCode).toBe(0);
31
- });
32
-
33
- it('loads OpenAI 7 and Zod 4', () => {
34
- expect(result.stdout).toContain('zod@4 works');
35
- expect(result.stdout).toContain('openai@7 works');
36
- });
37
-
38
- it('constructs the Composio client', () => {
39
- expect(result.stdout).toContain('@composio/core works');
40
- });
41
-
42
- it('wraps tools through both providers', () => {
43
- expect(result.stdout).toContain('core wrapTool works');
44
- expect(result.stdout).toContain('responses wrapTool works');
45
- });
46
-
47
- it('runs without network access', () => {
48
- expect(result.stdout).toContain('All packages work together!');
49
- });
50
- });
51
- },
52
-});
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.mjs
deleted
-45
@@ -1,45 +0,0 @@
1
-import { z } from 'zod';
2
-import OpenAI from 'openai';
3
-import { Composio, OpenAIProvider } from '@composio/core';
4
-import { OpenAIResponsesProvider } from '@composio/openai';
5
-
6
-const schema = z.object({ name: z.string() });
7
-schema.parse({ name: 'OpenAI 7' });
8
-console.log('zod@4 works');
9
-
10
-const openai = new OpenAI({ apiKey: 'test-key' });
11
-if (!openai.responses) {
12
- throw new Error('OpenAI client does not expose the Responses API');
13
-}
14
-console.log('openai@7 works');
15
-
16
-const chatProvider = new OpenAIProvider();
17
-const composio = new Composio({
18
- provider: chatProvider,
19
- apiKey: 'test-key',
20
-});
21
-if (!composio) {
22
- throw new Error('Composio client construction failed');
23
-}
24
-console.log('@composio/core works');
25
-
26
-const composioTool = {
27
- slug: 'TEST',
28
- description: 'Test tool',
29
- inputParameters: { type: 'object', properties: {} },
30
-};
31
-
32
-const chatTool = chatProvider.wrapTool(composioTool);
33
-if (chatTool.type !== 'function' || chatTool.function.name !== 'TEST') {
34
- throw new Error('Core OpenAI provider returned an invalid tool');
35
-}
36
-console.log('core wrapTool works');
37
-
38
-const responsesProvider = new OpenAIResponsesProvider();
39
-const responsesTool = responsesProvider.wrapTool(composioTool);
40
-if (responsesTool.type !== 'function' || responsesTool.name !== 'TEST') {
41
- throw new Error('Responses provider returned an invalid tool');
42
-}
43
-console.log('responses wrapTool works');
44
-
45
-console.log('All packages work together!');
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/index.ts
deleted
-31
@@ -1,31 +0,0 @@
1
-import OpenAI from 'openai';
2
-import { OpenAIProvider, type Tool } from '@composio/core';
3
-import { OpenAIResponsesProvider } from '@composio/openai';
4
-
5
-const composioTool = {
6
- slug: 'TEST_TOOL',
7
- name: 'Test Tool',
8
- description: 'A tool used by the OpenAI compatibility fixture',
9
- version: '20260625_00',
10
- availableVersions: ['20260625_00'],
11
- inputParameters: {
12
- type: 'object',
13
- properties: {
14
- query: { type: 'string' },
15
- },
16
- required: ['query'],
17
- },
18
- tags: [],
19
-} satisfies Tool;
20
-
21
-const chatProvider = new OpenAIProvider();
22
-const chatTool = chatProvider.wrapTool(composioTool);
23
-const _openAIChatTool: OpenAI.ChatCompletionTool = chatTool;
24
-
25
-const responsesProvider = new OpenAIResponsesProvider();
26
-const responsesTool = responsesProvider.wrapTool(composioTool);
27
-const _openAIResponsesTool: OpenAI.Responses.FunctionTool = responsesTool;
28
-
29
-type ProviderToolCall = Parameters<OpenAIResponsesProvider['executeToolCall']>[1];
30
-declare const openAIToolCall: OpenAI.Responses.ResponseFunctionToolCall;
31
-const _providerToolCall: ProviderToolCall = openAIToolCall;
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/package.json
deleted
-13
@@ -1,13 +0,0 @@
1
-{
2
- "private": true,
3
- "type": "module",
4
- "scripts": {
5
- "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",
6
- "typecheck": "tsc --noEmit && echo openai v7 compatibility typecheck passed"
7
- },
8
- "dependencies": {
9
- "openai": "7.2.0",
10
- "typescript": "5.8.3",
11
- "zod": "4.4.3"
12
- }
13
-}
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/fixtures/tsconfig.json
deleted
-12
@@ -1,12 +0,0 @@
1
-{
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "target": "es2022",
5
- "module": "nodenext",
6
- "moduleResolution": "nodenext",
7
- "strict": true,
8
- "skipLibCheck": false,
9
- "noEmit": true
10
- },
11
- "include": ["index.ts"]
12
-}
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/package.json
deleted
-16
@@ -1,16 +0,0 @@
1
-{
2
- "name": "@e2e-tests/node-openai-v7-zod4-compat",
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:node": "bun test e2e.test.ts"
10
- },
11
- "devDependencies": {
12
- "@composio/core": "workspace:*",
13
- "@composio/openai": "workspace:*",
14
- "@e2e-tests/utils": "workspace:*"
15
- }
16
-}
ts/e2e-tests/runtimes/node/openai-v7-zod4-compat/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/node/openai-zod4-compat/README.md
+6
-6
@@ -1,7 +1,7 @@
1
-# OpenAI v6 + Zod v4 Compatibility Test
1
+# OpenAI v7 + Zod v4 Compatibility Test
2
3
Verifies that packed `@composio/core` and `@composio/openai` packages work with
4
-`openai@6` and `zod@4`.
4
+`openai@7` and `zod@4`.
5
6
## Background
7
@@ -11,8 +11,8 @@ Issue [#2336](https://github.com/ComposioHQ/composio/issues/2336) reported peer
11
12
| Test | Description |
13
| ------------------- | --------------------------------------------------------- |
14
-| npm install | Installs packed Composio packages with OpenAI 6 and Zod 4 |
15
-| TypeScript | Checks exported provider types against OpenAI 6 |
14
+| npm install | Installs packed Composio packages with OpenAI 7 and Zod 4 |
15
+| TypeScript | Checks exported provider types against OpenAI 7 |
16
| Package integration | Verifies all packages work together without conflicts |
17
| wrapTool | Confirms both OpenAI provider surfaces wrap tools |
18
@@ -22,12 +22,12 @@ Issue [#2336](https://github.com/ComposioHQ/composio/issues/2336) reported peer
22
fixtures/
23
├── index.mjs # Offline runtime assertions
24
├── index.ts # Exported-type compatibility checks
25
-├── package.json # Explicit OpenAI 6 and Zod 4 dependencies
25
+├── package.json # Explicit OpenAI 7 and Zod 4 dependencies
26
└── tsconfig.json # Strict consumer compiler settings
27
```
28
29
The setup phase packs both Composio packages, installs them with explicit
30
-OpenAI 6 and Zod 4 versions, and typechecks without `skipLibCheck`.
30
+OpenAI 7 and Zod 4 versions, and typechecks without `skipLibCheck`.
31
32
## Setup
33
ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts
+6
-6
@@ -1,8 +1,8 @@
1
/**
2
- * OpenAI v6 + Zod v4 compatibility e2e test
2
+ * OpenAI v7 + Zod v4 compatibility e2e test
3
*
4
* Verifies that packed @composio/core and @composio/openai packages install,
5
- * typecheck, and run with openai@6 and zod@4.
5
+ * typecheck, and run with openai@7 and zod@4.
6
*/
7
8
import { e2e, type E2ETestResultWithSetup } from '@e2e-tests/utils';
@@ -25,11 +25,11 @@ e2e(import.meta.url, {
25
describe('setup', () => {
26
it('installs and typechecks successfully', () => {
27
expect(result.setup.exitCode).toBe(0);
28
- expect(result.setup.stdout).toContain('openai v6 compatibility typecheck passed');
28
+ expect(result.setup.stdout).toContain('openai v7 compatibility typecheck passed');
29
});
30
});
31
32
- describe('OpenAI v6 + Zod v4 compatibility', () => {
32
+ describe('OpenAI v7 + Zod v4 compatibility', () => {
33
it('exits successfully', () => {
34
expect(result.exitCode).toBe(0);
35
});
@@ -38,8 +38,8 @@ e2e(import.meta.url, {
38
expect(result.stdout).toContain('zod@4 works');
39
});
40
41
- it('openai@6 works', () => {
42
- expect(result.stdout).toContain('openai@6 works');
41
+ it('openai@7 works', () => {
42
+ expect(result.stdout).toContain('openai@7 works');
43
});
44
45
it('@composio/core works', () => {
ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/index.mjs
+4
-3
@@ -1,5 +1,5 @@
1
/**
2
- * Simple test script to verify @composio/core works with openai@6 and zod@4
2
+ * Simple test script to verify @composio/core works with openai@7 and zod@4
3
*
4
* This test verifies that the packages can be imported and instantiated together
5
* without peer dependency conflicts. It doesn't make actual API calls.
@@ -13,14 +13,15 @@ import { OpenAIResponsesProvider } from '@composio/openai';
13
14
// Verify zod@4 works
15
const schema = z.object({ name: z.string() });
16
+schema.parse({ name: 'OpenAI 7' });
17
console.log('✅ zod@4 works');
18
18
-// Verify openai@6 works without making a network request.
19
+// Verify openai@7 works without making a network request.
20
const openai = new OpenAI({ apiKey: 'test-key' });
21
if (!openai.responses) {
22
throw new Error('OpenAI client does not expose the Responses API');
23
}
23
-console.log('✅ openai@6 works');
24
+console.log('✅ openai@7 works');
25
26
// Verify @composio/core works
27
const provider = new OpenAIProvider();
ts/e2e-tests/runtimes/node/openai-zod4-compat/fixtures/package.json
+4
-4
@@ -2,12 +2,12 @@
2
"private": true,
3
"type": "module",
4
"scripts": {
5
- "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",
6
- "typecheck": "tsc --noEmit && echo openai v6 compatibility typecheck passed"
5
+ "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",
6
+ "typecheck": "tsc --noEmit && echo openai v7 compatibility typecheck passed"
7
},
8
"dependencies": {
9
- "openai": "6.49.0",
10
- "typescript": "5.8.3",
9
+ "openai": "7.2.0",
10
+ "typescript": "7.0.2",
11
"zod": "4.4.3"
12
}
13
}