mirror of
https://github.com/openai/codex.git
synced 2026-02-01 22:47:52 +00:00
164265bed1eb0d0ebf453196c39c79809d4f1b7a
314 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
164265bed1 |
Vendor ConPtySystem (#7656)
The repo we were depending on is very large and we need very small part of it. --------- Co-authored-by: Pavel <pavel@krymets.com> |
||
|
|
06704b1a0f |
fix: pre-main hardening logic must tolerate non-UTF-8 env vars (#7749)
We received a bug report that Codex CLI crashes when an env var contains a non-ASCII character, or more specifically, cannot be decoded as UTF-8: ```shell $ RUST_BACKTRACE=full RÖDBURK=1 codex thread '<unnamed>' panicked at library/std/src/env.rs:162:57: called `Result::unwrap()` on an `Err` value: "RÃ\xB6DBURK" stack backtrace: 0: 0x101905c18 - __mh_execute_header 1: 0x1012bd76c - __mh_execute_header 2: 0x1019050e4 - __mh_execute_header 3: 0x101905ad8 - __mh_execute_header 4: 0x101905874 - __mh_execute_header 5: 0x101904f38 - __mh_execute_header 6: 0x1019347bc - __mh_execute_header 7: 0x10193472c - __mh_execute_header 8: 0x101937884 - __mh_execute_header 9: 0x101b3bcd0 - __mh_execute_header 10: 0x101b3c0bc - __mh_execute_header 11: 0x101927a20 - __mh_execute_header 12: 0x1005c58d8 - __mh_execute_header thread '<unnamed>' panicked at library/core/src/panicking.rs:225:5: panic in a function that cannot unwind stack backtrace: 0: 0x101905c18 - __mh_execute_header 1: 0x1012bd76c - __mh_execute_header 2: 0x1019050e4 - __mh_execute_header 3: 0x101905ad8 - __mh_execute_header 4: 0x101905874 - __mh_execute_header 5: 0x101904f38 - __mh_execute_header 6: 0x101934794 - __mh_execute_header 7: 0x10193472c - __mh_execute_header 8: 0x101937884 - __mh_execute_header 9: 0x101b3c144 - __mh_execute_header 10: 0x101b3c1a0 - __mh_execute_header 11: 0x101b3c158 - __mh_execute_header 12: 0x1005c5ef8 - __mh_execute_header thread caused non-unwinding panic. aborting. ``` I discovered I could reproduce this on a release build, but not a dev build, so between that and the unhelpful stack trace, my mind went to the pre-`main()` logic we run in prod builds. Sure enough, we were operating on `std::env::vars()` instead of `std::env::vars_os()`, which is why the non-UTF-8 environment variable was causing an issue. This PR updates the logic to use `std::env::vars_os()` and adds a unit test. And to be extra sure, I also verified the fix works with a local release build: ``` $ cargo build --bin codex --release $ RÖDBURK=1 ./target/release/codex --version codex-cli 0.0.0 ``` |
||
|
|
5e888ab48e |
chore(deps): bump wildmatch from 2.5.0 to 2.6.1 in /codex-rs (#7716)
Bumps [wildmatch](https://github.com/becheran/wildmatch) from 2.5.0 to 2.6.1. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
9fa9e3e7bb |
chore(deps): bump insta from 1.43.2 to 1.44.3 in /codex-rs (#7715)
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.43.2 to 1.44.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/releases">insta's releases</a>.</em></p> <blockquote> <h2>1.44.3</h2> <h2>Release Notes</h2> <ul> <li>Fix a regression in 1.44.2 where merge conflict detection was too aggressive, incorrectly flagging snapshot content containing <code>======</code> or similar patterns as conflicts. <a href="https://redirect.github.com/mitsuhiko/insta/issues/832">#832</a></li> <li>Fix a regression in 1.42.2 where inline snapshot updates would corrupt the file when code preceded the macro (e.g., <code>let output = assert_snapshot!(...)</code>). <a href="https://redirect.github.com/mitsuhiko/insta/issues/833">#833</a></li> </ul> <h2>Install cargo-insta 1.44.3</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-installer.ps1 | iex" </code></pre> <h2>Download cargo-insta 1.44.3</h2> <table> <thead> <tr> <th>File</th> <th>Platform</th> <th>Checksum</th> </tr> </thead> <tbody> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-aarch64-apple-darwin.tar.xz">cargo-insta-aarch64-apple-darwin.tar.xz</a></td> <td>Apple Silicon macOS</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-aarch64-apple-darwin.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-apple-darwin.tar.xz">cargo-insta-x86_64-apple-darwin.tar.xz</a></td> <td>Intel macOS</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-apple-darwin.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-pc-windows-msvc.zip">cargo-insta-x86_64-pc-windows-msvc.zip</a></td> <td>x64 Windows</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-pc-windows-msvc.zip.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-unknown-linux-gnu.tar.xz">cargo-insta-x86_64-unknown-linux-gnu.tar.xz</a></td> <td>x64 Linux</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-unknown-linux-gnu.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-unknown-linux-musl.tar.xz">cargo-insta-x86_64-unknown-linux-musl.tar.xz</a></td> <td>x64 MUSL Linux</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.3/cargo-insta-x86_64-unknown-linux-musl.tar.xz.sha256">checksum</a></td> </tr> </tbody> </table> <h2>1.44.2</h2> <h2>Release Notes</h2> <ul> <li>Fix a rare backward compatibility issue where inline snapshots using an uncommon legacy format (single-line content stored in multiline raw strings) could fail to match after 1.44.0. <a href="https://redirect.github.com/mitsuhiko/insta/issues/830">#830</a></li> <li>Handle merge conflicts in snapshot files gracefully. When a snapshot file contains git merge conflict markers, insta now detects them and treats the snapshot as missing, allowing tests to continue and create a new pending snapshot for review. <a href="https://redirect.github.com/mitsuhiko/insta/issues/829">#829</a></li> <li>Skip nextest_doctest tests when cargo-nextest is not installed. <a href="https://redirect.github.com/mitsuhiko/insta/issues/826">#826</a></li> <li>Fix functional tests failing under nextest due to inherited <code>NEXTEST_RUN_ID</code> environment variable. <a href="https://redirect.github.com/mitsuhiko/insta/issues/824">#824</a></li> </ul> <h2>Install cargo-insta 1.44.2</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.44.2/cargo-insta-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.44.2/cargo-insta-installer.ps1 | iex" </tr></table> </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's changelog</a>.</em></p> <blockquote> <h2>1.44.3</h2> <ul> <li>Fix a regression in 1.44.2 where merge conflict detection was too aggressive, incorrectly flagging snapshot content containing <code>======</code> or similar patterns as conflicts. <a href="https://redirect.github.com/mitsuhiko/insta/issues/832">#832</a></li> <li>Fix a regression in 1.42.2 where inline snapshot updates would corrupt the file when code preceded the macro (e.g., <code>let output = assert_snapshot!(...)</code>). <a href="https://redirect.github.com/mitsuhiko/insta/issues/833">#833</a></li> </ul> <h2>1.44.2</h2> <ul> <li>Fix a rare backward compatibility issue where inline snapshots using an uncommon legacy format (single-line content stored in multiline raw strings) could fail to match after 1.44.0. <a href="https://redirect.github.com/mitsuhiko/insta/issues/830">#830</a></li> <li>Handle merge conflicts in snapshot files gracefully. When a snapshot file contains git merge conflict markers, insta now detects them and treats the snapshot as missing, allowing tests to continue and create a new pending snapshot for review. <a href="https://redirect.github.com/mitsuhiko/insta/issues/829">#829</a></li> <li>Skip nextest_doctest tests when cargo-nextest is not installed. <a href="https://redirect.github.com/mitsuhiko/insta/issues/826">#826</a></li> <li>Fix functional tests failing under nextest due to inherited <code>NEXTEST_RUN_ID</code> environment variable. <a href="https://redirect.github.com/mitsuhiko/insta/issues/824">#824</a></li> </ul> <h2>1.44.1</h2> <ul> <li>Add <code>--dnd</code> alias for <code>--disable-nextest-doctest</code> flag to make it easier to silence the deprecation warning. <a href="https://redirect.github.com/mitsuhiko/insta/issues/822">#822</a></li> <li>Update cargo-dist to 0.30.2 and fix Windows runner to use windows-2022. <a href="https://redirect.github.com/mitsuhiko/insta/issues/821">#821</a></li> </ul> <h2>1.44.0</h2> <ul> <li>Added non-interactive snapshot review and reject modes for use in non-TTY environments (LLMs, CI pipelines, scripts). <code>cargo insta review --snapshot <path></code> and <code>cargo insta reject --snapshot <path></code> now work without a terminal. Enhanced <code>pending-snapshots</code> output with usage instructions and workspace-relative paths. <a href="https://redirect.github.com/mitsuhiko/insta/issues/815">#815</a></li> <li>Add <code>--disable-nextest-doctest</code> flag to <code>cargo insta test</code> to disable running doctests with nextest. Shows a deprecation warning when nextest is used with doctests without this flag, to prepare <code>cargo insta</code> to no longer run a separate doctest process when using nextest in the future. <a href="https://redirect.github.com/mitsuhiko/insta/issues/803">#803</a></li> <li>Add ergonomic <code>--test-runner-fallback</code> / <code>--no-test-runner-fallback</code> flags to <code>cargo insta test</code>. <a href="https://redirect.github.com/mitsuhiko/insta/issues/811">#811</a></li> <li>Apply redactions to snapshot metadata. <a href="https://redirect.github.com/mitsuhiko/insta/issues/813">#813</a></li> <li>Remove confusing 'previously unseen snapshot' message. <a href="https://redirect.github.com/mitsuhiko/insta/issues/812">#812</a></li> <li>Speed up JSON float rendering. <a href="https://redirect.github.com/mitsuhiko/insta/issues/806">#806</a> (<a href="https://github.com/nyurik"><code>@nyurik</code></a>)</li> <li>Allow globset version up to 0.4.16. <a href="https://redirect.github.com/mitsuhiko/insta/issues/810">#810</a> (<a href="https://github.com/g0hl1n"><code>@g0hl1n</code></a>)</li> <li>Improve documentation. <a href="https://redirect.github.com/mitsuhiko/insta/issues/814">#814</a> (<a href="https://github.com/tshepang"><code>@tshepang</code></a>)</li> <li>We no longer trim starting newlines during assertions, which allows asserting the number of leading newlines match. Existing assertions with different leading newlines will pass and print a warning suggesting running with <code>--force-update-snapshots</code>. They may fail in the future. (Note that we still currently allow differing <em>trailing</em> newlines, though may adjust this in the future). <a href="https://redirect.github.com/mitsuhiko/insta/issues/563">#563</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
7a6d6090d7 |
chore(deps): bump derive_more from 2.0.1 to 2.1.0 in /codex-rs (#7714)
Bumps [derive_more](https://github.com/JelteF/derive_more) from 2.0.1 to 2.1.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/releases">derive_more's releases</a>.</em></p> <blockquote> <h2>2.1.0</h2> <h3>Added</h3> <ul> <li>Support <code>#[display(rename_all = "<casing>")]</code> attribute to change output for implicit naming of unit enum variants or unit structs when deriving <code>Display</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/443">#443</a>)</li> <li>Support <code>#[from_str(rename_all = "<casing>")]</code> attribute for unit enum variants and unit structs when deriving <code>FromStr</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/467">#467</a>)</li> <li>Support <code>Option</code> fields for <code>Error::source()</code> in <code>Error</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/459">#459</a>)</li> <li>Support structs with no fields in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/469">#469</a>)</li> <li>Add <code>PartialEq</code> derive similar to <code>std</code>'s one, but considering generics correctly, and implementing <code>ne()</code> method as well. (<a href="https://redirect.github.com/JelteF/derive_more/pull/473">#473</a>, <a href="https://redirect.github.com/JelteF/derive_more/pull/475">#475</a>)</li> <li>Add <code>Eq</code> derive similar to <code>std</code>'s one, but considering generics correctly. (<a href="https://redirect.github.com/JelteF/derive_more/pull/479">#479</a>)</li> <li>Proxy-pass <code>#[allow]</code>/<code>#[expect]</code> attributes of the type in <code>Constructor</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/477">#477</a>)</li> <li>Support <code>Deref</code> and <code>DerefMut</code> derives for enums. (<a href="https://redirect.github.com/JelteF/derive_more/pull/485">#485</a>)</li> <li>Support custom error in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/494">#494</a>)</li> <li>Support custom error in <code>TryInto</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/503">#503</a>)</li> <li>Support skipping fields in <code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives. (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Changed</h3> <ul> <li>The minimum supported Rust version (MSRV) is now Rust 1.81. (<a href="https://redirect.github.com/JelteF/derive_more/pull/466">#466</a>)</li> <li><code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives now infer trait bounds for generics structurally (bound field types instead of type parameters directly). (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Suppress deprecation warnings in generated code. (<a href="https://redirect.github.com/JelteF/derive_more/pull/454">#454</a>)</li> <li>Silent no-op when <code>#[try_from(repr)]</code> attribute is not specified for <code>TryFrom</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/458">#458</a>)</li> <li>Missing trait bounds in <code>AsRef</code>/<code>AsMut</code> derives when associative types are involved. (<a href="https://redirect.github.com/JelteF/derive_more/pull/474">#474</a>)</li> <li>Erroneous code generated in <code>Try</code>/<code>TryInto</code> derives when <code>Self</code> type is present in the struct or enum definition. (<a href="https://redirect.github.com/JelteF/derive_more/pull/489">#489</a>)</li> <li>Dependency on unstable <code>feature(error_generic_member_access)</code> in <code>Error</code> derive when using <code>Backtrace</code> on a non-nightly toolchain. (<a href="https://redirect.github.com/JelteF/derive_more/pull/513">#513</a>)</li> <li>Broken support for <code>#[<display-trait>("default formatting")]</code> attribute without <code>{_variant}</code> being used as default for enum variants without explicit formatting. (<a href="https://redirect.github.com/JelteF/derive_more/pull/495">#495</a>)</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/jasl"><code>@jasl</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/453">JelteF/derive_more#453</a></li> <li><a href="https://github.com/aborgna-q"><code>@aborgna-q</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/454">JelteF/derive_more#454</a></li> <li><a href="https://github.com/maxime-bruno"><code>@maxime-bruno</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/461">JelteF/derive_more#461</a></li> <li><a href="https://github.com/Cheban1996"><code>@Cheban1996</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/477">JelteF/derive_more#477</a></li> <li><a href="https://github.com/kiendang"><code>@kiendang</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/486">JelteF/derive_more#486</a></li> <li><a href="https://github.com/goldlinker"><code>@goldlinker</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/509">JelteF/derive_more#509</a></li> <li><a href="https://github.com/CJKay"><code>@CJKay</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/513">JelteF/derive_more#513</a></li> <li><a href="https://github.com/ErmitaVulpe"><code>@ErmitaVulpe</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/472">JelteF/derive_more#472</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/JelteF/derive_more/compare/v2.0.1...v2.1.0">https://github.com/JelteF/derive_more/compare/v2.0.1...v2.1.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md">derive_more's changelog</a>.</em></p> <blockquote> <h2>2.1.0 - 2025-12-02</h2> <h3>Added</h3> <ul> <li>Support <code>#[display(rename_all = "<casing>")]</code> attribute to change output for implicit naming of unit enum variants or unit structs when deriving <code>Display</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/443">#443</a>)</li> <li>Support <code>#[from_str(rename_all = "<casing>")]</code> attribute for unit enum variants and unit structs when deriving <code>FromStr</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/467">#467</a>)</li> <li>Support <code>Option</code> fields for <code>Error::source()</code> in <code>Error</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/459">#459</a>)</li> <li>Support structs with no fields in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/469">#469</a>)</li> <li>Add <code>PartialEq</code> derive similar to <code>std</code>'s one, but considering generics correctly, and implementing <code>ne()</code> method as well. (<a href="https://redirect.github.com/JelteF/derive_more/pull/473">#473</a>, <a href="https://redirect.github.com/JelteF/derive_more/pull/475">#475</a>)</li> <li>Add <code>Eq</code> derive similar to <code>std</code>'s one, but considering generics correctly. (<a href="https://redirect.github.com/JelteF/derive_more/pull/479">#479</a>)</li> <li>Proxy-pass <code>#[allow]</code>/<code>#[expect]</code> attributes of the type in <code>Constructor</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/477">#477</a>)</li> <li>Support <code>Deref</code> and <code>DerefMut</code> derives for enums. (<a href="https://redirect.github.com/JelteF/derive_more/pull/485">#485</a>)</li> <li>Support custom error in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/494">#494</a>)</li> <li>Support custom error in <code>TryInto</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/503">#503</a>)</li> <li>Support skipping fields in <code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives. (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Changed</h3> <ul> <li>The minimum supported Rust version (MSRV) is now Rust 1.81. (<a href="https://redirect.github.com/JelteF/derive_more/pull/466">#466</a>)</li> <li><code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives now infer trait bounds for generics structurally (bound field types instead of type parameters directly). (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Suppress deprecation warnings in generated code. (<a href="https://redirect.github.com/JelteF/derive_more/pull/454">#454</a>)</li> <li>Silent no-op when <code>#[try_from(repr)]</code> attribute is not specified for <code>TryFrom</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/458">#458</a>)</li> <li>Missing trait bounds in <code>AsRef</code>/<code>AsMut</code> derives when associative types are involved. (<a href="https://redirect.github.com/JelteF/derive_more/pull/474">#474</a>)</li> <li>Erroneous code generated in <code>Try</code>/<code>TryInto</code> derives when <code>Self</code> type is present in</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
701f42b74b |
chore(deps): bump ts-rs from 11.0.1 to 11.1.0 in /codex-rs (#7713)
Bumps [ts-rs](https://github.com/Aleph-Alpha/ts-rs) from 11.0.1 to 11.1.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Aleph-Alpha/ts-rs/releases">ts-rs's releases</a>.</em></p> <blockquote> <h2>v11.1.0</h2> <p>Today, we're happy to publish a small follow-up to v11.0.1!</p> <p>This release fixes a nasty build failure when using the <code>format</code> feature. <strong>Note:</strong> For those that use the <code>format</code> feature, this release bumps the MSRV to 1.88. We'd have preferred to do this in a major release, but felt this was acceptable since the build was broken by one of the dependencies anyway.</p> <h1>New features</h1> <h2>TypeScript enums with <code>#[ts(repr(enum))</code></h2> <p><code>#[ts(repr(enum))</code> instructs ts-rs to generate an <code>enum</code>, instead of a <code>type</code> for your rust enum.</p> <pre lang="rust"><code>#[derive(TS)] #[ts(repr(enum))] enum Role { User, Admin, } // will generate `export enum Role { "User", "Admin" }` </code></pre> <p>Discriminants are preserved, and you can use the variant's name as discriminant instead using <code>#[ts(repr(enum = name))]</code></p> <h2><code>#[ts(optional_fields)]</code> in enums</h2> <p>The <code>#[ts(optional_fields)]</code> attribute can now be applied directly to enums, or even to individual enum variants.</p> <h2>Control over file extensions in imports</h2> <p>Normally, we generate <code>import { Type } from "file"</code> statements. In some scenarios though, it might be necessary to use a <code>.ts</code> or even <code>.js</code> extension instead.<br /> This is now possible by setting the <code>TS_RS_IMPORT_EXTENSION</code> environment variable.</p> <blockquote> <p>Note: With the introduction of this feature, we deprecate the <code>import-esm</code> cargo feature. It will be removed in a future major release.</p> </blockquote> <h2>Full changelog</h2> <ul> <li>Regression: <code>#[ts(optional)]</code> with <code>#[ts(type)]</code> by <a href="https://github.com/NyxCode"><code>@NyxCode</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/416">Aleph-Alpha/ts-rs#416</a></li> <li>release v11.0.1 by <a href="https://github.com/NyxCode"><code>@NyxCode</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/417">Aleph-Alpha/ts-rs#417</a></li> <li>Make <code>rename_all</code> compatible with tuple and unit structs as a no-op attribute by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/422">Aleph-Alpha/ts-rs#422</a></li> <li>Replace <code>import-esm</code> with <code>TS_RS_IMPORT_EXTENSION</code> by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/423">Aleph-Alpha/ts-rs#423</a></li> <li>Updated chrono Duration emitted type by <a href="https://github.com/fxf8"><code>@fxf8</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/434">Aleph-Alpha/ts-rs#434</a></li> <li>Add optional_fields to enum by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/432">Aleph-Alpha/ts-rs#432</a></li> <li>Add <code>#[ts(repr(enum)]</code> attribute by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/425">Aleph-Alpha/ts-rs#425</a></li> <li>Fix build with <code>format</code> feature by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/438">Aleph-Alpha/ts-rs#438</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/fxf8"><code>@fxf8</code></a> made their first contribution in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/434">Aleph-Alpha/ts-rs#434</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Aleph-Alpha/ts-rs/blob/main/CHANGELOG.md">ts-rs's changelog</a>.</em></p> <blockquote> <h1>11.1.0</h1> <h3>Features</h3> <ul> <li>Add <code>#[ts(repr(enum))]</code> attribute (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/425">#425</a>)</li> <li>Add support for <code>#[ts(optional_fields)]</code> in enums and enum variants (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/432">#432</a>)</li> <li>Deprecate <code>import-esm</code> cargo feature in favour of <code>RS_RS_IMPORT_EXTENSION</code> (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/423">#423</a>)</li> </ul> <h3>Fixes</h3> <ul> <li>Fix bindings for <code>chrono::Duration</code> (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/434">#434</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Aleph-Alpha/ts-rs/commits/v11.1.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
3c3d3d1adc |
fix: add integration tests for codex-exec-mcp-server with execpolicy (#7617)
This PR introduces integration tests that run [codex-shell-tool-mcp](https://www.npmjs.com/package/@openai/codex-shell-tool-mcp) as a user would. Note that this requires running our fork of Bash, so we introduce a [DotSlash](https://dotslash-cli.com/) file for `bash` so that we can run the integration tests on multiple platforms without having to check the binaries into the repository. (As noted in the DotSlash file, it is slightly more heavyweight than necessary, which may be worth addressing as disk space in CI is limited: https://github.com/openai/codex/pull/7678.) To start, this PR adds two tests: - `list_tools()` makes the `list_tools` request to the MCP server and verifies we get the expected response - `accept_elicitation_for_prompt_rule()` defines a `prefix_rule()` with `decision="prompt"` and verifies the elicitation flow works as expected Though the `accept_elicitation_for_prompt_rule()` test **only works on Linux**, as this PR reveals that there are currently issues when running the Bash fork in a read-only sandbox on Linux. This will have to be fixed in a follow-up PR. Incidentally, getting this test run to correctly on macOS also requires a recent fix we made to `brew` that hasn't hit a mainline release yet, so getting CI green in this PR required https://github.com/openai/codex/pull/7680. |
||
|
|
2e4a402521 |
cloud: status, diff, apply (#7614)
Adds cli commands for getting the status of cloud tasks, and for getting/applying the diffs from same. |
||
|
|
f48d88067e |
Fix unified_exec on windows (#7620)
Fix unified_exec on windows Requires removal of PSUEDOCONSOLE_INHERIT_CURSOR flag so child processed don't attempt to wait for cursor position response (and timeout). https://github.com/wezterm/wezterm/compare/main...pakrym:wezterm:PSUEDOCONSOLE_INHERIT_CURSOR?expand=1 --------- Co-authored-by: pakrym-oai <pakrym@openai.com> |
||
|
|
b1c918d8f7 |
feat: exec policy integration in shell mcp (#7609)
adding execpolicy support into the `posix` mcp Co-authored-by: Michael Bolin <mbolin@openai.com> |
||
|
|
903b7774bc |
Add models endpoint (#7603)
- Use the codex-api crate to introduce models endpoint. - Add `models` to codex core tests helpers - Add `ModelsInfo` for the endpoint return type |
||
|
|
71504325d3 |
Migrate model preset (#7542)
- Introduce `openai_models` in `/core` - Move `PRESETS` under it - Move `ModelPreset`, `ModelUpgrade`, `ReasoningEffortPreset`, `ReasoningEffortPreset`, and `ReasoningEffortPreset` to `protocol` - Introduce `Op::ListModels` and `EventMsg::AvailableModels` Next steps: - migrate `app-server` and `tui` to use the introduced Operation |
||
|
|
2ad980abf4 |
add slash resume (#7302)
`codex resume` isn't that discoverable. Adding it to the slash commands can help |
||
|
|
58e1e570fa |
refactor: tui.rs extract several pieces (#7461)
Pull FrameRequester out of tui.rs into its own module and make a FrameScheduler struct. This is effectively an Actor/Handler approach (see https://ryhl.io/blog/actors-with-tokio/). Adds tests and docs. Small refactor of pending_viewport_area logic. |
||
|
|
1d09ac89a1 |
execpolicy helpers (#7032)
this PR - adds a helper function to amend `.codexpolicy` files with new prefix rules - adds a utility to `Policy` allowing prefix rules to be added to existing `Policy` structs both additions will be helpful as we thread codexpolicy into the TUI workflow |
||
|
|
8b1e397211 |
Add request logging back (#7471)
Having full requests helps debugging |
||
|
|
a8d5ad37b8 |
feat: experimental support for skills.md (#7412)
This change prototypes support for Skills with the CLI. This is an **experimental** feature for internal testing. --------- Co-authored-by: Gav Verma <gverma@openai.com> |
||
|
|
c0564edebe |
chore: update to rmcp@0.10.0 to pick up support for custom client notifications (#7462)
In https://github.com/openai/codex/pull/7112, I updated our `rmcp` dependency to point to a personal fork while I tried to upstream my proposed change. Now that https://github.com/modelcontextprotocol/rust-sdk/pull/556 has been upstreamed and included in the `0.10.0` release of the crate, we can go back to using the mainline release. |
||
|
|
ba58184349 |
chore(deps): bump image from 0.25.8 to 0.25.9 in /codex-rs (#7421)
Bumps [image](https://github.com/image-rs/image) from 0.25.8 to 0.25.9. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/image-rs/image/blob/main/CHANGES.md">image's changelog</a>.</em></p> <blockquote> <h3>Version 0.25.9</h3> <p>Features:</p> <ul> <li>Support extracting XMP metadata from PNG, JPEG, GIF, WebP and TIFF files (<a href="https://redirect.github.com/image-rs/image/issues/2567">#2567</a>, <a href="https://redirect.github.com/image-rs/image/issues/2634">#2634</a>, <a href="https://redirect.github.com/image-rs/image/issues/2644">#2644</a>)</li> <li>Support reading IPTC metadata from PNG and JPG files (<a href="https://redirect.github.com/image-rs/image/issues/2611">#2611</a>)</li> <li>Support reading ICC profile from GIF files (<a href="https://redirect.github.com/image-rs/image/issues/2644">#2644</a>)</li> <li>Allow setting a specific DEFLATE compression level when writing PNG (<a href="https://redirect.github.com/image-rs/image/issues/2583">#2583</a>)</li> <li>Initial support for 16-bit CMYK TIFF files (<a href="https://redirect.github.com/image-rs/image/issues/2588">#2588</a>)</li> <li>Allow extracting the alpha channel of a <code>Pixel</code> in a generic way (<a href="https://redirect.github.com/image-rs/image/issues/2638">#2638</a>)</li> </ul> <p>Structural changes:</p> <ul> <li>EXR format decoding now only uses multi-threading via Rayon when the <code>rayon</code> feature is enabled (<a href="https://redirect.github.com/image-rs/image/issues/2643">#2643</a>)</li> <li>Upgraded zune-jpeg to 0.5.x, ravif to 0.12.x, gif to 0.14.x</li> <li>pnm: parse integers in PBM/PGM/PPM headers without allocations (<a href="https://redirect.github.com/image-rs/image/issues/2620">#2620</a>)</li> <li>Replace <code>doc_auto_cfg</code> with <code>doc_cfg</code> (<a href="https://redirect.github.com/image-rs/image/issues/2637">#2637</a>)</li> </ul> <p>Bug fixes:</p> <ul> <li>Do not encode empty JPEG images (<a href="https://redirect.github.com/image-rs/image/issues/2624">#2624</a>)</li> <li>tga: reject empty images (<a href="https://redirect.github.com/image-rs/image/issues/2614">#2614</a>)</li> <li>tga: fix orientation flip for color mapped images (<a href="https://redirect.github.com/image-rs/image/issues/2607">#2607</a>)</li> <li>tga: adjust colormap lookup to match tga 2.0 spec (<a href="https://redirect.github.com/image-rs/image/issues/2608">#2608</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
cb85a7b96e |
chore(deps): bump tracing from 0.1.41 to 0.1.43 in /codex-rs (#7428)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.41 to 0.1.43. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tracing/releases">tracing's releases</a>.</em></p> <blockquote> <h2>tracing 0.1.43</h2> <h4>Important</h4> <p>The previous release [0.1.42] was yanked because <a href="https://redirect.github.com/tokio-rs/tracing/issues/3382">#3382</a> was a breaking change. See further details in <a href="https://redirect.github.com/tokio-rs/tracing/issues/3424">#3424</a>. This release contains all the changes from that version, plus a revert for the problematic part of the breaking PR.</p> <h3>Fixed</h3> <ul> <li>Revert "make <code>valueset</code> macro sanitary" (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3425">#3425</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/3382">#3382</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3382">tokio-rs/tracing#3382</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3424">#3424</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3424">tokio-rs/tracing#3424</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3425">#3425</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3425">tokio-rs/tracing#3425</a> [0.1.42]: <a href="https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42">https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42</a></p> <h2>tracing 0.1.42</h2> <h3>Important</h3> <p>The [<code>Span::record_all</code>] method has been removed from the documented API. It was always unsuable via the documented API as it requried a <code>ValueSet</code> which has no publically documented constructors. The method remains, but should not be used outside of <code>tracing</code> macros.</p> <h3>Added</h3> <ul> <li><strong>attributes</strong>: Support constant expressions as instrument field names (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3158">#3158</a>)</li> <li>Add <code>record_all!</code> macro for recording multiple values in one call (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3227">#3227</a>)</li> <li><strong>core</strong>: Improve code generation at trace points significantly (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3398">#3398</a>)</li> </ul> <h3>Changed</h3> <ul> <li><code>tracing-core</code>: updated to 0.1.35 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3414">#3414</a>)</li> <li><code>tracing-attributes</code>: updated to 0.1.31 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3417">#3417</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix "name / parent" variant of <code>event!</code> (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2983">#2983</a>)</li> <li>Remove 'r#' prefix from raw identifiers in field names (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3130">#3130</a>)</li> <li>Fix perf regression when <code>release_max_level_*</code> not set (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3373">#3373</a>)</li> <li>Use imported instead of fully qualified path (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3374">#3374</a>)</li> <li>Make <code>valueset</code> macro sanitary (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3382">#3382</a>)</li> </ul> <h3>Documented</h3> <ul> <li><strong>core</strong>: Add missing <code>dyn</code> keyword in <code>Visit</code> documentation code sample (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3387">#3387</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/2983">#2983</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#2983%5D(https://redirect.github.com/tokio-rs/tracing/issues/2983)">tokio-rs/tracing#2983</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3130">#3130</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3130%5D(https://redirect.github.com/tokio-rs/tracing/issues/3130)">tokio-rs/tracing#3130</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3158">#3158</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3158%5D(https://redirect.github.com/tokio-rs/tracing/issues/3158)">tokio-rs/tracing#3158</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
3f12f1140f |
chore(deps): bump reqwest from 0.12.23 to 0.12.24 in /codex-rs (#7424)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.23 to 0.12.24. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/releases">reqwest's releases</a>.</em></p> <blockquote> <h2>v0.12.24</h2> <h2>Highlights</h2> <ul> <li>Refactor cookie handling to an internal middleware.</li> <li>Refactor internal random generator.</li> <li>Refactor base64 encoding to reduce a copy.</li> <li>Documentation updates.</li> </ul> <h2>What's Changed</h2> <ul> <li>build(deps): silence unused deps in WASM build by <a href="https://github.com/0x676e67"><code>@0x676e67</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2799">seanmonstar/reqwest#2799</a></li> <li>perf(util): avoid extra copy when base64 encoding by <a href="https://github.com/0x676e67"><code>@0x676e67</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2805">seanmonstar/reqwest#2805</a></li> <li>docs: fix method name in changelog entry by <a href="https://github.com/johannespfrang"><code>@johannespfrang</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2807">seanmonstar/reqwest#2807</a></li> <li>chore: Align the name usage of TotalTimeout by <a href="https://github.com/Xuanwo"><code>@Xuanwo</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2657">seanmonstar/reqwest#2657</a></li> <li>refactor(cookie): add <code>CookieService</code> by <a href="https://github.com/linyihai"><code>@linyihai</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2787">seanmonstar/reqwest#2787</a></li> <li>Fixes typo in retry max_retries_per_request doc comment re 2813 by <a href="https://github.com/dmackinn"><code>@dmackinn</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2824">seanmonstar/reqwest#2824</a></li> <li>test(multipart): fix build failure with <code>no-default-features</code> by <a href="https://github.com/0x676e67"><code>@0x676e67</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2801">seanmonstar/reqwest#2801</a></li> <li>refactor(cookie): avoid duplicate cookie insertion by <a href="https://github.com/0x676e67"><code>@0x676e67</code></a> in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2834">seanmonstar/reqwest#2834</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/johannespfrang"><code>@johannespfrang</code></a> made their first contribution in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2807">seanmonstar/reqwest#2807</a></li> <li><a href="https://github.com/dmackinn"><code>@dmackinn</code></a> made their first contribution in <a href="https://redirect.github.com/seanmonstar/reqwest/pull/2824">seanmonstar/reqwest#2824</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/seanmonstar/reqwest/compare/v0.12.23...v0.12.24">https://github.com/seanmonstar/reqwest/compare/v0.12.23...v0.12.24</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md">reqwest's changelog</a>.</em></p> <blockquote> <h2>v0.12.24</h2> <ul> <li>Refactor cookie handling to an internal middleware.</li> <li>Refactor internal random generator.</li> <li>Refactor base64 encoding to reduce a copy.</li> <li>Documentation updates.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
c22cd2e953 |
chore(deps): bump serde_with from 3.14.0 to 3.16.1 in /codex-rs (#7422)
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.14.0 to 3.16.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jonasbb/serde_with/releases">serde_with's releases</a>.</em></p> <blockquote> <h2>serde_with v3.16.1</h2> <h3>Fixed</h3> <ul> <li>Fix <code>JsonSchemaAs</code> of <code>SetPreventDuplicates</code> and <code>SetLastValueWins</code>. (<a href="https://redirect.github.com/jonasbb/serde_with/issues/906">#906</a>, <a href="https://redirect.github.com/jonasbb/serde_with/issues/907">#907</a>)</li> </ul> <h2>serde_with v3.16.0</h2> <h3>Added</h3> <ul> <li>Added support for <code>smallvec</code> v1 under the <code>smallvec_1</code> feature flag by <a href="https://github.com/isharma228"><code>@isharma228</code></a> (<a href="https://redirect.github.com/jonasbb/serde_with/issues/895">#895</a>)</li> <li>Add <code>JsonSchemaAs</code> implementation for <code>json::JsonString</code> by <a href="https://github.com/yogevm15"><code>@yogevm15</code></a> (<a href="https://redirect.github.com/jonasbb/serde_with/issues/901">#901</a>)</li> </ul> <h2>serde_with v3.15.1</h2> <h3>Fixed</h3> <ul> <li>Fix building of the documentation by updating references to use <code>serde_core</code>.</li> </ul> <h2>serde_with v3.15.0</h2> <h3>Added</h3> <ul> <li> <p>Added error inspection to <code>VecSkipError</code> and <code>MapSkipError</code> by <a href="https://github.com/michelhe"><code>@michelhe</code></a> (<a href="https://redirect.github.com/jonasbb/serde_with/issues/878">#878</a>) This allows interacting with the previously hidden error, for example for logging. Checkout the newly added example to both types.</p> </li> <li> <p>Allow documenting the types generated by <code>serde_conv!</code>. The <code>serde_conv!</code> macro now acceps outer attributes before the optional visibility modifier. This allow adding doc comments in the shape of <code>#[doc = "..."]</code> or any other attributes, such as lint modifiers.</p> <pre lang="rust"><code>serde_conv!( #[doc = "Serialize bools as string"] #[allow(dead_code)] pub BoolAsString, bool, |x: &bool| ::std::string::ToString::to_string(x), |x: ::std::string::String| x.parse() ); </code></pre> </li> <li> <p>Add support for <code>hashbrown</code> v0.16 (<a href="https://redirect.github.com/jonasbb/serde_with/issues/877">#877</a>)</p> <p>This extends the existing support for <code>hashbrown</code> v0.14 and v0.15 to the newly released version.</p> </li> </ul> <h3>Changed</h3> <ul> <li>Bump MSRV to 1.76, since that is required for <code>toml</code> dev-dependency.</li> </ul> <h2>serde_with v3.14.1</h2> <h3>Fixed</h3> <ul> <li>Show macro expansion in the docs.rs generated rustdoc.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
ebd485b1a0 |
chore(deps): bump arboard from 3.6.0 to 3.6.1 in /codex-rs (#7426)
Bumps [arboard](https://github.com/1Password/arboard) from 3.6.0 to 3.6.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/1Password/arboard/releases">arboard's releases</a>.</em></p> <blockquote> <h2>v3.6.1</h2> <p>This release focuses on improving compatibility with data in the real world and bug fixes. It also includes a new <code>Set</code> API for working with file paths via drag-and-drop interfaces across Linux, macOS, and Windows.</p> <p>This release also marks the start of exclusively publishing changelogs via GitHub Releases. The old <code>CHANGELOG.md</code> has been removed due to maintenance overhead and duplication. <a href="https://github.com/1Password/arboard/releases/tag/v3.6.0">v3.6.0</a> is the last revision to include this file.</p> <h3>Added</h3> <ul> <li>Add support for pasting lists of files via <code>Set::file_list</code> interface by <a href="https://github.com/Gae24"><code>@Gae24</code></a> in <a href="https://redirect.github.com/1Password/arboard/pull/181">1Password/arboard#181</a></li> <li>Support <code>windows-sys</code> 0.60 in <code>arboard</code>'s allowed version range by <a href="https://github.com/complexspaces"><code>@complexspaces</code></a> in <a href="https://redirect.github.com/1Password/arboard/pull/201">1Password/arboard#201</a></li> </ul> <h3>Changed</h3> <ul> <li>Fix grammar and typos by <a href="https://github.com/complexspaces"><code>@complexspaces</code></a> and <a href="https://github.com/gagath"><code>@gagath</code></a> in <a href="https://redirect.github.com/1Password/arboard/pull/194">1Password/arboard#194</a> and <a href="https://redirect.github.com/1Password/arboard/pull/196">1Password/arboard#196</a></li> <li>Prefer PNG when pasting images on Windows by <a href="https://github.com/wcassels"><code>@wcassels</code></a> in <a href="https://redirect.github.com/1Password/arboard/pull/198">1Password/arboard#198</a> <ul> <li>Note: This change greatly increases compatibility for "complicated" images that contain alpha values and/or transparent pixels. Support for transparency in <code>BITMAP</code> formats is ill-defined and inconsistently implemented in the wild, but is consistent in <code>PNG</code>. Most applications loading images onto the clipboard include <code>PNG</code>-encoded data already.</li> </ul> </li> <li>Bitmap images pasted on Windows now use the <code>image</code> crate instead of a homegrown internal parser. <ul> <li>This <strong>should not</strong> regress any existing Bitmap use cases and instead will provide more consistent and robust parsing. If you notice something now broken, please open an issue!</li> </ul> </li> </ul> <h3>Fixed</h3> <ul> <li>Remove silent dropping of file paths when non-UTF8 was mixed in on Linux by <a href="https://github.com/Gae24"><code>@Gae24</code></a> in <a href="https://redirect.github.com/1Password/arboard/pull/197">1Password/arboard#197</a></li> <li>Fix parsing of 24-bit bitmaps on Windows by <a href="https://github.com/wcassels"><code>@wcassels</code></a> in <a href="https://redirect.github.com/1Password/arboard/pull/198">1Password/arboard#198</a> <ul> <li>Example: Images with transparency copied by Firefox are now handled correctly, among others.</li> </ul> </li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/gagath"><code>@gagath</code></a> made their first contribution in <a href="https://redirect.github.com/1Password/arboard/pull/196">1Password/arboard#196</a></li> <li><a href="https://github.com/wcassels"><code>@wcassels</code></a> made their first contribution in <a href="https://redirect.github.com/1Password/arboard/pull/198">1Password/arboard#198</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/1Password/arboard/compare/v3.6.0...v3.6.1">https://github.com/1Password/arboard/compare/v3.6.0...v3.6.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
28ff364c3a | feat: update process ID for event handling (#7261) | ||
|
|
4502b1b263 | chore: proper client extraction (#6996) | ||
|
|
523b40a129 | feat[app-serve]: config management (#7241) | ||
|
|
99e5340c54 |
Windows Sandbox: treat <workspace_root>/.git as read-only in workspace-write mode (#7142)
this functionality is [supported](https://github.com/openai/codex/blob/main/codex-rs/protocol/src/protocol.rs#L421-L422) in the MacOs sandbox as well. Adding it to Windows for parity This PR also changes `rust-ci.yaml` to work around a github `hashFiles` issue. Others have done something [similar](https://github.com/openai/superassistant/pull/32156) today |
||
|
|
ec49b56874 |
chore: add cargo-deny configuration (#7119)
- add GitHub workflow running cargo-deny on push/PR - document cargo-deny allowlist with workspace-dep notes and advisory ignores - align workspace crates to inherit version/edition/license for consistent checks |
||
|
|
f6f4c8f5ee |
chore(deps): bump webbrowser from 1.0.5 to 1.0.6 in /codex-rs (#7225)
Bumps [webbrowser](https://github.com/amodm/webbrowser-rs) from 1.0.5 to 1.0.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/amodm/webbrowser-rs/releases">webbrowser's releases</a>.</em></p> <blockquote> <h2>v1.0.6</h2> <h3>Fixed</h3> <ul> <li>Windows: fix browser opening when unicode characters exist in path. See PR <a href="https://redirect.github.com/amodm/webbrowser-rs/issues/108">#108</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md">webbrowser's changelog</a>.</em></p> <blockquote> <h2>[1.0.6] - 2025-10-15 <!-- raw HTML omitted --><!-- raw HTML omitted --></h2> <h3>Fixed</h3> <ul> <li>Windows: fix browser opening when unicode characters exist in path. See PR <a href="https://redirect.github.com/amodm/webbrowser-rs/issues/108">#108</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
1875700220 |
chore(deps): bump libc from 0.2.175 to 0.2.177 in /codex-rs (#7224)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.175 to 0.2.177. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/libc/releases">libc's releases</a>.</em></p> <blockquote> <h2>0.2.177</h2> <h3>Added</h3> <ul> <li>Apple: Add <code>TIOCGETA</code>, <code>TIOCSETA</code>, <code>TIOCSETAW</code>, <code>TIOCSETAF</code> constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4736">#4736</a>)</li> <li>Apple: Add <code>pthread_cond_timedwait_relative_np</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4719">#4719</a>)</li> <li>BSDs: Add <code>_CS_PATH</code> constant (<a href="https://redirect.github.com/rust-lang/libc/pull/4738">#4738</a>)</li> <li>Linux-like: Add <code>SIGEMT</code> for mips* and sparc* architectures (<a href="https://redirect.github.com/rust-lang/libc/pull/4730">#4730</a>)</li> <li>OpenBSD: Add <code>elf_aux_info</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4729">#4729</a>)</li> <li>Redox: Add more sysconf constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4728">#4728</a>)</li> <li>Windows: Add <code>wcsnlen</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4721">#4721</a>)</li> </ul> <h3>Changed</h3> <ul> <li>WASIP2: Invert conditional to include p2 APIs (<a href="https://redirect.github.com/rust-lang/libc/pull/4733">#4733</a>)</li> </ul> <h2>0.2.176</h2> <h3>Support</h3> <ul> <li>The default FreeBSD version has been raised from 11 to 12. This matches <code>rustc</code> since 1.78. (<a href="https://redirect.github.com/rust-lang/libc/pull/2406">#2406</a>)</li> <li><code>Debug</code> is now always implemented, rather than being gated behind the <code>extra_traits</code> feature. (<a href="https://redirect.github.com/rust-lang/libc/pull/4624">#4624</a>)</li> </ul> <h3>Added</h3> <ul> <li>AIX: Restore some non-POSIX functions guarded by the <code>_KERNEL</code> macro. (<a href="https://redirect.github.com/rust-lang/libc/pull/4607">#4607</a>)</li> <li>FreeBSD 14: Add <code>st_fileref</code> to <code>struct stat</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4642">#4642</a>)</li> <li>Haiku: Add the <code>accept4</code> POSIX call (<a href="https://redirect.github.com/rust-lang/libc/pull/4586">#4586</a>)</li> <li>Introduce a wrapper for representing padding (<a href="https://redirect.github.com/rust-lang/libc/pull/4632">#4632</a>)</li> <li>Linux: Add <code>EM_RISCV</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4659">#4659</a>)</li> <li>Linux: Add <code>MS_NOSYMFOLLOW</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4389">#4389</a>)</li> <li>Linux: Add <code>backtrace_symbols(_fd)</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4668">#4668</a>)</li> <li>Linux: Add missing <code>SOL_PACKET</code> optnames (<a href="https://redirect.github.com/rust-lang/libc/pull/4669">#4669</a>)</li> <li>Musl s390x: Add <code>SYS_mseal</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4549">#4549</a>)</li> <li>NuttX: Add <code>__errno</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4687">#4687</a>)</li> <li>Redox: Add <code>dirfd</code>, <code>VDISABLE</code>, and resource consts (<a href="https://redirect.github.com/rust-lang/libc/pull/4660">#4660</a>)</li> <li>Redox: Add more <code>resource.h</code>, <code>fcntl.h</code> constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4666">#4666</a>)</li> <li>Redox: Enable <code>strftime</code> and <code>mkostemp[s]</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4629">#4629</a>)</li> <li>Unix, Windows: Add <code>qsort_r</code> (Unix), and <code>qsort(_s)</code> (Windows) (<a href="https://redirect.github.com/rust-lang/libc/pull/4677">#4677</a>)</li> <li>Unix: Add <code>dlvsym</code> for Linux-gnu, FreeBSD, and NetBSD (<a href="https://redirect.github.com/rust-lang/libc/pull/4671">#4671</a>)</li> <li>Unix: Add <code>sigqueue</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4620">#4620</a>)</li> </ul> <h3>Changed</h3> <ul> <li>FreeBSD 15: Mark <code>kinfo_proc</code> as non-exhaustive (<a href="https://redirect.github.com/rust-lang/libc/pull/4553">#4553</a>)</li> <li>FreeBSD: Set the ELF symbol version for <code>readdir_r</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4694">#4694</a>)</li> <li>Linux: Correct the config for whether or not <code>epoll_event</code> is packed (<a href="https://redirect.github.com/rust-lang/libc/pull/4639">#4639</a>)</li> <li>Tests: Replace the old <code>ctest</code> with the much more reliable new implementation (<a href="https://redirect.github.com/rust-lang/libc/pull/4655">#4655</a> and many related PRs)</li> </ul> <h3>Fixed</h3> <ul> <li>AIX: Fix the type of the 4th arguement of <code>getgrnam_r</code> ([#4656](<a href="https://redirect.github.com/rust-lang/libc/pull/4656">rust-lang/libc#4656</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/libc/blob/0.2.177/CHANGELOG.md">libc's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/rust-lang/libc/compare/0.2.176...0.2.177">0.2.177</a> - 2025-10-09</h2> <h3>Added</h3> <ul> <li>Apple: Add <code>TIOCGETA</code>, <code>TIOCSETA</code>, <code>TIOCSETAW</code>, <code>TIOCSETAF</code> constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4736">#4736</a>)</li> <li>Apple: Add <code>pthread_cond_timedwait_relative_np</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4719">#4719</a>)</li> <li>BSDs: Add <code>_CS_PATH</code> constant (<a href="https://redirect.github.com/rust-lang/libc/pull/4738">#4738</a>)</li> <li>Linux-like: Add <code>SIGEMT</code> for mips* and sparc* architectures (<a href="https://redirect.github.com/rust-lang/libc/pull/4730">#4730</a>)</li> <li>OpenBSD: Add <code>elf_aux_info</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4729">#4729</a>)</li> <li>Redox: Add more sysconf constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4728">#4728</a>)</li> <li>Windows: Add <code>wcsnlen</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4721">#4721</a>)</li> </ul> <h3>Changed</h3> <ul> <li>WASIP2: Invert conditional to include p2 APIs (<a href="https://redirect.github.com/rust-lang/libc/pull/4733">#4733</a>)</li> </ul> <h2><a href="https://github.com/rust-lang/libc/compare/0.2.175...0.2.176">0.2.176</a> - 2025-09-23</h2> <h3>Support</h3> <ul> <li>The default FreeBSD version has been raised from 11 to 12. This matches <code>rustc</code> since 1.78. (<a href="https://redirect.github.com/rust-lang/libc/pull/2406">#2406</a>)</li> <li><code>Debug</code> is now always implemented, rather than being gated behind the <code>extra_traits</code> feature. (<a href="https://redirect.github.com/rust-lang/libc/pull/4624">#4624</a>)</li> </ul> <h3>Added</h3> <ul> <li>AIX: Restore some non-POSIX functions guarded by the <code>_KERNEL</code> macro. (<a href="https://redirect.github.com/rust-lang/libc/pull/4607">#4607</a>)</li> <li>FreeBSD 14: Add <code>st_fileref</code> to <code>struct stat</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4642">#4642</a>)</li> <li>Haiku: Add the <code>accept4</code> POSIX call (<a href="https://redirect.github.com/rust-lang/libc/pull/4586">#4586</a>)</li> <li>Introduce a wrapper for representing padding (<a href="https://redirect.github.com/rust-lang/libc/pull/4632">#4632</a>)</li> <li>Linux: Add <code>EM_RISCV</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4659">#4659</a>)</li> <li>Linux: Add <code>MS_NOSYMFOLLOW</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4389">#4389</a>)</li> <li>Linux: Add <code>backtrace_symbols(_fd)</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4668">#4668</a>)</li> <li>Linux: Add missing <code>SOL_PACKET</code> optnames (<a href="https://redirect.github.com/rust-lang/libc/pull/4669">#4669</a>)</li> <li>Musl s390x: Add <code>SYS_mseal</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4549">#4549</a>)</li> <li>NuttX: Add <code>__errno</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4687">#4687</a>)</li> <li>Redox: Add <code>dirfd</code>, <code>VDISABLE</code>, and resource consts (<a href="https://redirect.github.com/rust-lang/libc/pull/4660">#4660</a>)</li> <li>Redox: Add more <code>resource.h</code>, <code>fcntl.h</code> constants (<a href="https://redirect.github.com/rust-lang/libc/pull/4666">#4666</a>)</li> <li>Redox: Enable <code>strftime</code> and <code>mkostemp[s]</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4629">#4629</a>)</li> <li>Unix, Windows: Add <code>qsort_r</code> (Unix), and <code>qsort(_s)</code> (Windows) (<a href="https://redirect.github.com/rust-lang/libc/pull/4677">#4677</a>)</li> <li>Unix: Add <code>dlvsym</code> for Linux-gnu, FreeBSD, and NetBSD (<a href="https://redirect.github.com/rust-lang/libc/pull/4671">#4671</a>)</li> <li>Unix: Add <code>sigqueue</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4620">#4620</a>)</li> </ul> <h3>Changed</h3> <ul> <li>FreeBSD 15: Mark <code>kinfo_proc</code> as non-exhaustive (<a href="https://redirect.github.com/rust-lang/libc/pull/4553">#4553</a>)</li> <li>FreeBSD: Set the ELF symbol version for <code>readdir_r</code> (<a href="https://redirect.github.com/rust-lang/libc/pull/4694">#4694</a>)</li> <li>Linux: Correct the config for whether or not <code>epoll_event</code> is packed (<a href="https://redirect.github.com/rust-lang/libc/pull/4639">#4639</a>)</li> <li>Tests: Replace the old <code>ctest</code> with the much more reliable new implementation (<a href="https://redirect.github.com/rust-lang/libc/pull/4655">#4655</a> and many related PRs)</li> </ul> <h3>Fixed</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
e8b6fb7937 |
chore(deps): bump toml_edit from 0.23.4 to 0.23.5 in /codex-rs (#7223)
Bumps [toml_edit](https://github.com/toml-rs/toml) from 0.23.4 to 0.23.5. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
be022be381 |
chore(deps): bump regex from 1.11.1 to 1.12.2 in /codex-rs (#7222)
Bumps [regex](https://github.com/rust-lang/regex) from 1.11.1 to 1.12.2. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's changelog</a>.</em></p> <blockquote> <h1>1.12.2 (2025-10-13)</h1> <p>This release fixes a <code>cargo doc</code> breakage on nightly when <code>--cfg docsrs</code> is enabled. This caused documentation to fail to build on docs.rs.</p> <p>Bug fixes:</p> <ul> <li>[BUG <a href="https://redirect.github.com/rust-lang/regex/issues/1305">#1305</a>](<a href="https://redirect.github.com/rust-lang/regex/issues/1305">rust-lang/regex#1305</a>): Switches the <code>doc_auto_cfg</code> feature to <code>doc_cfg</code> on nightly for docs.rs builds.</li> </ul> <h1>1.12.1 (2025-10-10)</h1> <p>This release makes a bug fix in the new <code>regex::Captures::get_match</code> API introduced in <code>1.12.0</code>. There was an oversight with the lifetime parameter for the <code>Match</code> returned. This is technically a breaking change, but given that it was caught almost immediately and I've yanked the <code>1.12.0</code> release, I think this is fine.</p> <h1>1.12.0 (2025-10-10)</h1> <p>This release contains a smattering of bug fixes, a fix for excessive memory consumption in some cases and a new <code>regex::Captures::get_match</code> API.</p> <p>Improvements:</p> <ul> <li>[FEATURE <a href="https://redirect.github.com/rust-lang/regex/issues/1146">#1146</a>](<a href="https://redirect.github.com/rust-lang/regex/issues/1146">rust-lang/regex#1146</a>): Add <code>Capture::get_match</code> for returning the overall match without <code>unwrap()</code>.</li> </ul> <p>Bug fixes:</p> <ul> <li>[BUG <a href="https://redirect.github.com/rust-lang/regex/issues/1083">#1083</a>](<a href="https://redirect.github.com/rust-lang/regex/issues/1083">rust-lang/regex#1083</a>): Fixes a panic in the lazy DFA (can only occur for especially large regexes).</li> <li>[BUG <a href="https://redirect.github.com/rust-lang/regex/issues/1116">#1116</a>](<a href="https://redirect.github.com/rust-lang/regex/issues/1116">rust-lang/regex#1116</a>): Fixes a memory usage regression for large regexes (introduced in <code>regex 1.9</code>).</li> <li>[BUG <a href="https://redirect.github.com/rust-lang/regex/issues/1195">#1195</a>](<a href="https://redirect.github.com/rust-lang/regex/issues/1195">rust-lang/regex#1195</a>): Fix universal start states in sparse DFA.</li> <li>[BUG <a href="https://redirect.github.com/rust-lang/regex/issues/1295">#1295</a>](<a href="https://redirect.github.com/rust-lang/regex/pull/1295">rust-lang/regex#1295</a>): Fixes a panic when deserializing a corrupted dense DFA.</li> <li><a href=" |
||
|
|
b519267d05 |
Account for encrypted reasoning for auto compaction (#7113)
- The total token used returned from the api doesn't account for the reasoning items before the assistant message - Account for those for auto compaction - Add the encrypted reasoning effort in the common tests utils - Add a test to make sure it works as expected |
||
|
|
c6f68c9df8 |
feat: declare server capability in shell-tool-mcp (#7112)
This introduces a new feature to Codex when it operates as an MCP
_client_ where if an MCP _server_ replies that it has an entry named
`"codex/sandbox-state"` in its _server capabilities_, then Codex will
send it an MCP notification with the following structure:
```json
{
"method": "codex/sandbox-state/update",
"params": {
"sandboxPolicy": {
"type": "workspace-write",
"network-access": false,
"exclude-tmpdir-env-var": false
"exclude-slash-tmp": false
},
"codexLinuxSandboxExe": null,
"sandboxCwd": "/Users/mbolin/code/codex2"
}
}
```
or with whatever values are appropriate for the initial `sandboxPolicy`.
**NOTE:** Codex _should_ continue to send the MCP server notifications
of the same format if these things change over the lifetime of the
thread, but that isn't wired up yet.
The result is that `shell-tool-mcp` can consume these values so that
when it calls `codex_core::exec::process_exec_tool_call()` in
`codex-rs/exec-server/src/posix/escalate_server.rs`, it is now sure to
call it with the correct values (whereas previously we relied on
hardcoded values).
While I would argue this is a supported use case within the MCP
protocol, the `rmcp` crate that we are using today does not support
custom notifications. As such, I had to patch it and I submitted it for
review, so hopefully it will be accepted in some form:
https://github.com/modelcontextprotocol/rust-sdk/pull/556
To test out this change from end-to-end:
- I ran `cargo build` in `~/code/codex2/codex-rs/exec-server`
- I built the fork of Bash in `~/code/bash/bash`
- I added the following to my `~/.codex/config.toml`:
```toml
# Use with `codex --disable shell_tool`.
[mcp_servers.execshell]
args = ["--bash", "/Users/mbolin/code/bash/bash"]
command = "/Users/mbolin/code/codex2/codex-rs/target/debug/codex-exec-mcp-server"
```
- From `~/code/codex2/codex-rs`, I ran `just codex --disable shell_tool`
- When the TUI started up, I verified that the sandbox mode is
`workspace-write`
- I ran `/mcp` to verify that the shell tool from the MCP is there:
<img width="1387" height="1400" alt="image"
src="https://github.com/user-attachments/assets/1a8addcc-5005-4e16-b59f-95cfd06fd4ab"
/>
- Then I asked it:
> what is the output of `gh issue list`
because this should be auto-approved with our existing dummy policy:
|
||
|
|
3bdcbc7292 |
Windows: flag some invocations that launch browsers/URLs as dangerous (#7111)
Prevent certain Powershell/cmd invocations from reaching the sandbox when they are trying to launch a browser, or run a command with a URL, etc. |
||
|
|
767b66f407 | Migrate coverage to shell_command (#7042) | ||
|
|
3f73e2c892 |
fix(app-server) remove www warning (#7046)
### Summary After #7022, we no longer need this warning. We should also clean up the schema for the notification, but this is a quick fix to just stop the behavior in the VSCE ## Testing - [x] Ran locally |
||
|
|
8e5f38c0f0 |
feat: waiting for an elicitation should not count against a shell tool timeout (#6973)
Previously, we were running into an issue where we would run the `shell` tool call with a timeout of 10s, but it fired an elicitation asking for user approval, the time the user took to respond to the elicitation was counted agains the 10s timeout, so the `shell` tool call would fail with a timeout error unless the user is very fast! This PR addresses this issue by introducing a "stopwatch" abstraction that is used to manage the timeout. The idea is: - `Stopwatch::new()` is called with the _real_ timeout of the `shell` tool call. - `process_exec_tool_call()` is called with the `Cancellation` variant of `ExecExpiration` because it should not manage its own timeout in this case - the `Stopwatch` expiration is wired up to the `cancel_rx` passed to `process_exec_tool_call()` - when an elicitation for the `shell` tool call is received, the `Stopwatch` pauses - because it is possible for multiple elicitations to arrive concurrently, it keeps track of the number of "active pauses" and does not resume until that counter goes down to zero I verified that I can test the MCP server using `@modelcontextprotocol/inspector` and specify `git status` as the `command` with a timeout of 500ms and that the elicitation pops up and I have all the time in the world to respond whereas previous to this PR, that would not have been possible. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/6973). * #7005 * __->__ #6973 * #6972 |
||
|
|
9bce050385 |
[app-server & core] introduce new codex error code and v2 app-server error events (#6938)
This PR does two things:
1. populate a new `codex_error_code` protocol in error events sent from
core to client;
2. old v1 core events `codex/event/stream_error` and `codex/event/error`
will now both become `error`. We also show codex error code for
turncompleted -> error status.
new events in app server test:
```
< {
< "method": "codex/event/stream_error",
< "params": {
< "conversationId": "019aa34c-0c14-70e0-9706-98520a760d67",
< "id": "0",
< "msg": {
< "codex_error_code": {
< "response_stream_disconnected": {
< "http_status_code": 401
< }
< },
< "message": "Reconnecting... 2/5",
< "type": "stream_error"
< }
< }
< }
{
< "method": "error",
< "params": {
< "error": {
< "codexErrorCode": {
< "responseStreamDisconnected": {
< "httpStatusCode": 401
< }
< },
< "message": "Reconnecting... 2/5"
< }
< }
< }
< {
< "method": "turn/completed",
< "params": {
< "turn": {
< "error": {
< "codexErrorCode": {
< "responseTooManyFailedAttempts": {
< "httpStatusCode": 401
< }
< },
< "message": "exceeded retry limit, last status: 401 Unauthorized, request id: 9a1b495a1a97ed3e-SJC"
< },
< "id": "0",
< "items": [],
< "status": "failed"
< }
< }
< }
```
|
||
|
|
fe7a3f0c2b |
execpolicycheck command in codex cli (#7012)
adding execpolicycheck tool onto codex cli this is useful for validating policies (can be multiple) against commands. it will also surface errors in policy syntax: <img width="1150" height="281" alt="Screenshot 2025-11-19 at 12 46 21 PM" src="https://github.com/user-attachments/assets/8f99b403-564c-4172-acc9-6574a8d13dc3" /> this PR also changes output format when there's no match in the CLI. instead of returning the raw string `noMatch`, we return `{"noMatch":{}}` this PR is a rewrite of: https://github.com/openai/codex/pull/6932 (due to the numerous merge conflicts present in the original PR) --------- Co-authored-by: Michael Bolin <mbolin@openai.com> |
||
|
|
52d0ec4cd8 | Delete tiktoken-rs (#7018) | ||
|
|
397279d46e |
Fix: Improve text encoding for shell output in VSCode preview (#6178) (#6182)
## 🐛 Problem Users running commands with non-ASCII characters (like Russian text "пример") in Windows/WSL environments experience garbled text in VSCode's shell preview window, with Unicode replacement characters (�) appearing instead of the actual text. **Issue**: https://github.com/openai/codex/issues/6178 ## 🔧 Root Cause The issue was in `StreamOutput<Vec<u8>>::from_utf8_lossy()` method in `codex-rs/core/src/exec.rs`, which used `String::from_utf8_lossy()` to convert shell output bytes to strings. This function immediately replaces any invalid UTF-8 byte sequences with replacement characters, without attempting to decode using other common encodings. In Windows/WSL environments, shell output often uses encodings like: - Windows-1252 (common Windows encoding) - Latin-1/ISO-8859-1 (extended ASCII) ## 🛠️ Solution Replaced the simple `String::from_utf8_lossy()` call with intelligent encoding detection via a new `bytes_to_string_smart()` function that tries multiple encoding strategies: 1. **UTF-8** (fast path for valid UTF-8) 2. **Windows-1252** (handles Windows-specific characters in 0x80-0x9F range) 3. **Latin-1** (fallback for extended ASCII) 4. **Lossy UTF-8** (final fallback, same as before) ## 📁 Changes ### New Files - `codex-rs/core/src/text_encoding.rs` - Smart encoding detection module - `codex-rs/core/tests/suite/text_encoding_fix.rs` - Integration tests ### Modified Files - `codex-rs/core/src/lib.rs` - Added text_encoding module - `codex-rs/core/src/exec.rs` - Updated StreamOutput::from_utf8_lossy() - `codex-rs/core/tests/suite/mod.rs` - Registered new test module ## ✅ Testing - **5 unit tests** covering UTF-8, Windows-1252, Latin-1, and fallback scenarios - **2 integration tests** simulating the exact Issue #6178 scenario - **Demonstrates improvement** over the previous `String::from_utf8_lossy()` approach All tests pass: ```bash cargo test -p codex-core text_encoding cargo test -p codex-core test_shell_output_encoding_issue_6178 ``` ## 🎯 Impact - ✅ **Eliminates garbled text** in VSCode shell preview for non-ASCII content - ✅ **Supports Windows/WSL environments** with proper encoding detection - ✅ **Zero performance impact** for UTF-8 text (fast path) - ✅ **Backward compatible** - UTF-8 content works exactly as before - ✅ **Handles edge cases** with robust fallback mechanism ## 🧪 Test Scenarios The fix has been tested with: - Russian text ("пример") - Windows-1252 quotation marks (""test") - Latin-1 accented characters ("café") - Mixed encoding content - Invalid byte sequences (graceful fallback) ## 📋 Checklist - [X] Addresses the reported issue - [X] Includes comprehensive tests - [X] Maintains backward compatibility - [X] Follows project coding conventions - [X] No breaking changes --------- Co-authored-by: Josh McKinney <joshka@openai.com> |
||
|
|
fb9849e1e3 | migrating execpolicy -> execpolicy-legacy and execpolicy2 -> execpolicy (#6956) | ||
|
|
65c13f1ae7 |
execpolicy2 core integration (#6641)
This PR threads execpolicy2 into codex-core. activated via feature flag: exec_policy (on by default) reads and parses all .codexpolicy files in `codex_home/codex` refactored tool runtime API to integrate execpolicy logic --------- Co-authored-by: Michael Bolin <mbolin@openai.com> |
||
|
|
056c8f8279 |
fix: prepare ExecPolicy in exec-server for execpolicy2 cutover (#6888)
This PR introduces an extra layer of abstraction to prepare us for the migration to execpolicy2: - introduces a new trait, `EscalationPolicy`, whose `determine_action()` method is responsible for producing the `EscalateAction` - the existing `ExecPolicy` typedef is changed to return an intermediate `ExecPolicyOutcome` instead of `EscalateAction` - the default implementation of `EscalationPolicy`, `McpEscalationPolicy`, composes `ExecPolicy` - the `ExecPolicyOutcome` includes `codex_execpolicy2::Decision`, which has a `Prompt` variant - when `McpEscalationPolicy` gets `Decision::Prompt` back from `ExecPolicy`, it prompts the user via an MCP elicitation and maps the result into an `ElicitationAction` - now that the end user can reply to an elicitation with `Decline` or `Cancel`, we introduce a new variant, `EscalateAction::Deny`, which the client handles by returning exit code `1` without running anything Note the way the elicitation is created is still not quite right, but I will fix that once we have things running end-to-end for real in a follow-up PR. |
||
|
|
44c747837a |
chore(app-server) world-writable windows notification (#6880)
## Summary On app-server startup, detect whether the experimental sandbox is enabled, and send a notification . **Note** New conversations will not respect the feature because we [ignore cli overrides in NewConversation]( |
||
|
|
a75321a64c |
fix: add more fields to ThreadStartResponse and ThreadResumeResponse (#6847)
This adds the following fields to `ThreadStartResponse` and
`ThreadResumeResponse`:
```rust
pub model: String,
pub model_provider: String,
pub cwd: PathBuf,
pub approval_policy: AskForApproval,
pub sandbox: SandboxPolicy,
pub reasoning_effort: Option<ReasoningEffort>,
```
This is important because these fields are optional in
`ThreadStartParams` and `ThreadResumeParams`, so the caller needs to be
able to determine what values were ultimately used to start/resume the
conversation. (Though note that any of these could be changed later
between turns in the conversation.)
Though to get this information reliably, it must be read from the
internal `SessionConfiguredEvent` that is created in response to the
start of a conversation. Because `SessionConfiguredEvent` (as defined in
`codex-rs/protocol/src/protocol.rs`) did not have all of these fields, a
number of them had to be added as part of this PR.
Because `SessionConfiguredEvent` is referenced in many tests, test
instances of `SessionConfiguredEvent` had to be updated, as well, which
is why this PR touches so many files.
|
||
|
|
cf57320b9f |
windows sandbox: support multiple workspace roots (#6854)
The Windows sandbox did not previously support multiple workspace roots via config. Now it does |
||
|
|
c1391b9f94 | exec-server (#6630) | ||
|
|
f7a921039c |
[codex][otel] support mtls configuration (#6228)
fix for https://github.com/openai/codex/issues/6153 supports mTLS configuration and includes TLS features in the library build to enable secure HTTPS connections with custom root certificates. grpc: https://docs.rs/tonic/0.13.1/src/tonic/transport/channel/endpoint.rs.html#63 https: https://docs.rs/reqwest/0.12.23/src/reqwest/async_impl/client.rs.html#516 |