Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02d566e

Browse files
committed
Revert "Merge branch 'clean-dev' into feat/unarchive"
1 parent fc156ef commit 02d566e

429 files changed

Lines changed: 6419 additions & 21610 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/actions/setup-bun/action.yml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: "Setup Bun"
22
description: "Setup Bun with caching and install dependencies"
3+
inputs:
4+
cross-compile:
5+
description: "Pre-cache canary cross-compile binaries for all targets"
6+
required: false
7+
default: "false"
38
runs:
49
using: "composite"
510
steps:
@@ -16,13 +21,12 @@ runs:
1621
shell: bash
1722
run: |
1823
if [ "$RUNNER_ARCH" = "X64" ]; then
19-
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
2024
case "$RUNNER_OS" in
2125
macOS) OS=darwin ;;
2226
Linux) OS=linux ;;
2327
Windows) OS=windows ;;
2428
esac
25-
echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${V}/bun-${OS}-x64-baseline.zip" >> "$GITHUB_OUTPUT"
29+
echo "url=https://github.com/oven-sh/bun/releases/download/canary/bun-${OS}-x64-baseline.zip" >> "$GITHUB_OUTPUT"
2630
fi
2731
2832
- name: Setup Bun
@@ -31,6 +35,54 @@ runs:
3135
bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }}
3236
bun-download-url: ${{ steps.bun-url.outputs.url }}
3337

38+
- name: Pre-cache canary cross-compile binaries
39+
if: inputs.cross-compile == 'true'
40+
shell: bash
41+
run: |
42+
BUN_VERSION=$(bun --revision)
43+
if echo "$BUN_VERSION" | grep -q "canary"; then
44+
SEMVER=$(echo "$BUN_VERSION" | sed 's/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
45+
echo "Bun version: $BUN_VERSION (semver: $SEMVER)"
46+
CACHE_DIR="$HOME/.bun/install/cache"
47+
mkdir -p "$CACHE_DIR"
48+
TMP_DIR=$(mktemp -d)
49+
for TARGET in linux-aarch64 linux-x64 linux-x64-baseline linux-aarch64-musl linux-x64-musl linux-x64-musl-baseline darwin-aarch64 darwin-x64 windows-x64 windows-x64-baseline; do
50+
DEST="$CACHE_DIR/bun-${TARGET}-v${SEMVER}"
51+
if [ -f "$DEST" ]; then
52+
echo "Already cached: $DEST"
53+
continue
54+
fi
55+
URL="https://github.com/oven-sh/bun/releases/download/canary/bun-${TARGET}.zip"
56+
echo "Downloading $TARGET from $URL"
57+
if curl -sfL -o "$TMP_DIR/bun.zip" "$URL"; then
58+
unzip -qo "$TMP_DIR/bun.zip" -d "$TMP_DIR"
59+
if echo "$TARGET" | grep -q "windows"; then
60+
BIN_NAME="bun.exe"
61+
else
62+
BIN_NAME="bun"
63+
fi
64+
mv "$TMP_DIR/bun-${TARGET}/$BIN_NAME" "$DEST"
65+
chmod +x "$DEST"
66+
rm -rf "$TMP_DIR/bun-${TARGET}" "$TMP_DIR/bun.zip"
67+
echo "Cached: $DEST"
68+
# baseline bun resolves "bun-darwin-x64" to the baseline cache key
69+
# so copy the modern binary there too
70+
if [ "$TARGET" = "darwin-x64" ]; then
71+
BASELINE_DEST="$CACHE_DIR/bun-darwin-x64-baseline-v${SEMVER}"
72+
if [ ! -f "$BASELINE_DEST" ]; then
73+
cp "$DEST" "$BASELINE_DEST"
74+
echo "Cached (baseline alias): $BASELINE_DEST"
75+
fi
76+
fi
77+
else
78+
echo "Skipped: $TARGET (not available)"
79+
fi
80+
done
81+
rm -rf "$TMP_DIR"
82+
else
83+
echo "Not a canary build ($BUN_VERSION), skipping pre-cache"
84+
fi
85+
3486
- name: Install dependencies
3587
run: bun install
3688
shell: bash

.github/workflows/docs-locale-sync.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,12 @@ jobs:
4747
echo "EOF"
4848
} >> "$GITHUB_OUTPUT"
4949
50-
- name: Install OpenCode
51-
if: steps.changes.outputs.has_changes == 'true'
52-
run: curl -fsSL https://opencode.ai/install | bash
53-
5450
- name: Sync locale docs with OpenCode
5551
if: steps.changes.outputs.has_changes == 'true'
52+
uses: sst/opencode/github@latest
5653
env:
5754
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
55+
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
5856
OPENCODE_CONFIG_CONTENT: |
5957
{
6058
"permission": {
@@ -67,9 +65,9 @@ jobs:
6765
"packages/web/src/content/docs/*/*.mdx": "allow",
6866
".opencode": "allow",
6967
".opencode/agent": "allow",
70-
".opencode/glossary": "allow",
68+
".opencode/agent/glossary": "allow",
7169
".opencode/agent/translator.md": "allow",
72-
".opencode/glossary/*.md": "allow"
70+
".opencode/agent/glossary/*.md": "allow"
7371
},
7472
"edit": {
7573
"*": "deny",
@@ -78,7 +76,7 @@ jobs:
7876
"glob": {
7977
"*": "deny",
8078
"packages/web/src/content/docs*": "allow",
81-
".opencode/glossary*": "allow"
79+
".opencode/agent/glossary*": "allow"
8280
},
8381
"task": {
8482
"*": "deny",
@@ -92,14 +90,17 @@ jobs:
9290
"read": {
9391
"*": "deny",
9492
".opencode/agent/translator.md": "allow",
95-
".opencode/glossary/*.md": "allow"
93+
".opencode/agent/glossary/*.md": "allow"
9694
}
9795
}
9896
}
9997
}
10098
}
101-
run: |
102-
opencode run --agent docs --model opencode/gpt-5.3-codex <<'EOF'
99+
with:
100+
model: opencode/gpt-5.3-codex
101+
agent: docs
102+
use_github_token: true
103+
prompt: |
103104
Update localized docs to match the latest English docs changes.
104105
105106
Changed English doc files:
@@ -117,7 +118,6 @@ jobs:
117118
7. Keep locale docs structure aligned with their corresponding English pages.
118119
8. Do not modify English source docs in packages/web/src/content/docs/*.mdx.
119120
9. If no locale updates are needed, make no changes.
120-
EOF
121121
122122
- name: Commit and push locale docs updates
123123
if: steps.changes.outputs.has_changes == 'true'

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
fetch-tags: true
7878

7979
- uses: ./.github/actions/setup-bun
80+
with:
81+
cross-compile: "true"
8082

8183
- name: Setup git committer
8284
id: committer
@@ -88,7 +90,7 @@ jobs:
8890
- name: Build
8991
id: build
9092
run: |
91-
./packages/opencode/script/build.ts
93+
./packages/opencode/script/build.ts --all
9294
env:
9395
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
9496
OPENCODE_RELEASE: ${{ needs.version.outputs.release }}

.github/workflows/sign-cli.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020
fetch-tags: true
2121

2222
- uses: ./.github/actions/setup-bun
23+
with:
24+
cross-compile: "true"
2325

2426
- name: Build
2527
run: |
26-
./packages/opencode/script/build.ts
28+
./packages/opencode/script/build.ts --all
2729
2830
- name: Upload unsigned Windows CLI
2931
id: upload_unsigned_windows_cli

.github/workflows/vouch-check-issue.yml

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,15 @@ jobs:
4242
throw error;
4343
}
4444
45-
// Parse the .td file for vouched and denounced users
46-
const vouched = new Set();
45+
// Parse the .td file for denounced users
4746
const denounced = new Map();
4847
for (const line of content.split('\n')) {
4948
const trimmed = line.trim();
5049
if (!trimmed || trimmed.startsWith('#')) continue;
50+
if (!trimmed.startsWith('-')) continue;
5151
52-
const isDenounced = trimmed.startsWith('-');
53-
const rest = isDenounced ? trimmed.slice(1).trim() : trimmed;
52+
const rest = trimmed.slice(1).trim();
5453
if (!rest) continue;
55-
5654
const spaceIdx = rest.indexOf(' ');
5755
const handle = spaceIdx === -1 ? rest : rest.slice(0, spaceIdx);
5856
const reason = spaceIdx === -1 ? null : rest.slice(spaceIdx + 1).trim();
@@ -67,50 +65,32 @@ jobs:
6765
const username = colonIdx === -1 ? handle : handle.slice(colonIdx + 1);
6866
if (!username) continue;
6967
70-
if (isDenounced) {
71-
denounced.set(username.toLowerCase(), reason);
72-
continue;
73-
}
74-
75-
vouched.add(username.toLowerCase());
68+
denounced.set(username.toLowerCase(), reason);
7669
}
7770
7871
// Check if the author is denounced
7972
const reason = denounced.get(author.toLowerCase());
80-
if (reason !== undefined) {
81-
// Author is denounced — close the issue
82-
const body = 'This issue has been automatically closed.';
83-
84-
await github.rest.issues.createComment({
85-
owner: context.repo.owner,
86-
repo: context.repo.repo,
87-
issue_number: issueNumber,
88-
body,
89-
});
90-
91-
await github.rest.issues.update({
92-
owner: context.repo.owner,
93-
repo: context.repo.repo,
94-
issue_number: issueNumber,
95-
state: 'closed',
96-
state_reason: 'not_planned',
97-
});
98-
99-
core.info(`Closed issue #${issueNumber} from denounced user ${author}`);
73+
if (reason === undefined) {
74+
core.info(`User ${author} is not denounced. Allowing issue.`);
10075
return;
10176
}
10277
103-
// Author is positively vouched — add label
104-
if (!vouched.has(author.toLowerCase())) {
105-
core.info(`User ${author} is not denounced or vouched. Allowing issue.`);
106-
return;
107-
}
78+
// Author is denounced — close the issue
79+
const body = 'This issue has been automatically closed.';
80+
81+
await github.rest.issues.createComment({
82+
owner: context.repo.owner,
83+
repo: context.repo.repo,
84+
issue_number: issueNumber,
85+
body,
86+
});
10887
109-
await github.rest.issues.addLabels({
88+
await github.rest.issues.update({
11089
owner: context.repo.owner,
11190
repo: context.repo.repo,
11291
issue_number: issueNumber,
113-
labels: ['Vouched'],
92+
state: 'closed',
93+
state_reason: 'not_planned',
11494
});
11595
116-
core.info(`Added vouched label to issue #${issueNumber} from ${author}`);
96+
core.info(`Closed issue #${issueNumber} from denounced user ${author}`);

.github/workflows/vouch-check-pr.yml

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66

77
permissions:
88
contents: read
9-
issues: write
109
pull-requests: write
1110

1211
jobs:
@@ -43,17 +42,15 @@ jobs:
4342
throw error;
4443
}
4544
46-
// Parse the .td file for vouched and denounced users
47-
const vouched = new Set();
45+
// Parse the .td file for denounced users
4846
const denounced = new Map();
4947
for (const line of content.split('\n')) {
5048
const trimmed = line.trim();
5149
if (!trimmed || trimmed.startsWith('#')) continue;
50+
if (!trimmed.startsWith('-')) continue;
5251
53-
const isDenounced = trimmed.startsWith('-');
54-
const rest = isDenounced ? trimmed.slice(1).trim() : trimmed;
52+
const rest = trimmed.slice(1).trim();
5553
if (!rest) continue;
56-
5754
const spaceIdx = rest.indexOf(' ');
5855
const handle = spaceIdx === -1 ? rest : rest.slice(0, spaceIdx);
5956
const reason = spaceIdx === -1 ? null : rest.slice(spaceIdx + 1).trim();
@@ -68,47 +65,29 @@ jobs:
6865
const username = colonIdx === -1 ? handle : handle.slice(colonIdx + 1);
6966
if (!username) continue;
7067
71-
if (isDenounced) {
72-
denounced.set(username.toLowerCase(), reason);
73-
continue;
74-
}
75-
76-
vouched.add(username.toLowerCase());
68+
denounced.set(username.toLowerCase(), reason);
7769
}
7870
7971
// Check if the author is denounced
8072
const reason = denounced.get(author.toLowerCase());
81-
if (reason !== undefined) {
82-
// Author is denounced — close the PR
83-
await github.rest.issues.createComment({
84-
owner: context.repo.owner,
85-
repo: context.repo.repo,
86-
issue_number: prNumber,
87-
body: 'This pull request has been automatically closed.',
88-
});
89-
90-
await github.rest.pulls.update({
91-
owner: context.repo.owner,
92-
repo: context.repo.repo,
93-
pull_number: prNumber,
94-
state: 'closed',
95-
});
96-
97-
core.info(`Closed PR #${prNumber} from denounced user ${author}`);
98-
return;
99-
}
100-
101-
// Author is positively vouched — add label
102-
if (!vouched.has(author.toLowerCase())) {
103-
core.info(`User ${author} is not denounced or vouched. Allowing PR.`);
73+
if (reason === undefined) {
74+
core.info(`User ${author} is not denounced. Allowing PR.`);
10475
return;
10576
}
10677
107-
await github.rest.issues.addLabels({
78+
// Author is denounced — close the PR
79+
await github.rest.issues.createComment({
10880
owner: context.repo.owner,
10981
repo: context.repo.repo,
11082
issue_number: prNumber,
111-
labels: ['Vouched'],
83+
body: 'This pull request has been automatically closed.',
84+
});
85+
86+
await github.rest.pulls.update({
87+
owner: context.repo.owner,
88+
repo: context.repo.repo,
89+
pull_number: prNumber,
90+
state: 'closed',
11291
});
11392
114-
core.info(`Added vouched label to PR #${prNumber} from ${author}`);
93+
core.info(`Closed PR #${prNumber} from denounced user ${author}`);

.github/workflows/vouch-manage-by-issue.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ jobs:
3333
with:
3434
issue-id: ${{ github.event.issue.number }}
3535
comment-id: ${{ github.event.comment.id }}
36-
roles: admin,maintain
3736
env:
3837
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)