/** * Origins that may embed Studio by default: none. Embedding is opt-in: the operator lists * the exact origins of the app that frames Studio (`--studio-embed-origin`, Studio ยง8.9). */ export declare const DEFAULT_STUDIO_FRAME_ANCESTORS: readonly string[]; /** * Settings in `docker/.env` (mode 0600). Ports, the password and the gates token * persist; the Restate identity public key is derived from `restate-identity.pem`. */ export interface StackEnv { /** Published Runtime port (loopback): the Runtime and Management APIs. */ runtimePort: number; /** Published Studio port (loopback). */ studioPort: number; /** Restate UI and admin port (loopback), published only with `restateUi`. */ restatePort: number; /** * `NYLORUN_RESTATE_UI`: `1` publishes Restate's UI and admin port (unauthenticated) for this * start (`nylorun start --restate-ui`); `0` keeps it closed. Decided again on every start. */ restateUi: boolean; postgresPassword: string; /** The token the runtime presents to the gateway (`NYLORUN_GATES_TOKEN`), 32 bytes as hex. */ gatesToken: string; /** * The harness's credential for core's Harness API (`NYLORUN_HARNESS_TOKEN`), 32 bytes as hex: * given only to the runtime (which checks it) and the harness. */ harnessToken: string; /** * `NYLORUN_HARNESS`: `remote` (the harness container runs agent turns, MCP servers and * workspaces) or `in-process` (the runtime does, without a harness container). Kept across * starts; edit `.env` to roll back. */ harness: HarnessMode; /** * RustFS's secret key (`NYLORUN_OBJECT_STORE_SECRET_KEY`), 32 bytes as hex: the Object store's * credential, given only to the runtime and the gateway. */ objectStoreSecretKey: string; /** `publickeyv1_...` of `docker/restate-identity.pem`. */ restateIdentityKey: string; uid: number; gid: number; /** Absolute Host root on this machine, bind-mounted at /nylorun. */ hostRoot: string; runtimeImage: string; studioImage: string; /** Exact origins that may frame Studio, separated by spaces (persists). */ studioFrameAncestors: string; /** * The Google Analytics measurement id Studio reports page views to, or empty * when telemetry is off. Decided again on every start. */ studioAnalyticsId: string; /** The Tenant's name, which the Runtime gives the Tenant it creates. */ tenantName: string; /** Present once `nylorun local sandbox enable` ran for the Tenant (F7.2). */ sandboxes?: SandboxStackEnv; } /** * The sandboxes service's settings (`nylorun local sandbox enable`): its bearer token (only the * runtime presents it), its image, and the host ports pods reach (Harness API, gates, * egress) on the host address, published on the bind address. The ports persist. */ export interface SandboxStackEnv { /** NYLORUN_SANDBOXES_TOKEN, 32 bytes as hex. */ token: string; image: string; harnessPort: number; gatesPort: number; egressPort: number; /** The Docker host as pods reach it (192.168.65.254 on Docker Desktop). */ hostAddress: string; /** Where the pod-facing ports are published (127.0.0.1 on Docker Desktop). */ bind: string; /** * With the Substrate backend (ADR-138): the edge's host ports, the TLS front actors reach * the Harness API and the gates through, served by the sandboxes container. */ edgeHarnessPort?: number; edgeGatesPort?: number; /** * With the Substrate backend: the edge's keys port, where the keys provider reaches * egress-gate's decide route, and the token it presents there (ADR-142). */ edgeKeysPort?: number; /** NYLORUN_EGRESS_KEYS_TOKEN, 32 bytes as hex. */ keysToken?: string; } export type HarnessMode = "remote" | "in-process"; export declare function renderEnvFile(env: StackEnv): string; /** Parse KEY=value lines; comments and blank lines are skipped. */ export declare function parseEnvLines(text: string): Map; /** The settings that persist across starts, from an existing .env. */ export interface PersistedStackEnv { runtimePort?: number; studioPort?: number; restatePort?: number; /** Whether the last start published Restate's UI (`NYLORUN_RESTATE_UI=1`). */ restateUi?: boolean; postgresPassword?: string; gatesToken?: string; harnessToken?: string; harness?: HarnessMode; objectStoreSecretKey?: string; /** Validated origins; absent when the line is missing (an older .env). */ studioFrameAncestors?: string[]; sandboxes?: SandboxStackEnv; } export declare function parsePersisted(text: string): PersistedStackEnv;