Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 05e0759

Browse files
committed
Merge branch 'dev' of https://github.com/sst/opencode into dev
2 parents 2330ec6 + 75e5130 commit 05e0759

116 files changed

Lines changed: 3005 additions & 1146 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/workflows/auto-label-tui.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
required: false
2222
type: string
2323

24-
concurrency: ${{ github.workflow }}-${{ github.ref }}
24+
concurrency: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.version || inputs.bump }}
2525

2626
permissions:
2727
id-token: write
@@ -109,6 +109,7 @@ jobs:
109109
- uses: actions/checkout@v3
110110
with:
111111
fetch-depth: 0
112+
ref: ${{ needs.publish.outputs.tagName }}
112113

113114
- uses: apple-actions/import-codesign-certs@v2
114115
if: ${{ runner.os == 'macOS' }}
@@ -166,10 +167,15 @@ jobs:
166167
GH_TOKEN: ${{ github.token }}
167168

168169
# Fixes AppImage build issues, can be removed when https://github.com/tauri-apps/tauri/pull/12491 is released
169-
- run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch feat/truly-portable-appimage
170+
- name: Install tauri-cli from portable appimage branch
170171
if: contains(matrix.settings.host, 'ubuntu')
172+
run: |
173+
cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch feat/truly-portable-appimage --force
174+
echo "Installed tauri-cli version:"
175+
cargo tauri --version
171176
172177
- name: Build and upload artifacts
178+
timeout-minutes: 20
173179
uses: tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a
174180
env:
175181
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/triage.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Issue Triage
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
triage:
9+
runs-on: blacksmith-4vcpu-ubuntu-2404
10+
permissions:
11+
contents: read
12+
issues: write
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Install opencode
20+
run: curl -fsSL https://opencode.ai/install | bash
21+
22+
- name: Triage issue
23+
env:
24+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
ISSUE_NUMBER: ${{ github.event.issue.number }}
27+
ISSUE_TITLE: ${{ github.event.issue.title }}
28+
ISSUE_BODY: ${{ github.event.issue.body }}
29+
run: |
30+
opencode run --agent triage "The following issue was just opened, triage it:
31+
32+
Title: $ISSUE_TITLE
33+
34+
$ISSUE_BODY"

.opencode/agent/triage.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
mode: primary
3+
hidden: true
4+
model: opencode/gpt-5-nano
5+
tools:
6+
"*": false
7+
"github-triage": true
8+
---
9+
10+
You are a triage agent responsible for triaging github issues.
11+
12+
Use your github-triage tool to triage issues.

.opencode/bun.lock

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.opencode/env.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module "*.txt" {
2+
const content: string
3+
export default content
4+
}

.opencode/opencode.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
},
1212
},
1313
"mcp": {},
14+
"tools": {
15+
"github-triage": false,
16+
},
1417
}

.opencode/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"dependencies": {
3+
"@octokit/rest": "^22.0.1",
4+
"@opencode-ai/plugin": "0.0.0-dev-202512160508"
5+
}
6+
}

.opencode/tool/github-triage.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { Octokit } from "@octokit/rest"
2+
import { tool } from "@opencode-ai/plugin"
3+
import DESCRIPTION from "./github-triage.txt"
4+
5+
function getIssueNumber(): number {
6+
const issue = parseInt(process.env.ISSUE_NUMBER ?? "", 10)
7+
if (!issue) throw new Error("ISSUE_NUMBER env var not set")
8+
return issue
9+
}
10+
11+
export default tool({
12+
description: DESCRIPTION,
13+
args: {
14+
assignee: tool.schema
15+
.enum(["thdxr", "adamdotdevin", "rekram1-node", "fwang", "jayair", "kommander"])
16+
.describe("The username of the assignee")
17+
.default("rekram1-node"),
18+
labels: tool.schema
19+
.array(tool.schema.enum(["nix", "opentui", "perf", "web", "zen", "docs"]))
20+
.describe("The labels(s) to add to the issue")
21+
.optional(),
22+
},
23+
async execute(args) {
24+
const issue = getIssueNumber()
25+
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
26+
const owner = "sst"
27+
const repo = "opencode"
28+
29+
const results: string[] = []
30+
31+
await octokit.rest.issues.addAssignees({
32+
owner,
33+
repo,
34+
issue_number: issue,
35+
assignees: [args.assignee],
36+
})
37+
results.push(`Assigned @${args.assignee} to issue #${issue}`)
38+
39+
if (args.labels && args.labels.length > 0) {
40+
await octokit.rest.issues.addLabels({
41+
owner,
42+
repo,
43+
issue_number: issue,
44+
labels: args.labels,
45+
})
46+
results.push(`Added labels: ${args.labels.join(", ")}`)
47+
}
48+
49+
return results.join("\n")
50+
},
51+
})

.opencode/tool/github-triage.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
Use this tool to assign and/or label a Github issue.
2+
3+
You can assign the following users:
4+
- thdxr
5+
- adamdotdevin
6+
- fwang
7+
- jayair
8+
- kommander
9+
- rekram1-node
10+
11+
12+
You can use the following labels:
13+
- nix
14+
- opentui
15+
- perf
16+
- web
17+
- zen
18+
- docs
19+
20+
Always try to assign an issue, if in doubt, assign rekram1-node to it.
21+
22+
## Breakdown of responsibilities:
23+
24+
### thdxr
25+
26+
Dax is responsible for managing core parts of the application, for large feature requests, api changes, or things that require significant changes to the codebase assign him.
27+
28+
This relates to OpenCode server primarily but has overlap with just about anything
29+
30+
### adamdotdevin
31+
32+
Adam is responsible for managing the Desktop/Web app. If there is an issue relating to the desktop app or `opencode web` command. Assign him.
33+
34+
35+
### fwang
36+
37+
Frank is responsible for managing Zen, if you see complaints about OpenCode Zen, maybe it's the dashboard, the model quality, billing issues, etc. Assign him to the issue.
38+
39+
### jayair
40+
41+
Jay is responsible for documentation. If there is an issue relating to documentation assign him.
42+
43+
### kommander
44+
45+
Sebastian is responsible for managing an OpenTUI (a library for building terminal user interfaces). OpenCode's TUI is built with OpenTUI. If there are issues about:
46+
- random characters on screen
47+
- keybinds not working on different terminals
48+
- general terminal stuff
49+
Then assign the issue to Him.
50+
51+
### rekram1-node
52+
53+
Assign Aiden to an issue as a catch all, if you can't assign anyone else. Most of the time this will be bugs/polish things.
54+
If no one else makes sense to assign, assign rekram1-node to it.
55+
56+
## Breakdown of Labels:
57+
58+
### nix
59+
60+
Any issue that mentions nix, or nixos should have a nix label
61+
62+
### opentui
63+
64+
Anything relating to the TUI itself should have an opentui label
65+
66+
### perf
67+
68+
Anything related to slow performance, high ram, high cpu usage, or any other performance related issue should have a perf label
69+
70+
### web
71+
72+
Anything related to `opencode web` or the desktop app should have a web label. Never add this label for anything terminal/tui related
73+
74+
### zen
75+
76+
Anything related to OpenCode Zen, billing, or model quality from Zen should have a zen label
77+
78+
### docs
79+
80+
Anything related to the documentation should have a docs label

0 commit comments

Comments
 (0)