Skip to content

Commit 0675c07

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into dev
Brings in 397 upstream commits (merge base 64ca766, upstream tip 7524e5f "chore(infra): untrack zen buckets and trust dns now that they are retained (anomalyco#62940)"). Big upstream change: the hosted web code was reorganized. services/www (84 files) and packages/console (76 files) became one services/site, and services/changelog and packages/function moved to services/share and packages/stats. The fork changed none of those files, so git followed the renames without help. packages/posts no longer exists upstream. One file conflicted. Conflict resolution =================== - script/generate.ts: upstream changed the line `services/www` to `services/site`. The fork had added a `packages/client` generate step on the line right above it, so both edits touched neighboring lines. Kept both: the generate steps are now protocol, client and site, followed by the fork's formatter (prettier on the files that generation touched, because upstream's ./script/format.ts runs `prettier --write .`, and the repo is not prettier-clean). The client step is not required, since `make tests` runs check:generated for the client, but it saves a manual `cd packages/client && bun run generate`. Fixes for upstream changes that did not conflict ================================================ - core/test/tool-cancel.test.ts (fork test): upstream's Tool now depends on a new feature-flag service (Flag), which needs Config. The test failed with "Unbound layer node: @opencode/Location". It now uses upstream's shared toolNodeReplacements() helper (test Config, passthrough Image, test Permission) in place of its own Permission mock. - core/test/plugin/retitle.test.ts (fork test): session.generate now returns `tokens` and `cost` as well as `text`, so the test's fake model reply includes them. Leftover folders ================ packages/posts and services/www stayed on disk as untracked build output (.astro, .turbo, node_modules, generated JSON). Their own .gitignore files went away with the folders, so git showed them as untracked. Upstream changed no ignore rules. Deleted both folders. Not exercised ============= This merge added no upstream database migrations, so the migration merge drivers did not run. The registry still ends at m59 (20261030054400_job) and the snapshot id is unchanged. Verification ============ - bun turbo typecheck: 34/34 packages (35 before: www and posts are now one package, site) - oxlint: 0 errors - bun script/migration.ts --check: no schema changes - make tests: generated-file checks (protocol, client) pass; tui 196, core 476, schema 7, sdk 3 pass, 0 fail. The TUI output still prints "unexpected request: /api/session/..." lines; those are known noise and the tests pass.
2 parents 35a8e31 + 7524e5f commit 0675c07

3,893 files changed

Lines changed: 386585 additions & 74373 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.

‎.gitattributes‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ packages/client/src/effect/generated/** linguist-generated
1010
packages/client/src/effect/api/** linguist-generated
1111
packages/core/src/**/*.txt text eol=lf
1212
packages/httpapi-codegen/test/generated/*.ts text eol=lf
13+
# The site tests compare source text and humans.txt byte for byte, so Windows checkouts keep LF.
14+
services/site/** text=auto eol=lf
File renamed without changes.
File renamed without changes.

‎.github/release/render-winget.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ manifests() {
2525
"PublisherSupportUrl: https://github.com/anomalyco/opencode/issues" "PrivacyUrl: https://opencode.ai/legal/privacy-policy" \
2626
"PackageName: $name" "PackageUrl: https://opencode.ai/" "License: MIT" "LicenseUrl: https://github.com/anomalyco/opencode/blob/HEAD/LICENSE" \
2727
"ShortDescription: $description" "Moniker: $moniker" "Tags:" "- ai" "- coding-agent" "- developer-tools" \
28-
"Documentations:" "- DocumentLabel: Docs" " DocumentUrl: https://opencode.ai/v2/docs"
28+
"Documentations:" "- DocumentLabel: Docs" " DocumentUrl: https://opencode.ai/docs"
2929
footer defaultLocale
3030
} > "$out/$id/$id.locale.en-US.yaml"
3131
}

‎.github/workflows/check-docs.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: check-docs
2+
3+
# Builds the V2 docs on their own (services/site/src/docs/script/build.ts): compiles every MDX page,
4+
# prerenders it, builds search, checks every link and that pages load nothing from outside /docs. The
5+
# site's deploy runs the same step, so a broken page fails here instead of blocking the deploy.
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
paths:
10+
- services/site/**
11+
- packages/protocol/openapi.json
12+
- packages/cli/src/config/**
13+
- .github/workflows/check-docs.yml
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
docs:
25+
name: docs build
26+
if: ${{ !github.event.pull_request.draft }}
27+
runs-on: blacksmith-4vcpu-ubuntu-2404
28+
timeout-minutes: 10
29+
defaults:
30+
run:
31+
working-directory: services/site
32+
steps:
33+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
34+
35+
- uses: ./.github/actions/setup-bun
36+
37+
# The API reference and the config schema the pages link (/docs/openapi.json, /v2/cli.json).
38+
- name: Generate
39+
run: bun run generate
40+
41+
- name: Build docs
42+
run: bun src/docs/script/build.ts --out "$RUNNER_TEMP/docs"

‎.github/workflows/check-process-daemon.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
$output = & $binary --version
204204
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
205205
Write-Output $output
206-
if ($output -ne "opencode-pty $version (protocol 7)") { throw "Unexpected executable version: $output" }
206+
if ($output -notmatch "^opencode-pty $([regex]::Escape($version)) \(protocol \d+\)$") { throw "Unexpected executable version: $output" }
207207
- name: Document current coverage
208208
if: always()
209209
run: |

‎.github/workflows/deploy-changelog.yml‎

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎.github/workflows/deploy-posts.yml‎

Lines changed: 0 additions & 38 deletions
This file was deleted.

‎.github/workflows/deploy-site.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: deploy-site
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- production
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: deploy-site-${{ github.ref_name }}
12+
cancel-in-progress: false
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
deploy:
19+
if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production')
20+
runs-on: blacksmith-4vcpu-ubuntu-2404
21+
environment: ${{ github.ref_name }}
22+
steps:
23+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
24+
25+
- uses: ./.github/actions/setup-bun
26+
27+
# The workflow's own token, at build time only: script/github-snapshot.ts records the repo
28+
# numbers and releases the site falls back to. The Worker never gets a GitHub token.
29+
- name: Build
30+
working-directory: services/site
31+
run: bun script/build.ts --mode ${{ github.ref_name }}
32+
env:
33+
GITHUB_TOKEN: ${{ github.token }}
34+
35+
- name: Deploy
36+
working-directory: services/site
37+
run: bunx cf deploy --prebuilt --mode ${{ github.ref_name }}
38+
env:
39+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

‎.github/workflows/deploy-www.yml‎

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)