@nhtio/adk/batteries/validation
Declarative ordering validation and pipeline guards.
Variables
| Variable | Description |
|---|---|
| ORDERING_GUARD_EFFECTIVE_TIMELINE_STASH_KEY | ctx.stash key under which the post-repair "effective timeline" (the in-memory, already-ordered copy repairViolations produced, with any inserted alternation fillers) is recorded for the current iteration, so repairs can be re-evaluated against it. |
| ORDERING_GUARD_RESULT_STASH_KEY | ctx.stash key under which the most recent OrderingGuardResult (repaired + unrepaired + advisories) is recorded, so a caller or a later pipeline stage can inspect exactly what this middleware did on the current iteration without parsing the nack error. |
| ORDERING_GUARD_SNAPSHOT_STASH_KEY | ctx.stash key under which the prior-iteration primitive snapshot is kept for @nhtio/adk!PreservationRule statefulness — see the plan's "Statefulness for PreservationRule" section. Exported (as ORDERING_GUARD_SNAPSHOT_STASH_KEY) so a caller can pass a custom options.snapshotStashKey without guessing the default's exact string. |
Functions
| Function | Description |
|---|---|
| orderingGuardDispatchMiddleware | Builds a @nhtio/adk!DispatchPipelineMiddlewareFn that validates (and, in 'mutate' mode, best-effort repairs) turn-state primitive ordering against options.profiles before every executor call. |
| orderingGuardTurnMiddleware | Builds a @nhtio/adk!TurnPipelineMiddlewareFn running the same ordering-guard core as orderingGuardDispatchMiddleware, once per turn before the first executor call. |
References
AdjacencyRule
Re-exports AdjacencyRule
AlternationRule
Re-exports AlternationRule
BlockingOrderingRuleType
Re-exports BlockingOrderingRuleType
BlockingOrderingViolation
Re-exports BlockingOrderingViolation
createOrderingViolationError
Re-exports createOrderingViolationError
E_INVALID_ORDERING_GUARD_OPTIONS
Re-exports E_INVALID_ORDERING_GUARD_OPTIONS
E_ORDERING_VIOLATION
Re-exports E_ORDERING_VIOLATION
E_UNKNOWN_ORDERING_PROFILE
Re-exports E_UNKNOWN_ORDERING_PROFILE
OrderingAdvisoryViolation
Re-exports OrderingAdvisoryViolation
OrderingGuardOptions
Re-exports OrderingGuardOptions
OrderingGuardResult
Re-exports OrderingGuardResult
OrderingPrimitiveKind
Re-exports OrderingPrimitiveKind
OrderingProfile
Re-exports OrderingProfile
OrderingRepair
Re-exports OrderingRepair
OrderingRule
Re-exports OrderingRule
OrderingTimelineEntry
Re-exports OrderingTimelineEntry
OrderingViolation
Re-exports OrderingViolation
OrderingViolationException
Re-exports OrderingViolationException
OrderRule
Re-exports OrderRule
PreservationRule
Re-exports PreservationRule
RequiredMetadataRule
Re-exports RequiredMetadataRule
RoleRemapRule
Re-exports RoleRemapRule
StaleContentAdvisoryRule
Re-exports StaleContentAdvisoryRule
validateOptions
Re-exports validateOptions