The id of the conversation it belongs to.
How a failed turn failed ({ type, code, message }); null otherwise.
The turn's id, which is also the id of its call in the call log (call).
Its inputs, by name, as they were recorded (a copy).
A merge: the program that made it (its rating goes there).
The model that answered (or, before the end, the one it was asked to use).
Every output by name (result, reasoning, …), once it is done; {} before.
The id of the turn it continues (null for a conversation's first turn).
A merge: the turns it was made from.
The requestId it was sent with: the same id sent again is this turn, not a new one.
The answer (as the program's code returned it); null until done.
Where it is: running, waiting (for a person's answer), interrupted (its process stopped), done, failed, stopped, abandoned.
Tools that started and have no result: the process stopped while they
ran, so they may have run. Before the turn goes on, say what each
returned (resume({ results: { [invocation]: output } })) or run it
again (resume({ rerun: [invocation] })): a tool is never run again on
its own.
Tokens, summed over every model call inside it.
The tool calls it waits for a person to approve; [] when none. Answer with approve() or deny().
End a turn that waits or was interrupted, without going on: abandoned.
Say yes to an approval it waits for (turn.waiting[0], its invocation
number, or nothing for the only one). When nothing else waits, the turn
goes on here (resume: false: later, turn.resume()); resolves to its answer.
Optionalapproval: number | Approval | nullThe calls inside it, as its kept log says: { call, parent, function, invocation, ended } each, in the order they started.
Say no: the model is told the person did not allow it (and why).
Optionalapproval: number | Approval | nullOptionalreason: string | nullIts events from its store (the kept form, or a view made from it:
view: "outside"), after the event named by after: those kept so far,
then each as it is kept, until its last. What another process, a page
after a reload, reads.
The ids of the calls of program inside it (to rate one: rate((await turn.find(fn))[0], "right")).
The turn as its records say now.
Go on with a turn that waits (every approval answered) or was
interrupted (its process stopped), in this process: its program runs
again with the same inputs and earlier turns, each model reply and each
tool result it kept are reused, and it goes on from where it stopped.
Resolves to its answer (or rejects with Waiting again).
The earlier turns this turn was shown, in order.
Stop it wherever it runs: it ends stopped within a second.
The calls inside it, as an indented tree.
Wait until it is no longer running; resolves to it as it is then.
One turn of a conversation, as its records said when it was read:
id(alsocall: the id of its call in the call log),parent,inputs,outputs,result(the answer),state(running,waiting,interrupted,done,failed,stopped,abandoned),model,error,waiting(the approvals it waits for),unfinished(tools that may have run when it stopped),usage.refresh()reads it again.