import { type SandboxStackEnv, type StackEnv } from "./env-file.js"; import { type HostConfigFile } from "./host-files.js"; import type { StackImages } from "./images.js"; import type { StackPaths } from "./paths.js"; import { type PortProbe } from "./ports.js"; export interface PreparedStack { env: StackEnv; host: HostConfigFile; adminKey: string; /** True when this run chose the ports (first start). */ firstRun: boolean; } /** Read the persisted Compose settings without writing anything. */ export declare function readStackEnv(paths: Pick): Promise; /** * Write everything `docker compose up` needs under the Host root: * host.json, host-credentials.json (0600), docker/compose.yaml, * docker/.env (0600) and docker/restate-identity.pem (0600). Ports and the * Postgres password persist in .env; the identity key persists in its PEM. The harness token * and mode persist too; whether Restate's UI is published is decided on every start. */ export declare function prepareStack(input: { paths: StackPaths; /** The Tenant's name and its Compose project. */ name: string; project: string; images: StackImages; uid: number; gid: number; /** Recorded in host.json; undefined keeps the recorded version. */ runtimeVersion: string | undefined; ports: PortProbe; /** Ports other Tenants keep in their `.env`: never chosen for a port not chosen yet. */ reserved?: ReadonlySet; /** * Changes to the origins that may embed Studio: `reset` empties the list (the * default), `add` appends (for example a desktop app's dev server). */ studioEmbedOrigins?: { add?: readonly string[]; reset?: boolean; }; /** The measurement id Studio reports page views to; absent when telemetry is off. */ studioAnalyticsId?: string; /** * The sandboxes settings (`nylorun local sandbox enable`); null removes them (`disable`). * Undefined keeps the persisted ones while `sandboxes/cluster.json` exists. */ sandboxes?: SandboxStackEnv | null; /** Publish Restate's UI and admin port (`start --restate-ui`); undefined keeps the last start's choice. */ restateUi?: boolean; }): Promise;