import { GuardrailDefinition } from "../types.js"; //#region src/guardrails/builtins/max-length.d.ts /** * Options for `maxLength(...)`. * * @stable */ interface MaxLengthOptions { /** Hard ceiling on `value.length` (string char count). */ readonly chars?: number; /** Hard ceiling on the token count returned by `countTokens(...)`. */ readonly tokens?: number; /** Token-counter callback used when `tokens` is set. */ readonly countTokens?: (text: string) => number | Promise; /** Override the action (defaults to `'block'`). */ readonly action?: 'block' | 'warn'; /** Stage the guardrail applies to. Defaults to `'input'`. */ readonly stage?: 'input' | 'output'; /** Override the guardrail's `name` (useful when registering more than one). */ readonly name?: string; } /** * Construct a `maxLength` guardrail. Returns an input or output * variant depending on the `stage` option. * * @stable */ declare function maxLength(opts: MaxLengthOptions): GuardrailDefinition; //#endregion export { MaxLengthOptions, maxLength }; //# sourceMappingURL=max-length.d.ts.map