Skip to content
1 min read · 221 words

Interface: RawTurnGate

Plain input object supplied to TurnGate at construction time.

Remarks

turnId and abortSignal are injected by the runner — callers constructing a gate via ctx.waitFor() never supply them directly.

abortSignal is AbortSignal (not AbortController) because the gate reacts to turn-level cancellation but cannot trigger it. The gate owns its own internal AbortController for gate.abort().

Properties

PropertyTypeDescription
abortSignal?AbortSignalThe turn's abort signal. When fired the gate self-rejects with @nhtio/adk!E_TURN_GATE_ABORTED.
createdAtstring | number | Date | DateTime<boolean>When this gate was created.
idstringStable unique identifier for this gate.
payloadunknownArbitrary data supplied to the gate opener; passed through to turnGateOpen listeners.
reasonstringHuman-readable label describing why this gate was opened (e.g. 'tool_approval').
schema?SchemaOptional validator schema for the resolution value. When present, resolve() validates before settling.
timeout?numberOptional timeout in milliseconds. When elapsed the gate self-rejects with @nhtio/adk!E_TURN_GATE_TIMEOUT.
turnIdstringThe ID of the turn that opened this gate.