Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
61325d1
refactor(process-daemon): simplify Windows pipe mode (#63346)
jlongster Nov 11, 2026
6ec9395
chore(process-daemon): allow 60 minutes for Windows release builds (#…
jlongster Nov 11, 2026
66e2fb9
feat(core): always run subagents in the background (#63382)
jlongster Nov 11, 2026
f5f5190
refactor(core): remove the unused foreground path from SubagentJob (#…
jlongster Nov 11, 2026
1ef4433
fix(core): defer restart wakes until parent attempts are counted (#63…
jlongster Nov 11, 2026
532d099
chore(process-daemon): release 0.5.2 (#63381)
jlongster Nov 11, 2026
0bd8cee
feat(ai): add Google Decisions (#63369)
rekram1-node Nov 11, 2026
3039a8b
fix(acp): stream the parent's reaction to background subagent reports…
jlongster Nov 11, 2026
745636a
chore(core): bump gitlab-ai-provider to 6.24.0 (#63342)
vglafirov Nov 11, 2026
33123b1
ci: deploy dev workers in anomaly-dev (#63379)
thdxr Nov 11, 2026
afbd99f
read dev data sync from the dev lake
thdxr Nov 11, 2026
7392bd4
fix(core): show the start of tool output that exceeds the limit (#63272)
rekram1-node Nov 11, 2026
1df721d
feat(site): simplify the docs header menu and move the V1 notice into…
iamdavidhill Nov 11, 2026
41cc8d6
chore(site): update OpenCode link cards (#63401)
iamdavidhill Nov 11, 2026
23dd370
refactor(core): remove leftover foreground subagent and reattach code…
jlongster Nov 11, 2026
ffcaeec
refactor(app): remove leftover foreground subagent UI (#63391)
jlongster Nov 11, 2026
b5fb1df
fix(tui): show the subagent card instead of launch instructions in mi…
jlongster Nov 11, 2026
135d46c
chore(site): remove the /ide page (#63386)
iamdavidhill Nov 11, 2026
17b5826
ci: run macos build jobs on blacksmith (#63397)
thdxr Nov 11, 2026
6b8c796
fix(core): use the localhost redirect when an MCP OAuth server rewrit…
Tarquinen Nov 11, 2026
464688b
fix(core): stop keeping the whole file in memory for tail reads (#63030)
rekram1-node Nov 11, 2026
63dd3f1
feat(core): run local Windows shell commands in the process daemon (#…
jlongster Nov 11, 2026
6d02304
refactor(core): remove the subagent notify option (#63413)
jlongster Nov 11, 2026
b451fe3
fix(legacy): keep github app secrets in production (#63423)
thdxr Nov 12, 2026
a7041d4
isolate release credentials and process daemon publishing
thdxr Nov 12, 2026
6c34e24
feat(app): hide and mute sessions in Recent sidebar (#63427)
thdxr Nov 12, 2026
f5ca39a
fix(tui): open session list at the top instead of the current session
thdxr Nov 12, 2026
5c96560
docs(console): add GPT 6 Luna Decision and Gemini Decision 1 (#63440)
opencode-agent[bot] Nov 12, 2026
647e5a7
fix(ai): accept System One refusals and send PDFs in the OpenRouter s…
rekram1-node Nov 12, 2026
4f51455
chore(perf): bench with strobe 0.29.0 (#63441)
Hona Nov 12, 2026
2c1e17b
feat(core): publish MCP events on the bus (#63261)
rekram1-node Nov 12, 2026
1017760
fix(release): limit stable releases to named actors
thdxr Nov 12, 2026
df7911a
chore(perf): bench with strobe 0.30.0 (#63497)
Hona Nov 12, 2026
cbcd846
fix(app): retry browser pane when server plugins finish loading (#63500)
neriousy Nov 12, 2026
d7ae4f2
fix(site): keep the page when leaving the Markdown view on static pag…
opencode-agent[bot] Nov 12, 2026
82e39cc
fix(app): restore message footers in the New timeline (#63513)
arvsrn Nov 12, 2026
9d236eb
fix(site): ship the link-card videos with the site's static assets (#…
adamdotdevin Nov 12, 2026
3d308ea
chore(perf): bench with strobe 0.31.0 (#63515)
Hona Nov 12, 2026
ebeaaa9
chore: merge upstream/dev into the fork
claude Nov 12, 2026
8afc1d1
ci: run process-daemon macOS jobs on GitHub-hosted runners
claude Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ packages/plugin/src/gui/ @Hona

# CI and releases. Release jobs that hold secrets run only .github/workflows/release.yml and .github/release/,
# which makes this path the release security boundary.
/.github/ @anomalyco/releasers
/.github/ @thdxr
4 changes: 4 additions & 0 deletions .github/release/cloudflare-token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ set +x

url=${CLOUDFLARE_TOKEN_URL:-https://kjivkui2evldapbok5fhrrl6oy0fctkp.lambda-url.us-east-1.on.aws/}
account=${CLOUDFLARE_ACCOUNT_ID:-15d29c8639fd3733b1b5486a2acfd968}
if [[ $# == 1 ]]; then
. "$(dirname "$0")/lib.sh"
account=$(stage_account "$1")
fi

# One argv value, never a line in curl's config: a newline in an override must not be able to
# inject curl options or move the AWS credentials into Basic auth.
Expand Down
3 changes: 2 additions & 1 deletion .github/release/deploy-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ done

: "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}"
# Pinned in targets/ and in the token issuer's config (anomalyco/secrets).
export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968
CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode")
export CLOUDFLARE_ACCOUNT_ID

unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS \
! -path ./v0/config.json \
Expand Down
3 changes: 2 additions & 1 deletion .github/release/deploy-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ target="$release/targets/files/$mode/wrangler.json"

: "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}"
# Pinned in targets/ and in the token issuer's config (anomalyco/secrets).
export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968
CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode")
export CLOUDFLARE_ACCOUNT_ID

unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS ! -path ./index.js)
[ -z "$unexpected" ] || die "Unexpected files in the files artifact: $unexpected"
Expand Down
17 changes: 11 additions & 6 deletions .github/release/deploy-legacy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# deploy-legacy.sh <dev|production> <dir> <secrets.json>: deploys the legacy
# deploy-legacy.sh <dev|production> <dir> [production-secrets.json]: deploys the legacy
# Worker from a verified Build Output artifact (services/legacy/.cloudflare/output)
# with the cf CLI pinned in cf/package-lock.json.
#
Expand All @@ -12,7 +12,6 @@

mode=$1
src=$(cd "$2" && pwd)
secrets=$(posix "$3")
release=$(cd "$(dirname "$0")" && pwd)

case "$mode" in
Expand All @@ -24,7 +23,8 @@ target="$release/targets/legacy/$mode"

: "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}"
# Pinned in targets/ and in the token issuer's config (anomalyco/secrets).
export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968
CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode")
export CLOUDFLARE_ACCOUNT_ID

unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS \
! -path ./v0/config.json \
Expand All @@ -36,8 +36,13 @@ unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256
expect_json "$src/v0/config.json" "$target/root.json" "The legacy Worker's root config"
expect_json "$src/v0/workers/default/worker.config.json" "$target/worker.json" "The legacy Worker's config"

jq -e 'keys == ["GITHUB_APP_ID", "GITHUB_APP_PRIVATE_KEY"] and all(.[]; type == "string" and length > 0)' \
"$secrets" > /dev/null || die "The secrets file does not hold exactly GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY"
args=()
if [[ "$mode" == production ]]; then
secrets=$(posix "$3")
jq -e 'keys == ["GITHUB_APP_ID", "GITHUB_APP_PRIVATE_KEY"] and all(.[]; type == "string" and length > 0)' \
"$secrets" > /dev/null || die "The secrets file does not hold exactly GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY"
args=(--secrets-file "$secrets")
fi

work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
Expand All @@ -51,4 +56,4 @@ cf="$release/cf/node_modules/.bin/cf"
[ -x "$cf" ] || die "Install the pinned cf CLI first: npm ci --ignore-scripts in .github/release/cf"

cd "$work"
"$cf" deploy --prebuilt --mode "$mode" --secrets-file "$secrets"
"$cf" deploy --prebuilt --mode "$mode" "${args[@]}"
3 changes: 2 additions & 1 deletion .github/release/deploy-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ target="$release/targets/site/$mode"

: "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}"
# Pinned in targets/ and in the token issuer's config (anomalyco/secrets).
export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968
CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode")
export CLOUDFLARE_ACCOUNT_ID

unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS \
! -path ./v0/config.json \
Expand Down
14 changes: 14 additions & 0 deletions .github/release/import-certificate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
umask 077
cert="$RUNNER_TEMP/cert.p12"
trap 'rm -f "$cert"' EXIT
keychain_password=$(openssl rand -base64 32)
printf '%s' "$APPLE_SIGNING_CERTIFICATE" | base64 --decode > "$cert"
unset APPLE_SIGNING_CERTIFICATE
security create-keychain -p "$keychain_password" build.keychain
security set-keychain-settings -lut 21600 build.keychain
security unlock-keychain -p "$keychain_password" build.keychain
security import "$cert" -k build.keychain -P "" -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productsign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$keychain_password" build.keychain > /dev/null
security list-keychains -d user -s build.keychain $(security list-keychains -d user | tr -d '"')
8 changes: 8 additions & 0 deletions .github/release/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ dry_run() {
[ "${OPENCODE_DRY_RUN:-false}" = true ]
}

stage_account() {
case "$1" in
dev) echo d8e944f537ceef3f06a5bd3aec1d7a53 ;;
production) echo 15d29c8639fd3733b1b5486a2acfd968 ;;
*) die "Unknown Cloudflare stage: $1" ;;
esac
}

sha256() {
if command -v sha256sum > /dev/null; then sha256sum "$@"; else shasum -a 256 "$@"; fi
}
Expand Down
10 changes: 4 additions & 6 deletions .github/release/plan-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# push or dispatch on beta -> beta 0.0.0-beta-<run> desktop only
# pull_request -> pr 0.0.0-pr-<run> everything, dry run
#
# Releasers are actors with the admin or maintain role on the repository (the releasers team has maintain).
# Stable releases are limited to the GitHub logins listed below (case-insensitive).
. "$(dirname "$0")/lib.sh"

versioned=false
Expand All @@ -27,11 +27,9 @@ fi
if [ "$channel" = latest ]; then
actor=${GITHUB_TRIGGERING_ACTOR:-${GITHUB_ACTOR:-}}
[ -n "$actor" ] || die "Stable releases can only be started by releasers; the triggering actor is unknown"
role=$(gh api "repos/$GITHUB_REPOSITORY/collaborators/$actor/permission" --jq .role_name) || role=""
case "$role" in
admin | maintain) ;;
*) die "Stable releases can only be started by releasers (admin or maintain on the repo); $actor has ${role:-no readable role}" ;;
esac
if ! (shopt -s nocasematch; [[ "$actor" = thdxr || "$actor" = Hona || "$actor" = rekram1-node ]]); then
die "$actor is not allowed to start stable releases"
fi
fi

if [ "$channel" = latest ] && [ -n "${INPUT_VERSION:-}" ]; then
Expand Down
19 changes: 19 additions & 0 deletions .github/release/publish-process-daemon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
. "$(dirname "$0")/lib.sh"

version=${GITHUB_REF_NAME#process-daemon-v}
[[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+([+-][0-9A-Za-z.-]+)?$ ]] || die 'Invalid daemon version'
registry=https://registry.npmjs.org
# Validate every package before the first write. Publish the dispatcher last.
packages=(pty-darwin-{arm64,x64} pty-linux-{arm64,x64}-{gnu,musl} pty-win32-{arm64,x64} pty)
for package in "${packages[@]}"; do
file="$1/opencode-$package-$version.tgz"
tar -xOzf "$file" package/package.json | jq -es --arg name "@opencode/$package" --arg version "$version" '
length == 1 and (.[0] | .name == $name and .version == $version and
((.publishConfig // {}) | del(.access) == {}))' >/dev/null || die "Unexpected manifest for $package"
done
for package in "${packages[@]}"; do
if ! npm view --registry="$registry" "@opencode/$package@$version" version >/dev/null 2>&1; then
npm publish --registry="$registry" --ignore-scripts --access public --provenance "$1/opencode-$package-$version.tgz"
fi
done
12 changes: 11 additions & 1 deletion .github/release/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
. "$(dirname "$0")/lib.sh"

tag="v$OPENCODE_VERSION"
if ! dry_run; then
umask 077
ssh_dir=$(mktemp -d)
trap 'rm -rf "$ssh_dir"' EXIT
printf '%s\n' "$RELEASE_TAG_KEY" > "$ssh_dir/key"
unset RELEASE_TAG_KEY
echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' > "$ssh_dir/known_hosts"
export GIT_SSH_COMMAND="ssh -i $ssh_dir/key -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$ssh_dir/known_hosts"
git remote set-url origin git@github.com:anomalyco/opencode.git
fi
# @opencode/pty is versioned separately, by process-daemon-v<version> tags.
git ls-files -z -- '*package.json' bun.lock ':!packages/process-daemon/**' | xargs -0 sed -i -E "s/\"version\": \"[^\"]+\"/\"version\": \"$OPENCODE_VERSION\"/g"

Expand Down Expand Up @@ -37,5 +47,5 @@ if [ -n "$existing" ]; then
echo "sha=$existing" >> "$GITHUB_OUTPUT"
exit 0
fi
git push -q origin "HEAD:refs/tags/$tag"
if ! dry_run; then git push -q origin "HEAD:refs/tags/$tag"; fi
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
38 changes: 19 additions & 19 deletions .github/release/targets/data/dev/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"compatibilityDate": "2026-07-25",
"compatibilityFlags": ["nodejs_compat"],
"triggers": [
{ "type": "fetch", "pattern": "dev.opencode.ai/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/en/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/zh/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/zht/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ko/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/de/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/es/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/fr/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/it/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/da/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ja/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/pl/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ru/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/uk/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ar/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/no/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/br/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/th/data*", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/tr/data*", "zone": "opencode.ai" }
{ "type": "fetch", "pattern": "dev.opencode.ai/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/en/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/zh/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/zht/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ko/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/de/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/es/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/fr/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/it/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/da/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ja/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/pl/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ru/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/uk/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/ar/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/no/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/br/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/th/data*", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/tr/data*", "zone": "dev.opencode.ai" }
],
"observability": { "enabled": true },
"workersDev": false,
Expand Down
2 changes: 1 addition & 1 deletion .github/release/targets/data/dev/root.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"accountId": "15d29c8639fd3733b1b5486a2acfd968",
"accountId": "d8e944f537ceef3f06a5bd3aec1d7a53",
"buildContext": { "isPreview": false, "mode": "dev" }
}
1 change: 1 addition & 0 deletions .github/release/targets/data/dev/sync.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"exportName": "DataSyncWorkflow"
},
"STAGE": { "type": "text", "value": "dev" },
"R2_SQL_ACCOUNT_ID": { "type": "text", "value": "d8e944f537ceef3f06a5bd3aec1d7a53" },
"DATA_DATABASE_HOST": { "type": "secret" },
"DATA_DATABASE_USERNAME": { "type": "secret" },
"DATA_DATABASE_PASSWORD": { "type": "secret" },
Expand Down
3 changes: 2 additions & 1 deletion .github/release/targets/files/dev/wrangler.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "opencode-dev-files",
"account_id": "d8e944f537ceef3f06a5bd3aec1d7a53",
"main": "index.js",
"no_bundle": true,
"compatibility_date": "2026-08-01",
"workers_dev": false,
"preview_urls": false,
"vars": { "STAGE": "dev" },
"routes": [{ "pattern": "dev.opencode.ai/files/*", "zone_name": "opencode.ai" }],
"routes": [{ "pattern": "dev.opencode.ai/files/*", "zone_name": "dev.opencode.ai" }],
"r2_buckets": [{ "binding": "FILES", "bucket_name": "opencode-dev-files" }]
}
2 changes: 1 addition & 1 deletion .github/release/targets/legacy/dev/root.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"accountId": "15d29c8639fd3733b1b5486a2acfd968",
"accountId": "d8e944f537ceef3f06a5bd3aec1d7a53",
"buildContext": { "isPreview": false, "mode": "dev" }
}
6 changes: 1 addition & 5 deletions .github/release/targets/legacy/dev/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
"compatibilityDate": "2026-07-25",
"compatibilityFlags": ["nodejs_compat"],
"domains": ["dev.opncd.ai", "api.dev.opencode.ai"],
"logpush": true,
"logpush": false,
"observability": { "enabled": true },
"workersDev": false,
"previewUrls": false,
"env": {
"GITHUB_APP_ID": { "type": "secret" },
"GITHUB_APP_PRIVATE_KEY": { "type": "secret" }
},
"manifest": {
"type": "complete",
"mainModule": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion .github/release/targets/site/dev/root.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"accountId": "15d29c8639fd3733b1b5486a2acfd968",
"accountId": "d8e944f537ceef3f06a5bd3aec1d7a53",
"buildContext": { "isPreview": false, "mode": "dev" }
}
4 changes: 2 additions & 2 deletions .github/release/targets/site/dev/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"domains": ["dev.opencode.ai", "docs.dev.opencode.ai"],
"triggers": [
{ "type": "fetch", "pattern": "dev.opencode.ai", "zone": "opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/*", "zone": "opencode.ai" }
{ "type": "fetch", "pattern": "dev.opencode.ai", "zone": "dev.opencode.ai" },
{ "type": "fetch", "pattern": "dev.opencode.ai/*", "zone": "dev.opencode.ai" }
],
"observability": { "enabled": true },
"workersDev": false,
Expand Down
21 changes: 21 additions & 0 deletions .github/release/with-secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Fetch only this command's named secrets; keep credentials out of its environment.
. "$(dirname "$0")/lib.sh"
set +x
while [[ $# -gt 0 && $1 != -- ]]; do
name=${1%%=*} id=${1#*=}
[[ $name =~ ^[A-Z][A-Z0-9_]*$ && $id != "$1" && -n $id ]] || die 'Expected NAME=secret-id'
if ! dry_run; then
value=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "$id" --query SecretString --output text)
[[ -n $value && $value != None ]] || die "Empty secret: $id"
while IFS= read -r line; do
[[ -z $line ]] || printf '::add-mask::%s\n' "${line//%/%25}"
done <<< "$value"
export "$name=$value"
fi
shift
done
[[ ${1:-} == -- && $# -gt 1 ]] || die 'Expected -- command'
shift
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN value
exec "$@"
2 changes: 1 addition & 1 deletion .github/workflows/bot-nix-hashes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- system: aarch64-linux
runner: blacksmith-4vcpu-ubuntu-2404-arm
- system: aarch64-darwin
runner: macos-latest
runner: blacksmith-6vcpu-macos-latest
runs-on: ${{ matrix.runner }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
# It is a step output, so only the Deploy step gets it.
- name: Cloudflare token
id: cloudflare-token
run: bash .github/release/cloudflare-token.sh
run: bash .github/release/cloudflare-token.sh "$GITHUB_REF_NAME"
env:
CLOUDFLARE_TOKEN_URL: ${{ vars.CLOUDFLARE_TOKEN_URL }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
# It is a step output, so only the Deploy step gets it.
- name: Cloudflare token
id: cloudflare-token
run: bash .github/release/cloudflare-token.sh
run: bash .github/release/cloudflare-token.sh "$GITHUB_REF_NAME"
env:
CLOUDFLARE_TOKEN_URL: ${{ vars.CLOUDFLARE_TOKEN_URL }}

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
# It is a step output, so only the Deploy step gets it.
- name: Cloudflare token
id: cloudflare-token
run: bash .github/release/cloudflare-token.sh
run: bash .github/release/cloudflare-token.sh "$GITHUB_REF_NAME"
env:
CLOUDFLARE_TOKEN_URL: ${{ vars.CLOUDFLARE_TOKEN_URL }}

Expand All @@ -109,11 +109,14 @@ jobs:
# An explicit bash runs with pipefail, so a failed secret read fails the step.
shell: bash
run: |
if [[ "$STAGE" == dev ]]; then
exec bash .github/release/deploy-legacy.sh dev "$RUNNER_TEMP/in/legacy-dev"
fi
umask 077
secrets="$RUNNER_TEMP/legacy-secrets.json"
trap 'rm -f "$secrets"' EXIT
for name in GITHUB_APP_ID GITHUB_APP_PRIVATE_KEY; do
aws secretsmanager get-secret-value --secret-id "opencode/$STAGE/$name" --output json |
aws secretsmanager get-secret-value --secret-id "opencode/production/$name" --output json |
jq --arg name "$name" '{($name): .SecretString}'
done | jq -s add > "$secrets"
bash .github/release/deploy-legacy.sh "$STAGE" "$RUNNER_TEMP/in/legacy-$STAGE" "$secrets"
Expand Down Expand Up @@ -185,7 +188,7 @@ jobs:

- name: Cloudflare token
id: cloudflare-token
run: bash .github/release/cloudflare-token.sh
run: bash .github/release/cloudflare-token.sh "$GITHUB_REF_NAME"
env:
CLOUDFLARE_TOKEN_URL: ${{ vars.CLOUDFLARE_TOKEN_URL }}

Expand Down
Loading
Loading