CollectNode
Properties
Section titled “Properties”optional ask?: (missing, state) => string;Deterministic, framework-emitted question shown when fields are still missing. Collect extraction never speaks model-authored text, so this is the only user-facing copy a collect node produces. Must not claim any downstream outcome (order placed, delivery scheduled, payment, website).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”string
choices?
Section titled “choices?”optional choices?: ChoiceOption[];id: string;instructions?
Section titled “instructions?”optional instructions?: (missing, state) => Instructions;Extraction-only guidance for the (non-speaking) field extraction turn.
This text is NEVER shown to the user — see ask for user-facing copy.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”kind: "collect";maxTurns?
Section titled “maxTurns?”optional maxTurns?: number;onComplete
Section titled “onComplete”onComplete: (data, state) => | Transition| Promise<Transition>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”| Transition
| Promise<Transition>
required?
Section titled “required?”optional required?: string[];schema
Section titled “schema”schema: StandardSchemaV1;