Skip to content

Commit 334b060

Browse files
Merge remote-tracking branch 'origin/dev' into feat/hot-reload-smooth
# Conflicts: # packages/desktop/src-tauri/src/cli.rs # packages/opencode/src/flag/flag.ts # packages/opencode/src/format/formatter.ts # packages/web/src/content/docs/formatters.mdx # packages/web/src/content/docs/zh-cn/zen.mdx
2 parents 2b53ac3 + 25f3eef commit 334b060

File tree

277 files changed

+11097
-7979
lines changed

Some content is hidden

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

277 files changed

+11097
-7979
lines changed

.github/actions/setup-bun/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ runs:
44
using: "composite"
55
steps:
66
- name: Mount Bun Cache
7+
if: ${{ runner.os == 'Linux' }}
78
uses: useblacksmith/stickydisk@v1
89
with:
910
key: ${{ github.repository }}-bun-cache-${{ runner.os }}

.github/workflows/publish.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,18 @@ jobs:
137137
if: contains(matrix.settings.host, 'ubuntu')
138138
uses: actions/cache@v4
139139
with:
140-
path: /var/cache/apt/archives
140+
path: ~/apt-cache
141141
key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-${{ hashFiles('.github/workflows/publish.yml') }}
142142
restore-keys: |
143143
${{ runner.os }}-${{ matrix.settings.target }}-apt-
144144
145145
- name: install dependencies (ubuntu only)
146146
if: contains(matrix.settings.host, 'ubuntu')
147147
run: |
148+
mkdir -p ~/apt-cache && chmod -R a+rw ~/apt-cache
148149
sudo apt-get update
149-
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
150+
sudo apt-get install -y --no-install-recommends -o dir::cache::archives="$HOME/apt-cache" libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
151+
sudo chmod -R a+rw ~/apt-cache
150152
151153
- name: install Rust stable
152154
uses: dtolnay/rust-toolchain@stable
@@ -169,13 +171,23 @@ jobs:
169171
GH_TOKEN: ${{ github.token }}
170172
GITHUB_RUN_ID: ${{ github.run_id }}
171173

174+
- name: Resolve tauri portable SHA
175+
if: contains(matrix.settings.host, 'ubuntu')
176+
run: echo "TAURI_PORTABLE_SHA=$(git ls-remote https://github.com/tauri-apps/tauri.git refs/heads/feat/truly-portable-appimage | cut -f1)" >> "$GITHUB_ENV"
177+
172178
# Fixes AppImage build issues, can be removed when https://github.com/tauri-apps/tauri/pull/12491 is released
173179
- name: Install tauri-cli from portable appimage branch
180+
uses: taiki-e/cache-cargo-install-action@v3
174181
if: contains(matrix.settings.host, 'ubuntu')
175-
run: |
176-
cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch feat/truly-portable-appimage --force
177-
echo "Installed tauri-cli version:"
178-
cargo tauri --version
182+
with:
183+
tool: tauri-cli
184+
git: https://github.com/tauri-apps/tauri
185+
# branch: feat/truly-portable-appimage
186+
rev: ${{ env.TAURI_PORTABLE_SHA }}
187+
188+
- name: Show tauri-cli version
189+
if: contains(matrix.settings.host, 'ubuntu')
190+
run: cargo tauri --version
179191

180192
- name: Build and upload artifacts
181193
uses: tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a

.opencode/agent/translator.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ opencode serve --hostname 0.0.0.0 --port 4096
359359
opencode serve [--port <number>] [--hostname <string>] [--cors <origin>]
360360
opencode session [command]
361361
opencode session list
362+
opencode session delete <sessionID>
362363
opencode stats
363364
opencode uninstall
364365
opencode upgrade
@@ -598,6 +599,7 @@ OPENCODE_EXPERIMENTAL_MARKDOWN
598599
OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX
599600
OPENCODE_EXPERIMENTAL_OXFMT
600601
OPENCODE_EXPERIMENTAL_PLAN_MODE
602+
OPENCODE_ENABLE_QUESTION_TOOL
601603
OPENCODE_FAKE_VCS
602604
OPENCODE_GIT_BASH_PATH
603605
OPENCODE_MODEL

.opencode/agent/triage.md

Lines changed: 70 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
mode: primary
33
hidden: true
4-
model: opencode/claude-haiku-4-5
4+
model: opencode/minimax-m2.5
55
color: "#44BA81"
66
tools:
77
"*": false
@@ -12,6 +12,8 @@ You are a triage agent responsible for triaging github issues.
1212

1313
Use your github-triage tool to triage issues.
1414

15+
This file is the source of truth for ownership/routing rules.
16+
1517
## Labels
1618

1719
### windows
@@ -43,12 +45,34 @@ Desktop app issues:
4345

4446
**Only** add if the issue explicitly mentions nix.
4547

48+
If the issue does not mention nix, do not add nix.
49+
50+
If the issue mentions nix, assign to `rekram1-node`.
51+
4652
#### zen
4753

4854
**Only** add if the issue mentions "zen" or "opencode zen" or "opencode black".
4955

5056
If the issue doesn't have "zen" or "opencode black" in it then don't add zen label
5157

58+
#### core
59+
60+
Use for core server issues in `packages/opencode/`, excluding `packages/opencode/src/cli/cmd/tui/`.
61+
62+
Examples:
63+
64+
- LSP server behavior
65+
- Harness behavior (agent + tools)
66+
- Feature requests for server behavior
67+
- Agent context construction
68+
- API endpoints
69+
- Provider integration issues
70+
- New, broken, or poor-quality models
71+
72+
#### acp
73+
74+
If the issue mentions acp support, assign acp label.
75+
5276
#### docs
5377

5478
Add if the issue requests better documentation or docs updates.
@@ -66,13 +90,51 @@ TUI issues potentially caused by our underlying TUI library:
6690

6791
When assigning to people here are the following rules:
6892

69-
adamdotdev:
70-
ONLY assign adam if the issue will have the "desktop" label.
93+
Desktop / Web:
94+
Use for desktop-labeled issues only.
95+
96+
- adamdotdevin
97+
- iamdavidhill
98+
- Brendonovich
99+
- nexxeln
100+
101+
Zen:
102+
ONLY assign if the issue will have the "zen" label.
103+
104+
- fwang
105+
- MrMushrooooom
106+
107+
TUI (`packages/opencode/src/cli/cmd/tui/...`):
108+
109+
- thdxr for TUI UX/UI product decisions and interaction flow
110+
- kommander for OpenTUI engine issues: rendering artifacts, keybind handling, terminal compatibility, SSH behavior, and low-level perf bottlenecks
111+
- rekram1-node for TUI bugs that are not clearly OpenTUI engine issues
112+
113+
Core (`packages/opencode/...`, excluding TUI subtree):
114+
115+
- thdxr for sqlite/snapshot/memory bugs and larger architectural core features
116+
- jlongster for opencode server + API feature work (tool currently remaps jlongster -> thdxr until assignable)
117+
- rekram1-node for harness issues, provider issues, and other bug-squashing
118+
119+
For core bugs that do not clearly map, either thdxr or rekram1-node is acceptable.
120+
121+
Docs:
122+
123+
- R44VC0RP
124+
125+
Windows:
126+
127+
- Hona (assign any issue that mentions Windows or is likely Windows-specific)
128+
129+
Determinism rules:
130+
131+
- If title + body does not contain "zen", do not add the "zen" label
132+
- If "nix" label is added but title + body does not mention nix/nixos, the tool will drop "nix"
133+
- If title + body mentions nix/nixos, assign to `rekram1-node`
134+
- If "desktop" label is added, the tool will override assignee and randomly pick one Desktop / Web owner
71135

72-
fwang:
73-
ONLY assign fwang if the issue will have the "zen" label.
136+
In all other cases, choose the team/section with the most overlap with the issue and assign a member from that team at random.
74137

75-
jayair:
76-
ONLY assign jayair if the issue will have the "docs" label.
138+
ACP:
77139

78-
In all other cases use best judgment. Avoid assigning to kommander needlessly, when in doubt assign to rekram1-node.
140+
- rekram1-node (assign any acp issues to rekram1-node)

.opencode/opencode.jsonc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
3-
// "enterprise": {
4-
// "url": "https://enterprise.dev.opencode.ai",
5-
// },
63
"provider": {
74
"opencode": {
85
"options": {},

.opencode/tool/github-triage.ts

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
/// <reference path="../env.d.ts" />
2-
// import { Octokit } from "@octokit/rest"
32
import { tool } from "@opencode-ai/plugin"
43
import DESCRIPTION from "./github-triage.txt"
54

5+
const TEAM = {
6+
desktop: ["adamdotdevin", "iamdavidhill", "Brendonovich", "nexxeln"],
7+
zen: ["fwang", "MrMushrooooom"],
8+
tui: ["thdxr", "kommander", "rekram1-node"],
9+
core: ["thdxr", "rekram1-node", "jlongster"],
10+
docs: ["R44VC0RP"],
11+
windows: ["Hona"],
12+
} as const
13+
14+
const ASSIGNEES = [...new Set(Object.values(TEAM).flat())]
15+
16+
function pick<T>(items: readonly T[]) {
17+
return items[Math.floor(Math.random() * items.length)]!
18+
}
19+
620
function getIssueNumber(): number {
721
const issue = parseInt(process.env.ISSUE_NUMBER ?? "", 10)
822
if (!issue) throw new Error("ISSUE_NUMBER env var not set")
@@ -29,60 +43,69 @@ export default tool({
2943
description: DESCRIPTION,
3044
args: {
3145
assignee: tool.schema
32-
.enum(["thdxr", "adamdotdevin", "rekram1-node", "fwang", "jayair", "kommander"])
46+
.enum(ASSIGNEES as [string, ...string[]])
3347
.describe("The username of the assignee")
3448
.default("rekram1-node"),
3549
labels: tool.schema
36-
.array(tool.schema.enum(["nix", "opentui", "perf", "desktop", "zen", "docs", "windows"]))
50+
.array(tool.schema.enum(["nix", "opentui", "perf", "web", "desktop", "zen", "docs", "windows", "core"]))
3751
.describe("The labels(s) to add to the issue")
3852
.default([]),
3953
},
4054
async execute(args) {
4155
const issue = getIssueNumber()
42-
// const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
4356
const owner = "anomalyco"
4457
const repo = "opencode"
4558

4659
const results: string[] = []
60+
let labels = [...new Set(args.labels.map((x) => (x === "desktop" ? "web" : x)))]
61+
const web = labels.includes("web")
62+
const text = `${process.env.ISSUE_TITLE ?? ""}\n${process.env.ISSUE_BODY ?? ""}`.toLowerCase()
63+
const zen = /\bzen\b/.test(text) || text.includes("opencode black")
64+
const nix = /\bnix(os)?\b/.test(text)
65+
66+
if (labels.includes("nix") && !nix) {
67+
labels = labels.filter((x) => x !== "nix")
68+
results.push("Dropped label: nix (issue does not mention nix)")
69+
}
70+
71+
const assignee = nix ? "rekram1-node" : web ? pick(TEAM.desktop) : args.assignee
4772

48-
if (args.assignee === "adamdotdevin" && !args.labels.includes("desktop")) {
49-
throw new Error("Only desktop issues should be assigned to adamdotdevin")
73+
if (labels.includes("zen") && !zen) {
74+
throw new Error("Only add the zen label when issue title/body contains 'zen'")
5075
}
5176

52-
if (args.assignee === "fwang" && !args.labels.includes("zen")) {
53-
throw new Error("Only zen issues should be assigned to fwang")
77+
if (web && !nix && !(TEAM.desktop as readonly string[]).includes(assignee)) {
78+
throw new Error("Web issues must be assigned to adamdotdevin, iamdavidhill, Brendonovich, or nexxeln")
5479
}
5580

56-
if (args.assignee === "kommander" && !args.labels.includes("opentui")) {
81+
if ((TEAM.zen as readonly string[]).includes(assignee) && !labels.includes("zen")) {
82+
throw new Error("Only zen issues should be assigned to fwang or MrMushrooooom")
83+
}
84+
85+
if (assignee === "Hona" && !labels.includes("windows")) {
86+
throw new Error("Only windows issues should be assigned to Hona")
87+
}
88+
89+
if (assignee === "R44VC0RP" && !labels.includes("docs")) {
90+
throw new Error("Only docs issues should be assigned to R44VC0RP")
91+
}
92+
93+
if (assignee === "kommander" && !labels.includes("opentui")) {
5794
throw new Error("Only opentui issues should be assigned to kommander")
5895
}
5996

60-
// await octokit.rest.issues.addAssignees({
61-
// owner,
62-
// repo,
63-
// issue_number: issue,
64-
// assignees: [args.assignee],
65-
// })
6697
await githubFetch(`/repos/${owner}/${repo}/issues/${issue}/assignees`, {
6798
method: "POST",
68-
body: JSON.stringify({ assignees: [args.assignee] }),
99+
body: JSON.stringify({ assignees: [assignee] }),
69100
})
70-
results.push(`Assigned @${args.assignee} to issue #${issue}`)
71-
72-
const labels: string[] = args.labels.map((label) => (label === "desktop" ? "web" : label))
101+
results.push(`Assigned @${assignee} to issue #${issue}`)
73102

74103
if (labels.length > 0) {
75-
// await octokit.rest.issues.addLabels({
76-
// owner,
77-
// repo,
78-
// issue_number: issue,
79-
// labels,
80-
// })
81104
await githubFetch(`/repos/${owner}/${repo}/issues/${issue}/labels`, {
82105
method: "POST",
83106
body: JSON.stringify({ labels }),
84107
})
85-
results.push(`Added labels: ${args.labels.join(", ")}`)
108+
results.push(`Added labels: ${labels.join(", ")}`)
86109
}
87110

88111
return results.join("\n")

0 commit comments

Comments
 (0)