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 type { Effect } from 'effect'; |
| 2 | import type { CommandIdentity } from 'src/invocation/command-identity'; |
| 3 | |
| 4 | /** |
| 5 | * What a hook knows about the invocation it runs for: the command `effect/cli` selected. A hook |
| 6 | * never reads argv; anything it needs to know about the command belongs in its `CommandMeta`. |
| 7 | */ |
| 8 | export interface HookInvocation { |
| 9 | readonly identity: CommandIdentity; |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * A hook the invocation (`src/invocation/invocation.ts`) runs once for the selected command, |
| 14 | * when the command begins and before any request it makes, unless the command's `CommandMeta` |
| 15 | * turns it off. Its output goes to stderr; it never fails the command. |
| 16 | */ |
| 17 | export interface InvocationHookShape { |
| 18 | readonly run: (invocation: HookInvocation) => Effect.Effect<void>; |
| 19 | } |