fix(cli): resolve Bedrock SSO credentials - #12079
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files, incremental)
Notes: incremental diff since previous review (0a64070) only updates Previous Review Summary (commit 0a64070)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 0a64070)Status: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Notes: verified the reimplemented Reviewed by claude-sonnet-5 · Input: 20 · Output: 4K · Cached: 377.1K Review guidance: REVIEW.md from base branch |
…ck-sso-error fix(cli): resolve Bedrock SSO credentials

What changed
Build the packaged CLI with Bun and Node export conditions so AWS Bedrock can load the real Node credential chain instead of browser-only Symbol stubs. Replace the Solid scheduling primitives that become no-ops under Node conditions with timer-based implementations, preserving TUI session search and preview behavior.
Why
Kilo 7.4.0 changed minification in the VS Code extension bundle, but Bedrock credentials are resolved by the separately packaged CLI. The CLI still selected browser AWS/Smithy exports, causing SSO profiles to fail with errors such as
KC is not a functionwhereKCwas aSymbol.Upstream fixes
This is a targeted backport of the same approach OpenCode adopted upstream:
1e216e12dcswitched packaged builds from browser to Node conditions, fixing AWS/Smithy credential and event-stream resolution.c51a1588c7replaced Solid's browser-only scheduling primitive after Node conditions made it resolve to a server-side no-op.a0409e64d8later established the current upstreamconditions: ["bun", "node"]form used here.A straight cherry-pick is not suitable because Kilo has diverged from the relevant upstream tree: the TUI still lives under
packages/opencode/src/cli/cmd/tui, while current upstream moved it intopackages/tui, and Kilo has an additional session-preview leading/trailing scheduler with no direct counterpart in the upstream fix. Cherry-picking only #30873 would fix Bedrock but regress TUI search and preview scheduling. This PR therefore applies the equivalent build-condition change and ports the timer-based compatibility fix to both Kilo call sites.