Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .release/v2.3.2-highlights.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Highlights

- **Timed-out commands keep running**: a shell command still running when its timeout expires moves to the background instead of being killed.
- **Subagents work in the background**: they return their session ID straight away and report back when idle, so you keep working in the parent session.
- **Quieter transcripts**: each run of tool calls and thoughts collapses into one activity row; set verbosity to `medium` or `high` to see every step again.
- **GPT-6.2 caching fixed**: the system prompt is cached from the second step, so Copilot `gpt-6.2-sol` drops from about 14,000 uncached tokens per step to 3.
- **Compaction without the wait**: the summary is written in the background, so your next prompt does not pause for it.
37 changes: 37 additions & 0 deletions .release/v2.3.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# OpenCode 2.3.2 for Termux

## What changed upstream (2.2.7 → 2.3.2)

- **Subagents run in the background**: a subagent returns its session ID immediately, keeps working, and reports to the parent whenever it goes idle. Several can run at once while you keep typing in the parent session, and one that goes idle with its own background work still running says so instead of looking finished.
- **Quieter transcripts by default**: each run of tool calls and thoughts collapses into one activity row. Verbosity now defaults to `low`; set **Verbosity** to `medium` or `high` in settings, or `session.verbosity` in the TUI config, to see every step. An existing setting is kept.
- **Timed-out shell commands keep running**: a command still running when its timeout expires moves to the background instead of being killed, so long builds finish and report back. The `shell_timeout_background` flag is gone, and a foreground `timeout: 0` now means the default 120 seconds.
- **Background compaction**: as a session nears automatic compaction the summary is written in the background, so the next prompt does not wait for it. Turn it off with `compaction.background: false`; an unused background summary still costs tokens.
- **GPT-6.2 prompt caching**: the system prompt is sent as a leading developer message on every Responses route — OpenAI, Copilot, Zen, Azure, OpenRouter — so it is cached from the second step. On Copilot `gpt-6.2-sol`, uncached input per step dropped from about 14,000 tokens to 3, and `/responses/compact` reads the same cached prefix.
- **GPT-6.2 with ChatGPT sign-in**: 6.2 Sol and Astra, plus their fast variants, appear in the model picker.
- **`CLAUDE.md` is read again** in any directory that has no `AGENTS.md`, with `~/.claude/CLAUDE.md` as the global fallback; `OPENCODE_DISABLE_CLAUDE_CODE` skips it.
- **Local model discovery is more patient**: Ollama, LM Studio and vLLM get 15 seconds per request instead of 1, so remote or tunnelled endpoints list their models and a slow endpoint no longer delays the rest.
- **Providers can present a client certificate** for gateways that require mutual TLS, with `settings.tls` accepting `{file:}` and `{env:}` like `apiKey`. Agents are told when a session is a fork, tool output truncation keeps the beginning of the output, and plugin-provided themes update live.
- **Code Mode returns simpler results**: `read` gives `text`, `directory` or `media` instead of base64, `write` and `edit` return their confirmation as a string, `patch` returns an empty result, and `skill` returns the skill directory and content.

Desktop-only changes in these releases (Jump to message, the Recent and customizable session sidebars, plugin update buttons, Mermaid zoom, comment-on-selection, queued-prompt shortcuts) do not apply to this Termux build.

## What changed in this Android build

- **OpenTUI 0.8.4** replaces 0.8.1. It is still built here for bionic against Zig 0.17.0 with the same `--libc` schema and the `limits.h` shadow, and one stripped renderer asset still ships instead of the four Bun emits.
- **The package is unchanged**: the same bundle at `$PREFIX/lib/opencode/` with a launcher at `$PREFIX/bin/opencode`, run by Termux's `bun`, with `bun`, `libc++` and `ripgrep` declared as dependencies rather than embedded.
- **Publishing is one tag run**: pushing `v2.3.2` builds, verifies, signs the APT index and releases in the same workflow run, so the published files are the ones that run built. A broken release gets a higher `package_revision` and a tag of its own (`v2.3.2-2`) instead of a silent overwrite.
- **Bionic's pointer tags still reach the FFI untouched**: the Scudo `pointer tag … was truncated` abort stays fixed.

## Install

```sh
pkg install bun ripgrep libc++
curl -fsSL https://raw.githubusercontent.com/Spectra010s/opencode-termux/native-android/install.sh | sh
```

Or through the signed APT source, so `pkg install opencode` picks up new versions:

```sh
curl -fsSL https://raw.githubusercontent.com/Spectra010s/opencode-termux/native-android/setup-apt.sh | sh
pkg install opencode
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The setup script adds this project's signed source and its public key; it does n

## Upgrade

`opencode upgrade` (or its `opencode update` alias, or `/update` in the TUI) runs this project's installer for the requested version. Under APT, use `apt update && apt install --only-upgrade opencode` instead: the launcher refuses to replace a package-owned file.
`opencode upgrade` (or its `opencode update` alias, or `/update` in the TUI) runs this project's installer for the requested version. Under APT, use `pkg update && pkg install opencode` instead: the launcher refuses to replace a package-owned file.

## Uninstall

Expand Down
4 changes: 2 additions & 2 deletions docs/ops/apt-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ failure here means the release is already suspect.
`setup-apt.sh`.

`Hash Sum mismatch` — the `Packages` file and the deb disagree, usually because
a release was replaced. `apt clean && apt update`.
a release was replaced. `apt clean && pkg update`.

`404` on the deb — `Packages` points at a basename that the release does not
have. Compare `Filename:` in the index with `gh release view`.
Expand All @@ -74,5 +74,5 @@ version, because the index only names the newest release asset.
```sh
rm -f "$PREFIX/etc/apt/sources.list.d/opencode-termux.list"
rm -f "$PREFIX/etc/apt/keyrings/opencode-termux.gpg"
apt update
pkg update
```
18 changes: 10 additions & 8 deletions tests/unit/install-deps.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Unit tests for install.sh's runtime dependency handling.
#
# 2.2.7 runs on Termux's bun package instead of shipping a compiled ELF, so bun
# and ripgrep are real dependencies: the installer must install them through
# ripgrep and libc++ are real dependencies: the installer must install them through
# pkg rather than handing the user a second command to run.

load '../lib/helper'
Expand Down Expand Up @@ -50,31 +50,33 @@ teardown() {
clean_tmpdir
}

@test "installs missing bun and ripgrep through pkg" {
@test "installs missing bun, ripgrep and libc++ through pkg" {
run env PATH="$TOOLS" "$BASH_BIN" "$INSTALLER"
[[ "$output" == *"Installing dependencies: bun ripgrep"* ]]
[ "$(cat "$TEST_TMPDIR/pkg-args")" = "install -y bun ripgrep" ]
[[ "$output" == *"Installing dependencies: bun ripgrep libc++"* ]]
[ "$(cat "$TEST_TMPDIR/pkg-args")" = "install -y bun ripgrep libc++" ]
}

@test "skips pkg when the caller opts out" {
run env PATH="$TOOLS" OPENCODE_INSTALL_DEPS=0 "$BASH_BIN" "$INSTALLER"
[ "$status" -eq 1 ]
[[ "$output" == *"opencode needs: bun ripgrep"* ]]
[[ "$output" == *"pkg install bun ripgrep"* ]]
[[ "$output" == *"opencode needs: bun ripgrep libc++"* ]]
[[ "$output" == *"pkg install bun ripgrep libc++"* ]]
[ ! -e "$TEST_TMPDIR/pkg-args" ]
}

@test "reports the manual command when pkg itself fails" {
run env PATH="$TOOLS" PKG_STATUS=1 "$BASH_BIN" "$INSTALLER"
[ "$status" -eq 1 ]
[[ "$output" == *"Run it yourself: pkg install bun ripgrep"* ]]
[[ "$output" == *"Run it yourself: pkg install bun ripgrep libc++"* ]]
}

@test "does not install anything when both are already present" {
@test "does not install anything when all dependencies are already present" {
for tool in bun rg; do
printf '#!/bin/sh\nexit 0\n' > "$TOOLS/$tool"
chmod 0755 "$TOOLS/$tool"
done
mkdir -p "$PREFIX/lib"
: > "$PREFIX/lib/libc++_shared.so"
run env PATH="$TOOLS" "$BASH_BIN" "$INSTALLER"
[[ "$output" != *"Installing dependencies"* ]]
[ ! -e "$TEST_TMPDIR/pkg-args" ]
Expand Down
10 changes: 6 additions & 4 deletions tools/patch-opencode-source.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ def main() -> None:
)
replace_once(
updater,
' new Error(\n'
' "Could not detect the installation method. Update with your package manager or download the latest release.",\n',
' new Error(\n'
' "Could not detect the installation method. See https://github.com/Spectra010s/opencode-termux#install for manual installation.",\n',
' error\n'
' ? managedMessage(error)\n'
' : "Could not detect the installation method. Update with your package manager or download the latest release.",\n',
' error\n'
' ? managedMessage(error)\n'
' : "Could not detect the installation method. See https://github.com/Spectra010s/opencode-termux#install for manual installation.",\n',
)
replace_once(
updater,
Expand Down
19 changes: 18 additions & 1 deletion tools/supply-chain-lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": 1,
"current": "2.2.7",
"current": "2.3.2",
"package_revision": 1,
"opencode": {
"2.0.26": {
Expand Down Expand Up @@ -32,6 +32,18 @@
"source_sha256": "493e29d872f1cd9604ef3de609f0278e093c0f8066719e4166efc6544d16f34d",
"bun_version": "1.4.4",
"opentui_version": "0.8.1"
},
"2.3.0": {
"commit": "a6b15d33daf6ab7d35569f6d711fdb630b9f04e7",
"source_sha256": "61b96281d3604596829788a9e433ba61898fa4b56d3f70bd5704e48cb84f0209",
"bun_version": "1.4.4",
"opentui_version": "0.8.4"
},
"2.3.2": {
"commit": "c0ad18b402eb2827fc1ee71c171b1177b3fc02d1",
"source_sha256": "cb6486bf0e8a5fb49b5367beca7685e45f311bfe2a38b2ad15c6a3e3bdcf8bc9",
"bun_version": "1.4.4",
"opentui_version": "0.8.4"
}
},
"bun_pty": {
Expand Down Expand Up @@ -72,6 +84,11 @@
"commit": "9a09079c0c7ad0fb2d55404f66a5c453204328dd",
"zig_version": "0.17.0",
"zig_x86_64_linux_sha256": "1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026"
},
"0.8.4": {
"commit": "d4a2af24ba50636da5f222367f91746a1bf89644",
"zig_version": "0.17.0",
"zig_x86_64_linux_sha256": "1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026"
}
},
"source_build_bun_1_4_4": {
Expand Down