/** * Worker artifact kinds (E20) and the object-storage folder each lands in: * preview → videos/, thumbnail → image/, metadata/log → renders/, highres (the * delivery MOV) → highres/ beside the manually uploaded High Res files. */ export const ARTIFACT_KIND_FOLDERS: Record = { preview: "videos", thumbnail: "image", metadata: "renders", log: "renders", highres: "highres", }; /** True for keys artifact-presign could have issued — guards E20b. */ export function isArtifactKey(key: string): boolean { const folder = key.split("/")[0]; return key.includes("/") && !key.includes("..") && Object.values(ARTIFACT_KIND_FOLDERS).includes(folder); }