export const PLUGIN_ID = '@rozenite/file-system-plugin'; export type FileSystemProvider = 'expo' | 'rnfs' | 'none'; export type FsEntry = { name: string; path: string; isDirectory: boolean; size?: number | null; modifiedAtMs?: number | null; mimeTypeHint?: string | null; }; export type FsRoots = { provider: FileSystemProvider; fileTransfer?: FileSystemTransferCapabilities; roots: Array<{ id: string; label: string; path: string; }>; }; export type FileSystemTransferCapabilities = { import: boolean; export: boolean; agent: FileSystemAgentTransferCapabilities; }; export type FileSystemAgentTransferCapabilities = { import: boolean; export: boolean; }; export type FileSystemEventMap = { // Sent by RN side when it initializes/reconnects - panel should re-fetch data 'fs:ready': { timestamp: number }; 'fs:get-roots': { requestId: string }; 'fs:get-roots:result': { requestId: string } & FsRoots & { error?: string }; 'fs:list': { requestId: string; path: string }; 'fs:list:result': { requestId: string; provider: FileSystemProvider; path: string; entries: FsEntry[]; error?: string; }; 'fs:read-image': { requestId: string; path: string; maxBytes?: number; }; 'fs:read-image:result': { requestId: string; provider: FileSystemProvider; path: string; dataUri?: string; error?: string; }; 'fs:read-file': { requestId: string; path: string; maxBytes?: number; }; 'fs:read-file:result': { requestId: string; provider: FileSystemProvider; path: string; content?: string; error?: string; }; 'fs:export-file': { requestId: string; path: string; }; 'fs:export-file:result': { requestId: string; provider: FileSystemProvider; path: string; fileName?: string; mime?: string; size?: number | null; base64?: string; error?: string; }; 'fs:import-file': { requestId: string; directoryPath: string; fileName: string; base64: string; overwrite?: boolean; }; 'fs:import-file:result': { requestId: string; provider: FileSystemProvider; directoryPath: string; path?: string; entry?: FsEntry; overwriteRequired?: boolean; error?: string; }; };