Shared question and answer normalization for interviewer adapters.
This module keeps console, queue, callback, recording, and HTTP interviewers on the
same wire format so wait.human behavior stays consistent across transports.
Summary
Functions
Builds a structured answer payload including matched options.
Extracts the answer field from common structured answer payload shapes.
Returns the preferred input mode for the normalized question.
Extracts a displayable message from an interviewer payload.
Returns whether a node is configured for multi-select input.
Normalizes a single choice map into the shared interviewer shape.
Normalizes an answer for multi-select questions.
Normalizes an answer for single-select questions.
Normalizes arbitrary answer values into comparable tokens.
Parses console input, decoding JSON objects and arrays when present.
Builds the normalized question payload for a human-gate node.
Infers the interviewer question type from node metadata and choice shape.
Returns whether a human answer is required for the node.
Normalizes timeout values such as 30s, 5m, or 1d into milliseconds.
Functions
Builds a structured answer payload including matched options.
Extracts the answer field from common structured answer payload shapes.
Returns the preferred input mode for the normalized question.
Extracts a displayable message from an interviewer payload.
Returns whether a node is configured for multi-select input.
Normalizes a single choice map into the shared interviewer shape.
Normalizes an answer for multi-select questions.
Normalizes an answer for single-select questions.
Normalizes arbitrary answer values into comparable tokens.
Parses console input, decoding JSON objects and arrays when present.
Builds the normalized question payload for a human-gate node.
Infers the interviewer question type from node metadata and choice shape.
Returns whether a human answer is required for the node.
Normalizes timeout values such as 30s, 5m, or 1d into milliseconds.