@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
49 lines • 3.03 kB
TypeScript
import { SharePointAccessor, SharePointConfig } from '../../accessor/sharepoint.ts';
import type { DeltaHook } from '../../events/base.ts';
import type { ByteSource } from '../../io/types.ts';
import type { DirListing, FileStat, PathSpec } from '../../types.ts';
import { BaseVFS } from '../base.ts';
import type { RedactedSchema } from '../secrets.ts';
import type { ConfigState, Handed } from '../types.ts';
export declare const VFS_MD = "```text\n{prefix}\n <site>/ # every SharePoint site you can reach\n <library>/ # its document libraries (drives)\n <path> # the drive's files and folders\n```\n\n- SharePoint document libraries, discovered across sites and drives. An\n unscoped mount reads `/{site_name}/{library_name}/{path_to_file}`:\n `ls /` lists the sites, `ls /site/` a site's libraries, and\n `ls /site/lib/...` a drive's files and folders.\n- This is a remote mount: prefer targeted reads (`grep`, `head`) over\n full scans, and pipe a large file to `head` or `tail` rather than\n `cat` it whole.\n- File versions are retained; a snapshot pins and reads prior\n versions.";
export declare class SharePointVFS extends BaseVFS {
readonly name: string;
readonly cachesReads: boolean;
readonly sizesAlwaysKnown: boolean;
readonly supportsSnapshot: boolean;
readonly readRevalidatable: boolean;
readonly indexTtl: number;
vfsMd: string;
readonly wholeWordSearch: boolean;
readonly accessor: SharePointAccessor;
private readonly config;
constructor(config: SharePointConfig);
readonly readsRanges: boolean;
readdir(path: PathSpec, handed?: Handed): Promise<FileStat[] | DirListing>;
read(path: PathSpec, _handed?: Handed, offset?: number, size?: number | null): Promise<ByteSource> | AsyncIterable<Uint8Array>;
stat(path: PathSpec): Promise<FileStat>;
exists(path: PathSpec): Promise<boolean>;
readTree(path: PathSpec, handed?: Handed): Promise<Map<string, FileStat> | null>;
write(path: PathSpec, data: ByteSource, signal?: AbortSignal): Promise<void>;
create(path: PathSpec): Promise<void>;
mkdir(path: PathSpec, parents?: boolean): Promise<void>;
unlink(path: PathSpec): Promise<void>;
rmdir(path: PathSpec): Promise<void>;
rmR(path: PathSpec): Promise<void>;
rename(src: PathSpec, dst: PathSpec): Promise<void>;
copy(src: PathSpec, dst: PathSpec): Promise<void>;
dirCopy(src: PathSpec, dst: PathSpec): Promise<void>;
truncate(path: PathSpec, length: number, noCreate?: boolean): Promise<void>;
/**
* Whether this VFS answers `name`; with no walk limit it reads every
* file rather than ask the service's search.
*/
supports(name: string): boolean;
filesContaining(path: PathSpec, text: string, opts: {
wholeWord: boolean;
ignoreCase: boolean;
}): Promise<PathSpec[] | null>;
deltaHook(): DeltaHook;
getState(): ConfigState<RedactedSchema<typeof SharePointConfig>>;
}
//# sourceMappingURL=sharepoint.d.ts.map