Files
PaperClipAI/server/src/services/native-runtime/provider-pack-extraction.ts
T
DottaandPaperclip 98ca6ff7c5 perf: reuse verified provider files during sandbox startup (#16493)
Build provider-pack transport layers once, reuse verified image files in private directories, and upload only missing layers. Preserve archive integrity checks and directory fallback on unsupported hosts.

Verified with 44 focused tests, all 48 main CI jobs, cloud Docker Runner checks, and Greptile 5/5 on the merged head.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-19 08:45:09 -05:00

10 lines
533 B
TypeScript

// Probe every tool and tar option used by either transport before staging bytes.
// A host with plain tar support can still use the existing directory fallback.
export const providerPackExtractionProbe = [
"command -v zstd >/dev/null 2>&1",
"command -v sha256sum >/dev/null 2>&1",
"command -v cut >/dev/null 2>&1",
"tar_version=$(tar --zstd --ignore-zeros --no-same-owner --same-permissions --delay-directory-restore --version 2>/dev/null)",
'case "$tar_version" in *"GNU tar"*) true ;; *) false ;; esac',
].join(" && ");