import { Manifest, ManifestInstallFlags } from './types';
/**
 * Re-exports the shared type so callers within the update module can
 * import either name. The canonical declaration lives in `./types` so
 * the manifest schema is one place.
 */
export type InstallFlags = ManifestInstallFlags;
/**
 * Workspace-derived flag detection. Used in two cases:
 *   1. The manifest doesn't carry `installFlags` (pre-2.5.2 manifests
 *      written by dxkit 2.5.0 / 2.5.1).
 *   2. Defensive fallback if manifest is corrupt / partial.
 *
 * False-positive risk is bounded — the installers themselves are
 * idempotent and emit sidecars when they detect competing files, so
 * even spurious detection can't clobber customer state.
 */
export declare function detectInstallFlags(cwd: string): InstallFlags;
/**
 * Resolves the install flags for an update. Manifest-stored values
 * take precedence (canonical source of truth, set at init time);
 * workspace detection is the fallback for legacy manifests.
 *
 * Returns the flags plus a `source` field so the caller can decide
 * whether to self-migrate (write detected flags back to the manifest
 * so the NEXT update reads them from the canonical source).
 */
export declare function resolveInstallFlags(manifest: Manifest, cwd: string): {
    flags: InstallFlags;
    source: 'manifest' | 'workspace-derived';
};
/**
 * Patch `installFlags` into the on-disk manifest. Used by init (after
 * ship-installers complete to record what actually landed) AND by
 * update's self-migration path on legacy manifests.
 *
 * Idempotent: writing the same flags twice is a no-op. Defensive
 * against a manifest file being deleted mid-flight (returns false in
 * that case rather than throwing).
 */
export declare function writeInstallFlags(cwd: string, flags: InstallFlags): boolean;
export declare function runUpdate(cwd: string, force: boolean, rescan?: boolean): Promise<void>;
//# sourceMappingURL=update.d.ts.map