import type { Migration, MigrationContext, MigrationResult } from "./migration.interface.js";
/**
 * What the operator sees on stderr when the bootstrap apply fails.
 *
 * Written for someone scrolling past a wall of install output who may not know
 * what Lisa is: it says what stopped working (templates and guardrails are no
 * longer arriving), that the real error is directly above, and the two commands
 * that reproduce and diagnose it. ASCII and free of `"`, `$`, and backticks so
 * it survives being embedded in a JSON string inside a `sh -c` command.
 */
export declare const APPLY_FAILURE_NOTICE: string;
/**
 * The bootstrap invocation chained into a host project's `postinstall`.
 *
 * Shape: **loud but non-fatal**. It used to end in `2>/dev/null || true`, which
 * discarded the apply's stderr and its exit code, so a totally failed apply was
 * indistinguishable from success and a repo could silently stop receiving
 * template updates (CodySwannGT/lisa#2467). Stderr now flows through and a
 * failure adds an explicit warning line.
 *
 * It deliberately still exits 0. A postinstall runs inside `npm install` /
 * `bun install`; exiting non-zero aborts the install and leaves `node_modules`
 * half-built. Apply legitimately cannot run in plenty of environments (no git
 * repo, no project config, sandboxed or non-interactive shells), so a hard
 * failure would convert a template-sync problem into an install outage across
 * the fleet. The durable signal instead lives in the apply receipt that a
 * successful apply writes — `lisa doctor` reports a repo whose receipt is
 * missing or older than the installed Lisa, so the failure is still findable
 * long after the install output has scrolled away.
 *
 * Exported so tests can execute the real script under `sh` rather than assert
 * on a string.
 */
export declare const LISA_INVOCATION = "[ -n \"$CI\" ] || LISA_BOOTSTRAP=1 node node_modules/@codyswann/lisa/dist/index.js --yes --skip-git-check . || echo \"lisa: TEMPLATE APPLY FAILED - this project is NOT receiving Lisa template or guardrail updates. The error is above. Reproduce it with: node node_modules/@codyswann/lisa/dist/index.js --yes --skip-git-check . - then run: node node_modules/@codyswann/lisa/dist/index.js doctor\" >&2";
/**
 * Migration: ensure Node-based projects chain Lisa into their postinstall script.
 *
 * Any TypeScript/Node project (expo, nestjs, cdk, npm-package, plain typescript) with a
 * custom postinstall (`patch-package && ...`) that never invokes Lisa will not apply
 * template updates automatically on `bun install` / `npm install`. Evidence: frontend-v2
 * (expo) and acmeorga/frontend (typescript-only) both needed this chained invocation.
 * This migration prepends the standard Lisa invocation so template updates apply
 * automatically on install. Rails-only projects are skipped (no Node postinstall).
 */
export declare class EnsureLisaPostinstallMigration implements Migration {
    readonly name = "ensure-lisa-postinstall";
    readonly description = "Ensure Node-based projects run Lisa in their postinstall script";
    /**
     * Check whether this migration should run on the project
     *
     * Primary path: Node project types (typescript, expo, nestjs, cdk, npm-package)
     * with a package.json whose postinstall lacks the CI-guarded Lisa invocation.
     *
     * Fallback path: non-Node projects (e.g. Rails-only) that nevertheless ship a
     * package.json containing a legacy Lisa postinstall (unguarded). These were
     * written by an older Lisa version before the CI guard existed and still need
     * an upgrade. Projects without a package.json are untouched.
     * @param ctx - Migration context
     * @returns True when a Node project is missing the Lisa invocation in postinstall,
     *   or when a non-Node project has an unguarded legacy Lisa postinstall
     */
    applies(ctx: MigrationContext): Promise<boolean>;
    /**
     * Apply the migration, prepending the Lisa invocation to the project's postinstall
     * @param ctx - Migration context
     * @returns Result describing the action taken
     */
    apply(ctx: MigrationContext): Promise<MigrationResult>;
}
//# sourceMappingURL=ensure-lisa-postinstall.d.ts.map