Dashboard › cli › Distillation
c73bc316-ccf0-45ca-9e50-942383509404["lore_tm_v1_aiiBphsVChtrjud9dihu8B-uIzWMbg5j5RPGoRkRYTE","lore_tm_v1_otYhtUm3AvJ1DTWq_sltgz27H48da0YFVhWyY7DurSQ","lore_tm_v1_ceDub8OT5Qw91JIRMpgCCow4toTZN6PPAUMO1d912Sk","lore_tm_v1_fmqttr6ON4DecQ30WB__V85b2Eeajqoyys7BfH4SbiU","lore_tm_v1__UxH6Jl_c_ewOpN0r6JLIpAGQt9lEP6W9WCg_fPmf1E","lore_tm_v1_5M7qamftv_i-MjJ2kmGoFgs4eqjf2FeF_gzuj7iSR1A","lore_tm_v1_MrH-5uitBlGEL-dqD00YzYWDK7ex4Kyppqxl828wIbs","lore_tm_v1_nVwzbowsvk9mcPKDCompHMrBdY0PsKyIPzUNeIY5Xxs"]
Date: September 9, 2026
packages/cli/src/lib/constants.ts declares SENTRY_CLI_VERSION: string | undefined; CLI_VERSION resolves to SENTRY_CLI_VERSION when defined and otherwise "0.0.0-dev". getCliEnvironment(version: string = CLI_VERSION) defaults to that value, and the user-agent string includes sentry-cli/${CLI_VERSION} (${process.platform}-${process.arch}) ${runtime}.binpatch package directory packages/cli/node_modules/binpatch contains exactly 4 entries: dist/, LICENSE, package.json, and README.md; dist/ contains index.d.ts, index.js, and index.js.map.packages/cli/node_modules/binpatch/dist/index.js exports BinpatchError, MAX_NIGHTLY_CHAIN_DEPTH, MAX_OUTPUT_SIZE, MAX_STABLE_CHAIN_DEPTH, OciClient, PATCH_TAG_PREFIX, SIZE_THRESHOLD_RATIO, addDiffChunk, applyPatch, applyPatchChainInMemory, applyPatchToMemory, chainFileName, extractSha256, extractStableChain, filterAndSortChainTags, getPatchFromVersion, getPatchTargetSha256, getStableTargetSha256, ghcrSource, githubReleaseSource, makeCache, offtin, parsePatchHeader, patchFileName, resolveAndApply, safeProgress, and validateChainStep.DeltaUnavailableReason.offline: true to βnever touch the network β cache hit or bust.βonProgress to expose phase/bytes/done progress events that are βNever rendered by the library.βpackages/cli/node_modules/binpatch/dist/index.d.ts, SourceStrategy.resolveChain(currentVersion, targetVersion, signal?, report?) returns Promise<PatchChain | null>.DeltaSource is exactly "cache" | "network" | "offline_miss".DeltaUnavailableReason is exactly "no_patches" | "malformed_chain" | "too_long" | "over_budget" | "network": no_patches means no patch tags/assets in range; malformed_chain means a published but unusable chain such as a missing <binaryName> patch layer, bad from-version back-pointer, missing target SHA-256 annotation, or other validation failure; too_long exceeds maximum chain depth; over_budget exceeds the cumulative patch size-ratio gate; and network denotes transient resolution failure.DeltaTelemetry supports onResolved({ source, chain }), onOfflineMiss(), and onUnavailable(reason); the library remains telemetry-agnostic.ResolveAndApplyOpts contains source, currentVersion, targetVersion, oldPath, destPath, optional cache, optional offline, optional onProgress, optional telemetry, and optional signal.resolveAndApply(opts) checks the patch cache first, then the source unless offline; it applies the chain to oldPath, verifies SHA-256, writes to destPath, and returns DeltaResult | null. It throws only for genuine apply/verification failures such as a SHA mismatch or corrupt patch, which callers treat as a reason to fall back to a full download.OciClientConfig injects registry, repo, userAgent, and optional fetch; custom fetch may route registry traffic through a proxy or custom-CA-aware agent such as one honoring NODE_EXTRA_CA_CERTS.OciClient provides anonymous read-only OCI operations: getAnonymousToken(signal?), fetchManifest(token, tag, signal?), listTags(token, prefix?, signal?), downloadBlob(token, digest, signal?), and downloadBlobBuffer(token, digest, signal?).OciClient.downloadBlob() manually follows the GHCR HTTP 3xx redirect without forwarding the Authorization header; automatic forwarding to Azure Blob Storage would produce HTTP 404.ghcrSource(config) resolves nightly patch chains from OCI tags named <patchTagPrefix><version>. Their manifests use annotation from-version=<prev>, annotation sha256-<binaryName>=<hex>, and a patch layer titled <binaryName>.patch; the target imageβs <binaryName>.gz layer supplies the full compressed size for the ratio gate.GhcrSourceConfig extends OciClientConfig with binaryName, targetTag(version), compareVersions(a, b): -1 | 0 | 1, and optional instrument("step-name", () => fetchCall()) for per-request tracing around token exchange, manifest fetching, tag listing, and blob downloads.getPatchFromVersion(manifest), getPatchTargetSha256(manifest, binaryName), filterAndSortChainTags(allTags, currentVersion, targetVersion, compareVersions), and validateChainStep(manifest, { expectedFrom, patchLayerName, sizeLimit }); chain-step failure reasons are "malformed" and "over_budget", while nightly chain failures are "malformed_chain" and "over_budget".githubReleaseSource(config) resolves stable chains from three assets per release: 1. <binaryName> provides the expected SHA-256 digest, 2. <binaryName>.gz provides the full-download size for the ratio gate, and 3. <binaryName>.patch provides the delta from the previous release. Releases between current and target are ordered oldest-first and capped by MAX_STABLE_CHAIN_DEPTH and SIZE_THRESHOLD_RATIO.GitHubAsset fields name, size, optional digest, and browser_download_url; GitHubRelease fields tag_name, assets, and optional body; StableChainInfo fields patchUrls, expectedSha256, and ordered steps containing fromVersion and toVersion.