Dashboard › cli › Distillation
17f661c9-aa88-44cf-b882-669afaf5efb5["lore_tm_v1_EATRBAE05v5ltJ8MJrfxrmzPXBidpZwa-2Voc3ebDUU","lore_tm_v1_DVYbo1V-eT5Mg8o4x2ew0Ky7JbbskjlD9END4kIhlME","lore_tm_v1_TiKhIfR5nmcWTlZsWhBeCXIhVOyUnSvtzyzqybSwgDM","lore_tm_v1_ej0rdZidqznLBpNJBVD7lDvghyMVIUfeBX2WFJHPdxA","lore_tm_v1_ivS8Dj2JLAGZycb47O3KUQEEmEBlEJaHVHVKJ4F-41o","lore_tm_v1_yInHvVlhRmOaO9BNUM2MxSaslAzIRGVeiJeGL0gdQa8","lore_tm_v1_sgA8jhw2tWLnHE7GEle-i934CAJuN9pmZwjuxzrsYxU","lore_tm_v1_7xxd-kYyAypzeP_tScWNdCRroQCUQhcBU5acIfxhqv0","lore_tm_v1_JhDNFBtC4ZXjF6SobaZC3OZtojOk1SlxgHbgdYIsGKM","lore_tm_v1_ue-WpxSB5uBCohYWZSG0MQKUogS0FTVp9C_XdH8vqXk","lore_tm_v1_7HuHZkueHluOSbgSHNsKQyDv5OuAQvs-9T7QbDtn50I"]
Date: Sep 9, 2026
/home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade; explicitly instructed not to edit files.packages/cli/install and packages/cli/test/lib/install-script.test.ts.curl test design, and relevant shell pitfalls.AGENTS.md, .lore.md, packages/, apps/, node_modules/, package.json, pnpm-lock.yaml, and pnpm-workspace.yaml.repo-setup before situation skills.AGENTS.md defines the pipeline as triage β explore β plan β implement β review β ship; worker is a deprecated alias of implement.AGENTS.md says target repositories should have their AGENTS.md / CONTRIBUTING.md read first; skills live under .agents/skills/ and are generated from canonical skills/ by scripts/sync-skills.mjs.packages/cli/install is a 362-line Bash script using set -euo pipefail.packages/cli/install uses report_error() in a background subshell at lines 29β63, runs set +e, invokes curl -sf --max-time 2, and supports opt-out via SENTRY_CLI_NO_TELEMETRY=1.die() at packages/cli/install:67-72 prints the error, calls report_error, then runs wait 2>/dev/null || true before exiting 1; an ERR trap at line 75 reports unexpected failures.SENTRY_VERSION, -v, or --version; accepted examples include stable versions such as 0.42.2 and the literal nightly.packages/cli/install:213-275 is hard-coded to getsentry/cli: fetch anonymous GHCR token with scope repository:getsentry/cli:pull; fetch /v2/getsentry/cli/manifests/nightly; extract version; find the platform .gz layer digest; request /v2/getsentry/cli/blobs/${digest}; then download the unauthenticated redirect URL and pipe it through gunzip.curl -L on the authenticated GHCR blob request because forwarding the Authorization header to Azure Blob Storage returns 404.packages/cli/install:279-284 is hard-coded to https://api.github.com/repos/getsentry/cli/releases/latest and extracts "tag_name" with sed.version="$requested_version" directly, then strips a leading v.packages/cli/install:291-303 is https://github.com/getsentry/cli/releases/download/${version}/sentry-${os}-${arch}${libc_suffix}${suffix}.${url}.gz through curl -fsSL | gunzip > "$tmp_binary"; on any pipeline failure it attempts the raw $url, so it does not currently distinguish a missing gzip asset (404) from network, auth, malformed gzip, or other failures."$tmp_binary" cli setup with --install --method curl --channel stable|nightly, plus optional --no-modify-path, --no-completions, and --no-agent-skills.packages/cli/test/lib/install-script.test.ts has 119 lines and uses Vitest plus a temporary fake-tool directory prepended to PATH.curl emits a shell script that records setup arguments to SENTRY_TEST_ARGS_FILE; existing fake gunzip simply runs cat.bash packages/cli/install --version 0.31.0 --no-modify-path --no-completions --no-agent-skills and expects exit code 0 plus setup arguments in exact order: cli, setup, --install, --method, curl, --channel, stable, --no-modify-path, --no-completions, --no-agent-skills.packages/cli/install to contain a single-line UPGRADE_SOURCES=(...) assignment and compares its whitespace-separated entries with UPGRADE_SOURCES.map((source) => source.githubRepo) from packages/cli/src/lib/binary.js.packages/cli/src/lib/binary.ts:115-127 defines the exact ordered TypeScript source list: 1. Toolkit β githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@"; 2. legacy CLI β githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "".cli@ prefix, while legacy getsentry/cli stable release asset tags have no prefix.getBinaryDownloadUrl() in packages/cli/src/lib/binary.ts:234-240 constructs https://github.com/${source.githubRepo}/releases/download/${source.tagPrefix}${version}/${getPlatformBinaryName()}.packages/cli/src/lib/binary.ts:260-290 probes each ${getGitHubReleasesUrl(source)}/latest; returns the first successful source together with the successful response; advances only on HTTP 404; aborts on every other HTTP or network failure; and reports an error if every source returns 404.packages/cli/src/lib/binary.ts defines nightly versions as strings containing -dev.; documented format is X.Y.Z-dev.<unix-seconds>.packages/cli/src/lib/upgrade.ts defines rolling nightly tag NIGHTLY_TAG = "nightly" and documents pinned nightly GHCR tags in the form nightly-${version}, such as nightly-0.14.0-dev.1772661724.