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

fix(cli): align auto-detect transpile behavior with explicit generate ts

The auto-detect path (composio generate) was hardcoding transpiled:false even when writing to node_modules, while composio generate ts would correctly transpile. Apply the same shouldCompile logic so both paths behave consistently.

jkomyno committed Mar 17, 2026 at 16:01 UTC c1ebaf365399e9a409ae3e9acfeaa638c768925a
1 file changed +6 -2
ts/packages/cli/src/commands/generate/generate.cmd.ts
+6 -2
@@ -1,5 +1,5 @@
1 import { Command, Options } from '@effect/cli';
2 -import { Effect, Match } from 'effect';
2 +import { Effect, Match, Option } from 'effect';
3 import { ProjectEnvironmentDetector } from 'src/services/project-environment-detector';
4 import { NodeProcess } from 'src/services/node-process';
5 import { TerminalUI } from 'src/services/terminal-ui';
@@ -58,12 +58,16 @@ export const generateCmd = Command.make('generate', { outputOpt, typeTools, tool
58 const displayLang = env.kind === 'js' ? 'TypeScript' : 'Python';
59 yield* ui.log.step(`Project type detected: ${displayLang}`);
60
61 + // Apply the same transpile default as `composio generate ts`:
62 + // transpile when writing to node_modules (no --output-dir)
63 + const shouldCompile = !Option.isSome(outputOpt);
64 +
65 yield* Match.value(env.kind).pipe(
66 Match.when('js', () =>
67 generateTypescriptTypeStubs({
68 outputOpt,
69 compact: false,
66 - transpiled: false,
70 + transpiled: shouldCompile,
71 typeTools,
72 toolkitsOpt,
73 })