Skip to content

Commit eaf94ed

Browse files
committed
Merge branch 'dev' into feat/canceled-prompts-in-history
2 parents d5dcadc + eb25878 commit eaf94ed

862 files changed

Lines changed: 199010 additions & 6211 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/VOUCHED.td

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
fwang
12+
iamdavidhill
13+
jayair
14+
kitlangton
15+
kommander
16+
r44vc0rp
17+
rekram1-node
18+
thdxr

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### What does this PR do?
22

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.
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.
44

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

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
if (isPR) {
69+
await github.rest.pulls.update({
70+
owner: context.repo.owner,
71+
repo: context.repo.repo,
72+
pull_number: item.number,
73+
state: 'closed',
74+
});
75+
} else {
76+
await github.rest.issues.update({
77+
owner: context.repo.owner,
78+
repo: context.repo.repo,
79+
issue_number: item.number,
80+
state: 'closed',
81+
state_reason: 'not_planned',
82+
});
83+
}
84+
85+
core.info(`Closed non-compliant ${kind} #${item.number} after 2-hour window`);
86+
}

.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: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
id-token: write
16+
contents: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Bun
24+
uses: ./.github/actions/setup-bun
25+
26+
- name: Setup git committer
27+
id: committer
28+
uses: ./.github/actions/setup-git-committer
29+
with:
30+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
31+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
32+
33+
- name: Compute changed English docs
34+
id: changes
35+
run: |
36+
FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- 'packages/web/src/content/docs/*.mdx' || true)
37+
if [ -z "$FILES" ]; then
38+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
39+
echo "No English docs changed in push range"
40+
exit 0
41+
fi
42+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
43+
{
44+
echo "files<<EOF"
45+
echo "$FILES"
46+
echo "EOF"
47+
} >> "$GITHUB_OUTPUT"
48+
49+
- name: Sync locale docs with OpenCode
50+
if: steps.changes.outputs.has_changes == 'true'
51+
uses: sst/opencode/github@latest
52+
env:
53+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
54+
with:
55+
model: opencode/gpt-5.2
56+
agent: docs
57+
prompt: |
58+
Update localized docs to match the latest English docs changes.
59+
60+
Changed English doc files:
61+
<changed_english_docs>
62+
${{ steps.changes.outputs.files }}
63+
</changed_english_docs>
64+
65+
Requirements:
66+
1. Update all relevant locale docs under packages/web/src/content/docs/<locale>/ so they reflect these English page changes.
67+
2. Preserve frontmatter keys, internal links, code blocks, and existing locale-specific metadata unless the English change requires an update.
68+
3. Keep locale docs structure aligned with their corresponding English pages.
69+
4. Do not modify English source docs in packages/web/src/content/docs/*.mdx.
70+
5. If no locale updates are needed, make no changes.
71+
72+
- name: Commit and push locale docs updates
73+
if: steps.changes.outputs.has_changes == 'true'
74+
run: |
75+
if [ -z "$(git status --porcelain)" ]; then
76+
echo "No locale docs changes to commit"
77+
exit 0
78+
fi
79+
git add -A
80+
git commit -m "docs(i18n): sync locale docs from english changes"
81+
git pull --rebase --autostash origin "$GITHUB_REF_NAME"
82+
git push origin HEAD:"$GITHUB_REF_NAME"

.github/workflows/duplicate-issues.yml

Lines changed: 68 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install opencode
2222
run: curl -fsSL https://opencode.ai/install | bash
2323

24-
- name: Check for duplicate issues
24+
- name: Check duplicates and compliance
2525
env:
2626
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -34,30 +34,84 @@ jobs:
3434
"webfetch": "deny"
3535
}
3636
run: |
37-
opencode run -m opencode/claude-haiku-4-5 "A new issue has been created:'
37+
opencode run -m opencode/claude-haiku-4-5 "A new issue has been created:
3838
39-
Issue number:
40-
${{ github.event.issue.number }}
39+
Issue number: ${{ github.event.issue.number }}
4140
42-
Lookup this issue and search through existing issues (excluding #${{ github.event.issue.number }}) in this repository to find any potential duplicates of this new issue.
41+
Lookup this issue with gh issue view ${{ github.event.issue.number }}.
42+
43+
You have TWO tasks. Perform both, then post a SINGLE comment (if needed).
44+
45+
---
46+
47+
TASK 1: CONTRIBUTING GUIDELINES COMPLIANCE CHECK
48+
49+
Check whether the issue follows our contributing guidelines and issue templates.
50+
51+
This project has three issue templates that every issue MUST use one of:
52+
53+
1. Bug Report - requires a Description field with real content
54+
2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]:
55+
3. Question - requires the Question field with real content
56+
57+
Additionally check:
58+
- No AI-generated walls of text (long, AI-generated descriptions are not acceptable)
59+
- The issue has real content, not just template placeholder text left unchanged
60+
- Bug reports should include some context about how to reproduce
61+
- Feature requests should explain the problem or need
62+
- We want to push for having the user provide system description & information
63+
64+
Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content.
65+
66+
---
67+
68+
TASK 2: DUPLICATE CHECK
69+
70+
Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates.
4371
Consider:
4472
1. Similar titles or descriptions
4573
2. Same error messages or symptoms
4674
3. Related functionality or components
4775
4. Similar feature requests
4876
49-
If you find any potential duplicates, please comment on the new issue with:
50-
- A brief explanation of why it might be a duplicate
51-
- Links to the potentially duplicate issues
52-
- A suggestion to check those issues first
77+
Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, note the pinned keybinds issue #4997.
78+
79+
---
80+
81+
POSTING YOUR COMMENT:
82+
83+
Based on your findings, post a SINGLE comment on issue #${{ github.event.issue.number }}. Build the comment as follows:
84+
85+
If the issue is NOT compliant, start the comment with:
86+
<!-- issue-compliance -->
87+
Then explain what needs to be fixed and that they have 2 hours to edit the issue before it is automatically closed. Also add the label needs:compliance to the issue using: gh issue edit ${{ github.event.issue.number }} --add-label needs:compliance
88+
89+
If duplicates were found, include a section about potential duplicates with links.
90+
91+
If the issue mentions keybinds/keyboard shortcuts, include a note about #4997.
92+
93+
If the issue IS compliant AND no duplicates were found AND no keybind reference, do NOT comment at all.
5394
5495
Use this format for the comment:
55-
'This issue might be a duplicate of existing issues. Please check:
96+
97+
[If not compliant:]
98+
<!-- issue-compliance -->
99+
This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md).
100+
101+
**What needs to be fixed:**
102+
- [specific reasons]
103+
104+
Please edit this issue to address the above within **2 hours**, or it will be automatically closed.
105+
106+
[If duplicates found, add:]
107+
---
108+
This issue might be a duplicate of existing issues. Please check:
56109
- #[issue_number]: [brief description of similarity]
57110
58-
Feel free to ignore if none of these address your specific case.'
111+
[If keybind-related, add:]
112+
For keybind-related issues, please also check our pinned keybinds documentation: #4997
59113
60-
Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, please add a comment mentioning the pinned keybinds issue #4997:
61-
'For keybind-related issues, please also check our pinned keybinds documentation: #4997'
114+
[End with if not compliant:]
115+
If you believe this was flagged incorrectly, please let a maintainer know.
62116
63-
If no clear duplicates are found, do not comment."
117+
Remember: post at most ONE comment combining all findings. If everything is fine, post nothing."

.github/workflows/nix-hashes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- "package.json"
1313
- "packages/*/package.json"
1414
- "flake.lock"
15+
- "nix/node_modules.nix"
16+
- "nix/scripts/**"
17+
- "patches/**"
1518
- ".github/workflows/nix-hashes.yml"
1619

1720
jobs:

0 commit comments

Comments
 (0)