/**
 * Marker version 1 of the engine trust launch contract (omo#10762).
 *
 * `SENPI_ENGINE_TRUST` tells a launch which trust generation its native `NODE_EXTRA_CA_CERTS` names
 * and how that generation was made, so the launch can adopt it instead of importing the OS store
 * again. omo's launcher, senpi's spawners and the desktop all write it, so the format lives here,
 * once. A text that is not exactly version 1 is foreign: it costs one import, never trust.
 */
import { z } from "zod";
export declare const ENGINE_TRUST_MARKER_ENV = "SENPI_ENGINE_TRUST";
/** Set only by the launcher's own trust exec; a launch that carries it never execs again. */
export declare const ENGINE_TRUST_HOP_ENV = "SENPI_ENGINE_TRUST_HOP";
/** The names a launch records on arrival and an adopting engine restores for its children. */
export declare const ENGINE_TRUST_RESTORE_NAMES: readonly ["NODE_EXTRA_CA_CERTS", "NODE_USE_SYSTEM_CA", "SSL_CERT_FILE", "SSL_CERT_DIR", "BUN_OPTIONS"];
export type EngineTrustRestoreName = (typeof ENGINE_TRUST_RESTORE_NAMES)[number];
export declare const ENGINE_TRUST_FALLBACK_REASONS: readonly ["helper-timeout", "helper-crash", "helper-malformed-output", "helper-missing", "helper-wrong-arch", "helper-signature", "access-denied", "negatives-incomplete", "linux-bundle-unreadable", "linux-bundle-malformed"];
export type EngineTrustContractErrorCode = "trust-marker-invalid" | "trust-path-unrepresentable";
export declare class EngineTrustContractError extends Error {
    readonly code: EngineTrustContractErrorCode;
    constructor(code: EngineTrustContractErrorCode, message: string);
}
declare const markerSchema: z.ZodObject<{
    v: z.ZodLiteral<1>;
    file: z.ZodString;
    sha256: z.ZodString;
    automatic: z.ZodEnum<{
        fallback: "fallback";
        os: "os";
    }>;
    fallbackReason: z.ZodNullable<z.ZodEnum<{
        "access-denied": "access-denied";
        "helper-crash": "helper-crash";
        "helper-malformed-output": "helper-malformed-output";
        "helper-missing": "helper-missing";
        "helper-signature": "helper-signature";
        "helper-timeout": "helper-timeout";
        "helper-wrong-arch": "helper-wrong-arch";
        "linux-bundle-malformed": "linux-bundle-malformed";
        "linux-bundle-unreadable": "linux-bundle-unreadable";
        "negatives-incomplete": "negatives-incomplete";
    }>>;
    owner: z.ZodEnum<{
        server: "server";
        standalone: "standalone";
    }>;
    user: z.ZodNullable<z.ZodString>;
    defaults: z.ZodNullable<z.ZodObject<{
        file: z.ZodString;
        dir: z.ZodString;
    }, z.core.$strict>>;
    restore: z.ZodObject<{
        NODE_EXTRA_CA_CERTS: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        NODE_USE_SYSTEM_CA: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        SSL_CERT_FILE: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        SSL_CERT_DIR: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        BUN_OPTIONS: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>;
}, z.core.$strict>;
export type EngineTrustMarker = Readonly<z.infer<typeof markerSchema>>;
export type EngineTrustRestore = EngineTrustMarker["restore"];
export declare function parseEngineTrustMarker(text: string): EngineTrustMarker | undefined;
/** One line of JSON; throws rather than write a marker no reader would accept. */
export declare function serializeEngineTrustMarker(marker: EngineTrustMarker): string;
export {};
//# sourceMappingURL=marker.d.ts.map