Skip to content

Commit c1a3936

Browse files
committed
Merge remote-tracking branch 'origin/dev' into feat/auto-accept-permissions
# Conflicts: # packages/sdk/js/src/v2/gen/types.gen.ts
2 parents a531f3f + 0bbf26a commit c1a3936

2,407 files changed

Lines changed: 413771 additions & 91979 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/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
blank_issues_enabled: true
1+
blank_issues_enabled: false
22
contact_links:
33
- name: 💬 Discord Community
44
url: https://discord.gg/opencode

.github/TEAM_MEMBERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
adamdotdevin
2+
Brendonovich
3+
fwang
4+
Hona
5+
iamdavidhill
6+
jayair
7+
jlongster
8+
kitlangton
9+
kommander
10+
MrMushrooooom
11+
nexxeln
12+
R44VC0RP
13+
rekram1-node
14+
RhysSullivan
15+
thdxr

.github/VOUCHED.td

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Vouched contributors for this project.
2+
#
3+
# See https://github.com/mitchellh/vouch for details.
4+
#
5+
# Syntax:
6+
# - One handle per line (without @), sorted alphabetically.
7+
# - Optional platform prefix: platform:username (e.g., github:user).
8+
# - Denounce with minus prefix: -username or -platform:username.
9+
# - Optional details after a space following the handle.
10+
adamdotdevin
11+
-agusbasari29 AI PR slop
12+
ariane-emory
13+
edemaine
14+
-florianleibert
15+
fwang
16+
iamdavidhill
17+
jayair
18+
kitlangton
19+
kommander
20+
r44vc0rp
21+
rekram1-node
22+
-spider-yamet clawdbot/llm psychosis, spam pinging the team
23+
thdxr
24+
-OpenCode2026

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

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,51 @@ description: "Setup Bun with caching and install dependencies"
33
runs:
44
using: "composite"
55
steps:
6-
- name: Mount Bun Cache
7-
uses: useblacksmith/stickydisk@v1
8-
with:
9-
key: ${{ github.repository }}-bun-cache-${{ runner.os }}
10-
path: ~/.bun
6+
- name: Get baseline download URL
7+
id: bun-url
8+
shell: bash
9+
run: |
10+
if [ "$RUNNER_ARCH" = "X64" ]; then
11+
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
12+
case "$RUNNER_OS" in
13+
macOS) OS=darwin ;;
14+
Linux) OS=linux ;;
15+
Windows) OS=windows ;;
16+
esac
17+
echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${V}/bun-${OS}-x64-baseline.zip" >> "$GITHUB_OUTPUT"
18+
fi
1119
1220
- name: Setup Bun
1321
uses: oven-sh/setup-bun@v2
1422
with:
15-
bun-version-file: package.json
23+
bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }}
24+
bun-download-url: ${{ steps.bun-url.outputs.url }}
25+
26+
- name: Get cache directory
27+
id: cache
28+
shell: bash
29+
run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT"
30+
31+
- name: Cache Bun dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ steps.cache.outputs.dir }}
35+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-bun-
38+
39+
- name: Install setuptools for distutils compatibility
40+
run: python3 -m pip install setuptools || pip install setuptools || true
41+
shell: bash
1642

1743
- name: Install dependencies
18-
run: bun install
44+
run: |
45+
# Workaround for patched peer variants
46+
# e.g. ./patches/ for standard-openapi
47+
# https://github.com/oven-sh/bun/issues/28147
48+
if [ "$RUNNER_OS" = "Windows" ]; then
49+
bun install --linker hoisted
50+
else
51+
bun install
52+
fi
1953
shell: bash

.github/pull_request_template.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1+
### Issue for this PR
2+
3+
Closes #
4+
5+
### Type of change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature
9+
- [ ] Refactor / code improvement
10+
- [ ] Documentation
11+
112
### What does this PR do?
213

3-
Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr.
14+
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
415

516
**If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!**
617

718
### How did you verify your code works?
19+
20+
### Screenshots / recordings
21+
22+
_If this is a UI change, please include a screenshot or recording._
23+
24+
### Checklist
25+
26+
- [ ] I have tested my changes locally
27+
- [ ] I have not included unrelated changes in this PR
28+
29+
_If you do not follow this template your PR will be automatically rejected._

.github/workflows/beta.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
2828
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
2929

30+
- name: Install OpenCode
31+
run: bun i -g opencode-ai
32+
3033
- name: Sync beta branch
3134
env:
3235
GH_TOKEN: ${{ steps.setup-git-committer.outputs.token }}
36+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
3337
run: bun script/beta.ts
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: compliance-close
2+
3+
on:
4+
schedule:
5+
# Run every 30 minutes to check for expired compliance windows
6+
- cron: "*/30 * * * *"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
14+
jobs:
15+
close-non-compliant:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Close non-compliant issues and PRs after 2 hours
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
const { data: items } = await github.rest.issues.listForRepo({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
labels: 'needs:compliance',
26+
state: 'open',
27+
per_page: 100,
28+
});
29+
30+
if (items.length === 0) {
31+
core.info('No open issues/PRs with needs:compliance label');
32+
return;
33+
}
34+
35+
const now = Date.now();
36+
const twoHours = 2 * 60 * 60 * 1000;
37+
38+
for (const item of items) {
39+
const isPR = !!item.pull_request;
40+
const kind = isPR ? 'PR' : 'issue';
41+
42+
const { data: comments } = await github.rest.issues.listComments({
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
issue_number: item.number,
46+
});
47+
48+
const complianceComment = comments.find(c => c.body.includes('<!-- issue-compliance -->'));
49+
if (!complianceComment) continue;
50+
51+
const commentAge = now - new Date(complianceComment.created_at).getTime();
52+
if (commentAge < twoHours) {
53+
core.info(`${kind} #${item.number} still within 2-hour window (${Math.round(commentAge / 60000)}m elapsed)`);
54+
continue;
55+
}
56+
57+
const closeMessage = isPR
58+
? 'This pull request has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new pull request that follows our guidelines.'
59+
: 'This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new issue that follows our issue templates.';
60+
61+
await github.rest.issues.createComment({
62+
owner: context.repo.owner,
63+
repo: context.repo.repo,
64+
issue_number: item.number,
65+
body: closeMessage,
66+
});
67+
68+
try {
69+
await github.rest.issues.removeLabel({
70+
owner: context.repo.owner,
71+
repo: context.repo.repo,
72+
issue_number: item.number,
73+
name: 'needs:compliance',
74+
});
75+
} catch (e) {}
76+
77+
if (isPR) {
78+
await github.rest.pulls.update({
79+
owner: context.repo.owner,
80+
repo: context.repo.repo,
81+
pull_number: item.number,
82+
state: 'closed',
83+
});
84+
} else {
85+
await github.rest.issues.update({
86+
owner: context.repo.owner,
87+
repo: context.repo.repo,
88+
issue_number: item.number,
89+
state: 'closed',
90+
state_reason: 'not_planned',
91+
});
92+
}
93+
94+
core.info(`Closed non-compliant ${kind} #${item.number} after 2-hour window`);
95+
}

.github/workflows/daily-issues-recap.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ jobs:
4848
TODAY'S DATE: ${TODAY}
4949
5050
STEP 1: Gather today's issues
51-
Search for all issues created today (${TODAY}) using:
52-
gh issue list --repo ${{ github.repository }} --state all --search \"created:${TODAY}\" --json number,title,body,labels,state,comments,createdAt,author --limit 500
51+
Search for all OPEN issues created today (${TODAY}) using:
52+
gh issue list --repo ${{ github.repository }} --state open --search \"created:${TODAY}\" --json number,title,body,labels,state,comments,createdAt,author --limit 500
53+
54+
IMPORTANT: EXCLUDE all issues authored by Anomaly team members. Filter out issues where the author login matches ANY of these:
55+
adamdotdevin, Brendonovich, fwang, Hona, iamdavidhill, jayair, kitlangton, kommander, MrMushrooooom, R44VC0RP, rekram1-node, thdxr
56+
This recap is specifically for COMMUNITY (external) issues only.
5357
5458
STEP 2: Analyze and categorize
5559
For each issue created today, categorize it:

.github/workflows/daily-pr-recap.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,18 @@ jobs:
4747
TODAY'S DATE: ${TODAY}
4848
4949
STEP 1: Gather PR data
50-
Run these commands to gather PR information. ONLY include PRs created or updated TODAY (${TODAY}):
50+
Run these commands to gather PR information. ONLY include OPEN PRs created or updated TODAY (${TODAY}):
5151
52-
# PRs created today
53-
gh pr list --repo ${{ github.repository }} --state all --search \"created:${TODAY}\" --json number,title,author,labels,createdAt,updatedAt,reviewDecision,isDraft,additions,deletions --limit 100
52+
# Open PRs created today
53+
gh pr list --repo ${{ github.repository }} --state open --search \"created:${TODAY}\" --json number,title,author,labels,createdAt,updatedAt,reviewDecision,isDraft,additions,deletions --limit 100
5454
55-
# PRs with activity today (updated today)
55+
# Open PRs with activity today (updated today)
5656
gh pr list --repo ${{ github.repository }} --state open --search \"updated:${TODAY}\" --json number,title,author,labels,createdAt,updatedAt,reviewDecision,isDraft,additions,deletions --limit 100
5757
58+
IMPORTANT: EXCLUDE all PRs authored by Anomaly team members. Filter out PRs where the author login matches ANY of these:
59+
adamdotdevin, Brendonovich, fwang, Hona, iamdavidhill, jayair, kitlangton, kommander, MrMushrooooom, R44VC0RP, rekram1-node, thdxr
60+
This recap is specifically for COMMUNITY (external) contributions only.
61+
5862
5963
6064
STEP 2: For high-activity PRs, check comment counts
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: docs-locale-sync
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
paths:
8+
- packages/web/src/content/docs/*.mdx
9+
10+
jobs:
11+
sync-locales:
12+
if: github.actor != 'opencode-agent[bot]'
13+
runs-on: blacksmith-4vcpu-ubuntu-2404
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
fetch-depth: 0
22+
ref: ${{ github.ref_name }}
23+
24+
- name: Setup Bun
25+
uses: ./.github/actions/setup-bun
26+
27+
- name: Setup git committer
28+
id: committer
29+
uses: ./.github/actions/setup-git-committer
30+
with:
31+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
32+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
33+
34+
- name: Compute changed English docs
35+
id: changes
36+
run: |
37+
FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- 'packages/web/src/content/docs/*.mdx' || true)
38+
if [ -z "$FILES" ]; then
39+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
40+
echo "No English docs changed in push range"
41+
exit 0
42+
fi
43+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
44+
{
45+
echo "files<<EOF"
46+
echo "$FILES"
47+
echo "EOF"
48+
} >> "$GITHUB_OUTPUT"
49+
50+
- name: Install OpenCode
51+
if: steps.changes.outputs.has_changes == 'true'
52+
run: curl -fsSL https://opencode.ai/install | bash
53+
54+
- name: Sync locale docs with OpenCode
55+
if: steps.changes.outputs.has_changes == 'true'
56+
env:
57+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
58+
OPENCODE_CONFIG_CONTENT: |
59+
{
60+
"permission": {
61+
"*": "deny",
62+
"read": "allow",
63+
"edit": "allow",
64+
"glob": "allow",
65+
"task": "allow"
66+
}
67+
}
68+
run: |
69+
opencode run --agent docs --model opencode/gpt-5.3-codex <<'EOF'
70+
Update localized docs to match the latest English docs changes.
71+
72+
Changed English doc files:
73+
<changed_english_docs>
74+
${{ steps.changes.outputs.files }}
75+
</changed_english_docs>
76+
77+
Requirements:
78+
1. Update all relevant locale docs under packages/web/src/content/docs/<locale>/ so they reflect these English page changes.
79+
2. You MUST use the Task tool for translation work and launch subagents with subagent_type `translator` (defined in .opencode/agent/translator.md).
80+
3. Do not translate directly in the primary agent. Use translator subagent output as the source for locale text updates.
81+
4. Run translator subagent Task calls in parallel whenever file/locale translation work is independent.
82+
5. Use only the minimum tools needed for this task (read/glob, file edits, and translator Task). Do not use shell, web, search, or GitHub tools for translation work.
83+
6. Preserve frontmatter keys, internal links, code blocks, and existing locale-specific metadata unless the English change requires an update.
84+
7. Keep locale docs structure aligned with their corresponding English pages.
85+
8. Do not modify English source docs in packages/web/src/content/docs/*.mdx.
86+
9. If no locale updates are needed, make no changes.
87+
EOF
88+
89+
- name: Commit and push locale docs updates
90+
if: steps.changes.outputs.has_changes == 'true'
91+
run: |
92+
if [ -z "$(git status --porcelain)" ]; then
93+
echo "No locale docs changes to commit"
94+
exit 0
95+
fi
96+
git add -A
97+
git commit -m "docs(i18n): sync locale docs from english changes"
98+
git pull --rebase --autostash origin "$GITHUB_REF_NAME"
99+
git push origin HEAD:"$GITHUB_REF_NAME"

0 commit comments

Comments
 (0)