Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Migrate the Windows MXC sandbox to `mxc-sdk` (#55378)

johnl-oaic6e29b4fcb1f
diff --git a/MODULE.bazel b/MODULE.bazel
index 10f68a19bd..ad544f5e42 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -508,23 +508,24 @@ crate.annotation(
workspace_cargo_toml = "rust/runfiles/Cargo.toml",
)
-# MXC keeps its Rust workspace below the repository root.
-[
- crate.annotation(
- crate = name,
- workspace_cargo_toml = "src/Cargo.toml",
- )
- for name in [
- "appcontainer_common",
- "learning_mode_core",
- "learning_mode_windows",
- "mxc_config_contract",
- "mxc_telemetry",
- "process_security_environment_spec",
- "sandbox_spec",
- "wxc_common",
- ]
-]
+# MXC's resource compiler lookup needs an explicit path for Windows GNU targets.
+crate.annotation(
+ build_script_deps = [
+ "@crates//:cc-1.2.55",
+ "@crates//:winresource-0.1.34",
+ ],
+ build_script_env = {
+ "RC_PATH": "$(execpath @llvm//tools:llvm-rc)",
+ },
+ build_script_tools = [
+ "@llvm//tools:clang",
+ "@llvm//tools:llvm-rc",
+ ],
+ crate = "mxc-sdk",
+ patch_args = ["-p1"],
+ patches = ["//patches:mxc-sdk_utf8_resources.patch"],
+ workspace_cargo_toml = "src/Cargo.toml",
+)
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
index 694a3930d3..5300b53707 100644
--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -1386,14 +1386,7 @@
"git+https://github.com/helix-editor/nucleo.git?rev=4253de9faabb4e5c6d81d946a5e35a90f87347ee#4253de9faabb4e5c6d81d946a5e35a90f87347ee_nucleo-matcher": "{\"dependencies\":[{\"name\":\"memchr\",\"req\":\"2.5.0\"},{\"default_features\":true,\"features\":[],\"name\":\"unicode-segmentation\",\"optional\":true,\"req\":\"1.10\"}],\"features\":{\"default\":[\"unicode-normalization\",\"unicode-casefold\",\"unicode-segmentation\"],\"unicode-casefold\":[],\"unicode-normalization\":[],\"unicode-segmentation\":[\"dep:unicode-segmentation\"]},\"strip_prefix\":\"matcher\"}",
"git+https://github.com/hyperium/h3?rev=e07e69412876f7e26f026bd75a48b2704d8c8283#e07e69412876f7e26f026bd75a48b2704d8c8283_h3": "{\"dependencies\":[{\"name\":\"bytes\",\"req\":\"1\"},{\"name\":\"fastrand\",\"req\":\"2.0.1\"},{\"default_features\":false,\"features\":[\"io\"],\"name\":\"futures-util\",\"optional\":false,\"req\":\"0.3\"},{\"name\":\"http\",\"req\":\"1\"},{\"default_features\":false,\"features\":[],\"name\":\"pin-project-lite\",\"optional\":false,\"req\":\"0.2\"},{\"default_features\":true,\"features\":[\"sync\"],\"name\":\"tokio\",\"optional\":false,\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"tracing\",\"optional\":true,\"req\":\"0.1.40\"}],\"features\":{\"i-implement-a-third-party-backend-and-opt-into-breaking-changes\":[],\"tracing\":[\"dep:tracing\"]},\"strip_prefix\":\"h3\"}",
"git+https://github.com/hyperium/h3?rev=e07e69412876f7e26f026bd75a48b2704d8c8283#e07e69412876f7e26f026bd75a48b2704d8c8283_h3-quinn": "{\"dependencies\":[{\"name\":\"bytes\",\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"futures\",\"optional\":false,\"req\":\"0.3.28\"},{\"default_features\":true,\"features\":[],\"name\":\"h3\",\"optional\":false,\"req\":\"0.0.8\"},{\"default_features\":true,\"features\":[],\"name\":\"h3-datagram\",\"optional\":true,\"req\":\"0.0.2\"},{\"default_features\":false,\"features\":[\"futures-io\"],\"name\":\"quinn\",\"optional\":false,\"req\":\"0.11.7\"},{\"default_features\":false,\"features\":[\"io-util\"],\"name\":\"tokio\",\"optional\":false,\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"tokio-util\",\"optional\":false,\"req\":\"0.7.9\"},{\"default_features\":true,\"features\":[],\"name\":\"tracing\",\"optional\":true,\"req\":\"0.1.40\"}],\"features\":{\"datagram\":[\"dep:h3-datagram\"],\"tracing\":[\"dep:tracing\"]},\"strip_prefix\":\"h3-quinn\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_appcontainer_common": "{\"dependencies\":[{\"name\":\"getrandom\",\"req\":\"0.2\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":false,\"req\":\"1\"},{\"name\":\"serde_json\",\"req\":\"1\"},{\"name\":\"thiserror\",\"req\":\"2\"},{\"default_features\":true,\"features\":[],\"name\":\"wxc_common\",\"optional\":false},{\"name\":\"flatbuffers\",\"req\":\"25\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"learning_mode_core\",\"optional\":false,\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"learning_mode_windows\",\"optional\":false,\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"process_security_environment_spec\",\"optional\":false,\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"sandbox_spec\",\"optional\":false,\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"widestring\",\"req\":\"1\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_NetworkManagement_WindowsFirewall\",\"Win32_Security\",\"Win32_Security_Authorization\",\"Win32_Security_Credentials\",\"Win32_Security_Isolation\",\"Win32_Storage_FileSystem\",\"Win32_System_Com\",\"Win32_System_Console\",\"Win32_System_Diagnostics_Debug\",\"Win32_System_Diagnostics_Etw\",\"Win32_System_Diagnostics_ToolHelp\",\"Win32_System_Environment\",\"Win32_System_IO\",\"Win32_System_JobObjects\",\"Win32_System_LibraryLoader\",\"Win32_System_Memory\",\"Win32_System_Ole\",\"Win32_System_Pipes\",\"Win32_System_ProcessStatus\",\"Win32_System_Registry\",\"Win32_System_SystemInformation\",\"Win32_System_SystemServices\",\"Win32_System_Threading\",\"Win32_System_Time\",\"Win32_System_Variant\",\"Win32_System_WindowsProgramming\",\"Win32_UI_Shell\"],\"name\":\"windows\",\"optional\":false,\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"windows-core\",\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"winreg\",\"req\":\"0.55\",\"target\":\"cfg(target_os = \\\"windows\\\")\"}],\"features\":{\"tier2_bfs\":[]},\"strip_prefix\":\"backends/appcontainer/common\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_learning_mode_core": "{\"dependencies\":[{\"name\":\"same-file\",\"req\":\"1\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":false,\"req\":\"1\"},{\"name\":\"serde_json\",\"req\":\"1\"},{\"name\":\"sha2\",\"req\":\"0.10\"},{\"name\":\"tempfile\",\"req\":\"3\"},{\"name\":\"thiserror\",\"req\":\"2\"}],\"features\":{},\"strip_prefix\":\"core/learning_mode_core\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_learning_mode_windows": "{\"dependencies\":[{\"default_features\":true,\"features\":[],\"name\":\"learning_mode_core\",\"optional\":false},{\"name\":\"thiserror\",\"req\":\"2\"},{\"name\":\"sha2\",\"req\":\"0.10\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_NetworkManagement_WindowsFirewall\",\"Win32_Security\",\"Win32_Security_Authorization\",\"Win32_Security_Credentials\",\"Win32_Security_Isolation\",\"Win32_Storage_FileSystem\",\"Win32_System_Com\",\"Win32_System_Console\",\"Win32_System_Diagnostics_Debug\",\"Win32_System_Diagnostics_Etw\",\"Win32_System_Diagnostics_ToolHelp\",\"Win32_System_Environment\",\"Win32_System_IO\",\"Win32_System_JobObjects\",\"Win32_System_LibraryLoader\",\"Win32_System_Memory\",\"Win32_System_Ole\",\"Win32_System_Pipes\",\"Win32_System_ProcessStatus\",\"Win32_System_Registry\",\"Win32_System_SystemInformation\",\"Win32_System_SystemServices\",\"Win32_System_Threading\",\"Win32_System_Time\",\"Win32_System_Variant\",\"Win32_System_WindowsProgramming\",\"Win32_UI_Shell\"],\"name\":\"windows\",\"optional\":false,\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"windows-core\",\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"wxc_common\",\"optional\":false,\"target\":\"cfg(target_os = \\\"windows\\\")\"}],\"features\":{},\"strip_prefix\":\"backends/learning_mode/windows\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_mxc_config_contract": "{\"dependencies\":[{\"name\":\"schemars\",\"optional\":true,\"req\":\"0.8\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":false,\"req\":\"1\"},{\"name\":\"serde_json\",\"req\":\"1\"},{\"name\":\"thiserror\",\"req\":\"2\"}],\"features\":{\"schema-gen\":[\"dep:schemars\"]},\"strip_prefix\":\"core/mxc_config_contract\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_mxc_telemetry": "{\"dependencies\":[{\"default_features\":true,\"features\":[\"v4\"],\"kind\":\"build\",\"name\":\"uuid\",\"optional\":false,\"req\":\"1\"},{\"name\":\"tracelogging\",\"req\":\"1.2\",\"target\":\"cfg(windows)\"}],\"features\":{},\"strip_prefix\":\"mxc_telemetry\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_process_security_environment_spec": "{\"dependencies\":[{\"name\":\"flatbuffers\",\"req\":\"25\"}],\"features\":{},\"strip_prefix\":\"core/generated/process_security_environment_specification\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_sandbox_spec": "{\"dependencies\":[{\"name\":\"flatbuffers\",\"req\":\"25\"}],\"features\":{},\"strip_prefix\":\"core/generated/base_container_specification\"}",
- "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4_wxc_common": "{\"dependencies\":[{\"name\":\"base64\",\"req\":\"0.22\"},{\"name\":\"cidr\",\"req\":\"0.3.2\"},{\"name\":\"getrandom\",\"req\":\"0.2\"},{\"default_features\":true,\"features\":[],\"name\":\"mxc_config_contract\",\"optional\":false},{\"default_features\":true,\"features\":[],\"name\":\"mxc_schema_support\",\"optional\":true},{\"default_features\":true,\"features\":[],\"name\":\"mxc_telemetry\",\"optional\":false},{\"default_features\":true,\"features\":[],\"name\":\"nanvix_common\",\"optional\":true},{\"name\":\"schemars\",\"optional\":true,\"req\":\"0.8\"},{\"name\":\"semver\",\"req\":\"1\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":false,\"req\":\"1\"},{\"features\":[\"raw_value\"],\"name\":\"serde_json\",\"req\":\"1\"},{\"name\":\"serde_path_to_error\",\"req\":\"0.1\"},{\"name\":\"thiserror\",\"req\":\"2\"},{\"name\":\"unicode-general-category\",\"req\":\"1\"},{\"name\":\"url\",\"req\":\"2\"},{\"default_features\":true,\"features\":[\"v4\"],\"name\":\"uuid\",\"optional\":true,\"req\":\"1\"},{\"name\":\"widestring\",\"req\":\"1\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[\"Win32_Foundation\",\"Win32_Globalization\",\"Win32_NetworkManagement_WindowsFirewall\",\"Win32_Networking_WinSock\",\"Win32_Security\",\"Win32_Security_Authorization\",\"Win32_Security_Credentials\",\"Win32_Security_Isolation\",\"Win32_Storage_FileSystem\",\"Win32_System_Com\",\"Win32_System_Console\",\"Win32_System_Diagnostics_Debug\",\"Win32_System_Diagnostics_Etw\",\"Win32_System_Diagnostics_ToolHelp\",\"Win32_System_Environment\",\"Win32_System_IO\",\"Win32_System_JobObjects\",\"Win32_System_LibraryLoader\",\"Win32_System_Memory\",\"Win32_System_Ole\",\"Win32_System_Pipes\",\"Win32_System_ProcessStatus\",\"Win32_System_Registry\",\"Win32_System_SystemInformation\",\"Win32_System_SystemServices\",\"Win32_System_Threading\",\"Win32_System_Time\",\"Win32_System_Variant\",\"Win32_System_WindowsProgramming\",\"Win32_UI_Shell\"],\"name\":\"windows\",\"optional\":false,\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"windows-core\",\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"winreg\",\"req\":\"0.55\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"libc\",\"req\":\"0.2\",\"target\":\"cfg(unix)\"}],\"features\":{\"microvm\":[\"dep:nanvix_common\",\"dep:uuid\"],\"schema-gen\":[\"dep:mxc_schema_support\",\"dep:schemars\"]},\"strip_prefix\":\"core/wxc_common\"}",
+ "git+https://github.com/microsoft/mxc?rev=b21120168d70befe12356411423266bfef168446#b21120168d70befe12356411423266bfef168446_mxc-sdk": "{\"dependencies\":[{\"name\":\"anyhow\",\"req\":\"1\"},{\"name\":\"base64\",\"req\":\"0.22\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":false,\"req\":\"0.4\"},{\"name\":\"cidr\",\"req\":\"0.3.2\"},{\"name\":\"flatbuffers\",\"req\":\"25\"},{\"name\":\"getrandom\",\"req\":\"0.2\"},{\"name\":\"libc\",\"req\":\"0.2\"},{\"default_features\":true,\"features\":[],\"name\":\"libloading\",\"optional\":true,\"req\":\"0.8\"},{\"default_features\":true,\"features\":[\"fs\",\"mount\",\"sched\",\"signal\",\"net\",\"process\",\"user\",\"term\"],\"name\":\"nix\",\"optional\":false,\"req\":\"0.29\"},{\"name\":\"same-file\",\"req\":\"1\"},{\"name\":\"schemars\",\"optional\":true,\"req\":\"0.8\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":false,\"req\":\"1\"},{\"default_features\":true,\"features\":[\"raw_value\"],\"name\":\"serde_json\",\"optional\":false,\"req\":\"1\"},{\"name\":\"serde_path_to_error\",\"req\":\"0.1\"},{\"name\":\"sha2\",\"req\":\"0.11\"},{\"default_features\":true,\"features\":[],\"name\":\"tar\",\"optional\":true,\"req\":\"0.4\"},{\"name\":\"tempfile\",\"req\":\"3\"},{\"name\":\"thiserror\",\"req\":\"2\"},{\"default_features\":true,\"features\":[\"full\"],\"name\":\"tokio\",\"optional\":false,\"req\":\"1\"},{\"name\":\"unicode-general-category\",\"req\":\"1\"},{\"name\":\"url\",\"req\":\"2\"},{\"default_features\":true,\"features\":[\"v4\"],\"name\":\"uuid\",\"optional\":false,\"req\":\"1\"},{\"name\":\"widestring\",\"req\":\"1\"},{\"kind\":\"build\",\"name\":\"semver\",\"req\":\"1\"},{\"default_features\":true,\"features\":[\"derive\"],\"kind\":\"build\",\"name\":\"serde\",\"optional\":false,\"req\":\"1\"},{\"default_features\":true,\"features\":[\"raw_value\"],\"kind\":\"build\",\"name\":\"serde_json\",\"optional\":false,\"req\":\"1\"},{\"kind\":\"build\",\"name\":\"sha2\",\"req\":\"0.11\"},{\"default_features\":true,\"features\":[\"v4\"],\"kind\":\"build\",\"name\":\"uuid\",\"optional\":false,\"req\":\"1\"},{\"default_features\":false,\"features\":[\"deflate\"],\"kind\":\"build\",\"name\":\"zip\",\"optional\":true,\"req\":\"2\"},{\"default_features\":true,\"features\":[],\"name\":\"flate2\",\"optional\":true,\"req\":\"1\",\"target\":\"cfg(target_arch = \\\"x86_64\\\")\"},{\"default_features\":false,\"features\":[],\"name\":\"hyperlight-unikraft\",\"optional\":true,\"req\":\"=0.17.0\",\"target\":\"cfg(target_arch = \\\"x86_64\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"ureq\",\"optional\":true,\"req\":\"3\",\"target\":\"cfg(target_arch = \\\"x86_64\\\")\"},{\"name\":\"tracelogging\",\"req\":\"1.2\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[\"Foundation\",\"UI\",\"Win32_Foundation\",\"Win32_Globalization\",\"Win32_NetworkManagement_WindowsFirewall\",\"Win32_Networking_WinSock\",\"Win32_Security\",\"Win32_Security_Authorization\",\"Win32_Security_Credentials\",\"Win32_Security_Cryptography\",\"Win32_Security_Isolation\",\"Win32_Security_WinTrust\",\"Win32_Storage_FileSystem\",\"Win32_System_Com\",\"Win32_System_Console\",\"Win32_System_Diagnostics_Debug\",\"Win32_System_Diagnostics_Etw\",\"Win32_System_Diagnostics_ToolHelp\",\"Win32_System_Environment\",\"Win32_System_EventLog\",\"Win32_System_IO\",\"Win32_System_JobObjects\",\"Win32_System_LibraryLoader\",\"Win32_System_Memory\",\"Win32_System_Ole\",\"Win32_System_Pipes\",\"Win32_System_ProcessStatus\",\"Win32_System_Registry\",\"Win32_System_SystemInformation\",\"Win32_System_SystemServices\",\"Win32_System_Threading\",\"Win32_System_Time\",\"Win32_System_Variant\",\"Win32_System_WindowsProgramming\",\"Win32_UI_Shell\"],\"name\":\"windows\",\"optional\":false,\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"windows-collections\",\"optional\":true,\"req\":\"0.3\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"windows-core\",\"req\":\"0.62\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":true,\"features\":[],\"name\":\"windows-future\",\"optional\":true,\"req\":\"0.3\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"name\":\"winreg\",\"req\":\"0.55\",\"target\":\"cfg(target_os = \\\"windows\\\")\"}],\"features\":{\"default\":[],\"force-tier-testing\":[],\"hyperlight\":[\"dep:hyperlight-unikraft\",\"dep:ureq\",\"dep:flate2\",\"dep:tar\"],\"isolation_session\":[\"dep:windows-collections\",\"dep:windows-future\"],\"link-wslcsdk\":[\"dep:zip\"],\"microvm\":[],\"schema-gen\":[\"dep:schemars\"],\"test-support\":[],\"tier2_bfs\":[],\"wslc\":[\"link-wslcsdk\",\"dep:libloading\",\"dep:tar\"]},\"strip_prefix\":\"mxc-sdk\"}",
"git+https://github.com/modelcontextprotocol/rust-sdk?rev=98a54789b80110ad210495c4ad845c89e1980471#98a54789b80110ad210495c4ad845c89e1980471_rmcp": "{\"dependencies\":[{\"default_features\":true,\"features\":[],\"name\":\"async-trait\",\"optional\":true,\"req\":\"0.1.89\"},{\"default_features\":true,\"features\":[],\"name\":\"base64\",\"optional\":true,\"req\":\"0.23\"},{\"default_features\":true,\"features\":[],\"name\":\"bytes\",\"optional\":true,\"req\":\"1\"},{\"name\":\"futures\",\"req\":\"0.3\"},{\"default_features\":true,\"features\":[],\"name\":\"hmac\",\"optional\":true,\"req\":\"0.13\"},{\"default_features\":true,\"features\":[],\"name\":\"http\",\"optional\":true,\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"http-body\",\"optional\":true,\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"http-body-util\",\"optional\":true,\"req\":\"0.1\"},{\"default_features\":true,\"features\":[\"client\",\"http1\"],\"name\":\"hyper\",\"optional\":true,\"req\":\"1\"},{\"default_features\":true,\"features\":[\"tokio\"],\"name\":\"hyper-util\",\"optional\":true,\"req\":\"0.1\"},{\"default_features\":true,\"features\":[\"serde\"],\"name\":\"indexmap\",\"optional\":false,\"req\":\"2\"},{\"default_features\":true,\"features\":[\"aws_lc_rs\"],\"name\":\"jsonwebtoken\",\"optional\":true,\"req\":\"11\"},{\"default_features\":false,\"features\":[],\"name\":\"oauth2\",\"optional\":true,\"req\":\"5.0\"},{\"default_features\":true,\"features\":[],\"name\":\"pastey\",\"optional\":true,\"req\":\"0.2.0\"},{\"name\":\"pin-project-lite\",\"req\":\"0.2\"},{\"default_features\":true,\"features\":[\"tokio1\"],\"name\":\"process-wrap\",\"optional\":true,\"req\":\"10.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rand\",\"optional\":true,\"req\":\"0.10\"},{\"default_features\":false,\"features\":[\"json\",\"stream\"],\"name\":\"reqwest\",\"optional\":true,\"req\":\"0.13.2\"},{\"default_features\":true,\"features\":[],\"name\":\"rmcp-macros\",\"optional\":true,\"req\":\"3.5.1\"},{\"default_features\":true,\"features\":[\"chrono04\"],\"name\":\"schemars\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":true,\"features\":[\"derive\",\"rc\"],\"name\":\"serde\",\"optional\":false,\"req\":\"1.0\"},{\"name\":\"serde_json\",\"req\":\"1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"sha2\",\"optional\":true,\"req\":\"0.11\"},{\"default_features\":true,\"features\":[],\"name\":\"sse-stream\",\"optional\":true,\"req\":\"0.2.4\"},{\"name\":\"thiserror\",\"req\":\"2\"},{\"default_features\":true,\"features\":[\"sync\",\"macros\",\"rt\",\"time\"],\"name\":\"tokio\",\"optional\":false,\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"tokio-stream\",\"optional\":true,\"req\":\"0.1\"},{\"default_features\":true,\"features\":[],\"name\":\"tokio-util\",\"optional\":false,\"req\":\"0.7\"},{\"default_features\":true,\"features\":[],\"name\":\"tower-service\",\"optional\":true,\"req\":\"0.3\"},{\"default_features\":true,\"features\":[],\"name\":\"tracing\",\"optional\":false,\"req\":\"0.1\"},{\"default_features\":true,\"features\":[],\"name\":\"url\",\"optional\":true,\"req\":\"2.4\"},{\"default_features\":true,\"features\":[\"v4\"],\"name\":\"uuid\",\"optional\":true,\"req\":\"1\"},{\"default_features\":true,\"features\":[],\"name\":\"which\",\"optional\":true,\"req\":\"8\"},{\"default_features\":true,\"features\":[],\"name\":\"zeroize\",\"optional\":true,\"req\":\"1\"},{\"default_features\":false,\"features\":[\"serde\",\"clock\",\"std\",\"oldtime\"],\"name\":\"chrono\",\"optional\":false,\"req\":\"0.4.38\",\"target\":\"cfg(all(target_family = \\\"wasm\\\", target_os = \\\"unknown\\\"))\"},{\"default_features\":false,\"features\":[\"serde\",\"now\"],\"name\":\"chrono\",\"optional\":false,\"req\":\"0.4.38\",\"target\":\"cfg(not(all(target_family = \\\"wasm\\\", target_os = \\\"unknown\\\")))\"},{\"name\":\"libc\",\"req\":\"0.2\",\"target\":\"cfg(target_os = \\\"linux\\\")\"}],\"features\":{\"__reqwest\":[\"dep:reqwest\"],\"auth\":[\"dep:async-trait\",\"dep:oauth2\",\"__reqwest\",\"dep:url\"],\"auth-client-credentials-jwt\":[\"auth\",\"dep:jsonwebtoken\",\"uuid\"],\"auth-enterprise-managed\":[\"auth\",\"base64\"],\"client\":[\"dep:tokio-stream\"],\"client-side-sse\":[\"dep:sse-stream\",\"dep:http\",\"dep:bytes\",\"base64\"],\"default\":[\"base64\",\"macros\",\"server\"],\"elicitation\":[\"dep:url\"],\"local\":[\"rmcp-macros?/local\"],\"macros\":[\"dep:rmcp-macros\",\"dep:pastey\"],\"request-state\":[\"dep:hmac\",\"dep:sha2\",\"dep:zeroize\",\"base64\"],\"reqwest\":[\"__reqwest\",\"reqwest?/rustls\"],\"reqwest-native-tls\":[\"__reqwest\",\"reqwest?/native-tls\"],\"reqwest-tls-no-provider\":[\"__reqwest\",\"reqwest?/rustls-no-provider\"],\"schemars\":[\"dep:schemars\"],\"server\":[\"transport-async-rw\",\"schemars\",\"dep:pastey\",\"uuid\"],\"server-side-http\":[\"uuid\",\"dep:rand\",\"dep:tokio-stream\",\"dep:http\",\"dep:http-body\",\"dep:http-body-util\",\"dep:bytes\",\"dep:sse-stream\",\"tower\",\"base64\"],\"tower\":[\"dep:tower-service\"],\"transport-async-rw\":[\"tokio/io-util\",\"tokio-util/codec\"],\"transport-child-process\":[\"transport-async-rw\",\"tokio/process\",\"dep:process-wrap\"],\"transport-io\":[\"transport-async-rw\",\"tokio/io-std\",\"tokio/net\"],\"transport-streamable-http-client\":[\"client-side-sse\",\"transport-worker\"],\"transport-streamable-http-client-reqwest\":[\"transport-streamable-http-client\",\"__reqwest\"],\"transport-streamable-http-client-unix-socket\":[\"transport-streamable-http-client\",\"dep:hyper\",\"dep:hyper-util\",\"dep:http-body-util\",\"dep:http\",\"dep:bytes\",\"tokio/net\"],\"transport-streamable-http-server\":[\"transport-streamable-http-server-session\",\"server-side-http\",\"transport-worker\"],\"transport-streamable-http-server-session\":[\"transport-async-rw\",\"dep:async-trait\",\"dep:tokio-stream\"],\"transport-worker\":[\"dep:tokio-stream\"],\"which-command\":[\"transport-child-process\",\"dep:which\"]},\"strip_prefix\":\"./crates/rmcp\"}",
"git+https://github.com/modelcontextprotocol/rust-sdk?rev=98a54789b80110ad210495c4ad845c89e1980471#98a54789b80110ad210495c4ad845c89e1980471_rmcp-macros": "{\"dependencies\":[{\"default_features\":true,\"features\":[],\"name\":\"darling\",\"optional\":false,\"req\":\"0.24\"},{\"name\":\"proc-macro2\",\"req\":\"1\"},{\"name\":\"quote\",\"req\":\"1\"},{\"name\":\"serde_json\",\"req\":\"1.0\"},{\"default_features\":true,\"features\":[\"full\"],\"name\":\"syn\",\"optional\":false,\"req\":\"3\"}],\"features\":{\"local\":[]},\"strip_prefix\":\"./crates/rmcp-macros\"}",
"git+https://github.com/openai-oss-forks/crossterm?rev=ed1cdab335221515706178d68495bba2aed1924f#ed1cdab335221515706178d68495bba2aed1924f_crossterm": "{\"dependencies\":[{\"default_features\":true,\"features\":[],\"name\":\"base64\",\"optional\":true,\"req\":\"0.23\"},{\"default_features\":true,\"features\":[],\"name\":\"bitflags\",\"optional\":false,\"req\":\"2.9\"},{\"default_features\":true,\"features\":[\"is_variant\"],\"name\":\"derive_more\",\"optional\":true,\"req\":\"2.0.0\"},{\"default_features\":true,\"features\":[],\"name\":\"document-features\",\"optional\":true,\"req\":\"0.2.11\"},{\"default_features\":false,\"features\":[],\"name\":\"futures-core\",\"optional\":true,\"req\":\"0.3.31\"},{\"name\":\"parking_lot\",\"req\":\"0.12.1\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"1.0.103\"},{\"default_features\":true,\"features\":[],\"name\":\"filedescriptor\",\"optional\":true,\"req\":\"0.8\",\"target\":\"cfg(unix)\"},{\"default_features\":false,\"features\":[],\"name\":\"libc\",\"optional\":true,\"req\":\"0.2.168\",\"target\":\"cfg(unix)\"},{\"default_features\":true,\"features\":[\"os-poll\"],\"name\":\"mio\",\"optional\":true,\"req\":\"1.0.1\",\"target\":\"cfg(unix)\"},{\"default_features\":false,\"features\":[\"std\",\"stdio\",\"termios\"],\"name\":\"rustix\",\"optional\":false,\"req\":\"1\",\"target\":\"cfg(unix)\"},{\"default_features\":true,\"features\":[],\"name\":\"signal-hook\",\"optional\":true,\"req\":\"0.3.17\",\"target\":\"cfg(unix)\"},{\"default_features\":true,\"features\":[\"support-v1_0\"],\"name\":\"signal-hook-mio\",\"optional\":true,\"req\":\"0.2.4\",\"target\":\"cfg(unix)\"},{\"default_features\":true,\"features\":[],\"name\":\"crossterm_winapi\",\"optional\":true,\"req\":\"0.9.1\",\"target\":\"cfg(windows)\"},{\"default_features\":true,\"features\":[\"winuser\",\"winerror\"],\"name\":\"winapi\",\"optional\":true,\"req\":\"0.3.9\",\"target\":\"cfg(windows)\"}],\"features\":{\"bracketed-paste\":[],\"default\":[\"bracketed-paste\",\"derive-more\",\"events\",\"windows\"],\"derive-more\":[\"dep:derive_more\"],\"document-features\":[\"dep:document-features\"],\"event-stream\":[\"dep:futures-core\",\"events\"],\"events\":[\"dep:mio\",\"dep:signal-hook\",\"dep:signal-hook-mio\"],\"osc52\":[\"dep:base64\"],\"serde\":[\"dep:serde\",\"bitflags/serde\"],\"use-dev-tty\":[\"filedescriptor\",\"rustix/process\"],\"windows\":[\"dep:winapi\",\"dep:crossterm_winapi\"]},\"strip_prefix\":\"\"}",
@@ -2365,6 +2358,7 @@
"winreg_0.10.1": "{\"dependencies\":[{\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.6\"},{\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.3\"},{\"name\":\"serde\",\"optional\":true,\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_derive\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"~3.0\"},{\"features\":[\"impl-default\",\"impl-debug\",\"minwindef\",\"minwinbase\",\"timezoneapi\",\"winerror\",\"winnt\",\"winreg\",\"handleapi\"],\"name\":\"winapi\",\"req\":\"^0.3.9\"}],\"features\":{\"serialization-serde\":[\"transactions\",\"serde\"],\"transactions\":[\"winapi/ktmw32\"]}}",
"winreg_0.50.0": "{\"dependencies\":[{\"name\":\"cfg-if\",\"req\":\"^1.0\"},{\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.6\"},{\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.3\"},{\"name\":\"serde\",\"optional\":true,\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_bytes\",\"req\":\"^0.11\"},{\"kind\":\"dev\",\"name\":\"serde_derive\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"~3.0\"},{\"features\":[\"Win32_Foundation\",\"Win32_System_Time\",\"Win32_System_Registry\",\"Win32_Security\",\"Win32_Storage_FileSystem\",\"Win32_System_Diagnostics_Debug\"],\"name\":\"windows-sys\",\"req\":\"^0.48.0\"}],\"features\":{\"serialization-serde\":[\"transactions\",\"serde\"],\"transactions\":[]}}",
"winreg_0.55.0": "{\"dependencies\":[{\"name\":\"cfg-if\",\"req\":\"^1.0\"},{\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.6\"},{\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.3\"},{\"name\":\"serde\",\"optional\":true,\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde-transcode\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_bytes\",\"req\":\"^0.11\"},{\"kind\":\"dev\",\"name\":\"serde_derive\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"~3.0\"},{\"features\":[\"Win32_Foundation\",\"Win32_System_Time\",\"Win32_System_Registry\",\"Win32_Security\",\"Win32_Storage_FileSystem\",\"Win32_System_Diagnostics_Debug\"],\"name\":\"windows-sys\",\"req\":\"^0.59\"}],\"features\":{\"serialization-serde\":[\"transactions\",\"serde\"],\"transactions\":[]}}",
+ "winresource_0.1.34": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"std\",\"parse\",\"serde\"],\"name\":\"toml\",\"optional\":true,\"req\":\"^1.1\"},{\"name\":\"version_check\",\"req\":\"^0.9\"},{\"features\":[\"Win32_System_SystemServices\"],\"kind\":\"dev\",\"name\":\"windows\",\"req\":\"^0.62\"}],\"features\":{\"default\":[\"toml\"]}}",
"winsafe_0.0.19": "{\"dependencies\":[],\"features\":{\"comctl\":[\"ole\"],\"dshow\":[\"oleaut\"],\"dwm\":[\"uxtheme\"],\"dxgi\":[\"ole\"],\"gdi\":[\"user\"],\"gui\":[\"comctl\",\"shell\",\"uxtheme\"],\"kernel\":[],\"mf\":[\"oleaut\"],\"ole\":[\"user\"],\"oleaut\":[\"ole\"],\"shell\":[\"oleaut\"],\"taskschd\":[\"oleaut\"],\"user\":[\"kernel\"],\"uxtheme\":[\"gdi\",\"ole\"],\"version\":[\"kernel\"]}}",
"winsplit_0.1.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"doc-comment\",\"req\":\"^0.3.3\"}],\"features\":{\"default\":[\"std\"],\"std\":[]}}",
"wiremock_0.6.5": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"actix-rt\",\"req\":\"^2.10.0\"},{\"name\":\"assert-json-diff\",\"req\":\"^2.0.2\"},{\"features\":[\"attributes\",\"tokio1\"],\"kind\":\"dev\",\"name\":\"async-std\",\"req\":\"^1.13.2\"},{\"name\":\"base64\",\"req\":\"^0.22\"},{\"name\":\"deadpool\",\"req\":\"^0.12.2\"},{\"name\":\"futures\",\"req\":\"^0.3.31\"},{\"name\":\"http\",\"req\":\"^1.3\"},{\"name\":\"http-body-util\",\"req\":\"^0.1\"},{\"features\":[\"full\"],\"name\":\"hyper\",\"req\":\"^1.7\"},{\"features\":[\"tokio\",\"server\",\"http1\",\"http2\"],\"name\":\"hyper-util\",\"req\":\"^0.1\"},{\"name\":\"log\",\"req\":\"^0.4\"},{\"name\":\"once_cell\",\"req\":\"^1\"},{\"name\":\"regex\",\"req\":\"^1\"},{\"features\":[\"json\"],\"kind\":\"dev\",\"name\":\"reqwest\",\"req\":\"^0.12.23\"},{\"name\":\"serde\",\"req\":\"^1\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1\"},{\"name\":\"serde_json\",\"req\":\"^1\"},{\"features\":[\"rt\",\"macros\",\"net\"],\"name\":\"tokio\",\"req\":\"^1.47.1\"},{\"features\":[\"macros\",\"rt-multi-thread\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.47.1\"},{\"name\":\"url\",\"req\":\"^2.5\"}],\"features\":{}}",
diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock
index 8de6e6e97a..221bab821c 100644
--- a/codex-rs/Cargo.lock
+++ b/codex-rs/Cargo.lock
@@ -265,7 +265,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -276,7 +276,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -314,27 +314,6 @@ dependencies = [
"wiremock",
]
-[[package]]
-name = "appcontainer_common"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
- "flatbuffers",
- "getrandom 0.2.17",
- "learning_mode_core",
- "learning_mode_windows",
- "process_security_environment_spec",
- "sandbox_spec",
- "serde",
- "serde_json",
- "thiserror 2.0.18",
- "widestring",
- "windows 0.62.2",
- "windows-core 0.62.2",
- "winreg 0.55.0",
- "wxc_common",
-]
-
[[package]]
name = "approx"
version = "0.5.1"
@@ -4194,13 +4173,13 @@ name = "codex-mxc-sandbox"
version = "0.0.0"
dependencies = [
"anyhow",
- "appcontainer_common",
"codex-network-proxy",
"codex-protocol",
"codex-utils-absolute-path",
"codex-utils-path-uri",
"codex-windows-sandbox",
- "learning_mode_windows",
+ "flatbuffers",
+ "mxc-sdk",
"pretty_assertions",
"serde",
"serde_json",
@@ -4208,7 +4187,6 @@ dependencies = [
"thiserror 2.0.18",
"tracelogging",
"windows-sys 0.61.2",
- "wxc_common",
]
[[package]]
@@ -6623,7 +6601,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.2",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -6980,7 +6958,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -7132,7 +7110,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78"
dependencies = [
"cfg-if",
"rustix 1.1.4",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -7632,7 +7610,7 @@ dependencies = [
"gobject-sys",
"libc",
"system-deps",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -9056,7 +9034,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
- "windows-core 0.62.2",
+ "windows-core 0.58.0",
]
[[package]]
@@ -9509,7 +9487,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
dependencies = [
"hermit-abi",
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -9816,32 +9794,6 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
-[[package]]
-name = "learning_mode_core"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
- "same-file",
- "serde",
- "serde_json",
- "sha2 0.10.9",
- "tempfile",
- "thiserror 2.0.18",
-]
-
-[[package]]
-name = "learning_mode_windows"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
- "learning_mode_core",
- "sha2 0.10.9",
- "thiserror 2.0.18",
- "windows 0.62.2",
- "windows-core 0.62.2",
- "wxc_common",
-]
-
[[package]]
name = "leb128fmt"
version = "0.1.0"
@@ -10302,22 +10254,37 @@ dependencies = [
]
[[package]]
-name = "mxc_config_contract"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
+name = "mxc-sdk"
+version = "1.0.0"
+source = "git+https://github.com/microsoft/mxc?rev=b21120168d70befe12356411423266bfef168446#b21120168d70befe12356411423266bfef168446"
dependencies = [
+ "anyhow",
+ "base64 0.22.1",
+ "cc",
+ "chrono",
+ "cidr",
+ "flatbuffers",
+ "getrandom 0.2.17",
+ "libc",
+ "nix 0.29.0",
+ "same-file",
+ "semver",
"serde",
"serde_json",
+ "serde_path_to_error",
+ "sha2 0.11.0",
+ "tempfile",
"thiserror 2.0.18",
-]
-
-[[package]]
-name = "mxc_telemetry"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
+ "tokio",
"tracelogging",
+ "unicode-general-category",
+ "url",
"uuid",
+ "widestring",
+ "windows 0.62.2",
+ "windows-core 0.62.2",
+ "winreg 0.55.0",
+ "winresource",
]
[[package]]
@@ -10489,7 +10456,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -11219,7 +11186,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -11841,14 +11808,6 @@ dependencies = [
"windows 0.62.2",
]
-[[package]]
-name = "process_security_environment_spec"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
- "flatbuffers",
-]
-
[[package]]
name = "prodash"
version = "31.0.1"
@@ -12163,7 +12122,7 @@ dependencies = [
"libc",
"log",
"socket2 0.6.3",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -13463,7 +13422,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.4.15",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -13476,7 +13435,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.12.1",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -13535,7 +13494,7 @@ dependencies = [
"security-framework 3.5.1",
"security-framework-sys",
"webpki-root-certs",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -13608,14 +13567,6 @@ dependencies = [
"winapi-util",
]
-[[package]]
-name = "sandbox_spec"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
- "flatbuffers",
-]
-
[[package]]
name = "sansio"
version = "1.0.1"
@@ -14355,7 +14306,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -15185,7 +15136,7 @@ dependencies = [
"getrandom 0.4.2",
"once_cell",
"rustix 1.1.4",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -15241,7 +15192,7 @@ dependencies = [
"parking_lot",
"rustix 1.1.4",
"signal-hook",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -16999,7 +16950,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -17477,6 +17428,15 @@ dependencies = [
"windows-sys 0.59.0",
]
+[[package]]
+name = "winresource"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bc6d36480b829272a5bdabf08e6dca8004761c1da7e35efef800540c66221b"
+dependencies = [
+ "version_check",
+]
+
[[package]]
name = "winsafe"
version = "0.0.19"
@@ -17624,30 +17584,6 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
-[[package]]
-name = "wxc_common"
-version = "0.8.0"
-source = "git+https://github.com/microsoft/mxc?rev=6cd3d58f05d3447e67109cfb75e042803b843ca4#6cd3d58f05d3447e67109cfb75e042803b843ca4"
-dependencies = [
- "base64 0.22.1",
- "cidr",
- "getrandom 0.2.17",
- "libc",
- "mxc_config_contract",
- "mxc_telemetry",
- "semver",
- "serde",
- "serde_json",
- "serde_path_to_error",
- "thiserror 2.0.18",
- "unicode-general-category",
- "url",
- "widestring",
- "windows 0.62.2",
- "windows-core 0.62.2",
- "winreg 0.55.0",
-]
-
[[package]]
name = "x11rb"
version = "0.13.2"
diff --git a/codex-rs/Cargo.toml b/codex-rs/Cargo.toml
index 785f7add9e..e588cd6e59 100644
--- a/codex-rs/Cargo.toml
+++ b/codex-rs/Cargo.toml
@@ -324,12 +324,9 @@ codex-windows-sandbox-test-support = { path = "windows-sandbox-rs/tests/support"
core_test_support = { path = "core/tests/common" }
# External
-learning_mode_windows = { git = "https://github.com/microsoft/mxc", rev = "6cd3d58f05d3447e67109cfb75e042803b843ca4" }
-wxc_common = { git = "https://github.com/microsoft/mxc", rev = "6cd3d58f05d3447e67109cfb75e042803b843ca4" }
age = "0.12.1"
ansi-to-tui = "8.0.1"
anyhow = "1"
-appcontainer_common = { git = "https://github.com/microsoft/mxc", rev = "6cd3d58f05d3447e67109cfb75e042803b843ca4" }
arboard = { version = "3", features = ["wayland-data-control"] }
arc-swap = "1.9.0"
assert_cmd = "2"
@@ -380,6 +377,7 @@ ed25519-dalek = { version = "2.2.0", features = ["pkcs8"] }
encoding_rs = "0.8.35"
eventsource-stream = "0.2.3"
file-id = "0.2.3"
+flatbuffers = "25"
flate2 = "1.1.8"
futures = { version = "0.3", default-features = false }
gethostname = "1.1.0"
@@ -418,6 +416,7 @@ maplit = "1.0.2"
memchr = "2.7.6"
mime_guess = "2.0.5"
multimap = "0.10.0"
+mxc-sdk = { git = "https://github.com/microsoft/mxc", rev = "b21120168d70befe12356411423266bfef168446" }
notify = "8.2.0"
nucleo = { git = "https://github.com/helix-editor/nucleo.git", rev = "4253de9faabb4e5c6d81d946a5e35a90f87347ee" }
once_cell = "1.20.2"
diff --git a/codex-rs/mxc-sandbox/Cargo.toml b/codex-rs/mxc-sandbox/Cargo.toml
index 7c81efc845..2cd39d5d2e 100644
--- a/codex-rs/mxc-sandbox/Cargo.toml
+++ b/codex-rs/mxc-sandbox/Cargo.toml
@@ -21,14 +21,13 @@ codex-protocol = { workspace = true }
codex-utils-absolute-path = { workspace = true }
codex-utils-path-uri = { workspace = true }
codex-windows-sandbox = { workspace = true }
+mxc-sdk = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
-wxc_common = { workspace = true }
[target.'cfg(windows)'.dependencies]
-appcontainer_common = { workspace = true }
-learning_mode_windows = { workspace = true }
+flatbuffers = { workspace = true }
# 1.2.4 imports OneCore_apiset, which the GNU Windows toolchain does not ship.
tracelogging = "=1.2.3"
windows-sys = { workspace = true, features = [
diff --git a/codex-rs/mxc-sandbox/src/availability.rs b/codex-rs/mxc-sandbox/src/availability.rs
new file mode 100644
index 0000000000..5e32aea948
--- /dev/null
+++ b/codex-rs/mxc-sandbox/src/availability.rs
@@ -0,0 +1,55 @@
+//! Probe PSEC creation and startup attributes without launching a process.
+//! Cache the result so automatic MXC selection requires a usable native API.
+
+use std::sync::OnceLock;
+
+use flatbuffers::FlatBufferBuilder;
+use mxc_sdk::mxc_common::models::ContainerPolicy;
+use mxc_sdk::mxc_common::ui_policy::resolve_ui_restrictions;
+use mxc_sdk::process_container_common::PROCESS_SECURITY_ENVIRONMENT_FLAG_NONE;
+use mxc_sdk::process_container_common::ProcessSecurityEnvironmentApi;
+use mxc_sdk::process_container_common::SecurityEnvironmentStartupInfo;
+use mxc_sdk::process_container_common::job_object::to_job_object_uilimit_mask;
+use mxc_sdk::process_security_environment_spec::process_security_environment_layout::EndpointPolicyT;
+use mxc_sdk::process_security_environment_spec::process_security_environment_layout::FilterAction;
+use mxc_sdk::process_security_environment_spec::process_security_environment_layout::NetworkPolicyT;
+use mxc_sdk::process_security_environment_spec::process_security_environment_layout::ProcessSecurityEnvironmentT;
+use mxc_sdk::process_security_environment_spec::process_security_environment_layout::SchemaVersionT;
+use mxc_sdk::process_security_environment_spec::process_security_environment_layout::finish_process_security_environment_buffer;
+
+pub(super) fn is_available() -> bool {
+ static USABLE: OnceLock<bool> = OnceLock::new();
+ *USABLE.get_or_init(|| {
+ // Preserve the previous SDK's probe: no filesystem, network, or UI
+ // grants, and no process launch. API-set presence alone is insufficient.
+ let policy = ContainerPolicy::default();
+ let mut egress = EndpointPolicyT::default();
+ egress.default_action = FilterAction::deny;
+ let mut network = NetworkPolicyT::default();
+ network.egress = Some(Box::new(egress));
+ let mut specification = ProcessSecurityEnvironmentT::default();
+ specification.version = SchemaVersionT { major: 1, minor: 0 };
+ specification.disallow_win32k_system_calls = policy.ui.disable;
+ specification.ui_restrictions = u64::from(to_job_object_uilimit_mask(
+ &resolve_ui_restrictions(&policy.ui, &policy.base_process_ui),
+ ));
+ specification.network_policy = Some(Box::new(network));
+ let mut builder = FlatBufferBuilder::with_capacity(/* capacity */ 1024);
+ let specification = specification.pack(&mut builder);
+ finish_process_security_environment_buffer(&mut builder, specification);
+ ProcessSecurityEnvironmentApi::load()
+ .and_then(|api| {
+ api.create(
+ builder.finished_data(),
+ PROCESS_SECURITY_ENVIRONMENT_FLAG_NONE,
+ )
+ })
+ .and_then(|environment| {
+ let startup_info =
+ SecurityEnvironmentStartupInfo::new(Default::default(), environment.raw(), &[]);
+ environment.close();
+ startup_info.map(drop)
+ })
+ .is_ok()
+ })
+}
diff --git a/codex-rs/mxc-sandbox/src/lib.rs b/codex-rs/mxc-sandbox/src/lib.rs
index 678ceb8ea2..fde6ddf1a9 100644
--- a/codex-rs/mxc-sandbox/src/lib.rs
+++ b/codex-rs/mxc-sandbox/src/lib.rs
@@ -1,6 +1,8 @@
//! Native Windows MXC helper. Policy conversion is portable; execution requires
//! a usable process security environment and never enters MXC's ACL fallbacks.
+#[cfg(windows)]
+mod availability;
#[cfg(windows)]
mod native;
#[cfg(any(windows, test))]
@@ -97,7 +99,7 @@ pub fn create_command_args(args: CreateMxcCommandArgsParams<'_>) -> Result<Vec<S
pub fn is_available() -> bool {
#[cfg(windows)]
{
- appcontainer_common::base_container_runner::BaseContainerRunner::is_process_security_environment_usable()
+ availability::is_available()
}
#[cfg(not(windows))]
{
diff --git a/codex-rs/mxc-sandbox/src/native.rs b/codex-rs/mxc-sandbox/src/native.rs
index 2121711e4c..9c61518318 100644
--- a/codex-rs/mxc-sandbox/src/native.rs
+++ b/codex-rs/mxc-sandbox/src/native.rs
@@ -3,13 +3,12 @@
use anyhow::Context;
use anyhow::Result;
use anyhow::ensure;
-use appcontainer_common::base_container_runner::BaseContainerRunner;
-use learning_mode_windows::SecurityEnvironmentApi;
-use wxc_common::logger::Logger;
-use wxc_common::logger::Mode;
-use wxc_common::models::ExecutionRequest;
-use wxc_common::sandbox_process::SandboxBackend;
-use wxc_common::sandbox_process::StdioMode;
+use mxc_sdk::mxc_common::logger::Logger;
+use mxc_sdk::mxc_common::logger::Mode;
+use mxc_sdk::mxc_common::models::ExecutionRequest;
+use mxc_sdk::mxc_common::sandbox_process::SandboxBackend;
+use mxc_sdk::mxc_common::sandbox_process::StdioMode;
+use mxc_sdk::process_container_common::base_container_runner::BaseContainerRunner;
// The ETW functions used by tracelogging are documented Advapi32 exports on
// both Windows toolchains; 1.2.3 leaves their import library to the application.
@@ -25,11 +24,9 @@ pub(super) fn launch(request: &ExecutionRequest) -> Result<i32> {
.any(|capability| capability.eq_ignore_ascii_case("permissiveLearningMode")),
"MXC native launch does not support permissiveLearningMode"
);
- // With no least-privilege mode, legacy proxy, or capture enabled, this
- // probe guarantees BaseContainerRunner chooses PSEC rather than SBOX.
if !request.policy.denied_paths.is_empty() {
ensure!(
- SecurityEnvironmentApi::load()?.supports_deny_paths()?,
+ BaseContainerRunner::supports_native_denied_paths(),
"this Windows build cannot enforce native MXC deny paths"
);
}
diff --git a/codex-rs/mxc-sandbox/src/policy.rs b/codex-rs/mxc-sandbox/src/policy.rs
index 1bb5486303..3f98e961a1 100644
--- a/codex-rs/mxc-sandbox/src/policy.rs
+++ b/codex-rs/mxc-sandbox/src/policy.rs
@@ -13,27 +13,26 @@ use codex_protocol::protocol::FileSystemSpecialPath;
use codex_utils_absolute_path::AbsolutePathBuf;
use codex_utils_path_uri::PathUri;
use codex_windows_sandbox::resolve_windows_deny_read_paths;
+use mxc_sdk::mxc_common::cmdline::CommandLineContext;
+use mxc_sdk::mxc_common::cmdline::CommandLineError;
+use mxc_sdk::mxc_common::cmdline::cmdline_from_argv_for_context;
+use mxc_sdk::mxc_common::filesystem_object::ExistingObjectComparison;
+use mxc_sdk::mxc_common::filesystem_object::compare_existing_filesystem_objects;
+use mxc_sdk::mxc_common::filesystem_object::normalize_object_conflicts;
+use mxc_sdk::mxc_common::logger::Logger;
+use mxc_sdk::mxc_common::logger::Mode;
+use mxc_sdk::mxc_common::models::BaseProcessUiConfig;
+use mxc_sdk::mxc_common::models::ContainerPolicy;
+use mxc_sdk::mxc_common::models::ExecutionRequest;
+use mxc_sdk::mxc_common::models::FallbackPolicy;
+use mxc_sdk::mxc_common::models::NetworkAction;
+use mxc_sdk::mxc_common::models::NetworkCidr;
+use mxc_sdk::mxc_common::models::NetworkEgressPolicy;
+use mxc_sdk::mxc_common::models::NetworkIngressPolicy;
+use mxc_sdk::mxc_common::models::NetworkPeer;
+use mxc_sdk::mxc_common::models::NetworkRule;
+use mxc_sdk::mxc_common::models::UiPolicy;
use thiserror::Error;
-use wxc_common::cmdline::CommandLineContext;
-use wxc_common::cmdline::CommandLineError;
-use wxc_common::cmdline::cmdline_from_argv_for_context;
-use wxc_common::filesystem_object::ExistingObjectComparison;
-use wxc_common::filesystem_object::compare_existing_filesystem_objects;
-use wxc_common::filesystem_object::normalize_object_conflicts;
-use wxc_common::logger::Logger;
-use wxc_common::logger::Mode;
-use wxc_common::models::BaseProcessUiConfig;
-use wxc_common::models::ContainerPolicy;
-use wxc_common::models::ExecutionRequest;
-use wxc_common::models::FallbackPolicy;
-use wxc_common::models::NetworkAction;
-use wxc_common::models::NetworkCidr;
-use wxc_common::models::NetworkEgressPolicy;
-use wxc_common::models::NetworkIngressPolicy;
-use wxc_common::models::NetworkPeer;
-use wxc_common::models::NetworkPolicy;
-use wxc_common::models::NetworkRule;
-use wxc_common::models::UiPolicy;
use crate::MxcCommand;
@@ -247,7 +246,7 @@ pub(super) fn build_request(
..Default::default()
};
if proxied {
- // PSEC host loopback is bidirectional. This shape is supported only
+ // PSEC host loopback can be bidirectional. This shape is supported only
// when the caller already allows local clients and servers. Keep
// private-network ingress denied and allow no direct DNS bypass.
egress.allow.push(NetworkRule {
@@ -279,7 +278,7 @@ pub(super) fn build_request(
.to_str()
.ok_or(PolicyError::NonUnicodeCommandCwd)?
.to_owned(),
- env,
+ env: (!env.is_empty()).then_some(env),
policy: ContainerPolicy {
capabilities: vec!["registryRead".to_owned()],
readwrite_paths: unicode_paths(write)?,
@@ -288,12 +287,6 @@ pub(super) fn build_request(
fallback: FallbackPolicy {
allow_dacl_mutation: false,
},
- default_network_policy: if egress_default == NetworkAction::Allow {
- NetworkPolicy::Allow
- } else {
- NetworkPolicy::Block
- },
- allow_local_network: ingress_default == NetworkAction::Allow,
network_egress: Some(egress),
network_ingress: Some(NetworkIngressPolicy {
default: ingress_default,
diff --git a/codex-rs/mxc-sandbox/src/policy_tests.rs b/codex-rs/mxc-sandbox/src/policy_tests.rs
index 90a030dc04..e91761c9f9 100644
--- a/codex-rs/mxc-sandbox/src/policy_tests.rs
+++ b/codex-rs/mxc-sandbox/src/policy_tests.rs
@@ -16,13 +16,13 @@ use codex_protocol::protocol::FileSystemSpecialPath;
use codex_protocol::protocol::NetworkSandboxPolicy;
use codex_utils_absolute_path::AbsolutePathBuf;
use codex_utils_path_uri::PathUri;
+use mxc_sdk::mxc_common::models::NetworkAction;
+use mxc_sdk::mxc_common::models::NetworkCidr;
+use mxc_sdk::mxc_common::models::NetworkEgressPolicy;
+use mxc_sdk::mxc_common::models::NetworkIngressPolicy;
+use mxc_sdk::mxc_common::models::NetworkPeer;
+use mxc_sdk::mxc_common::models::NetworkRule;
use pretty_assertions::assert_eq;
-use wxc_common::models::NetworkAction;
-use wxc_common::models::NetworkCidr;
-use wxc_common::models::NetworkEgressPolicy;
-use wxc_common::models::NetworkIngressPolicy;
-use wxc_common::models::NetworkPeer;
-use wxc_common::models::NetworkRule;
use crate::CreateMxcCommandArgsParams;
use crate::MxcCommand;
@@ -207,9 +207,13 @@ fn wrapper_preserves_exact_argv_and_separate_command_cwd() -> Result<()> {
(
r#""C:\Program Files\tool.exe" --permissions "" "quotes\" and slash\\""#.to_owned(),
cwd.to_str().unwrap().to_owned(),
- vec!["CUSTOM=value".to_owned()],
+ Some(vec!["CUSTOM=value".to_owned()]),
)
);
+ assert_eq!(
+ build_request(&parsed, &cwd, Vec::new(), &[], &[])?.env,
+ None
+ );
Ok(())
}
diff --git a/codex-rs/mxc-sandbox/src/windows.rs b/codex-rs/mxc-sandbox/src/windows.rs
index 70c38b6185..99ef6179ad 100644
--- a/codex-rs/mxc-sandbox/src/windows.rs
+++ b/codex-rs/mxc-sandbox/src/windows.rs
@@ -8,6 +8,8 @@ use std::path::PathBuf;
use anyhow::Result;
use anyhow::ensure;
use codex_utils_path_uri::PathUri;
+use mxc_sdk::mxc_common::filesystem_object::ExistingObjectComparison;
+use mxc_sdk::mxc_common::filesystem_object::compare_existing_filesystem_objects;
use windows_sys::Win32::Foundation::RPC_E_CHANGED_MODE;
use windows_sys::Win32::Storage::FileSystem::GetDriveTypeW;
use windows_sys::Win32::Storage::FileSystem::GetLogicalDrives;
@@ -21,8 +23,6 @@ use windows_sys::Win32::UI::Shell::FOLDERID_ProgramData;
use windows_sys::Win32::UI::Shell::FOLDERID_ProgramFiles;
use windows_sys::Win32::UI::Shell::FOLDERID_ProgramFilesX86;
use windows_sys::Win32::UI::Shell::SHGetKnownFolderPath;
-use wxc_common::filesystem_object::ExistingObjectComparison;
-use wxc_common::filesystem_object::compare_existing_filesystem_objects;
struct ComUninitializeGuard;