spawn/packages
B 56d0d5fd63 refactor(orchestrate): extract 3 helpers from 255-line runOrchestration
De-duplicate model ID resolution, env config building, and agent install
logic that was copied between the fast-mode and sequential orchestration
paths. Changes to these operations now only need to happen in one place.

- resolveModelId(agentName, agent) — reads MODEL_ID / preferences / default
- buildEnvConfig(agent, apiKey, modelId, betaFeatures, spawnId) — builds .spawnrc
- installAgentWithRetry(cloud, agent, agentName, options, allowTarball) — tarball-first with retry

The local-cloud tarball guard is preserved: fast path passes useTarball
directly (already gated by cloudName !== "local"), sequential path passes
cloudName !== "local" && useTarball.

Agent: complexity-hunter
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-14 14:51:47 +00:00
..
cli refactor(orchestrate): extract 3 helpers from 255-line runOrchestration 2026-05-14 14:51:47 +00:00
shared fix: rethrow normalized Error in tryCatchIf/asyncTryCatchIf (#2930) 2026-03-23 19:33:05 -07:00