import type { AgentControllerEvent, SessionBeforeAgentEndListener } from '@mastra/core/agent-controller'; import type { WorkspaceSandbox } from '@mastra/core/workspace'; import type { FilesystemFile, FilesystemStorage } from '../storage/domains/filesystem/base.js'; import type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js'; export interface FilesystemCaptureSession { readonly identity: { getResourceId(): string; }; readonly thread: { requireId(): string; }; getWorkspace(): { sandbox?: Pick; } | undefined; onBeforeAgentEnd(listener: SessionBeforeAgentEndListener): () => void; subscribe(listener: (event: AgentControllerEvent) => void): () => void; } export interface FilesystemCaptureDependencies { filesystem: Pick; sourceControl: { sessions: Pick; }; } export declare function parseFilesystemCaptureFiles(output: string): FilesystemFile[]; export declare function captureSessionFilesystem(session: FilesystemCaptureSession, { filesystem, sourceControl }: FilesystemCaptureDependencies): Promise; /** * Resolve once the session's in-flight filesystem capture (if any) has * persisted, or after `timeoutMs` so a reader that arrives mid-capture is * never blocked by the execs' worst-case 30s timeouts. Never rejects: the * capture body is fully try/catch contained. */ export declare function waitForPendingFilesystemCapture(resourceId: string, timeoutMs?: number): Promise; export declare function observeSessionFilesystem(session: FilesystemCaptureSession, dependencies: FilesystemCaptureDependencies): () => void; //# sourceMappingURL=filesystem-capture.d.ts.map