github Hope2333/opencode-termux Push261105
Push261105 — v2 web UI archive repair (2.0.25→2.0.31) + v1 1.19.5 native restored

3 hours ago

Push261105 — v2 web UI archive repair (2.0.25→2.0.31) + v1 1.19.5 native restored

English · 中文版 · 繁體中文 · 日本語 · Español

Overview

8 native versions, 16 packages (deb + pacman per version):

  • v2 native 2.0.25–2.0.31 (7 versions) — web UI /_assets/ restored.
    Upstream 2.0.25 rewrote the skipBuild guard in app-assets.ts; the old
    exact-string anchor silently stopped matching, the patch was skipped, and the
    runtime shipped with zero embedded /_assets/ entries — serve and pair
    returned 404 on every /_assets/* request (white screen after login). The
    fix: regex anchor instead of exact match, hard failure when the anchor is
    missing, and a post-build strings assertion.
  • v1 native 1.19.5 — restored after being withdrawn in the previous
    batch. Root cause: bun ≥1.4.1 writes module graphs with UTF-16 bodies
    (encoding=2) and 38 Text loader modules; the bun 1.4.0 base understands
    neither (Invalid character '\0' / Unexpected identifier). Fixed by the
    graph post-processor tools/transplant/fix_graph_for_bun140.py (UTF-16→UTF-8,
    Text→export default "...", namespace shim at consumption points, relocated
    modules parked in a dead zone) — no bun recompile, no dependency on upstream
    bun#47906. Packages also bundle the PTY splice
    (lib/opencode1/pty/{librust_pty_arm64_musl_patched.so, shim.so}), so
    POST /api/pty works.

Verification

Check Result
strings -a <runtime> | grep -c '/_assets/' on v2 2.0.25–2.0.31 7 per version
serve serves /_assets/* with 200 pass
v1 1.19.5 TUI renders on screen pass
v1 1.19.5 POST /api/pty returns a running process pass

Self-check for installed v2 native packages:

strings -a $PREFIX/bin/opencode | grep -c '/_assets/'
# must be > 0

Known Issues

  • v1 1.19.5 first paint on older devices may wait ~75 s during bootstrap;
    a resize triggers a redraw and everything is normal afterwards.
  • v1 1.19.5 and 1.19.4 are interchangeable for rollback.
  • Upstream bun#47906 remains open; this build does not depend on it.
  • Within one generation, native / wrapper / compressed are mutually exclusive;
    opencode1* (v1) and opencode* (v2) can coexist. All v1 packages are
    versioned below 2.0.0.

Install

curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencode

pacman -S opencode     # v2 mainline
pacman -S opencode1    # v1 mainline (coexists with v2)

Links

Don't miss a new opencode-termux release

NewReleases is sending notifications on new releases.