import type { Span, Trace } from '../../tracing'; import type { SandboxDirectoryEntry, SandboxSessionLike, SandboxSessionState } from '../session'; import type { Memory } from '../capabilities/memory'; export type PhaseTwoSelectionItem = { rolloutId: string; updatedAt: string; rolloutPath: string; rolloutSummaryFile: string; terminalState: string; }; export type PhaseTwoInputSelection = { selected: PhaseTwoSelectionItem[]; retainedRolloutIds: Set; removed: PhaseTwoSelectionItem[]; }; export interface MemoryStore { read(path: string): Promise; write(path: string, data: Uint8Array): Promise; delete?(path: string): Promise; list?(prefix: string): Promise; } export declare class InMemoryMemoryStore implements MemoryStore { private readonly files; read(path: string): Promise; write(path: string, data: Uint8Array): Promise; delete(path: string): Promise; list(prefix: string): Promise; } export declare class SandboxMemoryStorage { private readonly session; private runAs?; private readonly store?; private readonly appendQueues; private tracingParent?; constructor(args: { session: SandboxSessionLike; runAs?: string; store?: MemoryStore; tracingParent?: Span | Trace; }); updateRuntimeContext(args: { runAs?: string; tracingParent?: Span | Trace; }): void; ensureLayout(memory: Memory): Promise; appendJsonl(path: string, payload: unknown): Promise; readText(path: string): Promise; private readFullText; private runQueuedAppend; writeText(path: string, content: string): Promise; listDir(path: string): Promise; hydrateFromStore(prefix: string): Promise; private listStoreDirectory; buildPhaseTwoInputSelection(args: { memoriesDir: string; maxRawMemoriesForConsolidation: number; }): Promise; rebuildRawMemories(args: { memoriesDir: string; selectedItems: PhaseTwoSelectionItem[]; }): Promise; writePhaseTwoSelection(args: { memoriesDir: string; selectedItems: PhaseTwoSelectionItem[]; }): Promise; private ensureDir; private ensureFile; private readTextWithShell; private appendJsonlWithShell; private appendJsonlToStore; private readPhaseTwoSelection; private listCurrentSelectionItems; } export declare function joinRelativePaths(left: string, right: string, ...rest: string[]): string;