Skip to content
2 min read · 423 words

@nhtio/adk/batteries/validation/types ​

Declarative contracts for validating the ordering of ADK conversation primitives.

Interfaces ​

InterfaceDescription
AdjacencyRuleRequires a first-kind primitive to be immediately followed by a permitted primitive.
AlternationRuleRequires a strict sequence of conversation roles.
BlockingOrderingViolationA violation that is structurally eligible for repair or rejection.
IdentifierFormatRuleRequires a ToolCall's identifier to satisfy a provider's format constraints.
IdentifierUniquenessRuleRequires uniqueness of identifiers across the selected primitive timeline.
NonEmptyTurnRuleRequires a turn to carry something the provider can interpret.
OrderingAdvisoryViolationA non-blocking informational advisory violation.
OrderingGuardOptionsConfiguration for an ordering guard middleware.
OrderingGuardResultResult retained by the guard after evaluating or repairing a dispatch.
OrderingProfileA named collection of ordering rules for a model or hosting layer.
OrderingRepairOne safe mutation applied while repairing a blocking violation.
OrderingRepairFailurePlain-data description of a repair that could not be materialised.
OrderingStashedTimelineEntryThe 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.
OrderingTimelineEntryOne time-ordered timeline entry merging Message, Thought, and ToolCall values.
OrderRuleRelative order required between two primitive kinds.
PreservationRuleRequires historical primitive content to remain present and/or stable.
RequiredMetadataRuleRequires provider-specific metadata on selected primitives.
RoleRemapRuleDescribes a required provider wire-role mapping for a primitive.
SchemaIntegrityRuleRequires a declared tool's input schema to be internally satisfiable.
StaleContentAdvisoryRuleRecords vendor-recommended stale-content hygiene without ever creating a blocking violation.
ToolIdentityRuleRequires a replayed tool result to name a tool the request actually declares.

Type Aliases ​

Type AliasDescription
BlockingOrderingRuleTypeThe rule types that are permitted to feed the nack/throw path.
OrderingPrimitiveKindPrimitive categories that can appear in an ordering timeline.
OrderingRuleEvery declarative ordering rule supported by the validation battery.
OrderingViolationAny reported ordering issue, whether blocking or informational.