Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(cli): approve all setup mutations
Kshitij Jhunjhunwalaca3b25d2386c
diff --git a/ts/packages/cli/src/commands/setup.cmd.ts b/ts/packages/cli/src/commands/setup.cmd.tsindex 82084e7d0..6d9f898ec 100644--- a/ts/packages/cli/src/commands/setup.cmd.ts+++ b/ts/packages/cli/src/commands/setup.cmd.ts@@ -157,14 +157,17 @@ const setupBaseCmd = Command.make(}const pendingPlugins = pending.filter(status => !isSetupPluginReady(status));- if (!yes && pendingPlugins.length > 0) {+ if (!yes) {if (!isInteractiveTerminal()) {return yield* Effect.fail(new Error('Non-interactive setup requires `--yes` to approve local changes.'));}- const prompt = `Install the Composio plugin for ${formatTargets(pendingPlugins.map(status => status.target))}?`;+ const prompt =+ pendingPlugins.length === pending.length+ ? `Install the Composio plugin for ${formatTargets(pendingPlugins.map(status => status.target))}?`+ : `Finish Composio setup for ${formatTargets(pending.map(status => status.target))}?`;const confirmed = yield* ui.confirm(prompt, { defaultValue: true });if (!confirmed) {yield* ui.outro('Setup cancelled.');diff --git a/ts/packages/cli/test/src/commands/setup.cmd.test.ts b/ts/packages/cli/test/src/commands/setup.cmd.test.tsindex cce61e702..58424dc90 100644--- a/ts/packages/cli/test/src/commands/setup.cmd.test.ts+++ b/ts/packages/cli/test/src/commands/setup.cmd.test.ts@@ -283,9 +283,13 @@ describe('CLI: composio setup', () => {setupSkillInstaller: staleSkillInstaller,}))('existing Claude plugin with stale skill', it => {- it.scoped('repairs the skill silently without requiring plugin approval', () =>+ it.scoped('requires approval, then repairs the skill without extra output', () =>Effect.gen(function* () {- yield* cli(['setup', '--target', 'claude']);+ const withoutApproval = yield* Effect.exit(cli(['setup', '--target', 'claude']));+ expect(Exit.isFailure(withoutApproval)).toBe(true);+ expect(staleSkillRepaired).toBe(false);++ yield* cli(['setup', '--target', 'claude', '--yes']);expect(staleSkillRepaired).toBe(true);const output = (yield* MockConsole.getLines()).join('\n');