chore(bolt): sync upstream dev

Merged
A-
1d ago
+7451-8214

User description

Summary

  • Merge upstream OpenCode dev through 1bf08ae46a.
  • Preserve Bolt network protections and CLI behavior while resolving merge conflicts.
  • Adapt Bolt-specific tests to upstream plugin-host changes.

Verification

  • bun run check
  • bun run script/test.ts test/tool-execute.test.ts test/tool-webfetch.test.ts
  • bun run script/test.ts test/plugin/bolt-agent-review.test.ts test/plugin/redact.test.ts test/snapshot.test.ts
  • bun test --timeout 30000 test/run/control-command.test.ts

Summary by cubic

Syncs upstream OpenCode dev through 1bf08ae46a into Bolt, resolving merge conflicts while preserving Bolt-specific network protections and CLI behavior. Bolt-specific tests are updated for upstream plugin-host changes.

Highlights

  • Adds run --archived to keep scripted or CI sessions out of inbox lists and implicit --continue.
  • Code Mode programs can now import globals by Node module name, e.g. import fs from "fs".
  • Cohere streams that end early now retry instead of failing.

Refactors

  • Shares provider settings conversion, Responses hosted tool definitions, cache breakpoint handling, and Vertex OAuth route setup across packages/ai.
  • Makes ResponseFold internal and stops copying events per chunk.
  • Realigns the app sidebar, tab spacing, and macOS traffic light positioning; adjusts timeline tail spacing.

PR Type

Enhancement, Bug fix, Tests


Description

  • Sync upstream OpenCode changes into Bolt

  • Deduplicate shared logic across core and AI

  • Streamline session handling and MCP integrations

  • Standardize test fixtures with shared helpers


Diagram Walkthrough

flowchart LR
  Upstream["Upstream OpenCode"] -- "Sync & Merge" --> Bolt["Bolt Repository"]
  Bolt -- "Refactor & Share" --> Core["packages/core"]
  Bolt -- "Refactor & Share" --> AI["packages/ai"]

File Walkthrough

Relevant files
Tests
11 files
tool-shell.test.tsSimplify temporary directory handling in ShellTool tests  +572/-678
config.test.tsUse withTempDir and withEnv test helpers                                  +399/-436
terminal_fixture.rsAdd mode field initialization to terminal fixture helper  +1/-0     
snapshot.test.tsRefactor snapshot tests to use withTempDir helper                +318/-357
tool-patch.test.tsRefactor patch tool tests to use withTempDir fixture          +262/-308
model-resolver.test.tsImport withEnv test helper                                                              +1/-21   
openai-responses-language-model.test.tsupdate Copilot model tests to use streaming API                    +21/-209
provider-cloudflare-workers-ai.test.tsupdate plugin host initialization in test suite                    +3/-25   
project.test.tsuse scoped temporary directory helper in project tests      +25/-97 
ripgrep.test.tssimplify temp directory setup in ripgrep unit tests            +102/-120
tool-search.test.tsuse temp directory wrapper helper across search tool tests +123/-144
Refactor
8 files
gemini.tsDeduplicate reasoning and text lifecycle logic in Gemini parser +26/-72 
scan.tsSimplify shell scanner regex matching and heredoc assignment +61/-87 
integration.tsShare attempt lifecycle and cancel logic across integrations +137/-202
github-copilot.tsUse shared credential active helper and scope provider hooks +4/-9     
anthropic-messages.tsrefactor media option parsing and cache breakpoint handling +44/-151
index.tssimplify MCP client lookup and server lifecycle logic        +67/-98 
schedule.tsshare schedule check evaluation logic and simplify creation +106/-157
projector.tsconsolidate session update queries using setSession helper +60/-144
Additional files
101 files
check-process-daemon.yml +1/-1     
effect.ts +1/-166 
index.ts +1/-166 
llm.ts +5/-6     
loop.ts +4/-3     
alibaba-responses.ts +19/-29 
bedrock-converse.ts +2/-5     
cohere-chat.ts +0/-4     
meta-responses.ts +1/-1     
open-responses-channel.ts +6/-26   
open-responses-continuation.ts +6/-13   
open-responses.ts +1/-4     
openai-responses.ts +7/-27   
bedrock-cache.ts +2/-6     
cache.ts +19/-2   
responses-hosted-tools.ts +40/-1   
tool-stream.ts +3/-14   
xai-responses.ts +4/-25   
baseten.ts +8/-22   
cerebras.ts +5/-18   
cloudflare-ai-gateway.ts +5/-24   
cloudflare-shared.ts +29/-0   
cloudflare-workers-ai.ts +4/-19   
cohere.ts +7/-16   
chat.ts +3/-11   
deepinfra.ts +6/-16   
deepseek.ts +5/-18   
digitalocean.ts +10/-7   
fireworks.ts +5/-18   
google-vertex-chat.ts +11/-40 
google-vertex-messages.ts +14/-38 
google-vertex-mistral.ts +11/-40 
google-vertex-responses.ts +11/-40 
google-vertex-shared.ts +61/-0   
google.ts +3/-12   
interactions.ts +3/-11   
groq.ts +5/-18   
meta.ts +7/-21   
minimax.ts +6/-21   
chat.ts +3/-11   
responses.ts +3/-11   
mistral.ts +5/-18   
moonshot.ts +5/-18   
messages.ts +3/-11   
responses.ts +3/-11   
openai-compatible-responses.ts +3/-10   
openai-compatible.ts +3/-9     
opencode.ts +5/-5     
openrouter.ts +10/-21 
settings.ts +54/-0   
togetherai.ts +5/-18   
typesafe-ai.ts +5/-5     
vercel-ai-gateway.ts +9/-23   
xai.ts +3/-12   
zai-coding-plan.ts +5/-18   
messages.ts +3/-11   
responses.ts +3/-11   
zai.ts +7/-24   
public.ts +166/-0 
client.ts +6/-5     
events.ts +74/-77 
messages.ts +0/-9     
tool-history.ts +0/-1     
anthropic-messages.test.ts +59/-0   
cohere.test.ts +3/-1     
openai-chat.test.ts +2/-2     
openai-responses.test.ts +40/-55 
response.test.ts +31/-3   
sanitize.test.ts +2/-2     
tool-stream.test.ts +1/-1     
tsconfig.types.json +0/-1     
timeline-virtualizer.spec.ts +4/-4     
tabs.spec.ts +98/-10 
timeline-cache.spec.ts +1/-1     
windows-menu.fixture.tsx +9/-1     
side-region.tsx +1/-1     
screen.tsx +1/-1     
session-identity-header.tsx +1/-1     
virtualizer.tsx +2/-2     
shell.tsx +8/-8     
sidebar-toggle.tsx +6/-7     
inbox.tsx +9/-6     
recently-closed-tabs-menu.tsx +6/-8     
tab-nav.css +31/-4   
titlebar.tsx +55/-37 
commands.ts +6/-0     
run.ts +1/-0     
run.ts +9/-5     
session-target.ts +1/-0     
archived.test.ts +80/-0   
session-target.test.ts +2/-0     
README.md +16/-1   
interpreter-support.md +6/-0     
codemode.ts +3/-2     
extension.ts +21/-16 
execute.ts +17/-6   
extensions.ts +19/-11 
globals.ts +10/-0   
interpreter.ts +85/-0   
modules.ts +35/-0   
Additional files not shown