471
472
type SetupOperation = 'setup' | 'uninstall';
473
474
+// Remediation commands must stay usable from the non-interactive shells
475
+// agents run in (the plugin hint's primary audience), so they always carry
476
+// --yes; interactive users can drop it.
477
const setupCommand = (adapter: SetupTargetAdapter, operation: SetupOperation): string =>
475
- `composio setup${operation === 'uninstall' ? ' --uninstall' : ''} --target ${adapter.target}`;
478
+ `composio setup${operation === 'uninstall' ? ' --uninstall' : ''} --yes --target ${adapter.target}`;
479
480
const recoveryHint = (adapter: SetupTargetAdapter, operation: SetupOperation): string =>
481
`Run \`${setupCommand(adapter, operation)}\` again. If the problem persists, run \`${hostUpdateCommand(adapter)}\` and retry.`;
664
return new SetupCommandError({
665
operation: 'setup',
666
reasonCode: 'target_not_installed',
664
- message: `${adapter.executable} is not installed or not available on PATH. Install it and rerun \`composio setup --target ${adapter.target}\`.`,
667
+ message: `${adapter.executable} is not installed or not available on PATH. Install it and rerun \`composio setup --yes --target ${adapter.target}\`.`,
668
});
669
}
670
if (initial.marketplace_conflict) {
671
return new SetupCommandError({
672
operation: 'setup',
673
reasonCode: 'marketplace_conflict',
671
- message: `The ${adapter.target} marketplace named "composio" points to a different source. Run \`${adapter.marketplaceRemoveCommand}\`, then rerun \`composio setup --target ${adapter.target}\`.`,
674
+ message: `The ${adapter.target} marketplace named "composio" points to a different source. Run \`${adapter.marketplaceRemoveCommand}\`, then rerun \`composio setup --yes --target ${adapter.target}\`.`,
675
});
676
}
677
return Effect.void;
730
return yield* setupProcessError({
731
adapter,
732
stage: 'verify',
730
- message: `Setup commands completed, but ${adapter.target} did not report the Composio plugin and CLI skill as ready. Rerun \`composio setup --target ${adapter.target}\` or inspect the native ${adapter.target} plugin configuration.`,
733
+ message: `Setup commands completed, but ${adapter.target} did not report the Composio plugin and CLI skill as ready. Rerun \`${setupCommand(adapter, 'setup')}\` or inspect the native ${adapter.target} plugin configuration.`,
734
});
735
}
736
770
return yield* setupProcessError({
771
adapter,
772
stage: 'verify',
770
- message: `Uninstall commands completed, but ${adapter.target} still reports the Composio plugin as installed. Rerun \`composio setup --uninstall --target ${adapter.target}\` or inspect the native ${adapter.target} plugin configuration.`,
773
+ message: `Uninstall commands completed, but ${adapter.target} still reports the Composio plugin as installed. Rerun \`${setupCommand(adapter, 'uninstall')}\` or inspect the native ${adapter.target} plugin configuration.`,
774
});
775
}
776