From 2bea8df0a7be13e60666e6a2db0c69e589ae8cc7 Mon Sep 17 00:00:00 2001 From: Jeff Bishop Date: Thu, 19 Nov 2026 08:43:57 -0700 Subject: [PATCH 1/7] Add signed Windows release candidates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../workflows/accesscode-windows-release.yml | 329 ++++++++++++++++++ .github/workflows/accesscode-windows.yml | 10 +- packages/app/src/custom-elements.d.ts | 2 +- packages/desktop/README.md | 38 +- 4 files changed, 370 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/accesscode-windows-release.yml diff --git a/.github/workflows/accesscode-windows-release.yml b/.github/workflows/accesscode-windows-release.yml new file mode 100644 index 000000000000..80e6feba0a7a --- /dev/null +++ b/.github/workflows/accesscode-windows-release.yml @@ -0,0 +1,329 @@ +name: AccessCode Windows release candidate + +on: + workflow_dispatch: + inputs: + version: + description: Stable version from package.json (for example, 2.3.2) + required: true + type: string + +permissions: + contents: read + +concurrency: + group: accesscode-windows-release-${{ inputs.version }} + cancel-in-progress: false + +jobs: + build-app: + if: github.ref == 'refs/heads/main' + runs-on: windows-2025 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - desktop: windows-x64 + cli: windows-x64-baseline + install: "" + - desktop: windows-arm64 + cli: windows-arm64 + install: --cpu=* + env: + OPENCODE_CHANNEL: latest + OPENCODE_VERSION: ${{ inputs.version }} + ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ vars.ACCESSCODE_WINDOWS_UPDATE_PUBLISHER }} + CSC_IDENTITY_AUTO_DISCOVERY: "false" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./.github/actions/setup-bun + with: + install-flags: ${{ matrix.install }} + - name: Validate stable version and publisher + shell: pwsh + run: | + $version = $env:OPENCODE_VERSION + $manifestVersion = (Get-Content package.json -Raw | ConvertFrom-Json).version + if ($version -notmatch '^\d+\.\d+\.\d+$' -or $version -ne $manifestVersion) { + throw "Release candidate version must be the stable package.json version ($manifestVersion)." + } + if ([string]::IsNullOrWhiteSpace($env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER)) { + throw "Set the ACCESSCODE_WINDOWS_UPDATE_PUBLISHER repository variable to the approved Authenticode subject." + } + - name: Build bundled CLI + run: bun run --cwd packages/cli build --skip-install + env: + OPENCODE_TARGET: ${{ matrix.cli }} + - name: Build desktop + run: bun run --cwd packages/desktop build + env: + OPENCODE_TARGET: ${{ matrix.desktop }} + - name: Pack unpacked app + run: bun run --cwd packages/desktop pack + env: + OPENCODE_TARGET: ${{ matrix.desktop }} + - name: Stage app and pack portable edition + shell: pwsh + env: + OPENCODE_TARGET: ${{ matrix.desktop }} + run: | + Move-Item dist\desktop\app (Join-Path $env:RUNNER_TEMP 'app') + bun run --cwd packages\desktop pack --portable + if ($LASTEXITCODE) { exit $LASTEXITCODE } + Move-Item "dist\portable\AccessCode-$env:OPENCODE_TARGET" (Join-Path $env:RUNNER_TEMP 'portable') + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: build-app-${{ matrix.desktop }} + path: ${{ runner.temp }}/app + if-no-files-found: error + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: build-portable-${{ matrix.desktop }} + path: ${{ runner.temp }}/portable + if-no-files-found: error + + sign-app: + needs: build-app + if: github.ref == 'refs/heads/main' + runs-on: windows-2025 + timeout-minutes: 60 + environment: accesscode-release + permissions: + contents: read + id-token: write + strategy: + fail-fast: false + matrix: + desktop: [windows-x64, windows-arm64] + env: + ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ vars.ACCESSCODE_WINDOWS_UPDATE_PUBLISHER }} + steps: + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: build-app-${{ matrix.desktop }} + path: ${{ runner.temp }}/app + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: build-portable-${{ matrix.desktop }} + path: ${{ runner.temp }}/portable + - name: Log in to Azure + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 + with: + client-id: ${{ vars.AZURE_CLIENT_ID }} + tenant-id: ${{ vars.AZURE_TENANT_ID }} + subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} + - name: Preserve valid third-party signatures + shell: pwsh + run: | + $backup = Join-Path $env:RUNNER_TEMP 'third-party-signed' + New-Item -ItemType Directory -Path $backup -Force | Out-Null + foreach ($name in @('app', 'portable')) { + $root = Join-Path $env:RUNNER_TEMP $name + Get-ChildItem -LiteralPath $root -File -Recurse | + Where-Object { $_.Extension -in @('.exe', '.node') } | + ForEach-Object { + $signature = Get-AuthenticodeSignature -FilePath $_.FullName + if ($signature.Status -eq 'Valid' -and + $signature.SignerCertificate.Subject -ne $env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER) { + $relative = [IO.Path]::GetRelativePath($root, $_.FullName) + $destination = Join-Path (Join-Path $backup $name) $relative + New-Item -ItemType Directory -Path (Split-Path -Parent $destination) -Force | Out-Null + Move-Item -LiteralPath $_.FullName -Destination $destination + } + } + } + - name: Sign app binaries + uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 + with: + cache-dependencies: false + endpoint: ${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }} + signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} + certificate-profile-name: ${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} + files-folder: ${{ runner.temp }}\app + files-folder-filter: exe,node + files-folder-recurse: true + exclude-environment-credential: true + exclude-workload-identity-credential: true + exclude-managed-identity-credential: true + exclude-shared-token-cache-credential: true + exclude-visual-studio-credential: true + exclude-visual-studio-code-credential: true + exclude-azure-cli-credential: false + exclude-azure-powershell-credential: true + exclude-azure-developer-cli-credential: true + exclude-interactive-browser-credential: true + - name: Sign portable binaries + uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 + with: + cache-dependencies: false + endpoint: ${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }} + signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} + certificate-profile-name: ${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} + files-folder: ${{ runner.temp }}\portable + files-folder-filter: exe,node + files-folder-recurse: true + exclude-environment-credential: true + exclude-workload-identity-credential: true + exclude-managed-identity-credential: true + exclude-shared-token-cache-credential: true + exclude-visual-studio-credential: true + exclude-visual-studio-code-credential: true + exclude-azure-cli-credential: false + exclude-azure-powershell-credential: true + exclude-azure-developer-cli-credential: true + exclude-interactive-browser-credential: true + - name: Restore valid third-party signatures + shell: pwsh + run: | + $backup = Join-Path $env:RUNNER_TEMP 'third-party-signed' + foreach ($name in @('app', 'portable')) { + $saved = Join-Path $backup $name + if (!(Test-Path -LiteralPath $saved -PathType Container)) { continue } + $root = Join-Path $env:RUNNER_TEMP $name + Get-ChildItem -LiteralPath $saved -File -Recurse | ForEach-Object { + $relative = [IO.Path]::GetRelativePath($saved, $_.FullName) + $destination = Join-Path $root $relative + New-Item -ItemType Directory -Path (Split-Path -Parent $destination) -Force | Out-Null + Move-Item -LiteralPath $_.FullName -Destination $destination + } + } + - name: Verify signed payloads and archive portable edition + shell: pwsh + run: | + foreach ($root in @((Join-Path $env:RUNNER_TEMP 'app'), (Join-Path $env:RUNNER_TEMP 'portable'))) { + $files = Get-ChildItem -LiteralPath $root -File -Recurse | + Where-Object { $_.Extension -in @('.exe', '.node') } + if (!$files) { throw "No signed Windows binaries found in $root" } + foreach ($file in $files) { + $signature = Get-AuthenticodeSignature -FilePath $file.FullName + $mustUseReleasePublisher = $file.Extension -eq '.node' -or $file.Name -in @('AccessCode.exe', 'opencode-cli.exe') + if ($signature.Status -ne 'Valid' -or + ($mustUseReleasePublisher -and $signature.SignerCertificate.Subject -ne $env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER)) { + throw "Invalid or unexpected Authenticode signature: $($file.FullName)" + } + } + } + Compress-Archive -Path (Join-Path $env:RUNNER_TEMP 'portable\*') ` + -DestinationPath (Join-Path $env:RUNNER_TEMP "accesscode-portable-$env:GITHUB_RUN_ID.zip") ` + -CompressionLevel Optimal + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: signed-app-${{ matrix.desktop }} + path: ${{ runner.temp }}/app + if-no-files-found: error + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: accesscode-portable-${{ matrix.desktop }} + path: ${{ runner.temp }}/accesscode-portable-${{ github.run_id }}.zip + if-no-files-found: error + + build-installer: + needs: sign-app + if: github.ref == 'refs/heads/main' + runs-on: windows-2025 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - desktop: windows-x64 + install: "" + - desktop: windows-arm64 + install: --cpu=* + env: + OPENCODE_CHANNEL: latest + OPENCODE_VERSION: ${{ inputs.version }} + OPENCODE_TARGET: ${{ matrix.desktop }} + CSC_IDENTITY_AUTO_DISCOVERY: "false" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./.github/actions/setup-bun + with: + install-flags: ${{ matrix.install }} + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: signed-app-${{ matrix.desktop }} + path: ${{ runner.temp }}/app + - name: Locate Inno Setup + shell: pwsh + run: | + $candidates = @( + (Join-Path ${env:ProgramFiles(x86)} 'Inno Setup 6\ISCC.exe'), + (Join-Path ${env:ProgramFiles(x86)} 'Inno Setup 7\ISCC.exe') + ) + $compiler = $candidates | Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } | Select-Object -First 1 + if (!$compiler) { throw 'Inno Setup 6.7.4 or newer was not found on the Windows runner.' } + "ISCC=$compiler" >> $env:GITHUB_ENV + - name: Pack signed app into Inno Setup installer + run: bun run --cwd packages/desktop pack + env: + OPENCODE_DESKTOP_APP: ${{ runner.temp }}/app + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: build-installer-${{ matrix.desktop }} + path: dist/desktop/*.exe + if-no-files-found: error + + sign-installer: + needs: build-installer + if: github.ref == 'refs/heads/main' + runs-on: windows-2025 + timeout-minutes: 30 + environment: accesscode-release + permissions: + contents: read + id-token: write + strategy: + fail-fast: false + matrix: + desktop: [windows-x64, windows-arm64] + env: + ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ vars.ACCESSCODE_WINDOWS_UPDATE_PUBLISHER }} + steps: + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: build-installer-${{ matrix.desktop }} + path: ${{ runner.temp }}/installer + - name: Log in to Azure + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 + with: + client-id: ${{ vars.AZURE_CLIENT_ID }} + tenant-id: ${{ vars.AZURE_TENANT_ID }} + subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} + - name: Sign installer + uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 + with: + cache-dependencies: false + endpoint: ${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }} + signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} + certificate-profile-name: ${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} + files-folder: ${{ runner.temp }}\installer + files-folder-filter: exe + files-folder-recurse: true + exclude-environment-credential: true + exclude-workload-identity-credential: true + exclude-managed-identity-credential: true + exclude-shared-token-cache-credential: true + exclude-visual-studio-credential: true + exclude-visual-studio-code-credential: true + exclude-azure-cli-credential: false + exclude-azure-powershell-credential: true + exclude-azure-developer-cli-credential: true + exclude-interactive-browser-credential: true + - name: Verify signed installer + shell: pwsh + run: | + $files = Get-ChildItem -LiteralPath (Join-Path $env:RUNNER_TEMP 'installer') -Filter '*.exe' -File -Recurse + if (!$files) { throw 'No Inno Setup installer was produced.' } + foreach ($file in $files) { + $signature = Get-AuthenticodeSignature -FilePath $file.FullName + if ($signature.Status -ne 'Valid' -or $signature.SignerCertificate.Subject -ne $env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER) { + throw "Invalid or unexpected Authenticode signature: $($file.FullName)" + } + } + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: accesscode-installer-${{ matrix.desktop }} + path: ${{ runner.temp }}/installer/*.exe + if-no-files-found: error diff --git a/.github/workflows/accesscode-windows.yml b/.github/workflows/accesscode-windows.yml index 6bd7d0e1b359..5a1c4b75067c 100644 --- a/.github/workflows/accesscode-windows.yml +++ b/.github/workflows/accesscode-windows.yml @@ -57,11 +57,19 @@ jobs: if ($LASTEXITCODE) { exit $LASTEXITCODE } $env:ISCC = Join-Path ${env:ProgramFiles(x86)} 'Inno Setup 6\ISCC.exe' Move-Item dist\desktop\app $env:RUNNER_TEMP + bun run --cwd packages\desktop pack --portable + if ($LASTEXITCODE) { exit $LASTEXITCODE } + Move-Item "dist\portable\AccessCode-$env:OPENCODE_TARGET" (Join-Path $env:RUNNER_TEMP 'portable') $env:OPENCODE_DESKTOP_APP = Join-Path $env:RUNNER_TEMP 'app' bun run --cwd packages\desktop pack if ($LASTEXITCODE) { exit $LASTEXITCODE } - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: accesscode-${{ matrix.desktop }} + name: accesscode-installer-${{ matrix.desktop }} path: dist/desktop/*.exe if-no-files-found: error + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: accesscode-portable-${{ matrix.desktop }} + path: ${{ runner.temp }}/portable + if-no-files-found: error diff --git a/packages/app/src/custom-elements.d.ts b/packages/app/src/custom-elements.d.ts index e4ea0d6cebda..86cb284693e6 120000 --- a/packages/app/src/custom-elements.d.ts +++ b/packages/app/src/custom-elements.d.ts @@ -1 +1 @@ -../../ui/src/custom-elements.d.ts \ No newline at end of file +/// diff --git a/packages/desktop/README.md b/packages/desktop/README.md index 1f8f50fdb1b9..bbb674df1725 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -72,13 +72,21 @@ try { The resulting installer is `dist\desktop\accesscode-desktop-win-x64.exe`. The temporary staged copy can be removed after packaging. This procedure does not sign or publish the installer. -For an update-enabled production release, use `OPENCODE_CHANNEL=latest` and set -`ACCESSCODE_WINDOWS_UPDATE_PUBLISHER` to the exact Authenticode signer subject before packing the unpacked app. -Build x64 and ARM64, sign their unpacked payloads, then compile and sign both final Inno installers. From the -repository root in PowerShell 7, run `.github\release\write-accesscode-windows-feed.ps1` with the installer -directory, stable version and signing subject. Publish the two signed installers and `latest.yml` together as -assets of the latest [AccessCode GitHub release](https://github.com/Community-Access/access-code/releases). Do not -publish unsigned installers to this feed. Automatic updates are off in local and preview builds. +The [Windows CI workflow](../../.github/workflows/accesscode-windows.yml) builds unsigned Dev installers and +portable editions for x64 and ARM64. These are for testing, not public release. + +For a stable public-release candidate, merge the stable version to `main`, then run the +[Windows release-candidate workflow](../../.github/workflows/accesscode-windows-release.yml) from `main` with that +version. The workflow signs the app payload before compiling each Inno Setup installer, preserves valid third-party +signatures, signs each installer, and uploads signed x64/ARM64 installer and portable artifacts. It does not publish +a GitHub release or update feed. +Configure its Azure OpenID connection and `ACCESSCODE_WINDOWS_UPDATE_PUBLISHER` variable as described below before +running it. + +To publish automatic updates, run `.github\release\write-accesscode-windows-feed.ps1` with the signed installer +directory, stable version and signing subject. Publish both signed installers and the generated `latest.yml` +together as assets of the latest [AccessCode GitHub release](https://github.com/Community-Access/access-code/releases). +Do not publish unsigned installers to this feed. Automatic updates are off in local and preview builds. #### Sign Windows builds with Azure Artifact Signing @@ -87,6 +95,22 @@ The Windows machine used for Quill can reuse its Azure Artifact Signing produces an embedded Authenticode signature, not a detached provenance signature. Azure holds the private key; no local PFX is needed. +For the GitHub release-candidate workflow, configure these variables in the +`accesscode-release` GitHub Actions environment: + +- `AZURE_CLIENT_ID`, `AZURE_TENANT_ID` and `AZURE_SUBSCRIPTION_ID` for a service + principal with a federated credential whose subject is + `repo:Community-Access/access-code:environment:accesscode-release`. +- `AZURE_TRUSTED_SIGNING_ENDPOINT`, `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME` and + `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE` for the approved signing profile. +- Set the non-secret `ACCESSCODE_WINDOWS_UPDATE_PUBLISHER` repository variable + to the exact Authenticode subject from that profile. + +Grant the federated identity the **Artifact Signing Certificate Profile Signer** +role on the certificate profile. The workflow uses the protected +`accesscode-release` environment for signing approvals. Never commit Azure +credentials, certificates or private keys. + 1. Use a Windows SDK with `signtool.exe`, the approved Azure signing account and certificate profile, and an Azure identity with the **Artifact Signing Certificate Profile Signer** role. Keep account configuration and credentials From 5b337fa887847a308e4108d8532ef22893d9e5b4 Mon Sep 17 00:00:00 2001 From: Taylor Arndt <185963211+taylorarndt@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:35:49 -0600 Subject: [PATCH 2/7] fix(desktop): prepare Windows payloads for manual signing --- .../workflows/accesscode-windows-payloads.yml | 89 +++++ .../workflows/accesscode-windows-release.yml | 329 ------------------ packages/app/src/custom-elements.d.ts | 0 packages/desktop/README.md | 35 +- 4 files changed, 100 insertions(+), 353 deletions(-) create mode 100644 .github/workflows/accesscode-windows-payloads.yml delete mode 100644 .github/workflows/accesscode-windows-release.yml mode change 120000 => 100644 packages/app/src/custom-elements.d.ts diff --git a/.github/workflows/accesscode-windows-payloads.yml b/.github/workflows/accesscode-windows-payloads.yml new file mode 100644 index 000000000000..e3e48eca65ee --- /dev/null +++ b/.github/workflows/accesscode-windows-payloads.yml @@ -0,0 +1,89 @@ +name: Build unsigned AccessCode Windows release payloads + +on: + workflow_dispatch: + inputs: + version: + description: Stable version from package.json (for example, 2.3.2) + required: true + type: string + + publisher: + description: Exact Authenticode subject for the manually signed Windows update + required: true + type: string + +permissions: + contents: read + +concurrency: + group: accesscode-windows-release-${{ inputs.version }} + cancel-in-progress: false + +jobs: + build-app: + if: github.ref == 'refs/heads/main' + runs-on: windows-2025 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - desktop: windows-x64 + cli: windows-x64-baseline + install: "" + - desktop: windows-arm64 + cli: windows-arm64 + install: --cpu=* + env: + OPENCODE_CHANNEL: latest + OPENCODE_VERSION: ${{ inputs.version }} + ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ inputs.publisher }} + CSC_IDENTITY_AUTO_DISCOVERY: "false" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./.github/actions/setup-bun + with: + install-flags: ${{ matrix.install }} + - name: Validate stable version and publisher + shell: pwsh + run: | + $version = $env:OPENCODE_VERSION + $manifestVersion = (Get-Content package.json -Raw | ConvertFrom-Json).version + if ($version -notmatch '^\d+\.\d+\.\d+$' -or $version -ne $manifestVersion) { + throw "Release candidate version must be the stable package.json version ($manifestVersion)." + } + if ([string]::IsNullOrWhiteSpace($env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER)) { + throw "Enter the approved Authenticode subject as the publisher input." + } + - name: Build bundled CLI + run: bun run --cwd packages/cli build --skip-install + env: + OPENCODE_TARGET: ${{ matrix.cli }} + - name: Build desktop + run: bun run --cwd packages/desktop build + env: + OPENCODE_TARGET: ${{ matrix.desktop }} + - name: Pack unpacked app + run: bun run --cwd packages/desktop pack + env: + OPENCODE_TARGET: ${{ matrix.desktop }} + - name: Stage app and pack portable edition + shell: pwsh + env: + OPENCODE_TARGET: ${{ matrix.desktop }} + run: | + Move-Item dist\desktop\app (Join-Path $env:RUNNER_TEMP 'app') + bun run --cwd packages\desktop pack --portable + if ($LASTEXITCODE) { exit $LASTEXITCODE } + Move-Item "dist\portable\AccessCode-$env:OPENCODE_TARGET" (Join-Path $env:RUNNER_TEMP 'portable') + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: unsigned-stable-app-${{ matrix.desktop }} + path: ${{ runner.temp }}/app + if-no-files-found: error + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: unsigned-stable-portable-${{ matrix.desktop }} + path: ${{ runner.temp }}/portable + if-no-files-found: error diff --git a/.github/workflows/accesscode-windows-release.yml b/.github/workflows/accesscode-windows-release.yml deleted file mode 100644 index 80e6feba0a7a..000000000000 --- a/.github/workflows/accesscode-windows-release.yml +++ /dev/null @@ -1,329 +0,0 @@ -name: AccessCode Windows release candidate - -on: - workflow_dispatch: - inputs: - version: - description: Stable version from package.json (for example, 2.3.2) - required: true - type: string - -permissions: - contents: read - -concurrency: - group: accesscode-windows-release-${{ inputs.version }} - cancel-in-progress: false - -jobs: - build-app: - if: github.ref == 'refs/heads/main' - runs-on: windows-2025 - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - desktop: windows-x64 - cli: windows-x64-baseline - install: "" - - desktop: windows-arm64 - cli: windows-arm64 - install: --cpu=* - env: - OPENCODE_CHANNEL: latest - OPENCODE_VERSION: ${{ inputs.version }} - ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ vars.ACCESSCODE_WINDOWS_UPDATE_PUBLISHER }} - CSC_IDENTITY_AUTO_DISCOVERY: "false" - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ./.github/actions/setup-bun - with: - install-flags: ${{ matrix.install }} - - name: Validate stable version and publisher - shell: pwsh - run: | - $version = $env:OPENCODE_VERSION - $manifestVersion = (Get-Content package.json -Raw | ConvertFrom-Json).version - if ($version -notmatch '^\d+\.\d+\.\d+$' -or $version -ne $manifestVersion) { - throw "Release candidate version must be the stable package.json version ($manifestVersion)." - } - if ([string]::IsNullOrWhiteSpace($env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER)) { - throw "Set the ACCESSCODE_WINDOWS_UPDATE_PUBLISHER repository variable to the approved Authenticode subject." - } - - name: Build bundled CLI - run: bun run --cwd packages/cli build --skip-install - env: - OPENCODE_TARGET: ${{ matrix.cli }} - - name: Build desktop - run: bun run --cwd packages/desktop build - env: - OPENCODE_TARGET: ${{ matrix.desktop }} - - name: Pack unpacked app - run: bun run --cwd packages/desktop pack - env: - OPENCODE_TARGET: ${{ matrix.desktop }} - - name: Stage app and pack portable edition - shell: pwsh - env: - OPENCODE_TARGET: ${{ matrix.desktop }} - run: | - Move-Item dist\desktop\app (Join-Path $env:RUNNER_TEMP 'app') - bun run --cwd packages\desktop pack --portable - if ($LASTEXITCODE) { exit $LASTEXITCODE } - Move-Item "dist\portable\AccessCode-$env:OPENCODE_TARGET" (Join-Path $env:RUNNER_TEMP 'portable') - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: build-app-${{ matrix.desktop }} - path: ${{ runner.temp }}/app - if-no-files-found: error - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: build-portable-${{ matrix.desktop }} - path: ${{ runner.temp }}/portable - if-no-files-found: error - - sign-app: - needs: build-app - if: github.ref == 'refs/heads/main' - runs-on: windows-2025 - timeout-minutes: 60 - environment: accesscode-release - permissions: - contents: read - id-token: write - strategy: - fail-fast: false - matrix: - desktop: [windows-x64, windows-arm64] - env: - ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ vars.ACCESSCODE_WINDOWS_UPDATE_PUBLISHER }} - steps: - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: build-app-${{ matrix.desktop }} - path: ${{ runner.temp }}/app - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: build-portable-${{ matrix.desktop }} - path: ${{ runner.temp }}/portable - - name: Log in to Azure - uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 - with: - client-id: ${{ vars.AZURE_CLIENT_ID }} - tenant-id: ${{ vars.AZURE_TENANT_ID }} - subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} - - name: Preserve valid third-party signatures - shell: pwsh - run: | - $backup = Join-Path $env:RUNNER_TEMP 'third-party-signed' - New-Item -ItemType Directory -Path $backup -Force | Out-Null - foreach ($name in @('app', 'portable')) { - $root = Join-Path $env:RUNNER_TEMP $name - Get-ChildItem -LiteralPath $root -File -Recurse | - Where-Object { $_.Extension -in @('.exe', '.node') } | - ForEach-Object { - $signature = Get-AuthenticodeSignature -FilePath $_.FullName - if ($signature.Status -eq 'Valid' -and - $signature.SignerCertificate.Subject -ne $env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER) { - $relative = [IO.Path]::GetRelativePath($root, $_.FullName) - $destination = Join-Path (Join-Path $backup $name) $relative - New-Item -ItemType Directory -Path (Split-Path -Parent $destination) -Force | Out-Null - Move-Item -LiteralPath $_.FullName -Destination $destination - } - } - } - - name: Sign app binaries - uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 - with: - cache-dependencies: false - endpoint: ${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }} - signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} - certificate-profile-name: ${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} - files-folder: ${{ runner.temp }}\app - files-folder-filter: exe,node - files-folder-recurse: true - exclude-environment-credential: true - exclude-workload-identity-credential: true - exclude-managed-identity-credential: true - exclude-shared-token-cache-credential: true - exclude-visual-studio-credential: true - exclude-visual-studio-code-credential: true - exclude-azure-cli-credential: false - exclude-azure-powershell-credential: true - exclude-azure-developer-cli-credential: true - exclude-interactive-browser-credential: true - - name: Sign portable binaries - uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 - with: - cache-dependencies: false - endpoint: ${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }} - signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} - certificate-profile-name: ${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} - files-folder: ${{ runner.temp }}\portable - files-folder-filter: exe,node - files-folder-recurse: true - exclude-environment-credential: true - exclude-workload-identity-credential: true - exclude-managed-identity-credential: true - exclude-shared-token-cache-credential: true - exclude-visual-studio-credential: true - exclude-visual-studio-code-credential: true - exclude-azure-cli-credential: false - exclude-azure-powershell-credential: true - exclude-azure-developer-cli-credential: true - exclude-interactive-browser-credential: true - - name: Restore valid third-party signatures - shell: pwsh - run: | - $backup = Join-Path $env:RUNNER_TEMP 'third-party-signed' - foreach ($name in @('app', 'portable')) { - $saved = Join-Path $backup $name - if (!(Test-Path -LiteralPath $saved -PathType Container)) { continue } - $root = Join-Path $env:RUNNER_TEMP $name - Get-ChildItem -LiteralPath $saved -File -Recurse | ForEach-Object { - $relative = [IO.Path]::GetRelativePath($saved, $_.FullName) - $destination = Join-Path $root $relative - New-Item -ItemType Directory -Path (Split-Path -Parent $destination) -Force | Out-Null - Move-Item -LiteralPath $_.FullName -Destination $destination - } - } - - name: Verify signed payloads and archive portable edition - shell: pwsh - run: | - foreach ($root in @((Join-Path $env:RUNNER_TEMP 'app'), (Join-Path $env:RUNNER_TEMP 'portable'))) { - $files = Get-ChildItem -LiteralPath $root -File -Recurse | - Where-Object { $_.Extension -in @('.exe', '.node') } - if (!$files) { throw "No signed Windows binaries found in $root" } - foreach ($file in $files) { - $signature = Get-AuthenticodeSignature -FilePath $file.FullName - $mustUseReleasePublisher = $file.Extension -eq '.node' -or $file.Name -in @('AccessCode.exe', 'opencode-cli.exe') - if ($signature.Status -ne 'Valid' -or - ($mustUseReleasePublisher -and $signature.SignerCertificate.Subject -ne $env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER)) { - throw "Invalid or unexpected Authenticode signature: $($file.FullName)" - } - } - } - Compress-Archive -Path (Join-Path $env:RUNNER_TEMP 'portable\*') ` - -DestinationPath (Join-Path $env:RUNNER_TEMP "accesscode-portable-$env:GITHUB_RUN_ID.zip") ` - -CompressionLevel Optimal - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: signed-app-${{ matrix.desktop }} - path: ${{ runner.temp }}/app - if-no-files-found: error - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: accesscode-portable-${{ matrix.desktop }} - path: ${{ runner.temp }}/accesscode-portable-${{ github.run_id }}.zip - if-no-files-found: error - - build-installer: - needs: sign-app - if: github.ref == 'refs/heads/main' - runs-on: windows-2025 - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - desktop: windows-x64 - install: "" - - desktop: windows-arm64 - install: --cpu=* - env: - OPENCODE_CHANNEL: latest - OPENCODE_VERSION: ${{ inputs.version }} - OPENCODE_TARGET: ${{ matrix.desktop }} - CSC_IDENTITY_AUTO_DISCOVERY: "false" - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ./.github/actions/setup-bun - with: - install-flags: ${{ matrix.install }} - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: signed-app-${{ matrix.desktop }} - path: ${{ runner.temp }}/app - - name: Locate Inno Setup - shell: pwsh - run: | - $candidates = @( - (Join-Path ${env:ProgramFiles(x86)} 'Inno Setup 6\ISCC.exe'), - (Join-Path ${env:ProgramFiles(x86)} 'Inno Setup 7\ISCC.exe') - ) - $compiler = $candidates | Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } | Select-Object -First 1 - if (!$compiler) { throw 'Inno Setup 6.7.4 or newer was not found on the Windows runner.' } - "ISCC=$compiler" >> $env:GITHUB_ENV - - name: Pack signed app into Inno Setup installer - run: bun run --cwd packages/desktop pack - env: - OPENCODE_DESKTOP_APP: ${{ runner.temp }}/app - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: build-installer-${{ matrix.desktop }} - path: dist/desktop/*.exe - if-no-files-found: error - - sign-installer: - needs: build-installer - if: github.ref == 'refs/heads/main' - runs-on: windows-2025 - timeout-minutes: 30 - environment: accesscode-release - permissions: - contents: read - id-token: write - strategy: - fail-fast: false - matrix: - desktop: [windows-x64, windows-arm64] - env: - ACCESSCODE_WINDOWS_UPDATE_PUBLISHER: ${{ vars.ACCESSCODE_WINDOWS_UPDATE_PUBLISHER }} - steps: - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: build-installer-${{ matrix.desktop }} - path: ${{ runner.temp }}/installer - - name: Log in to Azure - uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 - with: - client-id: ${{ vars.AZURE_CLIENT_ID }} - tenant-id: ${{ vars.AZURE_TENANT_ID }} - subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} - - name: Sign installer - uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 - with: - cache-dependencies: false - endpoint: ${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }} - signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} - certificate-profile-name: ${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} - files-folder: ${{ runner.temp }}\installer - files-folder-filter: exe - files-folder-recurse: true - exclude-environment-credential: true - exclude-workload-identity-credential: true - exclude-managed-identity-credential: true - exclude-shared-token-cache-credential: true - exclude-visual-studio-credential: true - exclude-visual-studio-code-credential: true - exclude-azure-cli-credential: false - exclude-azure-powershell-credential: true - exclude-azure-developer-cli-credential: true - exclude-interactive-browser-credential: true - - name: Verify signed installer - shell: pwsh - run: | - $files = Get-ChildItem -LiteralPath (Join-Path $env:RUNNER_TEMP 'installer') -Filter '*.exe' -File -Recurse - if (!$files) { throw 'No Inno Setup installer was produced.' } - foreach ($file in $files) { - $signature = Get-AuthenticodeSignature -FilePath $file.FullName - if ($signature.Status -ne 'Valid' -or $signature.SignerCertificate.Subject -ne $env:ACCESSCODE_WINDOWS_UPDATE_PUBLISHER) { - throw "Invalid or unexpected Authenticode signature: $($file.FullName)" - } - } - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: accesscode-installer-${{ matrix.desktop }} - path: ${{ runner.temp }}/installer/*.exe - if-no-files-found: error diff --git a/packages/app/src/custom-elements.d.ts b/packages/app/src/custom-elements.d.ts deleted file mode 120000 index 86cb284693e6..000000000000 --- a/packages/app/src/custom-elements.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/app/src/custom-elements.d.ts b/packages/app/src/custom-elements.d.ts new file mode 100644 index 000000000000..86cb284693e6 --- /dev/null +++ b/packages/app/src/custom-elements.d.ts @@ -0,0 +1 @@ +/// diff --git a/packages/desktop/README.md b/packages/desktop/README.md index bbb674df1725..753889892cc8 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -14,7 +14,7 @@ bun dev `bun run build` prepares `resources/` (icons, metainfo and the bundled CLI) and builds the app into `out/`. `bun run pack` then packages it, unsigned, into `dist/desktop/` at the repository root: a `.app` tarball on macOS, -the unpacked app on Windows, and AppImage/deb/rpm on Linux. The release workflow signs and notarizes afterwards. +the unpacked app on Windows, and AppImage/deb/rpm on Linux. Mac release builds are signed and notarized in CI. Windows releases are signed manually. ```bash bun run build && bun run pack @@ -75,13 +75,16 @@ removed after packaging. This procedure does not sign or publish the installer. The [Windows CI workflow](../../.github/workflows/accesscode-windows.yml) builds unsigned Dev installers and portable editions for x64 and ARM64. These are for testing, not public release. -For a stable public-release candidate, merge the stable version to `main`, then run the -[Windows release-candidate workflow](../../.github/workflows/accesscode-windows-release.yml) from `main` with that -version. The workflow signs the app payload before compiling each Inno Setup installer, preserves valid third-party -signatures, signs each installer, and uploads signed x64/ARM64 installer and portable artifacts. It does not publish -a GitHub release or update feed. -Configure its Azure OpenID connection and `ACCESSCODE_WINDOWS_UPDATE_PUBLISHER` variable as described below before -running it. +For a stable Windows release, run the [unsigned payload build](../../.github/workflows/accesscode-windows-payloads.yml) +from `main`. Enter the stable version from `package.json` and the exact Authenticode publisher subject agreed with +the maintainer. The workflow builds x64 and ARM64 and uploads an unpacked app and a portable folder for each. + +On the signing machine, check out the same commit and download the four unsigned stable payloads. For each +architecture, manually sign the release-owned binaries in both folders and verify their signatures and publisher. +Preserve and verify the expected third-party signatures. Archive the signed portable folder with its marker intact. +Set `OPENCODE_CHANNEL=latest`, the matching `OPENCODE_VERSION` and `OPENCODE_TARGET`, and point `OPENCODE_DESKTOP_APP` +at the signed unpacked app. Run the Inno packaging command above, then sign and verify the resulting installer. +Stage each installer outside `dist/desktop` before packing the next architecture, since packing clears that directory. To publish automatic updates, run `.github\release\write-accesscode-windows-feed.ps1` with the signed installer directory, stable version and signing subject. Publish both signed installers and the generated `latest.yml` @@ -95,22 +98,6 @@ The Windows machine used for Quill can reuse its Azure Artifact Signing produces an embedded Authenticode signature, not a detached provenance signature. Azure holds the private key; no local PFX is needed. -For the GitHub release-candidate workflow, configure these variables in the -`accesscode-release` GitHub Actions environment: - -- `AZURE_CLIENT_ID`, `AZURE_TENANT_ID` and `AZURE_SUBSCRIPTION_ID` for a service - principal with a federated credential whose subject is - `repo:Community-Access/access-code:environment:accesscode-release`. -- `AZURE_TRUSTED_SIGNING_ENDPOINT`, `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME` and - `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE` for the approved signing profile. -- Set the non-secret `ACCESSCODE_WINDOWS_UPDATE_PUBLISHER` repository variable - to the exact Authenticode subject from that profile. - -Grant the federated identity the **Artifact Signing Certificate Profile Signer** -role on the certificate profile. The workflow uses the protected -`accesscode-release` environment for signing approvals. Never commit Azure -credentials, certificates or private keys. - 1. Use a Windows SDK with `signtool.exe`, the approved Azure signing account and certificate profile, and an Azure identity with the **Artifact Signing Certificate Profile Signer** role. Keep account configuration and credentials From 0e54006e9a3ab482dc64990437aca6deedcc3526 Mon Sep 17 00:00:00 2001 From: Taylor Arndt <185963211+taylorarndt@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:44:00 -0600 Subject: [PATCH 3/7] fix(ci): run Access Code PR tests on hosted Ubuntu --- .github/workflows/check-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-test.yml b/.github/workflows/check-test.yml index 8b2751cb2eec..3a45b0fd9aaf 100644 --- a/.github/workflows/check-test.yml +++ b/.github/workflows/check-test.yml @@ -85,7 +85,8 @@ jobs: matrix: # Pull requests run Linux only; Windows runs the same tests on pushes, nightly runs and the release gate. settings: ${{ fromJSON(github.event_name == 'pull_request' && '[{"name":"linux","host":"blacksmith-4vcpu-ubuntu-2404"}]' || '[{"name":"linux","host":"blacksmith-4vcpu-ubuntu-2404"},{"name":"windows","host":"blacksmith-4vcpu-windows-2025"}]') }} - runs-on: ${{ matrix.settings.host }} + # Access Code uses GitHub-hosted Linux runners for its pull requests. + runs-on: ${{ github.repository == 'Community-Access/access-code' && github.event_name == 'pull_request' && 'ubuntu-24.04' || matrix.settings.host }} defaults: run: shell: bash From c3463ca44ea621e210a7e89dc974bf25fa44a8fc Mon Sep 17 00:00:00 2001 From: Taylor Arndt <185963211+taylorarndt@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:49:14 -0600 Subject: [PATCH 4/7] test(client): cover Access Code config aliases --- packages/client/test/promise.test.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/client/test/promise.test.ts b/packages/client/test/promise.test.ts index dfc549920438..3f9384ab5bf7 100644 --- a/packages/client/test/promise.test.ts +++ b/packages/client/test/promise.test.ts @@ -48,7 +48,20 @@ test("exposes every standard HTTP API group", () => { expect(Object.keys(client.websearch)).toEqual(["providers", "query"]) expect(Object.keys(client.file)).toEqual(["read", "list", "find", "write", "watch", "unwatch"]) expect(Object.keys(client.mcp)).toEqual(["list", "resource", "add", "remove", "connect", "disconnect", "client"]) - expect(Object.keys(client.config)).toEqual(["get", "shells", "update"]) + expect(Object.keys(client.config)).toEqual([ + "get", + "shells", + "update", + "mcpRegistry", + "mcpPopular", + "mcpDocker", + "skillSearch", + "skillInstall", + "skillRemove", + "extensionPaths", + "mcpSignIn", + "tools", + ]) expect(Object.keys(client.vcs)).toEqual(["init", "get", "base", "status", "branch", "diff"]) expect(Object.keys(client.pty)).toEqual(["list", "create", "get", "update", "remove", "connect"]) expect(Object.keys(client.pty.connect)).toEqual(["token"]) @@ -143,6 +156,15 @@ test("nests a method under client.experimental exactly when its route is experim ).toEqual([]) // Pre-experimental paths kept as deprecated aliases until the next minor. expect(deprecated.toSorted()).toEqual([ + "config.extensionPaths", + "config.mcpDocker", + "config.mcpPopular", + "config.mcpRegistry", + "config.mcpSignIn", + "config.skillInstall", + "config.skillRemove", + "config.skillSearch", + "config.tools", "config.update", "file.unwatch", "file.watch", From 3535e2147bf96486f78f91b37425abe10afa4262 Mon Sep 17 00:00:00 2001 From: Taylor Arndt <185963211+taylorarndt@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:49:55 -0600 Subject: [PATCH 5/7] fix(protocol): preserve shipped config aliases in codegen --- packages/protocol/openapi.json | 880 +++++++++++++++++++++++++++++++- packages/protocol/src/client.ts | 9 + 2 files changed, 888 insertions(+), 1 deletion(-) diff --git a/packages/protocol/openapi.json b/packages/protocol/openapi.json index 1e241a9bfa20..4203b0172fc3 100644 --- a/packages/protocol/openapi.json +++ b/packages/protocol/openapi.json @@ -16090,6 +16090,536 @@ "required": true } } + }, + "/api/experimental/config/mcp-registry": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.mcpRegistry", + "parameters": [ + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "McpRegistry.SearchResult", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/McpRegistry.SearchResultEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Search the public MCP Registry for servers to add.", + "summary": "Search the MCP Registry" + } + }, + "/api/experimental/config/mcp-popular": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.mcpPopular", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "McpRegistry.SearchResult", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/McpRegistry.SearchResultEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Popular servers from the public MCP Registry, followed by the MCP project's reference servers.", + "summary": "List popular MCP servers" + } + }, + "/api/experimental/config/mcp-docker": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.mcpDocker", + "parameters": [ + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "McpRegistry.SearchResult", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/McpRegistry.SearchResultEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Servers from the Docker MCP Catalog, most pulled first, filtered by the search text.", + "summary": "Search the Docker MCP Catalog" + } + }, + "/api/experimental/config/skills": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.skillSearch", + "parameters": [ + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "ExtensionCatalog.SkillSearchResult", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.SkillSearchResultEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Search the skills.sh directory; without a search, list popular skills.", + "summary": "Search skills.sh" + }, + "post": { + "tags": ["config"], + "operationId": "experimental.config.skillInstall", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "ExtensionCatalog.CommandResult", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.CommandResultEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Install one skill from a GitHub repository into the global OpenCode skills folder with the skills CLI.", + "summary": "Install a skill", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.SkillInstallInput" + } + } + }, + "required": true + } + } + }, + "/api/experimental/config/skills/remove": { + "post": { + "tags": ["config"], + "operationId": "experimental.config.skillRemove", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "ExtensionCatalog.CommandResult", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.CommandResultEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Remove one skill from the global OpenCode skills folder with the skills CLI.", + "summary": "Remove a skill", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.SkillRemoveInput" + } + } + }, + "required": true + } + } + }, + "/api/experimental/config/extension-paths": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.extensionPaths", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "ExtensionCatalog.Paths", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.PathsEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. The global config folder that config updates edit, and the global OpenCode skills folder.", + "summary": "Get extension folders" + } + }, + "/api/experimental/config/mcp-sign-in": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.mcpSignIn", + "parameters": [ + { + "name": "url", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + } + ], + "security": [], + "responses": { + "200": { + "description": "ExtensionCatalog.SignIn", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.SignInEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Whether a remote MCP server at an https URL supports browser sign-in that OpenCode can complete.", + "summary": "Check remote MCP sign-in" + } + }, + "/api/experimental/config/tools": { + "get": { + "tags": ["config"], + "operationId": "experimental.config.tools", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "ExtensionCatalog.Tools", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionCatalog.ToolsEncoded" + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "404": { + "description": "LocationNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" + } + } + } + } + }, + "description": "Experimental: may change without compatibility guarantees. Whether Node.js (npx), uv (uvx) and Docker are installed, which local MCP servers and skills need.", + "summary": "List extension tools" + } } }, "components": { @@ -17772,9 +18302,55 @@ "type": "null" } ] + }, + "mcp": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.LocalConfigEncoded" + }, + { + "$ref": "#/components/schemas/Mcp.RemoteConfigEncoded" + }, + { + "type": "null" + } + ] + } + }, + "plugins": { + "type": "object", + "properties": { + "add": { + "type": "array", + "items": { + "type": "string" + } + }, + "remove": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "keychain": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } } }, - "required": ["shell"], "additionalProperties": false }, "Config.Plugin.EntryEncoded": { @@ -18254,6 +18830,127 @@ "additionalProperties": false, "description": "Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq." }, + "ExtensionCatalog.CommandResultEncoded": { + "type": "object", + "properties": { + "ok": { + "type": "boolean" + }, + "output": { + "type": "string" + } + }, + "required": ["ok", "output"], + "additionalProperties": false + }, + "ExtensionCatalog.PathsEncoded": { + "type": "object", + "properties": { + "config": { + "type": "string" + }, + "skills": { + "type": "string" + } + }, + "required": ["config", "skills"], + "additionalProperties": false + }, + "ExtensionCatalog.SignInEncoded": { + "type": "object", + "properties": { + "supported": { + "type": "boolean" + } + }, + "required": ["supported"], + "additionalProperties": false + }, + "ExtensionCatalog.SkillEncoded": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "type": "string" + }, + "skillId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "installs": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["id", "source", "skillId", "name", "installs"], + "additionalProperties": false + }, + "ExtensionCatalog.SkillInstallInput": { + "type": "object", + "properties": { + "source": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}\\/[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$" + }, + "skill": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,99}$" + } + }, + "required": ["source", "skill"], + "additionalProperties": false + }, + "ExtensionCatalog.SkillRemoveInput": { + "type": "object", + "properties": { + "skill": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$" + } + }, + "required": ["skill"], + "additionalProperties": false + }, + "ExtensionCatalog.SkillSearchResultEncoded": { + "type": "object", + "properties": { + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionCatalog.SkillEncoded" + } + } + }, + "required": ["skills"], + "additionalProperties": false + }, + "ExtensionCatalog.ToolsEncoded": { + "type": "object", + "properties": { + "node": { + "type": "boolean" + }, + "uv": { + "type": "boolean" + }, + "docker": { + "type": "boolean" + } + }, + "required": ["node", "uv", "docker"], + "additionalProperties": false + }, "FileDiff.Info": { "type": "object", "properties": { @@ -21354,6 +22051,187 @@ "required": ["status"], "additionalProperties": false }, + "McpRegistry.ArgumentEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "default": { + "type": "string" + }, + "valueHint": { + "type": "string" + }, + "description": { + "type": "string" + }, + "isRequired": { + "type": "boolean" + }, + "isSecret": { + "type": "boolean" + } + }, + "required": ["type"], + "additionalProperties": false + }, + "McpRegistry.InputEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "isRequired": { + "type": "boolean" + }, + "isSecret": { + "type": "boolean" + }, + "default": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "McpRegistry.PackageEncoded": { + "type": "object", + "properties": { + "registryType": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "version": { + "type": "string" + }, + "runtimeHint": { + "type": "string" + }, + "transport": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"], + "additionalProperties": false + }, + "environmentVariables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/McpRegistry.InputEncoded" + } + }, + "packageArguments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/McpRegistry.ArgumentEncoded" + } + } + }, + "required": ["registryType", "identifier"], + "additionalProperties": false + }, + "McpRegistry.RemoteEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/McpRegistry.InputEncoded" + } + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "McpRegistry.SearchResultEncoded": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/McpRegistry.ServerEncoded" + } + }, + "nextCursor": { + "type": "string" + }, + "categories": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["servers"], + "additionalProperties": false + }, + "McpRegistry.ServerEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "version": { + "type": "string" + }, + "websiteUrl": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "packages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/McpRegistry.PackageEncoded" + } + }, + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/McpRegistry.RemoteEncoded" + } + } + }, + "required": ["name"], + "additionalProperties": false + }, "McpServerNotFoundErrorEncoded": { "type": "object", "properties": { diff --git a/packages/protocol/src/client.ts b/packages/protocol/src/client.ts index 51b8f4a98713..fcda68188938 100644 --- a/packages/protocol/src/client.ts +++ b/packages/protocol/src/client.ts @@ -77,6 +77,15 @@ export const clientNamespace = (endpoint: { readonly path: string }) => // The client paths that shipped before experimental methods moved under `client.experimental`. Each keeps a // deprecated alias until the next minor. Frozen: endpoints added since never had another path. export const deprecatedClientPaths = new Set([ + "config.extensionPaths", + "config.mcpDocker", + "config.mcpPopular", + "config.mcpRegistry", + "config.mcpSignIn", + "config.skillInstall", + "config.skillRemove", + "config.skillSearch", + "config.tools", "config.update", "file.unwatch", "file.watch", From 481670f9813b64b6c23b7871dc7f05f0030af448 Mon Sep 17 00:00:00 2001 From: Taylor Arndt <185963211+taylorarndt@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:50:50 -0600 Subject: [PATCH 6/7] fix(ci): build Access Code API docs on hosted Ubuntu --- .github/workflows/check-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index a065382882da..ac0418344dc9 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -24,7 +24,7 @@ jobs: docs: name: docs build if: ${{ !github.event.pull_request.draft }} - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ${{ github.repository == 'Community-Access/access-code' && 'ubuntu-24.04' || 'blacksmith-4vcpu-ubuntu-2404' }} timeout-minutes: 10 defaults: run: From 9151b5baa72e2d0950d51fb2de4374e7839ecfb8 Mon Sep 17 00:00:00 2001 From: Taylor Arndt <185963211+taylorarndt@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:58:07 -0600 Subject: [PATCH 7/7] fix(ci): install ripgrep before offline search tests --- .github/workflows/check-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/check-test.yml b/.github/workflows/check-test.yml index 3a45b0fd9aaf..fffd727e4343 100644 --- a/.github/workflows/check-test.yml +++ b/.github/workflows/check-test.yml @@ -119,6 +119,10 @@ jobs: git config --global user.email "bot@opencode.ai" git config --global user.name "opencode" + - name: Install ripgrep for offline search tests + if: runner.os == 'Linux' && github.repository == 'Community-Access/access-code' && github.event_name == 'pull_request' + run: sudo apt-get update -qq && sudo apt-get install -y ripgrep + - name: Run unit tests timeout-minutes: 20 run: |