diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index dd369340c2..553b896e5d 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -966,6 +966,7 @@ "allocator-api2_0.2.21": "{\"dependencies\":[{\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"}],\"features\":{\"alloc\":[],\"default\":[\"std\"],\"fresh-rust\":[],\"nightly\":[],\"std\":[\"alloc\"]}}", "alsa-sys_0.4.0": "{\"dependencies\":[{\"kind\":\"build\",\"name\":\"bindgen\",\"optional\":true,\"req\":\"^0.72\"},{\"name\":\"libc\",\"req\":\"^0.2.178\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"req\":\"^0.3.7\"}],\"features\":{\"use-bindgen\":[\"bindgen\"]}}", "alsa_0.11.0": "{\"dependencies\":[{\"name\":\"alsa-sys\",\"req\":\"^0.4.0\"},{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1.0\"},{\"name\":\"bitflags\",\"req\":\"^2.4.0\"},{\"name\":\"cfg-if\",\"req\":\"^1.0\"},{\"name\":\"libc\",\"req\":\"^0.2.178\"}],\"features\":{\"default\":[\"std\"],\"std\":[]}}", + "ambient-authority_0.0.2": "{\"dependencies\":[],\"features\":{}}", "android_system_properties_0.1.5": "{\"dependencies\":[{\"name\":\"libc\",\"req\":\"^0.2.126\"}],\"features\":{}}", "annotate-snippets_0.9.2": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.3\"},{\"kind\":\"dev\",\"name\":\"difference\",\"req\":\"^2.0\"},{\"kind\":\"dev\",\"name\":\"glob\",\"req\":\"^0.3\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"toml\",\"req\":\"^0.5\"},{\"name\":\"unicode-width\",\"req\":\"^0.1\"},{\"name\":\"yansi-term\",\"optional\":true,\"req\":\"^0.1\"},{\"kind\":\"dev\",\"name\":\"yansi-term\",\"req\":\"^0.1\"}],\"features\":{\"color\":[\"yansi-term\"],\"default\":[]}}", "ansi-to-tui_8.0.1": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.8\"},{\"kind\":\"dev\",\"name\":\"eyre\",\"req\":\"^0.6\"},{\"name\":\"nom\",\"req\":\"^8\"},{\"kind\":\"dev\",\"name\":\"pretty_assertions\",\"req\":\"^1.4\"},{\"default_features\":false,\"name\":\"ratatui-core\",\"req\":\"^0.1.0\"},{\"name\":\"simdutf8\",\"optional\":true,\"req\":\"^0.1\"},{\"features\":[\"const_generics\"],\"name\":\"smallvec\",\"req\":\"^1\"},{\"name\":\"thiserror\",\"req\":\"^2\"}],\"features\":{\"default\":[\"zero-copy\",\"simd\"],\"simd\":[\"dep:simdutf8\"],\"zero-copy\":[]}}", @@ -1097,6 +1098,9 @@ "cached_proc_macro_types_0.1.1": "{\"dependencies\":[],\"features\":{}}", "calendrical_calculations_0.2.4": "{\"dependencies\":[{\"default_features\":false,\"name\":\"core_maths\",\"req\":\"^0.1.0\"},{\"default_features\":false,\"name\":\"displaydoc\",\"req\":\"^0.2.3\"},{\"default_features\":false,\"name\":\"log\",\"optional\":true,\"req\":\"^0.4.17\"}],\"features\":{\"logging\":[\"dep:log\"]}}", "camino_1.2.2": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"bincode\",\"req\":\"^1\"},{\"name\":\"proptest\",\"optional\":true,\"req\":\"^1.0.0\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0.223\"},{\"kind\":\"dev\",\"name\":\"serde_bytes\",\"req\":\"^0.11.8\"},{\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1\"}],\"features\":{\"proptest1\":[\"dep:proptest\"],\"serde1\":[\"dep:serde_core\"]}}", + "cap-fs-ext_3.4.6": "{\"dependencies\":[{\"name\":\"arf-strings\",\"optional\":true,\"req\":\"^0.7.0\"},{\"features\":[\"io_safety\",\"attributes\"],\"name\":\"async-std\",\"optional\":true,\"req\":\"^1.13.0\"},{\"name\":\"async-trait\",\"optional\":true,\"req\":\"^0.1.42\"},{\"name\":\"camino\",\"optional\":true,\"req\":\"^1.0.5\"},{\"name\":\"cap-async-std\",\"optional\":true,\"req\":\"^3.4.6\"},{\"name\":\"cap-primitives\",\"req\":\"^3.4.6\"},{\"name\":\"cap-std\",\"optional\":true,\"req\":\"^3.4.6\"},{\"default_features\":false,\"name\":\"io-lifetimes\",\"req\":\"^2.0.0\"},{\"features\":[\"Win32_Storage_FileSystem\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <=0.59\",\"target\":\"cfg(windows)\"}],\"features\":{\"arf_strings\":[\"cap-std/arf_strings\",\"fs_utf8\",\"arf-strings\"],\"async_std\":[\"cap-async-std\",\"async-std\",\"io-lifetimes/async-std\",\"async-trait\"],\"async_std_arf_strings\":[\"cap-async-std/arf_strings\",\"async_std_fs_utf8\",\"arf-strings\"],\"async_std_fs_utf8\":[\"cap-async-std/fs_utf8\",\"camino\"],\"default\":[\"std\"],\"fs_utf8\":[\"cap-std/fs_utf8\",\"camino\"],\"std\":[\"cap-std\"]}}", + "cap-primitives_3.4.6": "{\"dependencies\":[{\"name\":\"ambient-authority\",\"req\":\"^0.0.2\"},{\"features\":[\"derive\"],\"name\":\"arbitrary\",\"optional\":true,\"req\":\"^1.0.0\"},{\"name\":\"fs-set-times\",\"req\":\"^0.20.0\"},{\"name\":\"io-extras\",\"req\":\"^0.18.3\"},{\"default_features\":false,\"name\":\"io-lifetimes\",\"req\":\"^2.0.0\"},{\"name\":\"ipnet\",\"req\":\"^2.5.0\"},{\"name\":\"maybe-owned\",\"req\":\"^0.3.4\"},{\"features\":[\"fs\",\"process\",\"termios\",\"time\"],\"name\":\"rustix\",\"req\":\"^1.0.0\",\"target\":\"cfg(not(windows))\"},{\"name\":\"rustix-linux-procfs\",\"req\":\"^0.1.1\",\"target\":\"cfg(any(target_os = \\\"android\\\", target_os = \\\"linux\\\"))\"},{\"features\":[\"Win32_Foundation\",\"Win32_Security\",\"Win32_Storage_FileSystem\",\"Win32_System_Kernel\",\"Win32_System_WindowsProgramming\",\"Win32_System_IO\",\"Wdk_Storage_FileSystem\",\"Wdk_Foundation\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <=0.59\",\"target\":\"cfg(windows)\"},{\"name\":\"winx\",\"req\":\"^0.36.0\",\"target\":\"cfg(windows)\"}],\"features\":{}}", + "cap-std_3.4.6": "{\"dependencies\":[{\"name\":\"arf-strings\",\"optional\":true,\"req\":\"^0.7.0\"},{\"name\":\"camino\",\"optional\":true,\"req\":\"^1.0.5\"},{\"name\":\"cap-primitives\",\"req\":\"^3.4.6\"},{\"name\":\"io-extras\",\"req\":\"^0.18.3\"},{\"default_features\":false,\"name\":\"io-lifetimes\",\"req\":\"^2.0.0\"},{\"features\":[\"fs\"],\"name\":\"rustix\",\"req\":\"^1.0.0\",\"target\":\"cfg(not(windows))\"}],\"features\":{\"arf_strings\":[\"fs_utf8\",\"arf-strings\"],\"default\":[],\"fs_utf8\":[\"camino\"]}}", "cargo-platform_0.3.2": "{\"dependencies\":[{\"name\":\"serde\",\"req\":\"^1.0.228\",\"target\":\"cfg(any())\"},{\"name\":\"serde_core\",\"req\":\"^1.0.228\"}],\"features\":{}}", "cargo_metadata_0.23.1": "{\"dependencies\":[{\"features\":[\"serde1\"],\"name\":\"camino\",\"req\":\"^1.1.10\"},{\"name\":\"cargo-platform\",\"req\":\"^0.3.0\"},{\"name\":\"derive_builder\",\"optional\":true,\"req\":\"^0.20\"},{\"features\":[\"serde\"],\"name\":\"semver\",\"req\":\"^1.0.26\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"req\":\"^1.0.219\"},{\"features\":[\"unbounded_depth\"],\"name\":\"serde_json\",\"req\":\"^1.0.142\"},{\"name\":\"thiserror\",\"req\":\"^2.0.12\"}],\"features\":{\"builder\":[\"derive_builder\"],\"default\":[],\"unstable\":[]}}", "caseless_0.2.2": "{\"dependencies\":[{\"name\":\"unicode-normalization\",\"req\":\"^0.1\"}],\"features\":{}}", @@ -1349,6 +1353,7 @@ "foreign-types_0.3.2": "{\"dependencies\":[{\"name\":\"foreign-types-shared\",\"req\":\"^0.1\"}],\"features\":{}}", "form_urlencoded_1.2.2": "{\"dependencies\":[{\"default_features\":false,\"name\":\"percent-encoding\",\"req\":\"^2.3.0\"}],\"features\":{\"alloc\":[\"percent-encoding/alloc\"],\"default\":[\"std\"],\"std\":[\"alloc\",\"percent-encoding/std\"]}}", "form_urlencoded_1.2.3": "{\"dependencies\":[{\"default_features\":false,\"name\":\"percent-encoding\",\"req\":\"^2.3.2\"}],\"features\":{\"alloc\":[\"percent-encoding/alloc\"],\"default\":[\"std\"],\"std\":[\"alloc\",\"percent-encoding/std\"]}}", + "fs-set-times_0.20.3": "{\"dependencies\":[{\"default_features\":false,\"name\":\"io-lifetimes\",\"req\":\"^2.0.0\"},{\"features\":[\"fs\",\"time\"],\"name\":\"rustix\",\"req\":\"^1.0.0\",\"target\":\"cfg(not(windows))\"},{\"features\":[\"Win32_Foundation\",\"Win32_Storage_FileSystem\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <0.60\",\"target\":\"cfg(windows)\"}],\"features\":{}}", "fs_extra_1.3.0": "{\"dependencies\":[],\"features\":{}}", "fsevent-sys_4.1.0": "{\"dependencies\":[{\"name\":\"libc\",\"req\":\"^0.2.68\"}],\"features\":{}}", "fslock_0.2.1": "{\"dependencies\":[{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.66\",\"target\":\"cfg(unix)\"},{\"features\":[\"minwindef\",\"minwinbase\",\"winbase\",\"errhandlingapi\",\"winerror\",\"winnt\",\"synchapi\",\"handleapi\",\"fileapi\",\"processthreadsapi\"],\"name\":\"winapi\",\"req\":\"^0.3.8\",\"target\":\"cfg(windows)\"}],\"features\":{\"default\":[\"std\"],\"std\":[]}}", @@ -1558,6 +1563,8 @@ "intl-memoizer_0.5.3": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"fluent-langneg\",\"req\":\"^0.13\"},{\"kind\":\"dev\",\"name\":\"intl_pluralrules\",\"req\":\"^7.0\"},{\"name\":\"type-map\",\"req\":\"^0.5\"},{\"name\":\"unic-langid\",\"req\":\"^0.9\"}],\"features\":{}}", "intl_pluralrules_7.0.2": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.3\"},{\"name\":\"unic-langid\",\"req\":\"^0.9\"},{\"features\":[\"macros\"],\"kind\":\"dev\",\"name\":\"unic-langid\",\"req\":\"^0.9\"}],\"features\":{}}", "inventory_0.3.24": "{\"dependencies\":[{\"name\":\"rustversion\",\"req\":\"^1.0\",\"target\":\"cfg(target_family = \\\"wasm\\\")\"},{\"kind\":\"dev\",\"name\":\"rustversion\",\"req\":\"^1.0\"},{\"features\":[\"diff\"],\"kind\":\"dev\",\"name\":\"trybuild\",\"req\":\"^1.0.108\"}],\"features\":{}}", + "io-extras_0.18.4": "{\"dependencies\":[{\"features\":[\"io_safety\"],\"name\":\"async-std\",\"optional\":true,\"req\":\"^1.13.0\"},{\"name\":\"io-lifetimes\",\"req\":\"^2.0.0\"},{\"name\":\"mio\",\"optional\":true,\"req\":\"^1.0.2\"},{\"name\":\"os_pipe\",\"optional\":true,\"req\":\"^1.2.1\"},{\"kind\":\"dev\",\"name\":\"os_pipe\",\"req\":\"^1.0.0\"},{\"name\":\"socket2\",\"optional\":true,\"req\":\"^0.5.7\"},{\"features\":[\"io-std\",\"fs\",\"net\",\"process\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1.6.0\"},{\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_System_Console\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <=0.59\",\"target\":\"cfg(windows)\"}],\"features\":{\"default\":[],\"use_async_std\":[\"async-std\"],\"use_mio_net\":[\"mio\",\"mio/net\"],\"use_mio_os_ext\":[\"mio\",\"mio/os-ext\"],\"use_os_pipe\":[\"os_pipe\"],\"use_socket2\":[\"socket2\"],\"use_tokio\":[\"tokio\"]}}", + "io-lifetimes_2.0.4": "{\"dependencies\":[{\"features\":[\"io_safety\"],\"name\":\"async-std\",\"optional\":true,\"req\":\"^1.13.0\",\"target\":\"cfg(not(target_os = \\\"wasi\\\"))\"},{\"name\":\"hermit-abi\",\"optional\":true,\"req\":\">=0.3, <=0.4\",\"target\":\"cfg(target_os = \\\"hermit\\\")\"},{\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.96\",\"target\":\"cfg(not(windows))\"},{\"features\":[\"net\",\"os-ext\"],\"name\":\"mio\",\"optional\":true,\"req\":\"^0.8.0\",\"target\":\"cfg(not(target_os = \\\"wasi\\\"))\"},{\"features\":[\"io_safety\"],\"name\":\"os_pipe\",\"optional\":true,\"req\":\"^1.0.0\",\"target\":\"cfg(not(target_os = \\\"wasi\\\"))\"},{\"name\":\"socket2\",\"optional\":true,\"req\":\"^0.5.0\",\"target\":\"cfg(not(target_os = \\\"wasi\\\"))\"},{\"features\":[\"io-std\",\"fs\",\"net\",\"process\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1.6.0\",\"target\":\"cfg(not(target_os = \\\"wasi\\\"))\"},{\"features\":[\"Win32_Foundation\",\"Win32_Storage_FileSystem\",\"Win32_Networking_WinSock\",\"Win32_Security\",\"Win32_System_IO\"],\"name\":\"windows-sys\",\"optional\":true,\"req\":\">=0.52, <=0.59\",\"target\":\"cfg(windows)\"}],\"features\":{\"close\":[\"libc\",\"hermit-abi\",\"windows-sys\"],\"default\":[]}}", "io_tee_0.1.1": "{\"dependencies\":[],\"features\":{}}", "ipconfig_0.3.2": "{\"dependencies\":[{\"name\":\"socket2\",\"req\":\"^0.5.1\",\"target\":\"cfg(windows)\"},{\"name\":\"widestring\",\"req\":\"^1.0.2\",\"target\":\"cfg(windows)\"},{\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_System_Registry\"],\"name\":\"windows-sys\",\"req\":\"^0.48.0\",\"target\":\"cfg(windows)\"},{\"name\":\"winreg\",\"optional\":true,\"req\":\"^0.50.0\",\"target\":\"cfg(windows)\"}],\"features\":{\"computer\":[\"winreg\"],\"default\":[\"computer\"]}}", "ipnet_2.11.0": "{\"dependencies\":[{\"name\":\"heapless\",\"optional\":true,\"req\":\"^0\"},{\"name\":\"schemars\",\"optional\":true,\"req\":\"^0.8\"},{\"default_features\":false,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"package\":\"serde\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_test\",\"req\":\"^1\"}],\"features\":{\"default\":[\"std\"],\"json\":[\"serde\",\"schemars\"],\"ser_as_str\":[\"heapless\"],\"std\":[]}}", @@ -1644,6 +1651,7 @@ "matchers_0.2.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"syntax\",\"dfa-build\",\"dfa-search\"],\"name\":\"regex-automata\",\"req\":\"^0.4\"}],\"features\":{\"unicode\":[\"regex-automata/unicode\"]}}", "matchit_0.8.4": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"actix-router\",\"req\":\"^0.2.7\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.3.4\"},{\"kind\":\"dev\",\"name\":\"gonzales\",\"req\":\"^0.0.3-beta\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"hyper\",\"req\":\"^0.14\"},{\"kind\":\"dev\",\"name\":\"path-tree\",\"req\":\"^0.2.2\"},{\"kind\":\"dev\",\"name\":\"regex\",\"req\":\"^1.5.4\"},{\"kind\":\"dev\",\"name\":\"route-recognizer\",\"req\":\"^0.3.0\"},{\"kind\":\"dev\",\"name\":\"routefinder\",\"req\":\"^0.5.2\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1\"},{\"features\":[\"make\",\"util\"],\"kind\":\"dev\",\"name\":\"tower\",\"req\":\"^0.4\"}],\"features\":{\"__test_helpers\":[],\"default\":[]}}", "matchit_0.9.1": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"actix-router\",\"req\":\"^0.5\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.5\"},{\"kind\":\"dev\",\"name\":\"gonzales\",\"req\":\"^0.0.3-beta\"},{\"kind\":\"dev\",\"name\":\"http-body-util\",\"req\":\"^0.1\"},{\"features\":[\"http1\",\"server\"],\"kind\":\"dev\",\"name\":\"hyper\",\"req\":\"^1\"},{\"features\":[\"tokio\"],\"kind\":\"dev\",\"name\":\"hyper-util\",\"req\":\"^0.1\"},{\"kind\":\"dev\",\"name\":\"path-tree\",\"req\":\"^0.8\"},{\"kind\":\"dev\",\"name\":\"regex\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"route-recognizer\",\"req\":\"^0.3\"},{\"kind\":\"dev\",\"name\":\"routefinder\",\"req\":\"^0.5\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1\"},{\"features\":[\"make\",\"util\"],\"kind\":\"dev\",\"name\":\"tower\",\"req\":\"^0.5.2\"},{\"kind\":\"dev\",\"name\":\"wayfind\",\"req\":\"^0.8\"}],\"features\":{\"__test_helpers\":[],\"default\":[]}}", + "maybe-owned_0.3.4": "{\"dependencies\":[{\"name\":\"serde\",\"optional\":true,\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_derive\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1\"}],\"features\":{}}", "md-5_0.10.6": "{\"dependencies\":[{\"name\":\"cfg-if\",\"req\":\"^1.0\"},{\"name\":\"digest\",\"req\":\"^0.10.7\"},{\"features\":[\"dev\"],\"kind\":\"dev\",\"name\":\"digest\",\"req\":\"^0.10.7\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.2.2\"},{\"name\":\"md5-asm\",\"optional\":true,\"req\":\"^0.5\",\"target\":\"cfg(any(target_arch = \\\"x86\\\", target_arch = \\\"x86_64\\\"))\"}],\"features\":{\"asm\":[\"md5-asm\"],\"default\":[\"std\"],\"force-soft\":[],\"loongarch64_asm\":[],\"oid\":[\"digest/oid\"],\"std\":[\"digest/std\"]}}", "md-5_0.11.0": "{\"dependencies\":[{\"name\":\"cfg-if\",\"req\":\"^1\"},{\"name\":\"digest\",\"req\":\"^0.11\"},{\"features\":[\"dev\"],\"kind\":\"dev\",\"name\":\"digest\",\"req\":\"^0.11\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^1\"}],\"features\":{\"alloc\":[\"digest/alloc\"],\"default\":[\"alloc\",\"oid\"],\"oid\":[\"digest/oid\"],\"zeroize\":[\"digest/zeroize\"]}}", "md5_0.8.0": "{\"dependencies\":[],\"features\":{\"default\":[\"std\"],\"std\":[]}}", @@ -1959,6 +1967,7 @@ "rustc_version_0.4.1": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"doc-comment\",\"req\":\"^0.3\"},{\"name\":\"semver\",\"req\":\"^1.0\"}],\"features\":{}}", "rustfix_0.8.7": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1.0.86\"},{\"kind\":\"dev\",\"name\":\"proptest\",\"req\":\"^1.5.0\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"req\":\"^1.0.204\"},{\"name\":\"serde_json\",\"req\":\"^1.0.120\"},{\"kind\":\"dev\",\"name\":\"similar\",\"req\":\"^2.6.0\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.10.1\"},{\"name\":\"thiserror\",\"req\":\"^1.0.63\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"tracing\",\"req\":\"^0.1.40\"},{\"features\":[\"env-filter\"],\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3.18\"}],\"features\":{}}", "rusticata-macros_4.1.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"std\"],\"name\":\"nom\",\"req\":\"^7.0\"}],\"features\":{}}", + "rustix-linux-procfs_0.1.1": "{\"dependencies\":[{\"name\":\"once_cell\",\"req\":\"^1.5.2\"},{\"default_features\":false,\"features\":[\"alloc\",\"fs\"],\"name\":\"rustix\",\"req\":\"^1.0.0\"},{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"rustix\",\"req\":\"^1.0.0\"}],\"features\":{\"default\":[\"std\"],\"std\":[\"rustix/std\"]}}", "rustix_0.38.44": "{\"dependencies\":[{\"default_features\":false,\"name\":\"bitflags\",\"req\":\"^2.4.0\"},{\"name\":\"compiler_builtins\",\"optional\":true,\"req\":\"^0.1.49\"},{\"name\":\"core\",\"optional\":true,\"package\":\"rustc-std-workspace-core\",\"req\":\"^1.0.0\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.4\",\"target\":\"cfg(all(criterion, not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))\"},{\"kind\":\"dev\",\"name\":\"flate2\",\"req\":\"^1.0\"},{\"default_features\":false,\"name\":\"itoa\",\"optional\":true,\"req\":\"^1.0.13\"},{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.161\",\"target\":\"cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", target_arch = \\\"s390x\\\"), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\")))))))\"},{\"default_features\":false,\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.161\",\"target\":\"cfg(all(not(rustix_use_libc), not(miri), target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", target_arch = \\\"s390x\\\"), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\"))))\"},{\"kind\":\"dev\",\"name\":\"libc\",\"req\":\"^0.2.161\"},{\"default_features\":false,\"name\":\"libc_errno\",\"package\":\"errno\",\"req\":\"^0.3.10\",\"target\":\"cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", target_arch = \\\"s390x\\\"), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\")))))))\"},{\"default_features\":false,\"name\":\"libc_errno\",\"package\":\"errno\",\"req\":\"^0.3.10\",\"target\":\"cfg(windows)\"},{\"default_features\":false,\"name\":\"libc_errno\",\"optional\":true,\"package\":\"errno\",\"req\":\"^0.3.10\",\"target\":\"cfg(all(not(rustix_use_libc), not(miri), target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", target_arch = \\\"s390x\\\"), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\"))))\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"libc_errno\",\"package\":\"errno\",\"req\":\"^0.3.10\"},{\"default_features\":false,\"features\":[\"general\",\"ioctl\",\"no_std\"],\"name\":\"linux-raw-sys\",\"req\":\"^0.4.14\",\"target\":\"cfg(all(any(target_os = \\\"android\\\", target_os = \\\"linux\\\"), any(rustix_use_libc, miri, not(all(target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", target_arch = \\\"s390x\\\"), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\")))))))\"},{\"default_features\":false,\"features\":[\"general\",\"errno\",\"ioctl\",\"no_std\",\"elf\"],\"name\":\"linux-raw-sys\",\"req\":\"^0.4.14\",\"target\":\"cfg(all(not(rustix_use_libc), not(miri), target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", target_arch = \\\"s390x\\\"), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\"))))\"},{\"kind\":\"dev\",\"name\":\"memoffset\",\"req\":\"^0.9.0\"},{\"name\":\"once_cell\",\"optional\":true,\"req\":\"^1.5.2\",\"target\":\"cfg(any(target_os = \\\"android\\\", target_os = \\\"linux\\\"))\"},{\"name\":\"rustc-std-workspace-alloc\",\"optional\":true,\"req\":\"^1.0.0\"},{\"kind\":\"dev\",\"name\":\"serial_test\",\"req\":\"^2.0.0\"},{\"kind\":\"dev\",\"name\":\"static_assertions\",\"req\":\"^1.1.0\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.5.0\"},{\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_NetworkManagement_IpHelper\",\"Win32_System_Threading\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <=0.59\",\"target\":\"cfg(windows)\"}],\"features\":{\"all-apis\":[\"event\",\"fs\",\"io_uring\",\"mm\",\"mount\",\"net\",\"param\",\"pipe\",\"process\",\"procfs\",\"pty\",\"rand\",\"runtime\",\"shm\",\"stdio\",\"system\",\"termios\",\"thread\",\"time\"],\"alloc\":[],\"cc\":[],\"default\":[\"std\",\"use-libc-auxv\"],\"event\":[],\"fs\":[],\"io_uring\":[\"event\",\"fs\",\"net\",\"linux-raw-sys/io_uring\"],\"libc-extra-traits\":[\"libc?/extra_traits\"],\"linux_4_11\":[],\"linux_latest\":[\"linux_4_11\"],\"mm\":[],\"mount\":[],\"net\":[\"linux-raw-sys/net\",\"linux-raw-sys/netlink\",\"linux-raw-sys/if_ether\",\"linux-raw-sys/xdp\"],\"param\":[\"fs\"],\"pipe\":[],\"process\":[\"linux-raw-sys/prctl\"],\"procfs\":[\"once_cell\",\"itoa\",\"fs\"],\"pty\":[\"itoa\",\"fs\"],\"rand\":[],\"runtime\":[\"linux-raw-sys/prctl\"],\"rustc-dep-of-std\":[\"core\",\"rustc-std-workspace-alloc\",\"compiler_builtins\",\"linux-raw-sys/rustc-dep-of-std\",\"bitflags/rustc-dep-of-std\",\"compiler_builtins?/rustc-dep-of-std\"],\"shm\":[\"fs\"],\"std\":[\"bitflags/std\",\"alloc\",\"libc?/std\",\"libc_errno?/std\",\"libc-extra-traits\"],\"stdio\":[],\"system\":[\"linux-raw-sys/system\"],\"termios\":[],\"thread\":[\"linux-raw-sys/prctl\"],\"time\":[],\"try_close\":[],\"use-explicitly-provided-auxv\":[],\"use-libc\":[\"libc_errno\",\"libc\",\"libc-extra-traits\"],\"use-libc-auxv\":[]}}", "rustix_1.1.4": "{\"dependencies\":[{\"default_features\":false,\"name\":\"bitflags\",\"req\":\"^2.4.0\"},{\"name\":\"core\",\"optional\":true,\"package\":\"rustc-std-workspace-core\",\"req\":\"^1.0.0\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.4\",\"target\":\"cfg(all(criterion, not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))\"},{\"kind\":\"dev\",\"name\":\"flate2\",\"req\":\"^1.0\"},{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.182\",\"target\":\"cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", any(target_arch = \\\"s390x\\\", target_arch = \\\"powerpc\\\")), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc\\\"), all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\")))))))\"},{\"default_features\":false,\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.182\",\"target\":\"cfg(all(not(rustix_use_libc), not(miri), target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", any(target_arch = \\\"s390x\\\", target_arch = \\\"powerpc\\\")), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc\\\"), all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\"))))\"},{\"kind\":\"dev\",\"name\":\"libc\",\"req\":\"^0.2.171\"},{\"default_features\":false,\"name\":\"libc_errno\",\"package\":\"errno\",\"req\":\"^0.3.10\",\"target\":\"cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", any(target_arch = \\\"s390x\\\", target_arch = \\\"powerpc\\\")), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc\\\"), all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\")))))))\"},{\"default_features\":false,\"name\":\"libc_errno\",\"package\":\"errno\",\"req\":\"^0.3.10\",\"target\":\"cfg(windows)\"},{\"default_features\":false,\"name\":\"libc_errno\",\"optional\":true,\"package\":\"errno\",\"req\":\"^0.3.10\",\"target\":\"cfg(all(not(rustix_use_libc), not(miri), target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", any(target_arch = \\\"s390x\\\", target_arch = \\\"powerpc\\\")), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc\\\"), all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\"))))\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"libc_errno\",\"package\":\"errno\",\"req\":\"^0.3.10\"},{\"default_features\":false,\"features\":[\"general\",\"ioctl\",\"no_std\"],\"name\":\"linux-raw-sys\",\"req\":\"^0.12\",\"target\":\"cfg(all(any(target_os = \\\"linux\\\", target_os = \\\"android\\\"), any(rustix_use_libc, miri, not(all(target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", any(target_arch = \\\"s390x\\\", target_arch = \\\"powerpc\\\")), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc\\\"), all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\")))))))\"},{\"default_features\":false,\"features\":[\"auxvec\",\"general\",\"errno\",\"ioctl\",\"no_std\",\"elf\"],\"name\":\"linux-raw-sys\",\"req\":\"^0.12\",\"target\":\"cfg(all(not(rustix_use_libc), not(miri), target_os = \\\"linux\\\", any(target_endian = \\\"little\\\", any(target_arch = \\\"s390x\\\", target_arch = \\\"powerpc\\\")), any(target_arch = \\\"arm\\\", all(target_arch = \\\"aarch64\\\", target_pointer_width = \\\"64\\\"), target_arch = \\\"riscv64\\\", all(rustix_use_experimental_asm, target_arch = \\\"powerpc\\\"), all(rustix_use_experimental_asm, target_arch = \\\"powerpc64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"s390x\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips32r6\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64\\\"), all(rustix_use_experimental_asm, target_arch = \\\"mips64r6\\\"), target_arch = \\\"x86\\\", all(target_arch = \\\"x86_64\\\", target_pointer_width = \\\"64\\\"))))\"},{\"kind\":\"dev\",\"name\":\"memoffset\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"once_cell\",\"req\":\"^1.20.3\",\"target\":\"cfg(windows)\"},{\"name\":\"rustc-std-workspace-alloc\",\"optional\":true,\"req\":\"^1.0.0\"},{\"kind\":\"dev\",\"name\":\"serial_test\",\"req\":\"^2.0.0\"},{\"kind\":\"dev\",\"name\":\"static_assertions\",\"req\":\"^1.1.0\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.5.0\"},{\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <0.62\",\"target\":\"cfg(windows)\"}],\"features\":{\"all-apis\":[\"event\",\"fs\",\"io_uring\",\"mm\",\"mount\",\"net\",\"param\",\"pipe\",\"process\",\"pty\",\"rand\",\"runtime\",\"shm\",\"stdio\",\"system\",\"termios\",\"thread\",\"time\"],\"alloc\":[],\"default\":[\"std\"],\"event\":[],\"fs\":[],\"io_uring\":[\"event\",\"fs\",\"net\",\"thread\",\"linux-raw-sys/io_uring\"],\"linux_4_11\":[],\"linux_5_1\":[\"linux_4_11\"],\"linux_5_11\":[\"linux_5_1\"],\"linux_latest\":[\"linux_5_11\"],\"mm\":[],\"mount\":[],\"net\":[\"linux-raw-sys/net\",\"linux-raw-sys/netlink\",\"linux-raw-sys/if_ether\",\"linux-raw-sys/xdp\"],\"param\":[],\"pipe\":[],\"process\":[\"linux-raw-sys/prctl\"],\"pty\":[\"fs\"],\"rand\":[],\"runtime\":[\"linux-raw-sys/prctl\"],\"rustc-dep-of-std\":[\"core\",\"rustc-std-workspace-alloc\",\"linux-raw-sys/rustc-dep-of-std\",\"bitflags/rustc-dep-of-std\"],\"shm\":[\"fs\"],\"std\":[\"bitflags/std\",\"alloc\",\"libc?/std\",\"libc_errno?/std\"],\"stdio\":[],\"system\":[\"linux-raw-sys/system\"],\"termios\":[],\"thread\":[\"linux-raw-sys/prctl\"],\"time\":[],\"try_close\":[],\"use-explicitly-provided-auxv\":[],\"use-libc\":[\"libc_errno\",\"libc\"],\"use-libc-auxv\":[]}}", "rustls-native-certs_0.8.3": "{\"dependencies\":[{\"name\":\"openssl-probe\",\"req\":\"^0.2\",\"target\":\"cfg(all(unix, not(target_os = \\\"macos\\\")))\"},{\"features\":[\"std\"],\"name\":\"pki-types\",\"package\":\"rustls-pki-types\",\"req\":\"^1.10\"},{\"kind\":\"dev\",\"name\":\"ring\",\"req\":\"^0.17\"},{\"kind\":\"dev\",\"name\":\"rustls\",\"req\":\"^0.23\"},{\"kind\":\"dev\",\"name\":\"rustls-webpki\",\"req\":\"^0.103\"},{\"name\":\"schannel\",\"req\":\"^0.1\",\"target\":\"cfg(windows)\"},{\"name\":\"security-framework\",\"req\":\"^3\",\"target\":\"cfg(target_os = \\\"macos\\\")\"},{\"kind\":\"dev\",\"name\":\"serial_test\",\"req\":\"^3\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.5\"},{\"kind\":\"dev\",\"name\":\"untrusted\",\"req\":\"^0.9\"},{\"kind\":\"dev\",\"name\":\"webpki-roots\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"x509-parser\",\"req\":\"^0.18\"}],\"features\":{}}", @@ -2392,6 +2401,7 @@ "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\":[]}}", + "winx_0.36.4": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"^2.4\"},{\"features\":[\"Win32_Foundation\",\"Win32_Storage_FileSystem\",\"Win32_System_IO\",\"Win32_System_Ioctl\",\"Win32_System_LibraryLoader\",\"Win32_System_Performance\",\"Win32_System_SystemServices\"],\"name\":\"windows-sys\",\"req\":\">=0.52, <=0.59\",\"target\":\"cfg(windows)\"}],\"features\":{}}", "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\":{}}", "wit-bindgen-core_0.51.0": "{\"dependencies\":[{\"name\":\"anyhow\",\"req\":\"^1.0.72\"},{\"features\":[\"derive\"],\"name\":\"clap\",\"optional\":true,\"req\":\"^4.3.19\"},{\"name\":\"heck\",\"req\":\"^0.5\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.218\"},{\"name\":\"wit-parser\",\"req\":\"^0.244.0\"}],\"features\":{\"clap\":[\"dep:clap\"],\"serde\":[\"dep:serde\"]}}", "wit-bindgen-rust-macro_0.51.0": "{\"dependencies\":[{\"name\":\"anyhow\",\"req\":\"^1.0.72\"},{\"name\":\"prettyplease\",\"req\":\"^0.2.20\"},{\"name\":\"proc-macro2\",\"req\":\"^1.0\"},{\"name\":\"quote\",\"req\":\"^1\"},{\"features\":[\"printing\"],\"name\":\"syn\",\"req\":\"^2.0.89\"},{\"name\":\"wit-bindgen-core\",\"req\":\"^0.51.0\"},{\"name\":\"wit-bindgen-rust\",\"req\":\"^0.51.0\"}],\"features\":{\"async\":[]}}", diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 692d6c60bf..c7360d1ee9 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -199,6 +199,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -1591,6 +1597,48 @@ dependencies = [ "displaydoc", ] +[[package]] +name = "cap-fs-ext" +version = "3.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476f0d0003a760918ed4b1e039a59e11769030416f79c8222551d22785f7f70d" +dependencies = [ + "cap-primitives", + "cap-std", + "io-lifetimes", + "windows-sys 0.59.0", +] + +[[package]] +name = "cap-primitives" +version = "3.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e0bf07d379916947be6c4a07f43684153d710a2896c31f9e97781362895596c" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes", + "ipnet", + "maybe-owned", + "rustix 1.1.4", + "rustix-linux-procfs", + "windows-sys 0.59.0", + "winx", +] + +[[package]] +name = "cap-std" +version = "3.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a59e59fa26472d29680ece6a9f8ee8b0551a719a33df2f5240bde065ecbddfd7" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes", + "rustix 1.1.4", +] + [[package]] name = "caseless" version = "0.2.2" @@ -5390,6 +5438,8 @@ dependencies = [ "assert_matches", "axum", "base64 0.22.1", + "cap-fs-ext", + "cap-std", "chrono", "clap", "clipboard-win", @@ -8029,6 +8079,17 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-set-times" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" +dependencies = [ + "io-lifetimes", + "rustix 1.1.4", + "windows-sys 0.59.0", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -10152,6 +10213,22 @@ dependencies = [ "rustversion", ] +[[package]] +name = "io-extras" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" +dependencies = [ + "io-lifetimes", + "windows-sys 0.59.0", +] + +[[package]] +name = "io-lifetimes" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" + [[package]] name = "io_tee" version = "0.1.1" @@ -10803,6 +10880,12 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3eede3bdf92f3b4f9dc04072a9ce5ab557d5ec9038773bf9ffcd5588b3cc05b" +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + [[package]] name = "md-5" version = "0.10.6" @@ -14207,6 +14290,16 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rustix-linux-procfs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" +dependencies = [ + "once_cell", + "rustix 1.1.4", +] + [[package]] name = "rustls" version = "0.23.46" @@ -18307,6 +18400,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956" +[[package]] +name = "winx" +version = "0.36.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" +dependencies = [ + "bitflags 2.13.1", + "windows-sys 0.59.0", +] + [[package]] name = "wiremock" version = "0.6.5" diff --git a/codex-rs/tui/Cargo.toml b/codex-rs/tui/Cargo.toml index 74808567bc..c2db24728a 100644 --- a/codex-rs/tui/Cargo.toml +++ b/codex-rs/tui/Cargo.toml @@ -26,6 +26,8 @@ codex-build-info = { workspace = true } anyhow = { workspace = true } axum = { workspace = true, default-features = false, features = ["http1", "tokio"] } base64 = { workspace = true } +cap-fs-ext = "3.4.6" +cap-std = "3.4.6" chrono = { workspace = true, features = ["serde"] } clap = { workspace = true, features = ["derive"] } codex-ansi-escape = { workspace = true } diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 2b73288413..7e753667c4 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -312,6 +312,7 @@ mod thread_session_state; mod thread_settings; mod thread_title; mod transcript_export; +pub(crate) use transcript_export::ExportConflict; mod tui_mode_picker; mod user_turn_submission; mod user_verification; diff --git a/codex-rs/tui/src/app/event_dispatch.rs b/codex-rs/tui/src/app/event_dispatch.rs index ebe6a31d31..d32d4167d1 100644 --- a/codex-rs/tui/src/app/event_dispatch.rs +++ b/codex-rs/tui/src/app/event_dispatch.rs @@ -647,8 +647,11 @@ impl App { let result = tui.copy_transcript_selection(&text, crate::clipboard_copy::CopyFormat::PlainText); self.chat_widget.show_selection_copy_result(result); } - AppEvent::OpenTranscriptExportFilePrompt => { - self.chat_widget.show_transcript_export_file_prompt(); + AppEvent::OpenTranscriptExportFilePrompt { alternative_to } => { + match alternative_to { + Some(path) => self.chat_widget.show_transcript_checkpoint_prompt(&path), + None => self.chat_widget.show_transcript_export_file_prompt(), + } } AppEvent::ExportTranscript { destination } => { if let Err(error) = self.export_transcript(tui, app_server, destination).await { diff --git a/codex-rs/tui/src/app/transcript_export.rs b/codex-rs/tui/src/app/transcript_export.rs index 293e111651..ff50339b3e 100644 --- a/codex-rs/tui/src/app/transcript_export.rs +++ b/codex-rs/tui/src/app/transcript_export.rs @@ -1,10 +1,14 @@ //! Complete, Markdown-preserving conversation exports. +use std::io; use std::io::Write; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; +use cap_fs_ext::DirExt; +use cap_fs_ext::MetadataExt; +use cap_std::fs::Dir; use codex_app_server_client::TypedRequestError; use codex_app_server_protocol::ThreadItemPayload; use codex_app_server_protocol::Turn; @@ -53,13 +57,14 @@ impl App { ) .await?; let markdown = render_markdown_transcript(&cells)?; - match destination { + let path = match destination { TranscriptExportDestination::Clipboard => { let result = tui.copy_transcript_selection( &markdown, crate::clipboard_copy::CopyFormat::PlainText, ); self.chat_widget.show_copy_result("conversation", result); + return Ok(()); } TranscriptExportDestination::File(path) => { let cwd = if self.app_server_target.uses_remote_workspace() { @@ -67,13 +72,25 @@ impl App { } else { self.chat_widget.config_ref().cwd.as_path() }; - let path = write_transcript(cwd, &path, &markdown)?; - self.chat_widget.add_info_message( - format!("Saved conversation to {}", path.display()), - /*hint*/ None, - ); + match write_transcript(cwd, &path, &markdown)? { + SaveOutcome::Saved(path) => path, + SaveOutcome::AlreadyExists(conflict) => { + self.chat_widget.show_transcript_export_conflict(conflict); + return Ok(()); + } + } } - } + TranscriptExportDestination::ReplaceFile(conflict) => { + conflict.replace(&markdown).map_err(|error| { + format!("could not replace {}: {error}", conflict.path.display()) + })?; + conflict.path + } + }; + self.chat_widget.add_info_message( + format!("Saved conversation to {}", path.display()), + /*hint*/ None, + ); Ok(()) } } @@ -297,7 +314,102 @@ fn render_markdown_transcript(cells: &[Arc]) -> Result Result { +/// The resolved path and filesystem identities presented for overwrite confirmation. +#[derive(Clone, Debug, PartialEq, Eq)] +pub(crate) struct ExportConflict { + pub(crate) path: PathBuf, + directory: (u64, u64), + file: Option<(u64, u64)>, +} + +// Open each component of an already resolved path without following new symlinks. +fn open_export_directory(path: &Path) -> io::Result { + let mut components = path.ancestors().collect::>(); + let root = components.pop().ok_or(io::ErrorKind::InvalidInput)?; + let mut dir = Dir::open_ambient_dir(root, cap_std::ambient_authority())?; + for component in components.into_iter().rev() { + dir = dir.open_dir_nofollow(component.file_name().ok_or(io::ErrorKind::InvalidInput)?)?; + } + Ok(dir) +} + +impl ExportConflict { + pub(crate) fn new(path: &Path) -> io::Result { + let parent = dunce::canonicalize(path.parent().ok_or(io::ErrorKind::InvalidInput)?)?; + let name = path.file_name().ok_or(io::ErrorKind::InvalidInput)?; + let dir = open_export_directory(&parent)?; + let directory = dir.dir_metadata()?; + let file = dir.symlink_metadata(name)?; + Ok(Self { + path: parent.join(name), + directory: (directory.dev(), directory.ino()), + file: file.is_file().then(|| (file.dev(), file.ino())), + }) + } + + pub(crate) fn can_replace(&self) -> bool { + self.file.is_some() + } + + fn replace(&self, markdown: &str) -> io::Result<()> { + let parent = self.path.parent().ok_or(io::ErrorKind::InvalidInput)?; + let name = self.path.file_name().ok_or(io::ErrorKind::InvalidInput)?; + // cap-std's Windows rename and cleanup strip the verbatim prefix, which + // would turn a UNC share into a relative path. + #[cfg(windows)] + if !matches!(parent.components().next(), Some(std::path::Component::Prefix(prefix)) + if matches!(prefix.kind(), std::path::Prefix::Disk(_) | std::path::Prefix::VerbatimDisk(_))) + { + return Err(io::Error::other( + "cannot replace exports on network shares. Choose another name", + )); + } + let dir = open_export_directory(parent)?; + let directory = dir.dir_metadata()?; + if self.directory != (directory.dev(), directory.ino()) { + return Err(io::Error::other( + "export directory changed. Run /export again", + )); + } + + // Keep staging, cleanup and the atomic rename relative to the same directory handle. + let temp = format!(".codex-export-{}", uuid::Uuid::new_v4()); + let mut options = cap_std::fs::OpenOptions::new(); + options.write(true).create_new(true); + #[cfg(unix)] + { + use cap_std::fs::OpenOptionsExt; + options.mode(0o600); + } + let mut file = dir.open_with(&temp, &options)?; + let result = (|| { + file.write_all(markdown.as_bytes())?; + let target = dir.symlink_metadata(name)?; + if !target.is_file() || self.file != Some((target.dev(), target.ino())) { + return Err(io::Error::other( + "export destination changed. Run /export again", + )); + } + dir.rename(&temp, &dir, name) + })(); + if result.is_err() { + let _ = dir.remove_file(&temp); + } + result + } +} + +#[derive(Debug, PartialEq)] +enum SaveOutcome { + Saved(PathBuf), + AlreadyExists(ExportConflict), +} + +fn write_transcript( + cwd: &Path, + requested_path: &Path, + markdown: &str, +) -> Result { let path = if let Ok(relative) = requested_path.strip_prefix("~") { dirs::home_dir() .ok_or_else(|| "could not determine the home directory".to_string())? @@ -307,13 +419,20 @@ fn write_transcript(cwd: &Path, requested_path: &Path, markdown: &str) -> Result } else { cwd.join(requested_path) }; - let mut file = tempfile::NamedTempFile::new_in(path.parent().unwrap_or(cwd)) + let parent = path.parent().unwrap_or(cwd); + let mut file = tempfile::NamedTempFile::new_in(parent) .map_err(|error| format!("could not create {}: {error}", path.display()))?; file.write_all(markdown.as_bytes()) .map_err(|error| format!("could not write {}: {error}", path.display()))?; - file.persist_noclobber(&path) - .map_err(|error| format!("could not create {}: {error}", path.display()))?; - Ok(path) + match file.persist_noclobber(&path) { + Ok(_) => Ok(SaveOutcome::Saved(path)), + Err(error) if error.error.kind() == io::ErrorKind::AlreadyExists => { + ExportConflict::new(&path) + .map(SaveOutcome::AlreadyExists) + .map_err(|error| format!("could not inspect {}: {error}", path.display())) + } + Err(error) => Err(format!("could not create {}: {error}", path.display())), + } } #[cfg(test)] diff --git a/codex-rs/tui/src/app/transcript_export_tests.rs b/codex-rs/tui/src/app/transcript_export_tests.rs index f1fdd8921e..65cf142d6f 100644 --- a/codex-rs/tui/src/app/transcript_export_tests.rs +++ b/codex-rs/tui/src/app/transcript_export_tests.rs @@ -178,22 +178,34 @@ fn persisted_transcript_includes_file_and_mcp_details() { } #[test] -fn transcript_file_resolves_relative_paths_and_refuses_to_overwrite() { +fn transcript_file_requires_explicit_replacement_of_the_resolved_path() { let directory = tempfile::tempdir().expect("temporary directory"); - let path = write_transcript( + let result = write_transcript( directory.path(), "conversation.md".as_ref(), "# First export\n", ) .expect("write first export"); - assert_eq!(path, directory.path().join("conversation.md")); - assert!(write_transcript(directory.path(), &path, "# Second export\n").is_err()); + let path = directory.path().join("conversation.md"); + assert_eq!(result, super::SaveOutcome::Saved(path.clone())); + let conflict = super::ExportConflict::new(&path).unwrap(); + assert_eq!( + write_transcript( + directory.path(), + "conversation.md".as_ref(), + "# Second export\n", + ), + Ok(super::SaveOutcome::AlreadyExists(conflict.clone())), + ); assert_eq!( std::fs::read_to_string(&path).expect("read"), "# First export\n" ); + conflict.replace("# Second export\n").unwrap(); + assert_eq!(std::fs::read_to_string(&path).unwrap(), "# Second export\n"); + let directory_name = directory.path().file_name().expect("directory name"); let requested = std::path::Path::new("~") .join(directory_name) @@ -203,6 +215,28 @@ fn transcript_file_resolves_relative_paths_and_refuses_to_overwrite() { assert!(error.contains(&dirs::home_dir().expect("home").display().to_string())); } +#[cfg(unix)] +#[test] +fn replacement_rejects_a_redirected_directory_or_changed_file() { + let root = tempfile::tempdir().unwrap(); + let parent = root.path().join("exports"); + std::fs::create_dir(&parent).unwrap(); + let path = parent.join("notes.md"); + std::fs::write(&path, "original").unwrap(); + let conflict = super::ExportConflict::new(&path).unwrap(); + std::fs::rename(&path, parent.join("original.md")).unwrap(); + std::fs::write(&path, "different file").unwrap(); + assert!(conflict.replace("refresh").is_err()); + assert_eq!(std::fs::read_to_string(&path).unwrap(), "different file"); + + let conflict = super::ExportConflict::new(&path).unwrap(); + std::fs::rename(&parent, root.path().join("moved")).unwrap(); + std::fs::write(root.path().join("notes.md"), "outside").unwrap(); + std::os::unix::fs::symlink(root.path(), &parent).unwrap(); + assert!(conflict.replace("refresh").is_err()); + assert_eq!(std::fs::read_to_string(&path).unwrap(), "outside"); +} + #[test] fn persisted_web_and_image_activity_preserves_full_details() { let items = [ diff --git a/codex-rs/tui/src/app_event.rs b/codex-rs/tui/src/app_event.rs index d09fee7c7e..30dd5ba7bf 100644 --- a/codex-rs/tui/src/app_event.rs +++ b/codex-rs/tui/src/app_event.rs @@ -261,6 +261,7 @@ pub(crate) enum KeymapCaptureMode { pub(crate) enum TranscriptExportDestination { Clipboard, File(PathBuf), + ReplaceFile(crate::app::ExportConflict), } /// Deliver a generated title to its originating automatic rename or editable prompt. @@ -659,7 +660,9 @@ pub(crate) enum AppEvent { }, /// Open the filename prompt for an on-demand Markdown transcript export. - OpenTranscriptExportFilePrompt, + OpenTranscriptExportFilePrompt { + alternative_to: Option, + }, /// Open retained warnings without changing the draft or transcript position. OpenWarnings, /// Copy a diagnostic and acknowledge in the footer, without appending history. diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_export_filename_taken.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_export_filename_taken.snap new file mode 100644 index 0000000000..bc99d8cd70 --- /dev/null +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_export_filename_taken.snap @@ -0,0 +1,19 @@ +--- +source: tui/src/chatwidget/tests/copy_export_picker_tests.rs +expression: prompts +--- + File already exists + exports/notes.md + + +› 1. Choose another name + 2. Replace + 3. Cancel + + f3 select · f2 back + + Save conversation + +› exports/notes-3.md + + enter submit · esc back diff --git a/codex-rs/tui/src/chatwidget/tests/copy_export_picker_tests.rs b/codex-rs/tui/src/chatwidget/tests/copy_export_picker_tests.rs index 30bfd87b3e..2d953d0b51 100644 --- a/codex-rs/tui/src/chatwidget/tests/copy_export_picker_tests.rs +++ b/codex-rs/tui/src/chatwidget/tests/copy_export_picker_tests.rs @@ -96,15 +96,19 @@ async fn copy_export_picker_custom_keys_preserve_payloads_and_composer_draft() { assert!( std::iter::from_fn(|| rx.try_recv().ok()).all(|event| !matches!( event, - AppEvent::ExportTranscript { .. } | AppEvent::OpenTranscriptExportFilePrompt + AppEvent::ExportTranscript { .. } | AppEvent::OpenTranscriptExportFilePrompt { .. } )) ); chat.show_transcript_export_popup(); chat.handle_key_event(KeyEvent::from(KeyCode::Down)); chat.handle_key_event(KeyEvent::from(KeyCode::F(/*n*/ 3))); assert!( - std::iter::from_fn(|| rx.try_recv().ok()) - .any(|event| matches!(event, AppEvent::OpenTranscriptExportFilePrompt)) + std::iter::from_fn(|| rx.try_recv().ok()).any(|event| matches!( + event, + AppEvent::OpenTranscriptExportFilePrompt { + alternative_to: None + } + )) ); chat.show_transcript_export_file_prompt(); chat.handle_key_event(KeyEvent::from(KeyCode::Esc)); @@ -115,7 +119,51 @@ async fn copy_export_picker_custom_keys_preserve_payloads_and_composer_draft() { .all(|event| !matches!(event, AppEvent::ExportTranscript { .. })) ); - chat.show_transcript_export_file_prompt(); + let dir = tempfile::tempdir().unwrap(); + let parent = dunce::canonicalize(dir.path()).unwrap(); + let path = parent.join("notes.md"); + std::fs::write(&path, "original").unwrap(); + std::fs::write(dir.path().join("notes-2.md"), "checkpoint").unwrap(); + let target = crate::app::ExportConflict::new(&path).unwrap(); + chat.show_transcript_export_conflict(target.clone()); + chat.handle_key_event(KeyEvent::from(KeyCode::Down)); + chat.handle_key_event(KeyEvent::from(KeyCode::F(/*n*/ 3))); + let destination = std::iter::from_fn(|| rx.try_recv().ok()).find_map(|event| match event { + AppEvent::ExportTranscript { destination } => Some(destination), + _ => None, + }); + assert_eq!( + destination, + Some(TranscriptExportDestination::ReplaceFile(target.clone())) + ); + + chat.show_transcript_export_conflict(target.clone()); + chat.handle_key_event(KeyEvent::from(KeyCode::Down)); + chat.handle_key_event(KeyEvent::from(KeyCode::Down)); + chat.handle_key_event(KeyEvent::from(KeyCode::F(/*n*/ 3))); + assert!(chat.no_modal_or_popup_active()); + assert!( + std::iter::from_fn(|| rx.try_recv().ok()).all(|event| !matches!( + event, + AppEvent::ExportTranscript { .. } | AppEvent::OpenTranscriptExportFilePrompt { .. } + )) + ); + + chat.show_transcript_export_conflict(target); + let conflict = render_bottom_popup(&chat, /*width*/ 300); + chat.handle_key_event(KeyEvent::from(KeyCode::F(/*n*/ 3))); + let alternative = std::iter::from_fn(|| rx.try_recv().ok()).find_map(|event| match event { + AppEvent::OpenTranscriptExportFilePrompt { alternative_to } => alternative_to, + _ => None, + }); + assert_eq!(alternative.as_ref(), Some(&path)); + chat.show_transcript_checkpoint_prompt(&alternative.unwrap()); + let popup = render_bottom_popup(&chat, /*width*/ 300); + let prompts = format!("{conflict}\n\n{popup}").replace( + &format!("{}{}", parent.display(), std::path::MAIN_SEPARATOR), + "exports/", + ); + assert_chatwidget_snapshot!("slash_export_filename_taken", prompts); chat.handle_key_event(KeyEvent::new(KeyCode::Char('a'), KeyModifiers::CONTROL)); chat.handle_key_event(KeyEvent::new(KeyCode::Char('k'), KeyModifiers::CONTROL)); let filename = "reviews/日本語 - result.md"; diff --git a/codex-rs/tui/src/chatwidget/transcript_export.rs b/codex-rs/tui/src/chatwidget/transcript_export.rs index 8c58c46c07..7c0ecc828c 100644 --- a/codex-rs/tui/src/chatwidget/transcript_export.rs +++ b/codex-rs/tui/src/chatwidget/transcript_export.rs @@ -32,7 +32,9 @@ impl ChatWidget { name: "Save to file".to_string(), description: Some("Choose a Markdown filename".to_string()), actions: vec![Box::new(|tx| { - tx.send(AppEvent::OpenTranscriptExportFilePrompt); + tx.send(AppEvent::OpenTranscriptExportFilePrompt { + alternative_to: None, + }); })], dismiss_on_select: true, ..Default::default() @@ -44,12 +46,74 @@ impl ChatWidget { self.request_redraw(); } + pub(crate) fn show_transcript_export_conflict(&mut self, conflict: crate::app::ExportConflict) { + let alternative_to = conflict.path.clone(); + self.show_selection_view(SelectionViewParams { + title: Some("File already exists".to_string()), + subtitle: Some(conflict.path.display().to_string()), + footer_hint: Some(picker_hint_line_for_keymap(&self.bottom_pane.list_keymap())), + items: vec![ + SelectionItem { + name: "Choose another name".to_string(), + actions: vec![Box::new(move |tx| { + tx.send(AppEvent::OpenTranscriptExportFilePrompt { + alternative_to: Some(alternative_to.clone()), + }); + })], + dismiss_on_select: true, + ..Default::default() + }, + SelectionItem { + name: "Replace".to_string(), + is_disabled: !conflict.can_replace(), + actions: vec![Box::new(move |tx| { + tx.send(AppEvent::ExportTranscript { + destination: TranscriptExportDestination::ReplaceFile(conflict.clone()), + }); + })], + dismiss_on_select: true, + ..Default::default() + }, + SelectionItem { + name: "Cancel".to_string(), + dismiss_on_select: true, + ..Default::default() + }, + ], + ..SelectionViewParams::picker() + }); + self.request_redraw(); + } + pub(crate) fn show_transcript_export_file_prompt(&mut self) { - let tx = self.app_event_tx.clone(); let filename = self.thread_id().map_or_else( || "codex-session.md".to_string(), |thread_id| format!("codex-session-{thread_id}.md"), ); + self.prompt_for_export_filename(filename); + } + + pub(crate) fn show_transcript_checkpoint_prompt(&mut self, path: &Path) { + let stem = path.file_stem().unwrap_or_default(); + let mut suffix = 2; + let filename = loop { + let mut name = stem.to_os_string(); + name.push(format!("-{suffix}")); + if let Some(extension) = path.extension() { + name.push("."); + name.push(extension); + } + let candidate = path.with_file_name(name); + if candidate.symlink_metadata().is_err() { + break candidate.to_string_lossy().into_owned(); + } + suffix += 1; + }; + self.prompt_for_export_filename(filename); + } + + fn prompt_for_export_filename(&mut self, filename: String) { + let tx = self.app_event_tx.clone(); let view = CustomPromptView::new( "Save conversation".to_string(), "Type a filename and press Enter".to_string(),