Skip to content

Commit c171d6f

Browse files
Merge branch 'anomalyco:dev' into dev
2 parents 4096ece + 219c226 commit c171d6f

289 files changed

Lines changed: 14677 additions & 6274 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/TEAM_MEMBERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ Slickstef11
2020
usrnk1
2121
vimtor
2222
StarpTech
23+
vaprdev

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ runs:
1515
with:
1616
node-version: "24"
1717

18-
- name: Get baseline download URL
18+
- name: Get Bun version and baseline download URL
1919
id: bun-url
2020
shell: bash
2121
run: |
22+
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
23+
# Bun 1.4.2 includes the patched peer-variant fix in oven-sh/bun#33646.
24+
if [ "$RUNNER_OS" = "Windows" ]; then V=1.4.2; fi
25+
echo "version=$V" >> "$GITHUB_OUTPUT"
2226
if [ "$RUNNER_ARCH" = "X64" ]; then
23-
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
2427
case "$RUNNER_OS" in
2528
macOS) OS=darwin ;;
2629
Linux) OS=linux ;;
@@ -30,9 +33,10 @@ runs:
3033
fi
3134
3235
- name: Setup Bun
36+
id: setup-bun
3337
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
3438
with:
35-
bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }}
39+
bun-version: ${{ !steps.bun-url.outputs.url && steps.bun-url.outputs.version || '' }}
3640
bun-download-url: ${{ steps.bun-url.outputs.url }}
3741

3842
- name: Get cache directory
@@ -45,29 +49,21 @@ runs:
4549
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
4650
with:
4751
path: ${{ steps.cache.outputs.dir }}
48-
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
52+
key: ${{ runner.os }}-bun-${{ steps.setup-bun.outputs.bun-version }}-${{ hashFiles('**/bun.lock') }}
4953
restore-keys: |
50-
${{ runner.os }}-bun-
54+
${{ runner.os }}-bun-${{ steps.setup-bun.outputs.bun-version }}-
5155
5256
- name: Install setuptools for distutils compatibility
5357
run: python3 -m pip install setuptools || pip install setuptools || true
5458
shell: bash
5559

5660
- name: Install dependencies
57-
run: |
58-
# Workaround for patched peer variants
59-
# e.g. ./patches/ for standard-openapi
60-
# https://github.com/oven-sh/bun/issues/28147
61-
if [ "$RUNNER_OS" = "Windows" ]; then
62-
bun install --linker hoisted ${{ inputs.install-flags }}
63-
else
64-
bun install ${{ inputs.install-flags }}
65-
fi
61+
run: bun install ${{ inputs.install-flags }}
6662
shell: bash
6763

6864
- name: Save Bun dependencies
6965
if: steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target'
7066
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
7167
with:
7268
path: ${{ steps.cache.outputs.dir }}
73-
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
69+
key: ${{ runner.os }}-bun-${{ steps.setup-bun.outputs.bun-version }}-${{ hashFiles('**/bun.lock') }}

‎.github/workflows/compliance-close.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
close-non-compliant:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Close non-compliant issues and PRs after 2 hours
18+
- name: Close non-compliant issues and PRs after 72 hours
1919
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
2020
with:
2121
script: |
@@ -33,7 +33,7 @@ jobs:
3333
}
3434
3535
const now = Date.now();
36-
const twoHours = 2 * 60 * 60 * 1000;
36+
const seventyTwoHours = 72 * 60 * 60 * 1000;
3737
const orgMemberAssociations = new Set(['OWNER', 'MEMBER']);
3838
const agentLogin = 'opencode-agent[bot]';
3939
const { data: file } = await github.rest.repos.getContent({
@@ -87,14 +87,14 @@ jobs:
8787
if (!complianceComment) continue;
8888
8989
const commentAge = now - new Date(complianceComment.created_at).getTime();
90-
if (commentAge < twoHours) {
91-
core.info(`${kind} #${item.number} still within 2-hour window (${Math.round(commentAge / 60000)}m elapsed)`);
90+
if (commentAge < seventyTwoHours) {
91+
core.info(`${kind} #${item.number} still within 72-hour window (${Math.round(commentAge / 60000)}m elapsed)`);
9292
continue;
9393
}
9494
9595
const closeMessage = isPR
96-
? '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.'
97-
: '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.';
96+
? 'This pull request has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 72-hour window.\n\nFeel free to open a new pull request that follows our guidelines.'
97+
: 'This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 72-hour window.\n\nFeel free to open a new issue that follows our issue templates.';
9898
9999
await github.rest.issues.createComment({
100100
owner: context.repo.owner,
@@ -129,5 +129,5 @@ jobs:
129129
});
130130
}
131131
132-
core.info(`Closed non-compliant ${kind} #${item.number} after 2-hour window`);
132+
core.info(`Closed non-compliant ${kind} #${item.number} after 72-hour window`);
133133
}

‎.github/workflows/deploy.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
jobs:
1717
deploy:
1818
if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production')
19-
runs-on: ubuntu-latest
19+
runs-on: ${{ github.ref_name == 'dev' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
2020
environment: ${{ github.ref_name }}
2121
steps:
2222
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

‎.github/workflows/duplicate-issues.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
"webfetch": "deny"
5555
}
5656
run: |
57-
opencode run -m opencode/claude-sonnet-4-6 "A new issue has been created:
57+
opencode run -m opencode/gpt-6-luna --variant high "A new issue has been created:
5858
5959
Issue number: ${{ github.event.issue.number }}
6060
Issue author association: ${{ github.event.issue.author_association }}
@@ -107,7 +107,7 @@ jobs:
107107
108108
If the issue is NOT compliant and the author association is not OWNER or MEMBER, start the comment with:
109109
<!-- issue-compliance -->
110-
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
110+
Then explain what needs to be fixed and that they have 72 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
111111
112112
If duplicates were found, include a section about potential duplicates with links.
113113
@@ -124,7 +124,7 @@ jobs:
124124
**What needs to be fixed:**
125125
- [specific reasons]
126126
127-
Please edit this issue to address the above within **2 hours**, or it will be automatically closed.
127+
Please edit this issue to address the above within **72 hours**, or it will be automatically closed.
128128
129129
[If duplicates found, add:]
130130
---
@@ -188,7 +188,7 @@ jobs:
188188
"webfetch": "deny"
189189
}
190190
run: |
191-
opencode run -m opencode/claude-sonnet-4-6 "Issue #${{ github.event.issue.number }} was previously flagged as non-compliant and has been edited.
191+
opencode run -m opencode/gpt-6-luna --variant high "Issue #${{ github.event.issue.number }} was previously flagged as non-compliant and has been edited.
192192
Issue author association: ${{ github.event.issue.author_association }}
193193
194194
Lookup this issue with gh issue view ${{ github.event.issue.number }}.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: models-snapshot
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: "0 12 * * *"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}
13+
cancel-in-progress: false
14+
15+
jobs:
16+
refresh:
17+
if: github.repository == 'anomalyco/opencode'
18+
runs-on: blacksmith-4vcpu-ubuntu-2404
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
23+
with:
24+
persist-credentials: false
25+
ref: v2
26+
27+
# The refresh script only needs `fetch`; skip the monorepo install.
28+
- name: Setup Bun
29+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
30+
with:
31+
bun-version-file: package.json
32+
33+
- name: Setup git committer
34+
uses: ./.github/actions/setup-git-committer
35+
with:
36+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
37+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
38+
39+
- name: Refresh snapshot
40+
run: bun packages/core/script/update-models-snapshot.ts
41+
42+
- name: Commit changes
43+
run: |
44+
set -euo pipefail
45+
46+
FILE="packages/core/src/models-dev/snapshot.txt"
47+
48+
if [ -z "$(git status --short -- "$FILE")" ]; then
49+
echo "No changes to commit"
50+
echo "### models.dev snapshot" >> "$GITHUB_STEP_SUMMARY"
51+
echo "Status: no changes" >> "$GITHUB_STEP_SUMMARY"
52+
exit 0
53+
fi
54+
55+
git add "$FILE"
56+
git commit -m "chore(core): refresh bundled models.dev snapshot"
57+
58+
git pull --rebase --autostash origin v2
59+
git push origin HEAD:v2 --no-verify
60+
61+
echo "### models.dev snapshot" >> "$GITHUB_STEP_SUMMARY"
62+
echo "Status: committed $(git rev-parse --short HEAD)" >> "$GITHUB_STEP_SUMMARY"

‎.github/workflows/pr-standards.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ jobs:
298298
**What needs to be fixed:**
299299
${issues.map(i => `- ${i}`).join('\n')}
300300
301-
Please edit this PR description to address the above within **2 hours**, or it will be automatically closed.
301+
Please edit this PR description to address the above within **72 hours**, or it will be automatically closed.
302302
303303
If you believe this was flagged incorrectly, please let a maintainer know.`;
304304

‎.github/workflows/publish.yml‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,88 @@ jobs:
117117
outputs:
118118
version: ${{ needs.version.outputs.version }}
119119

120+
sign-cli-macos:
121+
needs:
122+
- build-cli
123+
- version
124+
runs-on: macos-26
125+
if: github.repository == 'anomalyco/opencode'
126+
steps:
127+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
128+
129+
- uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0
130+
with:
131+
keychain: build
132+
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
133+
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
134+
135+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
136+
with:
137+
name: opencode-cli
138+
path: packages/opencode/dist
139+
140+
- name: Setup git committer
141+
id: committer
142+
uses: ./.github/actions/setup-git-committer
143+
with:
144+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
145+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
146+
147+
- name: Sign macOS CLI binaries
148+
run: |
149+
identity=$(security find-identity -v -p codesigning build.keychain | sed -n 's/.*"\(Developer ID Application:.*\)"/\1/p' | head -n 1)
150+
if [ -z "$identity" ]; then
151+
echo "Developer ID Application identity not found"
152+
exit 1
153+
fi
154+
155+
for name in opencode-darwin-arm64 opencode-darwin-x64 opencode-darwin-x64-baseline; do
156+
file="packages/opencode/dist/$name/bin/opencode"
157+
chmod +x "$file"
158+
codesign \
159+
--force \
160+
--timestamp \
161+
--options runtime \
162+
--entitlements packages/opencode/script/entitlements.plist \
163+
--sign "$identity" \
164+
"$file"
165+
codesign --verify --deep --strict --verbose=4 "$file"
166+
codesign --display --requirements - "$file"
167+
done
168+
169+
- name: Smoke test signed binary
170+
run: ./packages/opencode/dist/opencode-darwin-arm64/bin/opencode --version
171+
172+
- name: Repack macOS CLI archives
173+
working-directory: packages/opencode/dist
174+
run: |
175+
for name in opencode-darwin-arm64 opencode-darwin-x64 opencode-darwin-x64-baseline; do
176+
rm -f "$name.zip"
177+
(cd "$name/bin" && zip -r "../../$name.zip" *)
178+
done
179+
180+
- name: Upload signed macOS CLI release assets
181+
if: needs.version.outputs.release != ''
182+
env:
183+
GH_TOKEN: ${{ steps.committer.outputs.token }}
184+
run: |
185+
gh release upload "v${{ needs.version.outputs.version }}" \
186+
packages/opencode/dist/opencode-darwin-arm64.zip \
187+
packages/opencode/dist/opencode-darwin-x64.zip \
188+
packages/opencode/dist/opencode-darwin-x64-baseline.zip \
189+
--clobber \
190+
--repo "${{ needs.version.outputs.repo }}"
191+
192+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
193+
with:
194+
name: opencode-cli-signed-macos
195+
path: |
196+
packages/opencode/dist/opencode-darwin-arm64
197+
packages/opencode/dist/opencode-darwin-x64
198+
packages/opencode/dist/opencode-darwin-x64-baseline
199+
packages/opencode/dist/opencode-darwin-*.zip
200+
if-no-files-found: error
201+
120202
sign-cli-windows:
121203
needs:
122204
- build-cli
@@ -405,6 +487,7 @@ jobs:
405487
needs:
406488
- version
407489
- build-cli
490+
- sign-cli-macos
408491
- sign-cli-windows
409492
- build-electron
410493
if: always() && !failure() && !cancelled()
@@ -437,6 +520,14 @@ jobs:
437520
name: opencode-cli
438521
path: packages/opencode/dist
439522

523+
- name: Remove unsigned macOS CLI binaries
524+
run: rm -rf packages/opencode/dist/opencode-darwin*
525+
526+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
527+
with:
528+
name: opencode-cli-signed-macos
529+
path: packages/opencode/dist
530+
440531
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
441532
with:
442533
name: opencode-cli-windows

‎.github/workflows/triage.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
ISSUE_TITLE: ${{ github.event.issue.title }}
5050
ISSUE_BODY: ${{ github.event.issue.body }}
5151
run: |
52-
opencode run --agent triage "The following issue was just opened, triage it:
52+
opencode run --agent triage --variant high "The following issue was just opened, triage it:
5353
5454
Title: $ISSUE_TITLE
5555

‎.opencode/agent/triage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
mode: primary
33
hidden: true
4-
model: opencode/gpt-5.4-mini
4+
model: opencode/gpt-6-luna
55
color: "#44BA81"
66
tools:
77
"*": false

0 commit comments

Comments
 (0)