Skip to content

Commit 92a474c

Browse files
Merge pull request #92 from ScriptedAlchemy/syncupstream
Refactor native SDK tool wiring and tighten CI JSON reporting
2 parents 39eca7a + 133696b commit 92a474c

397 files changed

Lines changed: 24939 additions & 31201 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/codex/home/config.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
model = "gpt-5"
1+
model = "gpt-5.1"
22

33
# Consider setting [mcp_servers] here!

‎.github/workflows/cla.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ jobs:
4646
path-to-document: https://github.com/openai/codex/blob/main/docs/CLA.md
4747
path-to-signatures: signatures/cla.json
4848
branch: cla-signatures
49-
allowlist: dependabot[bot]
49+
allowlist: |
50+
codex
51+
dependabot[bot]

‎.github/workflows/close-stale-contributor-prs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Close inactive PRs from contributors
18-
uses: actions/github-script@v7
18+
uses: actions/github-script@v8
1919
with:
2020
github-token: ${{ secrets.GITHUB_TOKEN }}
2121
script: |

‎.github/workflows/issue-deduplicator.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
with:
5151
openai-api-key: ${{ secrets.CODEX_OPENAI_API_KEY }}
5252
allow-users: "*"
53-
model: gpt-5
5453
prompt: |
5554
You are an assistant that triages new GitHub issues by identifying potential duplicates.
5655

‎.github/workflows/rust-ci.yml‎

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ jobs:
9797
env:
9898
# Speed up repeated builds across CI runs by caching compiled objects (non-Windows).
9999
USE_SCCACHE: ${{ startsWith(matrix.runner, 'windows') && 'false' || 'true' }}
100-
RUSTC_WRAPPER: sccache
101100
CARGO_INCREMENTAL: "0"
102101
SCCACHE_CACHE_SIZE: 10G
103102

@@ -149,36 +148,33 @@ jobs:
149148

150149
steps:
151150
- uses: actions/checkout@v5
152-
- name: Disable sccache on Windows
153-
if: ${{ env.USE_SCCACHE == 'false' }}
154-
shell: pwsh
155-
run: "echo 'RUSTC_WRAPPER=' >> $env:GITHUB_ENV"
156151
- uses: dtolnay/rust-toolchain@1.90
157152
with:
158153
targets: ${{ matrix.target }}
159154
components: clippy
160-
161-
# Explicitly ensure the stdlib for the requested target is installed.
162-
# Newer rustup releases on macOS ended up syncing the default channel
163-
# without pulling the cross target, which then caused `can't find crate
164-
# for core` failures. Running `rustup target add` here is idempotent and
165-
# fixes both macOS cross builds and the linux-musl runners.
166-
- name: rustup target add
155+
- name: Ensure rust target std installed
167156
run: rustup target add ${{ matrix.target }}
168157

158+
- name: Free disk space (Linux runners)
159+
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
160+
shell: bash
161+
run: |
162+
set -euxo pipefail
163+
sudo rm -rf /usr/local/lib/android /opt/ghc /usr/share/dotnet /opt/hostedtoolcache/CodeQL || true
164+
df -h
165+
169166
# Explicit cache restore: split cargo home vs target, so we can
170167
# avoid caching the large target dir on the gnu-dev job.
171168
- name: Restore cargo home cache
172169
id: cache_cargo_home_restore
173170
uses: actions/cache/restore@v4
174-
continue-on-error: true
175171
with:
176172
path: |
177173
~/.cargo/bin/
178174
~/.cargo/registry/index/
179175
~/.cargo/registry/cache/
180176
~/.cargo/git/db/
181-
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
177+
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
182178
restore-keys: |
183179
cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
184180
@@ -204,14 +200,18 @@ jobs:
204200
echo "Using sccache local disk + actions/cache fallback"
205201
fi
206202
203+
- name: Enable sccache wrapper
204+
if: ${{ env.USE_SCCACHE == 'true' }}
205+
shell: bash
206+
run: echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
207+
207208
- name: Restore sccache cache (fallback)
208209
if: ${{ env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true' }}
209210
id: cache_sccache_restore
210211
uses: actions/cache/restore@v4
211-
continue-on-error: true
212212
with:
213213
path: ${{ github.workspace }}/.sccache/
214-
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ github.run_id }}
214+
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
215215
restore-keys: |
216216
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-
217217
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
@@ -288,15 +288,15 @@ jobs:
288288
~/.cargo/registry/index/
289289
~/.cargo/registry/cache/
290290
~/.cargo/git/db/
291-
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
291+
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
292292

293293
- name: Save sccache cache (fallback)
294294
if: always() && !cancelled() && env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true'
295295
continue-on-error: true
296296
uses: actions/cache/save@v4
297297
with:
298298
path: ${{ github.workspace }}/.sccache/
299-
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ github.run_id }}
299+
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
300300

301301
- name: sccache stats
302302
if: always() && env.USE_SCCACHE == 'true'
@@ -345,7 +345,6 @@ jobs:
345345
env:
346346
# Speed up repeated builds across CI runs by caching compiled objects (non-Windows).
347347
USE_SCCACHE: ${{ startsWith(matrix.runner, 'windows') && 'false' || 'true' }}
348-
RUSTC_WRAPPER: sccache
349348
CARGO_INCREMENTAL: "0"
350349
SCCACHE_CACHE_SIZE: 10G
351350

@@ -371,25 +370,30 @@ jobs:
371370

372371
steps:
373372
- uses: actions/checkout@v5
374-
- name: Disable sccache on Windows
375-
if: ${{ env.USE_SCCACHE == 'false' }}
376-
shell: pwsh
377-
run: "echo 'RUSTC_WRAPPER=' >> $env:GITHUB_ENV"
378373
- uses: dtolnay/rust-toolchain@1.90
379374
with:
380375
targets: ${{ matrix.target }}
376+
- name: Ensure rust target std installed
377+
run: rustup target add ${{ matrix.target }}
378+
379+
- name: Free disk space (Linux runners)
380+
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
381+
shell: bash
382+
run: |
383+
set -euxo pipefail
384+
sudo rm -rf /usr/local/lib/android /opt/ghc /usr/share/dotnet /opt/hostedtoolcache/CodeQL || true
385+
df -h
381386
382387
- name: Restore cargo home cache
383388
id: cache_cargo_home_restore
384389
uses: actions/cache/restore@v4
385-
continue-on-error: true
386390
with:
387391
path: |
388392
~/.cargo/bin/
389393
~/.cargo/registry/index/
390394
~/.cargo/registry/cache/
391395
~/.cargo/git/db/
392-
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
396+
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
393397
restore-keys: |
394398
cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
395399
@@ -414,16 +418,20 @@ jobs:
414418
echo "Using sccache local disk + actions/cache fallback"
415419
fi
416420
421+
- name: Enable sccache wrapper
422+
if: ${{ env.USE_SCCACHE == 'true' }}
423+
shell: bash
424+
run: echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
425+
417426
- name: Restore sccache cache (fallback)
418427
if: ${{ env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true' }}
419428
id: cache_sccache_restore
420429
uses: actions/cache/restore@v4
421-
continue-on-error: true
422430
with:
423431
path: ${{ github.workspace }}/.sccache/
424-
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ github.run_id }}
432+
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
425433
restore-keys: |
426-
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-
434+
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-
427435
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
428436
429437
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
@@ -448,15 +456,15 @@ jobs:
448456
~/.cargo/registry/index/
449457
~/.cargo/registry/cache/
450458
~/.cargo/git/db/
451-
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
459+
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }}
452460

453461
- name: Save sccache cache (fallback)
454462
if: always() && !cancelled() && env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true'
455463
continue-on-error: true
456464
uses: actions/cache/save@v4
457465
with:
458466
path: ${{ github.workspace }}/.sccache/
459-
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('codex-rs/Cargo.lock') }}-${{ github.run_id }}
467+
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
460468

461469
- name: sccache stats
462470
if: always() && env.USE_SCCACHE == 'true'

‎.github/workflows/rust-release.yml‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,19 @@ jobs:
371371
path: |
372372
codex-rs/dist/${{ matrix.target }}/*
373373
374+
shell-tool-mcp:
375+
name: shell-tool-mcp
376+
needs: tag-check
377+
uses: ./.github/workflows/shell-tool-mcp.yml
378+
with:
379+
release-tag: ${{ github.ref_name }}
380+
publish: true
381+
secrets: inherit
382+
374383
release:
375-
needs: build
384+
needs:
385+
- build
386+
- shell-tool-mcp
376387
name: release
377388
runs-on: ubuntu-latest
378389
permissions:
@@ -395,6 +406,14 @@ jobs:
395406
- name: List
396407
run: ls -R dist/
397408

409+
# This is a temporary fix: we should modify shell-tool-mcp.yml so these
410+
# files do not end up in dist/ in the first place.
411+
- name: Delete entries from dist/ that should not go in the release
412+
run: |
413+
rm -rf dist/shell-tool-mcp*
414+
415+
ls -R dist/
416+
398417
- name: Define release name
399418
id: release_name
400419
run: |

‎.github/workflows/sdk.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,13 @@ jobs:
218218
cargo-target-${{ runner.os }}-${{ hashFiles('codex-rs/Cargo.lock') }}-
219219
cargo-target-${{ runner.os }}-
220220
221-
- name: build codex
222-
run: cargo build --bin codex
223-
working-directory: codex-rs
224-
225221
- name: Install native SDK dependencies
226222
working-directory: sdk/native
227223
run: pnpm install --frozen-lockfile
228224

229225
- name: Build native SDK
230226
working-directory: sdk/native
231-
run: pnpm run build
227+
run: pnpm run build:ci
232228

233229
- name: Test native SDK
234230
working-directory: sdk/native
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: shell-tool-mcp CI
2+
3+
on:
4+
push:
5+
paths:
6+
- "shell-tool-mcp/**"
7+
- ".github/workflows/shell-tool-mcp-ci.yml"
8+
- "pnpm-lock.yaml"
9+
- "pnpm-workspace.yaml"
10+
pull_request:
11+
paths:
12+
- "shell-tool-mcp/**"
13+
- ".github/workflows/shell-tool-mcp-ci.yml"
14+
- "pnpm-lock.yaml"
15+
- "pnpm-workspace.yaml"
16+
17+
env:
18+
NODE_VERSION: 22
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v5
26+
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
run_install: false
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v5
34+
with:
35+
node-version: ${{ env.NODE_VERSION }}
36+
cache: "pnpm"
37+
38+
- name: Install dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Format check
42+
run: pnpm --filter @openai/codex-shell-tool-mcp run format
43+
44+
- name: Run tests
45+
run: pnpm --filter @openai/codex-shell-tool-mcp test
46+
47+
- name: Build
48+
run: pnpm --filter @openai/codex-shell-tool-mcp run build

0 commit comments

Comments
 (0)