// GENERATED CODE! DO NOT MODIFY BY HAND!

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { GitInfo } from "./GitInfo";
import type { SessionSource } from "./SessionSource";
import type { ThreadStatus } from "./ThreadStatus";
import type { Turn } from "./Turn";

export type Thread = { id: string, 
/**
 * Usually the first user message in the thread, if available.
 */
preview: string, 
/**
 * Whether the thread is ephemeral and should not be materialized on disk.
 */
ephemeral: boolean, 
/**
 * Model provider used for this thread (for example, 'openai').
 */
modelProvider: string, 
/**
 * Unix timestamp (in seconds) when the thread was created.
 */
createdAt: number, 
/**
 * Unix timestamp (in seconds) when the thread was last updated.
 */
updatedAt: number, 
/**
 * Current runtime status for the thread.
 */
status: ThreadStatus, 
/**
 * [UNSTABLE] Path to the thread on disk.
 */
path: string | null, 
/**
 * Working directory captured for the thread.
 */
cwd: string, 
/**
 * Version of the CLI that created the thread.
 */
cliVersion: string, 
/**
 * Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
 */
source: SessionSource, 
/**
 * Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
 */
agentNickname: string | null, 
/**
 * Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
 */
agentRole: string | null, 
/**
 * Optional Git metadata captured when the thread was created.
 */
gitInfo: GitInfo | null, 
/**
 * Optional user-facing thread title.
 */
name: string | null, 
/**
 * Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read`
 * (when `includeTurns` is true) responses.
 * For all other responses and notifications returning a Thread,
 * the turns field will be an empty list.
 */
turns: Array<Turn>, };
