// 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 { AbsolutePathBuf } from "../AbsolutePathBuf";
import type { JsonValue } from "../serde_json/JsonValue";
import type { ApprovalsReviewer } from "./ApprovalsReviewer";
import type { AskForApproval } from "./AskForApproval";
import type { SandboxMode } from "./SandboxMode";
import type { ThreadSource } from "./ThreadSource";

/**
 * There are two ways to fork a thread:
 * 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread.
 * 2. By path: load the thread from disk by path and fork it into a new thread.
 *
 * If using a non-empty path, the thread_id param will be ignored.
 * Empty string path values are treated as absent.
 *
 * Prefer using thread_id whenever possible.
 */
export type ThreadForkParams = { threadId: string,
/**
 * Optional last turn id to fork through, inclusive.
 *
 * When specified, turns after `last_turn_id` are omitted from the fork.
 * The referenced turn cannot be in progress.
 */
lastTurnId?: string | null,
/**
 * Optional turn id to fork before, excluding that turn and all later turns.
 * Cannot be combined with `last_turn_id`.
 */
beforeTurnId?: string | null,
/**
 * [UNSTABLE] Specify the rollout path to fork from.
 * If specified, the thread_id param will be ignored.
 */
path?: string | null,
/**
 * Configuration overrides for the forked thread, if any.
 */
model?: string | null, modelProvider?: string | null, serviceTier?: string | null | null, cwd?: string | null,
/**
 * Replace the thread's runtime workspace roots. Paths must be absolute.
 */
runtimeWorkspaceRoots?: Array<AbsolutePathBuf> | null, approvalPolicy?: AskForApproval | null,
/**
 * Override where approval requests are routed for review on this thread
 * and subsequent turns.
 */
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null,
/**
 * Named profile id for the forked thread. Cannot be combined with
 * `sandbox`.
 */
permissions?: string | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, ephemeral?: boolean,
/**
 * Optional client-supplied analytics source classification for this forked thread.
 */
threadSource?: ThreadSource | null,
/**
 * When true, return only thread metadata and live fork state without
 * populating `thread.turns`. This is useful when the client plans to call
 * `thread/turns/list` immediately after forking.
 */
excludeTurns?: boolean,
/**
 * When true, carry the source thread's current goal into the fork without
 * starting its initial automatic continuation. The next explicit turn owns
 * the goal lifecycle, and normal automatic continuation resumes after it.
 */
deferGoalContinuation?: boolean, };
