validateBehaviorContracts
validateBehaviorContracts(
params):void
Defined in: packages/pipeline/src/services/pipeline-contracts.ts:28
Validates the ordering rules and option contracts that behavior classes declare
through PIPELINE_BEHAVIOR_CONTRACT, appending a diagnostic per violation. Framework
adapters call it at bootstrap; createPipeline() calls it when a function is wrapped.
Parameters
Section titled “Parameters”params
Section titled “params”behaviorTypes
Section titled “behaviorTypes”Constructor<IPipelineBehavior<unknown, unknown>>[]
diagnostics
Section titled “diagnostics”globalBehaviorIds
Section titled “globalBehaviorIds”globalOptions
Section titled “globalOptions”Map<BehaviorId, Record<string, unknown>>
handlerBehaviorTypes?
Section titled “handlerBehaviorTypes?”Constructor<IPipelineBehavior<unknown, unknown>>[]
handlerName
Section titled “handlerName”string
handlerOptions?
Section titled “handlerOptions?”Map<BehaviorId, Record<string, unknown>>
handlerType
Section titled “handlerType”mergedOptions
Section titled “mergedOptions”Map<BehaviorId, Record<string, unknown>>
requestKind
Section titled “requestKind”"command" | "query" | "event"
resolvedBehaviors
Section titled “resolvedBehaviors”Map<number, IPipelineBehavior<unknown, unknown>>
Returns
Section titled “Returns”void
Example
Section titled “Example”const diagnostics: PipelineBehaviorDiagnostic[] = [];validateBehaviorContracts({ ...plan, handlerType, handlerName, requestKind, resolvedBehaviors, diagnostics });