import type Letta from "@letta-ai/letta-client"; import { RemoteClientSessionCore, type RuntimeScope, type RuntimeSessionInit, type RuntimeSessionMode } from "./remote-client-session-core.js"; import type { CreateAgentOptions, LettaCodeClientSessionOptions, LettaCodeCloudClientOptions } from "./types.js"; /** * The Cloud API reaped a conversation-scoped managed sandbox before the SDK * could refresh it. The failed refresh happens before the next turn is sent, * so callers can safely create a new SDK session for {@link conversationId} * and retry that turn. */ export declare class CloudManagedSandboxExpiredError extends Error { readonly sandboxId: string; readonly conversationId: string; readonly code: "managed_sandbox_expired"; constructor(sandboxId: string, conversationId: string); } type CloudSessionMode = Extract; export declare function validateCloudClientOptions(options: LettaCodeCloudClientOptions): void; export declare function createCloudAgent(client: Letta, agentOptions: CreateAgentOptions): Promise; export declare function assertCloudSessionOptionsSupported(action: string, options: LettaCodeClientSessionOptions): void; export declare class CloudEnvironmentSession extends RemoteClientSessionCore { private readonly cloudOptions; private readonly apiClient; private connectionId; private removeExternalToolHandler; private removeControlRequestHandler; private externalTools; private mcpBridge; private mcpCleanup; private managedSandbox; private sandboxRefreshTimer; private sandboxRefreshInFlight; private sandboxLifecycleClosing; private attachedRepositoryIds; private repositoryIdsRequiringCleanupRecompile; private readonly repositoryManagement; private readonly cloudMode; constructor(cloudOptions: LettaCodeCloudClientOptions, mode: CloudSessionMode, apiClient?: Letta); protected initializeRuntimeController(): Promise; private openCloudTransport; private installTransportHandlers; private cleanupTransportHandlers; protected recoverIdleTransport(runtime: RuntimeScope): Promise; private resolveRecoveryConnection; protected onIdleTransportDisconnect(): void; protected onRecoveredTransportDiscarded(): void; private startCloudRuntime; protected afterRuntimeInitialized(): Promise; protected beforeTurn(): Promise; protected onCoreClose(): void; protected onCoreDisposed(): Promise; private closeMcpBridge; private resolveRuntime; private attachSessionRepositories; private cleanupSessionRepositories; private recompileSystemPrompt; private repositoryResources; private waitForAgentRepository; private createConversation; private retrieveConversation; private resolveConnectionForRuntime; private resolveExplicitConnection; private createManagedSandboxConnection; private createManagedSandbox; private refreshManagedSandbox; private refreshManagedSandboxOnce; private terminateManagedSandbox; private waitForManagedSandboxConnection; private startManagedSandboxRefresh; private stopManagedSandboxRefresh; private cleanupManagedSandbox; private remoteEnvironmentClient; private effectiveEnvironment; private effectiveSandboxOptions; private resolvedSandboxOptions; } export {}; //# sourceMappingURL=cloud-session.d.ts.map