import type { StackPaths } from "./paths.js"; /** * host.json and host-credentials.json (format 1), which `@nylorun/admin`, * Studio and the Runtime container all read. * * For a local Tenant, host.json names the client-facing address: `localhost` and * the published port. The container binds 0.0.0.0:4000 on its own. */ /** Host name clients use for a local Tenant. Studio's cookie is set on this name too. */ export declare const STACK_CLIENT_HOST = "localhost"; export interface HostConfigFile { format: 1; hostId: string; host: string; port: number; runtimeVersion?: string; [field: string]: unknown; } export declare function newHostId(): string; /** The Host root layout, mode 0700. */ export declare function ensureHostLayout(paths: StackPaths): Promise; export declare function readHostConfig(paths: StackPaths): Promise | undefined>; /** * Write host.json with the published port and the Runtime version that runs * the Host. Keeps the hostId and unknown fields of an existing file, and its * runtimeVersion when `runtimeVersion` is undefined; refuses a newer format. */ export declare function writeStackHostConfig(paths: StackPaths, input: { port: number; runtimeVersion: string | undefined; }): Promise; export declare function readAdminKey(paths: StackPaths): Promise; /** * The Tenant's vault key in `keys/vault-kek` (32 random bytes, base64, mode 0600), which only the * gateway container mounts (F4.2): created if missing, or moved from `tenant/vault-kek`, where a * Host root before F4.2 kept it. The gateway never creates it. */ export declare function ensureVaultKey(paths: StackPaths): Promise<{ created: boolean; moved: boolean; }>; /** Create host-credentials.json (mode 0600) if missing; always leave it 0600. */ export declare function ensureHostCredentials(paths: StackPaths): Promise<{ adminKey: string; created: boolean; }>;