Skip to content

Commit 206cea3

Browse files
author
Faruk Brbovic
committed
Merge upstream/dev into dev - resolved STATS.md conflict
2 parents 2671a76 + bbd1c07 commit 206cea3

File tree

794 files changed

+44186
-11848
lines changed

Some content is hidden

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

794 files changed

+44186
-11848
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# web + desktop packages
2+
packages/app/ @adamdotdevin
3+
packages/tauri/ @adamdotdevin
4+
packages/desktop/ @adamdotdevin

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ body:
1111
validations:
1212
required: true
1313

14+
- type: input
15+
id: plugins
16+
attributes:
17+
label: Plugins
18+
description: What plugins are you using?
19+
validations:
20+
required: false
21+
1422
- type: input
1523
id: opencode-version
1624
attributes:

.github/workflows/docs-update.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Docs Update
2+
3+
on:
4+
schedule:
5+
- cron: "0 */12 * * *"
6+
workflow_dispatch:
7+
8+
env:
9+
LOOKBACK_HOURS: 4
10+
11+
jobs:
12+
update-docs:
13+
if: github.repository == 'sst/opencode'
14+
runs-on: blacksmith-4vcpu-ubuntu-2404
15+
permissions:
16+
id-token: write
17+
contents: write
18+
pull-requests: write
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0 # Fetch full history to access commits
24+
25+
- name: Setup Bun
26+
uses: ./.github/actions/setup-bun
27+
28+
- name: Get recent commits
29+
id: commits
30+
run: |
31+
COMMITS=$(git log --since="${{ env.LOOKBACK_HOURS }} hours ago" --pretty=format:"- %h %s" 2>/dev/null || echo "")
32+
if [ -z "$COMMITS" ]; then
33+
echo "No commits in the last ${{ env.LOOKBACK_HOURS }} hours"
34+
echo "has_commits=false" >> $GITHUB_OUTPUT
35+
else
36+
echo "has_commits=true" >> $GITHUB_OUTPUT
37+
{
38+
echo "list<<EOF"
39+
echo "$COMMITS"
40+
echo "EOF"
41+
} >> $GITHUB_OUTPUT
42+
fi
43+
44+
- name: Run opencode
45+
if: steps.commits.outputs.has_commits == 'true'
46+
uses: sst/opencode/github@latest
47+
env:
48+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
49+
with:
50+
model: opencode/gpt-5.2
51+
agent: docs
52+
prompt: |
53+
Review the following commits from the last ${{ env.LOOKBACK_HOURS }} hours and identify any new features that may need documentation.
54+
55+
<recent_commits>
56+
${{ steps.commits.outputs.list }}
57+
</recent_commits>
58+
59+
Steps:
60+
1. For each commit that looks like a new feature or significant change:
61+
- Read the changed files to understand what was added
62+
- Check if the feature is already documented in packages/web/src/content/docs/*
63+
2. If you find undocumented features:
64+
- Update the relevant documentation files in packages/web/src/content/docs/*
65+
- Follow the existing documentation style and structure
66+
- Make sure to document the feature clearly with examples where appropriate
67+
3. If all new features are already documented, report that no updates are needed
68+
4. If you are creating a new documentation file be sure to update packages/web/astro.config.mjs too.
69+
70+
Focus on user-facing features and API changes. Skip internal refactors, bug fixes, and test updates unless they affect user-facing behavior.
71+
Don't feel the need to document every little thing. It is perfectly okay to make 0 changes at all.
72+
Try to keep documentation only for large features or changes that already have a good spot to be documented.

.github/workflows/duplicate-issues.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
with:
1717
fetch-depth: 1
1818

19+
- uses: ./.github/actions/setup-bun
20+
1921
- name: Install opencode
2022
run: curl -fsSL https://opencode.ai/install | bash
2123

@@ -26,8 +28,8 @@ jobs:
2628
OPENCODE_PERMISSION: |
2729
{
2830
"bash": {
29-
"gh issue*": "allow",
30-
"*": "deny"
31+
"*": "deny",
32+
"gh issue*": "allow"
3133
},
3234
"webfetch": "deny"
3335
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Duplicate PR Check
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
check-duplicates:
9+
if: |
10+
github.event.pull_request.user.login != 'actions-user' &&
11+
github.event.pull_request.user.login != 'opencode' &&
12+
github.event.pull_request.user.login != 'rekram1-node' &&
13+
github.event.pull_request.user.login != 'thdxr' &&
14+
github.event.pull_request.user.login != 'kommander' &&
15+
github.event.pull_request.user.login != 'jayair' &&
16+
github.event.pull_request.user.login != 'fwang' &&
17+
github.event.pull_request.user.login != 'adamdotdevin' &&
18+
github.event.pull_request.user.login != 'iamdavidhill' &&
19+
github.event.pull_request.user.login != 'opencode-agent[bot]'
20+
runs-on: blacksmith-4vcpu-ubuntu-2404
21+
permissions:
22+
contents: read
23+
pull-requests: write
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
29+
30+
- name: Setup Bun
31+
uses: ./.github/actions/setup-bun
32+
33+
- name: Install dependencies
34+
run: bun install
35+
36+
- name: Install opencode
37+
run: curl -fsSL https://opencode.ai/install | bash
38+
39+
- name: Build prompt
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
PR_NUMBER: ${{ github.event.pull_request.number }}
43+
run: |
44+
{
45+
echo "Check for duplicate PRs related to this new PR:"
46+
echo ""
47+
echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)"
48+
echo ""
49+
echo "Description:"
50+
gh pr view "$PR_NUMBER" --json body --jq .body
51+
} > pr_info.txt
52+
53+
- name: Check for duplicate PRs
54+
env:
55+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
PR_NUMBER: ${{ github.event.pull_request.number }}
58+
run: |
59+
COMMENT=$(bun script/duplicate-pr.ts -f pr_info.txt "Check the attached file for PR details and search for duplicates")
60+
61+
gh pr comment "$PR_NUMBER" --body "_The following comment was made by an LLM, it may be inaccurate:_
62+
63+
$COMMENT"

.github/workflows/generate.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@ name: generate
22

33
on:
44
push:
5-
branches-ignore:
6-
- production
7-
pull_request:
8-
branches-ignore:
9-
- production
5+
branches:
6+
- dev
107
workflow_dispatch:
118

129
jobs:
1310
generate:
1411
runs-on: blacksmith-4vcpu-ubuntu-2404
1512
permissions:
1613
contents: write
14+
pull-requests: write
1715
steps:
1816
- name: Checkout repository
1917
uses: actions/checkout@v4
@@ -25,14 +23,29 @@ jobs:
2523
- name: Setup Bun
2624
uses: ./.github/actions/setup-bun
2725

28-
- name: Generate SDK
29-
run: |
30-
bun ./packages/sdk/js/script/build.ts
31-
(cd packages/opencode && bun dev generate > ../sdk/openapi.json)
32-
bun x prettier --write packages/sdk/openapi.json
26+
- name: Generate
27+
run: ./script/generate.ts
3328

34-
- name: Format
35-
run: ./script/format.ts
36-
env:
37-
CI: true
38-
PUSH_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
29+
- name: Commit and push
30+
run: |
31+
if [ -z "$(git status --porcelain)" ]; then
32+
echo "No changes to commit"
33+
exit 0
34+
fi
35+
git config --local user.email "[email protected]"
36+
git config --local user.name "GitHub Action"
37+
git add -A
38+
git commit -m "chore: generate"
39+
git push origin HEAD:${{ github.ref_name }} --no-verify
40+
# if ! git push origin HEAD:${{ github.event.pull_request.head.ref || github.ref_name }} --no-verify; then
41+
# echo ""
42+
# echo "============================================"
43+
# echo "Failed to push generated code."
44+
# echo "Please run locally and push:"
45+
# echo ""
46+
# echo " ./script/generate.ts"
47+
# echo " git add -A && git commit -m \"chore: generate\" && git push"
48+
# echo ""
49+
# echo "============================================"
50+
# exit 1
51+
# fi

.github/workflows/nix-desktop.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: nix desktop
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
paths:
7+
- "flake.nix"
8+
- "flake.lock"
9+
- "nix/**"
10+
- "packages/app/**"
11+
- "packages/desktop/**"
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-desktop:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os:
20+
- blacksmith-4vcpu-ubuntu-2404
21+
- macos-latest
22+
runs-on: ${{ matrix.os }}
23+
timeout-minutes: 60
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v6
27+
28+
- name: Setup Nix
29+
uses: DeterminateSystems/nix-installer-action@v21
30+
31+
- name: Build desktop via flake
32+
run: |
33+
set -euo pipefail
34+
nix --version
35+
nix build .#desktop -L

.github/workflows/notify-discord.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: discord
22

33
on:
44
release:
5-
types: [published] # fires only when a release is published
5+
types: [released] # fires when a draft release is published
66

77
jobs:
88
notify:

.github/workflows/opencode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: ./.github/actions/setup-bun
2727

2828
- name: Run opencode
29-
uses: sst/opencode/github@latest
29+
uses: anomalyco/opencode/github@latest
3030
env:
3131
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
3232
OPENCODE_PERMISSION: '{"bash": "deny"}'

0 commit comments

Comments
 (0)