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, 04:45 UTC
| 1 | import { Data, Runtime } from 'effect'; |
| 2 | |
| 3 | export type SetupFailureReasonCode = |
| 4 | | 'all_requires_both_hosts' |
| 5 | | 'unsupported_host' |
| 6 | | 'target_not_installed' |
| 7 | | 'no_host_detected' |
| 8 | | 'non_interactive_requires_yes' |
| 9 | | 'marketplace_conflict' |
| 10 | | 'unknown'; |
| 11 | |
| 12 | /** |
| 13 | * Why `composio setup` failed. The `setup` command renders it, with its outro, before failing, so |
| 14 | * the runtime prints nothing more (`[Runtime.errorReported]` is false) and exits 1. |
| 15 | */ |
| 16 | export class SetupCommandError extends Data.TaggedError('services/SetupCommandError')<{ |
| 17 | readonly message: string; |
| 18 | readonly operation: 'setup' | 'uninstall'; |
| 19 | readonly reasonCode: SetupFailureReasonCode; |
| 20 | readonly cause?: unknown; |
| 21 | }> { |
| 22 | get [Runtime.errorReported]() { |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | get [Runtime.errorExitCode]() { |
| 27 | return 1; |
| 28 | } |
| 29 | } |