API: @loopstack/docker-sandbox-filesystem
Classes
SandboxCreateDirectory
Tool that creates a directory in a sandbox container, optionally creating parent directories.
import { SandboxCreateDirectory } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxCreateDirectory extends BaseTool<SandboxCreateDirectoryArgs, object, SandboxCreateDirectoryResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxCreateDirectoryArgs): Promise<ToolEnvelope<SandboxCreateDirectoryResult>>;}SandboxDelete
Tool that deletes a file or directory in a sandbox container, with optional recursive and force flags.
import { SandboxDelete } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxDelete extends BaseTool<SandboxDeleteArgs, object, SandboxDeleteResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxDeleteArgs): Promise<ToolEnvelope<SandboxDeleteResult>>;}SandboxExists
Tool that checks whether a path exists in a sandbox container and reports its type.
import { SandboxExists } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxExists extends BaseTool<SandboxExistsArgs, object, SandboxExistsResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxExistsArgs): Promise<ToolEnvelope<SandboxExistsResult>>;}SandboxFileInfo
Tool that returns detailed metadata for a file or directory in a sandbox container — type, size, permissions, owner/group, and timestamps.
import { SandboxFileInfo } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxFileInfo extends BaseTool<SandboxFileInfoArgs, object, SandboxFileInfoResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxFileInfoArgs): Promise<ToolEnvelope<SandboxFileInfoResult>>;}SandboxFilesystemModule
NestJS module that provides filesystem tools for operating inside Docker sandbox containers — read,
write, list, create-directory, delete, exists, and file-info (SandboxReadFile, SandboxWriteFile,
SandboxListDirectory, SandboxCreateDirectory, SandboxDelete, SandboxExists, SandboxFileInfo).
Registration:
SandboxFilesystemModule— bare import; registers all sandbox filesystem tools.
Requires: a running Docker daemon on the host; imports SandboxToolModule automatically, so the
container lifecycle tools (SandboxInit, SandboxCommand, SandboxDestroy) are available too.
import { SandboxFilesystemModule } from '@loopstack/docker-sandbox-filesystem';export class SandboxFilesystemModule {}SandboxListDirectory
Tool that lists files and directories in a sandbox container, optionally recursively, with type and size.
import { SandboxListDirectory } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxListDirectory extends BaseTool<SandboxListDirectoryArgs, object, SandboxListDirectoryResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxListDirectoryArgs): Promise<ToolEnvelope<SandboxListDirectoryResult>>;}SandboxReadFile
Tool that reads a file’s contents from a sandbox container, as utf8 or base64.
import { SandboxReadFile } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxReadFile extends BaseTool<SandboxReadFileArgs, object, SandboxReadFileResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxReadFileArgs): Promise<ToolEnvelope<SandboxReadFileResult>>;}SandboxWriteFile
Tool that writes content to a file in a sandbox container, optionally creating parent directories.
import { SandboxWriteFile } from '@loopstack/docker-sandbox-filesystem';Provided by: SandboxFilesystemModule
export class SandboxWriteFile extends BaseTool<SandboxWriteFileArgs, object, SandboxWriteFileResult> { constructor(sandboxCommand: SandboxCommand); protected handle(args: SandboxWriteFileArgs): Promise<ToolEnvelope<SandboxWriteFileResult>>;}Interfaces
SandboxCreateDirectoryResult
Result of SandboxCreateDirectory.
Reports the directory path and whether it was created.
import { SandboxCreateDirectoryResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxCreateDirectoryResult { path: string; created: boolean;}SandboxDeleteResult
Result of SandboxDelete.
Reports the target path and whether it was deleted.
import { SandboxDeleteResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxDeleteResult { path: string; deleted: boolean;}SandboxExistsResult
Result of SandboxExists.
Reports whether the path exists and, if so, its type (or null when absent).
import { SandboxExistsResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxExistsResult { path: string; exists: boolean; type: 'file' | 'directory' | 'symlink' | 'other' | null;}SandboxFileInfoResult
Result of SandboxFileInfo.
Detailed metadata for a path — type, size, permissions, owner/group, and timestamps.
import { SandboxFileInfoResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxFileInfoResult { path: string; name: string; type: 'file' | 'directory' | 'symlink' | 'other'; size: number; permissions: string; owner: string; group: string; modifiedAt: string; accessedAt: string; createdAt: string;}SandboxListDirectoryResult
Result of SandboxListDirectory.
Reports the listed directory path and its entries (name, type, size, path).
import { SandboxListDirectoryResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxListDirectoryResult { path: string; entries: FileEntry[];}SandboxReadFileResult
Result of SandboxReadFile.
Reports the file content and the encoding it was read with.
import { SandboxReadFileResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxReadFileResult { content: string; encoding: string;}SandboxWriteFileResult
Result of SandboxWriteFile.
Reports the written path and the number of bytes written.
import { SandboxWriteFileResult } from '@loopstack/docker-sandbox-filesystem';export interface SandboxWriteFileResult { path: string; bytesWritten: number;}Type Aliases
SandboxCreateDirectoryArgs
Args for SandboxCreateDirectory.
Identifies the container and target directory path, with an optional recursive flag.
import { SandboxCreateDirectoryArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxCreateDirectoryArgs = z.infer<typeof inputSchema>;SandboxDeleteArgs
Args for SandboxDelete.
Identifies the container and target path, with optional recursive and force flags.
import { SandboxDeleteArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxDeleteArgs = z.infer<typeof inputSchema>;SandboxExistsArgs
Args for SandboxExists.
Identifies the container and the path to check for existence.
import { SandboxExistsArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxExistsArgs = z.infer<typeof inputSchema>;SandboxFileInfoArgs
Args for SandboxFileInfo.
Identifies the container and the path to inspect.
import { SandboxFileInfoArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxFileInfoArgs = z.infer<typeof inputSchema>;SandboxListDirectoryArgs
Args for SandboxListDirectory.
Identifies the container and directory path, with an optional recursive flag.
import { SandboxListDirectoryArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxListDirectoryArgs = z.infer<typeof inputSchema>;SandboxReadFileArgs
Args for SandboxReadFile.
Identifies the container, file path, and read encoding (utf8 or base64).
import { SandboxReadFileArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxReadFileArgs = z.infer<typeof inputSchema>;SandboxWriteFileArgs
Args for SandboxWriteFile.
Identifies the container, target path, content, encoding, and whether to create parent directories.
import { SandboxWriteFileArgs } from '@loopstack/docker-sandbox-filesystem';export type SandboxWriteFileArgs = z.infer<typeof inputSchema>;Variables
SandboxCreateDirectoryResultSchema
Zod schema for SandboxCreateDirectoryResult — the resultSchema of sandbox_create_directory.
import { SandboxCreateDirectoryResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxCreateDirectoryResultSchema: z.ZodObject< { path: z.ZodString; created: z.ZodBoolean; }, z.core.$strict>;SandboxDeleteResultSchema
Zod schema for SandboxDeleteResult — the resultSchema of sandbox_delete.
import { SandboxDeleteResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxDeleteResultSchema: z.ZodObject< { path: z.ZodString; deleted: z.ZodBoolean; }, z.core.$strict>;SandboxExistsResultSchema
Zod schema for SandboxExistsResult — the resultSchema of sandbox_exists.
import { SandboxExistsResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxExistsResultSchema: z.ZodObject< { path: z.ZodString; exists: z.ZodBoolean; type: z.ZodNullable< z.ZodEnum<{ file: 'file'; directory: 'directory'; symlink: 'symlink'; other: 'other'; }> >; }, z.core.$strict>;SandboxFileInfoResultSchema
Zod schema for SandboxFileInfoResult — the resultSchema of sandbox_file_info.
import { SandboxFileInfoResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxFileInfoResultSchema: z.ZodObject< { path: z.ZodString; name: z.ZodString; type: z.ZodEnum<{ file: 'file'; directory: 'directory'; symlink: 'symlink'; other: 'other'; }>; size: z.ZodNumber; permissions: z.ZodString; owner: z.ZodString; group: z.ZodString; modifiedAt: z.ZodString; accessedAt: z.ZodString; createdAt: z.ZodString; }, z.core.$strict>;SandboxListDirectoryResultSchema
Zod schema for SandboxListDirectoryResult — the resultSchema of sandbox_list_directory.
import { SandboxListDirectoryResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxListDirectoryResultSchema: z.ZodObject< { path: z.ZodString; entries: z.ZodArray< z.ZodObject< { name: z.ZodString; type: z.ZodEnum<{ file: 'file'; directory: 'directory'; symlink: 'symlink'; other: 'other'; }>; size: z.ZodNumber; path: z.ZodString; }, z.core.$strict > >; }, z.core.$strict>;SandboxReadFileResultSchema
Zod schema for SandboxReadFileResult — the resultSchema of sandbox_read_file.
import { SandboxReadFileResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxReadFileResultSchema: z.ZodObject< { content: z.ZodString; encoding: z.ZodString; }, z.core.$strict>;SandboxWriteFileResultSchema
Zod schema for SandboxWriteFileResult — the resultSchema of sandbox_write_file.
import { SandboxWriteFileResultSchema } from '@loopstack/docker-sandbox-filesystem';SandboxWriteFileResultSchema: z.ZodObject< { path: z.ZodString; bytesWritten: z.ZodNumber; }, z.core.$strict>;