export type InitAction = 'created' | 'updated' | 'unchanged' | 'manual'; export interface InitChange { file: string; action: InitAction; note: string; } export interface InitOptions { root: string; /** Also create the runtime proxy route for browser spans (production: destination and keys read at runtime). */ proxy?: boolean; /** The observer version range for the package.json script, e.g. "^0.2". */ observerRange: string; /** Installs next-observe with the project's package manager; returns false on failure. */ install: (root: string, packageManager: PackageManager) => Promise; } export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun'; export declare function detectPackageManager(root: string): PackageManager; /** * The command that adds next-observe to the app. `--prefer-offline`: what is already in the package manager's cache is * used without asking the registry — at a workshop the Wi-Fi is the slowest part, and people prepare at home. Not for * yarn: classic accepts the flag, berry (2+) fails on it, and the lockfile does not tell them apart. */ export declare function installArgs(pm: PackageManager): string[]; /** * Wraps the exported Next config in withObserve(). The exported expression may be anything (an object, a variable, a * function, a call), so it is not parsed: `export default ` becomes `const nextObserveConfig = ` and the * export moves to the end. Returns undefined when the file has no single recognisable export. */ export declare function wrapNextConfig(source: string, commonJs: boolean): string | undefined; export declare function init(options: InitOptions): Promise;