export type OxcTool = 'oxlint' | 'oxfmt';
/**
 * Resolve the absolute path to a tool's Node ESM launcher
 * (`node_modules/<tool>/bin/<tool>`). Walks cwd → workspace-root → parents.
 *
 * Throws {@link OxcNotFoundError} with a clear install hint when not found.
 */
export declare function findOxcLauncher(tool: OxcTool, cwd?: string): string;
export declare class OxcNotFoundError extends Error {
    tool: OxcTool;
    cwd: string;
    constructor(tool: OxcTool, cwd: string);
}
/**
 * Walk up from a starting directory to find the nearest oxlint config
 * (`.oxlintrc.json`). Returns absolute path or null.
 */
export declare function findOxlintConfig(cwd?: string): string | null;
/**
 * Walk up from a starting directory to find the nearest oxfmt config
 * (`.oxfmtrc` / `.oxfmtrc.json`). Returns absolute path or null.
 */
export declare function findOxfmtConfig(cwd?: string): string | null;
export interface RunOxcOptions {
    cwd?: string;
    verbose?: boolean;
}
/**
 * Spawn an oxc tool (oxlint / oxfmt) via its Node ESM launcher. Inherits
 * stdio so the tool's own output (diagnostics, reformatted files, summary
 * lines) reaches the user.
 *
 * The launcher is run with the current Node executable (`process.execPath`)
 * so the JS plugin host is available — required for oxlint's `jsPlugins`.
 *
 * Returns the exit code; never throws on non-zero exit (callers check it).
 */
export declare function runOxc(tool: OxcTool, args: string[], opts?: RunOxcOptions): Promise<number>;
/** Convenience wrappers. */
export declare function runOxlint(args: string[], opts?: RunOxcOptions): Promise<number>;
export declare function runOxfmt(args: string[], opts?: RunOxcOptions): Promise<number>;
/**
 * Lazy-load the embedded `.oxlintrc.json` scaffold template. The
 * static-read-inliner matches this `readFileSync(new URL(<lit>,
 * import.meta.url), 'utf-8')` shape at build time and inlines the file into
 * the GJS bundle, so the template is available without runtime file I/O
 * against the install dir. (Same mechanism the old `loadBiomeTemplate()`
 * relied on — the shape must stay exactly this for the inliner to fire.)
 */
export declare function loadOxlintTemplate(): string;
/** Lazy-load the embedded `.oxfmtrc` scaffold template (same inliner shape). */
export declare function loadOxfmtTemplate(): string;
/** Helper for callers to surface the install hint to the user cleanly. */
export declare function printOxcNotFound(err: OxcNotFoundError): void;
/**
 * Has the given oxc tool's npm package (or its companion) been declared in the
 * project's dependencies? Useful as a cheap pre-flight check — `gjsify flatpak
 * init`'s post-format hook uses this to decide whether to auto-format outputs.
 *
 * Checks for `oxfmt` by default (the formatter), since that is what the
 * post-format hook would invoke.
 */
export declare function hasOxcDevDep(cwd?: string, tool?: OxcTool): boolean;
