import { ReasoningEffort, type TurnExecutionPolicyV1 } from "@opengeni/contracts"; import type { SessionActivityDatabase } from "./database.js"; import * as schema from "./schema.js"; import { type SessionCommandActor } from "./session-control.js"; /** * Caller owns the RLS transaction. This never accepts a turn. With * `capacityRelease`, the chat's turn that is waiting for subscription * capacity moves onto the new model in the same commit and continues. */ export declare function setSessionModelInTransaction(db: SessionActivityDatabase, input: { accountId: string; workspaceId: string; sessionId: string; actor: SessionCommandActor; operationKey: string; model: string; reasoningEffort: ReasoningEffort; /** Synchronous validation against the locked session, not an earlier read. */ validate?: (session: typeof schema.sessions.$inferSelect) => void; /** The chat's capacity-waiting turn and its policy on the new model. */ capacityRelease?: { turnId: string; executionPolicy: TurnExecutionPolicyV1; }; }): Promise<{ model: string; reasoningEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh"; latencyMode: "fast" | "priority" | "standard" | "ultrafast"; eventId: string; releasedCapacityWaitTurnId: string | null; releaseEventIds: string[]; receiptId: string; timestamp: string; replay: boolean; }>;