Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/security / / MaxLengthOptions
Interface: MaxLengthOptions
Defined in: packages/security/src/guardrails/builtins/max-length.ts:26
Options for maxLength(...).
Stable
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
action? | readonly | "block" | "warn" | Override the action (defaults to 'block'). | packages/security/src/guardrails/builtins/max-length.ts:34 |
chars? | readonly | number | Hard ceiling on value.length (string char count). | packages/security/src/guardrails/builtins/max-length.ts:28 |
countTokens? | readonly | (text) => number | Promise<number> | Token-counter callback used when tokens is set. | packages/security/src/guardrails/builtins/max-length.ts:32 |
name? | readonly | string | Override the guardrail's name (useful when registering more than one). | packages/security/src/guardrails/builtins/max-length.ts:38 |
stage? | readonly | "input" | "output" | Stage the guardrail applies to. Defaults to 'input'. | packages/security/src/guardrails/builtins/max-length.ts:36 |
tokens? | readonly | number | Hard ceiling on the token count returned by countTokens(...). | packages/security/src/guardrails/builtins/max-length.ts:30 |