sync: upstream v1.18.4 (d36a2d898 on dev)
Summary
Brings anomalyco/opencode up to v1.18.4 (d36a2d898 on dev). 921 upstream commits since 8716c4309 (v1.17.8, 2026-06-19).
Major upstream themes: layer-node wiring completion (all runtimes/tests built from LayerNode graphs, defaultLayer exports removed), plugin boot moved from core/src/plugin/boot.ts into plugin/internal.ts, OAuth callback HTML centralized into core/src/oauth/page.ts, tree-sitter worker embedded as text in build.ts, gated referenceDirs, experimental codemode tool.
Conflicts resolved (28)
| File | Resolution |
|---|---|
6 .github/workflows/*.yml, README.{zh,zht}.md, customize-opencode.md, core/test/plugin/skill.test.ts | Re-deleted (PR #14 policy / translation purge / customize-opencode removal) |
bun.lock | Took upstream, regenerated via bun install |
package.json (root) | Kept turbo 2.10.4 + toolbeam patch (PR #109), took upstream effect + virtual-core 3.17.3 patches |
packages/opencode/package.json | Kept @browser-use/browsercode-core, took version 1.18.4 |
AGENTS.md | Merged upstream SDK/Protocol/dependency-direction guidance, kept fork branch note |
core/src/plugin/boot.ts | Deleted with upstream (our SkillPlugin removal moves to skill.ts) |
core/src/plugin/skill.ts | Re-neutered to no-op in upstream's new define shape (customize-opencode skill stays removed) |
app/index.html, ui/site.webmanifest | Kept BrowserCode titles, took new viewport/manifest fields |
app/titlebar.tsx | Took upstream (conflicting code was stale upstream code, no fork divergence) |
tui/tips-view.tsx | Kept bcode-branded tips with upstream's shortened phrasing; docker/OpenCode-Zen upsell tips stay out |
opencode/script/build.ts | Kept skills embed + bcode- asset naming, took treeSitterWorker text embed |
opencode/src/agent/agent.ts | Kept browser-sessions/agent-workspace/browser-skills whitelist globs, took upstream's gated referenceDirs |
opencode/src/installation/index.ts | Import union; bcode.sh install/upgrade divergences intact |
opencode/src/tool/registry.ts | Dropped our defaultLayer with upstream; node now pipes FetchUse.layer into its own layer (httpClient dep satisfies it) |
test/session/prompt.test.ts | Took upstream node wiring (FetchUse satisfied via ToolRegistry.node) |
test/tool/webfetch.test.ts | Upstream node wiring + Config.node added to group + FetchUse layer merged (our webfetch routing needs both) |
mcp/oauth-callback.ts, plugin/openai/codex.ts | Took upstream verbatim — see branding note |
Branding note
Upstream centralized all OAuth callback pages into core/src/oauth/page.ts, which carries OpenCode branding (wordmark SVG + copy). Our previous per-file BrowserCode HTML blobs are gone with this sync. These pages are browser-facing (OAuth flows only), and fork policy is to rebrand terminal-facing surfaces only — so this ships as upstream. If we ever want it back, it is now a single-file change instead of three.
Step 3a
Six reintroduced upstream workflows re-deleted during conflict resolution; .github/workflows/ remains release.yml + typecheck.yml only. No new unclassified workflows this window.
Verification
bun install: cleanbun run typecheck(filtered): 16/16 passedtest/tool/webfetch.test.ts: 4/4 passtest/session/prompt.test.ts: ~30 failures on the dev Mac — pre-existing, not a sync regression: our pre-syncmainfails identically (29) while pristine upstreamd36a2d898passes 56/56 on the same machine. A fork divergence hangs these tests locally; follow-up issue recommended.
Yellow-zone audit
Upstream touched 15 Yellow files this window (AGENTS.md, core/src/global.ts, script/build.ts, agent.ts, config.ts, installation/index.ts, mcp/index.ts, plugin/index.ts, provider.ts, session/{processor,session}.ts, skill/index.ts, tool/registry.ts, tui/app.tsx, tui/routes/session/index.tsx). All BrowserCode customizations verified present post-merge: app = "bcode", bcode config filenames + bcode.sh schema/install URLs, provider attribution headers, Laminar plugin, FetchUse wiring, skills materialization, browser_execute registry + TUI display, typed omitted-image messages.
Summary by cubic
Sync to upstream v1.18.4. Adopts the new LayerNode runtime wiring, centralized OAuth page, plugin boot relocation, and tree‑sitter worker embedding, while keeping BrowserCode customizations and pruning upstream workflows.
-
New Features
- All runtimes/tests build from
LayerNodegraphs;defaultLayerexports removed. - OAuth callbacks consolidated to
core/src/oauth/page.ts(ships upstream branding per policy). build.tsembeds the tree‑sitter worker; gatedreferenceDirs; experimentalcodemode.- Added a production-only performance suite under
packages/app/e2e/performance(Playwright configs, timeline/navigation probes, Chrome trace capture). - Fork policy: retained BrowserCode asset names, FetchUse wiring, skills removal; removed reintroduced upstream workflows; updated
AGENTS.mdand client codegen notes.
- All runtimes/tests build from
-
Dependencies
- Bumped
@effect/opentelemetry,@effect/platform-node,@effect/sql-sqlite-bunto4.0.0-beta.83; refreshed rootbun.lock. - Added
@remotion/cli,react@19,remotion@4forartifacts/glm52-rise-video. .github/actions/setup-bunensures Node 24 fornode-gyp; addedSUPPORT_API_KEYsecret and links; Athena query scan cap; Linux desktop entry; relaxed Bun check in Nix.- Added
packages/client/src/generated/andpackages/client/src/generated-effect/to.prettierignore.
- Bumped