import type { Agent, AgentOutputType } from '../../agent'; import type { RunState } from '../../runState'; import type { AgentInputItem } from '../../types'; import type { Span, Trace } from '../../tracing'; import type { SandboxRunConfig } from '../client'; import { type SandboxMemoryAgentRunner } from '../memory/generation'; import { type SandboxRuntimeModel } from './agentPreparation'; type SandboxPreparedAgent = { executionAgent: Agent; turnInput: AgentInputItem[]; }; export declare class SandboxRuntimeManager { private readonly sandboxConfig?; private readonly workspaceScope; private readonly runState?; private readonly agentKeys; private readonly agentsByKey; private readonly acquiredAgents; private readonly sessionsByAgent; private readonly sessionsByAgentKey; private readonly sessionAgentNamesByKey; private readonly preparedAgents; private readonly preparedSessions; private readonly preparedManifestSignatures; private readonly ownedSessionAgentKeys; private readonly sessionStartPromises; private activeMemory?; private currentAgentId?; constructor(args: { startingAgent: Agent; sandboxConfig?: SandboxRunConfig; runState?: RunState>; }); prepareAgent(args: { currentAgent: Agent; turnInput: AgentInputItem[]; runConfigModel?: SandboxRuntimeModel; tracingParent?: Span | Trace; }): Promise>; cleanup(state: RunState>, options?: { preserveOwnedSessions?: boolean; tracingParent?: Span | Trace; }): Promise; private planCleanup; private planCleanupForActiveSessions; private planCleanupForSerializedStateOnly; private executeCleanupPlan; private closeLivePreservedOwnedSessions; private runPreStopHooksBeforeRelease; enqueueMemoryGeneration(state: RunState>, args: { exception?: unknown; groupId?: string; inputOverride?: string | AgentInputItem[]; sdkSessionId?: () => Promise; runAgent: SandboxMemoryAgentRunner; tracingParent?: Span | Trace; }): Promise; adoptPreservedOwnedSessions(tracingParent?: Span | Trace): Promise; private acquireAgent; private ensureSession; private applyArchiveLimits; private registerSessionForAgent; private ensureSessionStarted; private getPreparedAgent; private ensureWorkspaceScopeAccessible; private resumeSessionForAgent; private prepareExplicitSessionStateForResume; private inspectLivePreservedOwnedSessionReuse; private discardLiveSessionWithChangedMountAuthority; private detachSessionAliases; private invalidateSerializedSession; private markSerializedSessionsRequireFreshCreation; private invalidateSerializedSessions; private prepareRejectedLiveSessionReplacement; private replaceRejectedLiveSession; private serializeState; private requireClient; private resolveSnapshotSpec; private agentKey; private allocateRuntimeAgentKey; private resolveConfiguredManifest; private resolveTrustedManifestForAgentKey; private closeOwnedSessions; private releaseAgents; } export {};