import { BoxApi } from './apis/BoxApi'; import type { Box, BoxEvent, DesktopResponse, PromptRequest, PromptRun } from './models'; export type WaitOptions = { timeoutMs?: number; intervalMs?: number; }; export type StreamEventsOptions = WaitOptions & { type?: string; limit?: number; includeExisting?: boolean; signal?: AbortSignal; }; export type StreamPromptOptions = WaitOptions & { signal?: AbortSignal; }; export declare function waitUntilReady(api: BoxApi, boxId: string, options?: WaitOptions): Promise; export declare function waitUntilIdle(api: BoxApi, boxId: string, options?: WaitOptions): Promise; export declare function waitForDesktop(api: BoxApi, boxId: string, options?: WaitOptions & { vnc?: number; publicAccess?: boolean; }): Promise; export declare function waitForPrompt(api: BoxApi, boxId: string, promptId: string, options?: WaitOptions): Promise; export declare const waitForPromptDone: typeof waitForPrompt; /** * Long-poll Box events and yield each new event once. * * The v1 API does not require a separate SSE/WebSocket connection. This helper * polls `events({ sort: "asc" })`, advances a cursor after every event, and * yields response events as soon as they are persisted. Streaming response * partials have `event.data.isStreaming === true` (or `is_streaming` in raw * JSON); tool-call events are response events whose `event.data.tools` array is * present. */ export declare function streamEvents(api: BoxApi, boxId: string, options?: StreamEventsOptions): AsyncGenerator; /** * Queue a prompt, then yield its prompt/response/tool events until the prompt * reaches `finished` or `failed`. */ export declare function streamPrompt(api: BoxApi, boxId: string, promptRequest: PromptRequest, options?: StreamPromptOptions): AsyncGenerator; /** * Stop a Box, or delete it outright. * * The default stops the Box and keeps its snapshots, so it can be resumed or * forked later. `options.delete` is irreversible: the Box is force-stopped * without a final snapshot and every snapshot chain only it uses is deleted. * * The generated method is `deleteBox`, not `delete` -- `delete` is a reserved * word the generators rename, and calling a method the SDK does not actually * expose is what broke the TypeScript build (TS2339) and stopped it publishing. */ export declare function stopAndRemove(api: BoxApi, boxId: string, options?: { delete?: boolean; }): Promise; export declare function readText(api: BoxApi, boxId: string, path: string): Promise; export declare function writeText(api: BoxApi, boxId: string, path: string, content: string): Promise; export declare function execCommand(api: BoxApi, boxId: string, command: string, cwd?: string, timeoutSeconds?: number): Promise;