import { PathLike } from 'fs'; import { Serializable } from '../../internals/serializable.js'; import '../../internals/types.js'; import '../../internals/helpers/guards.js'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ interface PythonFile { id: string; pythonId: string; filename: string; } interface PythonUploadFile { id: string; filename: string; } interface PythonDownloadFile { id?: string; filename: string; pythonId: string; } declare abstract class PythonStorage extends Serializable { /** * List all files that code interpreter can use. */ abstract list(): Promise; /** * Prepare subset of available files to code interpreter. */ abstract upload(files: PythonUploadFile[]): Promise; /** * Process updated/modified/deleted files from code interpreter response. */ abstract download(files: PythonDownloadFile[]): Promise; } declare class TemporaryStorage extends PythonStorage { protected files: PythonFile[]; list(): Promise; upload(files: PythonUploadFile[]): Promise; download(files: PythonDownloadFile[]): Promise; createSnapshot(): { files: PythonFile[]; }; loadSnapshot(snapshot: ReturnType): void; } interface Input { localWorkingDir: PathLike; interpreterWorkingDir: PathLike; ignoredFiles?: Set; } declare class LocalPythonStorage extends PythonStorage { protected readonly input: Required; constructor(input: Input); protected init(): Promise; list(): Promise; upload(files: PythonUploadFile[]): Promise; download(files: PythonDownloadFile[]): Promise<{ id: string; filename: string; pythonId: string; }[]>; protected computeHash(file: PathLike): Promise; createSnapshot(): { input: Required; }; loadSnapshot(snapshot: ReturnType): void; } export { LocalPythonStorage, type PythonDownloadFile, type PythonFile, PythonStorage, type PythonUploadFile, TemporaryStorage };