perf(provision-kit): download app sources over Node HTTP instead of Undici
Summary
Use Node HTTP and TLS for app-source downloads in provision-kit. Keep approved-address pinning, URL-host TLS checks, scoped HTTP and HTTPS CONNECT proxies, redirect validation, streaming limits, and cancellation. Limrun’s SDK still bundles Undici on the 0.22 base.
Part of #4674.
Before / after
A reset while streaming previously failed without a network error code. It now returns COMMAND_FAILED with details.networkErrorCode: ECONNRESET. The same field carries system errors while waiting for headers and phase timeouts as connect-timeout, header-timeout, or body-timeout. Caller cancellation has its own outcome. Failed downloads remove the partial file.
Matched pnpm size against dcbf9d8bfa: 206 bytes smaller compressed and 1,931 bytes larger unpacked and installed. The Undici code moves to Limrun’s tunnel chunk. The larger reduction depends on #4846.
Validation
At ba68e9445d, 79 focused tests passed on Node 22.22.2. Packed smoke verified pinned CONNECT, artifact cleanup, and truncated-body errors. pnpm check:affected --run --base origin/0.22 --head HEAD passed all locally runnable gates. GitHub runs the hosted-only checks.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.