import type { MachineView } from "../../machines.js"; import type { SendMessageInput } from "@opengeni/sdk"; import type { ChatSendContext } from "../components/capabilities/session-github-repositories.js"; /** * What the person's message says when they move the chat onto a machine. The * name comes from whoever enrolled the machine, so it is quoted, kept to one * line and shortened: it names a machine and can never read as an instruction. */ export declare function machineUseMessage(name: string): string; /** A machine that only its owner can use; using it in a chat needs their consent. */ export declare function isPersonalMachine(machine: Pick): boolean; export type MoveChatToMachineResult = { moved: false; reason: string | null; } | { moved: true; text: string; }; /** * Move a chat onto a machine the way a person asks for it: repoint the chat, * then tell the agent where it now runs. For the person's own machine that * message also carries their consent to use it in this chat. Only the owner can * move a chat onto a personal machine, so choosing it is the approval; without * it the chat would point at the machine while every turn is refused. * * A personal machine is therefore never left attached without that consent: a * chat that can't carry it right now (waiting on an answer, no permission to * send, unknown authority) is not moved, and a consent message that fails moves * the chat back to where it was. */ export declare function moveChatToMachine(input: { machine: MachineView; chat: ChatSendContext; canMessage: boolean; /** Where the chat runs now, to move back to if a personal machine's consent fails. */ previousSandboxId?: string | null | undefined; attach: (sandboxId: string) => Promise; sendMessage: (message: SendMessageInput) => Promise<{ payload?: unknown; }>; }): Promise;