import type { ContentRating, ConvertConfig } from './config'; import type { ConvertPaths, HeadRow, StageDef, WarmReport } from './stages'; export declare const DEFAULT_REMOTE = "R2:instant-worlds-dev/instant-worlds"; export declare const DEFAULT_CDN_BASE = "https://eu.instant-worlds.dev.helix-cdn.com/instant-worlds"; export declare const IMMUTABLE_CACHE = "Cache-Control: public, max-age=31536000, immutable"; /** * The octet-stream data files that compress well: stored Brotli-encoded (src/city/convert/dataEncoding.ts; the CDN decodes for a client that cannot). * `ocean.rgba` (the visual ocean's bathymetry, 16.8 MB raw at 2049 samples a side) is fetched before the reveal on every tier: stored raw it * was the largest single download of a phone's first frame (Pacifica 2026-10-24: 16.8 of 47 MB, finishing 6 s after the last critical pack at * 9 Mbps). The engine reads it with fetch(), so the browser decodes it and the SHA-256 holds. */ export declare const GZIP_DATA: RegExp; export interface UploadSettings { /** rclone path up to (not including) the World id folder. */ remote: string; /** Public https base that serves the same folder. */ cdnBase: string; /** Data prefix under `/scene-data/`; default `-<8 hex of the final root documents>`. */ tag: string | null; /** A helix-web-engine-new checkout; needed by the `world` stage. */ engine: string | null; /** Cover image for the World card. */ thumbnail: string | null; /** The creator-attested rating; the platform wants it, truthfully declared, before any World is playable (unlisted or public). */ contentRating: ContentRating | null; } export declare function uploadSettings(config: ConvertConfig): (UploadSettings & { world: string; }) | null; /** The data prefix: explicit, else a name that changes exactly when a final root document does (so an unchanged re-run is idempotent and a changed one never overwrites an immutable object). */ export declare function dataTag(config: ConvertConfig, paths: ConvertPaths): string; /** Encoded copies (Brotli: `DATA_ENCODING`) of the compressible data files, in `/upload-gz/` (the folder keeps its old name). Deterministic. */ export declare function stageGzipData(sceneRoot: string, into: string): { files: number; raw: number; stored: number; }; /** GET every URL once (parallel, bodies drained) and count what the edge answered: a MISS here is the origin round trip the first visitor no longer pays. */ export declare function warmUrls(urls: string[], fetchImpl?: typeof fetch, concurrency?: number): Promise; /** The objects a first visit reads, as paths under the data prefix: the startup packs and their indexes, each root document and its pin and ocean, the lighting files, world.json. */ export declare function startupWarmPaths(publishDir: string, roots: string[]): string[]; export interface UploadReceipt { schema: 'helix.city-upload/1'; world: string; tag: string; dataBase: string; objects: number; bytes: number; gzip: { files: number; raw: number; stored: number; headerRepairs?: number; }; packs: number; /** The CDN warm-up of the startup set (absent on a run that did not warm). */ warm?: WarmReport; } /** HEAD every URL (parallel) asking for Brotli: the headers the CDN serves a browser. A HEAD per object through rclone's lsjson is ~6 objects a second; this is seconds. */ export declare function headUrls(urls: string[], fetchImpl?: typeof fetch, concurrency?: number): Promise; /** The URLs whose answer is not the one the World needs: Brotli-encoded data served without `Content-Encoding: br`, or without the immutable `Cache-Control`, or not at all. */ /** Times a CDN object's headers are looked at before it counts as stored wrong. */ export declare const UPLOAD_HEAD_ATTEMPTS = 3; export declare function wrongHeaders(rows: HeadRow[]): string[]; export declare function uploadStage(): StageDef; export declare function worldStage(): StageDef; /** The slug and title of the World the data was uploaded for, through the platform API with the CLI's own login. */ export declare function lookupWorld(world: string): Promise<{ slug: string; title: string; }>; /** Sets the World's visibility through the platform API with the CLI's own login. Returns the status the platform reports. */ export declare function setWorldVisibility(world: string, visibility: ConvertConfig['publish']['visibility'], contentRating: string | null): Promise; /** Bytes and file count of a tree; used by the upload report and its tests. */ export declare function treeSize(root: string): { files: number; bytes: number; };