diff options
Diffstat (limited to 'misc/codex')
11 files changed, 50 insertions, 113 deletions
| diff --git a/misc/codex/Makefile b/misc/codex/Makefile index 67efac34c4ec..c7a58f77b187 100644 --- a/misc/codex/Makefile +++ b/misc/codex/Makefile @@ -1,6 +1,6 @@  PORTNAME=	codex  DISTVERSIONPREFIX=	rust-v -DISTVERSION=	0.47.0 +DISTVERSION=	0.50.0  CATEGORIES=	misc devel  MAINTAINER=	tagattie@FreeBSD.org @@ -12,7 +12,8 @@ LICENSE=	APACHE20  LICENSE_FILE=	${WRKSRC}/LICENSE  LIB_DEPENDS=	libonig.so:devel/oniguruma -RUN_DEPENDS=	rg:textproc/ripgrep +RUN_DEPENDS=	bash:shells/bash \ +		rg:textproc/ripgrep  TEST_DEPENDS=	bash:shells/bash  USES=		cargo python:test ssl @@ -46,9 +47,23 @@ post-patch:  		${BUILD_WRKSRC}/app-server/tests/suite/user_agent.rs  	@${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}&|' \  		${BUILD_WRKSRC}/core/src/environment_context.rs \ -		${BUILD_WRKSRC}/core/src/shell.rs +		${BUILD_WRKSRC}/core/src/shell.rs \ +		${BUILD_WRKSRC}/core/src/tools/handlers/unified_exec.rs \ +		${BUILD_WRKSRC}/core/src/tools/spec.rs \ +		${BUILD_WRKSRC}/core/src/unified_exec/mod.rs \ +		${BUILD_WRKSRC}/core/tests/suite/exec.rs \ +		${BUILD_WRKSRC}/core/tests/suite/shell_serialization.rs \ +		${BUILD_WRKSRC}/core/tests/suite/unified_exec.rs \ +		${BUILD_WRKSRC}/core/tests/suite/user_notification.rs \ +		${BUILD_WRKSRC}/tui/src/exec_command.rs  	@${REINPLACE_CMD} -e 's|python3|${PYTHON_VERSION}|' \ -		${BUILD_WRKSRC}/core/src/exec_command/session_manager.rs +		${BUILD_WRKSRC}/app-server/tests/suite/codex_message_processor_flow.rs \ +		${BUILD_WRKSRC}/core/src/command_safety/is_safe_command.rs \ +		${BUILD_WRKSRC}/core/tests/suite/approvals.rs \ +		${BUILD_WRKSRC}/core/tests/suite/seatbelt.rs \ +		${BUILD_WRKSRC}/core/tests/suite/unified_exec.rs \ +		${BUILD_WRKSRC}/exec/tests/suite/sandbox.rs \ +		${BUILD_WRKSRC}/mcp-server/tests/suite/codex_tool.rs  post-build-COMPLETIONS-on:  	@${MKDIR} ${WRKSRC}/completions diff --git a/misc/codex/Makefile.crates b/misc/codex/Makefile.crates index 6c902289f9ac..072e618bf09c 100644 --- a/misc/codex/Makefile.crates +++ b/misc/codex/Makefile.crates @@ -161,6 +161,7 @@ CARGO_CRATES=	Inflector-0.11.4 \  		event-listener-strategy-0.5.4 \  		eventsource-stream-0.2.3 \  		eyre-0.6.12 \ +		fancy-regex-0.13.0 \  		fastrand-2.3.0 \  		fax-0.2.6 \  		fax_derive-0.2.0 \ @@ -352,7 +353,6 @@ CARGO_CRATES=	Inflector-0.11.4 \  		parking_lot_core-0.9.11 \  		paste-1.0.15 \  		path-absolutize-3.1.1 \ -		path-clean-1.0.1 \  		path-dedot-3.1.1 \  		pathdiff-0.2.3 \  		percent-encoding-2.3.1 \ @@ -400,6 +400,7 @@ CARGO_CRATES=	Inflector-0.11.4 \  		rand_chacha-0.9.0 \  		rand_core-0.6.4 \  		rand_core-0.9.3 \ +		ratatui-macros-0.6.0 \  		redox_syscall-0.5.15 \  		redox_users-0.4.6 \  		redox_users-0.5.0 \ @@ -412,9 +413,10 @@ CARGO_CRATES=	Inflector-0.11.4 \  		regex-syntax-0.8.5 \  		reqwest-0.12.23 \  		ring-0.17.14 \ -		rmcp-0.8.1 \ -		rmcp-macros-0.8.1 \ +		rmcp-0.8.3 \ +		rmcp-macros-0.8.3 \  		rustc-demangle-0.1.25 \ +		rustc-hash-1.1.0 \  		rustc-hash-2.1.1 \  		rustc_version-0.4.1 \  		rustix-0.38.44 \ @@ -514,6 +516,8 @@ CARGO_CRATES=	Inflector-0.11.4 \  		termcolor-1.4.1 \  		terminal_size-0.4.2 \  		termtree-0.5.1 \ +		test-log-0.2.18 \ +		test-log-macros-0.2.18 \  		textwrap-0.11.0 \  		textwrap-0.16.2 \  		thiserror-1.0.69 \ @@ -522,6 +526,7 @@ CARGO_CRATES=	Inflector-0.11.4 \  		thiserror-impl-2.0.16 \  		thread_local-1.1.9 \  		tiff-0.10.3 \ +		tiktoken-rs-0.7.0 \  		time-0.3.44 \  		time-core-0.1.6 \  		time-macros-0.2.24 \ diff --git a/misc/codex/distinfo b/misc/codex/distinfo index baa3c1541419..dd77e8c0fbd3 100644 --- a/misc/codex/distinfo +++ b/misc/codex/distinfo @@ -1,4 +1,4 @@ -TIMESTAMP = 1761115794 +TIMESTAMP = 1761552021  SHA256 (rust/crates/Inflector-0.11.4.crate) = fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3  SIZE (rust/crates/Inflector-0.11.4.crate) = 17438  SHA256 (rust/crates/addr2line-0.24.2.crate) = dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1 @@ -325,6 +325,8 @@ SHA256 (rust/crates/eventsource-stream-0.2.3.crate) = 74fef4569247a5f429d9156b9d  SIZE (rust/crates/eventsource-stream-0.2.3.crate) = 15033  SHA256 (rust/crates/eyre-0.6.12.crate) = 7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec  SIZE (rust/crates/eyre-0.6.12.crate) = 45330 +SHA256 (rust/crates/fancy-regex-0.13.0.crate) = 531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2 +SIZE (rust/crates/fancy-regex-0.13.0.crate) = 85930  SHA256 (rust/crates/fastrand-2.3.0.crate) = 37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be  SIZE (rust/crates/fastrand-2.3.0.crate) = 15076  SHA256 (rust/crates/fax-0.2.6.crate) = f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab @@ -707,8 +709,6 @@ SHA256 (rust/crates/paste-1.0.15.crate) = 57c0d7b74b563b49d38dae00a0c37d4d6de9b4  SIZE (rust/crates/paste-1.0.15.crate) = 18374  SHA256 (rust/crates/path-absolutize-3.1.1.crate) = e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5  SIZE (rust/crates/path-absolutize-3.1.1.crate) = 6605 -SHA256 (rust/crates/path-clean-1.0.1.crate) = 17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef -SIZE (rust/crates/path-clean-1.0.1.crate) = 4514  SHA256 (rust/crates/path-dedot-3.1.1.crate) = 07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397  SIZE (rust/crates/path-dedot-3.1.1.crate) = 6596  SHA256 (rust/crates/pathdiff-0.2.3.crate) = df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3 @@ -803,6 +803,8 @@ SHA256 (rust/crates/rand_core-0.6.4.crate) = ec0be4795e2f6a28069bec0b5ff3e2ac9ba  SIZE (rust/crates/rand_core-0.6.4.crate) = 22666  SHA256 (rust/crates/rand_core-0.9.3.crate) = 99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38  SIZE (rust/crates/rand_core-0.9.3.crate) = 24543 +SHA256 (rust/crates/ratatui-macros-0.6.0.crate) = 6fef540f80dbe8a0773266fa6077788ceb65ef624cdbf36e131aaf90b4a52df4 +SIZE (rust/crates/ratatui-macros-0.6.0.crate) = 12164  SHA256 (rust/crates/redox_syscall-0.5.15.crate) = 7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec  SIZE (rust/crates/redox_syscall-0.5.15.crate) = 29646  SHA256 (rust/crates/redox_users-0.4.6.crate) = ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43 @@ -827,12 +829,14 @@ SHA256 (rust/crates/reqwest-0.12.23.crate) = d429f34c8092b2d42c7c93cec323bb4adeb  SIZE (rust/crates/reqwest-0.12.23.crate) = 161307  SHA256 (rust/crates/ring-0.17.14.crate) = a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7  SIZE (rust/crates/ring-0.17.14.crate) = 1502610 -SHA256 (rust/crates/rmcp-0.8.1.crate) = 6f35acda8f89fca5fd8c96cae3c6d5b4c38ea0072df4c8030915f3b5ff469c1c -SIZE (rust/crates/rmcp-0.8.1.crate) = 182748 -SHA256 (rust/crates/rmcp-macros-0.8.1.crate) = c9f1d5220aaa23b79c3d02e18f7a554403b3ccea544bbb6c69d6bcb3e854a274 -SIZE (rust/crates/rmcp-macros-0.8.1.crate) = 13328 +SHA256 (rust/crates/rmcp-0.8.3.crate) = 1fdad1258f7259fdc0f2dfc266939c82c3b5d1fd72bcde274d600cdc27e60243 +SIZE (rust/crates/rmcp-0.8.3.crate) = 195918 +SHA256 (rust/crates/rmcp-macros-0.8.3.crate) = ede0589a208cc7ce81d1be68aa7e74b917fcd03c81528408bab0457e187dcd9b +SIZE (rust/crates/rmcp-macros-0.8.3.crate) = 13419  SHA256 (rust/crates/rustc-demangle-0.1.25.crate) = 989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f  SIZE (rust/crates/rustc-demangle-0.1.25.crate) = 29590 +SHA256 (rust/crates/rustc-hash-1.1.0.crate) = 08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2 +SIZE (rust/crates/rustc-hash-1.1.0.crate) = 9331  SHA256 (rust/crates/rustc-hash-2.1.1.crate) = 357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d  SIZE (rust/crates/rustc-hash-2.1.1.crate) = 14154  SHA256 (rust/crates/rustc_version-0.4.1.crate) = cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92 @@ -1031,6 +1035,10 @@ SHA256 (rust/crates/terminal_size-0.4.2.crate) = 45c6481c4829e4cc63825e62c49186a  SIZE (rust/crates/terminal_size-0.4.2.crate) = 9976  SHA256 (rust/crates/termtree-0.5.1.crate) = 8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683  SIZE (rust/crates/termtree-0.5.1.crate) = 8498 +SHA256 (rust/crates/test-log-0.2.18.crate) = 1e33b98a582ea0be1168eba097538ee8dd4bbe0f2b01b22ac92ea30054e5be7b +SIZE (rust/crates/test-log-0.2.18.crate) = 16138 +SHA256 (rust/crates/test-log-macros-0.2.18.crate) = 451b374529930d7601b1eef8d32bc79ae870b6079b069401709c2a8bf9e75f36 +SIZE (rust/crates/test-log-macros-0.2.18.crate) = 8947  SHA256 (rust/crates/textwrap-0.11.0.crate) = d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060  SIZE (rust/crates/textwrap-0.11.0.crate) = 17322  SHA256 (rust/crates/textwrap-0.16.2.crate) = c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057 @@ -1047,6 +1055,8 @@ SHA256 (rust/crates/thread_local-1.1.9.crate) = f60246a4944f24f6e018aa17cdeffb78  SIZE (rust/crates/thread_local-1.1.9.crate) = 19315  SHA256 (rust/crates/tiff-0.10.3.crate) = af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f  SIZE (rust/crates/tiff-0.10.3.crate) = 1444592 +SHA256 (rust/crates/tiktoken-rs-0.7.0.crate) = 25563eeba904d770acf527e8b370fe9a5547bacd20ff84a0b6c3bc41288e5625 +SIZE (rust/crates/tiktoken-rs-0.7.0.crate) = 3792064  SHA256 (rust/crates/time-0.3.44.crate) = 91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d  SIZE (rust/crates/time-0.3.44.crate) = 143200  SHA256 (rust/crates/time-core-0.1.6.crate) = 40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b @@ -1385,5 +1395,5 @@ SHA256 (rust/crates/zvariant_utils-2.1.0.crate) = c51bcff7cc3dbb5055396bcf774748  SIZE (rust/crates/zvariant_utils-2.1.0.crate) = 7043  SHA256 (nornagon-ratatui-9b2ad1298408c45918ee9f8241a6f95498cdbed2_GH0.tar.gz) = b252c02145e5abbfc170466788bbeeb53a3365fcbc8a5621f28f79badd1f6a70  SIZE (nornagon-ratatui-9b2ad1298408c45918ee9f8241a6f95498cdbed2_GH0.tar.gz) = 566574 -SHA256 (openai-codex-rust-v0.47.0_GH0.tar.gz) = 72780e809e7b474bb7b355d79efc32a86f6b76fdb7ab833c99bc497b047bcbcc -SIZE (openai-codex-rust-v0.47.0_GH0.tar.gz) = 27730865 +SHA256 (openai-codex-rust-v0.50.0_GH0.tar.gz) = f8b51710a48f0ed2699321cc80f22ac5614c5fa8bc5a7b1f2d3e72d9a38004b3 +SIZE (openai-codex-rust-v0.50.0_GH0.tar.gz) = 27789282 diff --git a/misc/codex/files/patch-codex-rs_core_src_exec__command_exec__command__params.rs b/misc/codex/files/patch-codex-rs_core_src_exec__command_exec__command__params.rs deleted file mode 100644 index 60eb99d35251..000000000000 --- a/misc/codex/files/patch-codex-rs_core_src_exec__command_exec__command__params.rs +++ /dev/null @@ -1,11 +0,0 @@ ---- codex-rs/core/src/exec_command/exec_command_params.rs.orig	2025-09-27 09:00:51 UTC -+++ codex-rs/core/src/exec_command/exec_command_params.rs -@@ -33,7 +33,7 @@ fn default_shell() -> String { - } -  - fn default_shell() -> String { --    "/bin/bash".to_string() -+    "/bin/sh".to_string() - } -  - #[derive(Debug, Deserialize, Serialize)] diff --git a/misc/codex/files/patch-codex-rs_core_src_exec__command_responses__api.rs b/misc/codex/files/patch-codex-rs_core_src_exec__command_responses__api.rs deleted file mode 100644 index b900e89ad10f..000000000000 --- a/misc/codex/files/patch-codex-rs_core_src_exec__command_responses__api.rs +++ /dev/null @@ -1,11 +0,0 @@ ---- codex-rs/core/src/exec_command/responses_api.rs.orig	2025-09-27 09:01:29 UTC -+++ codex-rs/core/src/exec_command/responses_api.rs -@@ -29,7 +29,7 @@ pub fn create_exec_command_tool_for_responses_api() -> -     properties.insert( -         "shell".to_string(), -         JsonSchema::String { --            description: Some("The shell to use. Defaults to \"/bin/bash\".".to_string()), -+            description: Some("The shell to use. Defaults to \"/bin/sh\".".to_string()), -         }, -     ); -     properties.insert( diff --git a/misc/codex/files/patch-codex-rs_core_src_exec__command_session__manager.rs b/misc/codex/files/patch-codex-rs_core_src_exec__command_session__manager.rs deleted file mode 100644 index a5db5d4efccb..000000000000 --- a/misc/codex/files/patch-codex-rs_core_src_exec__command_session__manager.rs +++ /dev/null @@ -1,11 +0,0 @@ ---- codex-rs/core/src/exec_command/session_manager.rs.orig	2025-09-27 09:02:31 UTC -+++ codex-rs/core/src/exec_command/session_manager.rs -@@ -376,7 +376,7 @@ PY"# -             cmd, -             yield_time_ms: 3_000, -             max_output_tokens: 1_000, // large enough to avoid truncation here --            shell: "/bin/bash".to_string(), -+            shell: "/bin/sh".to_string(), -             login: false, -         }; -         let initial_output = match session_manager diff --git a/misc/codex/files/patch-codex-rs_core_src_unified__exec_mod.rs b/misc/codex/files/patch-codex-rs_core_src_unified__exec_mod.rs deleted file mode 100644 index 856c819c24be..000000000000 --- a/misc/codex/files/patch-codex-rs_core_src_unified__exec_mod.rs +++ /dev/null @@ -1,38 +0,0 @@ ---- codex-rs/core/src/unified_exec/mod.rs.orig	2025-10-17 16:46:07 UTC -+++ codex-rs/core/src/unified_exec/mod.rs -@@ -445,7 +445,7 @@ mod tests { -         let open_shell = manager -             .handle_request(UnifiedExecRequest { -                 session_id: None, --                input_chunks: &["bash".to_string(), "-i".to_string()], -+                input_chunks: &["sh".to_string(), "-i".to_string()], -                 timeout_ms: Some(2_500), -             }) -             .await?; -@@ -484,7 +484,7 @@ mod tests { -         let shell_a = manager -             .handle_request(UnifiedExecRequest { -                 session_id: None, --                input_chunks: &["/bin/bash".to_string(), "-i".to_string()], -+                input_chunks: &["/bin/sh".to_string(), "-i".to_string()], -                 timeout_ms: Some(2_500), -             }) -             .await?; -@@ -532,7 +532,7 @@ mod tests { -         let open_shell = manager -             .handle_request(UnifiedExecRequest { -                 session_id: None, --                input_chunks: &["bash".to_string(), "-i".to_string()], -+                input_chunks: &["sh".to_string(), "-i".to_string()], -                 timeout_ms: Some(2_500), -             }) -             .await?; -@@ -627,7 +627,7 @@ mod tests { -         let open_shell = manager -             .handle_request(UnifiedExecRequest { -                 session_id: None, --                input_chunks: &["/bin/bash".to_string(), "-i".to_string()], -+                input_chunks: &["/bin/sh".to_string(), "-i".to_string()], -                 timeout_ms: Some(2_500), -             }) -             .await?; diff --git a/misc/codex/files/patch-codex-rs_core_tests_suite_exec.rs b/misc/codex/files/patch-codex-rs_core_tests_suite_exec.rs deleted file mode 100644 index 3b232ec4c752..000000000000 --- a/misc/codex/files/patch-codex-rs_core_tests_suite_exec.rs +++ /dev/null @@ -1,11 +0,0 @@ ---- codex-rs/core/tests/suite/exec.rs.orig	2025-09-27 09:06:53 UTC -+++ codex-rs/core/tests/suite/exec.rs -@@ -104,7 +104,7 @@ async fn exit_command_not_found_is_ok() { -     } -  -     let tmp = TempDir::new().expect("should be able to create temp dir"); --    let cmd = vec!["/bin/bash", "-c", "nonexistent_command_12345"]; -+    let cmd = vec!["/bin/sh", "-c", "nonexistent_command_12345"]; -     run_test_cmd(tmp, cmd).await.unwrap(); - } -  diff --git a/misc/codex/files/patch-codex-rs_core_tests_suite_shell__serialization.rs b/misc/codex/files/patch-codex-rs_core_tests_suite_shell__serialization.rs index ee411c9b105a..37f66dd7d506 100644 --- a/misc/codex/files/patch-codex-rs_core_tests_suite_shell__serialization.rs +++ b/misc/codex/files/patch-codex-rs_core_tests_suite_shell__serialization.rs @@ -1,11 +1,11 @@ ---- codex-rs/core/tests/suite/shell_serialization.rs.orig	2025-10-22 07:09:30 UTC +--- codex-rs/core/tests/suite/shell_serialization.rs.orig	2025-10-25 21:16:34 UTC  +++ codex-rs/core/tests/suite/shell_serialization.rs  @@ -238,6 +238,9 @@ async fn shell_output_for_freeform_tool_records_durati       #[cfg(target_os = "linux")]       let sleep_cmd = vec!["/bin/bash", "-c", "sleep 1"];  +    #[cfg(target_os = "freebsd")] -+    let sleep_cmd = vec!["/bin/sh", "-c", "sleep 1"]; ++    let sleep_cmd = vec!["/bin/bash", "-c", "sleep 1"];  +       #[cfg(target_os = "macos")]       let sleep_cmd = vec!["/bin/bash", "-c", "sleep 1"]; diff --git a/misc/codex/files/patch-codex-rs_core_tests_suite_user__notification.rs b/misc/codex/files/patch-codex-rs_core_tests_suite_user__notification.rs deleted file mode 100644 index 85e58a77a1ae..000000000000 --- a/misc/codex/files/patch-codex-rs_core_tests_suite_user__notification.rs +++ /dev/null @@ -1,11 +0,0 @@ ---- codex-rs/core/tests/suite/user_notification.rs.orig	2025-09-27 09:08:21 UTC -+++ codex-rs/core/tests/suite/user_notification.rs -@@ -35,7 +35,7 @@ async fn summarize_context_three_requests_and_instruct -     let notify_script = notify_dir.path().join("notify.sh"); -     std::fs::write( -         ¬ify_script, --        r#"#!/bin/bash -+        r#"#!/bin/sh - set -e - echo -n "${@: -1}" > $(dirname "${0}")/notify.txt"#, -     )?; diff --git a/misc/codex/files/patch-codex-rs_exec_tests_suite_mod.rs b/misc/codex/files/patch-codex-rs_exec_tests_suite_mod.rs index 6df93e3c6d1a..dc82a744793b 100644 --- a/misc/codex/files/patch-codex-rs_exec_tests_suite_mod.rs +++ b/misc/codex/files/patch-codex-rs_exec_tests_suite_mod.rs @@ -1,6 +1,6 @@ ---- codex-rs/exec/tests/suite/mod.rs.orig	2025-10-17 16:46:07 UTC +--- codex-rs/exec/tests/suite/mod.rs.orig	2025-10-25 21:16:34 UTC  +++ codex-rs/exec/tests/suite/mod.rs -@@ -5,5 +5,6 @@ mod resume; +@@ -4,5 +4,6 @@ mod resume;   mod originator;   mod output_schema;   mod resume; | 
