pub async fn export_zip_bytes(
api: &dyn GatewayApi,
project: &str,
) -> Result<Vec<u8>, CoreError>Expand description
The shared first half of every resource op: stream the project
export into a unique temp file, then read the bytes back for
in-memory surgery. A nonexistent project fails inside export’s
existing classification (404 → not_found, exit 6). The
tempfile dependency (promoted from dev — already in the
workspace graph) owns uniqueness and cleanup-on-drop.
07-01: promoted pub — the cross-gateway diff/sync actions ride the SAME export-to-bytes seam (two clients, one helper).