diff --git a/.github/workflows/release-browseros.yml b/.github/workflows/release-browseros.yml new file mode 100644 index 0000000000..147c3525fc --- /dev/null +++ b/.github/workflows/release-browseros.yml @@ -0,0 +1,184 @@ +# Release workflow for BrowserOS Codex binaries. +# Builds all distributions without signing. +# To release, run: +# ``` +# git tag -a browseros-v0.1.0 -m "Release 0.1.0" +# git push origin browseros-v0.1.0 +# ``` + +name: release-browseros + +on: + push: + tags: + - "browseros-v*.*.*" + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + tag-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Validate tag matches Cargo.toml version + shell: bash + run: | + set -euo pipefail + echo "::group::Tag validation" + + # 1. Must be a tag and match the regex + [[ "${GITHUB_REF_TYPE}" == "tag" ]] \ + || { echo "❌ Not a tag push"; exit 1; } + [[ "${GITHUB_REF_NAME}" =~ ^browseros-v[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta)(\.[0-9]+)?)?$ ]] \ + || { echo "❌ Tag '${GITHUB_REF_NAME}' doesn't match expected format"; exit 1; } + + # 2. Extract versions + tag_ver="${GITHUB_REF_NAME#browseros-v}" + cargo_ver="$(grep -m1 '^version' codex-rs/Cargo.toml \ + | sed -E 's/version *= *"([^"]+)".*/\1/')" + + # 3. Compare + [[ "${tag_ver}" == "${cargo_ver}" ]] \ + || { echo "❌ Tag ${tag_ver} ≠ Cargo.toml ${cargo_ver}"; exit 1; } + + echo "✅ Tag and Cargo.toml agree (${tag_ver})" + echo "::endgroup::" + + build: + needs: tag-check + name: Build - ${{ matrix.runner }} - ${{ matrix.target }} + runs-on: ${{ matrix.runner }} + timeout-minutes: 30 + defaults: + run: + working-directory: codex-rs + + strategy: + fail-fast: false + matrix: + include: + - runner: macos-15-xlarge + target: aarch64-apple-darwin + - runner: macos-15-xlarge + target: x86_64-apple-darwin + - runner: ubuntu-24.04 + target: x86_64-unknown-linux-musl + - runner: ubuntu-24.04 + target: x86_64-unknown-linux-gnu + - runner: ubuntu-24.04-arm + target: aarch64-unknown-linux-musl + - runner: ubuntu-24.04-arm + target: aarch64-unknown-linux-gnu + - runner: windows-latest + target: x86_64-pc-windows-msvc + - runner: windows-11-arm + target: aarch64-pc-windows-msvc + + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@1.90 + with: + targets: ${{ matrix.target }} + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ${{ github.workspace }}/codex-rs/target/ + key: cargo-${{ matrix.runner }}-${{ matrix.target }}-release-${{ hashFiles('**/Cargo.lock') }} + + - if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}} + name: Install musl build tools + run: | + sudo apt-get update + sudo apt-get install -y musl-tools pkg-config + + - name: Cargo build + run: cargo build --target ${{ matrix.target }} --release --bin codex + + - name: Stage artifacts + shell: bash + run: | + dest="dist/${{ matrix.target }}" + mkdir -p "$dest" + + if [[ "${{ matrix.runner }}" == windows* ]]; then + cp target/${{ matrix.target }}/release/codex.exe "$dest/codex-${{ matrix.target }}.exe" + else + cp target/${{ matrix.target }}/release/codex "$dest/codex-${{ matrix.target }}" + fi + + - if: ${{ matrix.runner == 'windows-11-arm' }} + name: Install zstd + shell: powershell + run: choco install -y zstandard + + - name: Compress artifacts + shell: bash + run: | + dest="dist/${{ matrix.target }}" + + # Create .tar.gz for all platforms and .zip for Windows + for f in "$dest"/*; do + base="$(basename "$f")" + # Skip files that are already archives + if [[ "$base" == *.tar.gz || "$base" == *.zip ]]; then + continue + fi + + # Create per-binary tar.gz + tar -C "$dest" -czf "$dest/${base}.tar.gz" "$base" + + # Create zip archive for Windows binaries + if [[ "${{ matrix.runner }}" == windows* ]]; then + (cd "$dest" && 7z a "${base}.zip" "$base") + fi + + # Create .zst and remove the original binary + zstd -T0 -19 --rm "$dest/$base" + done + + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }} + path: | + codex-rs/dist/${{ matrix.target }}/* + + release: + needs: build + name: Create Release + runs-on: ubuntu-latest + permissions: + contents: write + actions: read + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - uses: actions/download-artifact@v4 + with: + path: dist + + - name: List artifacts + run: ls -R dist/ + + - name: Define release name + id: release_name + run: | + version="${GITHUB_REF_NAME#browseros-v}" + echo "name=${version}" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + name: BrowserOS ${{ steps.release_name.outputs.name }} + tag_name: ${{ github.ref_name }} + files: dist/** + prerelease: ${{ contains(steps.release_name.outputs.name, '-') }} diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 1a274985e8..d407922349 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -178,7 +178,7 @@ checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "app_test_support" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -822,7 +822,7 @@ checksum = "e9b18233253483ce2f65329a24072ec414db782531bdbb7d0bbc4bd2ce6b7e21" [[package]] name = "codex-ansi-escape" -version = "0.0.0" +version = "0.49.0" dependencies = [ "ansi-to-tui", "ratatui", @@ -831,7 +831,7 @@ dependencies = [ [[package]] name = "codex-app-server" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "app_test_support", @@ -864,7 +864,7 @@ dependencies = [ [[package]] name = "codex-app-server-protocol" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "clap", @@ -881,7 +881,7 @@ dependencies = [ [[package]] name = "codex-apply-patch" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -896,7 +896,7 @@ dependencies = [ [[package]] name = "codex-arg0" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "codex-apply-patch", @@ -909,7 +909,7 @@ dependencies = [ [[package]] name = "codex-async-utils" -version = "0.0.0" +version = "0.49.0" dependencies = [ "async-trait", "pretty_assertions", @@ -933,7 +933,7 @@ dependencies = [ [[package]] name = "codex-backend-openapi-models" -version = "0.0.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -942,7 +942,7 @@ dependencies = [ [[package]] name = "codex-chatgpt" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "clap", @@ -957,7 +957,7 @@ dependencies = [ [[package]] name = "codex-cli" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -993,7 +993,7 @@ dependencies = [ [[package]] name = "codex-cloud-tasks" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "async-trait", @@ -1019,7 +1019,7 @@ dependencies = [ [[package]] name = "codex-cloud-tasks-client" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "async-trait", @@ -1034,7 +1034,7 @@ dependencies = [ [[package]] name = "codex-common" -version = "0.0.0" +version = "0.49.0" dependencies = [ "clap", "codex-app-server-protocol", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "codex-core" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "askama", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "codex-exec" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -1150,7 +1150,7 @@ dependencies = [ [[package]] name = "codex-execpolicy" -version = "0.0.0" +version = "0.49.0" dependencies = [ "allocative", "anyhow", @@ -1170,7 +1170,7 @@ dependencies = [ [[package]] name = "codex-feedback" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "codex-protocol", @@ -1181,7 +1181,7 @@ dependencies = [ [[package]] name = "codex-file-search" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "clap", @@ -1194,7 +1194,7 @@ dependencies = [ [[package]] name = "codex-git-apply" -version = "0.0.0" +version = "0.49.0" dependencies = [ "once_cell", "regex", @@ -1203,7 +1203,7 @@ dependencies = [ [[package]] name = "codex-git-tooling" -version = "0.0.0" +version = "0.49.0" dependencies = [ "assert_matches", "pretty_assertions", @@ -1214,7 +1214,7 @@ dependencies = [ [[package]] name = "codex-linux-sandbox" -version = "0.0.0" +version = "0.49.0" dependencies = [ "clap", "codex-core", @@ -1227,7 +1227,7 @@ dependencies = [ [[package]] name = "codex-login" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "base64", @@ -1251,7 +1251,7 @@ dependencies = [ [[package]] name = "codex-mcp-server" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -1278,7 +1278,7 @@ dependencies = [ [[package]] name = "codex-ollama" -version = "0.0.0" +version = "0.49.0" dependencies = [ "assert_matches", "async-stream", @@ -1294,7 +1294,7 @@ dependencies = [ [[package]] name = "codex-otel" -version = "0.0.0" +version = "0.49.0" dependencies = [ "chrono", "codex-app-server-protocol", @@ -1315,14 +1315,14 @@ dependencies = [ [[package]] name = "codex-process-hardening" -version = "0.0.0" +version = "0.49.0" dependencies = [ "libc", ] [[package]] name = "codex-protocol" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "base64", @@ -1345,7 +1345,7 @@ dependencies = [ [[package]] name = "codex-protocol-ts" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "clap", @@ -1355,7 +1355,7 @@ dependencies = [ [[package]] name = "codex-responses-api-proxy" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "clap", @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "codex-rmcp-client" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "axum", @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "codex-stdio-to-uds" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -1410,7 +1410,7 @@ dependencies = [ [[package]] name = "codex-tui" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "arboard", @@ -1473,7 +1473,7 @@ dependencies = [ [[package]] name = "codex-utils-json-to-toml" -version = "0.0.0" +version = "0.49.0" dependencies = [ "pretty_assertions", "serde_json", @@ -1482,7 +1482,7 @@ dependencies = [ [[package]] name = "codex-utils-pty" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "portable-pty", @@ -1491,7 +1491,7 @@ dependencies = [ [[package]] name = "codex-utils-readiness" -version = "0.0.0" +version = "0.49.0" dependencies = [ "assert_matches", "async-trait", @@ -1502,11 +1502,11 @@ dependencies = [ [[package]] name = "codex-utils-string" -version = "0.0.0" +version = "0.49.0" [[package]] name = "codex-utils-tokenizer" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "pretty_assertions", @@ -1629,7 +1629,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core_test_support" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", @@ -3607,7 +3607,7 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "mcp-types" -version = "0.0.0" +version = "0.49.0" dependencies = [ "schemars 0.8.22", "serde", @@ -3617,7 +3617,7 @@ dependencies = [ [[package]] name = "mcp_test_support" -version = "0.0.0" +version = "0.49.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/codex-rs/core/src/model_provider_info.rs b/codex-rs/core/src/model_provider_info.rs index 429a260653..9701c49a3d 100644 --- a/codex-rs/core/src/model_provider_info.rs +++ b/codex-rs/core/src/model_provider_info.rs @@ -284,7 +284,7 @@ pub fn built_in_model_providers() -> HashMap { env_key: None, env_key_instructions: None, experimental_bearer_token: None, - wire_api: WireApi::Responses, + wire_api: WireApi::Chat, query_params: None, http_headers: Some( [("version".to_string(), env!("CARGO_PKG_VERSION").to_string())]