@devries-cameron20 / composio-1 / commits / ca3b25d23
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): approve all setup mutations

Kshitij Jhunjhunwala committed Jul 14, 2026 at 16:01 UTC ca3b25d2386c4807879b92f0fc35bc3a3cb18ce9
2 files changed +11 -4
ts/packages/cli/src/commands/setup.cmd.ts
+5 -2
@@ -157,14 +157,17 @@ const setupBaseCmd = Command.make(
157 }
158
159 const pendingPlugins = pending.filter(status => !isSetupPluginReady(status));
160 - if (!yes && pendingPlugins.length > 0) {
160 + if (!yes) {
161 if (!isInteractiveTerminal()) {
162 return yield* Effect.fail(
163 new Error('Non-interactive setup requires `--yes` to approve local changes.')
164 );
165 }
166
167 - const prompt = `Install the Composio plugin for ${formatTargets(pendingPlugins.map(status => status.target))}?`;
167 + const prompt =
168 + pendingPlugins.length === pending.length
169 + ? `Install the Composio plugin for ${formatTargets(pendingPlugins.map(status => status.target))}?`
170 + : `Finish Composio setup for ${formatTargets(pending.map(status => status.target))}?`;
171 const confirmed = yield* ui.confirm(prompt, { defaultValue: true });
172 if (!confirmed) {
173 yield* ui.outro('Setup cancelled.');
ts/packages/cli/test/src/commands/setup.cmd.test.ts
+6 -2
@@ -283,9 +283,13 @@ describe('CLI: composio setup', () => {
283 setupSkillInstaller: staleSkillInstaller,
284 })
285 )('existing Claude plugin with stale skill', it => {
286 - it.scoped('repairs the skill silently without requiring plugin approval', () =>
286 + it.scoped('requires approval, then repairs the skill without extra output', () =>
287 Effect.gen(function* () {
288 - yield* cli(['setup', '--target', 'claude']);
288 + const withoutApproval = yield* Effect.exit(cli(['setup', '--target', 'claude']));
289 + expect(Exit.isFailure(withoutApproval)).toBe(true);
290 + expect(staleSkillRepaired).toBe(false);
291 +
292 + yield* cli(['setup', '--target', 'claude', '--yes']);
293
294 expect(staleSkillRepaired).toBe(true);
295 const output = (yield* MockConsole.getLines()).join('\n');