import type { AutoSyncOptions } from './auto-sync.js'; export interface LaunchOnMountOptions { /** Binary name or absolute path to the CLI to spawn, e.g. 'claude'. */ cli: string; /** The real project directory to mirror. */ projectDir: string; /** Where to create the mount. Must differ from projectDir. */ mountDir: string; /** Argv to pass to the CLI after its binary name. */ args: string[]; /** Glob-style ignore patterns (files excluded entirely from the mount). */ ignoredPatterns?: string[]; /** Glob-style readonly patterns (files copied with mode 0o444). */ readonlyPatterns?: string[]; /** Extra directory names to exclude from the mount on top of defaults. */ excludeDirs?: string[]; /** Extra env vars merged on top of `process.env`. */ env?: NodeJS.ProcessEnv; /** Optional agent name, used in the _MOUNT_README.md "Agent:" line. */ agentName?: string; /** * Invoked after the mount is created but before the CLI is spawned. * Useful for writing additional files into the mount (overrides, extra docs). */ onBeforeLaunch?: (mountDir: string) => void | Promise; /** * Invoked after sync-back completes, before cleanup. Receives the total * number of file changes propagated during the run — the sum of autosync * activity in both directions (including deletes) and the final mount→ * project syncBack. Use this as an "anything changed?" signal rather than * a strict mount→project count. */ onAfterSync?: (syncedFileCount: number) => void | Promise; /** * Auto-sync behavior. By default, bidirectional auto-sync runs during the * lifetime of the spawned CLI. Pass `false` to disable, or an options object * to tune the scan interval / write-finish debounce. */ autoSync?: boolean | AutoSyncOptions; } export interface LaunchOnMountResult { exitCode: number; } /** * Create a mount of `projectDir` at `mountDir`, spawn `cli` with `args` using * the mount as its cwd, forward SIGINT/SIGTERM to the child, sync writable * changes back on exit, then clean up the mount. Resolves with the child's * exit code. */ export declare function launchOnMount(opts: LaunchOnMountOptions): Promise;