/**
 * The startup-event wire (senpi#4602, A-amended sections 1-2), shared by the producers (the supervisor and
 * its host child) and the launcher's controller. Dependency-free on purpose: it is in the supervisor's
 * startup import graph, which is a budget (`test/supervisor-import-graph.test.ts`).
 *
 * Each producer writes LF-terminated JSON records to the dedicated startup pipe at `STARTUP_EVENT_FD`.
 * The supervisor relays its host child's records inside a `relay` frame, so the launcher feeds them to the
 * host role's ingress and a supervisor record can never complete a host phase.
 */
import type { StartupPhase } from "./host-startup-policy.ts";
/** Above `ADOPTABLE_MAX` of the private descriptor table (`private-fds.ts`), which forwards 5..15 by number. */
export declare const STARTUP_EVENT_FD = 16;
export declare const STARTUP_EVENT_PROTOCOL_VERSION = 1;
export declare const MAX_STARTUP_EVENT_BYTES = 4096;
/** In the candidate's own generation directory: its attempt nonce and identity, for a later holder's recovery. */
export declare const STARTUP_ATTEMPT_FILE = "startup-attempt.json";
/**
 * In a successor's own generation directory: the launcher's grant to take the public name, for one attempt. The
 * supervisor re-reads it inside the endpoint fence right before the adoption rename; the launcher's cleanup removes
 * it inside the same fence, so a revoked grant can never be followed by an adoption (senpi#4602 N1).
 */
export declare const ADOPTION_GRANT_FILE = "adoption-grant.json";
export type StartupProducerRole = "supervisor" | "host";
/** `host_opaque`: the supervisor's declaration, made before it spawns a host child that cannot report. */
export type StartupMilestone = StartupPhase | "host_opaque";
export interface StartupBinding {
    readonly attempt: string;
    readonly endpoint: string;
    readonly instanceId: string;
    readonly generation: number;
    readonly launchKind: "initial" | "successor";
    readonly predecessor: string | null;
}
/** What a producer is told through its environment: who it is reporting for, and the attempt's budget. */
export interface StartupHandOff {
    readonly binding: StartupBinding;
    readonly role: StartupProducerRole;
    /** G of this attempt: the supervisor's own backstop for retries the controller would otherwise bound. */
    readonly budgetMs: number;
    /** The filler slots this process inherited (see `withStartupPipe` in `private-fd-startup-fillers.ts`); its startup stub closes them first. */
    readonly fillers?: readonly number[];
}
export declare function encodeStartupHandOff(handOff: StartupHandOff): string;
export declare function parseStartupHandOff(value: string | undefined): StartupHandOff | undefined;
export declare function startupEventLine(binding: StartupBinding, role: StartupProducerRole, seq: number, milestone: StartupMilestone): string;
/** The launcher's wake-up to a successor supervisor on the same pipe, in the other direction: P7 resolved. */
export declare function startupGrantLine(attempt: string): string;
/** The supervisor's frame around one host-child record line (without its LF). */
export declare function relayStartupLine(line: string): string;
//# sourceMappingURL=host-startup-wire.d.ts.map