Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

chore(json-schema-to-effect-schema): type the corpus loaders against Node 24

jkomyno2e2e71f2b188
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 882bcc782..ee2696f31 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -185,7 +185,7 @@ importers:
version: 7.8.5
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.1
@@ -708,7 +708,7 @@ importers:
version: 2.13.0(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected]))
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
- version: 1.30.0(@cfworker/[email protected])([email protected])
dotenv:
specifier: 'catalog:'
version: 17.4.2
@@ -860,7 +860,7 @@ importers:
version: link:../../packages/providers/vercel
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
- version: 1.30.0(@cfworker/[email protected])([email protected])
ai:
specifier: 'catalog:'
version: 7.0.48([email protected])
@@ -913,7 +913,7 @@ importers:
version: link:../../packages/providers/openai-agents
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
- version: 1.30.0(@cfworker/[email protected])([email protected])
'@openai/agents':
specifier: ^0.14.1
@@ -1114,7 +1114,7 @@ importers:
version: link:../../packages/providers/vercel
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
- version: 1.30.0(@cfworker/[email protected])([email protected])
ai:
specifier: 'catalog:'
version: 7.0.48([email protected])
@@ -1197,7 +1197,7 @@ importers:
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
- version: 1.30.0(@cfworker/[email protected])([email protected])
'@zed-industries/claude-code-acp':
specifier: ^0.16.2
version: 0.16.2(@cfworker/[email protected])([email protected])
@@ -1294,7 +1294,7 @@ importers:
version: 3.2.0
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.1
@@ -1318,7 +1318,7 @@ importers:
version: 3.22.1
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1333,7 +1333,7 @@ importers:
version: link:../core
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
- version: 1.30.0(@cfworker/[email protected])([email protected])
extract-zip:
specifier: ^2.0.1
version: 2.0.1([email protected])
@@ -1349,7 +1349,7 @@ importers:
version: 1.6.0
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1395,7 +1395,7 @@ importers:
version: 7.7.1
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.1
@@ -1432,7 +1432,7 @@ importers:
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.1
@@ -1455,15 +1455,18 @@ importers:
'@composio/json-schema-to-zod':
specifier: workspace:*
version: link:../json-schema-to-zod
+ '@types/node':
+ specifier: ^24.13.3
+ version: 24.13.3
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
vitest:
specifier: 'catalog:'
zod:
specifier: 'catalog:'
version: 4.4.3
@@ -1478,7 +1481,7 @@ importers:
version: 26.1.2
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1508,7 +1511,7 @@ importers:
version: 6.0.235([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1530,7 +1533,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1549,7 +1552,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1568,7 +1571,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1583,7 +1586,7 @@ importers:
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1605,7 +1608,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1627,7 +1630,7 @@ importers:
version: 6.0.235([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1648,7 +1651,7 @@ importers:
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1666,7 +1669,7 @@ importers:
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1687,7 +1690,7 @@ importers:
version: 7.0.48([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1749,7 +1752,7 @@ importers:
version: link:@types/@babel/helper-validator-identifier
tsdown:
specifier: 'catalog:'
vitest:
specifier: 'catalog:'
@@ -3934,9 +3937,6 @@ packages:
resolution: {integrity: sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==}
- '@types/[email protected]':
- resolution: {integrity: sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==}
-
resolution: {integrity: sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==}
@@ -7109,7 +7109,7 @@ snapshots:
dependencies:
'@anthropic-ai/sdk': 0.115.0([email protected])
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
zod: 4.4.3
optionalDependencies:
'@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.220
@@ -7874,7 +7874,7 @@ snapshots:
protobufjs: 7.6.5
ws: 8.21.1
optionalDependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -7887,7 +7887,7 @@ snapshots:
protobufjs: 7.6.5
ws: 8.21.1
optionalDependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -8216,7 +8216,7 @@ snapshots:
optionalDependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
hono: 4.13.0
zod: 4.4.3
@@ -8487,7 +8487,7 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.1.0
express: 5.2.1
- express-rate-limit: 8.6.0([email protected])
+ express-rate-limit: 8.6.0([email protected])([email protected])
hono: 4.12.31
jose: 6.2.4
json-schema-typed: 8.0.2
@@ -8511,7 +8511,7 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.1.0
express: 5.2.1
- express-rate-limit: 8.6.0([email protected])
+ express-rate-limit: 8.6.0([email protected])([email protected])
hono: 4.13.0
jose: 6.2.4
json-schema-typed: 8.0.2
@@ -8535,7 +8535,7 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.1.0
express: 5.2.1
- express-rate-limit: 8.6.0([email protected])
+ express-rate-limit: 8.6.0([email protected])([email protected])
hono: 4.13.0
jose: 6.2.4
json-schema-typed: 8.0.2
@@ -8548,7 +8548,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])':
dependencies:
'@hono/node-server': 2.0.11([email protected])
ajv: 8.20.0
@@ -8559,7 +8559,7 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.1.0
express: 5.2.1
- express-rate-limit: 8.6.0([email protected])
+ express-rate-limit: 8.6.0([email protected])([email protected])
hono: 4.13.0
jose: 6.2.4
json-schema-typed: 8.0.2
@@ -9213,10 +9213,6 @@ snapshots:
dependencies:
undici-types: 7.18.2
- '@types/[email protected]':
- dependencies:
- undici-types: 8.3.0
-
dependencies:
undici-types: 8.3.0
@@ -9229,11 +9225,11 @@ snapshots:
dependencies:
- '@types/node': 26.1.1
+ '@types/node': 26.1.2
dependencies:
- '@types/node': 26.1.1
+ '@types/node': 26.1.2
optional: true
'@typescript/[email protected]':
@@ -9311,6 +9307,14 @@ snapshots:
chai: 6.2.2
tinyrainbow: 3.1.0
+ dependencies:
+ '@vitest/spy': 4.1.10
+ estree-walker: 3.0.3
+ magic-string: 0.30.21
+ optionalDependencies:
+
dependencies:
'@vitest/spy': 4.1.10
@@ -9346,7 +9350,7 @@ snapshots:
sirv: 3.0.2
tinyglobby: 0.2.17
tinyrainbow: 3.1.0
'@vitest/[email protected]':
dependencies:
@@ -9983,7 +9987,7 @@ snapshots:
dependencies:
debug: 4.4.3([email protected])
express: 5.2.1
@@ -11289,7 +11293,7 @@ snapshots:
'@protobufjs/path': 1.1.2
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.2
- '@types/node': 26.1.1
+ '@types/node': 26.1.2
long: 5.3.2
@@ -11782,7 +11786,7 @@ snapshots:
'@ts-morph/common': 0.29.0
code-block-writer: 13.0.3
dependencies:
ansis: 4.3.1
cac: 7.0.0
@@ -11811,7 +11815,7 @@ snapshots:
- oxc-resolver
- vue-tsc
dependencies:
ansis: 4.3.1
cac: 7.0.0
@@ -12007,6 +12011,21 @@ snapshots:
'@types/unist': 3.0.3
vfile-message: 4.0.3
+ dependencies:
+ esbuild: 0.28.1
+ fdir: 6.5.0([email protected])
+ picomatch: 4.0.5
+ postcss: 8.5.22
+ rollup: 4.62.2
+ tinyglobby: 0.2.17
+ optionalDependencies:
+ '@types/node': 24.13.3
+ fsevents: 2.3.3
+ jiti: 2.7.0
+ tsx: 4.23.1
+ yaml: 2.9.0
+
dependencies:
esbuild: 0.28.1
@@ -12051,6 +12070,35 @@ snapshots:
transitivePeerDependencies:
- msw
+ dependencies:
+ '@vitest/expect': 4.1.10
+ '@vitest/pretty-format': 4.1.10
+ '@vitest/runner': 4.1.10
+ '@vitest/snapshot': 4.1.10
+ '@vitest/spy': 4.1.10
+ '@vitest/utils': 4.1.10
+ es-module-lexer: 2.3.1
+ expect-type: 1.4.0
+ magic-string: 0.30.21
+ obug: 2.1.4
+ pathe: 2.0.3
+ picomatch: 4.0.5
+ std-env: 4.2.0
+ tinybench: 2.9.0
+ tinyexec: 1.2.4
+ tinyglobby: 0.2.17
+ tinyrainbow: 3.1.0
+ why-is-node-running: 2.3.0
+ optionalDependencies:
+ '@opentelemetry/api': 1.9.1
+ '@types/node': 24.13.3
+ '@vitest/ui': 4.1.10([email protected])
+ transitivePeerDependencies:
+ - msw
+
dependencies:
'@vitest/expect': 4.1.10
diff --git a/ts/packages/cli/test/fixtures/corpus.ts b/ts/packages/cli/test/fixtures/corpus.ts
index 2dfbe552d..ecf4eea0b 100644
--- a/ts/packages/cli/test/fixtures/corpus.ts
+++ b/ts/packages/cli/test/fixtures/corpus.ts
@@ -7,9 +7,11 @@
* convention as the webhook fixtures. Every consumer resolves its own copy
* module-relatively — no working-directory or repository-root assumptions.
*/
+import { readFileSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
import * as z from 'zod';
-import objectCases from '../../../core/test/fixtures/json-schema-conversion/object-cases.json';
+const CORPUS_PATH = '../../../core/test/fixtures/json-schema-conversion/object-cases.json';
const JsonObject = z.record(z.string(), z.unknown());
@@ -73,7 +75,8 @@ let cached: ReadonlyArray<CorpusCase> | undefined;
/** Decode the shared corpus and enforce its cross-language invariants. */
export const loadObjectCases = (): ReadonlyArray<CorpusCase> => {
if (!cached) {
- const { cases } = Corpus.parse(objectCases);
+ const raw = readFileSync(fileURLToPath(new URL(CORPUS_PATH, import.meta.url)), 'utf8');
+ const { cases } = Corpus.parse(JSON.parse(raw));
assertCorpusInvariants(cases);
cached = cases;
}
diff --git a/ts/packages/core/test/fixtures/json-schema-conversion/corpus.ts b/ts/packages/core/test/fixtures/json-schema-conversion/corpus.ts
index dbc368701..08a29786e 100644
--- a/ts/packages/core/test/fixtures/json-schema-conversion/corpus.ts
+++ b/ts/packages/core/test/fixtures/json-schema-conversion/corpus.ts
@@ -7,9 +7,11 @@
* convention as the webhook fixtures. Every consumer resolves its own copy
* module-relatively — no working-directory or repository-root assumptions.
*/
+import { readFileSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
import * as z from 'zod';
-import objectCases from './object-cases.json';
+const CORPUS_PATH = './object-cases.json';
const JsonObject = z.record(z.string(), z.unknown());
@@ -73,7 +75,8 @@ let cached: ReadonlyArray<CorpusCase> | undefined;
/** Decode the shared corpus and enforce its cross-language invariants. */
export const loadObjectCases = (): ReadonlyArray<CorpusCase> => {
if (!cached) {
- const { cases } = Corpus.parse(objectCases);
+ const raw = readFileSync(fileURLToPath(new URL(CORPUS_PATH, import.meta.url)), 'utf8');
+ const { cases } = Corpus.parse(JSON.parse(raw));
assertCorpusInvariants(cases);
cached = cases;
}
diff --git a/ts/packages/json-schema-to-effect-schema/package.json b/ts/packages/json-schema-to-effect-schema/package.json
index e375a4d81..e36ea1e1f 100644
--- a/ts/packages/json-schema-to-effect-schema/package.json
+++ b/ts/packages/json-schema-to-effect-schema/package.json
@@ -35,6 +35,7 @@
},
"devDependencies": {
"@composio/json-schema-to-zod": "workspace:*",
+ "@types/node": "^24.13.3",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:",
diff --git a/ts/packages/json-schema-to-effect-schema/test/fixtures/corpus.ts b/ts/packages/json-schema-to-effect-schema/test/fixtures/corpus.ts
index 2dfbe552d..ecf4eea0b 100644
--- a/ts/packages/json-schema-to-effect-schema/test/fixtures/corpus.ts
+++ b/ts/packages/json-schema-to-effect-schema/test/fixtures/corpus.ts
@@ -7,9 +7,11 @@
* convention as the webhook fixtures. Every consumer resolves its own copy
* module-relatively — no working-directory or repository-root assumptions.
*/
+import { readFileSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
import * as z from 'zod';
-import objectCases from '../../../core/test/fixtures/json-schema-conversion/object-cases.json';
+const CORPUS_PATH = '../../../core/test/fixtures/json-schema-conversion/object-cases.json';
const JsonObject = z.record(z.string(), z.unknown());
@@ -73,7 +75,8 @@ let cached: ReadonlyArray<CorpusCase> | undefined;
/** Decode the shared corpus and enforce its cross-language invariants. */
export const loadObjectCases = (): ReadonlyArray<CorpusCase> => {
if (!cached) {
- const { cases } = Corpus.parse(objectCases);
+ const raw = readFileSync(fileURLToPath(new URL(CORPUS_PATH, import.meta.url)), 'utf8');
+ const { cases } = Corpus.parse(JSON.parse(raw));
assertCorpusInvariants(cases);
cached = cases;
}
diff --git a/ts/packages/json-schema-to-effect-schema/tsconfig.test.json b/ts/packages/json-schema-to-effect-schema/tsconfig.test.json
index 972d895b7..4203000be 100644
--- a/ts/packages/json-schema-to-effect-schema/tsconfig.test.json
+++ b/ts/packages/json-schema-to-effect-schema/tsconfig.test.json
@@ -2,7 +2,9 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.options.json",
"compilerOptions": {
- "rootDir": "."
+ "rootDir": ".",
+ // the corpus loader reads its fixture copy with `node:fs`
+ "types": ["node"]
},
"include": ["src/**/*", "test/**/*", "package.json"],
"exclude": ["node_modules", "../../../node_modules", "**/dist"]
diff --git a/ts/packages/json-schema-to-zod/test/fixtures/corpus.ts b/ts/packages/json-schema-to-zod/test/fixtures/corpus.ts
index 2dfbe552d..ecf4eea0b 100644
--- a/ts/packages/json-schema-to-zod/test/fixtures/corpus.ts
+++ b/ts/packages/json-schema-to-zod/test/fixtures/corpus.ts
@@ -7,9 +7,11 @@
* convention as the webhook fixtures. Every consumer resolves its own copy
* module-relatively — no working-directory or repository-root assumptions.
*/
+import { readFileSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
import * as z from 'zod';
-import objectCases from '../../../core/test/fixtures/json-schema-conversion/object-cases.json';
+const CORPUS_PATH = '../../../core/test/fixtures/json-schema-conversion/object-cases.json';
const JsonObject = z.record(z.string(), z.unknown());
@@ -73,7 +75,8 @@ let cached: ReadonlyArray<CorpusCase> | undefined;
/** Decode the shared corpus and enforce its cross-language invariants. */
export const loadObjectCases = (): ReadonlyArray<CorpusCase> => {
if (!cached) {
- const { cases } = Corpus.parse(objectCases);
+ const raw = readFileSync(fileURLToPath(new URL(CORPUS_PATH, import.meta.url)), 'utf8');
+ const { cases } = Corpus.parse(JSON.parse(raw));
assertCorpusInvariants(cases);
cached = cases;
}
diff --git a/ts/packages/json-schema-to-zod/tsconfig.test.json b/ts/packages/json-schema-to-zod/tsconfig.test.json
index 083ef2e4d..0abb043b6 100644
--- a/ts/packages/json-schema-to-zod/tsconfig.test.json
+++ b/ts/packages/json-schema-to-zod/tsconfig.test.json
@@ -2,7 +2,9 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.options.json",
"compilerOptions": {
- "rootDir": "."
+ "rootDir": ".",
+ // the corpus loader reads its fixture copy with `node:fs`
+ "types": ["node"]
},
"include": ["src/**/*", "test/**/*", "package.json"],
"exclude": ["node_modules", "../../../node_modules", "**/dist", "test/e2e", "test-sandboxes"]