import type { MachineView, Session, SessionMachineAccess } from "@opengeni/sdk"; import { type ReactNode } from "react"; import { type UseSessionStartOptions } from "../hooks/use-session-start.js"; /** * Why a chat that runs on a personal machine can't take somebody's message, * with the ways forward. `queued` explains a saved message the runtime * refused; otherwise it warns about a draft before it is sent. */ export declare function PersonalMachineExplanation({ access, queued, action, }: { access: SessionMachineAccess; queued?: boolean | undefined; /** A machine picker or other way forward, shown before the copy-request button. */ action?: ReactNode | undefined; }): import("react").JSX.Element; /** * Updates from other people's work (their agents' messages and workers' * results) wait because this chat runs on somebody's personal machine. One * notice for all of them, updated in place: it says whose updates wait and * why, and gives the machine's owner the way to let the agent continue with * them under the owner's own access. Everyone else acts from the composer's * notice (choose a machine, or ask the owner). Renders nothing when nothing waits. */ export declare function SessionWaitingWorkNotice({ access, busy, onContinue, }: { access: SessionMachineAccess; /** Another control action is in flight. */ busy?: boolean | undefined; /** The owner lets the agent continue with them; omitted where the host can't. */ onContinue?: (() => Promise) | undefined; }): import("react").JSX.Element | null; /** * Messages other people sent wait because this chat runs on somebody's * personal machine, where only its owner can start work. One calm notice for * all of them: whose messages wait, and what brings them to the agent. They * never block the chat, so it offers no action. Renders nothing when none wait. */ export declare function SessionWaitingMessagesNotice({ access }: { access: SessionMachineAccess; }): import("react").JSX.Element | null; /** * The personal machine a chat runs on, before sending. On somebody else's * machine a new message from this person could not start there, so it says * why and offers the ways forward. Its owner, in a chat shared with the * workspace, gets a one-line heads-up that people here see what the agent * does on it, with `action` as the way to move elsewhere. Renders nothing in * the owner's private chats or when the chat is not on a personal machine. */ export declare function SessionMachineAccessNotice({ access, action, shared, className, }: { access: SessionMachineAccess | null | undefined; action?: ReactNode | undefined; /** The chat is shared with the workspace rather than Only me. */ shared?: boolean | undefined; /** Spacing for the owner's one-line heads-up where it sits. */ className?: string | undefined; }): import("react").JSX.Element | null; export type SessionAdmissionNoticeProps = { session: Session; /** The person may pause, resume and recheck this session. */ canControl: boolean; /** The session is paused; rechecking would not clear that. */ paused: boolean; /** Another control action is in flight. */ busy: boolean; /** Control changed underneath the notice: re-read before any recheck. */ refreshRequired?: boolean | undefined; /** One fenced Resume followed by a fresh read (see `recheckSessionAdmission`). */ onRecheck: () => Promise; /** The session's current personal-machine projection, when known. */ machineAccess?: SessionMachineAccess | null | undefined; /** The machine picker offered when the saved message needs a different machine. */ machineAction?: ReactNode | undefined; /** * The person's machines, to find the one a saved message was approved for * (`machineAccess.queuedTurnApprovedMachines`). Omit where they aren't read. */ machines?: readonly MachineView[] | undefined; /** * Move the chat to a machine (by sandbox id) without sending anything. * Offered as "Run it on …" when the saved message was approved for that * machine; the notice rechecks once the move is confirmed. */ onMoveToMachine?: ((sandboxId: string) => Promise) | undefined; /** * As the machine's owner, let the agent continue with other people's * waiting updates (`machineAccess.waitingWork`): continue, then recheck a * blocked chat and refresh. Omit where the host cannot. */ onContinueWaitingWork?: (() => Promise) | undefined; }; /** * The runtime refused to start the session's next message (an admission * block). Says why in the person's language, keeps the saved message, and * offers the one safe way forward: choose a machine they can use, or recheck * after access changes. Renders nothing when the session is not blocked. */ export declare function SessionAdmissionNotice({ session, canControl, paused, busy, refreshRequired, onRecheck, machineAccess, machineAction, machines, onMoveToMachine, onContinueWaitingWork, }: SessionAdmissionNoticeProps): import("react").JSX.Element | null; export type SessionMachineChoicesProps = { /** Machines the saved message can move to; see `savedMessageMachineChoices`. */ machines: readonly MachineView[]; /** Move the chat; resolve to an error to show, or null once it moved. */ onChoose: (machine: MachineView) => Promise; disabled?: boolean | undefined; /** A more specific reason for the last failed move (for example, the machine went offline). */ failureDetail?: string | null | undefined; }; /** * A compact "Choose machine" disclosure listing the machines the person may * move the chat to. Moving never resends anything: the saved message runs only * after an explicit recheck. */ export declare function SessionMachineChoices({ machines, onChoose, disabled, failureDetail, }: SessionMachineChoicesProps): import("react").JSX.Element; export type SessionStartNoticeProps = UseSessionStartOptions & { /** The person may control this session. The server enforces it either way. */ canControl?: boolean | undefined; /** Another control action (send, pause, resume) is in flight. */ busy?: boolean | undefined; /** Warn before sending when the chat runs on somebody else's personal machine. */ showPreSendWarning?: boolean | undefined; }; /** * Everything a chat embedding needs to explain why a message can't start: * the admission block for a saved message the runtime refused and, before * sending, the personal-machine warning. Offers the machines the person may * use, moves the chat, and rechecks with one fenced Resume, so the saved * message is kept and never sent twice. Access control is the server's; this * only explains it and offers the allowed ways forward. Every word comes from * the message catalog (`sessionAdmission.*`). */ export declare function SessionStartNotice({ canControl, busy, showPreSendWarning, ...options }: SessionStartNoticeProps): import("react").JSX.Element;