/** * Built-in guardrails + ordered runners (short-circuit on first block). * Input / output / tool phases are separate so the Runner can apply them at the right time. */ import type { GuardrailVerdict, InputGuardrail, OutputGuardrail, ToolContext, ToolGuardrail } from "../types"; export declare const noEmptyInput: InputGuardrail; export declare function maxInputLength(max: number): InputGuardrail; export declare const redactPII: OutputGuardrail; export declare function blockDangerousTools(names: string[]): ToolGuardrail; export declare function requireApproval(approve: (toolName: string, input: unknown, ctx: ToolContext) => Promise | boolean): ToolGuardrail; /** * Fail-closed ownership check for tools that touch an orderId. * Looks up orderId in `orders` and compares owner to ctx.context[userIdKey]. */ export declare function requireOrderOwnership(options: { /** orderId → owning userId */ orders: Record; /** Only enforce for these tool names (default: all tools that pass an orderId). */ toolNames?: string[]; orderIdField?: string; userIdKey?: string; }): ToolGuardrail; export interface GuardrailRunResult { verdict: GuardrailVerdict; triggeredBy?: string; content: string; } export declare function runInputGuardrails(guardrails: InputGuardrail[] | undefined, input: string): Promise; export declare function runOutputGuardrails(guardrails: OutputGuardrail[] | undefined, output: string): Promise; export declare function runToolGuardrails(guardrails: ToolGuardrail[] | undefined, toolName: string, input: unknown, ctx: ToolContext): Promise; //# sourceMappingURL=index.d.ts.map