Dashboard › cli › Distillation
d6a58313-b198-4d71-bbab-8e0d62e1ab72["lore_tm_v1_cGxfGjUFLfmzZH0d4b4FFgNp1NwYzcMhsKRa0dSfDJ0","lore_tm_v1_hMUK4B7KBWKwubQmXpTBGt7ltFdk_vevXfxzMpTWiVA","lore_tm_v1_GRLwibbT8eDJwRV0iIlwaS_o7lgnVeuyhmiHnDi3MH4","lore_tm_v1_YsD_W30ZAWs_QxhrJ50WT4--zls7WCPlNYI_Nqxe2Yg","lore_tm_v1_bfEJZRY5M-R2avyvHFJ9ZTw-cTi_qtSri0_edpGQNT8","lore_tm_v1_YI_HOpgcNITSNr6lyOgLMsvRz8sZUrx_sWhQBYx-cmE","lore_tm_v1_8pnW39Lr1dL9A4C0aYgN-xoLnZ9KOZb6D1IkTCoCe_8","lore_tm_v1_1zAE9vUTJ3GFbQr-h6UXRobRPkYPWZABsPNBBc7o35Y"]
/home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/src/commands/cli/upgrade.ts, resolveContext(version, flags) resolves { channel, versionArg } through resolveChannelAndVersion(version), compares against getReleaseChannel() to derive channelChanged, selects flags.method ?? (await detectInstallationMethod()), calls validateMethod(method, versionArg, channel, flags.offline), and returns { channel, versionArg, channelChanged, method }.persistChannel(channel, channelChanged, version) calls setReleaseChannel(channel) when the channel changed or version belongs to CHANNEL_VERSIONS; it must run after offline target resolution because setReleaseChannel() clears the version-check cache.startChangelogFetch() returns undefined without fetching when offline or when currentVersion === targetVersion; otherwise it calls fetchChangelog({ channel, fromVersion: currentVersion, toVersion: targetVersion, source }), converts a null result to undefined, and swallows all errors so changelog retrieval cannot block upgrades.buildCheckResultWithChangelog() starts with buildCheckResult(opts), sets result.offline = true when appropriate, awaits opts.changelogPromise, assigns it to result.changelog, and returns the result.sentry cli upgrade nightly command means βSwitch to nightly channel and update.βupgradeCommand documents these ordered examples: 1. sentry cli upgrade updates to latest on the persisted channel; 2. sentry cli upgrade nightly switches to nightly and updates; 3. sentry cli upgrade stable switches back to stable and updates; 4. sentry cli upgrade 0.5.0 installs a specific stable version; 5. sentry cli upgrade --check checks without installing; 6. sentry cli upgrade --force forces re-download when up to date; 7. sentry cli upgrade --method npm forces npm; 8. sentry cli upgrade --offline uses cached patches without network; 9. sentry cli upgrade --no-agent-skills skips reinstalling agent skills.upgradeCommand flags are check (boolean, default false), force (boolean, default false), offline (boolean, default false), "no-agent-skills" (boolean, default false), and optional parsed method supporting curl, brew, npm, pnpm, bun, and yarn.upgradeCommand.func(), online check-only results with a version difference fetch changelog before yielding; regular target resolution starts changelog fetching before download so both run in parallel.{ kind: "target" }, so flags.check is explicitly guarded to return buildCheckResultWithChangelog() rather than perform an upgrade.upgradeCommand.func() again skips an already-current target unless forced or changing channels; the returned result includes offline: true only when an offline mode was used.isDowngrade(CLI_VERSION, target); non-curl nightly upgrades call migrateToStandaloneForNightly(), while all other cases call executeStandardUpgrade().action: "downgraded" or "upgraded" and includes currentVersion, targetVersion, channel, method, forced, optional offline, optional migration warnings, and the awaited changelog./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade contains exactly 19 entries: .craft.yml, .git, .github/, .gitignore, .lore.md, .nojekyll, .npmrc, AGENTS.md, apps/, CHANGELOG.md, codemods/, docs/, LICENSE.md, node_modules/, package.json, packages/, pnpm-lock.yaml, pnpm-workspace.yaml, and README.md./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/.cursor/rules/ultracite.mdc was not found./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/AGENTS.md is triage β explore β plan β implement β review β ship; worker is a deprecated alias of implement.explore uses OpenAI gpt-5-mini; implement uses Moonshot kimi-k2.7-code; ship uses xAI Grok grok-build-0.1..lore.md when present; target repositories require reading their AGENTS.md / CONTRIBUTING.md first..agents/skills/, generated from the canonical skills/ tree by scripts/sync-skills.mjs.repo-setup before situation skills.packages/cli of a pnpm workspace, uses Node.js, pnpm, and Stricli, and its docs site lives in apps/cli-docs.package.json for the latest scripts before running project commands.packages/cli, or from the repository root through pnpm --filter sentry run <script>.pnpm install from the repository root; pnpm run dev; pnpm run cli -- <args>; pnpm run build; pnpm run build:all; pnpm run typecheck; pnpm run lint; pnpm run lint:fix before committing; pnpm run test:unit; pnpm run test:e2e; pnpm exec vitest run test/lib/foo.test.ts for one file while skipping generate steps; and pnpm exec vitest for watch mode.devDependencies, never dependencies, because everything is bundled at build time with esbuild and CI enforces the rule through pnpm run check:deps.pnpm add -D <package>, including the -D flag.@sentry/api provides API-response types, the project requires importing them directly from @sentry/api rather than creating redundant Valibot schemas in src/types/sentry.ts.node:* standard-library APIs; the project migrated away from Bun and forbids reintroducing Bun.* globals, bun:test, or bun CLI commands.readFile(path, "utf-8") and writeFile(path, content) from node:fs/promises; existsSync(path) from node:fs; spawn() / execFile() and execSync() from node:child_process; executable lookup through src/lib/which.ts; globbing through src/lib/scan/; sleep through await setTimeout(ms) from node:timers/promises; and JSON parsing via JSON.parse(await readFile(path, "utf-8")).mkdirSync(dir, { recursive: true, mode: 0o700 }) from node:fs; shell execution with user-controlled values should prefer execFileSync plus array arguments over string-based execSync to avoid shell injection.buildCommand from ../../lib/command.js, never directly from @stricli/core, because the wrapper adds telemetry, --json/--fields injection, and output rendering.async *func() generators, yield new CommandOutput(data), and may return { hint }; output.human receives the same data serialized as JSON, custom json flags are forbidden, and commands must not branch on flags.json or call stdout.write().src/lib/formatters/<domain>.ts, and files over approximately 400 lines should extract formatting helpers.stderr.write() is banned in command files by a GritQL rule; diagnostics use logger, while data output uses CommandOutput.buildRouteMap from ../../lib/route-map.js, never directly from @stricli/core; its automatic aliases are list β ls, view β show, delete β remove, rm, and create β new.9ba6bbb8227fcbd2521852d2311c82afac5e9573 tried src/github-release.ts, but the raw GitHub request returned HTTP 404; the repository tree showed the actual path is src/sources/github-release.ts.9ba6bbb8227fcbd2521852d2311c82afac5e9573 has source files src/bspatch.ts, src/contract.ts, src/discover.ts, src/errors.ts, src/events.ts, src/index.ts, src/patch-cache.ts, src/sources/ghcr.ts, src/sources/github-release.ts, and src/sources/oci.ts.9ba6bbb8227fcbd2521852d2311c82afac5e9573 has tests test/bspatch.test.ts, test/discover.test.ts, and test/sources.test.ts; project configuration includes package.json, package-lock.json, tsconfig.json, tsup.config.ts, and vitest.config.ts.