Skip to content

Commit 30ccf9b

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into dev
Brings in 132 upstream commits (upstream tip 2e8a861 "ci(process-daemon): run the pipe tests on macOS (anomalyco#61277)"). Conflict resolutions ==================== - core/src/tool/plugin/opencode.ts: import collision. Kept the fork's `Option` (session roots system hint) and upstream's new `toolFailure`. - core/src/tool/plugin/read.ts: import collision. Kept the fork's `InstructionDiscovery` (instruction filenames walk) and upstream's `Permission`. - core/test/tool-shell.test.ts: upstream restructured the background-shell tests (Effect.acquireUseRelease -> withTempDir), re-indenting every line. The fork's only change in this file is the Cancel-tool hint in two expected background-output texts, so took upstream's file and re-applied those two lines. Fixes for bad auto-merges ========================= - core/src/session/prompt.ts and core/src/tool/plugin/skill.ts: upstream now passes a skill's in-memory files to Skill.prepare via `Skill.Service.files(id)`, using a `skillService` / `skills` binding that the fork had replaced with SessionRoots.skill. Bound Skill.Service again in both places. Root skills are on disk and are not registered in Skill.Service, so files() returns undefined for them and prepare scans the directory, as before. - core tests: upstream's PluginHost.make now takes a plugin id; the fork's custom.test.ts and tool-opencode.test.ts pass "test" like upstream's tests. tool-skill.test.ts adds Skill.node to the skill tool's deps. Generated files =============== - Regenerated packages/protocol/openapi.json and the client. Git's text merge kept everything the fork had, but upstream added new sections that enumerate every event (for example Session.Event.Durable); upstream's copies only list upstream events. Regeneration adds the fork's session.root.added/removed events, the session `roots` field and Session.ForkDestination there. Verification ============ - bun install; bun turbo typecheck: 35/35; oxlint 0 errors - bun script/migration.ts --check: no schema changes - make tests: tui 190, core 465, schema 7, sdk 3 pass, 0 fail - tool-shell.test.ts + tool-skill.test.ts: 59 pass, 2 fail. The 2 ("conditional substitutions respect once/always", bash "wait: pid ... is not a child of this shell") fail identically on a clean checkout of the upstream tip on macOS, so they are upstream's, not the merge's.
2 parents f5f8d52 + 2e8a861 commit 30ccf9b

841 files changed

Lines changed: 27181 additions & 15987 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/release/lib.sh‎

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
# environment the workflow sets (OPENCODE_VERSION, OPENCODE_CHANNEL, OPENCODE_DRY_RUN, ...).
66

77
set -euo pipefail
8+
# Without this, set -e does not apply inside $(...), so a failing command in a function called as
9+
# files=$(upload_files ...) is ignored. macOS /bin/bash is 3.2, which lacks the option.
10+
if [ "${BASH_VERSINFO[0]}" -gt 4 ] || { [ "${BASH_VERSINFO[0]}" = 4 ] && [ "${BASH_VERSINFO[1]}" -ge 4 ]; }; then
11+
shopt -s inherit_errexit
12+
fi
813

914
# shellcheck disable=SC2034 # used by the scripts that source this file
1015
release_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
@@ -50,26 +55,46 @@ upload_files() {
5055
r2_credentials
5156
credentials=true
5257
fi
53-
aws s3 cp "$file" "s3://opencode-production-files/bin/$OPENCODE_VERSION/$name" --only-show-errors \
54-
--endpoint-url "https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com" \
55-
--content-type "$type" --content-disposition "attachment; filename=\"$name\"" \
56-
--cache-control "public, max-age=31536000, immutable" >&2
58+
upload_file "$file" "$name" "$type" || die "Upload failed: $name"
5759
fi
5860
jq -n --arg name "$name" --arg url "https://opencode.ai/files/bin/$OPENCODE_VERSION/$name" \
5961
--arg sha256 "$(sha256 "$file" | cut -c1-64)" --argjson size "$(size "$file")" \
6062
'{($name): {url: $url, sha256: $sha256, size: $size}}'
6163
done | jq -s 'add'
6264
}
6365

66+
# Uploads one file to R2 and confirms the stored object has the local size: upload_file <file> <name> <type>.
67+
# R2 intermittently rejects CompleteMultipartUpload with InvalidPart, so failed uploads are retried.
68+
upload_file() {
69+
local key="bin/$OPENCODE_VERSION/$2" endpoint="https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com" attempt
70+
for attempt in 1 2 3; do
71+
if aws s3 cp "$1" "s3://opencode-production-files/$key" --only-show-errors --endpoint-url "$endpoint" \
72+
--content-type "$3" --content-disposition "attachment; filename=\"$2\"" \
73+
--cache-control "public, max-age=31536000, immutable" >&2 &&
74+
[ "$(aws s3api head-object --bucket opencode-production-files --key "$key" --endpoint-url "$endpoint" \
75+
--query ContentLength --output text)" = "$(size "$1")" ]; then
76+
return
77+
fi
78+
echo "::warning::Upload attempt $attempt failed: $2" >&2
79+
sleep $((attempt * 5))
80+
done
81+
return 1
82+
}
83+
6484
# R2 accepts the API token ID as the access key and SHA-256(token) as the secret.
6585
r2_credentials() {
6686
local id
6787
id=$(curl -fsS -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
68-
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/tokens/verify" | jq -er .result.id)
88+
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/tokens/verify" | jq -er .result.id) ||
89+
die "Could not resolve R2 credentials"
6990
export AWS_ACCESS_KEY_ID="$id"
7091
AWS_SECRET_ACCESS_KEY=$(printf '%s' "$CLOUDFLARE_API_TOKEN" | sha256 | cut -c1-64)
7192
export AWS_SECRET_ACCESS_KEY
7293
export AWS_DEFAULT_REGION=auto AWS_REQUEST_CHECKSUM_CALCULATION=when_required AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
94+
# Larger parts mean fewer CompleteMultipartUpload parts for the 200-350 MB desktop builds.
95+
AWS_CONFIG_FILE=$(mktemp)
96+
export AWS_CONFIG_FILE
97+
printf '[default]\ns3 =\n multipart_threshold = 64MB\n multipart_chunksize = 64MB\n' > "$AWS_CONFIG_FILE"
7398
}
7499

75100
# Registers one artifact with the update server: publish_update <name> <distribution> <metadata json>.

‎.github/workflows/check-process-daemon.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
# Match the release workflow's macOS playground exclusion.
7575
- name: Test macOS
7676
if: runner.os == 'macOS'
77-
run: cargo test --locked --lib --test service --test runtime --test ownership --test rows --test ghostty-effects
77+
run: cargo test --locked --lib --test service --test runtime --test ownership --test pipe --test rows --test ghostty-effects
7878

7979
windows:
8080
name: Windows (${{ matrix.arch }})

‎CHANGELOG.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,50 @@
22

33
Release notes for OpenCode V2, newest first.
44

5+
## v2.2.5 — 2026-10-30
6+
7+
### Highlights
8+
9+
- **Worktree and Shell Mode Shortcuts**: Press `⌘⌥O` on macOS or `Ctrl+Alt+O` on Windows and Linux to choose a worktree, and `⌘⌥B` or `Ctrl+Alt+B` to choose its base branch. `⌘⇧X` or `Ctrl+Shift+X` now toggles shell mode in the composer. ([#60713](https://github.com/anomalyco/opencode/pull/60713))
10+
- **Send Quotes From the Comment Popup**: Hold `⌘` or `Ctrl` in the quote popup to turn its checkmark into send, or press `⌘Enter` or `Ctrl+Enter`, to send just that quote and comment while leaving the rest of the composer untouched. ([#60640](https://github.com/anomalyco/opencode/pull/60640))
11+
- **Percentage Compaction Buffer**: Set `"compaction": { "buffer": "20%" }` in `opencode.json` to keep a share of each model's context window free, so one setting fits models with small and large windows. Token counts still work. ([#60647](https://github.com/anomalyco/opencode/pull/60647))
12+
13+
### Core
14+
15+
#### Improvements
16+
17+
- `compaction.buffer` accepts a percentage of the model's context window, such as `"20%"`, in addition to a token count. ([#60647](https://github.com/anomalyco/opencode/pull/60647))
18+
- When `read` misses because a folder is missing, the error names that folder and the nearest one that exists. ([#60688](https://github.com/anomalyco/opencode/pull/60688))
19+
- When `edit` can't find `oldString`, the error shows the file's closest lines, or says the change is already there. ([#60689](https://github.com/anomalyco/opencode/pull/60689))
20+
- Calls to a tool named `bash` now run as `shell` instead of failing, with the same permissions. A plugin tool actually named `bash` still takes precedence. ([#60687](https://github.com/anomalyco/opencode/pull/60687))
21+
22+
#### Bug fixes
23+
24+
- MCP servers that send stdio messages larger than 10 MiB no longer get disconnected, and large messages are read much faster. ([#60694](https://github.com/anomalyco/opencode/pull/60694))
25+
- Idle locations no longer restart their MCP servers right after shutting down. ([#60668](https://github.com/anomalyco/opencode/pull/60668))
26+
- Compaction now caps its prompt at the model's context window when the input limit is larger. ([#60660](https://github.com/anomalyco/opencode/pull/60660))
27+
- LiteLLM context window errors now trigger compaction instead of stopping the session. ([#60692](https://github.com/anomalyco/opencode/pull/60692))
28+
- Reasoning is no longer turned into plain text when you switch models or resume an interrupted response, which caused request errors on some providers. ([#60498](https://github.com/anomalyco/opencode/pull/60498))
29+
30+
### TUI
31+
32+
#### Bug fixes
33+
34+
- The connect menu no longer lists MCP servers, which are managed in their own place. ([#60675](https://github.com/anomalyco/opencode/pull/60675))
35+
36+
### Desktop
37+
38+
#### Improvements
39+
40+
- Added keyboard shortcuts to choose a worktree and its base branch, shown in tooltips, and a shortcut to toggle shell mode. The worktree path can be selected to copy the full directory. ([#60713](https://github.com/anomalyco/opencode/pull/60713))
41+
- Hold `⌘` or `Ctrl` in the quote popup to send a quote and its comment directly. ([#60640](https://github.com/anomalyco/opencode/pull/60640))
42+
- Added flat input surfaces and a compact input size. ([#60598](https://github.com/anomalyco/opencode/pull/60598))
43+
44+
#### Bug fixes
45+
46+
- The connect menu no longer lists MCP servers. ([#60675](https://github.com/anomalyco/opencode/pull/60675))
47+
- Added the missing top inset to the search field in the recently closed menu. ([#60652](https://github.com/anomalyco/opencode/pull/60652))
48+
549
## v2.2.4 — 2026-10-30
650

751
### Highlights

0 commit comments

Comments
 (0)