/** * Walk up from startDir looking for a directory containing .scaffold/. * Returns absolute path to the directory containing .scaffold/, or null if not found. */ export declare function findProjectRoot(startDir: string): string | null; /** * Commands that do NOT require an initialized .scaffold/ directory. * All other commands require it. */ export declare const ROOT_OPTIONAL_COMMANDS: readonly ["init", "version", "update", "adopt"]; /** * Yargs middleware that detects project root and sets it on argv. * For commands not in ROOT_OPTIONAL_COMMANDS, throws if .scaffold/ not found. * * Usage: .middleware(createProjectRootMiddleware()) * * Sets argv.detectedRoot to the found project root (string | undefined). * Commands should use argv.root ?? argv.detectedRoot as the project root. */ export declare function createProjectRootMiddleware(): (argv: Record) => void; //# sourceMappingURL=project-root.d.ts.map