@nhtio/adk/batteries/validation/types
Declarative contracts for validating the ordering of ADK conversation primitives.
Interfaces
| Interface | Description |
|---|---|
| AdjacencyRule | Requires a first-kind primitive to be immediately followed by a permitted primitive. |
| AlternationRule | Requires a strict sequence of conversation roles. |
| BlockingOrderingViolation | A violation that is structurally eligible for repair or rejection. |
| IdentifierFormatRule | Requires a ToolCall's identifier to satisfy a provider's format constraints. |
| IdentifierUniquenessRule | Requires uniqueness of identifiers across the selected primitive timeline. |
| NonEmptyTurnRule | Requires a turn to carry something the provider can interpret. |
| OrderingAdvisoryViolation | A non-blocking informational advisory violation. |
| OrderingGuardOptions | Configuration for an ordering guard middleware. |
| OrderingGuardResult | Result retained by the guard after evaluating or repairing a dispatch. |
| OrderingProfile | A named collection of ordering rules for a model or hosting layer. |
| OrderingRepair | One safe mutation applied while repairing a blocking violation. |
| OrderingRepairFailure | Plain-data description of a repair that could not be materialised. |
| OrderingStashedTimelineEntry | The plain-object projection of a OrderingTimelineEntry.value stored under ORDERING_GUARD_EFFECTIVE_TIMELINE_STASH_KEY — ctx.stash klona-clones its entire store on every read, and klona's generic-object clone strategy calls new x.constructor() with zero args before copying properties, which throws for the real Message/Thought/ToolCall classes. Only id, payload, and replayCompatibility are preserved (the only fields any consumer of this stash key reads); it is never a live class instance. |
| OrderingTimelineEntry | One time-ordered timeline entry merging Message, Thought, and ToolCall values. |
| OrderRule | Relative order required between two primitive kinds. |
| PreservationRule | Requires historical primitive content to remain present and/or stable. |
| RequiredMetadataRule | Requires provider-specific metadata on selected primitives. |
| RoleRemapRule | Describes a required provider wire-role mapping for a primitive. |
| SchemaIntegrityRule | Requires a declared tool's input schema to be internally satisfiable. |
| StaleContentAdvisoryRule | Records vendor-recommended stale-content hygiene without ever creating a blocking violation. |
| ToolIdentityRule | Requires a replayed tool result to name a tool the request actually declares. |
Type Aliases
| Type Alias | Description |
|---|---|
| BlockingOrderingRuleType | The rule types that are permitted to feed the nack/throw path. |
| OrderingPrimitiveKind | Primitive categories that can appear in an ordering timeline. |
| OrderingRule | Every declarative ordering rule supported by the validation battery. |
| OrderingViolation | Any reported ordering issue, whether blocking or informational. |