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, 17:15 UTC
feat(cli): rewrite installer for POSIX shell (#4015)
This PR: - builds on top of [#4011](https://github.com/ComposioHQ/composio/pull/4011) ([Glen review](https://app.tryglen.com/review/ComposioHQ/composio/4011)) and implements Stage 2 of the mise-style installer rollout - rewrites the base installer for POSIX `sh`, install-only defaults, verified complete bundles, and a `~/.local/bin/composio` entry point - adds explicit bash, zsh, and fish setup routes with compatibility fallback for older CLI releases, enforced byte-identical except for the shell each hardcodes in `requested_shell()` (drift guard in the installer test harness) - posts a sticky PR comment with copy-paste preview install commands once the hermetic install E2E suite passes (`preview-comment` job). The run-time release resolution means any branch's checked-in scripts are complete working installers - updates install workflows, release guidance, public docs, generated LLM guidance, CODEOWNERS, and the installer changelog - adds hermetic bash/zsh Docker coverage, corrupt-archive rejection, upgrade symlink regression coverage, and PR/nightly install E2E CI - simplifies internals after a review pass: dedupes the curl `--proto` selection in `install.sh`, merges the duplicated install verification CI steps, removes the `execPath` test bypass around the `NodeProcess` service, and threads the Docker image platform through the E2E harness instead of re-inspecting per test ## Verification - `shellcheck -s sh install.sh install/*.sh` - `bash test/install-sh-release-resolution.test.sh` (runs under `sh` and `dash`, includes the shell-variant drift guard) - `pnpm turbo typecheck --filter=@composio/cli --filter=@e2e-tests/utils --filter=@e2e-tests/cli-install` - `pnpm vitest run` from `ts/packages/cli` (full suite, 1094 tests) - `pnpm run test:release-workflow` and `pnpm run validate:boundaries` - Docker install E2E (bash + zsh hermetic legs) runs on this PR via `cli.install-e2e.yml` - Docs: typecheck, lint, link lint, static tests, and production build ## Stacked follow-up - #4042 (`feat/installer-auto-shell-default`) targets this branch and flips the default to automatic shell setup (`COMPOSIO_INSTALL_SHELL=auto`, with `none` as the install-only opt-out). It merges into this PR after its own review; checks and review then rerun on the combined head before this PR moves to `next`. - #4042's head now also carries the full stack-review remediation (2026-08-04): the #4016 atomic-replacement port (support files first, release metadata next, binary last; atomic `composio upgrade`), legacy three-line managed-block migration in both reconcilers, a safe tested uninstall snippet, mandatory checksum verification for official release downloads, and the scheduled prod E2E moved to the base `/install` route with `COMPOSIO_INSTALL_SHELL` (the variant routes are still unprovisioned). See #4042's "Review remediation" section for details; #4016 is superseded by that merge. - Rollback order for the combined rollout is copy-first: restore the previous dashboard/docs copy, then revert installer behavior if needed. The old copy remains compatible with the new installer; the new promise is not compatible with the old install-only default. ## Merge gates - [ ] #4011 is merged and its stable CLI release handoff is verified. - [ ] The live `next` ruleset requires code-owner review. It currently requires one approval but reports `require_code_owner_review: false`. Note: the Cloudflare routes `/install/bash`, `/install/zsh`, and `/install/fish` remain unprovisioned (404) and are deliberately undocumented until live checks return the expected scripts. They are no longer a merge prerequisite; the release-asset/repo `install/*.sh` variants cover explicit-shell installs. ## Next steps - Render `install.sh` at release time with the version and per-target checksums baked in (mise's `install.envsubst` + `render-install.sh` model), sign the rendered script, and serve it from our own routes. This removes run-time GitHub API release resolution (rate limits and missing-asset races) from the user install path. - If the shell variants ever grow real per-shell logic, generate them from a single template at build time (mise's `shell.envsubst` model). Until then, the drift guard enforces lockstep. No changeset: the standalone CLI is excluded from Changesets, and the remaining changes are installer, docs, tests, and CI. ## Review follow-up - `cbb5f5a70` fixes unset `SHELL`, rejects `:` in compatibility fallback paths, and makes signal traps terminate after cleanup. `test/install-sh-release-resolution.test.sh` covers all three regressions under `sh` and `dash`. - `3d4c3b6cd` bounds the uninstall filter to the legacy install-dir export and exactly one installer-owned `PATH` line. Legacy POSIX, current POSIX, fish, unrelated `PATH`, and completions fixtures pass. - Focused verification: `pnpm test:install-sh`, `shellcheck -s sh install.sh install/*.sh`, `bash -n test/install-sh-release-resolution.test.sh`, and `bun test docs/tests/static/content.test.ts`.
No changes.