ReadonlyclosedWhether the conversation has been closed.
ReadonlylastThe latest provider response id in the chain.
ReadonlytokenCumulative token usage across all turns.
Seal the conversation. Subsequent .turn calls throw.
Run one turn: execute the stage, thread previousResponseId
(from branchFrom or the last response id), and return the
result including the new response id.
Optionalopts: { branchFrom?: TResponseId; onComplete?: () => void }
The conversation object. Methods:
turn(stage, input, opts?)— run one turnclose()— seal the conversation (finalize calls this).turnafter.close()throwsConversationClosedError.