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(cli): trim unused Effect packages and unify version output (#4358)

Alberto Schiabeld4077ba41541
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8a4297e45..e90fb6772 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -42,9 +42,6 @@ catalogs:
'@effect/platform-bun':
specifier: ^0.91.2
version: 0.91.2
- '@effect/platform-node-shared':
- specifier: ^0.61.1
- version: 0.61.1
'@effect/vitest':
specifier: ^0.30.0
version: 0.30.0
@@ -187,7 +184,7 @@ importers:
version: 7.8.5
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.12
@@ -719,7 +716,7 @@ importers:
version: 2.18.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
@@ -871,7 +868,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.79([email protected])
@@ -924,7 +921,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.17.0
@@ -1125,7 +1122,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.79([email protected])
@@ -1203,12 +1200,9 @@ importers:
'@effect/platform-bun':
specifier: 'catalog:'
- '@effect/platform-node-shared':
- specifier: 'catalog:'
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
+ version: 1.30.0(@cfworker/[email protected])([email protected])
'@zed-industries/claude-code-acp':
specifier: ^0.16.2
@@ -1261,39 +1255,15 @@ importers:
specifier: 'catalog:'
version: 4.4.3
devDependencies:
- '@effect/cluster':
- specifier: ^0.60.2
- '@effect/experimental':
- specifier: ^0.61.1
'@effect/language-service':
specifier: 'catalog:'
version: 0.87.2
'@effect/platform':
specifier: 'catalog:'
version: 0.97.1([email protected])
- '@effect/printer':
- specifier: ^0.51.0
- '@effect/printer-ansi':
- specifier: ^0.51.0
- '@effect/rpc':
- specifier: ^0.76.2
- '@effect/sql':
- specifier: ^0.52.1
- '@effect/typeclass':
- specifier: ^0.41.0
- version: 0.41.0([email protected])
'@effect/vitest':
specifier: 'catalog:'
- '@effect/workflow':
- specifier: ^0.19.1
'@types/bun':
specifier: 'catalog:'
version: 1.4.0
@@ -1305,7 +1275,7 @@ importers:
version: 3.2.0
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.12
@@ -1329,7 +1299,7 @@ importers:
version: 3.22.1
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1344,7 +1314,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])
@@ -1360,7 +1330,7 @@ importers:
version: 1.7.0
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1409,7 +1379,7 @@ importers:
version: 7.8.0
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.12
@@ -1446,7 +1416,7 @@ importers:
tsdown:
specifier: 'catalog:'
tsx:
specifier: 'catalog:'
version: 4.23.12
@@ -1471,7 +1441,7 @@ importers:
version: link:../json-schema-to-zod
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1505,7 +1475,7 @@ importers:
version: 4.9.0
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1535,7 +1505,7 @@ importers:
version: 6.0.266([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1557,10 +1527,10 @@ importers:
version: link:../../core
'@modelcontextprotocol/sdk':
specifier: 'catalog:'
+ version: 1.30.0(@cfworker/[email protected])([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1579,7 +1549,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1598,7 +1568,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1613,7 +1583,7 @@ importers:
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1635,7 +1605,7 @@ importers:
version: link:../../core
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1657,7 +1627,7 @@ importers:
version: 6.0.266([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1678,7 +1648,7 @@ importers:
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1696,7 +1666,7 @@ importers:
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1717,7 +1687,7 @@ importers:
version: 7.0.79([email protected])
tsdown:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 7.0.2
@@ -1782,7 +1752,7 @@ importers:
version: link:@types/@babel/helper-validator-identifier
tsdown:
specifier: 'catalog:'
vitest:
specifier: 'catalog:'
@@ -7259,7 +7229,7 @@ snapshots:
dependencies:
'@anthropic-ai/sdk': 0.120.0([email protected])
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
zod: 4.4.3
optionalDependencies:
'@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.245
@@ -8045,7 +8015,7 @@ snapshots:
protobufjs: 7.6.5
ws: 8.21.3
optionalDependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -8058,7 +8028,7 @@ snapshots:
protobufjs: 7.6.5
ws: 8.21.3
optionalDependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -8316,7 +8286,7 @@ snapshots:
dependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
debug: 4.4.3([email protected])
zod: 4.4.3
optionalDependencies:
@@ -8392,7 +8362,7 @@ snapshots:
optionalDependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
hono: 4.13.4
zod: 4.4.3
@@ -8550,7 +8520,7 @@ snapshots:
'@isaacs/ttlcache': 2.1.5
'@lukeed/uuid': 2.0.1
'@mastra/schema-compat': 1.3.4([email protected])
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
'@sindresorhus/slugify': 2.2.1
'@standard-schema/spec': 1.1.0
ajv: 8.20.0
@@ -8611,7 +8581,7 @@ snapshots:
'@modelcontextprotocol/core': 2.0.0
'@modelcontextprotocol/ext-apps': 1.7.5(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected]))([email protected])
'@modelcontextprotocol/node': 2.0.0(@modelcontextprotocol/[email protected])([email protected])
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
'@modelcontextprotocol/server': 2.0.0
'@modelcontextprotocol/server-legacy': 2.0.0([email protected])
exit-hook: 5.1.0
@@ -8669,7 +8639,7 @@ snapshots:
'@modelcontextprotocol/[email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected]))([email protected])':
dependencies:
- '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
'@standard-schema/spec': 1.1.0
zod: 4.4.3
@@ -8704,7 +8674,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])':
dependencies:
'@hono/node-server': 2.1.1([email protected])
ajv: 8.20.0
@@ -8715,20 +8685,20 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.1.1
express: 5.2.1
- express-rate-limit: 8.6.2([email protected])([email protected])
+ express-rate-limit: 8.6.2([email protected])
hono: 4.13.4
jose: 6.2.9
json-schema-typed: 8.0.2
pkce-challenge: 5.0.1
raw-body: 3.0.2
- zod: 4.4.3
- zod-to-json-schema: 3.25.2([email protected])
+ zod: 3.25.76
+ zod-to-json-schema: 3.25.2([email protected])
optionalDependencies:
'@cfworker/json-schema': 4.1.1
transitivePeerDependencies:
- supports-color
- '@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])':
+ '@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])':
dependencies:
'@hono/node-server': 2.1.1([email protected])
ajv: 8.20.0
@@ -8739,14 +8709,14 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.1.1
express: 5.2.1
- express-rate-limit: 8.6.2([email protected])([email protected])
+ express-rate-limit: 8.6.2([email protected])
hono: 4.13.4
jose: 6.2.9
json-schema-typed: 8.0.2
pkce-challenge: 5.0.1
raw-body: 3.0.2
- zod: 3.25.76
- zod-to-json-schema: 3.25.2([email protected])
+ zod: 4.4.3
+ zod-to-json-schema: 3.25.2([email protected])
optionalDependencies:
'@cfworker/json-schema': 4.1.1
transitivePeerDependencies:
@@ -8757,7 +8727,7 @@ snapshots:
'@modelcontextprotocol/core': 2.0.0
content-type: 1.0.5
cors: 2.8.6
- express-rate-limit: 8.6.2([email protected])([email protected])
+ express-rate-limit: 8.6.2([email protected])
pkce-challenge: 5.0.1
raw-body: 3.0.2
zod: 4.4.3
@@ -10202,7 +10172,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
debug: 4.4.3([email protected])
express: 5.2.1
@@ -11926,7 +11896,7 @@ snapshots:
'@ts-morph/common': 0.29.0
code-block-writer: 13.0.3
dependencies:
ansis: 4.3.1
cac: 7.0.0
@@ -11955,7 +11925,7 @@ snapshots:
- oxc-resolver
- vue-tsc
dependencies:
ansis: 4.3.1
cac: 7.0.0
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 301387cd8..19321d800 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -41,7 +41,6 @@ catalog:
'@effect/platform': ^0.97.1
'@effect/platform-bun': ^0.91.2
'@effect/platform-node': ^0.108.0
- '@effect/platform-node-shared': ^0.61.1
'@effect/vitest': ^0.30.0
# 1.52.1 is the latest version that keeps Node-only execa code out of
# Workers bundles.
diff --git a/ts/packages/cli/README.md b/ts/packages/cli/README.md
index 64aa532f2..4afba4658 100644
--- a/ts/packages/cli/README.md
+++ b/ts/packages/cli/README.md
@@ -26,7 +26,7 @@ composio [--log-level all|trace|debug|info|warning|error|fatal|none]
## 🧭 Commands
-- `composio version`: Display the current CLI version.
+- `composio version` (also `composio --version` or `-v`): Display the current CLI version.
- `composio whoami`: Show the currently logged-in user/account.
- `composio login [--no-browser] [--no-wait] [--key text] [--user-api-key text] [--org text] [-y, --yes] [--no-skill-install]`: Log in to the Composio CLI session.
- `composio logout`: Log out from the Composio CLI session.
diff --git a/ts/packages/cli/package.json b/ts/packages/cli/package.json
index 710b3976d..bb287c47d 100644
--- a/ts/packages/cli/package.json
+++ b/ts/packages/cli/package.json
@@ -52,17 +52,9 @@
"author": "Alberto Schiabel <[email protected]> (https://github.com/jkomyno)",
"license": "ISC",
"devDependencies": {
- "@effect/cluster": "^0.60.2",
- "@effect/experimental": "^0.61.1",
"@effect/language-service": "catalog:",
"@effect/platform": "catalog:",
- "@effect/printer": "^0.51.0",
- "@effect/printer-ansi": "^0.51.0",
- "@effect/rpc": "^0.76.2",
- "@effect/sql": "^0.52.1",
- "@effect/typeclass": "^0.41.0",
"@effect/vitest": "catalog:",
- "@effect/workflow": "^0.19.1",
"@types/bun": "catalog:",
"@types/semver": "^7.8.0",
"tempy": "^3.2.0",
@@ -84,7 +76,6 @@
"@composio/ts-builders": "workspace:*",
"@effect/cli": "catalog:",
"@effect/platform-bun": "catalog:",
- "@effect/platform-node-shared": "catalog:",
"@modelcontextprotocol/sdk": "catalog:",
"@zed-industries/claude-code-acp": "^0.16.2",
"@zed-industries/codex-acp": "^0.16.0",
diff --git a/ts/packages/cli/src/commands/index.ts b/ts/packages/cli/src/commands/index.ts
index 198802ba4..c498e73b1 100644
--- a/ts/packages/cli/src/commands/index.ts
+++ b/ts/packages/cli/src/commands/index.ts
@@ -251,12 +251,18 @@ export const parseExecuteInputHelpSlug = (argv: ReadonlyArray<string>): string |
return findSlug(Arr.drop(args, isRootExecute ? 1 : 2));
};
-const normalizeVersionShortFlag = (argv: ReadonlyArray<string>): ReadonlyArray<string> => {
- const args = argv.slice(2);
- if (args.length === 1 && args[0] === '-v') {
- return [...argv.slice(0, 2), '--version'];
- }
- return argv;
+const VERSION_FLAGS: ReadonlySet<string> = new Set(['--version', '-v']);
+
+/**
+ * `composio --version` and `composio -v` are spellings of the `version` command: the flag is
+ * rewritten before parsing so all three share one handler and print byte-identical output,
+ * independent of how the CLI framework renders its own built-in version flag.
+ */
+const normalizeVersionFlag = (argv: ReadonlyArray<string>): ReadonlyArray<string> => {
+ const [first, ...rest] = argv.slice(2);
+ return first !== undefined && VERSION_FLAGS.has(first)
+ ? [...argv.slice(0, 2), 'version', ...rest]
+ : argv;
};
const normalizeListenStreamFlag = (argv: ReadonlyArray<string>): ReadonlyArray<string> => {
@@ -532,7 +538,7 @@ export const runWithConfig = Effect.gen(function* () {
const { argv: argvWithoutDangerouslyAllow, dangerouslyAllow } =
normalizeDangerouslyAllowFlag(argv);
const { argv: normalizedArgv, overrides } = normalizeHiddenDebugFlags(
- normalizeListenStreamFlag(normalizeVersionShortFlag(argvWithoutDangerouslyAllow))
+ normalizeListenStreamFlag(normalizeVersionFlag(argvWithoutDangerouslyAllow))
);
return parseRootInstallSkillRequest(normalizedArgv).pipe(
diff --git a/ts/packages/cli/src/effects/with-log-level.ts b/ts/packages/cli/src/effects/with-log-level.ts
index 576be5d04..8c10fa480 100644
--- a/ts/packages/cli/src/effects/with-log-level.ts
+++ b/ts/packages/cli/src/effects/with-log-level.ts
@@ -2,13 +2,14 @@ import { Effect, Option, Logger, LogLevel, Layer } from 'effect';
import { APP_CONFIG } from 'src/effects/app-config';
/**
- * Sets the minimum log level for subsequent logging operation, preferring the given log level,
- * and falling back to the one read from the config.
+ * Sets the minimum log level for subsequent logging operations: the `--log-level` CLI flag
+ * wins when present, otherwise the level read from the config (`COMPOSIO_LOG_LEVEL`) applies,
+ * otherwise `Info`.
*/
export const setMinimumLogLevel = (logLevelFromCLI: Option.Option<LogLevel.LogLevel>) =>
APP_CONFIG['LOG_LEVEL'].pipe(
Effect.map(logLevelFromEnv => {
- return Option.zipLeft(logLevelFromCLI, logLevelFromEnv);
+ return Option.orElse(logLevelFromCLI, () => logLevelFromEnv);
}),
Effect.map(Option.getOrElse(() => LogLevel.Info)),
Effect.map(logLevel => Logger.minimumLogLevel(logLevel)),
diff --git a/ts/packages/cli/test/src/commands/$default.cmd.test.ts b/ts/packages/cli/test/src/commands/$default.cmd.test.ts
index 95114176e..37f7b9d6a 100644
--- a/ts/packages/cli/test/src/commands/$default.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/$default.cmd.test.ts
@@ -110,25 +110,19 @@ describe('CLI: composio', () => {
});
layer(TestLive())(it => {
- it.scoped("[Given] --version flag [Then] prints composio's version from package.json", () =>
+ it.scoped('[Given] --version or -v [Then] prints exactly what `composio version` prints', () =>
Effect.gen(function* () {
- const args = ['--version'];
- yield* cli(args);
- const lines = yield* MockConsole.getLines();
- const output = lines.join('\n');
- expect(output).toContain(pkg.version);
- })
- );
- });
-
- layer(TestLive())(it => {
- it.scoped("[Given] -v flag [Then] prints composio's version from package.json", () =>
- Effect.gen(function* () {
- const args = ['-v'];
- yield* cli(args);
- const lines = yield* MockConsole.getLines();
- const output = lines.join('\n');
- expect(output).toContain(pkg.version);
+ // Each spelling runs against a fresh console so the captured lines are comparable.
+ const linesFor = (args: ReadonlyArray<string>) =>
+ Effect.gen(function* () {
+ yield* cli(args);
+ return yield* MockConsole.getLines();
+ }).pipe(Effect.provide(TestLive()));
+
+ const expected = yield* linesFor(['version']);
+ expect(expected.join('\n')).toContain(pkg.version);
+ expect(yield* linesFor(['--version'])).toEqual(expected);
+ expect(yield* linesFor(['-v'])).toEqual(expected);
})
);
});
diff --git a/ts/packages/cli/test/src/effects/with-log-level.test.ts b/ts/packages/cli/test/src/effects/with-log-level.test.ts
new file mode 100644
index 000000000..fde2f9863
--- /dev/null
+++ b/ts/packages/cli/test/src/effects/with-log-level.test.ts
@@ -0,0 +1,47 @@
+import { describe, it } from '@effect/vitest';
+import { assertEquals } from '@effect/vitest/utils';
+import { ConfigProvider, Effect, FiberRef, LogLevel, Option } from 'effect';
+import { setMinimumLogLevel } from 'src/effects/with-log-level';
+import { extendConfigProvider } from 'src/services/config';
+
+const withEnv = (entries: ReadonlyArray<readonly [string, string]>) =>
+ Effect.withConfigProvider(extendConfigProvider(ConfigProvider.fromMap(new Map(entries))));
+
+const resolveMinimumLogLevel = (logLevelFromCLI: Option.Option<LogLevel.LogLevel>) =>
+ FiberRef.get(FiberRef.currentMinimumLogLevel).pipe(
+ Effect.provide(setMinimumLogLevel(logLevelFromCLI))
+ );
+
+describe('setMinimumLogLevel', () => {
+ it.effect('[When] neither the flag nor COMPOSIO_LOG_LEVEL is set, it defaults to Info', () =>
+ Effect.gen(function* () {
+ const level = yield* resolveMinimumLogLevel(Option.none()).pipe(withEnv([]));
+ assertEquals(level, LogLevel.Info);
+ })
+ );
+
+ it.effect('[When] only COMPOSIO_LOG_LEVEL is set, it applies', () =>
+ Effect.gen(function* () {
+ const level = yield* resolveMinimumLogLevel(Option.none()).pipe(
+ withEnv([['COMPOSIO_LOG_LEVEL', 'error']])
+ );
+ assertEquals(level, LogLevel.Error);
+ })
+ );
+
+ it.effect('[When] only --log-level is set, it applies', () =>
+ Effect.gen(function* () {
+ const level = yield* resolveMinimumLogLevel(Option.some(LogLevel.Debug)).pipe(withEnv([]));
+ assertEquals(level, LogLevel.Debug);
+ })
+ );
+
+ it.effect('[When] both are set, --log-level wins over COMPOSIO_LOG_LEVEL', () =>
+ Effect.gen(function* () {
+ const level = yield* resolveMinimumLogLevel(Option.some(LogLevel.Debug)).pipe(
+ withEnv([['COMPOSIO_LOG_LEVEL', 'error']])
+ );
+ assertEquals(level, LogLevel.Debug);
+ })
+ );
+});