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.

fix: remove `--active` flag from `uv run ...` and add dump generated types into `composio/generated`

angrybaybladee9eac7fe34d5
diff --git a/ts/packages/cli/src/commands/py/commands/py.generate.cmd.ts b/ts/packages/cli/src/commands/py/commands/py.generate.cmd.ts
index 89f0c66f4..2217d244d 100644
--- a/ts/packages/cli/src/commands/py/commands/py.generate.cmd.ts
+++ b/ts/packages/cli/src/commands/py/commands/py.generate.cmd.ts
@@ -86,7 +86,7 @@ export function generatePythonTypeStubs({ outputOpt }: GetCmdParams<typeof _pyCm
yield* Option.isNone(outputOpt)
? Console.log(
'✅ Type stubs generated successfully.\n' +
- 'You can now import generated types via `from composio.<toolkit_name> import <TOOLKIT_NAME>`.\n'
+ 'You can now import generated types via `from composio.generated.<toolkit_name> import <TOOLKIT_NAME>`.\n'
)
: Console.log(
`✅ Type stubs generated successfully.\n` +
diff --git a/ts/packages/cli/src/effects/find-composio-core-generated.ts b/ts/packages/cli/src/effects/find-composio-core-generated.ts
index 1e7e1c2a1..2d69eec4d 100644
--- a/ts/packages/cli/src/effects/find-composio-core-generated.ts
+++ b/ts/packages/cli/src/effects/find-composio-core-generated.ts
@@ -5,6 +5,7 @@ import {
JsPackageManagerDetector,
type PackageManager,
} from 'src/services/js-package-manager-detector';
+import type { PlatformError } from '@effect/platform/Error';
export class ComposioCorePkgNotFound extends Data.TaggedError('error/ComposioCorePkgNotFound')<{
readonly message: string;
@@ -48,7 +49,6 @@ export function pyFindComposioCoreGenerated(cwd: string) {
const [cmd, ...args] = [
'uv',
'run',
- '--active',
'python',
'-c',
'import composio; print(composio.__file__)',
@@ -61,11 +61,14 @@ export function pyFindComposioCoreGenerated(cwd: string) {
yield* Effect.logDebug({ stdout, cmd: [cmd, ...args].join(' ') });
- const composioCorePath = path.dirname(stdout);
+ const composioCorePath = `${path.dirname(stdout)}/generated`;
yield* Effect.logDebug({ composioCorePath });
+ const fs = yield* FileSystem.FileSystem;
+ yield* fs.makeDirectory(composioCorePath, { recursive: true });
+
return composioCorePath;
- }) satisfies Effect.Effect<string, ComposioCorePkgNotFound, unknown>;
+ }) satisfies Effect.Effect<string, ComposioCorePkgNotFound | PlatformError, unknown>;
}
/**
diff --git a/ts/packages/cli/test/__fixtures__/python-project-with-composio-core/setup.sh b/ts/packages/cli/test/__fixtures__/python-project-with-composio-core/setup.sh
index cd0776a53..08e0bea5f 100755
--- a/ts/packages/cli/test/__fixtures__/python-project-with-composio-core/setup.sh
+++ b/ts/packages/cli/test/__fixtures__/python-project-with-composio-core/setup.sh
@@ -8,6 +8,6 @@ uv venv
source .venv/bin/activate
uv pip install --requirements requirements.txt;
-uv run --active python -c "import composio; print (composio.__file__)"
+uv run python -c "import composio; print (composio.__file__)"
# deactivate