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, 04:45 UTC
fix(core): allow explicit `RemoteFile.save()` paths without a home directory (#5288)
This PR: - closes https://github.com/ComposioHQ/composio/issues/5272 - lets `RemoteFile.save(path)` write to an explicit path when the home directory cannot be resolved, e.g. an arbitrary-UID container with `HOME` unset - keeps the default destination unchanged: it still requires a home directory, validates the server-provided filename before any download or write, writes exclusively, and numbers collisions - matches the Python SDK, which only reads `Path.home()` when no path is given - builds on the fix by @shenmuegit (commit a1f24e876, kept with original authorship), who could not open the PR because PR creation is restricted to collaborators; the follow-up commit keeps the validated default filename instead of recomputing it and adds `@composio/slim` to the changeset ## Verification - New explicit-path test failed on `next` (`Cannot determine save location: home directory is not available`) and passes with the fix; a second test pins that a default save without a home still rejects before fetching or writing - `RemoteFile.test.ts`: 40 passed; full `@composio/core` suite: 2018 passed, 2 expected failures - `pnpm --filter @composio/core typecheck`, oxlint, prettier, and `SDK_RELEASE_NOTE_BASE=origin/next pnpm validate:changesets` pass --------- Co-authored-by: meolord <shenmuegm@gmail.com>