Dashboard › cli › Distillation
22dd529c-189a-4289-b3aa-f078ceeea5d4["lore_tm_v1_k6NXhsKdrEv7vJ-1zhCkoA8FK3QaJiFIKJoaIxRnZc8","lore_tm_v1_yy4aqYa50IylUS31prDvmbjGO_JGgnJStnu6PeVMe-Q","lore_tm_v1_3MUXBvv3BSrP7icKURgIp_iXOt4dFj0CKLWBB4JVKA4","lore_tm_v1_5WMT4QeZTHsxZjzJDhl8kZvxN3uzrr1y9oRH90b9yIA"]
extractStableChain/githubReleaseSource and related exports in /home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/node_modules/binpatch/dist/index.d.ts and /home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/node_modules/binpatch/dist/index.js.extractStableChain(opts) in /home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/node_modules/binpatch/dist/index.js: it locates current/target releases, rejects missing or incorrectly ordered versions as no_patches, enforces MAX_STABLE_CHAIN_DEPTH, requires the target binary SHA-256 and a ${binaryName}.patch asset for every release, rejects patch totals above fullGzSize * SIZE_THRESHOLD_RATIO as over_budget, reverses patch URLs, and creates ordered { fromVersion, toVersion } steps.githubReleaseSource(config) in packages/cli/node_modules/binpatch/dist/index.js: it fetches ${releasesUrl}?per_page=${MAX_STABLE_CHAIN_DEPTH + 2} with Accept: application/vnd.github.v3+json and the configured User-Agent, reports release/patch fetch failures as network, requires ${binaryName}.gz, resolves the stable patch chain, downloads patches concurrently with Promise.all, and returns patches, totalSize, expectedSha256, and steps./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/src/commands/cli/upgrade.ts, which supports persisted stable and nightly release channels; positional "nightly"/"stable" values select a channel case-insensitively rather than representing literal versions.packages/cli/src/commands/cli/upgrade.ts, resolveTargetWithFallback() supports explicit offline resolution and automatic cached fallback only for method === "curl" plus UpgradeError.reason === "network_error"; channel switching with --offline and no explicit version throws unsupported_operation because the cached version belongs to the old channel.packages/cli/src/commands/cli/upgrade.ts, validateMethod() rejects method === "unknown", rejects pinned stable Homebrew versions with guidance to run brew upgrade getsentry/tools/sentry, and rejects --offline for every method except curl.packages/cli/src/commands/cli/upgrade.ts, latest resolution uses resolveLatestUpgradeVersion(channel) for nightly, curl, or brew; other methods use fetchLatestVersion(method, channel). Specific versions strip VERSION_PREFIX_REGEX; nightly pinned versions use lookupMethod = "curl".packages/cli/src/commands/cli/upgrade.ts, Windows executable spawning retries only EBUSY failures up to SPAWN_MAX_ATTEMPTS = 5, with SPAWN_RETRY_BASE_MS = 500 and delay calculated as attempt * SPAWN_RETRY_BASE_MS; other errors throw immediately.packages/cli/src/commands/cli/upgrade.ts, isEnoentSpawnError() recognizes Node code === "ENOENT" and Bun messages containing Executable not found in $PATH; spawnWithRetry() translates those into UpgradeError("execution_failed") advising the user to rerun sentry cli upgrade.packages/cli/src/commands/cli/upgrade.ts, a spawned replacement binary terminated by SIGKILL is treated as a likely macOS invalid-code-signature/quarantine problem and produces reinstall guidance: curl -sL https://sentry.io/get-cli/ | bash.packages/cli/src/commands/cli/upgrade.ts, new-binary setup invokes cli setup --quiet --method <method> --channel <channel> --no-modify-path, optionally adding --install, --ensure-auth-scopes, and --no-agent-skills; SENTRY_INSTALL_DIR pins placement when installDir is provided.packages/cli/src/commands/cli/upgrade.ts, curl upgrades normally remain in their current install directory; legacy ~/.sentry/bin installations move to the XDG-aligned directory only when that target directory is already on PATH.packages/cli/src/commands/cli/upgrade.ts, latest nightly downloads use the rolling NIGHTLY_TAG, while a specifically requested nightly version uses its own release tag.sentry cli upgrade nightly.packages/cli/src/commands/cli/upgrade.ts: non-curl installs on channel === "nightly" migrate to a standalone curl/GitHub binary, run setup with method: "curl", channel: "nightly", and install: true, then warn that the prior package-manager binary may appear earlier in PATH.npm uninstall -g sentry; pnpm → pnpm remove -g sentry; bun → bun remove -g sentry; yarn → yarn global remove sentry; brew → brew uninstall getsentry/tools/sentry.packages/cli/src/commands/cli/upgrade.ts, setReleaseChannel() must occur after offline target resolution because changing channels clears the version-check cache; online resolution persists the selected channel before network lookup.packages/cli/src/commands/cli/upgrade.ts, changelog fetching is best-effort, skipped when offline or already at the target version, runs in parallel with downloads, passes channel, fromVersion, toVersion, and optional source, and swallows failures.sentry cli upgrade — latest on persisted channel; 2. sentry cli upgrade nightly — switch to nightly and update; 3. sentry cli upgrade stable — switch back to stable and update; 4. sentry cli upgrade 0.5.0 — install a specific stable version; 5. sentry cli upgrade --check — check without installing; 6. sentry cli upgrade --force — force re-download; 7. sentry cli upgrade --method npm — force npm; 8. sentry cli upgrade --offline — use cached patches without network; 9. sentry cli upgrade --no-agent-skills — skip reinstalling agent skills.