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, 08:30 UTC
refactor(cli): move `upgrade` into the directory shape (#4976)
This PR: - moves `upgrade.cmd.ts` to `upgrade/upgrade.{cmd,handler}.ts`. The command file keeps `--beta`/`-b`, the optional `version` argument, and the description; `runUpgrade` and `normalizeReleaseTag` move to the handler unchanged - leaves `UpgradeBinary`, `run-companion-modules.ts`, and the legacy companion placeholders that CLIs 0.2.12 to 0.4.2 check for untouched, so the contract with installed binaries does not move - adds `upgrade.cmd.test.ts`, which runs argv against an `UpgradeBinary` double: the `prerelease`/`tag` table, the skill tag fallback (new release, then requested tag, then running version), and an upgrade failure that installs no skill - adds `upgrade.handler.test.ts` with the `normalizeReleaseTag` table - removes `upgrade.cmd.ts` from `COMMAND_TEST_EXEMPTIONS` (15 to 14) Part of U9 of the CLI command-layout series. No user-visible change, so no CHANGELOG entry. Verified locally on the branch tip: | Check | Result | | --- | --- | | `pnpm --filter @composio/cli typecheck` | passes | | `pnpm --filter @composio/cli test` (skills, boundaries, command tests, Vitest) | 162 files, 1916 passed, 1 skipped | | `validate:command-tests` | 14 exemptions (was 15) | | `lint:effect` | 0 diagnostics | | `oxlint`, prettier on touched files | clean | | Binary smoke | `upgrade --help`, `upgrade --bogus`, root `--help`: identical to an `origin/next` (231122de1) binary. A local `upgrade` with `DEBUG_OVERRIDE_UPGRADE_TARGET` and a release-shaped source directory (live companions plus empty legacy placeholders) exits 0 and replaces the executable inode, as the `origin/next` binary does | The Docker upgrade E2E (`ts/e2e-tests/cli/upgrade`) was not run locally.