Skip to content

chore: sync with upstream v1.18.35 - #1

Open
HenriVSL wants to merge 6166 commits into
Chetic:devfrom
HenriVSL:sync/upstream-20261007
Open

HenriVSL wants to merge 6166 commits into
Chetic:devfrom
HenriVSL:sync/upstream-20261007

Conversation

@HenriVSL

@HenriVSL HenriVSL commented Oct 7, 2026

Copy link
Copy Markdown

Syncs the offline fork from upstream v1.2.13 → v1.18.35 (~6.2k upstream commits) and re-ports offline support onto upstream's new architecture (core/tui/server packages, Effect HttpApi server, embedded web UI).

Reviewing: the fork's own changes are small. git grep -n offline-fork lists the 6 guarded upstream files, and the "How Offline Mode Works" table in AGENTS.md explains each mechanism. Everything else is upstream.

Now handled by upstream features (fork code removed)

  • Web UI: embedded in the binary upstream, so deps/app and static serving are removed
  • Models: the bundled models.json is wired in through OPENCODE_MODELS_PATH, and the build snapshot uses the same file
  • ripgrep/clangd/rust-analyzer: found via PATH set by the opencode-offline wrapper
  • Version display: <upstream>-offline.<n>+<sha> via OPENCODE_VERSION at build time; the database stays opencode.db

Fork code

  • core/src/offline.ts: resolves bundled deps; Npm.which/Npm.add use bundled packages and Npm.install is skipped (no registry access)
  • pyright and typescript-language-server run through deps/bin shims on the opencode binary (BUN_BE_BUN=1), so hosts need no node
  • Bundled tsserver fallback; LSP enabled by default in offline mode (upstream now defaults it off)
  • BUN_TMPDIR in the wrapper so embedded native libraries load on noexec /tmp (the TUI crashed there before)
  • /curl ported as a raw server route plus a TUI builtin plugin
  • The bundle pins typescript@6, because npm's latest (7.x) has no tsserver.js

Testing

  • Container suite (RHEL9, no network, noexec /tmp): 43/43 pass, including real LSP diagnostics for Python, TypeScript and C, TUI start, bundled models, and the /curl route
  • New optional local-LLM section: prompt, /curl dump and replay, tested against LM Studio (Gemma 4 26B); an agent edit task also succeeded
  • opencode lsp/provider/server/offline tests: 1101 pass, 0 fail; new unit tests pass; full monorepo typecheck passes

Notes

  • A request sent while the server is still starting can stall. This is upstream behavior; the test suite uses timeouts.

🤖 Generated with Claude Code

thdxr and others added 30 commits August 31, 2026 22:45
…eplay fixes (anomalyco#45520)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
rekram1-node and others added 30 commits September 30, 2026 15:39
…52415)

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: adamdotdevin <2363879+adamdotdevin@users.noreply.github.com>
Merge upstream release v1.18.35 (from v1.2.13, ~6.2k upstream commits) and
re-port the offline fork onto the new architecture (core/tui/server packages,
Effect HttpApi server, embedded web UI).

Offline support now relies on upstream mechanisms where possible:
- web UI is embedded in the binary upstream; deps/app and static serving removed
- bundled models.json via OPENCODE_MODELS_PATH; build snapshot uses the same file
- ripgrep/clangd/rust-analyzer found via PATH set by the opencode-offline wrapper
- version shown as <upstream>-offline.<n>+<sha> via OPENCODE_VERSION at build

Fork code (marked offline-fork):
- core/offline.ts: deps resolution; Npm.which/add use bundled packages, Npm.install skipped
- pyright/typescript-language-server run through deps/bin shims on the opencode
  binary (BUN_BE_BUN=1), so target hosts need no node
- bundled tsserver fallback; LSP enabled by default in offline mode
- BUN_TMPDIR in the wrapper so embedded native libs load on noexec /tmp
- /curl debug command ported as a raw server route + TUI builtin plugin

Container suite extended: real LSP diagnostics (Python/TS/C), noexec /tmp,
TUI start, bundled models, /curl route, optional local LLM end-to-end test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet