(fetchImpl: typeof fetch)
| 70 | } |
| 71 | |
| 72 | async function fetchUpdateManifestFromCdn(fetchImpl: typeof fetch): Promise<UpdateManifest> { |
| 73 | const response = await fetchWithTimeout(fetchImpl, KIMI_CODE_CDN_LATEST_JSON_URL); |
| 74 | if (!response.ok) { |
| 75 | throw new Error(`CDN /latest.json returned HTTP ${response.status}`); |
| 76 | } |
| 77 | return UpdateManifestSchema.parse(JSON.parse(await response.text())); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Fetch the rollout manifest, falling back to the plain-text `/latest` when |
no test coverage detected