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, 18:30 UTC
fix(cli): require all explicit setup targets
Kshitij Jhunjhunwala committed
Jul 14, 2026 at 15:52 UTC
f09141455c9fe89b9bcc622c41b21a60392a684e
2 files changed
+30
ts/packages/cli/src/commands/setup.cmd.ts
+7
@@ -63,6 +63,13 @@ const setupBaseCmd = Command.make(
63
if (notDetected.length > 0) {
64
yield* ui.log.info(`${formatTargets(notDetected)} not detected.`);
65
}
66
+ if (target === 'all' && notDetected.length > 0) {
67
+ return yield* Effect.fail(
68
+ new Error(
69
+ `\`--target all\` requires Claude Code and Codex. Missing: ${formatTargets(notDetected)}. Install the missing agent host, or use \`--target auto\` to operate on detected hosts only.`
70
+ )
71
+ );
72
+ }
73
if (detected.length === 0) {
74
if (!ifPresent || target !== 'auto') {
75
return yield* Effect.fail(
ts/packages/cli/test/src/commands/setup.cmd.test.ts
+23
@@ -427,6 +427,29 @@ describe('CLI: composio setup', () => {
427
);
428
});
429
430
+ const partialAllTargets = makeFakeHosts({ claude: { available: true } });
431
+ layer(TestLive({ commandRunner: partialAllTargets.runner }))(
432
+ 'explicit all-host setup with a missing host',
433
+ it => {
434
+ it.scoped('fails before mutating the detected host', () =>
435
+ Effect.gen(function* () {
436
+ const exit = yield* Effect.exit(cli(['setup', '--target', 'all', '--yes']));
437
+
438
+ expect(Exit.isFailure(exit)).toBe(true);
439
+ expect(partialAllTargets.state.claude).toMatchObject({
440
+ marketplace: 'missing',
441
+ plugin: 'missing',
442
+ });
443
+ expect(
444
+ partialAllTargets.commands.some(parts =>
445
+ ['marketplace', 'install', 'enable'].some(operation => parts.includes(operation))
446
+ )
447
+ ).toBe(false);
448
+ })
449
+ );
450
+ }
451
+ );
452
+
453
const uninstallBoth = makeFakeHosts({
454
claude: { available: true, marketplace: 'canonical', plugin: 'enabled' },
455
codex: { available: true, marketplace: 'canonical', plugin: 'enabled' },