@devries-cameron20 / composio Mirror · read-only
Fork 0

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, 03:37 UTC

next
ts 26 lines 706 Bytes
Raw
1 /**
2 * LLM guardrails — appended to .md responses by getLLMText().
3 *
4 * Pages opt into a guardrail set via frontmatter:
5 * llmGuardrails: "direct-execution" | "none"
6 *
7 * No frontmatter (default) → session guardrails.
8 */
9
10 import { SESSION_GUARDRAILS } from './session';
11 import { DIRECT_EXECUTION_GUARDRAILS } from './direct-execution';
12
13 type GuardrailType = 'direct-execution' | 'none' | undefined;
14
15 export function getGuardrails(type: GuardrailType): string {
16 switch (type) {
17 case 'direct-execution':
18 return DIRECT_EXECUTION_GUARDRAILS;
19 case 'none':
20 return '';
21 default:
22 return SESSION_GUARDRAILS;
23 }
24 }
25
26 export { SESSION_GUARDRAILS, DIRECT_EXECUTION_GUARDRAILS };