import type { ClientConfig, GuardOptions, RedactOptions, ScanOptions, GuardResponse, RedactResponse, ScanResponse } from "./types.js"; /** * Safety Agent Client * Provides guardrail methods for content safety */ export declare class SafetyClient { private apiKey; private fallbackOptions; constructor(config?: ClientConfig); /** * Post usage metrics to Superagent dashboard (fire and forget) */ private postUsage; /** * Guard a single chunk of text input (internal method) * @param input The input text to analyze * @param systemPrompt Optional custom system prompt * @param model The model to use * @returns Response with classification result and token usage */ private guardSingleText; /** * Guard an image input using vision model (internal method) * @param processed The processed image input * @param systemPrompt Optional custom system prompt * @param model The model to use (must support vision) * @returns Response with classification result and token usage */ private guardImage; /** * Guard method - Classifies input as pass/block * Supports text strings, URLs, and Blob/File inputs. * - Plain text: analyzed directly * - URLs starting with http(s)://: fetched and analyzed * - Blob/File: analyzed based on MIME type (images use vision models) * * For text inputs, automatically chunks large inputs and processes them in parallel. * Uses OR logic: blocks if ANY chunk is classified as "block". * @param options Guard options including input, model, and optional additional instructions * @returns Response with classification result and token usage */ guard(options: GuardOptions): Promise; /** * Redact method - Sanitizes sensitive/dangerous content * @param options Redact options including input, model, and optional entities to redact * @returns Response with redacted text, findings, and token usage */ redact(options: RedactOptions): Promise; /** * Scan method - Scans a repository for AI agent-targeted attacks * * This method clones a repository into a Modal sandbox, runs OpenCode * with a security-focused prompt to detect threats like repo poisoning, * prompt injections, and malicious instructions. * * @param options Scan options including repo URL, branch, and model * @returns Response with classification, findings, and summary * * @example * ```typescript * const result = await client.scan({ * repo: "https://github.com/user/repo", * branch: "main", * }); * * console.log(report); * ``` */ scan(options: ScanOptions): Promise; /** * Run a security scan in a Daytona sandbox */ private callDaytonaScan; /** * Parse OpenCode JSON output into structured response */ private parseOpenCodeOutput; } /** * Create a new Safety Agent client * @param config Optional client configuration * @returns SafetyClient instance */ export declare function createClient(config?: ClientConfig): SafetyClient; //# sourceMappingURL=client.d.ts.map