/** * Bento Policy Engine * * Cloud-based policy engine using Bento Guard SDK * Provides AI intent scoring, escalation, and strike system * * Optional integration - only used if API key is provided * * Note: @bentoguard/sdk is an optional dependency. * Install with: npm install @bentoguard/sdk */ import type { PolicyDecision, PolicyContext } from './local-policy-engine.js'; type BentoModuleLoader = () => Promise; /** * @name setBentoModuleLoaderForTests * @description Overrides the Bento SDK loader for deterministic integration tests. * @param loader - Test-controlled module loader. * @returns Cleanup function that restores the previous loader. */ export declare function setBentoModuleLoaderForTests(loader: BentoModuleLoader): () => void; export interface BentoConfig { /** Bento API key from dashboard */ apiKey: string; /** Agent ID registered on Bento dashboard */ agentId: string; /** Bento API endpoint (optional, defaults to production) */ endpoint?: string; } export declare class BentoPolicyEngine { private client; private config; private protectFn; private initialized; constructor(config: BentoConfig); /** * Initialize Bento SDK lazily (ESM compatible) */ private initialize; /** * Validate action using Bento's AI-powered policy engine */ validateAction(context: PolicyContext): Promise; /** * Map Bento verdict to our PolicyDecision format */ private mapVerdictToDecision; /** * Get agent status from Bento */ getAgentStatus(): Promise<{ active: boolean; strikeCount: number; reputation: number; }>; /** * Check if Bento is available (ping test) */ isAvailable(): Promise; } /** * Error thrown when Bento service is unavailable */ export declare class BentoUnavailableError extends Error { constructor(message: string); } /** * Create Bento config from environment variables */ export declare function createBentoConfigFromEnv(): BentoConfig | null; export {}; //# sourceMappingURL=bento-policy-engine.d.ts.map