import { t as Guardrail } from '../../types-Ks98Z0E_.js'; import 'zod'; /** * Content Filter Guardrail * * Detects harmful content categories (AWS Bedrock pattern). */ interface ContentFilterConfig { /** Categories to filter */ categories?: ContentCategory[]; /** Custom blocked patterns (regex strings) */ blockedPatterns?: string[]; /** Threshold for detection (0-1, default 0.5) */ threshold?: number; /** Whether to trigger tripwire on detection */ tripwire?: boolean; } type ContentCategory = 'hate' | 'violence' | 'sexual' | 'self_harm' | 'dangerous' | 'illegal'; /** * Create a content filter guardrail. */ declare function createContentFilterGuardrail(config?: ContentFilterConfig): Guardrail; /** * PII Detection Guardrail * * Detects and optionally redacts personally identifiable information. * AWS Bedrock pattern. */ interface PIIConfig { /** PII types to detect */ types?: PIIType[]; /** Whether to redact (replace with placeholder) or just detect */ redact?: boolean; /** Custom redaction placeholder (default: [REDACTED]) */ placeholder?: string; /** Whether to trigger tripwire on detection */ tripwire?: boolean; } type PIIType = 'email' | 'phone' | 'ssn' | 'credit_card' | 'ip_address' | 'address' | 'name'; /** * Create a PII detection guardrail. */ declare function createPIIGuardrail(config?: PIIConfig): Guardrail; /** * Topic Control Guardrail * * Blocks forbidden topics and enforces on-topic responses. * AWS Bedrock pattern. */ interface TopicConfig { /** Forbidden topics (will block if detected) */ forbiddenTopics?: string[]; /** Allowed topics (will block if NOT detected — use for narrow scoping) */ allowedTopics?: string[]; /** Custom topic detection patterns */ patterns?: Record; /** Whether to trigger tripwire */ tripwire?: boolean; } /** * Create a topic control guardrail. */ declare function createTopicGuardrail(config: TopicConfig): Guardrail; /** * Token Budget Guardrail * * Enforces spending limits on agent inference calls. * Wraps existing edgework TokenBudgetManager. */ interface TokenBudgetGuardrailConfig { /** Max tokens per request */ maxTokensPerRequest?: number; /** Max tokens per session */ maxTokensPerSession?: number; /** Max cost per session (in abstract units) */ maxCostPerSession?: number; /** Whether to trigger tripwire when budget exceeded */ tripwire?: boolean; } interface BudgetState { tokensUsed: number; costUsed: number; requestCount: number; } /** * Create a token budget guardrail. */ declare function createTokenBudgetGuardrail(config: TokenBudgetGuardrailConfig): Guardrail & { getUsage: () => BudgetState; reset: () => void; }; /** * Rate Limit Guardrail * * Enforces requests-per-minute and tokens-per-minute limits. */ interface RateLimitConfig { /** Max requests per minute */ requestsPerMinute?: number; /** Max tokens per minute */ tokensPerMinute?: number; /** Window size in ms (default: 60000) */ windowMs?: number; /** Whether to trigger tripwire when exceeded */ tripwire?: boolean; } /** * Create a rate limit guardrail. */ declare function createRateLimitGuardrail(config: RateLimitConfig): Guardrail; export { type ContentCategory, type ContentFilterConfig, type PIIConfig, type PIIType, type RateLimitConfig, type TokenBudgetGuardrailConfig, type TopicConfig, createContentFilterGuardrail, createPIIGuardrail, createRateLimitGuardrail, createTokenBudgetGuardrail, createTopicGuardrail };