/** * Prompt Injection Detection guardrail for detecting when tool calls or tool outputs * contain malicious instructions that are not aligned with the user's intent. * * This module provides a focused guardrail for detecting when LLM actions (tool calls, * tool call outputs) are not aligned with the user's goal. It parses conversation * history directly from OpenAI API calls, eliminating the need for external conversation tracking. * * The prompt injection detection check runs as both a preflight and output guardrail, checking only * tool_calls and tool_call_outputs, not user messages or assistant generated text. */ import { z } from 'zod'; import { type CheckFn, type GuardrailLLMContextWithHistory } from '../types'; /** * Configuration schema for the prompt injection detection guardrail. * * Extends the base LLM configuration with prompt injection detection-specific parameters. */ export declare const PromptInjectionDetectionConfig: z.ZodObject<{ model: z.ZodString; confidence_threshold: z.ZodDefault; include_reasoning: z.ZodDefault; max_turns: z.ZodDefault; }, z.core.$strip>; export type PromptInjectionDetectionConfig = z.infer; /** * Context requirements for the prompt injection detection guardrail. * * Uses the extended context interface with conversation history methods. */ export type PromptInjectionDetectionContext = GuardrailLLMContextWithHistory; /** * Base output schema for prompt injection detection (without reasoning fields). */ export declare const PromptInjectionDetectionBaseOutput: z.ZodObject<{ flagged: z.ZodBoolean; confidence: z.ZodNumber; }, z.core.$strip>; export type PromptInjectionDetectionBaseOutput = z.infer; /** * Full output schema for prompt injection detection analysis (with reasoning fields). * * Extends the base LLM output with prompt injection detection-specific details. */ export declare const PromptInjectionDetectionOutput: z.ZodObject<{ flagged: z.ZodBoolean; confidence: z.ZodNumber; observation: z.ZodString; evidence: z.ZodNullable; }, z.core.$strip>; export type PromptInjectionDetectionOutput = z.infer; /** * Prompt injection detection check for function calls, outputs, and responses. */ export declare const promptInjectionDetectionCheck: CheckFn; //# sourceMappingURL=prompt_injection_detection.d.ts.map