sync: upstream v1.18.4 (d36a2d898 on dev)

Merged
AL
4mo ago
+302451-110296

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)

FileResolution
6 .github/workflows/*.yml, README.{zh,zht}.md, customize-opencode.md, core/test/plugin/skill.test.tsRe-deleted (PR #14 policy / translation purge / customize-opencode removal)
bun.lockTook 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.jsonKept @browser-use/browsercode-core, took version 1.18.4
AGENTS.mdMerged upstream SDK/Protocol/dependency-direction guidance, kept fork branch note
core/src/plugin/boot.tsDeleted with upstream (our SkillPlugin removal moves to skill.ts)
core/src/plugin/skill.tsRe-neutered to no-op in upstream's new define shape (customize-opencode skill stays removed)
app/index.html, ui/site.webmanifestKept BrowserCode titles, took new viewport/manifest fields
app/titlebar.tsxTook upstream (conflicting code was stale upstream code, no fork divergence)
tui/tips-view.tsxKept bcode-branded tips with upstream's shortened phrasing; docker/OpenCode-Zen upsell tips stay out
opencode/script/build.tsKept skills embed + bcode- asset naming, took treeSitterWorker text embed
opencode/src/agent/agent.tsKept browser-sessions/agent-workspace/browser-skills whitelist globs, took upstream's gated referenceDirs
opencode/src/installation/index.tsImport union; bcode.sh install/upgrade divergences intact
opencode/src/tool/registry.tsDropped our defaultLayer with upstream; node now pipes FetchUse.layer into its own layer (httpClient dep satisfies it)
test/session/prompt.test.tsTook upstream node wiring (FetchUse satisfied via ToolRegistry.node)
test/tool/webfetch.test.tsUpstream node wiring + Config.node added to group + FetchUse layer merged (our webfetch routing needs both)
mcp/oauth-callback.ts, plugin/openai/codex.tsTook 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: clean
  • bun run typecheck (filtered): 16/16 passed
  • test/tool/webfetch.test.ts: 4/4 pass
  • test/session/prompt.test.ts: ~30 failures on the dev Mac — pre-existing, not a sync regression: our pre-sync main fails identically (29) while pristine upstream d36a2d898 passes 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 LayerNode graphs; defaultLayer exports removed.
    • OAuth callbacks consolidated to core/src/oauth/page.ts (ships upstream branding per policy).
    • build.ts embeds the tree‑sitter worker; gated referenceDirs; experimental codemode.
    • 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.md and client codegen notes.
  • Dependencies

    • Bumped @effect/opentelemetry, @effect/platform-node, @effect/sql-sqlite-bun to 4.0.0-beta.83; refreshed root bun.lock.
    • Added @remotion/cli, react@19, remotion@4 for artifacts/glm52-rise-video.
    • .github/actions/setup-bun ensures Node 24 for node-gyp; added SUPPORT_API_KEY secret and links; Athena query scan cap; Linux desktop entry; relaxed Bun check in Nix.
    • Added packages/client/src/generated/ and packages/client/src/generated-effect/ to .prettierignore.