import type { AbsolutePathBuf } from "../AbsolutePathBuf"; import type { ReasoningEffort } from "../ReasoningEffort"; import type { GitInfo } from "./GitInfo"; import type { SessionSource } from "./SessionSource"; import type { ThreadHistoryMode } from "./ThreadHistoryMode"; import type { ThreadSection } from "./ThreadSection"; import type { ThreadSource } from "./ThreadSource"; import type { ThreadStatus } from "./ThreadStatus"; import type { Turn } from "./Turn"; export type Thread = { id: string; /** * Session id shared by threads that belong to the same session tree. */ sessionId: string; /** * Source thread id when this thread was created by forking another thread. */ forkedFromId: string | null; /** * The ID of the parent thread. This will only be set if this thread is a subagent. */ parentThreadId: string | null; /** * 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; /** * The independently persisted section selected for this thread, if any. */ section: ThreadSection | null; /** * Unix timestamp in seconds when the thread entered its current section. */ sectionEnteredAt: number | null; /** * Canonical project assignment owned by app-server, if any. */ projectId: string | null; /** * Persisted thread history contract selected when this thread was created. */ historyMode: ThreadHistoryMode; /** * Model provider used for this thread (for example, 'openai'). */ modelProvider: string; /** * Current configured model when loaded, otherwise the latest persisted model. * Null when unavailable. This is not per-turn execution telemetry. */ model: string | null; /** * Current configured reasoning effort when loaded, otherwise the latest persisted effort. * Null when unset or unavailable. This is not per-turn execution telemetry. */ reasoningEffort: ReasoningEffort | null; /** * Unix timestamp (in seconds) when the thread was created. */ createdAt: number; /** * Unix timestamp (in seconds) when the thread was last updated. */ updatedAt: number; /** * Unix timestamp (in seconds) used for thread recency ordering. */ recencyAt: number | null; /** * 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: AbsolutePathBuf; /** * Version of the CLI that created the thread. */ cliVersion: string; /** * Originator recorded when the thread was created, independent of its current client or executor. * Null when the recorded originator is unavailable. */ originator: string | null; /** * Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.). */ source: SessionSource; /** * Optional analytics source classification for this thread. */ threadSource: ThreadSource | null; /** * 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/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; }; //# sourceMappingURL=Thread.d.ts.map