import { type LifecycleHookMap, type LifecycleHookPhase, type LifecycleHookScope } from "./extensions/index.js";
import type { DefaultPackageManager } from "./package-manager.js";
export interface PackageLifecycleHooksOptions {
    source: string;
    local: boolean;
    cwd: string;
    agentDir: string;
    appName: string;
    packageManager: DefaultPackageManager;
    stdout: NodeJS.WriteStream;
    stderr: NodeJS.WriteStream;
}
export type LifecycleHooksTarget = "source" | "installed";
export interface PrepareLifecycleHooksOptions {
    verifyRuntimeDependencies?: boolean;
}
export interface LifecycleHooksRunResult {
    phase: LifecycleHookPhase;
    hooksRun: number;
    hookErrors: number;
    legacyHooksRun: number;
    entryPathCount: number;
    skipped: boolean;
}
interface LoadedLifecycleHooks {
    source: string;
    scope: LifecycleHookScope;
    installedPath?: string;
    cwd: string;
    stdout: NodeJS.WriteStream;
    stderr: NodeJS.WriteStream;
    entryPaths: string[];
    hooksByPath: Map<string, LifecycleHookMap>;
}
export declare function readManifestRuntimeDeps(dir: string): string[];
export declare function collectRuntimeDependencies(installedPath: string, entryPaths: string[]): string[];
export declare function verifyRuntimeDependencies(runtimeDeps: string[], source: string, appName: string): void;
export declare function resolveLocalSourcePath(source: string, cwd: string): string | undefined;
export declare function prepareLifecycleHooks(options: PackageLifecycleHooksOptions, target: LifecycleHooksTarget, prepareOptions?: PrepareLifecycleHooksOptions): Promise<LoadedLifecycleHooks | null>;
export declare function runLifecycleHooks(loaded: LoadedLifecycleHooks | null, phase: LifecycleHookPhase): Promise<LifecycleHooksRunResult>;
export {};
//# sourceMappingURL=lifecycle-hooks.d.ts.map