Dashboard › cli › Distillation
58c0824e-b6b0-43cf-947f-178305280f51["lore_tm_v1_0AzyyBlrxqQoz31WUMG4_qR73XXhlvLYLBVKgOdzuJU","lore_tm_v1_-Tb9WFZkVJu_IhCq3yOGx4Velj1lK1pg4S9PEhGCajc"]
Date: September 10, 2026
null on errors; errors are caught and reported to Sentry.pendingAbortController: AbortController | null and exports abortPendingVersionCheck().maybePrefetchPatches() and calls prefetchNightlyPatches(latestVersion, signal, source) for nightly patch prefetching./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/src/commands/cli/upgrade.ts, the commandβs func() calls resolveContext(version, flags), then runs resolveTargetWithFallback() inside withProgress({ message: "Checking for updates...", json: flags.json }, ...).upgrade.ts, when resolveTargetWithFallback() returns kind === "done", the command returns its result immediately; for an online action === "checked" result where currentVersion !== targetVersion, it first obtains result.changelog through startChangelogFetch() using channel, CLI_VERSION, result.targetVersion, offline: false, and resolved.source.upgrade.ts, once a target is resolved, startChangelogFetch() begins before the upgrade so changelog retrieval runs in parallel with the download.upgrade.ts, offline --check can produce kind: "target" from resolveTargetWithFallback(); if (flags.check) prevents an actual upgrade and returns buildCheckResultWithChangelog() instead.upgrade.ts, the command returns action: "up-to-date" without upgrading when CLI_VERSION === target, unless flags.force is set or channelChanged is true.upgrade.ts, downgrade detection uses isDowngrade(CLI_VERSION, target) and determines the final action as "downgraded" or "upgraded".upgrade.ts, nightly upgrades are GitHub-only: when channel === "nightly" and method !== "curl", migrateToStandaloneForNightly() migrates the installation to a standalone binary and returns possible warnings.upgrade.ts, all upgrades other than the non-curl nightly migration use executeStandardUpgrade() with method, channel, versionArg, target, this.process.execPath, this.process.argv?.[1], this.process.env.PATH, offline, flags.json, flags["no-agent-skills"], and source.upgrade.ts, the final UpgradeResult includes action, currentVersion: CLI_VERSION, targetVersion: target, channel, method, forced: flags.force, conditional offline, possible migration warnings, and the awaited changelog.