Skip to content

threads.archive

Archives a thread; jobs says what happens to the runs its agent started (DMN-1075). Your own thread’s host ends once your turn does (DMN-1078).

/** `threads.archive` and `threads.delete` params (DMN-1075). */
export type ThreadCloseParams = {
/**
* Required while runs the thread's agent started, or its children (AGT-424), still run; otherwise `conflict`.
*/
jobs?: CloseJobs | null;
threadId: string;
};
/** No params, or the `{}` result. */
export type Empty = Record<string, never>;
/** What closing a thread does with the transient runs its agent started and its running children (DMN-1075, AGT-424). */
export type CloseJobs =
/** Kill them as `jobs.kill` does and stop the children with their own (`thread.stop` with `cascade`), then close the
* thread. */
| "kill"
/** Leave them running. */
| "keep";