Compare commits
249
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e948929204 | ||
|
|
bb4f279951 | ||
|
|
f2fad5bdc4 | ||
|
|
1c11446a78 | ||
|
|
095c9cfa21 | ||
|
|
d3bc203a10 | ||
|
|
113ff6b8bc | ||
|
|
26039c321d | ||
|
|
161359a813 | ||
|
|
705f52a5a6 | ||
|
|
eba5fda3e4 | ||
|
|
51cd837786 | ||
|
|
801a9e1f01 | ||
|
|
a82616a888 | ||
|
|
7af3d41cee | ||
|
|
4351f9f80e | ||
|
|
e5109dea3f | ||
|
|
e1ab91cdf9 | ||
|
|
79119a9392 | ||
|
|
ba9d4a9e84 | ||
|
|
4dd5f1e70b | ||
|
|
ac54a05173 | ||
|
|
87b7bdbf2e | ||
|
|
65dbdb5f03 | ||
|
|
192e2ef3ce | ||
|
|
8a7a723dcd | ||
|
|
ad3d3521ed | ||
|
|
d4b19eca27 | ||
|
|
568c592f9c | ||
|
|
fad8b3d5bc | ||
|
|
39f422522e | ||
|
|
733a1cca06 | ||
|
|
f7aad26f1d | ||
|
|
45d1f24d79 | ||
|
|
c9bbed2dae | ||
|
|
82e6bacb9c | ||
|
|
a92eae0891 | ||
|
|
a2b7c4a655 | ||
|
|
2c2d99f0e3 | ||
|
|
30b42cb802 | ||
|
|
3f797555cd | ||
|
|
057d9140a8 | ||
|
|
4a784f63e8 | ||
|
|
df82e2fe0a | ||
|
|
627b579219 | ||
|
|
2df465732a | ||
|
|
c37fd5665f | ||
|
|
0d37c062de | ||
|
|
039d0f27d5 | ||
|
|
37103d7f01 | ||
|
|
b32ada5320 | ||
|
|
77fde36ae1 | ||
|
|
c82708f858 | ||
|
|
6dfaca4dad | ||
|
|
f988a5f0da | ||
|
|
ae5c75dbfc | ||
|
|
a7a9d82f15 | ||
|
|
bcbb7f5a9c | ||
|
|
7539b0a856 | ||
|
|
fdb8be1485 | ||
|
|
36e074a2fb | ||
|
|
c875667eb8 | ||
|
|
b6d93b4cba | ||
|
|
86a5522ded | ||
|
|
ab541fb990 | ||
|
|
b514f638aa | ||
|
|
d15bf1deb7 | ||
|
|
39b42aaacd | ||
|
|
d2efdf1986 | ||
|
|
551fc719d6 | ||
|
|
0811df3976 | ||
|
|
1099fe0694 | ||
|
|
3cd64c8d7c | ||
|
|
aa39ded153 | ||
|
|
0e6f153732 | ||
|
|
1c9b058d26 | ||
|
|
064b2d9bca | ||
|
|
e0370f0b06 | ||
|
|
4dcd8df891 | ||
|
|
6aa88f9946 | ||
|
|
08ae615122 | ||
|
|
d8c42ecf8f | ||
|
|
1885417cd4 | ||
|
|
d9446b4b01 | ||
|
|
4b345a8de9 | ||
|
|
65f2709052 | ||
|
|
5b98eaafeb | ||
|
|
bb360e5db8 | ||
|
|
d3147716e0 | ||
|
|
486c779c37 | ||
|
|
caae161dd0 | ||
|
|
e1cc96712f | ||
|
|
76dcb8199b | ||
|
|
0598a96e93 | ||
|
|
7761f0a594 | ||
|
|
9f04d886f3 | ||
|
|
6bd17ba6ae | ||
|
|
05cf8eeb14 | ||
|
|
ac37f98c73 | ||
|
|
3ff5d6223b | ||
|
|
2728f99126 | ||
|
|
27fcd7cbed | ||
|
|
4f9e7171a1 | ||
|
|
83f02f706c | ||
|
|
6222faa3c4 | ||
|
|
e54a5713ca | ||
|
|
d2b4d63e95 | ||
|
|
e787af9624 | ||
|
|
8703d32bd0 | ||
|
|
6107b9886c | ||
|
|
ffdf2daddb | ||
|
|
b9796386e5 | ||
|
|
8fcba7fae9 | ||
|
|
25f4940d4a | ||
|
|
4e4767ffa7 | ||
|
|
ee51bb132e | ||
|
|
9ba7a3df52 | ||
|
|
a73fa8a869 | ||
|
|
748ab55ca7 | ||
|
|
c9b4267c37 | ||
|
|
c3936b4b8a | ||
|
|
d960b36694 | ||
|
|
8044c6867c | ||
|
|
1455fda735 | ||
|
|
5226f2fb4b | ||
|
|
aa9b9cc94e | ||
|
|
202b590e84 | ||
|
|
33b3f80a09 | ||
|
|
2bc8e7f545 | ||
|
|
57e64682f8 | ||
|
|
57a808a392 | ||
|
|
43b4274f3f | ||
|
|
cce9d3228b | ||
|
|
efdacaf46f | ||
|
|
4be90eb069 | ||
|
|
c4f0e09912 | ||
|
|
f5ac7a757e | ||
|
|
f4275a2a2e | ||
|
|
0ed34eb9ce | ||
|
|
1c414e0d65 | ||
|
|
e6bf88ae02 | ||
|
|
d4a341bd52 | ||
|
|
44ccf39457 | ||
|
|
358e464528 | ||
|
|
b7d2321ef7 | ||
|
|
a90c808408 | ||
|
|
11ca3f7531 | ||
|
|
762f87d5bb | ||
|
|
af9a98b074 | ||
|
|
fb2b06a829 | ||
|
|
7ccf78dec4 | ||
|
|
0c58612c3c | ||
|
|
738ef9f3bb | ||
|
|
cfc11eb483 | ||
|
|
5c7a1602c8 | ||
|
|
7cdb219883 | ||
|
|
f8df49a196 | ||
|
|
66a56b17a1 | ||
|
|
8e7ccd8472 | ||
|
|
d749ee847f | ||
|
|
1a20f53c33 | ||
|
|
7e980a54fe | ||
|
|
2157f98648 | ||
|
|
5ff78c5e66 | ||
|
|
2f742f5885 | ||
|
|
10cf2b9ea2 | ||
|
|
e0aa0434f4 | ||
|
|
a5a00d6c73 | ||
|
|
2497eab251 | ||
|
|
0389e80f07 | ||
|
|
7de8a0afc0 | ||
|
|
df769889c0 | ||
|
|
01ab354312 | ||
|
|
44f1b0e867 | ||
|
|
09bd19a0de | ||
|
|
ecef7e0936 | ||
|
|
5f82dc9e59 | ||
|
|
af83299ada | ||
|
|
eb485f57ba | ||
|
|
8d0098930e | ||
|
|
e4bd7871b1 | ||
|
|
632eee03e9 | ||
|
|
8fcabd75a0 | ||
|
|
1a2f5babe8 | ||
|
|
cf39544acd | ||
|
|
78b1dda5f6 | ||
|
|
6abffd442d | ||
|
|
1be4eb123e | ||
|
|
247934cfe5 | ||
|
|
8842c09a7f | ||
|
|
e428b9a16b | ||
|
|
2889d8e1bf | ||
|
|
4e688da437 | ||
|
|
12dc86beb3 | ||
|
|
ebe94e25c5 | ||
|
|
0768988e55 | ||
|
|
4688e49329 | ||
|
|
4980f9585a | ||
|
|
c1c07853fe | ||
|
|
814347ecd2 | ||
|
|
2c502d8b3d | ||
|
|
2210380232 | ||
|
|
ad1dbba32d | ||
|
|
bbf57cec15 | ||
|
|
f57966695f | ||
|
|
e3fe1ade2c | ||
|
|
b8725c1896 | ||
|
|
f49ae52079 | ||
|
|
b1a0dff158 | ||
|
|
b6f53857fc | ||
|
|
ddd1812a51 | ||
|
|
55897425e8 | ||
|
|
7b8d67e456 | ||
|
|
a037e65ead | ||
|
|
5fab289359 | ||
|
|
faeb379646 | ||
|
|
df38cb3b2a | ||
|
|
aece559654 | ||
|
|
a142c90e26 | ||
|
|
6eb51a438a | ||
|
|
7b54fd245d | ||
|
|
da279f6fd4 | ||
|
|
1031a7b9aa | ||
|
|
2f02d8461d | ||
|
|
a6ed292aa3 | ||
|
|
3cf4899cb5 | ||
|
|
b1263c593d | ||
|
|
5e5bdee745 | ||
|
|
d63a342256 | ||
|
|
f6a69b5873 | ||
|
|
1840e7dead | ||
|
|
74bfe33ec8 | ||
|
|
6103cf6c78 | ||
|
|
daa69c411c | ||
|
|
73b1a3bc85 | ||
|
|
c2bd770ca7 | ||
|
|
94ca55a93c | ||
|
|
74417e9c6b | ||
|
|
08e4f43c9a | ||
|
|
9df200a068 | ||
|
|
b3c5a49458 | ||
|
|
b313cca1cf | ||
|
|
09358089b0 | ||
|
|
c48785a9b7 | ||
|
|
219ab4043e | ||
|
|
e934edd68c | ||
|
|
b93a7b1512 | ||
|
|
af92ae158d | ||
|
|
194f2662b8 |
No files matched your search
@@ -18,8 +18,8 @@ common --experimental_platform_in_output_dir
|
||||
# Match Cargo's MSVC static CRT policy and V8's allocator linkage. Only the
|
||||
# MSVC C/C++ toolchain consumes this feature; other toolchains ignore it.
|
||||
# Include host dependencies so native build tools use the same runtime.
|
||||
build --features=static_link_msvcrt
|
||||
build --host_features=static_link_msvcrt
|
||||
build --features=-dynamic_link_msvcrt --features=static_link_msvcrt
|
||||
build --host_features=-dynamic_link_msvcrt --host_features=static_link_msvcrt
|
||||
|
||||
build --workspace_status_command=./scripts/workspace-status.sh
|
||||
build:windows --workspace_status_command=./scripts/workspace-status.cmd
|
||||
@@ -222,12 +222,11 @@ common:ci-v8 --config=ci
|
||||
common:ci-v8 --build_metadata=TAG_workflow=v8
|
||||
common:ci-v8 --build_metadata=TAG_os=linux
|
||||
|
||||
# Native Windows MSVC builds inherit the runner's MSVC SDK environment.
|
||||
# Native Windows MSVC builds use the registered LLVM toolchain and its SDK.
|
||||
# Voice's separately declared native build tools still need the runner environment.
|
||||
# Client environment capture and repository discovery happen before target
|
||||
# transitions, so these runner settings cannot live in runtime_package.bzl.
|
||||
# Hermetic LLVM targets the GNU ABI on Windows even on an MSVC platform.
|
||||
build:ci-windows-msvc --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0
|
||||
build:ci-windows-msvc --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows,@local_config_cc//:cc-toolchain-arm64_windows
|
||||
build:ci-windows-msvc --repo_env=BAZEL_MSVC_RUNTIME_VISUAL_STUDIO_EULA=1
|
||||
build:ci-windows-msvc --action_env=PATH
|
||||
build:ci-windows-msvc --host_action_env=PATH
|
||||
build:ci-windows-msvc --action_env=INCLUDE
|
||||
|
||||
@@ -68,6 +68,7 @@ runs:
|
||||
working-directory: codex-rs
|
||||
env:
|
||||
TARGET: ${{ inputs.target }}
|
||||
CODEX_MUSL_RELEASE_LINK_FLAGS: "1"
|
||||
run: bash "${GITHUB_WORKSPACE}/.github/scripts/install-musl-build-tools.sh"
|
||||
|
||||
- name: Disable aws-lc jitter entropy (musl)
|
||||
|
||||
@@ -22,7 +22,7 @@ runs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
name: setup-msvc-env
|
||||
description: Expose an MSVC developer environment for the requested Windows target.
|
||||
inputs:
|
||||
target:
|
||||
description: Rust target triple that will be built on this Windows runner.
|
||||
required: true
|
||||
host-arch:
|
||||
description: Optional Visual Studio host architecture override.
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Expose MSVC SDK environment
|
||||
shell: pwsh
|
||||
env:
|
||||
HOST_ARCH: ${{ inputs.host-arch }}
|
||||
TARGET: ${{ inputs.target }}
|
||||
run: '& "$env:GITHUB_ACTION_PATH/setup-msvc-env.ps1" -Target "$env:TARGET" -HostArch "$env:HOST_ARCH"'
|
||||
@@ -1,257 +0,0 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Target,
|
||||
|
||||
[string]$HostArch = ""
|
||||
)
|
||||
|
||||
# Cargo can cross-compile the Rust code for Windows ARM64 on a Windows x64
|
||||
# runner, but rustup alone does not expose the matching MSVC/UCRT include and
|
||||
# library paths. Ask Visual Studio for the target-specific developer
|
||||
# environment, then persist the relevant variables through GITHUB_ENV so the
|
||||
# later Cargo step sees the same environment as a normal VsDevCmd shell.
|
||||
switch ($Target) {
|
||||
"x86_64-pc-windows-msvc" {
|
||||
$TargetArch = "x64"
|
||||
$RequiredComponent = "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
|
||||
}
|
||||
"aarch64-pc-windows-msvc" {
|
||||
$TargetArch = "arm64"
|
||||
$RequiredComponent = "Microsoft.VisualStudio.Component.VC.Tools.ARM64"
|
||||
}
|
||||
default {
|
||||
throw "Unsupported Windows MSVC target: $Target"
|
||||
}
|
||||
}
|
||||
|
||||
# VsDevCmd needs both sides of the cross compile: the architecture of the
|
||||
# machine running the tools and the architecture of the binaries being linked.
|
||||
# Infer the host from the runner unless a caller needs to override it.
|
||||
if (-not $HostArch) {
|
||||
$HostArch = if ($env:PROCESSOR_ARCHITEW6432 -eq "ARM64" -or $env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
|
||||
"arm64"
|
||||
} else {
|
||||
"x64"
|
||||
}
|
||||
}
|
||||
|
||||
$VsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
if (-not (Test-Path $VsWhere)) {
|
||||
throw "vswhere.exe not found"
|
||||
}
|
||||
|
||||
# Require the target VC tools component, not merely any Visual Studio install,
|
||||
# so an x64 archive producer cannot silently link ARM64 tests with the wrong
|
||||
# SDK/toolchain layout.
|
||||
$InstallPath = & $VsWhere -latest -products * -requires $RequiredComponent -property installationPath 2>$null
|
||||
if (-not $InstallPath) {
|
||||
throw "Could not locate a Visual Studio installation with component $RequiredComponent"
|
||||
}
|
||||
|
||||
$VsDevCmd = Join-Path $InstallPath "Common7\Tools\VsDevCmd.bat"
|
||||
if (-not (Test-Path $VsDevCmd)) {
|
||||
throw "VsDevCmd.bat not found at $VsDevCmd"
|
||||
}
|
||||
|
||||
$VarsToExport = @(
|
||||
"INCLUDE",
|
||||
"LIB",
|
||||
"LIBPATH",
|
||||
"PATH",
|
||||
"UCRTVersion",
|
||||
"UniversalCRTSdkDir",
|
||||
"VCINSTALLDIR",
|
||||
"VCToolsInstallDir",
|
||||
"WindowsLibPath",
|
||||
"WindowsSdkBinPath",
|
||||
"WindowsSdkDir",
|
||||
"WindowsSDKLibVersion",
|
||||
"WindowsSDKVersion"
|
||||
)
|
||||
|
||||
# Run VsDevCmd inside cmd.exe because it is a batch file, then copy just the
|
||||
# variables Cargo/rustc need into the GitHub Actions environment file. PowerShell
|
||||
# cannot mutate the parent composite-action environment directly.
|
||||
$EnvLines = & cmd.exe /c ('"{0}" -no_logo -arch={1} -host_arch={2} >nul && set' -f $VsDevCmd, $TargetArch, $HostArch)
|
||||
$VcToolsInstallDir = $null
|
||||
foreach ($Line in $EnvLines) {
|
||||
if ($Line -notmatch "^(.*?)=(.*)$") {
|
||||
continue
|
||||
}
|
||||
|
||||
$Name = $Matches[1]
|
||||
$Value = $Matches[2]
|
||||
if ($VarsToExport -contains $Name) {
|
||||
if ($Name -ieq "Path") {
|
||||
$Name = "PATH"
|
||||
}
|
||||
if ($Name -eq "VCToolsInstallDir") {
|
||||
$VcToolsInstallDir = $Value
|
||||
}
|
||||
"$Name=$Value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $VcToolsInstallDir) {
|
||||
throw "VCToolsInstallDir was not exported by VsDevCmd.bat"
|
||||
}
|
||||
|
||||
# Prefer Rust's bundled linker when rustup provides one, then Visual Studio's
|
||||
# LLVM linker, and finally MSVC link.exe. This keeps the cross-compile path close
|
||||
# to Rust's normal Windows MSVC behavior while still working on runner images
|
||||
# where one of those linkers is absent.
|
||||
$Linker = $null
|
||||
$Rustc = Get-Command rustc -ErrorAction SilentlyContinue
|
||||
if ($Rustc) {
|
||||
$Sysroot = (& rustc --print sysroot 2>$null).Trim()
|
||||
$RustHost = & rustc -vV 2>$null | Select-String "^host: " | ForEach-Object { $_.Line.Substring(6) }
|
||||
if ($RustHost) {
|
||||
$RustHost = $RustHost.Trim()
|
||||
}
|
||||
if ($Sysroot -and $RustHost) {
|
||||
$RustLld = Join-Path $Sysroot "lib\rustlib\$RustHost\bin\rust-lld.exe"
|
||||
if (Test-Path $RustLld) {
|
||||
$Linker = $RustLld
|
||||
}
|
||||
}
|
||||
}
|
||||
if (-not $Linker) {
|
||||
$Linker = Join-Path $InstallPath "VC\Tools\Llvm\x64\bin\lld-link.exe"
|
||||
}
|
||||
if (-not (Test-Path $Linker)) {
|
||||
$Linker = Join-Path $VcToolsInstallDir "bin\Host${HostArch}\${TargetArch}\link.exe"
|
||||
}
|
||||
if (-not (Test-Path $Linker)) {
|
||||
throw "Windows linker not found at $Linker"
|
||||
}
|
||||
|
||||
# rustc passes `/arm64hazardfree` for ARM64 MSVC links. The lld variants on our
|
||||
# Windows x64 archive producers reject that flag, including when rustc places it
|
||||
# inside a response file. Compile a tiny forwarding wrapper that strips only
|
||||
# that unsupported flag, then delegate every other argument to the real linker.
|
||||
if ($TargetArch -eq "arm64" -and (Split-Path -Leaf $Linker) -match "lld") {
|
||||
$WrapperDir = Join-Path $env:RUNNER_TEMP "msvc-lld-wrapper"
|
||||
New-Item -Path $WrapperDir -ItemType Directory -Force | Out-Null
|
||||
$WrapperPath = Join-Path $WrapperDir "lld-link-wrapper.exe"
|
||||
$WrapperSource = @'
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
private static int Main(string[] args)
|
||||
{
|
||||
var linker = Environment.GetEnvironmentVariable("MSVC_REAL_LINKER");
|
||||
if (string.IsNullOrEmpty(linker))
|
||||
{
|
||||
Console.Error.WriteLine("MSVC_REAL_LINKER is not set");
|
||||
return 1;
|
||||
}
|
||||
|
||||
var startInfo = new ProcessStartInfo(linker)
|
||||
{
|
||||
UseShellExecute = false,
|
||||
};
|
||||
var filteredArgs = new List<string> { "-flavor", "link", "/defaultlib:ucrt", "/nodefaultlib:libucrt" };
|
||||
foreach (var arg in args)
|
||||
{
|
||||
if (!string.Equals(arg, "/arm64hazardfree", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
filteredArgs.Add(QuoteArgument(FilterResponseFile(arg)));
|
||||
}
|
||||
}
|
||||
startInfo.Arguments = string.Join(" ", filteredArgs);
|
||||
|
||||
using var process = Process.Start(startInfo);
|
||||
if (process is null)
|
||||
{
|
||||
Console.Error.WriteLine($"Failed to start linker: {linker}");
|
||||
return 1;
|
||||
}
|
||||
|
||||
process.WaitForExit();
|
||||
return process.ExitCode;
|
||||
}
|
||||
|
||||
private static string FilterResponseFile(string argument)
|
||||
{
|
||||
if (argument.Length < 2 || argument[0] != '@')
|
||||
{
|
||||
return argument;
|
||||
}
|
||||
|
||||
var responsePath = argument.Substring(1);
|
||||
if (!File.Exists(responsePath))
|
||||
{
|
||||
return argument;
|
||||
}
|
||||
|
||||
var filteredResponsePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".rsp");
|
||||
var responseContents = Regex.Replace(
|
||||
File.ReadAllText(responsePath),
|
||||
"/arm64hazardfree",
|
||||
string.Empty,
|
||||
RegexOptions.IgnoreCase);
|
||||
File.WriteAllText(filteredResponsePath, responseContents);
|
||||
return "@" + filteredResponsePath;
|
||||
}
|
||||
|
||||
private static string QuoteArgument(string argument)
|
||||
{
|
||||
if (argument.Length == 0)
|
||||
{
|
||||
return "\"\"";
|
||||
}
|
||||
if (argument.IndexOfAny(new[] { ' ', '\t', '"' }) < 0)
|
||||
{
|
||||
return argument;
|
||||
}
|
||||
|
||||
var quoted = new StringBuilder("\"");
|
||||
var backslashes = 0;
|
||||
foreach (var character in argument)
|
||||
{
|
||||
if (character == '\\')
|
||||
{
|
||||
backslashes++;
|
||||
continue;
|
||||
}
|
||||
if (character == '"')
|
||||
{
|
||||
quoted.Append('\\', (backslashes * 2) + 1);
|
||||
quoted.Append(character);
|
||||
backslashes = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
quoted.Append('\\', backslashes);
|
||||
backslashes = 0;
|
||||
quoted.Append(character);
|
||||
}
|
||||
quoted.Append('\\', backslashes * 2);
|
||||
quoted.Append('"');
|
||||
return quoted.ToString();
|
||||
}
|
||||
}
|
||||
'@
|
||||
$WrapperSourcePath = Join-Path $WrapperDir "lld-link-wrapper.cs"
|
||||
$WrapperSource | Out-File -FilePath $WrapperSourcePath -Encoding utf8
|
||||
$Csc = Join-Path $InstallPath "MSBuild\Current\Bin\Roslyn\csc.exe"
|
||||
if (-not (Test-Path $Csc)) {
|
||||
throw "csc.exe not found at $Csc"
|
||||
}
|
||||
& $Csc /nologo /target:exe /out:$WrapperPath $WrapperSourcePath
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Failed to compile lld-link wrapper"
|
||||
}
|
||||
"MSVC_REAL_LINKER=$Linker" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
$Linker = $WrapperPath
|
||||
}
|
||||
|
||||
Write-Output "Using Windows linker: $Linker"
|
||||
$CargoTarget = $Target.ToUpperInvariant().Replace("-", "_")
|
||||
"CARGO_TARGET_${CargoTarget}_LINKER=$Linker" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
@@ -1,80 +0,0 @@
|
||||
name: windows-code-sign
|
||||
description: Sign Windows release files with Azure Trusted Signing.
|
||||
inputs:
|
||||
target:
|
||||
description: Target triple for the artifacts to sign.
|
||||
required: true
|
||||
binaries:
|
||||
description: Space-delimited binary basenames to sign.
|
||||
default: "codex codex-responses-api-proxy codex-windows-sandbox-setup codex-command-runner"
|
||||
additional-files:
|
||||
description: Newline-delimited absolute paths to additional files to sign.
|
||||
default: ""
|
||||
client-id:
|
||||
description: Azure Trusted Signing client ID.
|
||||
required: true
|
||||
tenant-id:
|
||||
description: Azure tenant ID for Trusted Signing.
|
||||
required: true
|
||||
subscription-id:
|
||||
description: Azure subscription ID for Trusted Signing.
|
||||
required: true
|
||||
endpoint:
|
||||
description: Azure Trusted Signing endpoint.
|
||||
required: true
|
||||
account-name:
|
||||
description: Azure Trusted Signing account name.
|
||||
required: true
|
||||
certificate-profile-name:
|
||||
description: Certificate profile name for signing.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Azure login for Trusted Signing (OIDC)
|
||||
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
|
||||
with:
|
||||
client-id: ${{ inputs.client-id }}
|
||||
tenant-id: ${{ inputs.tenant-id }}
|
||||
subscription-id: ${{ inputs.subscription-id }}
|
||||
|
||||
- name: Prepare file list
|
||||
id: prepare
|
||||
shell: bash
|
||||
env:
|
||||
TARGET: ${{ inputs.target }}
|
||||
BINARIES: ${{ inputs.binaries }}
|
||||
ADDITIONAL_FILES: ${{ inputs.additional-files }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
{
|
||||
echo "files<<EOF"
|
||||
for binary in ${BINARIES}; do
|
||||
echo "${CARGO_TARGET_DIR}/${TARGET}/release/${binary}.exe"
|
||||
done
|
||||
if [[ -n "$ADDITIONAL_FILES" ]]; then
|
||||
printf '%s\n' "$ADDITIONAL_FILES"
|
||||
fi
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Sign Windows release files with Azure Trusted Signing
|
||||
uses: azure/trusted-signing-action@1d365fec12862c4aa68fcac418143d73f0cea293 # v0.5.11
|
||||
with:
|
||||
endpoint: ${{ inputs.endpoint }}
|
||||
trusted-signing-account-name: ${{ inputs.account-name }}
|
||||
certificate-profile-name: ${{ inputs.certificate-profile-name }}
|
||||
exclude-environment-credential: true
|
||||
exclude-workload-identity-credential: true
|
||||
exclude-managed-identity-credential: true
|
||||
exclude-shared-token-cache-credential: true
|
||||
exclude-visual-studio-credential: true
|
||||
exclude-visual-studio-code-credential: true
|
||||
exclude-azure-cli-credential: false
|
||||
exclude-azure-powershell-credential: true
|
||||
exclude-azure-developer-cli-credential: true
|
||||
exclude-interactive-browser-credential: true
|
||||
cache-dependencies: false
|
||||
files: ${{ steps.prepare.outputs.files }}
|
||||
@@ -1,113 +0,0 @@
|
||||
<#
|
||||
BuildBuddy cache keys include the action and test environment, so Bazel should
|
||||
not inherit the full hosted-runner PATH on Windows. That PATH includes volatile
|
||||
tool entries, such as Maven, that can change independently of this repo and
|
||||
cause avoidable cache misses.
|
||||
|
||||
This script derives a smaller, cache-stable PATH that keeps the Windows
|
||||
toolchain entries Bazel-backed CI tasks need: MSVC and Windows SDK paths,
|
||||
MinGW runtime DLL paths for gnullvm-built tests, Git, PowerShell, Node, Python,
|
||||
DotSlash, and the standard Windows system directories.
|
||||
`prepare-bazel-ci` runs this after exporting the MSVC environment, and the script
|
||||
publishes the result via `GITHUB_ENV` as `CODEX_BAZEL_WINDOWS_PATH` so later
|
||||
steps can pass that explicit PATH to Bazel.
|
||||
#>
|
||||
|
||||
$stablePathEntries = New-Object System.Collections.Generic.List[string]
|
||||
$seenEntries = [System.Collections.Generic.HashSet[string]]::new([System.StringComparer]::OrdinalIgnoreCase)
|
||||
$windowsAppsPath = if ([string]::IsNullOrWhiteSpace($env:LOCALAPPDATA)) {
|
||||
$null
|
||||
} else {
|
||||
"$($env:LOCALAPPDATA)\Microsoft\WindowsApps"
|
||||
}
|
||||
$windowsDir = if ($env:WINDIR) {
|
||||
$env:WINDIR
|
||||
} elseif ($env:SystemRoot) {
|
||||
$env:SystemRoot
|
||||
} else {
|
||||
$null
|
||||
}
|
||||
|
||||
function Add-StablePathEntry {
|
||||
param([string]$PathEntry)
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($PathEntry)) {
|
||||
return
|
||||
}
|
||||
|
||||
if ($seenEntries.Add($PathEntry)) {
|
||||
[void]$stablePathEntries.Add($PathEntry)
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($pathEntry in ($env:PATH -split ';')) {
|
||||
if ([string]::IsNullOrWhiteSpace($pathEntry)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (
|
||||
$pathEntry -like '*Microsoft Visual Studio*' -or
|
||||
$pathEntry -like '*Windows Kits*' -or
|
||||
$pathEntry -like '*Microsoft SDKs*' -or
|
||||
$pathEntry -eq 'C:\mingw64\bin' -or
|
||||
$pathEntry -like 'C:\msys64\*\bin' -or
|
||||
$pathEntry -like 'C:\Program Files\Git\*' -or
|
||||
$pathEntry -like 'C:\Program Files\PowerShell\*' -or
|
||||
$pathEntry -like 'C:\hostedtoolcache\windows\node\*' -or
|
||||
$pathEntry -like 'C:\hostedtoolcache\windows\Python\*' -or
|
||||
$pathEntry -eq 'D:\a\_temp\install-dotslash\bin' -or
|
||||
($windowsDir -and ($pathEntry -eq $windowsDir -or $pathEntry -like "${windowsDir}\*"))
|
||||
) {
|
||||
Add-StablePathEntry $pathEntry
|
||||
}
|
||||
}
|
||||
|
||||
$gitCommand = Get-Command git -ErrorAction SilentlyContinue
|
||||
if ($gitCommand) {
|
||||
Add-StablePathEntry (Split-Path $gitCommand.Source -Parent)
|
||||
}
|
||||
|
||||
$nodeCommand = Get-Command node -ErrorAction SilentlyContinue
|
||||
if ($nodeCommand) {
|
||||
Add-StablePathEntry (Split-Path $nodeCommand.Source -Parent)
|
||||
}
|
||||
|
||||
$python3Command = Get-Command python3 -ErrorAction SilentlyContinue
|
||||
if ($python3Command) {
|
||||
Add-StablePathEntry (Split-Path $python3Command.Source -Parent)
|
||||
}
|
||||
|
||||
$pythonCommand = Get-Command python -ErrorAction SilentlyContinue
|
||||
if ($pythonCommand) {
|
||||
Add-StablePathEntry (Split-Path $pythonCommand.Source -Parent)
|
||||
}
|
||||
|
||||
$pwshCommand = Get-Command pwsh -ErrorAction SilentlyContinue
|
||||
if ($pwshCommand) {
|
||||
Add-StablePathEntry (Split-Path $pwshCommand.Source -Parent)
|
||||
}
|
||||
|
||||
foreach ($mingwPath in @('C:\mingw64\bin', 'C:\msys64\mingw64\bin', 'C:\msys64\ucrt64\bin')) {
|
||||
if (Test-Path $mingwPath) {
|
||||
Add-StablePathEntry $mingwPath
|
||||
}
|
||||
}
|
||||
|
||||
if ($windowsAppsPath) {
|
||||
Add-StablePathEntry $windowsAppsPath
|
||||
}
|
||||
|
||||
if ($stablePathEntries.Count -eq 0) {
|
||||
throw 'Failed to derive cache-stable Windows PATH.'
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($env:GITHUB_ENV)) {
|
||||
throw 'GITHUB_ENV must be set.'
|
||||
}
|
||||
|
||||
$stablePath = $stablePathEntries -join ';'
|
||||
Write-Host 'Derived CODEX_BAZEL_WINDOWS_PATH entries:'
|
||||
foreach ($pathEntry in $stablePathEntries) {
|
||||
Write-Host " $pathEntry"
|
||||
}
|
||||
"CODEX_BAZEL_WINDOWS_PATH=$stablePath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
@@ -261,6 +261,12 @@ target_cxx_var="CXX_${TARGET}"
|
||||
target_cxx_var="${target_cxx_var//-/_}"
|
||||
echo "${target_cxx_var}=${cxx}" >> "$GITHUB_ENV"
|
||||
|
||||
# Fold identical code and pack relocations for x86-64 musl release packages.
|
||||
if [[ "${TARGET}" == "x86_64-unknown-linux-musl" && "${CODEX_MUSL_RELEASE_LINK_FLAGS:-}" == "1" ]]; then
|
||||
link_flags=(-Cllvm-args=--addrsig -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,--icf=safe,-z,pack-relative-relocs)
|
||||
echo "RUSTFLAGS=${RUSTFLAGS:+$RUSTFLAGS }${link_flags[*]}" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
cargo_linker_var="CARGO_TARGET_${TARGET^^}_LINKER"
|
||||
cargo_linker_var="${cargo_linker_var//-/_}"
|
||||
echo "${cargo_linker_var}=${musl_linker}" >> "$GITHUB_ENV"
|
||||
|
||||
@@ -68,19 +68,21 @@ for command_name in python3 zip; do
|
||||
fi
|
||||
done
|
||||
|
||||
missing_environment=0
|
||||
for variable_name in \
|
||||
APPLE_NOTARIZATION_AKV_KEY_NAME \
|
||||
AZURE_KEYVAULT_NAME
|
||||
do
|
||||
if [[ -z "${!variable_name:-}" ]]; then
|
||||
echo "$variable_name must be configured before notarizing a binary." >&2
|
||||
missing_environment=1
|
||||
fi
|
||||
done
|
||||
if [[ "${APPLE_NOTARIZATION_BACKEND:-akv}" != signer-service ]]; then
|
||||
missing_environment=0
|
||||
for variable_name in \
|
||||
APPLE_NOTARIZATION_AKV_KEY_NAME \
|
||||
AZURE_KEYVAULT_NAME
|
||||
do
|
||||
if [[ -z "${!variable_name:-}" ]]; then
|
||||
echo "$variable_name must be configured before notarizing a binary." >&2
|
||||
missing_environment=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$missing_environment" -ne 0 ]]; then
|
||||
exit 2
|
||||
if [[ "$missing_environment" -ne 0 ]]; then
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$report_dir"
|
||||
|
||||
@@ -15,6 +15,7 @@ import time
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import uuid
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
@@ -165,14 +166,22 @@ def base64url_decode(value: str) -> bytes:
|
||||
|
||||
|
||||
def create_apple_jwt(
|
||||
configuration: NotarizationConfiguration, *, issued_at: int
|
||||
configuration: NotarizationConfiguration | None, *, issued_at: int
|
||||
) -> str:
|
||||
"""Create an authentication token for notarization requests."""
|
||||
"""Create Apple's JWT; a None configuration selects Signer Service."""
|
||||
|
||||
header = {"alg": "ES256", "kid": configuration.apple_key_id, "typ": "JWT"}
|
||||
header = {
|
||||
"alg": "ES256",
|
||||
"kid": configuration.apple_key_id
|
||||
if configuration
|
||||
else os.environ["APPLE_NOTARIZATION_KEY_ID"],
|
||||
"typ": "JWT",
|
||||
}
|
||||
# Restrict the token to notarization requests.
|
||||
claims = {
|
||||
"iss": configuration.issuer_id,
|
||||
"iss": configuration.issuer_id
|
||||
if configuration
|
||||
else os.environ["APPLE_NOTARIZATION_ISSUER_ID"],
|
||||
"iat": issued_at,
|
||||
"exp": issued_at + JWT_LIFETIME_SECONDS,
|
||||
"aud": "appstoreconnect-v1",
|
||||
@@ -186,6 +195,9 @@ def create_apple_jwt(
|
||||
)
|
||||
signing_input = f"{encoded_header}.{encoded_claims}"
|
||||
digest = hashlib.sha256(signing_input.encode("ascii")).digest()
|
||||
if configuration is None:
|
||||
signature = sign_digest_with_signer_service(digest)
|
||||
return f"{signing_input}.{base64url_encode(signature)}"
|
||||
key_url = configuration.versioned_key_id
|
||||
request_body = json.dumps({"alg": "ES256", "value": base64url_encode(digest)})
|
||||
|
||||
@@ -240,6 +252,87 @@ def create_apple_jwt(
|
||||
return f"{signing_input}.{base64url_encode(signature)}"
|
||||
|
||||
|
||||
def sign_digest_with_signer_service(digest: bytes) -> bytes:
|
||||
"""Sign the Apple JWT digest with the configured Signer Service key."""
|
||||
|
||||
endpoint = os.environ["APPLE_NOTARIZATION_SIGNER_ENDPOINT"]
|
||||
url = urllib.parse.urlsplit(os.environ["ACTIONS_ID_TOKEN_REQUEST_URL"])
|
||||
query = dict(urllib.parse.parse_qsl(url.query), audience=endpoint)
|
||||
request = urllib.request.Request(
|
||||
urllib.parse.urlunsplit(url._replace(query=urllib.parse.urlencode(query))),
|
||||
headers={
|
||||
"Authorization": "Bearer " + os.environ["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]
|
||||
},
|
||||
)
|
||||
try:
|
||||
with urllib.request.urlopen(request, timeout=30) as response:
|
||||
token = json.load(response)["value"]
|
||||
except urllib.error.HTTPError as error:
|
||||
raise NotarizationError(
|
||||
f"GitHub OIDC request returned HTTP {error.code}"
|
||||
) from None
|
||||
except OSError:
|
||||
raise NotarizationError(
|
||||
"GitHub OIDC request failed; transport details redacted"
|
||||
) from None
|
||||
except (ValueError, KeyError, TypeError):
|
||||
raise NotarizationError(
|
||||
"GitHub OIDC returned an invalid token response"
|
||||
) from None
|
||||
proto = Path(os.environ["APPLE_NOTARIZATION_SIGNER_PROTO"])
|
||||
try:
|
||||
result = subprocess.run(
|
||||
[
|
||||
"grpcurl",
|
||||
"-import-path",
|
||||
str(proto.parent),
|
||||
"-proto",
|
||||
proto.name,
|
||||
"-max-time",
|
||||
"30",
|
||||
"-expand-headers",
|
||||
"-rpc-header",
|
||||
"authorization: Bearer ${NOTARIZATION_OIDC_TOKEN}",
|
||||
"-rpc-header",
|
||||
f"x-openai-route-key: {uuid.uuid4()}",
|
||||
"-d",
|
||||
"@",
|
||||
urllib.parse.urlsplit(endpoint).netloc + ":443",
|
||||
"oaiproto.security.signer.v1.SignerService/Sign",
|
||||
],
|
||||
input=json.dumps(
|
||||
{
|
||||
"purpose": os.environ["APPLE_NOTARIZATION_SIGNER_PURPOSE"],
|
||||
"digest": base64.b64encode(digest).decode(),
|
||||
}
|
||||
),
|
||||
env={**os.environ, "NOTARIZATION_OIDC_TOKEN": token},
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
except (OSError, subprocess.CalledProcessError):
|
||||
# grpcurl errors may contain authorization headers or response bodies.
|
||||
raise NotarizationError(
|
||||
"Signer Service signing request failed; details redacted"
|
||||
) from None
|
||||
try:
|
||||
result = json.loads(result.stdout)
|
||||
key_id, algorithm = result["keyId"], result["algorithm"]
|
||||
signature = base64.b64decode(result["signature"], validate=True)
|
||||
except (ValueError, KeyError, TypeError):
|
||||
raise NotarizationError(
|
||||
"Signer Service returned an invalid signing response"
|
||||
) from None
|
||||
if key_id != os.environ["APPLE_NOTARIZATION_SIGNER_KEY_ID"]:
|
||||
raise NotarizationError("Signer Service returned an unexpected signing key")
|
||||
if algorithm != "SIGNING_ALGORITHM_ECDSA_P256_SHA256":
|
||||
raise NotarizationError(
|
||||
"Signer Service returned an unexpected signing algorithm"
|
||||
)
|
||||
return signature
|
||||
|
||||
|
||||
def json_request(
|
||||
url: str, token: str, *, body: dict[str, Any] | None = None
|
||||
) -> dict[str, Any]:
|
||||
@@ -416,12 +509,12 @@ def write_developer_log(
|
||||
|
||||
def notarize(
|
||||
path: Path,
|
||||
configuration: NotarizationConfiguration,
|
||||
configuration: NotarizationConfiguration | None,
|
||||
*,
|
||||
max_wait_seconds: int,
|
||||
report_log: Path | None,
|
||||
) -> str:
|
||||
"""Submit an artifact, upload it to Apple, and wait for a terminal result."""
|
||||
"""Submit an artifact and await Apple's result; None selects Signer Service."""
|
||||
|
||||
issued_at = int(time.time())
|
||||
token = create_apple_jwt(configuration, issued_at=issued_at)
|
||||
@@ -503,13 +596,24 @@ def main() -> int:
|
||||
raise NotarizationError("--max-wait-seconds must be non-negative")
|
||||
if arguments.report_log is not None:
|
||||
arguments.report_log.parent.mkdir(parents=True, exist_ok=True)
|
||||
backend = os.environ.get("APPLE_NOTARIZATION_BACKEND", "akv")
|
||||
if backend not in {"akv", "signer-service"}:
|
||||
raise NotarizationError(
|
||||
"APPLE_NOTARIZATION_BACKEND must be akv or signer-service"
|
||||
)
|
||||
configuration = (
|
||||
NotarizationConfiguration.from_environment() if backend == "akv" else None
|
||||
)
|
||||
notarize(
|
||||
arguments.file,
|
||||
NotarizationConfiguration.from_environment(),
|
||||
configuration,
|
||||
max_wait_seconds=arguments.max_wait_seconds,
|
||||
report_log=arguments.report_log,
|
||||
)
|
||||
except NotarizationError as error:
|
||||
except KeyError as error:
|
||||
print(f"Missing notarization configuration: {error.args[0]}", file=sys.stderr)
|
||||
return 1
|
||||
except (NotarizationError, OSError) as error:
|
||||
print(f"Notarization failed: {error}", file=sys.stderr)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -188,15 +188,20 @@ def verify(package, reports, expected_target, configuration: ProfileConfiguratio
|
||||
binary = package / relative
|
||||
target = package / APP if relative == EXECUTABLE else binary
|
||||
prefix = reports / f"{binary.name}-cert-"
|
||||
subprocess.run(
|
||||
["codesign", "-d", f"--extract-certificates={prefix}", str(target)],
|
||||
check=True,
|
||||
)
|
||||
if (
|
||||
hashlib.sha256(Path(f"{prefix}0").read_bytes()).hexdigest()
|
||||
!= configuration.certificate_sha256
|
||||
):
|
||||
raise ValueError(f"Unexpected signing certificate: {relative}")
|
||||
verify_certificate(target, prefix, configuration)
|
||||
|
||||
|
||||
def verify_certificate(target, prefix, configuration: ProfileConfiguration):
|
||||
"""Require the independently approved leaf certificate for each signed executable."""
|
||||
subprocess.run(
|
||||
["codesign", "-d", f"--extract-certificates={prefix}", str(target)],
|
||||
check=True,
|
||||
)
|
||||
if (
|
||||
hashlib.sha256(Path(f"{prefix}0").read_bytes()).hexdigest()
|
||||
!= configuration.certificate_sha256
|
||||
):
|
||||
raise ValueError(f"Unexpected signing certificate: {target}")
|
||||
|
||||
|
||||
def parse_profile_args(parser, configuration: ProfileConfiguration | None):
|
||||
|
||||
@@ -12,7 +12,7 @@ import provisioned_macos_cli_package as bundle
|
||||
|
||||
def main(configuration: bundle.ProfileConfiguration | None = None):
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("operation", choices=("sign", "verify"))
|
||||
parser.add_argument("operation", choices=("sign", "sign-only", "verify"))
|
||||
parser.add_argument("package", type=Path)
|
||||
args, configuration = bundle.parse_profile_args(parser, configuration)
|
||||
package = args.package.resolve(strict=True)
|
||||
@@ -24,11 +24,13 @@ def main(configuration: bundle.ProfileConfiguration | None = None):
|
||||
reports = Path(repo_root) / "signing-verification"
|
||||
reports.mkdir(parents=True, exist_ok=True)
|
||||
provisioned = os.environ.get("PROVISIONED_MACOS", "false") == "true"
|
||||
signing = args.operation in ("sign", "sign-only")
|
||||
if signing:
|
||||
configuration.validate_signing_certificate(
|
||||
Path(os.environ["OAI_AKV_SIGNING_CERTIFICATE_PEM"])
|
||||
)
|
||||
if provisioned:
|
||||
if args.operation == "sign":
|
||||
configuration.validate_signing_certificate(
|
||||
Path(os.environ["OAI_AKV_SIGNING_CERTIFICATE_PEM"])
|
||||
)
|
||||
if signing:
|
||||
bundle.prepare(package, reports, configuration)
|
||||
else:
|
||||
bundle.verify(package, reports, os.environ["TARGET"], configuration)
|
||||
@@ -44,7 +46,7 @@ def main(configuration: bundle.ProfileConfiguration | None = None):
|
||||
target = package / bundle.APP
|
||||
identifier = bundle.CODE_SIGNING_ID
|
||||
entitlements = reports / "codex-provisioned-entitlements.plist"
|
||||
if args.operation == "sign":
|
||||
if signing:
|
||||
command = [
|
||||
"bash",
|
||||
str(bundle.SIGNING / "sign_macos_code.sh"),
|
||||
@@ -72,7 +74,7 @@ def main(configuration: bundle.ProfileConfiguration | None = None):
|
||||
stdout=output,
|
||||
check=True,
|
||||
)
|
||||
if not provisioned:
|
||||
if args.operation == "sign" and not provisioned:
|
||||
subprocess.run(
|
||||
[
|
||||
"bash",
|
||||
@@ -103,11 +105,11 @@ def main(configuration: bundle.ProfileConfiguration | None = None):
|
||||
" and certificate 1[field.1.2.840.113635.100.6.2.6] exists"
|
||||
" and certificate leaf[field.1.2.840.113635.100.6.1.13] exists"
|
||||
)
|
||||
requirement += (
|
||||
f' and certificate leaf[subject.OU] = "{configuration.team_id}"'
|
||||
)
|
||||
if provisioned and relative == "bin/codex":
|
||||
requirement += (
|
||||
f' and identifier "{bundle.CODE_SIGNING_ID}"'
|
||||
f' and certificate leaf[subject.OU] = "{configuration.team_id}"'
|
||||
)
|
||||
requirement += f' and identifier "{bundle.CODE_SIGNING_ID}"'
|
||||
subprocess.run(
|
||||
[
|
||||
"codesign",
|
||||
@@ -120,6 +122,10 @@ def main(configuration: bundle.ProfileConfiguration | None = None):
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
if not provisioned:
|
||||
bundle.verify_certificate(
|
||||
target, reports / f"{name}-cert-", configuration
|
||||
)
|
||||
signature = reports / f"{name}-signature.txt"
|
||||
with signature.open("wb") as output:
|
||||
subprocess.run(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import base64
|
||||
import contextlib
|
||||
import hashlib
|
||||
import io
|
||||
@@ -148,6 +149,73 @@ class NotarizationTest(unittest.TestCase):
|
||||
):
|
||||
notary.create_apple_jwt(CONFIGURATION, issued_at=1)
|
||||
|
||||
def test_signer_service_refreshes_tokens_without_azure(self):
|
||||
environment = {
|
||||
"APPLE_NOTARIZATION_BACKEND": "signer-service",
|
||||
"APPLE_NOTARIZATION_ISSUER_ID": CONFIGURATION.issuer_id,
|
||||
"APPLE_NOTARIZATION_KEY_ID": CONFIGURATION.apple_key_id,
|
||||
"APPLE_NOTARIZATION_SIGNER_ENDPOINT": "https://signer.example.com",
|
||||
"APPLE_NOTARIZATION_SIGNER_PURPOSE": "test-notarization",
|
||||
"APPLE_NOTARIZATION_SIGNER_KEY_ID": "expected-key",
|
||||
"APPLE_NOTARIZATION_SIGNER_PROTO": "/tmp/notarization_signer.proto",
|
||||
"ACTIONS_ID_TOKEN_REQUEST_URL": "https://pipelines.actions.githubusercontent.com/token",
|
||||
"ACTIONS_ID_TOKEN_REQUEST_TOKEN": "request-secret",
|
||||
}
|
||||
with (
|
||||
tempfile.NamedTemporaryFile() as artifact,
|
||||
patch.dict(os.environ, environment, clear=True),
|
||||
patch.object(
|
||||
sys, "argv", ["notarize_with_akv.py", "--file", artifact.name]
|
||||
),
|
||||
patch.object(notary.time, "time", side_effect=[1, 900, 900]),
|
||||
patch.object(
|
||||
notary,
|
||||
"json_request",
|
||||
side_effect=[
|
||||
{"data": {"id": "submission-1", "attributes": CREDENTIALS}},
|
||||
{"data": {"attributes": {"status": "Accepted"}}},
|
||||
],
|
||||
) as request,
|
||||
patch.object(notary, "upload_to_apple_s3"),
|
||||
patch.object(
|
||||
notary.urllib.request,
|
||||
"urlopen",
|
||||
side_effect=[
|
||||
response({"value": "first-oidc"}),
|
||||
response({"value": "fresh-oidc"}),
|
||||
],
|
||||
),
|
||||
patch.object(
|
||||
notary.subprocess,
|
||||
"run",
|
||||
return_value=azure_response(
|
||||
{
|
||||
"keyId": "expected-key",
|
||||
"algorithm": "SIGNING_ALGORITHM_ECDSA_P256_SHA256",
|
||||
"signature": base64.b64encode(bytes(64)).decode(),
|
||||
}
|
||||
),
|
||||
) as sign,
|
||||
):
|
||||
self.assertEqual(notary.main(), 0)
|
||||
self.assertEqual(
|
||||
[
|
||||
json.loads(notary.base64url_decode(entry.args[1].split(".")[1]))["iat"]
|
||||
for entry in request.call_args_list
|
||||
],
|
||||
[1, 900],
|
||||
)
|
||||
self.assertEqual(
|
||||
[entry.args[0][0] for entry in sign.call_args_list], ["grpcurl", "grpcurl"]
|
||||
)
|
||||
self.assertEqual(
|
||||
[
|
||||
entry.kwargs["env"]["NOTARIZATION_OIDC_TOKEN"]
|
||||
for entry in sign.call_args_list
|
||||
],
|
||||
["first-oidc", "fresh-oidc"],
|
||||
)
|
||||
|
||||
def test_uploads_polls_and_retains_sanitized_apple_diagnostics(self) -> None:
|
||||
signature = azure_response(
|
||||
{
|
||||
@@ -224,8 +292,17 @@ class NotarizationWrapperTest(unittest.TestCase):
|
||||
f"#!/usr/bin/env bash\nset -euo pipefail\n{body}\n"
|
||||
)
|
||||
executable.chmod(0o755)
|
||||
for kind in ("binary", "dmg"):
|
||||
with self.subTest(kind=kind):
|
||||
for kind, backend in (
|
||||
("binary", "akv"),
|
||||
("dmg", "akv"),
|
||||
("binary", "signer-service"),
|
||||
):
|
||||
selected_environment = dict(environment)
|
||||
if backend == "signer-service":
|
||||
selected_environment["APPLE_NOTARIZATION_BACKEND"] = backend
|
||||
for name in ENVIRONMENT:
|
||||
selected_environment.pop(name, None)
|
||||
with self.subTest(kind=kind, backend=backend):
|
||||
artifact = root / ("codex.dmg" if kind == "dmg" else "codex")
|
||||
artifact.write_bytes(b"signed release artifact")
|
||||
subprocess.run(
|
||||
@@ -238,7 +315,7 @@ class NotarizationWrapperTest(unittest.TestCase):
|
||||
"--report-dir",
|
||||
str(root / "report"),
|
||||
],
|
||||
env=environment,
|
||||
env=selected_environment,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
|
||||
@@ -26,7 +26,7 @@ with open(os.environ["CALL_LOG"], "a") as log:
|
||||
if name == "codesign":
|
||||
for arg in args:
|
||||
if arg.startswith("--extract-certificates="):
|
||||
Path(arg.split("=", 1)[1] + "0").write_bytes(Path(os.environ["MOCK_CERTIFICATE"]).read_bytes())
|
||||
Path(arg.split("=", 1)[1] + "0").write_bytes(b"wrong certificate" if os.environ.get("MOCK_WRONG_CERTIFICATE") else Path(os.environ["MOCK_CERTIFICATE"]).read_bytes())
|
||||
if "--test-requirement" in args and os.environ.get("MOCK_WRONG_SIGNING_IDENTITY"):
|
||||
print("code failed to satisfy specified code requirement(s)", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
@@ -149,6 +149,26 @@ class MacosSigningTests(ProvisioningTestCase):
|
||||
check=False,
|
||||
)
|
||||
|
||||
def test_sign_only_signs_standard_package_without_notarization(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory).resolve()
|
||||
package, driver, env = self.fixture(root, False, "aarch64-apple-darwin")
|
||||
result = self.run_driver(driver, "sign-only", package, env)
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
calls = [
|
||||
json.loads(line)
|
||||
for line in (root / "calls.jsonl").read_text().splitlines()
|
||||
]
|
||||
self.assertEqual(
|
||||
[
|
||||
call[call.index("--target") + 1]
|
||||
for call in calls
|
||||
if call[0] == "sign_macos_code.sh"
|
||||
],
|
||||
[str(package / path) for path in ("bin/codex", *bundle.HELPERS)],
|
||||
)
|
||||
self.assertFalse(any(call[0].startswith("notarize") for call in calls))
|
||||
|
||||
def test_standard_and_provisioned_signing_and_verification(self):
|
||||
for provisioned, target, omit_empty in itertools.product(
|
||||
(False, True),
|
||||
@@ -333,6 +353,7 @@ class MacosSigningTests(ProvisioningTestCase):
|
||||
(
|
||||
"MOCK_WRONG_SIGNING_IDENTITY",
|
||||
"MOCK_WRONG_ENTITLEMENTS",
|
||||
"MOCK_WRONG_CERTIFICATE",
|
||||
"MOCK_EXECUTOR_ENTITLEMENTS",
|
||||
),
|
||||
):
|
||||
@@ -353,6 +374,8 @@ class MacosSigningTests(ProvisioningTestCase):
|
||||
"code failed to satisfy specified code requirement(s)",
|
||||
result.stderr,
|
||||
)
|
||||
elif failure == "MOCK_WRONG_CERTIFICATE":
|
||||
self.assertIn("Unexpected signing certificate", result.stderr)
|
||||
else:
|
||||
self.assertIn("unexpected", result.stdout)
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_api="repos/$GITHUB_REPOSITORY"
|
||||
# Look up this tag, including drafts. A lookup error must abort publication.
|
||||
# shellcheck disable=SC2016
|
||||
exists="$(gh api graphql \
|
||||
-f query='query($owner:String!,$repo:String!,$tag:String!){repository(owner:$owner,name:$repo){release(tagName:$tag){databaseId}}}' \
|
||||
-f owner="$GITHUB_REPOSITORY_OWNER" \
|
||||
-f repo="${GITHUB_REPOSITORY#*/}" \
|
||||
-f tag="$GITHUB_REF_NAME" \
|
||||
--jq '.data.repository.release != null')"
|
||||
|
||||
if [[ "$exists" == false ]]; then
|
||||
# The create API would create a missing tag from the default branch.
|
||||
gh api --silent "$repo_api/git/ref/tags/$GITHUB_REF_NAME"
|
||||
draft=true
|
||||
if [[ "$PRERELEASE" == true ]]; then
|
||||
# Create prereleases directly to preserve the prereleased event.
|
||||
draft=false
|
||||
fi
|
||||
release_id="$(gh api --method POST "$repo_api/releases" \
|
||||
-f tag_name="$GITHUB_REF_NAME" -f name="$RELEASE_NAME" -F "body=@$RELEASE_NOTES" \
|
||||
-F draft="$draft" -F prerelease="$PRERELEASE" -f make_latest=false --jq '.id')"
|
||||
if [[ "$PRERELEASE" == true ]]; then
|
||||
# A maintainer can replace a release under the same tag during upload.
|
||||
trap '
|
||||
echo "Removing incomplete prerelease $release_id" >&2
|
||||
gh api --method DELETE "$repo_api/releases/$release_id" || true
|
||||
' EXIT
|
||||
fi
|
||||
fi
|
||||
|
||||
mapfile -d '' assets < <(find dist -type f -print0 | sort -z)
|
||||
gh release upload "$GITHUB_REF_NAME" "${assets[@]}" --repo "$GITHUB_REPOSITORY" --clobber
|
||||
trap - EXIT
|
||||
|
||||
gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" \
|
||||
--title "$RELEASE_NAME" --notes-file "$RELEASE_NOTES" --prerelease="$PRERELEASE" \
|
||||
--draft=false --latest="$MAKE_LATEST"
|
||||
@@ -1,103 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""Assign Windows Bazel test targets using checked-in duration estimates."""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
DEFAULT_DURATION_SECONDS = 1
|
||||
DURATIONS_PATH = Path(__file__).with_name("windows_bazel_test_durations.tsv")
|
||||
|
||||
|
||||
def read_durations(path: Path) -> dict[str, int]:
|
||||
durations = {}
|
||||
for line_number, line in enumerate(
|
||||
path.read_text(encoding="utf-8").splitlines(), 1
|
||||
):
|
||||
if not line.strip() or line.lstrip().startswith("#"):
|
||||
continue
|
||||
fields = line.split("\t")
|
||||
if len(fields) != 2 or not fields[0] or not fields[1].isdecimal():
|
||||
raise ValueError(
|
||||
f"{path}:{line_number}: expected target<TAB>positive integer"
|
||||
)
|
||||
target, duration_text = fields
|
||||
duration = int(duration_text)
|
||||
if duration < 1:
|
||||
raise ValueError(f"{path}:{line_number}: duration must be positive")
|
||||
if target in durations:
|
||||
raise ValueError(f"{path}:{line_number}: duplicate target {target}")
|
||||
durations[target] = duration
|
||||
return durations
|
||||
|
||||
|
||||
def assign_targets(
|
||||
targets: list[str], durations: dict[str, int], shard_count: int
|
||||
) -> tuple[list[list[str]], list[int]]:
|
||||
if shard_count < 1:
|
||||
raise ValueError("shard count must be positive")
|
||||
if not targets:
|
||||
raise ValueError("no Bazel test targets were provided")
|
||||
if any(not target.strip() for target in targets):
|
||||
raise ValueError("Bazel test target labels must not be empty")
|
||||
if len(targets) != len(set(targets)):
|
||||
raise ValueError("duplicate Bazel test target labels were provided")
|
||||
|
||||
assignments: list[list[str]] = [[] for _ in range(shard_count)]
|
||||
loads = [0] * shard_count
|
||||
# Place the longest targets first, breaking ties by label and shard number.
|
||||
for target in sorted(
|
||||
targets,
|
||||
key=lambda target: (-durations.get(target, DEFAULT_DURATION_SECONDS), target),
|
||||
):
|
||||
shard = min(range(shard_count), key=lambda shard: (loads[shard], shard))
|
||||
assignments[shard].append(target)
|
||||
loads[shard] += durations.get(target, DEFAULT_DURATION_SECONDS)
|
||||
for assignment in assignments:
|
||||
assignment.sort()
|
||||
return assignments, loads
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--shard", required=True, type=int)
|
||||
parser.add_argument("--shard-count", required=True, type=int)
|
||||
parser.add_argument(
|
||||
"--durations",
|
||||
type=Path,
|
||||
default=DURATIONS_PATH,
|
||||
help="use this timing file instead of the checked-in default",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
if not 1 <= args.shard <= args.shard_count:
|
||||
parser.error("shard must be between 1 and shard count")
|
||||
|
||||
try:
|
||||
durations = read_durations(args.durations)
|
||||
targets = sys.stdin.read().splitlines()
|
||||
assignments, loads = assign_targets(targets, durations, args.shard_count)
|
||||
except (OSError, ValueError) as error:
|
||||
parser.error(str(error))
|
||||
|
||||
selected_targets = assignments[args.shard - 1]
|
||||
if not selected_targets:
|
||||
parser.error(
|
||||
f"no Bazel test targets selected for shard {args.shard}/{args.shard_count}"
|
||||
)
|
||||
|
||||
target_set = set(targets)
|
||||
print(
|
||||
f"Windows Bazel shards: targets={[len(assignment) for assignment in assignments]}, "
|
||||
f"estimated test-seconds={loads}, default weights={len(target_set - durations.keys())}, "
|
||||
f"unused weights={len(durations.keys() - target_set)}. "
|
||||
f"Selected shard {args.shard}/{args.shard_count}.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
# Keep LF delimiters when native Windows Python feeds Git Bash mapfile.
|
||||
sys.stdout.buffer.write(("\n".join(selected_targets) + "\n").encode("utf-8"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,63 +0,0 @@
|
||||
# Configure a fast drive for Windows CI jobs.
|
||||
#
|
||||
# GitHub-hosted Windows runners do not always expose a secondary D: volume. When
|
||||
# they do not, create a Dev Drive VHD. CI depends on this path for its
|
||||
# build directories where CI spends significant time doing I/O, so fail the
|
||||
# job if no real Dev Drive is available.
|
||||
|
||||
function Test-DevDrive {
|
||||
param([string]$Drive)
|
||||
|
||||
& fsutil devdrv query $Drive *> $null
|
||||
return $LASTEXITCODE -eq 0
|
||||
}
|
||||
|
||||
function Invoke-BestEffort {
|
||||
param([scriptblock]$Script, [string]$Description)
|
||||
|
||||
try {
|
||||
& $Script
|
||||
} catch {
|
||||
Write-Warning "$Description failed: $($_.Exception.Message)"
|
||||
}
|
||||
}
|
||||
|
||||
if ((Test-Path "D:\") -and (Test-DevDrive "D:")) {
|
||||
Write-Output "Using existing Dev Drive at D:"
|
||||
$Drive = "D:"
|
||||
} else {
|
||||
if (Test-Path "D:\") {
|
||||
Write-Output "Existing D: volume is not a Dev Drive; provisioning a new Dev Drive VHD."
|
||||
}
|
||||
|
||||
try {
|
||||
$VhdPath = Join-Path $env:RUNNER_TEMP "codex-dev-drive.vhdx"
|
||||
$SizeBytes = 64GB
|
||||
|
||||
if (Test-Path $VhdPath) {
|
||||
Remove-Item -Path $VhdPath -Force
|
||||
}
|
||||
|
||||
New-VHD -Path $VhdPath -SizeBytes $SizeBytes -Dynamic -ErrorAction Stop | Out-Null
|
||||
$Mounted = Mount-VHD -Path $VhdPath -Passthru -ErrorAction Stop
|
||||
$Disk = $Mounted | Get-Disk -ErrorAction Stop
|
||||
$Disk | Initialize-Disk -PartitionStyle GPT -ErrorAction Stop
|
||||
$Partition = $Disk | New-Partition -AssignDriveLetter -UseMaximumSize -ErrorAction Stop
|
||||
$Volume = $Partition | Format-Volume -FileSystem ReFS -NewFileSystemLabel "CodexDevDrive" -DevDrive -Confirm:$false -Force -ErrorAction Stop
|
||||
|
||||
$Drive = "$($Volume.DriveLetter):"
|
||||
|
||||
if (-not (Test-DevDrive $Drive)) {
|
||||
throw "Provisioned volume at $Drive did not pass Dev Drive verification."
|
||||
}
|
||||
|
||||
Invoke-BestEffort { fsutil devdrv trust $Drive } "Trusting Dev Drive $Drive"
|
||||
Invoke-BestEffort { fsutil devdrv enable /disallowAv } "Disabling AV filter attachment for Dev Drives"
|
||||
|
||||
Write-Output "Using Dev Drive at $Drive"
|
||||
} catch {
|
||||
throw "Failed to create Dev Drive: $($_.Exception.Message)"
|
||||
}
|
||||
}
|
||||
|
||||
"CI_BUILD_ROOT=$Drive" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
@@ -1,96 +0,0 @@
|
||||
# CI-only prerequisites. Never install these tools into a Codex package.
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Target,
|
||||
[Parameter(Mandatory = $true)][string]$SnapshotArchive
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PkgHashes = @{
|
||||
"x86_64-pc-windows-msvc" = @("x64", "5604cf25ef38bb6a09520cff25ae9f0ecd8c2443053b15e40df4ad1eae0e4405")
|
||||
"aarch64-pc-windows-msvc" = @("arm64", "d5752ce2ac2296c8abb91fb12c12e75ee99ba8a18b52ce5febf325847b6f062b")
|
||||
}
|
||||
if (-not $PkgHashes.ContainsKey($Target)) { throw "Unsupported target: $Target" }
|
||||
$Root = Join-Path $env:RUNNER_TEMP "voice-windows-build-tools"
|
||||
$Evidence = Join-Path $Root "evidence"
|
||||
$Cygwin = Join-Path $Root "cygwin"
|
||||
$Cache = Join-Path $Root "cache"
|
||||
New-Item -ItemType Directory -Path $Root, $Evidence | Out-Null
|
||||
$ManifestPath = Join-Path $PSScriptRoot "voice-cygwin-snapshot.json"
|
||||
$Manifest = Get-Content -Raw $ManifestPath | ConvertFrom-Json
|
||||
$SnapshotTool = Join-Path $PSScriptRoot "voice-cygwin-inputs.py"
|
||||
& python $SnapshotTool extract --archive $SnapshotArchive --directory (Join-Path $Cache $Manifest.cacheDirectory)
|
||||
if ($LASTEXITCODE -ne 0) { throw "Cygwin snapshot could not be verified and extracted" }
|
||||
Copy-Item $ManifestPath (Join-Path $Evidence "cygwin-snapshot.json")
|
||||
|
||||
# Official https://cygwin.com/setup/sha512.sum and pkgconf release asset digests.
|
||||
# The complete package closure is pinned separately in cygwin-snapshot.json.
|
||||
$Inputs = @(
|
||||
@{
|
||||
url = "https://cygwin.com/setup/setup-2.937.x86_64.exe"
|
||||
file = "setup.exe"
|
||||
algorithm = "SHA512"
|
||||
digest = "6acea47c59781c9e7f544a18d53935d59df6e44d5d52ac95ee165671b8e388820455eebf30ccc7d254b00c3d0eb694269a0f8dc84b17944c1f355dac9c5aafcc"
|
||||
},
|
||||
@{
|
||||
url = "https://github.com/pkgconf/pkgconf/releases/download/pkgconf-3.0.6/pkgconf-$($PkgHashes[$Target][0])-3.0.6.msi"
|
||||
file = "pkgconf.msi"
|
||||
algorithm = "SHA256"
|
||||
digest = $PkgHashes[$Target][1]
|
||||
}
|
||||
)
|
||||
foreach ($InputFile in $Inputs) {
|
||||
$Destination = Join-Path $Root $InputFile.file
|
||||
Invoke-WebRequest -Uri $InputFile.url -OutFile $Destination
|
||||
$Actual = (Get-FileHash -Path $Destination -Algorithm $InputFile.algorithm).Hash.ToLowerInvariant()
|
||||
if ($Actual -ne $InputFile.digest) { throw "Build input digest mismatch: $($InputFile.file)" }
|
||||
}
|
||||
$Inputs | ConvertTo-Json | Set-Content (Join-Path $Evidence "bootstrap-inputs.json")
|
||||
$Packages = $Manifest.requestedPackages -join ","
|
||||
# Only setup.xz + setup.xz.sig are present: local mode still verifies that
|
||||
# signature. Never substitute an unsigned setup.ini or enable a network fallback.
|
||||
$Setup = Start-Process -FilePath (Join-Path $Root "setup.exe") -Wait -PassThru -ArgumentList @(
|
||||
"--quiet-mode", "--no-admin", "--no-shortcuts", "--only-site",
|
||||
"--local-install", "--no-version-check",
|
||||
"--root", "`"$Cygwin`"", "--local-package-dir", "`"$Cache`"",
|
||||
"--packages", $Packages
|
||||
)
|
||||
if ($Setup.ExitCode -ne 0) { throw "Cygwin setup failed: $($Setup.ExitCode)" }
|
||||
Copy-Item (Join-Path $Cygwin "var/log/setup.log*") $Evidence
|
||||
Copy-Item (Join-Path $Cygwin "etc/setup/installed.db") $Evidence
|
||||
& (Join-Path $Cygwin "bin/cygcheck.exe") -cd | Set-Content (Join-Path $Evidence "packages.txt")
|
||||
if ($LASTEXITCODE -ne 0) { throw "Cannot inventory Cygwin packages" }
|
||||
& python $SnapshotTool check-installed --inventory (Join-Path $Evidence "packages.txt")
|
||||
if ($LASTEXITCODE -ne 0) { throw "Installed Cygwin package set differs from the snapshot" }
|
||||
Get-ChildItem $Cache -File -Recurse | ForEach-Object {
|
||||
@{ file = [IO.Path]::GetRelativePath($Cache, $_.FullName); bytes = $_.Length;
|
||||
sha512 = (Get-FileHash $_.FullName -Algorithm SHA512).Hash.ToLowerInvariant() }
|
||||
} | ConvertTo-Json | Set-Content (Join-Path $Evidence "package-cache.json")
|
||||
|
||||
# Administrative extraction uses TARGETDIR, not a normal MSI installation:
|
||||
# no product registration or system PATH modification. Fail rather than fall
|
||||
# back to an ambient executable or ordinary installer if the payload is absent.
|
||||
$Image = Join-Path $Root "pkgconf-image"
|
||||
$Extract = Start-Process msiexec.exe -Wait -PassThru -ArgumentList @(
|
||||
"/a", "`"$(Join-Path $Root 'pkgconf.msi')`"", "/qn", "/norestart",
|
||||
"TARGETDIR=`"$Image`"", "/L*v", "`"$(Join-Path $Evidence 'pkgconf-extract.log')`""
|
||||
)
|
||||
if ($Extract.ExitCode -ne 0) { throw "pkgconf extraction failed: $($Extract.ExitCode)" }
|
||||
$Candidates = @(Get-ChildItem $Image -Filter pkgconf.exe -File -Recurse)
|
||||
if ($Candidates.Count -ne 1) { throw "Expected exactly one native pkgconf executable" }
|
||||
# Bazel shell-quotes execpaths containing spaces; Cargo executes PKG_CONFIG
|
||||
# directly. Keep the executable and its support files at a space-free execpath.
|
||||
$Native = Join-Path $Image "native"
|
||||
if (Test-Path $Native) { throw "Native pkgconf destination must be fresh" }
|
||||
Move-Item -LiteralPath $Candidates[0].Directory.FullName -Destination $Native
|
||||
$PkgConfig = Join-Path $Native "pkgconf.exe"
|
||||
$Version = & $PkgConfig --version
|
||||
if ($LASTEXITCODE -ne 0 -or $Version -ne "3.0.6") { throw "Unexpected native pkgconf version" }
|
||||
@{ target = $Target; cygwin_root = $Cygwin; pkg_config = $PkgConfig;
|
||||
pkgconf_version = $Version; requested_packages = $Packages } |
|
||||
ConvertTo-Json | Set-Content (Join-Path $Evidence "tools.json")
|
||||
# Declare complete installed support trees only after snapshot and tool checks.
|
||||
& python (Join-Path $PSScriptRoot "voice_windows_tools.py") --root $Root --target $Target --pkg-config $PkgConfig
|
||||
if ($LASTEXITCODE -ne 0) { throw "Cannot declare Windows Bazel tool inputs" }
|
||||
"VOICE_WINDOWS_BAZEL_REPOSITORY=$Root" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
"VOICE_CYGWIN_ROOT=$Cygwin" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
"VOICE_PKG_CONFIG=$PkgConfig" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
@@ -1,10 +1,13 @@
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import tarfile
|
||||
import tempfile
|
||||
import textwrap
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -261,6 +264,121 @@ class DotSlashReleaseConfigTests(unittest.TestCase):
|
||||
|
||||
|
||||
class StablePublicationTests(unittest.TestCase):
|
||||
def test_github_release_upload_and_cleanup(self):
|
||||
bash = shutil.which("bash")
|
||||
if bash is None:
|
||||
self.skipTest("Release workflow requires Bash 4.4 or newer")
|
||||
version = subprocess.check_output(
|
||||
[bash, "-c", 'echo "${BASH_VERSINFO[0]} ${BASH_VERSINFO[1]}"'],
|
||||
text=True,
|
||||
)
|
||||
if tuple(map(int, version.split())) < (4, 4):
|
||||
self.skipTest("Release workflow requires Bash 4.4 or newer")
|
||||
|
||||
script = Path(__file__).resolve().with_name("publish-github-release.sh")
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
root = Path(tmpdir)
|
||||
gh = root / "gh"
|
||||
gh.write_text(
|
||||
textwrap.dedent("""\
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
case "$1 $2" in
|
||||
'api graphql')
|
||||
if compgen -G 'release-*' >/dev/null; then echo true; else echo false; fi ;;
|
||||
'api --silent')
|
||||
[[ "$3" == "repos/test/codex/git/ref/tags/$GITHUB_REF_NAME" ]]
|
||||
[[ -f "${3##*/}.tag" ]] || exit 5 ;;
|
||||
'api --method')
|
||||
case "$3 $4" in
|
||||
'POST repos/test/codex/releases')
|
||||
printf '%s\\n' "$@" > "release-$CREATE_ID"
|
||||
echo "$CREATE_ID" ;;
|
||||
'DELETE repos/test/codex/releases/'*)
|
||||
echo "DELETE $4" >> operations
|
||||
rm -- "release-${4##*/}" ;;
|
||||
*) exit 99 ;;
|
||||
esac ;;
|
||||
'release upload')
|
||||
echo upload >> operations
|
||||
[[ "$3" == "$GITHUB_REF_NAME" && -f "$4" ]]
|
||||
if [[ "$FAIL_AT" == replace ]]; then
|
||||
mv "release-$CREATE_ID" release-999
|
||||
exit 7
|
||||
fi
|
||||
[[ "$FAIL_AT" != upload ]] || exit 7 ;;
|
||||
'release edit')
|
||||
echo edit >> operations
|
||||
[[ "$FAIL_AT" != edit ]] || exit 8 ;;
|
||||
*) exit 99 ;;
|
||||
esac
|
||||
""")
|
||||
)
|
||||
gh.chmod(0o755)
|
||||
alpha = "rust-v0.100.0-alpha.1"
|
||||
delete = "DELETE repos/test/codex/releases"
|
||||
# Repeated tags reuse the preceding release state for a retry.
|
||||
for tag, fail_at, create_id, status, surviving_id, operations in (
|
||||
(alpha, "upload", 101, 7, None, ["upload", f"{delete}/101"]),
|
||||
(alpha, "", 102, 0, 102, ["upload", "edit"]),
|
||||
(alpha, "upload", 103, 7, 102, ["upload"]),
|
||||
("rust-v0.100.0-alpha.2", "edit", 104, 8, 104, ["upload", "edit"]),
|
||||
("rust-v0.100.0", "upload", 105, 7, 105, ["upload"]),
|
||||
(
|
||||
"rust-v0.100.0-alpha.3",
|
||||
"replace",
|
||||
106,
|
||||
7,
|
||||
999,
|
||||
["upload", f"{delete}/106"],
|
||||
),
|
||||
("rust-v0.100.0-alpha.4", "missing_tag", 107, 5, None, []),
|
||||
):
|
||||
with self.subTest(tag=tag, fail_at=fail_at):
|
||||
directory = root / tag
|
||||
tag_file = directory / f"{tag}.tag"
|
||||
if not directory.exists():
|
||||
(directory / "dist").mkdir(parents=True)
|
||||
(directory / "dist/package.tar.gz").write_bytes(b"package")
|
||||
(directory / "notes.md").write_text("release notes\n")
|
||||
if fail_at != "missing_tag":
|
||||
tag_file.touch()
|
||||
operation_log = directory / "operations"
|
||||
operation_log.write_text("")
|
||||
prerelease = "-alpha." in tag
|
||||
result = subprocess.run(
|
||||
[bash, str(script)],
|
||||
cwd=directory,
|
||||
env={
|
||||
**os.environ,
|
||||
"PATH": f"{root}{os.pathsep}{os.environ['PATH']}",
|
||||
"GITHUB_REPOSITORY": "test/codex",
|
||||
"GITHUB_REPOSITORY_OWNER": "test",
|
||||
"GITHUB_REF_NAME": tag,
|
||||
"RELEASE_NAME": tag.removeprefix("rust-v"),
|
||||
"RELEASE_NOTES": "notes.md",
|
||||
"MAKE_LATEST": str(not prerelease).lower(),
|
||||
"PRERELEASE": str(prerelease).lower(),
|
||||
"FAIL_AT": fail_at,
|
||||
"CREATE_ID": str(create_id),
|
||||
},
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
self.assertEqual(result.returncode, status, result.stderr)
|
||||
self.assertEqual(tag_file.exists(), fail_at != "missing_tag")
|
||||
self.assertEqual(operation_log.read_text().splitlines(), operations)
|
||||
releases = list(directory.glob("release-*"))
|
||||
self.assertEqual(
|
||||
[p.name for p in releases],
|
||||
[f"release-{surviving_id}"] if surviving_id else [],
|
||||
)
|
||||
if surviving_id:
|
||||
fields = releases[0].read_text().splitlines()
|
||||
self.assertIn(f"tag_name={tag}", fields)
|
||||
self.assertIn(f"draft={str(not prerelease).lower()}", fields)
|
||||
self.assertIn(f"prerelease={str(prerelease).lower()}", fields)
|
||||
|
||||
def test_github_latest_orders_numerically_and_allows_equal_reruns(self):
|
||||
latest = {"tag_name": "rust-v0.100.0", "draft": False, "prerelease": False}
|
||||
self.assertFalse(should_make_latest("0.99.9", latest))
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from select_windows_bazel_targets import DURATIONS_PATH
|
||||
from select_windows_bazel_targets import assign_targets
|
||||
from select_windows_bazel_targets import read_durations
|
||||
|
||||
|
||||
class SelectWindowsBazelTargetsTest(unittest.TestCase):
|
||||
def test_balances_targets_with_complete_deterministic_coverage(self) -> None:
|
||||
durations = {
|
||||
f"//test:{name}": duration
|
||||
for name, duration in zip("abcdefgh", range(8, 0, -1))
|
||||
}
|
||||
targets = list(durations)
|
||||
|
||||
assignments, loads = assign_targets(targets, durations, 4)
|
||||
|
||||
self.assertEqual(loads, [9, 9, 9, 9])
|
||||
self.assertEqual(
|
||||
sorted(target for shard in assignments for target in shard), sorted(targets)
|
||||
)
|
||||
self.assertEqual(
|
||||
assign_targets(list(reversed(targets)), durations, 4), (assignments, loads)
|
||||
)
|
||||
self.assertTrue(all(shard == sorted(shard) for shard in assignments))
|
||||
|
||||
def test_missing_weights_use_one_and_unused_weights_do_not_create_targets(
|
||||
self,
|
||||
) -> None:
|
||||
targets = ["//test:c", "//test:a", "//test:b"]
|
||||
|
||||
assignments, loads = assign_targets(targets, {"//test:stale": 100}, 2)
|
||||
|
||||
self.assertEqual(assignments, [["//test:a", "//test:c"], ["//test:b"]])
|
||||
self.assertEqual(loads, [2, 1])
|
||||
|
||||
def test_rejects_empty_or_duplicate_target_input(self) -> None:
|
||||
for targets in ([], [""], ["//test:a", "//test:a"]):
|
||||
with self.subTest(targets=targets), self.assertRaises(ValueError):
|
||||
assign_targets(targets, {}, 4)
|
||||
|
||||
def test_reads_duration_file_and_rejects_invalid_weights(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
path = Path(temp_dir) / "durations.tsv"
|
||||
path.write_text(
|
||||
"# comment\n\n//test:a\t12\n//test:b\t1\n", encoding="utf-8"
|
||||
)
|
||||
self.assertEqual(read_durations(path), {"//test:a": 12, "//test:b": 1})
|
||||
|
||||
for contents in (
|
||||
"//test:a 12\n",
|
||||
"//test:a\t0\n",
|
||||
"//test:a\t-1\n",
|
||||
"//test:a\t1.5\n",
|
||||
"//test:a\t1\n//test:a\t2\n",
|
||||
):
|
||||
with self.subTest(contents=contents), self.assertRaises(ValueError):
|
||||
path.write_text(contents, encoding="utf-8")
|
||||
read_durations(path)
|
||||
|
||||
def test_cli_uses_checked_in_weights_and_writes_only_lf_delimited_targets(
|
||||
self,
|
||||
) -> None:
|
||||
durations = read_durations(DURATIONS_PATH)
|
||||
known = sorted(durations, key=lambda target: (-durations[target], target))[:4]
|
||||
self.assertEqual(len(known), 4)
|
||||
targets = [*known, "//test:new-target"]
|
||||
expected, _ = assign_targets(targets, durations, 4)
|
||||
script = DURATIONS_PATH.with_name("select_windows_bazel_targets.py")
|
||||
|
||||
for shard, assignment in enumerate(expected, 1):
|
||||
command = [
|
||||
sys.executable,
|
||||
str(script),
|
||||
"--shard",
|
||||
str(shard),
|
||||
"--shard-count",
|
||||
"4",
|
||||
]
|
||||
for ordered_targets in (targets, list(reversed(targets))):
|
||||
with self.subTest(shard=shard, ordered_targets=ordered_targets):
|
||||
result = subprocess.run(
|
||||
command,
|
||||
input=("\r\n".join(ordered_targets) + "\r\n").encode(),
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
self.assertEqual(
|
||||
result.stdout, ("\n".join(assignment) + "\n").encode()
|
||||
)
|
||||
self.assertIn(b"default weights=1", result.stderr)
|
||||
|
||||
def test_cli_uses_only_the_requested_duration_file(self) -> None:
|
||||
script = DURATIONS_PATH.with_name("select_windows_bazel_targets.py").resolve()
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
path = Path(temp_dir) / "durations.tsv"
|
||||
path.write_text("//test:a\t1\n//test:b\t9\n", encoding="utf-8")
|
||||
command = [sys.executable, str(script), "--shard-count", "2"]
|
||||
for shard, expected in ((1, b"//test:b\n"), (2, b"//test:a\n//test:c\n")):
|
||||
with self.subTest(shard=shard):
|
||||
result = subprocess.run(
|
||||
[*command, "--shard", str(shard), "--durations", path.name],
|
||||
input=b"//test:a\n//test:b\n//test:c\n",
|
||||
cwd=temp_dir,
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
self.assertEqual(result.stdout, expected)
|
||||
self.assertIn(b"estimated test-seconds=[9, 2]", result.stderr)
|
||||
self.assertIn(b"unused weights=0", result.stderr)
|
||||
|
||||
result = subprocess.run(
|
||||
[*command, "--shard", "1", "--durations", "missing.tsv"],
|
||||
input=b"//test:a\n",
|
||||
cwd=temp_dir,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
)
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
self.assertEqual(result.stdout, b"")
|
||||
self.assertIn(b"missing.tsv", result.stderr)
|
||||
|
||||
def test_cli_rejects_bad_or_empty_selection_without_partial_output(self) -> None:
|
||||
script = DURATIONS_PATH.with_name("select_windows_bazel_targets.py")
|
||||
for targets, error in (
|
||||
(b"", b"no Bazel test targets were provided"),
|
||||
(b"//test:a\n//test:a\n", b"duplicate Bazel test target labels"),
|
||||
(b"//test:a\n", b"no Bazel test targets selected for shard 2/2"),
|
||||
):
|
||||
with self.subTest(targets=targets):
|
||||
result = subprocess.run(
|
||||
[sys.executable, str(script), "--shard", "2", "--shard-count", "2"],
|
||||
input=targets,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
)
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
self.assertEqual(result.stdout, b"")
|
||||
self.assertIn(error, result.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -1,83 +0,0 @@
|
||||
"""Expose verified Windows build-tool installations as local Bazel inputs.
|
||||
|
||||
This declares the installed support trees; the caller authenticates their
|
||||
inputs and verifies the installed package inventory first.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import itertools
|
||||
import json
|
||||
from pathlib import Path
|
||||
import stat
|
||||
|
||||
|
||||
def export_repository(root: Path, target: str, pkg_config: Path):
|
||||
if target not in ("x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc"):
|
||||
raise ValueError("unsupported Windows target")
|
||||
root = root.resolve(strict=True)
|
||||
pkg_config = pkg_config.resolve(strict=True)
|
||||
names = {
|
||||
"shell": "cygwin/bin/bash.exe",
|
||||
"make": "cygwin/bin/make.exe",
|
||||
"cygpath": "cygwin/bin/cygpath.exe",
|
||||
"automake": "cygwin/bin/automake-1.18",
|
||||
"pkg_config": pkg_config.relative_to(root).as_posix(),
|
||||
}
|
||||
if not names["pkg_config"].startswith("pkgconf-image/"):
|
||||
raise ValueError("pkg-config must belong to the extracted image")
|
||||
outputs = ("BUILD.bazel", "MODULE.bazel", "voice-tools.json")
|
||||
if any((root / name).exists() for name in outputs):
|
||||
raise ValueError("Bazel tool repository outputs must be fresh")
|
||||
# A nested package boundary would silently remove files from Bazel's glob.
|
||||
# Reparse points could escape the installation or hide support directories.
|
||||
for directory in ("cygwin", "pkgconf-image"):
|
||||
tree = root / directory
|
||||
if not tree.is_dir():
|
||||
raise ValueError(f"missing tool tree: {directory}")
|
||||
for path in itertools.chain((tree,), tree.rglob("*")):
|
||||
info = path.lstat()
|
||||
if (
|
||||
stat.S_ISLNK(info.st_mode)
|
||||
or getattr(info, "st_file_attributes", 0)
|
||||
& stat.FILE_ATTRIBUTE_REPARSE_POINT
|
||||
or not (stat.S_ISDIR(info.st_mode) or stat.S_ISREG(info.st_mode))
|
||||
or path.name.casefold() in ("build", "build.bazel")
|
||||
):
|
||||
raise ValueError(f"unsupported tool-tree entry: {path}")
|
||||
if any(not (root / name).is_file() for name in names.values()):
|
||||
raise ValueError("required Windows build tool missing")
|
||||
definitions = [
|
||||
'package(default_visibility = ["//visibility:public"])',
|
||||
# Cygwin records installation timestamps in this unused Java truststore.
|
||||
# Exclude it so reinstalling the same tools preserves action cache keys.
|
||||
'filegroup(name = "cygwin", srcs = glob(["cygwin/**"], '
|
||||
'exclude = ["cygwin/etc/pki/ca-trust/extracted/java/cacerts"], allow_empty = False))',
|
||||
'filegroup(name = "pkgconf", srcs = glob(["pkgconf-image/**"], allow_empty = False))',
|
||||
'filegroup(name = "tools", srcs = [":cygwin", ":pkgconf", "voice-tools.json"])',
|
||||
]
|
||||
definitions.extend(
|
||||
f"filegroup(name = {json.dumps(name)}, srcs = [{json.dumps(path)}])"
|
||||
for name, path in names.items()
|
||||
)
|
||||
metadata = {
|
||||
"schemaVersion": 1,
|
||||
"target": target,
|
||||
"cygwinArchitecture": "x86_64",
|
||||
"tools": names,
|
||||
}
|
||||
for name, contents in (
|
||||
("BUILD.bazel", "\n".join(definitions) + "\n"),
|
||||
("MODULE.bazel", 'module(name = "voice_windows_tools")\n'),
|
||||
("voice-tools.json", json.dumps(metadata, indent=2) + "\n"),
|
||||
):
|
||||
with (root / name).open("x", encoding="utf-8") as output:
|
||||
output.write(contents)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--root", type=Path, required=True)
|
||||
parser.add_argument("--target", required=True)
|
||||
parser.add_argument("--pkg-config", type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
export_repository(args.root, args.target, args.pkg_config)
|
||||
@@ -1,251 +0,0 @@
|
||||
# Windows Bazel duration weights; columns: target<TAB>seconds.
|
||||
# Seeded from 24 successful public openai/codex Windows job logs across six main
|
||||
# runs, September 21-23, 2026. Public GitHub Actions run IDs:
|
||||
# 35638529858, 35665540272, 35694732932, 35912411800, 35919297566, 35924169500.
|
||||
# To refresh, take the median summed inner-run time (N * average) from clean,
|
||||
# uncached PASSED summaries, excluding partial cache hits and FLAKY results.
|
||||
# Round up to positive integer seconds. These weights exclude build/download time.
|
||||
# Every queried target is assigned; missing weights default to 1 and stale entries are ignored.
|
||||
//codex-rs/agent-graph-store:agent-graph-store-unit-tests 76
|
||||
//codex-rs/agent-identity:agent-identity-unit-tests 66
|
||||
//codex-rs/agent-roles:agent-roles-unit-tests 48
|
||||
//codex-rs/analytics:analytics-unit-tests 29
|
||||
//codex-rs/app-server-client:app-server-client-unit-tests 51
|
||||
//codex-rs/app-server-daemon:app-server-daemon-unit-tests 4
|
||||
//codex-rs/app-server-protocol:app-server-protocol-unit-tests 19
|
||||
//codex-rs/app-server-test-client:app-server-test-client-unit-tests 25
|
||||
//codex-rs/app-server-test-client:codex-app-server-test-client-bin-unit-tests 1
|
||||
//codex-rs/app-server-transport:app-server-transport-unit-tests 65
|
||||
//codex-rs/app-server/tests/common:common-unit-tests 26
|
||||
//codex-rs/app-server:app-server-all-test-windows-cross 2835
|
||||
//codex-rs/app-server:app-server-unit-tests 399
|
||||
//codex-rs/app-server:codex-app-server-bin-unit-tests 48
|
||||
//codex-rs/app-server:codex-app-server-test-notify-capture-bin-unit-tests 1
|
||||
//codex-rs/app-server:exec-server-bin-unit-tests 1
|
||||
//codex-rs/app-server:test_notify_capture-bin-unit-tests 1
|
||||
//codex-rs/apply-patch:apply-patch-all-test-windows-cross 50
|
||||
//codex-rs/apply-patch:apply-patch-unit-tests 48
|
||||
//codex-rs/apply-patch:apply_patch-bin-unit-tests 24
|
||||
//codex-rs/arg0:arg0-unit-tests 24
|
||||
//codex-rs/backend-client:backend-client-unit-tests 41
|
||||
//codex-rs/chatgpt:chatgpt-all-test-windows-cross 26
|
||||
//codex-rs/chatgpt:chatgpt-unit-tests 27
|
||||
//codex-rs/cli:cli-app_server-test-windows-cross 3
|
||||
//codex-rs/cli:cli-app_server_daemon-test-windows-cross 1
|
||||
//codex-rs/cli:cli-cloud_auth-test-windows-cross 47
|
||||
//codex-rs/cli:cli-cloud_config-test-windows-cross 3
|
||||
//codex-rs/cli:cli-daemon_startup-test-windows-cross 4
|
||||
//codex-rs/cli:cli-daemon_telemetry-test-windows-cross 1
|
||||
//codex-rs/cli:cli-debug_clear_memories-test-windows-cross 4
|
||||
//codex-rs/cli:cli-debug_models-test-windows-cross 2
|
||||
//codex-rs/cli:cli-delete-test-windows-cross 2
|
||||
//codex-rs/cli:cli-doctor_enterprise_network-test-windows-cross 3
|
||||
//codex-rs/cli:cli-doctor_path_safety-test-windows-cross 47
|
||||
//codex-rs/cli:cli-exec_server-test-windows-cross 39
|
||||
//codex-rs/cli:cli-exec_server_websocket_auth-test-windows-cross 4
|
||||
//codex-rs/cli:cli-execpolicy-test-windows-cross 2
|
||||
//codex-rs/cli:cli-features-test-windows-cross 3
|
||||
//codex-rs/cli:cli-login-test-windows-cross 4
|
||||
//codex-rs/cli:cli-marketplace_add-test-windows-cross 2
|
||||
//codex-rs/cli:cli-marketplace_remove-test-windows-cross 1
|
||||
//codex-rs/cli:cli-marketplace_upgrade-test-windows-cross 2
|
||||
//codex-rs/cli:cli-mcp_add_remove-test-windows-cross 3
|
||||
//codex-rs/cli:cli-mcp_list-test-windows-cross 2
|
||||
//codex-rs/cli:cli-mcp_login-test-windows-cross 2
|
||||
//codex-rs/cli:cli-plugin_cli-test-windows-cross 7
|
||||
//codex-rs/cli:cli-queue-test-windows-cross 1
|
||||
//codex-rs/cli:cli-sandbox_cloud_config-test-windows-cross 48
|
||||
//codex-rs/cli:cli-sandbox_network_proxy-test-windows-cross 1
|
||||
//codex-rs/cli:cli-sandbox_tty-test-windows-cross 1
|
||||
//codex-rs/cli:cli-unit-tests 2
|
||||
//codex-rs/cli:cli-update-test-windows-cross 47
|
||||
//codex-rs/cli:cli-worktree-test-windows-cross 12
|
||||
//codex-rs/cli:codex-bin-unit-tests 60
|
||||
//codex-rs/cli:logs_client-bin-unit-tests 1
|
||||
//codex-rs/cloud-config:cloud-config-unit-tests 47
|
||||
//codex-rs/cloud-tasks-client:cloud-tasks-client-unit-tests 35
|
||||
//codex-rs/cloud-tasks-mock-client:cloud-tasks-mock-client-unit-tests 59
|
||||
//codex-rs/cloud-tasks:cloud-tasks-env_filter-test-windows-cross 1
|
||||
//codex-rs/cloud-tasks:cloud-tasks-unit-tests 1
|
||||
//codex-rs/code-mode-host:code-mode-host-grpc-test-windows-cross 28
|
||||
//codex-rs/code-mode-host:code-mode-host-grpc_notifications-test-windows-cross 25
|
||||
//codex-rs/code-mode-host:code-mode-host-grpc_tcp-test-windows-cross 1
|
||||
//codex-rs/code-mode-host:code-mode-host-grpc_timing-test-windows-cross 7
|
||||
//codex-rs/code-mode-host:code-mode-host-stdio-test-windows-cross 11
|
||||
//codex-rs/code-mode-host:code-mode-host-unit-tests 2
|
||||
//codex-rs/code-mode-host:codex-code-mode-host-bin-unit-tests 1
|
||||
//codex-rs/code-mode-protocol:code-mode-protocol-unit-tests 62
|
||||
//codex-rs/code-mode-runtime:code-mode-runtime-array_sort-test-windows-cross 24
|
||||
//codex-rs/code-mode-runtime:code-mode-runtime-jit-test-windows-cross 1
|
||||
//codex-rs/code-mode-runtime:code-mode-runtime-unit-tests 7
|
||||
//codex-rs/code-mode:code-mode-unit-tests 49
|
||||
//codex-rs/codex-api:codex-api-clients-test-windows-cross 75
|
||||
//codex-rs/codex-api:codex-api-models_integration-test-windows-cross 66
|
||||
//codex-rs/codex-api:codex-api-realtime_websocket_e2e-test-windows-cross 63
|
||||
//codex-rs/codex-api:codex-api-realtime_websocket_tls-test-windows-cross 66
|
||||
//codex-rs/codex-api:codex-api-sse_end_to_end-test-windows-cross 48
|
||||
//codex-rs/codex-api:codex-api-unit-tests 60
|
||||
//codex-rs/codex-home:codex-home-unit-tests 13
|
||||
//codex-rs/codex-mcp:codex-mcp-unit-tests 61
|
||||
//codex-rs/config-schema:codex-write-config-schema-bin-unit-tests 48
|
||||
//codex-rs/config:config-unit-tests 75
|
||||
//codex-rs/connectors:connectors-unit-tests 39
|
||||
//codex-rs/context-fragments:context-fragments-unit-tests 59
|
||||
//codex-rs/core-api:core-api-unit-tests 1
|
||||
//codex-rs/core-plugins:core-plugins-unit-tests 20
|
||||
//codex-rs/core/tests/common:common-unit-tests 48
|
||||
//codex-rs/core:core-all-test-windows-cross 3162
|
||||
//codex-rs/core:core-mcp_trace_propagation-test-windows-cross 2
|
||||
//codex-rs/core:core-responses_headers-test-windows-cross 5
|
||||
//codex-rs/core:core-unit-tests 251
|
||||
//codex-rs/exec-server-protocol:exec-server-protocol-unit-tests 48
|
||||
//codex-rs/exec-server/tests/support:support-unit-tests 48
|
||||
//codex-rs/exec-server:exec-server-accepted_websocket-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-capability_discovery-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-chatgpt_cloudflare_affinity-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-deferred_environment-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-environment-test-windows-cross 10
|
||||
//codex-rs/exec-server:exec-server-environment_config-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-exec_process-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-file_stream-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-file_system_unix-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-file_system_windows-test-windows-cross 11
|
||||
//codex-rs/exec-server:exec-server-forward-test-windows-cross 10
|
||||
//codex-rs/exec-server:exec-server-health-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-http_client-test-windows-cross 2
|
||||
//codex-rs/exec-server:exec-server-http_request-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-http_request_logging-test-windows-cross 3
|
||||
//codex-rs/exec-server:exec-server-initialize-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-macos_fs_spawn-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-process-test-windows-cross 4
|
||||
//codex-rs/exec-server:exec-server-relay-test-windows-cross 8
|
||||
//codex-rs/exec-server:exec-server-selected_capability_roots-test-windows-cross 1
|
||||
//codex-rs/exec-server:exec-server-unit-tests 116
|
||||
//codex-rs/exec-server:exec-server-websocket-test-windows-cross 1
|
||||
//codex-rs/exec:codex-exec-bin-unit-tests 1
|
||||
//codex-rs/exec:exec-all-test-windows-cross 331
|
||||
//codex-rs/exec:exec-event_processor_with_json_output-test-windows-cross 1
|
||||
//codex-rs/exec:exec-unit-tests 47
|
||||
//codex-rs/message-board:message-board-local_board-test-windows-cross 46
|
||||
//codex-rs/ext/agent-message-board:agent-message-board-unit-tests 30
|
||||
//codex-rs/ext/agent:agent-agent_service-test-windows-cross 3
|
||||
//codex-rs/ext/agent:agent-unit-tests 1
|
||||
//codex-rs/ext/connectors:connectors-unit-tests 47
|
||||
//codex-rs/ext/extension-api:extension-api-capabilities-test-windows-cross 14
|
||||
//codex-rs/ext/extension-api:extension-api-registry-test-windows-cross 31
|
||||
//codex-rs/ext/extension-api:extension-api-state-test-windows-cross 57
|
||||
//codex-rs/ext/extension-api:extension-api-unit-tests 35
|
||||
//codex-rs/ext/git-attribution:git-attribution-unit-tests 30
|
||||
//codex-rs/ext/goal:goal-accounting-test-windows-cross 1
|
||||
//codex-rs/ext/goal:goal-goal_extension_backend-test-windows-cross 9
|
||||
//codex-rs/ext/goal:goal-steering-test-windows-cross 1
|
||||
//codex-rs/ext/goal:goal-unit-tests 47
|
||||
//codex-rs/ext/guardian-reviewer:guardian-reviewer-unit-tests 36
|
||||
//codex-rs/ext/guardian-v2:guardian-v2-unit-tests 50
|
||||
//codex-rs/ext/history-notes:history-notes-history_notes_extension-test-windows-cross 1
|
||||
//codex-rs/ext/history-notes:history-notes-image_model_input-test-windows-cross 2
|
||||
//codex-rs/ext/history-notes:history-notes-unit-tests 1
|
||||
//codex-rs/ext/image-generation:image-generation-unit-tests 47
|
||||
//codex-rs/ext/mcp:mcp-hosted_apps_mcp-test-windows-cross 26
|
||||
//codex-rs/ext/mcp:mcp-plugin_mcp-test-windows-cross 5
|
||||
//codex-rs/ext/mcp:mcp-unit-tests 48
|
||||
//codex-rs/ext/memories:memories-unit-tests 28
|
||||
//codex-rs/ext/queue:queue-queue_service-test-windows-cross 9
|
||||
//codex-rs/ext/queue:queue-unit-tests 25
|
||||
//codex-rs/ext/skills:skills-executor_file_system_authority-test-windows-cross 36
|
||||
//codex-rs/ext/skills:skills-skills_extension-test-windows-cross 7
|
||||
//codex-rs/ext/skills:skills-unit-tests 8
|
||||
//codex-rs/ext/web-search:web-search-unit-tests 1
|
||||
//codex-rs/external-agent-migration:external-agent-migration-unit-tests 4
|
||||
//codex-rs/features:features-unit-tests 47
|
||||
//codex-rs/feedback:feedback-unit-tests 77
|
||||
//codex-rs/file-system:file-system-unit-tests 48
|
||||
//codex-rs/git-utils:git-utils-unit-tests 83
|
||||
//codex-rs/guardian-context:guardian-context-cache_prefix-test-windows-cross 66
|
||||
//codex-rs/guardian-context:guardian-context-unit-tests 67
|
||||
//codex-rs/history:history-unit-tests 59
|
||||
//codex-rs/hooks:hooks-unit-tests 16
|
||||
//codex-rs/hooks:write_hooks_schema_fixtures-bin-unit-tests 48
|
||||
//codex-rs/lmstudio:lmstudio-unit-tests 1
|
||||
//codex-rs/login:login-all-test-windows-cross 5
|
||||
//codex-rs/login:login-unit-tests 320
|
||||
//codex-rs/memories/read:read-unit-tests 62
|
||||
//codex-rs/memories/write:write-unit-tests 20
|
||||
//codex-rs/message-history:message-history-unit-tests 74
|
||||
//codex-rs/model-provider-info:model-provider-info-unit-tests 63
|
||||
//codex-rs/model-provider:model-provider-unit-tests 64
|
||||
//codex-rs/models-manager:models-manager-unit-tests 35
|
||||
//codex-rs/mxc-sandbox:mxc-sandbox-unit-tests 36
|
||||
//codex-rs/network-proxy:codex-network-proxy-bin-unit-tests 48
|
||||
//codex-rs/network-proxy:network-proxy-unit-tests 85
|
||||
//codex-rs/network-proxy:network-proxy-windows_stable_ingress-test-windows-cross 37
|
||||
//codex-rs/ollama:ollama-unit-tests 1
|
||||
//codex-rs/otel:otel-tests-test-windows-cross 17
|
||||
//codex-rs/otel:otel-unit-tests 48
|
||||
//codex-rs/plugin:plugin-unit-tests 74
|
||||
//codex-rs/prompts:prompts-unit-tests 62
|
||||
//codex-rs/protocol:protocol-unit-tests 67
|
||||
//codex-rs/response-debug-context:response-debug-context-unit-tests 66
|
||||
//codex-rs/rmcp-client:rmcp-client-foreign_stdio_cwd-test-windows-cross 48
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_discovery-test-windows-cross 4
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_message_limits-test-windows-cross 4
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_mrtr-test-windows-cross 2
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_oauth_discovery-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_sse_discovery-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_stdio-test-windows-cross 39
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_2026_stdio_discovery-test-windows-cross 2
|
||||
//codex-rs/rmcp-client:rmcp-client-mcp_events-test-windows-cross 2
|
||||
//codex-rs/rmcp-client:rmcp-client-process_group_cleanup-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-resources-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-stdio_descriptor_boundary-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-stdio_message_limits-test-windows-cross 3
|
||||
//codex-rs/rmcp-client:rmcp-client-stdio_stderr_cleanup-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_oauth_startup-test-windows-cross 6
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_oauth_store_pinning-test-windows-cross 38
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_oauth_tool_call-test-windows-cross 2
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_recovery-test-windows-cross 51
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_remote-test-windows-cross 3
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_test_support-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-streamable_http_user_agent-test-windows-cross 1
|
||||
//codex-rs/rmcp-client:rmcp-client-unit-tests 50
|
||||
//codex-rs/rmcp-client:rmcp_test_server-bin-unit-tests 39
|
||||
//codex-rs/rmcp-client:test_mcp_2026_discovery_stdio_server-bin-unit-tests 43
|
||||
//codex-rs/rmcp-client:test_mcp_2026_stdio_server-bin-unit-tests 25
|
||||
//codex-rs/rmcp-client:test_stdio_server-bin-unit-tests 41
|
||||
//codex-rs/rmcp-client:test_streamable_http_server-bin-unit-tests 40
|
||||
//codex-rs/rollout-trace:rollout-trace-unit-tests 76
|
||||
//codex-rs/rollout:rollout-unit-tests 56
|
||||
//codex-rs/sandboxing:sandboxing-unit-tests 74
|
||||
//codex-rs/secrets:secrets-unit-tests 57
|
||||
//codex-rs/shell-command:shell-command-unit-tests 60
|
||||
//codex-rs/skills:skills-unit-tests 59
|
||||
//codex-rs/state:state-unit-tests 242
|
||||
//codex-rs/test-binary-support:test-binary-support-unit-tests 48
|
||||
//codex-rs/thread-manager-sample:codex-thread-manager-sample-bin-unit-tests 47
|
||||
//codex-rs/thread-store:thread-store-unit-tests 95
|
||||
//codex-rs/tools:tools-json_schema_policy_fixtures-test-windows-cross 34
|
||||
//codex-rs/tools:tools-unit-tests 37
|
||||
//codex-rs/tui:codex-tui-bin-unit-tests 2
|
||||
//codex-rs/tui:md-events-bin-unit-tests 1
|
||||
//codex-rs/tui:tui-all-test-windows-cross 36
|
||||
//codex-rs/tui:tui-manager_dependency_regression-test-windows-cross 2
|
||||
//codex-rs/tui:tui-test_backend-test-windows-cross 25
|
||||
//codex-rs/tui:tui-unit-tests 1003
|
||||
//codex-rs/utils/approval-presets:approval-presets-unit-tests 66
|
||||
//codex-rs/utils/audio:audio-unit-tests 76
|
||||
//codex-rs/utils/cli:cli-unit-tests 64
|
||||
//codex-rs/utils/git-discovery:git-discovery-unit-tests 59
|
||||
//codex-rs/utils/oss:oss-unit-tests 1
|
||||
//codex-rs/utils/output-truncation:output-truncation-unit-tests 60
|
||||
//codex-rs/utils/plugins:plugins-unit-tests 36
|
||||
//codex-rs/utils/sandbox-summary:sandbox-summary-unit-tests 66
|
||||
//codex-rs/windows-sandbox-rs:codex-command-runner-bin-unit-tests 1
|
||||
//codex-rs/windows-sandbox-rs:codex-windows-managed-deny-probe-bin-unit-tests 1
|
||||
//codex-rs/windows-sandbox-rs:codex-windows-sandbox-setup-bin-unit-tests 1
|
||||
//codex-rs/windows-sandbox-rs:windows-sandbox-rs-helper_manifest-test-windows-cross 1
|
||||
//codex-rs/windows-sandbox-rs:windows-sandbox-rs-unit-tests 23
|
||||
//codex-rs/windows-sandbox-service:codex-windows-sandbox-service-bin-unit-tests 46
|
||||
//codex-rs/windows-sandbox-service:windows-sandbox-service-unit-tests 12
|
||||
//codex-rs/worktree:worktree-settings-test-windows-cross 59
|
||||
//codex-rs/worktree:worktree-unit-tests 76
|
||||
//codex-rs/worktree:worktree-worktree-test-windows-cross 92
|
||||
|
@@ -178,7 +178,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
@@ -282,7 +282,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
@@ -379,7 +379,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
@@ -480,7 +480,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
|
||||
@@ -1,723 +0,0 @@
|
||||
name: rust-release-windows
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
WINDOWS_BINARIES: "codex codex-code-mode-host codex-exec-server codex-responses-api-proxy codex-windows-sandbox-setup codex-windows-sandbox-service codex-command-runner codex-app-server"
|
||||
|
||||
jobs:
|
||||
build-windows-binaries:
|
||||
name: Build Windows binaries - ${{ matrix.runner }} - ${{ matrix.target }} - ${{ matrix.bundle }} - ${{ matrix.build-system }}
|
||||
# Release Cargo artifacts only while Bazel releases are disabled.
|
||||
runs-on: ${{ matrix.runs_on }}
|
||||
environment:
|
||||
name: bazel
|
||||
deployment: false
|
||||
# Temporary increase from 90 minutes while Cargo and Bazel build paths coexist.
|
||||
# Reassess after the transition using Bazel release build timings.
|
||||
timeout-minutes: 120
|
||||
permissions:
|
||||
contents: read
|
||||
defaults:
|
||||
run:
|
||||
working-directory: codex-rs
|
||||
env:
|
||||
# Preserve Cargo names while teams opt into the additional Bazel artifacts.
|
||||
ARTIFACT_SUFFIX: ${{ matrix.build-system == 'bazel' && '-bazel' || '' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build-system: [cargo] # Bazel releases are disabled while the BuildBuddy key is revoked.
|
||||
target:
|
||||
- x86_64-pc-windows-msvc
|
||||
- aarch64-pc-windows-msvc
|
||||
bundle: [primary, helpers, app-server]
|
||||
include:
|
||||
- runner: windows-x64
|
||||
target: x86_64-pc-windows-msvc
|
||||
bundle: primary
|
||||
binaries: "codex codex-code-mode-host codex-exec-server codex-responses-api-proxy"
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-x64
|
||||
- runner: windows-arm64
|
||||
target: aarch64-pc-windows-msvc
|
||||
bundle: primary
|
||||
binaries: "codex codex-code-mode-host codex-exec-server codex-responses-api-proxy"
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-arm64
|
||||
- runner: windows-x64
|
||||
target: x86_64-pc-windows-msvc
|
||||
bundle: helpers
|
||||
binaries: "codex-windows-sandbox-setup codex-windows-sandbox-service codex-command-runner"
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-x64
|
||||
- runner: windows-arm64
|
||||
target: aarch64-pc-windows-msvc
|
||||
bundle: helpers
|
||||
binaries: "codex-windows-sandbox-setup codex-windows-sandbox-service codex-command-runner"
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-arm64
|
||||
- runner: windows-x64
|
||||
target: x86_64-pc-windows-msvc
|
||||
bundle: app-server
|
||||
binaries: "codex-app-server codex-code-mode-host codex-exec-server"
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-x64
|
||||
- runner: windows-arm64
|
||||
target: aarch64-pc-windows-msvc
|
||||
bundle: app-server
|
||||
binaries: "codex-app-server codex-code-mode-host codex-exec-server"
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/setup-ci
|
||||
if: matrix.build-system == 'cargo'
|
||||
- name: Print runner specs (Windows)
|
||||
shell: powershell
|
||||
run: |
|
||||
$computer = Get-CimInstance Win32_ComputerSystem
|
||||
$cpu = Get-CimInstance Win32_Processor | Select-Object -First 1
|
||||
$ramGiB = [math]::Round($computer.TotalPhysicalMemory / 1GB, 1)
|
||||
Write-Host "Runner: $env:RUNNER_NAME"
|
||||
Write-Host "OS: $([System.Environment]::OSVersion.VersionString)"
|
||||
Write-Host "CPU: $($cpu.Name)"
|
||||
Write-Host "Logical CPUs: $($computer.NumberOfLogicalProcessors)"
|
||||
Write-Host "Physical CPUs: $($computer.NumberOfProcessors)"
|
||||
Write-Host "Total RAM: $ramGiB GiB"
|
||||
Write-Host "Disk usage:"
|
||||
Get-PSDrive -PSProvider FileSystem | Format-Table -AutoSize Name, @{Name='Size(GB)';Expression={[math]::Round(($_.Used + $_.Free) / 1GB, 1)}}, @{Name='Free(GB)';Expression={[math]::Round($_.Free / 1GB, 1)}}
|
||||
- name: Set up Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0
|
||||
with:
|
||||
targets: ${{ matrix.build-system == 'cargo' && matrix.target || '' }}
|
||||
|
||||
- name: Prepare Bazel release build
|
||||
if: ${{ matrix.build-system == 'bazel' }}
|
||||
uses: ./.github/actions/prepare-bazel-ci
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
cache-scope: bazel-release-${{ matrix.bundle }}
|
||||
|
||||
- name: Configure rusty_v8 artifact overrides and verify checksums
|
||||
if: matrix.build-system == 'cargo'
|
||||
uses: ./.github/actions/setup-rusty-v8
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Configure MSVC environment
|
||||
uses: ./.github/actions/setup-msvc-env
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Build Bazel release binaries and symbols
|
||||
if: ${{ matrix.build-system == 'bazel' }}
|
||||
uses: ./.github/actions/build-bazel-release
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
bundle: ${{ matrix.bundle }}
|
||||
release-dir: ${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release
|
||||
|
||||
- name: Cargo build (Windows binaries)
|
||||
if: ${{ matrix.build-system == 'cargo' }}
|
||||
shell: bash
|
||||
run: |
|
||||
target="${{ matrix.target }}"
|
||||
if [[ "$target" == "x86_64-pc-windows-msvc" ]]; then
|
||||
export LIBSQLITE3_FLAGS=SQLITE_DISABLE_INTRINSIC
|
||||
fi
|
||||
build_args=()
|
||||
for binary in ${{ matrix.binaries }}; do
|
||||
build_args+=(--bin "$binary")
|
||||
done
|
||||
STABLE_GIT_COMMIT="$(git rev-parse HEAD)"
|
||||
export STABLE_GIT_COMMIT
|
||||
cargo build --target "$target" --release --timings "${build_args[@]}"
|
||||
|
||||
- name: Stage Windows binaries
|
||||
shell: bash
|
||||
run: |
|
||||
release_dir="$CARGO_TARGET_DIR/${{ matrix.target }}/release"
|
||||
output_dir="$release_dir/staged-${{ matrix.bundle }}"
|
||||
mkdir -p "$output_dir"
|
||||
for binary in ${{ matrix.binaries }}; do
|
||||
pdb_name="${binary//-/_}"
|
||||
pdb_path="$release_dir/${pdb_name}.pdb"
|
||||
if [[ ! -f "$pdb_path" ]]; then
|
||||
pdb_path="$release_dir/${binary}.pdb"
|
||||
fi
|
||||
if [[ ! -f "$pdb_path" ]]; then
|
||||
echo "PDB for $binary not found at $release_dir/${pdb_name}.pdb or $release_dir/${binary}.pdb" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "$release_dir/${binary}.exe" "$output_dir/${binary}.exe"
|
||||
cp "$pdb_path" "$output_dir/${binary}.pdb"
|
||||
done
|
||||
|
||||
- name: Upload Windows binaries
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: windows-binaries-${{ matrix.target }}-${{ matrix.bundle }}${{ env.ARTIFACT_SUFFIX }}
|
||||
path: |
|
||||
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release/staged-${{ matrix.bundle }}/*
|
||||
|
||||
build-windows-voice:
|
||||
name: Build Windows voice - ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.runs_on }}
|
||||
environment:
|
||||
name: bazel
|
||||
deployment: false
|
||||
timeout-minutes: 120
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-pc-windows-msvc
|
||||
arch: x86_64
|
||||
python_arch: x64
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-x64
|
||||
- target: aarch64-pc-windows-msvc
|
||||
arch: aarch64
|
||||
python_arch: arm64
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: "3.12"
|
||||
architecture: ${{ matrix.python_arch }}
|
||||
- name: Prepare Bazel CI
|
||||
uses: ./.github/actions/prepare-bazel-ci
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
cache-scope: release-voice-windows
|
||||
- uses: ./.github/actions/setup-msvc-env
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
- name: Refresh Bazel PATH for the selected MSVC target
|
||||
shell: pwsh
|
||||
run: ./.github/scripts/compute-bazel-windows-path.ps1
|
||||
- name: Download pinned Windows build inputs
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$manifest = Get-Content -Raw .github/scripts/voice-cygwin-snapshot.json | ConvertFrom-Json
|
||||
$pin = $manifest.archive
|
||||
$source = $manifest.sourceArchive
|
||||
$directory = Join-Path $env:RUNNER_TEMP "voice-cygwin-snapshot"
|
||||
New-Item -ItemType Directory -Path $directory | Out-Null
|
||||
gh release download $pin.tag --repo "${{ github.repository }}" --pattern $pin.name --pattern $source.name --dir $directory
|
||||
if ($LASTEXITCODE -ne 0) { throw "Cannot obtain the public Cygwin inputs and source" }
|
||||
$sourceFile = Join-Path $directory $source.name
|
||||
if ((Get-Item $sourceFile).Length -ne $source.bytes -or
|
||||
(Get-FileHash $sourceFile -Algorithm SHA256).Hash.ToLowerInvariant() -ne $source.sha256) {
|
||||
throw "Public Cygwin source archive mismatch"
|
||||
}
|
||||
"VOICE_CYGWIN_ARCHIVE=$(Join-Path $directory $pin.name)" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: Verify and install pinned public build tools
|
||||
shell: pwsh
|
||||
run: |
|
||||
& ./.github/scripts/setup-voice-windows.ps1 -Target "${{ matrix.target }}" -SnapshotArchive $env:VOICE_CYGWIN_ARCHIVE
|
||||
if (-not $env:SystemRoot) { throw "Windows SystemRoot is required for native audio actions" }
|
||||
"VOICE_WINDOWS_SYSTEM_ROOT=$env:SystemRoot" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
$hostArch = $env:PROCESSOR_ARCHITEW6432
|
||||
if (-not $hostArch) { $hostArch = $env:PROCESSOR_ARCHITECTURE }
|
||||
if (-not $hostArch) { throw "Windows host architecture is required" }
|
||||
"VOICE_WINDOWS_HOST_ARCH=$hostArch" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: Build same-commit native runtime and helper
|
||||
shell: bash
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
VOICE_ARCH: ${{ matrix.arch }}
|
||||
# Use local Bazel while BuildBuddy credentials are unavailable.
|
||||
run: |
|
||||
(cd codex-rs && cargo update --workspace)
|
||||
python .github/scripts/watch_voice_bazel.py "$(cygpath -w "$BASH")" ./.github/scripts/run-bazel-ci.sh \
|
||||
--remote-download-toplevel \
|
||||
--print-failed-action-summary \
|
||||
--windows-msvc-host-platform \
|
||||
-- \
|
||||
test --config=release \
|
||||
--platforms=//:local_windows_msvc \
|
||||
--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows,@local_config_cc//:cc-toolchain-arm64_windows,//third_party/voice:windows_pkg_config_toolchain,//third_party/voice:windows_cmake_toolchain \
|
||||
--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0 \
|
||||
--repo_env=BAZEL_MSVC_RUNTIME_VISUAL_STUDIO_EULA=1 \
|
||||
--inject_repository="voice_windows_tools=$VOICE_WINDOWS_BAZEL_REPOSITORY" \
|
||||
--//third_party/voice:windows_installed_tools=@voice_windows_tools//:tools \
|
||||
--action_env="SystemRoot=$VOICE_WINDOWS_SYSTEM_ROOT" \
|
||||
--host_action_env="SystemRoot=$VOICE_WINDOWS_SYSTEM_ROOT" \
|
||||
--action_env="PROCESSOR_ARCHITECTURE=$VOICE_WINDOWS_HOST_ARCH" \
|
||||
--host_action_env="PROCESSOR_ARCHITECTURE=$VOICE_WINDOWS_HOST_ARCH" \
|
||||
--output_groups=default,receipt,sdk \
|
||||
--workspace_status_command=./scripts/workspace-status.cmd \
|
||||
--build_metadata=COMMIT_SHA="$GITHUB_SHA" \
|
||||
-- \
|
||||
"//third_party/voice:native_runtime_windows_$ARCH" \
|
||||
@rules_rust//cargo/private/cargo_build_script_runner:test \
|
||||
//codex-rs/voice-host:codex-voice-host
|
||||
- name: Stage verified voice build output
|
||||
shell: bash
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
runtime="bazel-bin/third_party/voice/native_runtime_windows_${ARCH}"
|
||||
PYTHONPATH=third_party/voice python - "$runtime" "$TARGET" <<'PY'
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from package_runtime import runtime_files
|
||||
runtime_files(Path(sys.argv[1]).resolve(strict=True), sys.argv[2])
|
||||
PY
|
||||
output="voice-unsigned/${TARGET}"
|
||||
mkdir -p "$output"
|
||||
cp -R "$runtime" "$output/runtime"
|
||||
cp bazel-bin/codex-rs/voice-host/codex-voice-host.exe "$output/codex-voice-host.exe"
|
||||
chmod -R u+w "$output"
|
||||
tar -C "$output" -czf "voice-unsigned-${TARGET}.tar.gz" runtime codex-voice-host.exe
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: voice-${{ matrix.target }}-unsigned
|
||||
path: voice-unsigned-${{ matrix.target }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
build-windows-symbols:
|
||||
needs:
|
||||
- build-windows-binaries
|
||||
name: Build Windows symbols - ${{ matrix.target }} - ${{ matrix.build-system }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: read
|
||||
defaults:
|
||||
run:
|
||||
working-directory: codex-rs
|
||||
env:
|
||||
ARTIFACT_SUFFIX: ${{ matrix.build-system == 'bazel' && '-bazel' || '' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build-system: [cargo] # Bazel releases are disabled while the BuildBuddy key is revoked.
|
||||
target:
|
||||
- aarch64-pc-windows-msvc
|
||||
- x86_64-pc-windows-msvc
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/setup-ci
|
||||
- name: Download prebuilt Windows binaries
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
pattern: windows-binaries-${{ matrix.target }}-{primary,helpers,app-server}${{ env.ARTIFACT_SUFFIX }}
|
||||
merge-multiple: true
|
||||
path: ${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release
|
||||
- name: Build symbols archive
|
||||
shell: bash
|
||||
run: |
|
||||
bash "${GITHUB_WORKSPACE}/.github/scripts/archive-release-symbols-and-strip-binaries.sh" \
|
||||
--target "${{ matrix.target }}" \
|
||||
--artifact-name "${{ matrix.target }}" \
|
||||
--release-dir "${CARGO_TARGET_DIR}/${{ matrix.target }}/release" \
|
||||
--archive-dir "symbols-dist/${{ matrix.target }}" \
|
||||
--binaries "${WINDOWS_BINARIES}"
|
||||
- name: Suffix Bazel artifact filenames
|
||||
if: ${{ matrix.build-system == 'bazel' }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for artifact in "symbols-dist/${{ matrix.target }}"/*; do
|
||||
name="${artifact##*/}"
|
||||
stem="${name%%.*}"
|
||||
mv "$artifact" "${artifact%/*}/${stem}-bazel${name#"$stem"}"
|
||||
done
|
||||
|
||||
- name: Upload symbols archive
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ matrix.target }}-symbols${{ env.ARTIFACT_SUFFIX }}
|
||||
path: codex-rs/symbols-dist/${{ matrix.target }}/*
|
||||
if-no-files-found: error
|
||||
|
||||
build-windows:
|
||||
needs:
|
||||
- build-windows-binaries
|
||||
- build-windows-voice
|
||||
name: Build - ${{ matrix.runner }} - ${{ matrix.target }} - ${{ matrix.build-system }}
|
||||
runs-on: ${{ matrix.runs_on }}
|
||||
environment:
|
||||
name: azure-artifact-signing
|
||||
deployment: false
|
||||
timeout-minutes: 120
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
defaults:
|
||||
run:
|
||||
working-directory: codex-rs
|
||||
env:
|
||||
ARTIFACT_SUFFIX: ${{ matrix.build-system == 'bazel' && '-bazel' || '' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build-system: [cargo] # Bazel releases are disabled while the BuildBuddy key is revoked.
|
||||
target:
|
||||
- x86_64-pc-windows-msvc
|
||||
- aarch64-pc-windows-msvc
|
||||
include:
|
||||
- runner: windows-x64
|
||||
target: x86_64-pc-windows-msvc
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-x64
|
||||
- runner: windows-x64
|
||||
target: aarch64-pc-windows-msvc
|
||||
runs_on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
labels: ${{ github.event.repository.name }}-windows-x64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ./.github/actions/setup-ci
|
||||
|
||||
- name: Download prebuilt Windows primary binaries
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: windows-binaries-${{ matrix.target }}-primary${{ env.ARTIFACT_SUFFIX }}
|
||||
path: ${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release
|
||||
|
||||
- name: Download prebuilt Windows helper binaries
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: windows-binaries-${{ matrix.target }}-helpers${{ env.ARTIFACT_SUFFIX }}
|
||||
path: ${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release
|
||||
|
||||
- name: Download prebuilt Windows app-server binary
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: windows-binaries-${{ matrix.target }}-app-server${{ env.ARTIFACT_SUFFIX }}
|
||||
path: ${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release
|
||||
|
||||
- name: Verify binaries
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for binary in ${WINDOWS_BINARIES}; do
|
||||
ls -lh "$CARGO_TARGET_DIR/${{ matrix.target }}/release/${binary}.exe"
|
||||
done
|
||||
|
||||
- name: Sign Windows release files with Azure Trusted Signing
|
||||
uses: ./.github/actions/windows-code-sign
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
binaries: ${{ env.WINDOWS_BINARIES }}
|
||||
# The installer is architecture-independent; sign it only in the x64 job.
|
||||
additional-files: ${{ matrix.target == 'x86_64-pc-windows-msvc' && format('{0}/scripts/install/install.ps1', github.workspace) || '' }}
|
||||
client-id: ${{ secrets.AZURE_ARTIFACT_SIGNING_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_ARTIFACT_SIGNING_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_ARTIFACT_SIGNING_SUBSCRIPTION_ID }}
|
||||
endpoint: ${{ secrets.AZURE_ARTIFACT_SIGNING_ENDPOINT }}
|
||||
account-name: ${{ secrets.AZURE_ARTIFACT_SIGNING_ACCOUNT_NAME }}
|
||||
certificate-profile-name: ${{ secrets.AZURE_ARTIFACT_SIGNING_CERTIFICATE_PROFILE_NAME }}
|
||||
|
||||
- name: Download matching native voice build
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: voice-${{ matrix.target }}-unsigned
|
||||
path: ${{ runner.temp }}/unsigned-voice
|
||||
|
||||
- name: Stage voice files for signing
|
||||
id: voice_files
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
target="${{ matrix.target }}"
|
||||
unsigned="${RUNNER_TEMP}/unsigned-voice/extracted"
|
||||
signed="${GITHUB_WORKSPACE}/signed-voice/${target}"
|
||||
mkdir -p "$unsigned" "$signed"
|
||||
tar -xzf "$(cygpath -u "${RUNNER_TEMP}/unsigned-voice/voice-unsigned-${target}.tar.gz")" -C "$(cygpath -u "$unsigned")"
|
||||
python "${GITHUB_WORKSPACE}/third_party/voice/release_runtime.py" stage \
|
||||
--source "$unsigned/runtime" --target "$target" --output "$signed/runtime"
|
||||
cp "$unsigned/codex-voice-host.exe" "$signed/codex-voice-host.exe"
|
||||
chmod -R u+w "$signed"
|
||||
{
|
||||
echo 'files<<EOF'
|
||||
echo "$signed/codex-voice-host.exe"
|
||||
find "$signed/runtime/bin" -name '*.dll' -type f -print
|
||||
echo 'EOF'
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Sign Windows voice helper and native DLLs
|
||||
uses: azure/trusted-signing-action@1d365fec12862c4aa68fcac418143d73f0cea293 # v0.5.11
|
||||
with:
|
||||
endpoint: ${{ secrets.AZURE_ARTIFACT_SIGNING_ENDPOINT }}
|
||||
trusted-signing-account-name: ${{ secrets.AZURE_ARTIFACT_SIGNING_ACCOUNT_NAME }}
|
||||
certificate-profile-name: ${{ secrets.AZURE_ARTIFACT_SIGNING_CERTIFICATE_PROFILE_NAME }}
|
||||
exclude-environment-credential: true
|
||||
exclude-workload-identity-credential: true
|
||||
exclude-managed-identity-credential: true
|
||||
exclude-shared-token-cache-credential: true
|
||||
exclude-visual-studio-credential: true
|
||||
exclude-visual-studio-code-credential: true
|
||||
exclude-azure-cli-credential: false
|
||||
exclude-azure-powershell-credential: true
|
||||
exclude-azure-developer-cli-credential: true
|
||||
exclude-interactive-browser-credential: true
|
||||
cache-dependencies: false
|
||||
files: ${{ steps.voice_files.outputs.files }}
|
||||
|
||||
- uses: ./.github/actions/setup-msvc-env
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Seal and verify signed voice output
|
||||
shell: pwsh
|
||||
run: |
|
||||
$target = "${{ matrix.target }}"
|
||||
$signed = Join-Path $env:GITHUB_WORKSPACE "signed-voice/$target"
|
||||
python (Join-Path $env:GITHUB_WORKSPACE 'third_party/voice/windows_crt.py') --root (Join-Path $signed 'runtime') --target $target --helper (Join-Path $signed 'codex-voice-host.exe')
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Cannot stage verified Microsoft CRT' }
|
||||
$files = @(Join-Path $signed "codex-voice-host.exe") + @(
|
||||
Get-ChildItem (Join-Path $signed "runtime/bin") -Filter *.dll -File |
|
||||
ForEach-Object FullName
|
||||
)
|
||||
if ($files.Count -lt 8) { throw "Voice DLL closure is incomplete" }
|
||||
foreach ($file in $files) {
|
||||
$signature = Get-AuthenticodeSignature $file
|
||||
if ($signature.Status -ne 'Valid') { throw "Unsigned voice file: $file ($($signature.Status))" }
|
||||
}
|
||||
python (Join-Path $env:GITHUB_WORKSPACE 'third_party/voice/release_runtime.py') seal --target $target --output (Join-Path $signed 'runtime')
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Cannot seal signed voice runtime' }
|
||||
"VOICE_RELEASE_DIR=$signed" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Stage artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
dest="dist/${{ matrix.target }}"
|
||||
mkdir -p "$dest"
|
||||
|
||||
for binary in ${WINDOWS_BINARIES}; do
|
||||
cp "$CARGO_TARGET_DIR/${{ matrix.target }}/release/${binary}.exe" \
|
||||
"$dest/${binary}-${{ matrix.target }}.exe"
|
||||
done
|
||||
|
||||
- name: Build Codex package archives
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
target="${{ matrix.target }}"
|
||||
archive_script="${GITHUB_WORKSPACE}/.github/scripts/build-codex-package-archive.sh"
|
||||
voice_args=(--voice-release-dir "$VOICE_RELEASE_DIR")
|
||||
voice_args+=(--release-version "${GITHUB_REF_NAME#rust-v}")
|
||||
bash "$archive_script" \
|
||||
--target "$target" --bundle primary \
|
||||
--entrypoint-dir "$CARGO_TARGET_DIR/$target/release" \
|
||||
--archive-dir "dist/$target" "${voice_args[@]}"
|
||||
bash "$archive_script" \
|
||||
--target "$target" --bundle app-server \
|
||||
--entrypoint-dir "$CARGO_TARGET_DIR/$target/release" \
|
||||
--archive-dir "dist/$target"
|
||||
|
||||
- name: Verify packaged executor signatures and bytes
|
||||
shell: pwsh
|
||||
run: |
|
||||
$target = "${{ matrix.target }}"
|
||||
$source = Join-Path $env:CARGO_TARGET_DIR "$target/release/codex-exec-server.exe"
|
||||
foreach ($stem in @("codex-package", "codex-app-server-package")) {
|
||||
$package = Join-Path $env:RUNNER_TEMP "verify-executor-$stem-$target"
|
||||
New-Item -ItemType Directory -Path $package | Out-Null
|
||||
tar -xzf "dist/$target/$stem-$target.tar.gz" -C $package
|
||||
if ($LASTEXITCODE -ne 0) { throw "Cannot extract executor package" }
|
||||
$binary = Join-Path $package "bin/codex-exec-server.exe"
|
||||
if ((Get-FileHash $binary).Hash -ne (Get-FileHash $source).Hash) {
|
||||
throw "Packaged executor differs from the signed input"
|
||||
}
|
||||
$signature = Get-AuthenticodeSignature $binary
|
||||
if ($signature.Status -ne "Valid" -or $null -eq $signature.TimeStamperCertificate) {
|
||||
throw "Invalid or untimestamped executor signature"
|
||||
}
|
||||
}
|
||||
|
||||
- name: Verify packaged Windows voice closure
|
||||
shell: pwsh
|
||||
run: |
|
||||
$target = "${{ matrix.target }}"
|
||||
$package = Join-Path $env:RUNNER_TEMP "verify-voice-archive-$target"
|
||||
New-Item -ItemType Directory -Path $package | Out-Null
|
||||
tar -xzf "dist/$target/codex-package-$target.tar.gz" -C $package
|
||||
if ($LASTEXITCODE -ne 0) { throw "Cannot extract the final Windows package" }
|
||||
$voice = Join-Path $package 'codex-resources/voice'
|
||||
$helper = Join-Path $voice 'bin/codex-voice-host.exe'
|
||||
if (-not (Test-Path $helper) -or -not (Test-Path (Join-Path $voice 'bin/gstreamer-1.0-0.dll'))) {
|
||||
throw 'Signed Windows voice files are missing from the canonical package'
|
||||
}
|
||||
$signature = Get-AuthenticodeSignature $helper
|
||||
if ($signature.Status -ne 'Valid') { throw "Packaged helper signature: $($signature.Status)" }
|
||||
python -c 'import sys; from pathlib import Path; sys.path.insert(0, sys.argv[3]); from package_runtime import runtime_files; runtime_files(Path(sys.argv[1]), sys.argv[2], public_release=True)' $voice $target (Join-Path $env:GITHUB_WORKSPACE 'third_party/voice')
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Packaged runtime receipt verification failed' }
|
||||
|
||||
- name: Set up Python release tools
|
||||
if: ${{ matrix.build-system == 'cargo' }}
|
||||
uses: ./.github/actions/setup-python-release-tools
|
||||
with:
|
||||
group: runtime
|
||||
|
||||
- name: Build Python runtime wheel
|
||||
if: ${{ matrix.build-system == 'cargo' }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
case "${{ matrix.target }}" in
|
||||
aarch64-pc-windows-msvc)
|
||||
platform_tag="win_arm64"
|
||||
;;
|
||||
x86_64-pc-windows-msvc)
|
||||
platform_tag="win_amd64"
|
||||
;;
|
||||
*)
|
||||
echo "No Python runtime wheel platform tag for ${{ matrix.target }}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# The wheel's Windows support floor predates the native voice
|
||||
# runtime's verified device/VC++ prerequisites. Keep it voice-free.
|
||||
wheel_package="${RUNNER_TEMP}/codex-package-${{ matrix.target }}"
|
||||
python - "$wheel_package" <<'PY'
|
||||
import sys
|
||||
from pathlib import Path
|
||||
assert not (Path(sys.argv[1]) / "codex-resources" / "voice").exists()
|
||||
PY
|
||||
stage_dir="${RUNNER_TEMP}/openai-codex-cli-bin-${{ matrix.target }}"
|
||||
wheel_dir="${GITHUB_WORKSPACE}/python-runtime-dist/${{ matrix.target }}"
|
||||
python "${GITHUB_WORKSPACE}/sdk/python/scripts/update_sdk_artifacts.py" \
|
||||
stage-runtime \
|
||||
"$stage_dir" \
|
||||
"$wheel_package" \
|
||||
--codex-version "${GITHUB_REF_NAME}" \
|
||||
--platform-tag "$platform_tag"
|
||||
uv build --offline --no-build-isolation --no-create-gitignore \
|
||||
--python "${RUNNER_TEMP}/python-runtime-build-venv" --wheel --out-dir "$wheel_dir" "$stage_dir"
|
||||
|
||||
- name: Upload Python runtime wheel
|
||||
if: ${{ matrix.build-system == 'cargo' }}
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: python-runtime-wheel-${{ matrix.target }}
|
||||
path: python-runtime-dist/${{ matrix.target }}/*.whl
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Compress artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
# Path that contains the uncompressed binaries for the current
|
||||
# ${{ matrix.target }}
|
||||
dest="dist/${{ matrix.target }}"
|
||||
repo_root=$PWD
|
||||
target="${{ matrix.target }}"
|
||||
export dest repo_root target
|
||||
|
||||
# For compatibility with environments that lack the `zstd` tool we
|
||||
# additionally create a `.tar.gz` and `.zip` for every Windows binary.
|
||||
# The end result is:
|
||||
# codex-<target>.zst
|
||||
# codex-<target>.tar.gz
|
||||
# codex-<target>.zip
|
||||
# Variables in the single-quoted script expand in the child shell.
|
||||
# shellcheck disable=SC2016
|
||||
# Start larger binaries first so both workers stay busy.
|
||||
find "$dest" -maxdepth 1 -type f -printf '%s %p\0' |
|
||||
sort -z -nr |
|
||||
cut -z -d ' ' -f 2- |
|
||||
xargs -0 -n1 -P2 bash -c '
|
||||
set -euo pipefail
|
||||
f=$1
|
||||
base="$(basename "$f")"
|
||||
# Skip files that are already archives (should not happen, but be
|
||||
# safe).
|
||||
if [[ "$base" == *.tar.gz || "$base" == *.tar.zst || "$base" == *.zip || "$base" == *.dmg ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Do not try to compress signature bundles.
|
||||
if [[ "$base" == *.sigstore ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Create per-binary tar.gz
|
||||
tar -C "$dest" -czf "$dest/${base}.tar.gz" "$base"
|
||||
|
||||
# Create zip archive for Windows binaries.
|
||||
# Must run from inside the dest dir so 7z does not embed the
|
||||
# directory path inside the zip.
|
||||
if [[ "$base" == "codex-${target}.exe" ]]; then
|
||||
# Preserve WinGet executable paths while including the signed
|
||||
# runtime, resources, and package metadata from the canonical tar.
|
||||
bundle_dir="$(mktemp -d)"
|
||||
tar -xzf "$dest/codex-package-${target}.tar.gz" -C "$bundle_dir"
|
||||
python "${GITHUB_WORKSPACE}/scripts/build_winget_package.py" "$(cygpath -w "$bundle_dir")"
|
||||
(cd "$bundle_dir" && 7z a "$repo_root/$dest/${base}.zip" .)
|
||||
rm -rf "$bundle_dir"
|
||||
else
|
||||
(cd "$dest" && 7z a "${base}.zip" "$base")
|
||||
fi
|
||||
|
||||
# Keep raw executables and produce .zst alongside them.
|
||||
"${GITHUB_WORKSPACE}/.github/workflows/zstd" -T0 -19 "$dest/$base"
|
||||
' _
|
||||
|
||||
- name: Verify and stage signed PowerShell installer
|
||||
if: matrix.build-system == 'cargo' && matrix.target == 'x86_64-pc-windows-msvc'
|
||||
shell: powershell
|
||||
run: |
|
||||
$installer = Join-Path $env:GITHUB_WORKSPACE 'scripts/install/install.ps1'
|
||||
$signature = Get-AuthenticodeSignature $installer
|
||||
if ($signature.Status -ne 'Valid' -or $null -eq $signature.TimeStamperCertificate) {
|
||||
throw "Installer signature is invalid or missing a timestamp: $($signature.Status)"
|
||||
}
|
||||
# Stage after compression so the installer remains a plain script.
|
||||
Copy-Item $installer 'dist/${{ matrix.target }}/install.ps1'
|
||||
|
||||
- name: Suffix Bazel artifact filenames
|
||||
if: ${{ matrix.build-system == 'bazel' }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for artifact in "dist/${{ matrix.target }}"/*; do
|
||||
name="${artifact##*/}"
|
||||
stem="${name%%.*}"
|
||||
mv "$artifact" "${artifact%/*}/${stem}-bazel${name#"$stem"}"
|
||||
done
|
||||
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ matrix.target }}${{ env.ARTIFACT_SUFFIX }}
|
||||
path: |
|
||||
codex-rs/dist/${{ matrix.target }}/*
|
||||
@@ -208,6 +208,7 @@ jobs:
|
||||
name: Install musl build tools
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
CODEX_MUSL_RELEASE_LINK_FLAGS: "1"
|
||||
run: bash "${GITHUB_WORKSPACE}/.github/scripts/install-musl-build-tools.sh"
|
||||
|
||||
- if: ${{ matrix.build-system == 'cargo' && contains(matrix.target, 'linux') }}
|
||||
@@ -1768,39 +1769,7 @@ jobs:
|
||||
RELEASE_NOTES: ${{ steps.release_notes.outputs.path }}
|
||||
MAKE_LATEST: ${{ steps.release_name.outputs.make_latest }}
|
||||
PRERELEASE: ${{ steps.release_name.outputs.prerelease }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Look up this tag, including drafts, without listing release history.
|
||||
# API errors must fail the step rather than look like an absent release.
|
||||
# shellcheck disable=SC2016
|
||||
exists="$(gh api graphql \
|
||||
-f query='query($owner:String!,$repo:String!,$tag:String!){repository(owner:$owner,name:$repo){release(tagName:$tag){databaseId}}}' \
|
||||
-f owner="$GITHUB_REPOSITORY_OWNER" \
|
||||
-f repo="${GITHUB_REPOSITORY#*/}" \
|
||||
-f tag="$GITHUB_REF_NAME" \
|
||||
--jq '.data.repository.release != null')"
|
||||
release_args=(
|
||||
--repo "$GITHUB_REPOSITORY"
|
||||
--title "$RELEASE_NAME"
|
||||
--notes-file "$RELEASE_NOTES"
|
||||
--prerelease="$PRERELEASE"
|
||||
)
|
||||
if [[ "$exists" == false ]]; then
|
||||
# Prereleases must be created directly to keep prereleased events.
|
||||
draft=true
|
||||
if [[ "$PRERELEASE" == true ]]; then
|
||||
draft=false
|
||||
fi
|
||||
gh release create "$GITHUB_REF_NAME" "${release_args[@]}" \
|
||||
--draft="$draft" --verify-tag --latest=false
|
||||
fi
|
||||
|
||||
mapfile -d '' assets < <(find dist -type f -print0 | sort -z)
|
||||
gh release upload "$GITHUB_REF_NAME" "${assets[@]}" \
|
||||
--repo "$GITHUB_REPOSITORY" --clobber
|
||||
gh release edit "$GITHUB_REF_NAME" "${release_args[@]}" \
|
||||
--draft=false --latest="$MAKE_LATEST"
|
||||
run: bash .github/scripts/publish-github-release.sh
|
||||
|
||||
publish-r2-assets:
|
||||
name: publish-r2-assets
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
name: Xcoder Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: xcoder-linux-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: Build and test Linux x86_64
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
CARGO_BUILD_JOBS: '1'
|
||||
# Published builds keep the optimized profile; local builds use `local`.
|
||||
XCODER_CARGO_PROFILE: release
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up the locked Ziran toolchain
|
||||
id: ziran
|
||||
uses: ziranlang/ziran/.github/actions/setup@d2db9d35feaf2a3278dc7bed571022b0e0323247
|
||||
with:
|
||||
fetch: 'true'
|
||||
packages: build-essential pkg-config libssl-dev libcap-dev libbz2-dev libzstd-dev zlib1g-dev bubblewrap
|
||||
- uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0
|
||||
- name: Enable private Linux test namespaces
|
||||
run: |
|
||||
sudo sysctl -w kernel.unprivileged_userns_clone=1
|
||||
if sysctl kernel.apparmor_restrict_unprivileged_userns >/dev/null 2>&1; then
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
fi
|
||||
- name: Cache Cargo downloads and compiled dependencies
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
with:
|
||||
path: |
|
||||
build/cargo-home/registry
|
||||
build/cargo-home/git
|
||||
codex-rs/target
|
||||
key: xcoder-linux-${{ runner.arch }}-${{ hashFiles('codex-rs/Cargo.lock', 'codex-rs/rust-toolchain.toml', 'ziran.lock') }}
|
||||
restore-keys: xcoder-linux-${{ runner.arch }}-
|
||||
- name: Build and run the complete offline local suite
|
||||
run: make test
|
||||
- name: Package the tested Linux build and its native compiler
|
||||
env:
|
||||
ZIRAN_TOOLCHAIN: ${{ steps.ziran.outputs.root }}
|
||||
run: python3 scripts/package-linux.py --toolchain "$ZIRAN_TOOLCHAIN"
|
||||
- name: Test the relocated download
|
||||
run: python3 tests/linux_package_test.py
|
||||
- name: Upload Linux download
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: xcoder-linux-x86_64
|
||||
path: |
|
||||
build/xcoder-linux-x86_64.tar.gz
|
||||
build/xcoder-linux-x86_64.tar.gz.sha256
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
@@ -1,4 +1,6 @@
|
||||
# deps
|
||||
ziran.local.toml
|
||||
backup/
|
||||
# Node.js dependencies
|
||||
node_modules
|
||||
.pnpm-store
|
||||
|
||||
@@ -2,4 +2,62 @@ The changelog can be found on the [releases page](https://github.com/openai/code
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Local builds are faster. `make` builds a `local` profile (no cross-crate LTO, 16 codegen units, incremental, no debug info) whose final link spreads over many cores and needs a fraction of the memory; published releases keep the optimized `release` profile (`XCODER_CARGO_PROFILE=release`, set in CI).
|
||||
- `codex-protocol`, which nearly every crate depends on, no longer waits for the network proxy to compile: the policy values it shares with the proxy live in a small `codex-network-policy` crate. The proxy was the slowest crate in the build (about 140 s), so its compile time now overlaps the rest.
|
||||
- Line diffs, unified diff text and unified-diff parsing come from the Ziran `diff` package (`native/diff.zi`, `codex-utils-text-diff`) instead of `similar` and `diffy`; the turn diff, `apply_patch` results, the git baseline and the TUI diff view use it. Output matches `similar` byte for byte and parsing matches `diffy` on generated and damaged patches. The 100 ms diff deadline is now a deterministic work budget.
|
||||
- The private git baseline repository is written and read with the Ziran `git` package instead of `gix`, and `SanitizedGitUrl` removes remote credentials with the package's port of gix-url's rules. `gix` and `gix-url` (about 40 crates) are no longer in the build, only in tests: the `git` CLI checks the objects (`git fsck --strict`), and gix-url is the oracle for 200,000 generated remotes.
|
||||
- Builds no longer recompile most of the workspace every time: the Ziran build scripts watched the optional `ziran.local.toml`, and Cargo reruns a script on every build while a watched file is missing. The override is now watched only while it exists; touch `ziran.toml` after adding one.
|
||||
- Make builds no longer cap themselves at 2 GiB of RAM in their own `xcoder-compilation.scope`: a release build that needs more spent hours in swap. They still run at nice 19 and the lowest I/O priority; memory limits come from the surrounding build queue. `XCODER_BUILD_SCOPE` is gone.
|
||||
- The TUI header, `/status`, the session banner of `xcoder exec`, analytics and turn metadata show the Codex version Xcoder tracks (at least 0.169.0, following the newest upstream release) instead of `v0.0.0`; `xcoder --version` still shows Xcoder's own number.
|
||||
- Windows support is removed. Gone: the Windows sandbox crates (restricted-token, elevated and MXC backends, their setup service and `codex sandbox windows`/`uninstall`), PowerShell and `cmd` shell support (including the tree-sitter PowerShell grammar), Windows-only code paths, the `[windows]` config and managed requirements, Windows hook commands and managed hook directories, Windows computer-use app rules, the Windows sandbox app-server requests and TUI prompts, the Windows standalone updater, and the Windows CI and installer scripts. Old config keys for these features are ignored.
|
||||
- `apply_patch` recognizes its heredoc form (`apply_patch <<'EOF' ... EOF`, optionally after `cd <path> &&`) with Ziran instead of a tree-sitter query; tree-sitter is now only a test dependency of apply-patch. Heredoc bodies end at the exact delimiter line, as in Bash, so a patch line such as `EOFX` no longer cuts the patch short.
|
||||
- Dangerous-command detection finds the commands in a shell script with Ziran (`native/shell.zi`): every command in lists, pipelines, subshells, groups, if/while/until/for/case and function bodies, `$(...)`, backticks, process substitutions, double quotes and unquoted heredoc bodies. It never misses a dangerous command tree-sitter found in a script Bash would run (40,000 generated scripts, 1,005 real ones), still ignores scripts Bash rejects, and also catches dangerous commands in real scripts tree-sitter could not parse.
|
||||
- The check that a shell script is only plain commands joined by `&&`, `||`, `;`, `|` and newlines (the proof exec policy and the safe-command lists rely on) runs in Ziran (`native/shell.zi`) instead of walking a tree-sitter parse. It is never looser than tree-sitter: on 50,000 generated scripts it accepts nothing tree-sitter rejects and returns the same words, and on 1,005 real agent commands the two agree exactly.
|
||||
- Streaming an `apply_patch` call no longer clones and reformats the whole patch for every few characters the model sends: the progress snapshot is rebuilt only when a delta completes a line, and the patch parser reads deltas line by line instead of one character at a time.
|
||||
- Rules files (`.rules` exec policies) are parsed in Ziran (`native/execpolicy.zi`) instead of by a Starlark interpreter. The declarative subset they use still works: `prefix_rule`, `network_rule` and `host_executable` calls, `NAME = value` assignments, strings with Starlark escapes, lists, tuples, `None`/`True`/`False`, names and `+`. Functions, loops, conditions, `load` and f-strings are reported as unsupported with their line. The Starlark interpreter and about 60 crates it pulled in are gone.
|
||||
- `apply_patch` applies an update in Ziran from start to end: it splits the file into line offsets, finds every hunk, and writes the new contents once, keeping each line's ending, instead of copying every line into a string several times. A 20-hunk update of a 50,000-line file takes 3.2 ms instead of 7.7 ms; results and error messages match the Rust code on 3,000 generated patches.
|
||||
- `apply_patch` finds where each hunk goes with a Ziran matcher (`native/apply_patch.zi`) that borrows the file's lines instead of copying them. Answers are identical to the Rust matcher it replaces (checked against it on thousands of generated cases); on a 50,000-line file the whitespace- and punctuation-tolerant searches and searches that find nothing are 4-5x faster, exact matches cost about 0.4 ms more. `make benchmark-apply-patch` measures it.
|
||||
- Parallel tool cells no longer fail at random with "Text file busy": starting a freshly compiled cell retries while another thread's fork still holds the file.
|
||||
- The upstream Codex version check runs on its own thread, so a slow network never delays Xcoder exiting; the offline local tests turn it off.
|
||||
- GPT-6.2-Sol (`gpt-6.2-sol`) is in the bundled model table, first, so it is the default when no model is configured even if the live catalog cannot be fetched. The entry is the provider's own (500,000-token context, efforts low to ultra, freeform `apply_patch`, code-mode-only tools, the `ultrafast` service tier, audio input). Before, a session whose catalog request timed out (the request has 5 s, including DNS) started on GPT-6.1-Sol, or ran GPT-6.2-Sol with fallback metadata and the warning "Model metadata for `gpt-6.2-sol` not found".
|
||||
- The `new-model` skill (`skills/new-model/SKILL.md`) lists the steps for adopting a new model, with the checks that save time: logins with quota and DNS speed first, builds only through `make`, real turns started as soon as the binary exists. `scripts/model-turns.py` runs the 12 real turns (a plain answer, a shell call and a patch edit at each effort). `scripts/install-xcoder-remote.sh omega|delta` installs the locally installed build on Omega or Delta, renaming each file into place.
|
||||
|
||||
## 0.1.0 — 2026-11-14
|
||||
|
||||
First Xcoder release: Codex with native Ziran tool execution, for Linux x86_64.
|
||||
|
||||
- Installing replaces the previous binaries in place; the installer no longer keeps copies of them.
|
||||
- Shell commands that run before the session's shell snapshot is written also put Xcoder's `apply_patch` ahead of a login profile's `PATH`; only snapshot restores replayed it before.
|
||||
- Tool cells no longer fail with "unexpected end of file" when they exit: the callback channels a cell leaves unused now close quietly.
|
||||
|
||||
- The version Xcoder reports to the Codex service follows the newest upstream Codex release, not Xcoder's own version: at least 0.169.0, and newer once GitHub's latest `openai/codex` release says so (checked in the background at most every 20 hours, cached in `CODEX_HOME/xcoder-upstream-version.json`; `XCODER_UPSTREAM_VERSION_CHECK=0` turns the check off). The model catalog, the User-Agent and the `version` header all use it, so newer models such as GPT-6.1-Sol are listed and accepted; while requests said `0.0.0`, the service hid GPT-6.1-Sol and refused it.
|
||||
- `xcoder --version` shows Xcoder's own release number.
|
||||
|
||||
- Remove parts Xcoder never uses under Harmony: the `cloud`, `tcp-tunnel`, `responses-api-proxy`, `exec-server` and `debug app-server` subcommands with their seven crates, the Ollama and LM Studio providers, and the AWS SDK behind Amazon Bedrock sign-in. `--oss` now stops at startup with an explanation instead of probing for local servers, and Bedrock selection reports that it is unavailable. About 22,000 lines and the AWS SDK dependency tree are gone.
|
||||
|
||||
- An idle Xcoder session gives its memory back. After two minutes without work (`XCODER_IDLE_RELEASE_SECONDS`; `0` turns it off) a watcher written in Ziran returns the allocator's free pages, moves private memory to swap and unmaps unmodified program pages. The session stays intact and pages back what its next event touches. `make benchmark-memory` measures a long offline session before and after.
|
||||
|
||||
- The TUI's replay copy of a finished command keeps only the start and end of output above 16 KiB; the live cell still holds the full output. Every command's output was held twice for the life of the session.
|
||||
|
||||
- Identify the running Xcoder CLI process as `xcode` on Linux, including when
|
||||
compatibility launch paths retain their existing filenames.
|
||||
|
||||
- Shell commands run Xcoder's own `apply_patch`, even when a login profile resets `PATH` or puts another `apply_patch` first. A profile copy had dropped each added file's first line and written the rest twice.
|
||||
|
||||
- New standalone installations expose the `xcoder` command without adding a `codex` alias.
|
||||
- Download tested Linux x86_64 Xcoder builds, including the native compiler, from the repository's Xcoder Linux workflow.
|
||||
|
||||
- Render Mermaid diagrams through the standalone Ziran `mermaid` package; the Rust crate is only its adapter, and the original renderer's snapshots and public-API tests run against it.
|
||||
|
||||
- Use the exact streamed custom tool input when a final snapshot disagrees with its deltas; reject mismatched completions and incomplete streams.
|
||||
|
||||
- Replace the TUI fuzzy matcher with a Ziran native implementation that streams the haystack and caches only the lowered needle.
|
||||
|
||||
- Bound GNU allocator arena retention while preserving owner settings; keep custom-cell compilation to one worker and support long private runtime paths.
|
||||
|
||||
- Execute ordinary tool plans through the precompiled Ziran executor and cache custom Zi2c cells; add matched offline JavaScript/native benchmarks.
|
||||
|
||||
- Xcoder executes tool programs natively from Ziran, with tool approvals, cancellation and saved session values.
|
||||
- Certify installation only after the complete local test suite passes for the exact packaged executables; test pending parallel calls and recovery after callback errors.
|
||||
|
||||
- Fix missing command lifecycle events when unified exec cannot create a process, preserving approval rejection and sandbox retry behavior. Thanks @Marvinthebored ([#44557](https://github.com/openai/codex/issues/44557)).
|
||||
+114
-89
@@ -4,21 +4,34 @@ bazel_dep(name = "bazel_lib", version = "3.2.2")
|
||||
bazel_dep(name = "bazel_skylib", version = "1.9.0")
|
||||
bazel_dep(name = "platforms", version = "1.0.0")
|
||||
|
||||
# Expose rules_rs's existing dependency for the openssl-sys replacement's SBOM.
|
||||
bazel_dep(name = "package_metadata", version = "0.0.7")
|
||||
|
||||
# Expose the public protobuf rules already used transitively by rules_rs.
|
||||
bazel_dep(name = "protobuf", version = "34.0.bcr.1", repo_name = "com_google_protobuf")
|
||||
|
||||
# Backport protobuf#31266 (849e1cbf91af): MSVC also needs the ARM64 SEH workaround.
|
||||
single_version_override(
|
||||
module_name = "protobuf",
|
||||
patch_strip = 1,
|
||||
patches = ["//patches:protobuf_windows_arm64_seh.patch"],
|
||||
)
|
||||
|
||||
bazel_dep(name = "llvm", version = "0.8.11")
|
||||
bazel_dep(name = "windows_support", version = "0.2.0")
|
||||
bazel_dep(name = "with_cfg.bzl", version = "0.12.0")
|
||||
|
||||
# Patch hermetic LLVM for Codex's custom libc++ and Windows gnullvm runtime
|
||||
# needs that have not landed upstream.
|
||||
single_version_override(
|
||||
# Merged target-scoped C++ standard-library opt-outs for V8's private libc++.
|
||||
# https://github.com/hermeticbuild/hermetic-llvm/pull/903
|
||||
# Includes explicit MSVC CRT startup-library selection for dependency-provided main.
|
||||
# https://github.com/hermeticbuild/hermetic-llvm/pull/914
|
||||
archive_override(
|
||||
module_name = "llvm",
|
||||
integrity = "sha256-KTjljFEA8dmXkOoVz6Wv3yqkMfqrbS5iDv/ef4GYsu0=",
|
||||
patch_strip = 1,
|
||||
patches = [
|
||||
"//patches:llvm_rusty_v8_custom_libcxx.patch",
|
||||
"//patches:llvm_windows_arm64_powl.patch",
|
||||
"//patches:llvm_windows_mingw_compat.patch",
|
||||
],
|
||||
patches = ["//patches:llvm_mingw_import_warnings.patch"],
|
||||
strip_prefix = "hermetic-llvm-d27493f0386c9d4d28f7b12630cb91b0cdfd20f1",
|
||||
urls = ["https://github.com/hermeticbuild/hermetic-llvm/archive/d27493f0386c9d4d28f7b12630cb91b0cdfd20f1.tar.gz"],
|
||||
)
|
||||
|
||||
# Preserve case-only SDK aliases when native Windows repository setup feeds
|
||||
@@ -145,23 +158,10 @@ use_repo(osx, "macos_sdk")
|
||||
|
||||
# Needed to disable xcode...
|
||||
bazel_dep(name = "apple_support", version = "2.1.0")
|
||||
bazel_dep(name = "rules_cc", version = "0.2.18")
|
||||
|
||||
# Windows voice jobs explicitly select the installed MSVC C toolchains.
|
||||
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension")
|
||||
use_repo(cc_configure, "local_config_cc")
|
||||
|
||||
single_version_override(
|
||||
module_name = "rules_cc",
|
||||
patch_strip = 1,
|
||||
patches = [
|
||||
"//patches:rules_cc_windows_native_llvm.patch",
|
||||
],
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_cc", version = "0.2.25")
|
||||
bazel_dep(name = "rules_platform", version = "0.1.0")
|
||||
bazel_dep(name = "rules_pkg", version = "1.0.1")
|
||||
bazel_dep(name = "aws-lc", version = "5.1.0.bcr.1")
|
||||
bazel_dep(name = "aws-lc", version = "5.1.0.bcr.3")
|
||||
bazel_dep(name = "rules_rs", version = "0.0.96")
|
||||
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
|
||||
single_version_override(
|
||||
@@ -204,35 +204,31 @@ use_repo(pip, "schema_python")
|
||||
register_toolchains("@rules_foreign_cc//toolchains:built_make_toolchain")
|
||||
|
||||
foreign_cc_tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
|
||||
use_repo(foreign_cc_tools, "cmake-3.31.8-windows-x86_64", "pkgconfig_src")
|
||||
use_repo(foreign_cc_tools, "cmake-3.31.8-windows-x86_64", "ninja_1.13.0_win", "pkgconfig_src")
|
||||
|
||||
single_version_override(
|
||||
register_toolchains("//third_party/voice:windows_ninja_toolchain")
|
||||
|
||||
archive_override(
|
||||
module_name = "rules_rs",
|
||||
integrity = "sha256-b8sUj9EvM72+so/q4uRH91ed7QwOO8EoGbdL8NyBjE4=",
|
||||
patch_strip = 1,
|
||||
patches = [
|
||||
"//patches:rules_rs_bindgen_v0_0_4.patch",
|
||||
"//patches:rules_rs_build_script_deps_annotation.patch",
|
||||
"//patches:rules_rs_rust_debug_modes.patch",
|
||||
"//patches:rules_rs_windows_msvc_linker.patch",
|
||||
"//patches:rules_rs_workspace_package_version.patch",
|
||||
"//patches:rules_rs_zlib_snapshot_urls.patch",
|
||||
],
|
||||
version = "0.0.96",
|
||||
strip_prefix = "rules_rs-7a05511772a8a85db5382ff7536bf2f1e6a8dde3",
|
||||
urls = ["https://github.com/hermeticbuild/rules_rs/archive/7a05511772a8a85db5382ff7536bf2f1e6a8dde3.tar.gz"],
|
||||
)
|
||||
|
||||
rules_rust = use_extension("@rules_rs//rs:rules_rust.bzl", "rules_rust")
|
||||
rules_rust.patch(
|
||||
patches = [
|
||||
# Carry the OpenAI setup fix that makes build-script tools available
|
||||
# through their runfiles after the rules_rs upgrade.
|
||||
"//patches:rules_rust_build_script_tools_transition.patch",
|
||||
# Opt-in release profile compatibility for native Cargo build scripts.
|
||||
"//patches:rules_rust_release_build_script_profile.patch",
|
||||
# Prefer Rust's direct linker for Windows/MSVC and keep hermetic
|
||||
# LLVM's non-.lib runtime artifacts compatible with it.
|
||||
"//patches:rules_rust_windows_msvc_direct_link_args.patch",
|
||||
# Skip transient native-Windows linker outputs while consolidating
|
||||
# dependency search paths.
|
||||
"//patches:rules_rust_windows_process_wrapper_skip_temp_outputs.patch",
|
||||
# Refreshed upstream PR #92; forwarding comes from merged #102.
|
||||
"//patches:rules_rust_declared_msvc_linker.patch",
|
||||
# Spill wrapper arguments to a params file to avoid Windows command-line limits.
|
||||
"//patches:rules_rust_process_wrapper_param_file.patch",
|
||||
"//patches:rules_rust_windows_execroot_separators.patch",
|
||||
@@ -329,7 +325,7 @@ toolchains.toolchain(
|
||||
)
|
||||
use_repo(toolchains, "default_rust_toolchains")
|
||||
|
||||
register_toolchains("@default_rust_toolchains//:all")
|
||||
register_toolchains("@default_rust_toolchains//...")
|
||||
|
||||
register_toolchains("@rust_toolchains//:all")
|
||||
|
||||
@@ -385,6 +381,11 @@ crate.from_cargo(
|
||||
|
||||
bazel_dep(name = "zstd", version = "1.5.7.bcr.2")
|
||||
|
||||
crate.annotation(
|
||||
# Debug builds must also embed assets instead of reading the worker's source tree.
|
||||
crate = "rust-embed",
|
||||
crate_features = ["debug-embed"],
|
||||
)
|
||||
crate.annotation(
|
||||
# Keep Windows proxy authentication aligned with codex-rs/.cargo/config.toml.
|
||||
build_script_env = {"CFLAGS": "-DCURL_ENABLE_NTLM"},
|
||||
@@ -394,13 +395,26 @@ crate.annotation(
|
||||
# Daemon tests repeatedly hash large CLI binaries, even in fastbuild mode.
|
||||
# Optimize the native backends as well as the Rust implementation.
|
||||
build_script_env = {"OPT_LEVEL": "3"},
|
||||
# The Windows lint toolchain cannot reliably materialize blake3's native x86 assembly archives.
|
||||
crate = "blake3",
|
||||
crate_features_select = {
|
||||
"x86_64-pc-windows-gnullvm": ["pure"],
|
||||
},
|
||||
rustc_flags = ["-Copt-level=3"],
|
||||
)
|
||||
crate.annotation_select(
|
||||
# Avoid native x86 assembly tools unavailable when cross-compiling Windows.
|
||||
crate = "blake3",
|
||||
crate_features = ["pure"],
|
||||
triples = [
|
||||
"x86_64-pc-windows-gnullvm",
|
||||
"x86_64-pc-windows-msvc",
|
||||
],
|
||||
)
|
||||
|
||||
# Backport notify-rs/notify@a9c51183: wake idle Windows watchers on events and control requests.
|
||||
crate.annotation(
|
||||
crate = "notify",
|
||||
patch_args = ["-p1"],
|
||||
patches = ["//patches:notify_windows_idle.patch"],
|
||||
version = "8.2.0",
|
||||
)
|
||||
|
||||
# Match the CodeModeHost response-compression benchmark's zstd level.
|
||||
crate.annotation(
|
||||
@@ -492,25 +506,6 @@ bazel_dep(name = "openssl", version = "3.5.4.bcr.0")
|
||||
|
||||
inject_repo(crate, "xz")
|
||||
|
||||
crate.annotation(
|
||||
build_script_data = [
|
||||
"@openssl//:gen_dir",
|
||||
],
|
||||
# Build scripts compile in Bazel's exec configuration, so target-specific
|
||||
# optional build deps are otherwise dropped for the musl release platforms.
|
||||
build_script_deps = [
|
||||
"@crates//:openssl-src-300.6.1+3.6.3",
|
||||
],
|
||||
build_script_env = {
|
||||
"OPENSSL_DIR": "$(execpath @openssl//:gen_dir)",
|
||||
"OPENSSL_NO_VENDOR": "1",
|
||||
"OPENSSL_STATIC": "1",
|
||||
},
|
||||
crate = "openssl-sys",
|
||||
data = ["@openssl//:gen_dir"],
|
||||
gen_build_script = "on",
|
||||
)
|
||||
|
||||
inject_repo(crate, "openssl")
|
||||
|
||||
crate.annotation(
|
||||
@@ -539,6 +534,22 @@ crate.annotation(
|
||||
|
||||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
# Cargo keeps vendored OpenSSL for musl; Bazel already supplies its own OpenSSL.
|
||||
# Replace this crate's generated build, not Cargo's feature resolution.
|
||||
http_archive(
|
||||
name = "openssl_sys_bazel",
|
||||
build_file = "//third_party/openssl:openssl_sys.BUILD.bazel",
|
||||
sha256 = "19c413d6ec9ebaf5e1c829d355cb3e9f783778d700f135be0921d52fce3c60ae",
|
||||
strip_prefix = "openssl-sys-0.9.118",
|
||||
type = "tar.gz",
|
||||
urls = ["https://static.crates.io/crates/openssl-sys/openssl-sys-0.9.118.crate"],
|
||||
)
|
||||
|
||||
override_repo(
|
||||
crate,
|
||||
**{"crates__openssl-sys-0.9.118": "openssl_sys_bazel"}
|
||||
)
|
||||
|
||||
codex_release_archive = use_repo_rule("//bazel/extensions:codex_release_archive.bzl", "codex_release_archive")
|
||||
|
||||
codex_release_archive(
|
||||
@@ -557,6 +568,14 @@ new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.
|
||||
|
||||
include("//bazel/modules:wine.MODULE.bazel")
|
||||
|
||||
# Run V8's Windows snapshot generator natively or with the executor's Wine.
|
||||
bazel_dep(name = "rules_wine", version = "0.1.3")
|
||||
|
||||
wine = use_extension("@rules_wine//wine/extension:wine.bzl", "wine")
|
||||
use_repo(wine, "wine_toolchains")
|
||||
|
||||
register_toolchains("@wine_toolchains//:all")
|
||||
|
||||
voice_sources = use_extension("//third_party/voice:extensions.bzl", "voice_sources")
|
||||
use_repo(
|
||||
voice_sources,
|
||||
@@ -600,25 +619,29 @@ crate.annotation(
|
||||
"RUSTY_V8_SRC_BINDING_PATH": "$(execpath @v8_targets//:rusty_v8_binding_for_target)",
|
||||
},
|
||||
crate = "v8",
|
||||
# Keep the Rust feature aligned with the sandbox archive/binding pairs.
|
||||
crate_features_select = {
|
||||
"aarch64-apple-darwin": ["v8_enable_sandbox"],
|
||||
"aarch64-pc-windows-gnullvm": ["v8_enable_sandbox"],
|
||||
"aarch64-pc-windows-msvc": ["v8_enable_sandbox"],
|
||||
"aarch64-unknown-linux-gnu": ["v8_enable_sandbox"],
|
||||
"aarch64-unknown-linux-musl": ["v8_enable_sandbox"],
|
||||
"x86_64-apple-darwin": ["v8_enable_sandbox"],
|
||||
"x86_64-pc-windows-gnullvm": ["v8_enable_sandbox"],
|
||||
"x86_64-pc-windows-msvc": ["v8_enable_sandbox"],
|
||||
"x86_64-unknown-linux-gnu": ["v8_enable_sandbox"],
|
||||
"x86_64-unknown-linux-musl": ["v8_enable_sandbox"],
|
||||
},
|
||||
gen_build_script = "on",
|
||||
patch_args = ["-p1"],
|
||||
patches = [
|
||||
"//patches:rusty_v8_prebuilt_out_dir.patch",
|
||||
],
|
||||
)
|
||||
crate.annotation_select(
|
||||
# Keep the Rust feature aligned with the sandbox archive/binding pairs.
|
||||
crate = "v8",
|
||||
crate_features = ["v8_enable_sandbox"],
|
||||
triples = [
|
||||
"aarch64-apple-darwin",
|
||||
"aarch64-pc-windows-gnullvm",
|
||||
"aarch64-pc-windows-msvc",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-musl",
|
||||
"x86_64-apple-darwin",
|
||||
"x86_64-pc-windows-gnullvm",
|
||||
"x86_64-pc-windows-msvc",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-unknown-linux-musl",
|
||||
],
|
||||
)
|
||||
|
||||
inject_repo(crate, "v8_targets")
|
||||
|
||||
@@ -626,11 +649,17 @@ llvm = use_extension("@llvm//extensions:llvm.bzl", "llvm")
|
||||
use_repo(llvm, "llvm-project")
|
||||
|
||||
crate.annotation(
|
||||
# Disable SQLite intrinsics that can crash at startup on older x64 Windows CPUs.
|
||||
build_script_env_select = {
|
||||
"x86_64-pc-windows-msvc": '{"LIBSQLITE3_FLAGS": "SQLITE_DISABLE_INTRINSIC"}',
|
||||
},
|
||||
additive_build_file = "//third_party/sqlite:libsqlite3_sys.BUILD.bazel",
|
||||
crate = "libsqlite3-sys",
|
||||
extra_aliased_targets = {
|
||||
"libsqlite3_sys_bindings": "sqlite3/bindgen_bundled_version.rs",
|
||||
"libsqlite3_sys_headers": "sqlite3_headers",
|
||||
"libsqlite3_sys_source": "sqlite3/sqlite3.c",
|
||||
},
|
||||
gen_build_script = "off",
|
||||
repositories = ["crates"],
|
||||
version = "0.39.1",
|
||||
deps = ["//third_party/sqlite:libsqlite3_sys_build_info"],
|
||||
)
|
||||
crate.annotation(
|
||||
# Provide the hermetic SDK path so the build script doesn't try to invoke an unhermetic `xcrun --show-sdk-path`.
|
||||
@@ -671,6 +700,12 @@ crate.annotation(
|
||||
"@rules_foreign_cc//toolchains:current_ninja_toolchain",
|
||||
],
|
||||
crate = "opusic-sys",
|
||||
patch_args = ["-p1"],
|
||||
patches = [
|
||||
"//patches:opusic_sys_install_headers.patch",
|
||||
# Presuming NEON must include its implementations without requiring RTCD.
|
||||
"//patches:opusic-sys_presume_neon.patch",
|
||||
],
|
||||
)
|
||||
|
||||
# The musl CLI's allocator needs declared native tools and consistent header flags.
|
||||
@@ -833,6 +868,7 @@ engine_repository(
|
||||
"//patches:v8_source_portability.patch",
|
||||
"//patches:v8_array_sort_elements_kind.patch",
|
||||
"//third_party/v8:v8_defs.patch",
|
||||
"//third_party/v8:v8_windows_snapshot_wine.patch",
|
||||
],
|
||||
strip_prefix = "v8-15.2.124.1",
|
||||
urls = ["https://github.com/v8/v8/archive/refs/tags/15.2.124.1.tar.gz"],
|
||||
@@ -851,17 +887,6 @@ pip.parse(
|
||||
)
|
||||
use_repo(pip, "v8_python_deps")
|
||||
|
||||
native_windows_llvm = use_repo_rule("//third_party/v8:native_windows.bzl", "native_windows_llvm")
|
||||
|
||||
native_windows_llvm(name = "v8_native_windows_llvm")
|
||||
|
||||
native_windows_cc = use_repo_rule("//third_party/v8:native_windows.bzl", "native_windows_cc")
|
||||
|
||||
native_windows_cc(
|
||||
name = "v8_native_windows_cc",
|
||||
native_llvm = "@v8_native_windows_llvm//:BUILD.bazel",
|
||||
)
|
||||
|
||||
v8_dependencies = use_extension("//third_party/v8:dependencies.bzl", "dependencies")
|
||||
use_repo(
|
||||
v8_dependencies,
|
||||
|
||||
Generated
+57
-50
@@ -24,11 +24,10 @@
|
||||
"https://bcr.bazel.build/modules/apple_support/1.24.1/MODULE.bazel": "f46e8ddad60aef170ee92b2f3d00ef66c147ceafea68b6877cb45bd91737f5f8",
|
||||
"https://bcr.bazel.build/modules/apple_support/1.24.2/MODULE.bazel": "0e62471818affb9f0b26f128831d5c40b074d32e6dda5a0d3852847215a41ca4",
|
||||
"https://bcr.bazel.build/modules/apple_support/2.1.0/MODULE.bazel": "b15c125dabed01b6803c129cd384de4997759f02f8ec90dc5136bcf6dfc5086a",
|
||||
"https://bcr.bazel.build/modules/apple_support/2.1.0/source.json": "78064cfefe18dee4faaf51893661e0d403784f3efe88671d727cdcdc67ed8fb3",
|
||||
"https://bcr.bazel.build/modules/aspect_tools_telemetry/0.3.3/MODULE.bazel": "37c764292861c2f70314efa9846bb6dbb44fc0308903b3285da6528305450183",
|
||||
"https://bcr.bazel.build/modules/aspect_tools_telemetry/0.3.3/source.json": "605086bbc197743a0d360f7ddc550a1d4dfa0441bc807236e17170f636153348",
|
||||
"https://bcr.bazel.build/modules/aws-lc/5.1.0.bcr.1/MODULE.bazel": "82300781422804ec45397555891b583bbaa21b97b5a8815e928e81089b7432bc",
|
||||
"https://bcr.bazel.build/modules/aws-lc/5.1.0.bcr.1/source.json": "7d88fc6db323947a11d1638fe95185e9c733c337a1d1e7b50cdcf487e29ce56e",
|
||||
"https://bcr.bazel.build/modules/apple_support/2.8.0/MODULE.bazel": "c45f5176057092afba0be6c48a9ea02101666802f8be536947e099e94757f8ed",
|
||||
"https://bcr.bazel.build/modules/apple_support/2.8.0/source.json": "b7f6d87669c206adaa7d82cc44733349c63e341b80a0e049496ebd91d78c3472",
|
||||
"https://bcr.bazel.build/modules/aws-lc/5.1.0.bcr.3/MODULE.bazel": "1a37c90d62306e5e4e910797a4ca0fc3baa9757f59c4bc0a9eec986575a994c4",
|
||||
"https://bcr.bazel.build/modules/aws-lc/5.1.0.bcr.3/source.json": "7eb91be8193ac2c2770887ede60eeaa16434c8efa01afd76c9bb2096904f8b5d",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.10.0/MODULE.bazel": "f75e8807570484a99be90abcd52b5e1f390362c258bcb73106f4544957a48101",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8",
|
||||
@@ -50,7 +49,6 @@
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.42.1/MODULE.bazel": "275a59b5406ff18c01739860aa70ad7ccb3cfb474579411decca11c93b951080",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.43.0/MODULE.bazel": "defa2226f06ba20550d6548c3a2ea2a7929634437a52973869c20c225450eb91",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.45.0/MODULE.bazel": "7daec6d87ab0703417486d4cb948af0b06f55d4d7c08cbb5978c80e79b538edf",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.47.0/MODULE.bazel": "e34df3cb35b1684cfa69923a61ae3803595babd3942cd306a488d51400886b30",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.50.0/MODULE.bazel": "2083ef9c7a469f520890483ccf8e0189d6e71e2117e7752e15e6554433d5ae3e",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.50.0/source.json": "e0ee3debde2789ff56e4452e612d126925ba9ab64d4bde79c67f099d2902df9b",
|
||||
"https://bcr.bazel.build/modules/bazel_features/1.9.0/MODULE.bazel": "885151d58d90d8d9c811eb75e3288c11f850e1d6b481a8c9f766adee4712358b",
|
||||
@@ -63,6 +61,7 @@
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.4.0/MODULE.bazel": "2ab127ef8d56a739a99bb2ce00ec4c7d1ecc7977d4370c0ca6efd0d8f03d6d99",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138",
|
||||
@@ -73,7 +72,8 @@
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.9.0/MODULE.bazel": "72997b29dfd95c3fa0d0c48322d05590418edef451f8db8db5509c57875fb4b7",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.9.0/source.json": "7ad77c1e8c1b84222d9b3f3cae016a76639435744c19330b0b37c0a3c9da7dc0",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.9.2/MODULE.bazel": "8c51259b0f4481475586dbfede7591e57b75702e637f840f6138eec80c34b270",
|
||||
"https://bcr.bazel.build/modules/bazel_skylib/1.9.2/source.json": "41cbde7546542dee2f26e3f10bf1c4ac57909943194b7ac48cc5238a01893aa8",
|
||||
"https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f",
|
||||
"https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd",
|
||||
"https://bcr.bazel.build/modules/bzip2/1.0.8.bcr.3/MODULE.bazel": "29ecf4babfd3c762be00d7573c288c083672ab60e79c833ff7f49ee662e54471",
|
||||
@@ -88,21 +88,26 @@
|
||||
"https://bcr.bazel.build/modules/googletest/1.17.0.bcr.2/MODULE.bazel": "827f54f492a3ce549c940106d73de332c2b30cebd0c20c0bc5d786aba7f116cb",
|
||||
"https://bcr.bazel.build/modules/googletest/1.17.0.bcr.2/source.json": "3664514073a819992320ffbce5825e4238459df344d8b01748af2208f8d2e1eb",
|
||||
"https://bcr.bazel.build/modules/googletest/1.17.0/MODULE.bazel": "dbec758171594a705933a29fcf69293d2468c49ec1f2ebca65c36f504d72df46",
|
||||
"https://bcr.bazel.build/modules/hermetic_launcher/0.0.17/MODULE.bazel": "afa67883ae04001c93578f80c39e5ec9231ae670978bc380778baf66e1936ad5",
|
||||
"https://bcr.bazel.build/modules/hermetic_launcher/0.0.17/source.json": "46ee01ccb275e46f59a3c070f91be52eb113405efe577a99365dd69f168713ef",
|
||||
"https://bcr.bazel.build/modules/hermetic_launcher/0.0.8/MODULE.bazel": "3be7b0faca6f1e69e89197999e0b01ce058c42f3e764ef028466f7e0ff77c761",
|
||||
"https://bcr.bazel.build/modules/hermetic_launcher/0.0.8/source.json": "8403718636114198fca6ea04b437fa001ac7167b4d485102defb0a6f7d11bc08",
|
||||
"https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075",
|
||||
"https://bcr.bazel.build/modules/jsoncpp/1.9.6/MODULE.bazel": "2f8d20d3b7d54143213c4dfc3d98225c42de7d666011528dc8fe91591e2e17b0",
|
||||
"https://bcr.bazel.build/modules/jsoncpp/1.9.6/source.json": "a04756d367a2126c3541682864ecec52f92cdee80a35735a3cb249ce015ca000",
|
||||
"https://bcr.bazel.build/modules/libcap/2.27.bcr.1/MODULE.bazel": "7c034d7a4d92b2293294934377f5d1cbc88119710a11079fa8142120f6f08768",
|
||||
"https://bcr.bazel.build/modules/libcap/2.27.bcr.1/source.json": "3b116cbdbd25a68ffb587b672205f6d353a4c19a35452e480d58fc89531e0a10",
|
||||
"https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902",
|
||||
"https://bcr.bazel.build/modules/llvm/0.8.11/MODULE.bazel": "0f8c30b74be64f0e91764e925d0f562c70e8d85b6cea912f724d6b3753d6a33f",
|
||||
"https://bcr.bazel.build/modules/llvm/0.8.11/source.json": "b40edb2bb2ed271bf613b396d245cb473c42fb057a2b26a3bc7d7e8bfcf6aa71",
|
||||
"https://bcr.bazel.build/modules/llvm/0.8.9/MODULE.bazel": "9e35ff5bcac996f9edc1b44b8f8baa58c7855e742c5608b07d925dcdbe642100",
|
||||
"https://bcr.bazel.build/modules/libxml2/2.15.3/MODULE.bazel": "a6bffafd8aa8b0c13eaa4bf25d55be188ec8548549395f03e98c39bab264adaa",
|
||||
"https://bcr.bazel.build/modules/libxml2/2.15.3/source.json": "fd7c420cb14981416c9fadd0db555bd1e249355e0e5b63b2ce15b92996b5fbfb",
|
||||
"https://bcr.bazel.build/modules/mimalloc/3.5.3/MODULE.bazel": "d4555726ceff5240bef25b0ec38b1c80c68337eec2b4b5df20cf611df1383e6a",
|
||||
"https://bcr.bazel.build/modules/mimalloc/3.5.3/source.json": "e94e4baf53f881236b86b16c436c6ab4a338b37135e370154802a7111c0dda28",
|
||||
"https://bcr.bazel.build/modules/nlohmann_json/3.12.0.bcr.2/MODULE.bazel": "5c5596def463aeee17e5a4848a50f02f0cf4a351fc2f0dcc4444f1d87d2d3b08",
|
||||
"https://bcr.bazel.build/modules/nlohmann_json/3.12.0.bcr.2/source.json": "2b8823c08a9b22f5d516619e437059e449159e7472bffba256cced8ba74643b5",
|
||||
"https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74",
|
||||
"https://bcr.bazel.build/modules/openssl/3.5.4.bcr.0/MODULE.bazel": "0f6b8f20b192b9ff0781406256150bcd46f19e66d807dcb0c540548439d6fc35",
|
||||
"https://bcr.bazel.build/modules/openssl/3.5.4.bcr.0/source.json": "543ed7627cc18e6460b9c1ae4a1b6b1debc5a5e0aca878b00f7531c7186b73da",
|
||||
"https://bcr.bazel.build/modules/package_metadata/0.0.3/MODULE.bazel": "77890552ecea9e284b5424c9de827a58099348763a4359e975c359a83d4faa83",
|
||||
"https://bcr.bazel.build/modules/package_metadata/0.0.6/MODULE.bazel": "341dab6f417197494517d54c8e557c0baee1de7aec83543a4fbefe57900acb7e",
|
||||
"https://bcr.bazel.build/modules/package_metadata/0.0.7/MODULE.bazel": "7adb03933fc8401f495800cf4eafcff0edc6da0ff55c7db223ef69d19f689486",
|
||||
"https://bcr.bazel.build/modules/package_metadata/0.0.7/source.json": "50639625e937b56115012674c797cca7a05a96b4878c87d803c13dc2b31de8a0",
|
||||
"https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5",
|
||||
@@ -162,11 +167,12 @@
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.16/MODULE.bazel": "9242fa89f950c6ef7702801ab53922e99c69b02310c39fb6e62b2bd30df2a1d4",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.18/MODULE.bazel": "4460ec36adc8f722a6a2a4ac9374cb91f2acebadaa93fc37966129afb3dece87",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.19/MODULE.bazel": "d5e0f05b63273281a16654eb6b1a8742a75ec153ac8b4f0419949d6e401e46f0",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.20/MODULE.bazel": "f5c07bce5ddcb99be21a0812ff5aadb439e688b7449c6542152363b2fd859c1a",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.20/source.json": "1155433dc6b8161bc339ce94095b337ed95feb1f048b014e10b62339d4b4239c",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.25/MODULE.bazel": "4a3d4f3606d3b3190be495dbc497acca552807d1d5540661ef0d1658472882e3",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.25/source.json": "8df28a9a97b878fe45f0a4f4adf019869dda51a60ee2f6e15a0c79656a25058d",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642",
|
||||
"https://bcr.bazel.build/modules/rules_cc/0.2.9/MODULE.bazel": "34263f1dca62ea664265438cef714d7db124c03e1ed55ebb4f1dc860164308d1",
|
||||
"https://bcr.bazel.build/modules/rules_foreign_cc/0.15.1/MODULE.bazel": "c2c60d26c79fda484acb95cdbec46e89d6b28b4845cb277160ce1e0c8622bb88",
|
||||
"https://bcr.bazel.build/modules/rules_foreign_cc/0.15.1/source.json": "a161811a63ba8a859086da3b7ff3ad04f2e9c255d7727b41087103fc0eb22f55",
|
||||
"https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8",
|
||||
@@ -224,19 +230,21 @@
|
||||
"https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8",
|
||||
"https://bcr.bazel.build/modules/rules_python/1.6.3/MODULE.bazel": "a7b80c42cb3de5ee2a5fa1abc119684593704fcd2fec83165ebe615dec76574f",
|
||||
"https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8",
|
||||
"https://bcr.bazel.build/modules/rules_python/1.8.0/MODULE.bazel": "c151c025dbcc93d8f62ab68ecc313c9176a868a0e6386981bf2a12aec77cbe7b",
|
||||
"https://bcr.bazel.build/modules/rules_python/2.4.2/MODULE.bazel": "fde4307b6765b6f261c40a2c08140a5d10e3aa9b6c12e23bb57d31b7ce124c29",
|
||||
"https://bcr.bazel.build/modules/rules_python/2.4.2/source.json": "225828a44c27fa97ba8a594e6fd3b752061779f052d40c4bb5d6b45f2ded567b",
|
||||
"https://bcr.bazel.build/modules/rules_rs/0.0.96/MODULE.bazel": "678fdcee5a9847611276770eab47190dda04a41973b7bf6037e50a3f98e49e09",
|
||||
"https://bcr.bazel.build/modules/rules_rs/0.0.96/source.json": "2b52d3d209324bd4aaa4896aa0e8b28d0123856b4ade32ebd7bf24b4fded6f12",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.4.1/MODULE.bazel": "00e501db01bbf4e3e1dd1595959092c2fadf2087b2852d3f553b5370f5633592",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.6.1/MODULE.bazel": "72e76b0eea4e81611ef5452aa82b3da34caca0c8b7b5c0c9584338aa93bae26b",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.6.1/source.json": "20ec05cd5e592055e214b2da8ccb283c7f2a421ea0dc2acbf1aa792e11c03d0c",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.8.0/MODULE.bazel": "f6a89f1d6a669a26f28fe814503857055d76306b79cfc11d12399af08d0b80ae",
|
||||
"https://bcr.bazel.build/modules/rules_shell/0.8.0/source.json": "eb53cc815bc503c6683c5fe12d943f98883f81fc22f51403ec8a95610cba4195",
|
||||
"https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca",
|
||||
"https://bcr.bazel.build/modules/rules_swift/2.1.1/MODULE.bazel": "494900a80f944fc7aa61500c2073d9729dff0b764f0e89b824eb746959bc1046",
|
||||
"https://bcr.bazel.build/modules/rules_swift/2.4.0/MODULE.bazel": "1639617eb1ede28d774d967a738b4a68b0accb40650beadb57c21846beab5efd",
|
||||
"https://bcr.bazel.build/modules/rules_swift/3.1.2/MODULE.bazel": "72c8f5cf9d26427cee6c76c8e3853eb46ce6b0412a081b2b6db6e8ad56267400",
|
||||
"https://bcr.bazel.build/modules/rules_wine/0.1.3/MODULE.bazel": "c4de7ea3fc70de78acf12afa9edc368de3678c924e6f7eb82d1c881d7f8b1265",
|
||||
"https://bcr.bazel.build/modules/rules_wine/0.1.3/source.json": "c1a966ed7f4ab06355ce116ccb74685acc0d02d5463b46cb01f0c67cb0787600",
|
||||
"https://bcr.bazel.build/modules/sed/4.9.bcr.3/MODULE.bazel": "3aca45895b85b6ef65366cc12a45217ba6870f8931d2d62e09c99c772d9736ab",
|
||||
"https://bcr.bazel.build/modules/sed/4.9.bcr.3/source.json": "31c0cf4c135ed3fa58298cd7bcfd4301c54ea4cf59d7c4e2ea0a180ce68eb34f",
|
||||
"https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8",
|
||||
@@ -257,37 +265,19 @@
|
||||
"https://bcr.bazel.build/modules/with_cfg.bzl/0.12.0/source.json": "3f3fbaeafecaf629877ad152a2c9def21f8d330d91aa94c5dc75bbb98c10b8b8",
|
||||
"https://bcr.bazel.build/modules/xz/5.4.5.bcr.8/MODULE.bazel": "e48a69bd54053c2ec5fffc2a29fb70122afd3e83ab6c07068f63bc6553fa57cc",
|
||||
"https://bcr.bazel.build/modules/xz/5.4.5.bcr.8/source.json": "bd7e928ccd63505b44f4784f7bbf12cc11f9ff23bf3ca12ff2c91cd74846099e",
|
||||
"https://bcr.bazel.build/modules/zlib-ng/2.3.3.bcr.2/MODULE.bazel": "86130924115bf8dfc4aba286fb49a2ec8d32430a21771db9ccf5381acf0d10cc",
|
||||
"https://bcr.bazel.build/modules/zlib-ng/2.3.3.bcr.2/source.json": "7aa4112eb2fbb99757e97cf0b7a4e2bdb3464b2b3cfb351bc807ffcb34bd349f",
|
||||
"https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0",
|
||||
"https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca",
|
||||
"https://bcr.bazel.build/modules/zlib/1.3.1.bcr.8/MODULE.bazel": "772c674bb78a0342b8caf32ab5c25085c493ca4ff08398208dcbe4375fe9f776",
|
||||
"https://bcr.bazel.build/modules/zlib/1.3.1.bcr.8/source.json": "cf377d76800dfc3d3b71e9dd4a8c53a62837cbce37cc4f25e6207b15fc1e8f2b",
|
||||
"https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198",
|
||||
"https://bcr.bazel.build/modules/zstd/1.5.7.bcr.1/MODULE.bazel": "c5977176dd8555be7a9d598512ae0cae11831259c06f00a5e5e0037d5db4e3f5",
|
||||
"https://bcr.bazel.build/modules/zstd/1.5.7.bcr.2/MODULE.bazel": "d20bf700aacefca7c09840baa4bae9b347ddb31bd9125f4e592998f80b980cd7",
|
||||
"https://bcr.bazel.build/modules/zstd/1.5.7.bcr.2/source.json": "19cf972e5efc777e24008b90c2d819a4c814d33d1326c62d736ed97544817bf0"
|
||||
},
|
||||
"selectedYankedVersions": {},
|
||||
"moduleExtensions": {
|
||||
"@@aspect_tools_telemetry+//:extension.bzl%telemetry": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "cl5A2O84vDL6Tt+Qga8FCj1DUDGqn+e7ly5rZ+4xvcc=",
|
||||
"usagesDigest": "Miy0EWu0H7wJMzfdekpzuz3TBOzJz0l6aNIq2pL6k2g=",
|
||||
"recordedInputs": [
|
||||
"REPO_MAPPING:aspect_tools_telemetry+,bazel_lib bazel_lib+",
|
||||
"REPO_MAPPING:aspect_tools_telemetry+,bazel_skylib bazel_skylib+"
|
||||
],
|
||||
"generatedRepoSpecs": {
|
||||
"aspect_tools_telemetry_report": {
|
||||
"repoRuleId": "@@aspect_tools_telemetry+//:extension.bzl%tel_repository",
|
||||
"attributes": {
|
||||
"deps": {
|
||||
"rules_rs": "0.0.96",
|
||||
"aspect_tools_telemetry": "0.3.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@@protobuf+//python/dist:system_python.bzl%system_python_extension": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "pmsA+awieucfllLc2n7k8xEoPp0i5LF9Hw6mGX0cqSQ=",
|
||||
@@ -413,7 +403,7 @@
|
||||
"@@windows_support+//windows:extensions.bzl%msvc_runtime": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "hSBf9aCBJn12Lq4IKLqoUFuySmukaarmyjhYNGlHMX0=",
|
||||
"usagesDigest": "XZ1DGFYwC06tBdgHxuZLhTfFlPFVKjmYmiBfiY2xe3c=",
|
||||
"usagesDigest": "Wycz6MuhJkgFnFKT74nNjAB8lDNj/DZxNJp+NLqkIII=",
|
||||
"recordedInputs": [
|
||||
"REPO_MAPPING:windows_support+,bazel_tools bazel_tools"
|
||||
],
|
||||
@@ -444,7 +434,7 @@
|
||||
"@@windows_support+//windows:extensions.bzl%windows_sdk": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "hSBf9aCBJn12Lq4IKLqoUFuySmukaarmyjhYNGlHMX0=",
|
||||
"usagesDigest": "M5xde76Im8TfiBsVtKQIavNOkqfp1QsjwJD4fVrrtFs=",
|
||||
"usagesDigest": "fTIVqkpB+CwNlT/+OWVe6OAlNwEQixGYGJ+y+TLh3cM=",
|
||||
"recordedInputs": [
|
||||
"REPO_MAPPING:windows_support+,bazel_tools bazel_tools"
|
||||
],
|
||||
@@ -1239,8 +1229,8 @@
|
||||
"der-parser_10.0.0": "{\"dependencies\":[{\"name\":\"asn1-rs\",\"req\":\"^0.7\"},{\"name\":\"bitvec\",\"optional\":true,\"req\":\"^1.0\"},{\"name\":\"cookie-factory\",\"optional\":true,\"req\":\"^0.3.0\"},{\"default_features\":false,\"name\":\"displaydoc\",\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.4\"},{\"name\":\"nom\",\"req\":\"^7.0\"},{\"name\":\"num-bigint\",\"optional\":true,\"req\":\"^0.4\"},{\"name\":\"num-traits\",\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"pretty_assertions\",\"req\":\"^1.0\"},{\"name\":\"rusticata-macros\",\"req\":\"^4.0\"},{\"kind\":\"dev\",\"name\":\"test-case\",\"req\":\"^3.0\"}],\"features\":{\"as_bitvec\":[\"bitvec\"],\"bigint\":[\"num-bigint\"],\"default\":[\"std\"],\"serialize\":[\"std\",\"cookie-factory\"],\"std\":[],\"unstable\":[]}}",
|
||||
"der-parser_9.0.0": "{\"dependencies\":[{\"name\":\"asn1-rs\",\"req\":\"^0.6\"},{\"name\":\"cookie-factory\",\"optional\":true,\"req\":\"^0.3.0\"},{\"default_features\":false,\"name\":\"displaydoc\",\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.4\"},{\"name\":\"nom\",\"req\":\"^7.0\"},{\"name\":\"num-bigint\",\"optional\":true,\"req\":\"^0.4\"},{\"name\":\"num-traits\",\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"pretty_assertions\",\"req\":\"^1.0\"},{\"name\":\"rusticata-macros\",\"req\":\"^4.0\"},{\"kind\":\"dev\",\"name\":\"test-case\",\"req\":\"^3.0\"}],\"features\":{\"bigint\":[\"num-bigint\"],\"default\":[\"std\"],\"serialize\":[\"std\",\"cookie-factory\"],\"std\":[],\"unstable\":[]}}",
|
||||
"der_0.7.10": "{\"dependencies\":[{\"features\":[\"derive\"],\"name\":\"arbitrary\",\"optional\":true,\"req\":\"^1.3\"},{\"default_features\":false,\"name\":\"bytes\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"const-oid\",\"optional\":true,\"req\":\"^0.9.2\"},{\"name\":\"der_derive\",\"optional\":true,\"req\":\"^0.7.2\"},{\"name\":\"flagset\",\"optional\":true,\"req\":\"^0.4.3\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.4.1\"},{\"features\":[\"alloc\"],\"name\":\"pem-rfc7468\",\"optional\":true,\"req\":\"^0.7\"},{\"kind\":\"dev\",\"name\":\"proptest\",\"req\":\"^1\"},{\"default_features\":false,\"name\":\"time\",\"optional\":true,\"req\":\"^0.3.4\"},{\"default_features\":false,\"name\":\"zeroize\",\"optional\":true,\"req\":\"^1.5\"}],\"features\":{\"alloc\":[\"zeroize?/alloc\"],\"arbitrary\":[\"dep:arbitrary\",\"const-oid?/arbitrary\",\"std\"],\"bytes\":[\"dep:bytes\",\"alloc\"],\"derive\":[\"dep:der_derive\"],\"oid\":[\"dep:const-oid\"],\"pem\":[\"dep:pem-rfc7468\",\"alloc\",\"zeroize\"],\"real\":[],\"std\":[\"alloc\"]}}",
|
||||
"deranged_0.5.5": "{\"dependencies\":[{\"name\":\"deranged-macros\",\"optional\":true,\"req\":\"=0.3.0\"},{\"default_features\":false,\"name\":\"num-traits\",\"optional\":true,\"req\":\"^0.2.15\"},{\"default_features\":false,\"name\":\"powerfmt\",\"optional\":true,\"req\":\"^0.2.0\"},{\"default_features\":false,\"name\":\"quickcheck\",\"optional\":true,\"req\":\"^1.0.3\"},{\"default_features\":false,\"name\":\"rand08\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"kind\":\"dev\",\"name\":\"rand08\",\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"default_features\":false,\"name\":\"rand09\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rand09\",\"package\":\"rand\",\"req\":\"^0.9.0\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.86\"}],\"features\":{\"alloc\":[],\"default\":[],\"macros\":[\"dep:deranged-macros\"],\"num\":[\"dep:num-traits\"],\"powerfmt\":[\"dep:powerfmt\"],\"quickcheck\":[\"dep:quickcheck\",\"alloc\"],\"rand\":[\"rand08\",\"rand09\"],\"rand08\":[\"dep:rand08\"],\"rand09\":[\"dep:rand09\"],\"serde\":[\"dep:serde_core\"]}}",
|
||||
"deranged_0.5.8": "{\"dependencies\":[{\"name\":\"deranged-macros\",\"optional\":true,\"req\":\"=0.3.0\"},{\"default_features\":false,\"name\":\"num-traits\",\"optional\":true,\"req\":\"^0.2.15\"},{\"default_features\":false,\"name\":\"powerfmt\",\"optional\":true,\"req\":\"^0.2.0\"},{\"default_features\":false,\"name\":\"quickcheck\",\"optional\":true,\"req\":\"^1.0.3\"},{\"default_features\":false,\"name\":\"rand010\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.10.0\"},{\"kind\":\"dev\",\"name\":\"rand010\",\"package\":\"rand\",\"req\":\"^0.10.0\"},{\"default_features\":false,\"name\":\"rand08\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"kind\":\"dev\",\"name\":\"rand08\",\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"default_features\":false,\"name\":\"rand09\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rand09\",\"package\":\"rand\",\"req\":\"^0.9.0\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.86\"}],\"features\":{\"alloc\":[],\"default\":[],\"macros\":[\"dep:deranged-macros\"],\"num\":[\"dep:num-traits\"],\"powerfmt\":[\"dep:powerfmt\"],\"quickcheck\":[\"dep:quickcheck\",\"alloc\"],\"rand\":[\"rand08\",\"rand09\",\"rand010\"],\"rand010\":[\"dep:rand010\"],\"rand08\":[\"dep:rand08\"],\"rand09\":[\"dep:rand09\"],\"serde\":[\"dep:serde_core\"]}}",
|
||||
"deranged_0.5.9": "{\"dependencies\":[{\"name\":\"deranged-macros\",\"optional\":true,\"req\":\"=0.3.1\"},{\"default_features\":false,\"name\":\"num-traits\",\"optional\":true,\"req\":\"^0.2.15\"},{\"default_features\":false,\"name\":\"powerfmt\",\"optional\":true,\"req\":\"^0.2.0\"},{\"default_features\":false,\"name\":\"quickcheck\",\"optional\":true,\"req\":\"^1.0.3\"},{\"default_features\":false,\"name\":\"rand010\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.10.0\"},{\"kind\":\"dev\",\"name\":\"rand010\",\"package\":\"rand\",\"req\":\"^0.10.0\"},{\"default_features\":false,\"name\":\"rand08\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"kind\":\"dev\",\"name\":\"rand08\",\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"default_features\":false,\"name\":\"rand09\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rand09\",\"package\":\"rand\",\"req\":\"^0.9.0\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.86\"},{\"kind\":\"dev\",\"name\":\"serde_test2\",\"req\":\"^2.0.0\"}],\"features\":{\"alloc\":[],\"default\":[],\"macros\":[\"dep:deranged-macros\"],\"num\":[\"dep:num-traits\"],\"powerfmt\":[\"dep:powerfmt\"],\"quickcheck\":[\"dep:quickcheck\",\"alloc\"],\"rand\":[\"rand08\",\"rand09\",\"rand010\"],\"rand010\":[\"dep:rand010\"],\"rand08\":[\"dep:rand08\"],\"rand09\":[\"dep:rand09\"],\"serde\":[\"dep:serde_core\"]}}",
|
||||
"derivative_2.2.0": "{\"dependencies\":[{\"name\":\"proc-macro2\",\"req\":\"^1.0\"},{\"name\":\"quote\",\"req\":\"^1.0\"},{\"features\":[\"visit\",\"extra-traits\"],\"name\":\"syn\",\"req\":\"^1.0.3\"},{\"kind\":\"dev\",\"name\":\"trybuild\",\"req\":\"^1.0.18, < 1.0.23\"}],\"features\":{\"use_core\":[]}}",
|
||||
"derive_more-impl_1.0.0": "{\"dependencies\":[{\"name\":\"convert_case\",\"optional\":true,\"req\":\"^0.6\"},{\"kind\":\"dev\",\"name\":\"itertools\",\"req\":\"^0.13.0\"},{\"name\":\"proc-macro2\",\"req\":\"^1.0\"},{\"name\":\"quote\",\"req\":\"^1.0\"},{\"kind\":\"build\",\"name\":\"rustc_version\",\"optional\":true,\"req\":\"^0.4\"},{\"name\":\"syn\",\"req\":\"^2.0.45\"},{\"name\":\"unicode-xid\",\"optional\":true,\"req\":\"^0.2.2\"}],\"features\":{\"add\":[],\"add_assign\":[],\"as_ref\":[\"syn/extra-traits\",\"syn/visit\"],\"constructor\":[],\"debug\":[\"syn/extra-traits\",\"dep:unicode-xid\"],\"default\":[],\"deref\":[],\"deref_mut\":[],\"display\":[\"syn/extra-traits\",\"dep:unicode-xid\"],\"error\":[\"syn/extra-traits\"],\"from\":[\"syn/extra-traits\"],\"from_str\":[],\"full\":[\"add\",\"add_assign\",\"as_ref\",\"constructor\",\"debug\",\"deref\",\"deref_mut\",\"display\",\"error\",\"from\",\"from_str\",\"index\",\"index_mut\",\"into\",\"into_iterator\",\"is_variant\",\"mul\",\"mul_assign\",\"not\",\"sum\",\"try_from\",\"try_into\",\"try_unwrap\",\"unwrap\"],\"index\":[],\"index_mut\":[],\"into\":[\"syn/extra-traits\"],\"into_iterator\":[],\"is_variant\":[\"dep:convert_case\"],\"mul\":[\"syn/extra-traits\"],\"mul_assign\":[\"syn/extra-traits\"],\"not\":[\"syn/extra-traits\"],\"sum\":[],\"testing-helpers\":[\"dep:rustc_version\"],\"try_from\":[],\"try_into\":[\"syn/extra-traits\"],\"try_unwrap\":[\"dep:convert_case\"],\"unwrap\":[\"dep:convert_case\"]}}",
|
||||
"derive_more-impl_2.1.1": "{\"dependencies\":[{\"name\":\"convert_case\",\"optional\":true,\"req\":\"^0.10\"},{\"kind\":\"dev\",\"name\":\"itertools\",\"req\":\"^0.14.0\"},{\"name\":\"proc-macro2\",\"req\":\"^1.0\"},{\"name\":\"quote\",\"req\":\"^1.0\"},{\"kind\":\"build\",\"name\":\"rustc_version\",\"req\":\"^0.4\"},{\"name\":\"syn\",\"req\":\"^2.0.45\"},{\"name\":\"unicode-xid\",\"optional\":true,\"req\":\"^0.2.2\"}],\"features\":{\"add\":[\"syn/extra-traits\",\"syn/visit\"],\"add_assign\":[\"syn/extra-traits\",\"syn/visit\"],\"as_ref\":[\"syn/extra-traits\",\"syn/visit\"],\"constructor\":[],\"debug\":[\"syn/extra-traits\",\"dep:unicode-xid\"],\"default\":[],\"deref\":[],\"deref_mut\":[],\"display\":[\"syn/extra-traits\",\"dep:unicode-xid\",\"dep:convert_case\"],\"eq\":[\"syn/extra-traits\",\"syn/visit\"],\"error\":[\"syn/extra-traits\"],\"from\":[\"syn/extra-traits\"],\"from_str\":[\"syn/full\",\"syn/visit\",\"dep:convert_case\"],\"full\":[\"add\",\"add_assign\",\"as_ref\",\"constructor\",\"debug\",\"deref\",\"deref_mut\",\"display\",\"eq\",\"error\",\"from\",\"from_str\",\"index\",\"index_mut\",\"into\",\"into_iterator\",\"is_variant\",\"mul\",\"mul_assign\",\"not\",\"sum\",\"try_from\",\"try_into\",\"try_unwrap\",\"unwrap\"],\"index\":[],\"index_mut\":[],\"into\":[\"syn/extra-traits\",\"syn/visit-mut\"],\"into_iterator\":[],\"is_variant\":[\"dep:convert_case\"],\"mul\":[\"syn/extra-traits\",\"syn/visit\"],\"mul_assign\":[\"syn/extra-traits\",\"syn/visit\"],\"not\":[\"syn/extra-traits\"],\"sum\":[],\"testing-helpers\":[\"syn/full\"],\"try_from\":[],\"try_into\":[\"syn/extra-traits\",\"syn/full\",\"syn/visit-mut\"],\"try_unwrap\":[\"dep:convert_case\"],\"unwrap\":[\"dep:convert_case\"]}}",
|
||||
@@ -1392,10 +1382,23 @@
|
||||
"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\":\"\"}",
|
||||
"git+https://github.com/openai-oss-forks/rusty_v8.git?rev=90a65f887a0c0f048f3784afbcb320b373c8a2e0#90a65f887a0c0f048f3784afbcb320b373c8a2e0_v8": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"2.5\"},{\"name\":\"paste\",\"req\":\"1.0\"},{\"default_features\":true,\"features\":[\"zoneinfo64\"],\"name\":\"temporal_capi\",\"optional\":false,\"req\":\"0.2.3\"},{\"kind\":\"build\",\"name\":\"bindgen\",\"req\":\"0.72\"},{\"kind\":\"build\",\"name\":\"fslock\",\"req\":\"0.2\"},{\"kind\":\"build\",\"name\":\"gzip-header\",\"req\":\"1.0.0\"},{\"kind\":\"build\",\"name\":\"home\",\"req\":\"0\"},{\"kind\":\"build\",\"name\":\"miniz_oxide\",\"req\":\"0.8.8\"},{\"kind\":\"build\",\"name\":\"which\",\"req\":\"6\"}],\"features\":{\"default\":[\"use_custom_libcxx\"],\"simdutf\":[],\"use_custom_libcxx\":[],\"v8_enable_pointer_compression\":[],\"v8_enable_sandbox\":[\"v8_enable_pointer_compression\"],\"v8_enable_v8_checks\":[]},\"strip_prefix\":\"\"}",
|
||||
"git+https://github.com/openai-oss-forks/tokio-tungstenite?rev=0e5b2d73aa18dd9f0a50ee9ff199d5aef7594186#0e5b2d73aa18dd9f0a50ee9ff199d5aef7594186_tokio-tungstenite": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"sink\",\"std\"],\"name\":\"futures-util\",\"optional\":false,\"req\":\"0.3.28\"},{\"name\":\"log\",\"req\":\"0.4.17\"},{\"default_features\":true,\"features\":[],\"name\":\"native-tls-crate\",\"optional\":true,\"package\":\"native-tls\",\"req\":\"0.2.11\"},{\"default_features\":false,\"features\":[],\"name\":\"rustls\",\"optional\":true,\"req\":\"0.23.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-native-certs\",\"optional\":true,\"req\":\"0.8.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-pki-types\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":false,\"features\":[\"io-util\"],\"name\":\"tokio\",\"optional\":false,\"req\":\"1.0.0\"},{\"default_features\":true,\"features\":[],\"name\":\"tokio-native-tls\",\"optional\":true,\"req\":\"0.3.1\"},{\"default_features\":false,\"features\":[],\"name\":\"tokio-rustls\",\"optional\":true,\"req\":\"0.26.0\"},{\"default_features\":false,\"features\":[],\"name\":\"tungstenite\",\"optional\":false},{\"default_features\":true,\"features\":[],\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"0.26.0\"}],\"features\":{\"__rustls-tls\":[\"rustls\",\"rustls-pki-types\",\"tokio-rustls\",\"stream\",\"tungstenite/__rustls-tls\",\"handshake\"],\"connect\":[\"stream\",\"tokio/net\",\"tokio/time\",\"handshake\"],\"default\":[\"connect\",\"handshake\"],\"handshake\":[\"tungstenite/handshake\"],\"native-tls\":[\"native-tls-crate\",\"tokio-native-tls\",\"stream\",\"tungstenite/native-tls\",\"handshake\"],\"native-tls-vendored\":[\"native-tls\",\"native-tls-crate/vendored\",\"tungstenite/native-tls-vendored\"],\"proxy\":[\"tungstenite/proxy\",\"tokio/net\",\"handshake\"],\"rustls-tls-native-roots\":[\"__rustls-tls\",\"rustls-native-certs\"],\"rustls-tls-webpki-roots\":[\"__rustls-tls\",\"webpki-roots\"],\"stream\":[],\"url\":[\"tungstenite/url\"]},\"strip_prefix\":\"\"}",
|
||||
"git+https://github.com/openai-oss-forks/tungstenite-rs?rev=4fffad30fe373adbdcffab9545e9e9bf4f2fc19f#4fffad30fe373adbdcffab9545e9e9bf4f2fc19f_tungstenite": "{\"dependencies\":[{\"name\":\"bytes\",\"req\":\"1.9.0\"},{\"default_features\":true,\"features\":[],\"name\":\"data-encoding\",\"optional\":true,\"req\":\"2\"},{\"default_features\":false,\"features\":[\"zlib-rs\"],\"name\":\"flate2\",\"optional\":true,\"req\":\"1.1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"headers\",\"optional\":true,\"req\":\"0.4.0\"},{\"default_features\":true,\"features\":[],\"name\":\"http\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"httparse\",\"optional\":true,\"req\":\"1.3.4\"},{\"name\":\"log\",\"req\":\"0.4.8\"},{\"default_features\":true,\"features\":[],\"name\":\"native-tls-crate\",\"optional\":true,\"package\":\"native-tls\",\"req\":\"0.2.3\"},{\"name\":\"rand\",\"req\":\"0.9.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"rustls\",\"optional\":true,\"req\":\"0.23.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-native-certs\",\"optional\":true,\"req\":\"0.8.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-pki-types\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"sha1\",\"optional\":true,\"req\":\"0.10\"},{\"name\":\"thiserror\",\"req\":\"2.0.7\"},{\"default_features\":true,\"features\":[],\"name\":\"url\",\"optional\":true,\"req\":\"2.1.0\"},{\"name\":\"utf-8\",\"req\":\"0.7.5\"},{\"default_features\":true,\"features\":[],\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"0.26\"}],\"features\":{\"__rustls-tls\":[\"rustls\",\"rustls-pki-types\"],\"default\":[\"handshake\"],\"deflate\":[\"headers\",\"flate2\"],\"handshake\":[\"data-encoding\",\"headers\",\"httparse\",\"sha1\"],\"headers\":[\"http\",\"dep:headers\"],\"native-tls\":[\"native-tls-crate\"],\"native-tls-vendored\":[\"native-tls\",\"native-tls-crate/vendored\"],\"proxy\":[\"handshake\"],\"rustls-tls-native-roots\":[\"__rustls-tls\",\"rustls-native-certs\"],\"rustls-tls-webpki-roots\":[\"__rustls-tls\",\"webpki-roots\"],\"url\":[\"dep:url\"]},\"strip_prefix\":\"\"}",
|
||||
"git+https://github.com/openai-oss-forks/tokio-tungstenite?rev=7447c427513cfe685f236e1ac0513c4ea3dd9c0b#7447c427513cfe685f236e1ac0513c4ea3dd9c0b_tokio-tungstenite": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"sink\",\"std\"],\"name\":\"futures-util\",\"optional\":false,\"req\":\"0.3.28\"},{\"name\":\"log\",\"req\":\"0.4.17\"},{\"default_features\":true,\"features\":[],\"name\":\"native-tls-crate\",\"optional\":true,\"package\":\"native-tls\",\"req\":\"0.2.11\"},{\"default_features\":false,\"features\":[],\"name\":\"rustls\",\"optional\":true,\"req\":\"0.23.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-native-certs\",\"optional\":true,\"req\":\"0.8.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-pki-types\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":false,\"features\":[\"io-util\"],\"name\":\"tokio\",\"optional\":false,\"req\":\"1.0.0\"},{\"default_features\":true,\"features\":[],\"name\":\"tokio-native-tls\",\"optional\":true,\"req\":\"0.3.1\"},{\"default_features\":false,\"features\":[],\"name\":\"tokio-rustls\",\"optional\":true,\"req\":\"0.26.0\"},{\"default_features\":false,\"features\":[],\"name\":\"tungstenite\",\"optional\":false},{\"default_features\":true,\"features\":[],\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"0.26.0\"}],\"features\":{\"__rustls-tls\":[\"rustls\",\"rustls-pki-types\",\"tokio-rustls\",\"stream\",\"tungstenite/__rustls-tls\",\"handshake\"],\"connect\":[\"stream\",\"tokio/net\",\"tokio/time\",\"handshake\"],\"default\":[\"connect\",\"handshake\"],\"handshake\":[\"tungstenite/handshake\"],\"native-tls\":[\"native-tls-crate\",\"tokio-native-tls\",\"stream\",\"tungstenite/native-tls\",\"handshake\"],\"native-tls-vendored\":[\"native-tls\",\"native-tls-crate/vendored\",\"tungstenite/native-tls-vendored\"],\"proxy\":[\"tungstenite/proxy\",\"tokio/net\",\"handshake\"],\"rustls-tls-native-roots\":[\"__rustls-tls\",\"rustls-native-certs\"],\"rustls-tls-webpki-roots\":[\"__rustls-tls\",\"webpki-roots\"],\"stream\":[],\"url\":[\"tungstenite/url\"]},\"strip_prefix\":\"\"}",
|
||||
"git+https://github.com/openai-oss-forks/tungstenite-rs?rev=bc589d684755a8c02da0fc7e58d0861cbfc306f1#bc589d684755a8c02da0fc7e58d0861cbfc306f1_tungstenite": "{\"dependencies\":[{\"name\":\"bytes\",\"req\":\"1.9.0\"},{\"default_features\":true,\"features\":[],\"name\":\"data-encoding\",\"optional\":true,\"req\":\"2\"},{\"default_features\":false,\"features\":[\"zlib-rs\"],\"name\":\"flate2\",\"optional\":true,\"req\":\"1.1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"headers\",\"optional\":true,\"req\":\"0.4.0\"},{\"default_features\":true,\"features\":[],\"name\":\"http\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"httparse\",\"optional\":true,\"req\":\"1.3.4\"},{\"name\":\"log\",\"req\":\"0.4.8\"},{\"default_features\":true,\"features\":[],\"name\":\"native-tls-crate\",\"optional\":true,\"package\":\"native-tls\",\"req\":\"0.2.3\"},{\"name\":\"rand\",\"req\":\"0.9.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"rustls\",\"optional\":true,\"req\":\"0.23.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-native-certs\",\"optional\":true,\"req\":\"0.8.0\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-pki-types\",\"optional\":true,\"req\":\"1.0\"},{\"default_features\":true,\"features\":[],\"name\":\"sha1\",\"optional\":true,\"req\":\"0.10\"},{\"name\":\"thiserror\",\"req\":\"2.0.7\"},{\"default_features\":true,\"features\":[],\"name\":\"url\",\"optional\":true,\"req\":\"2.1.0\"},{\"name\":\"utf-8\",\"req\":\"0.7.5\"},{\"default_features\":true,\"features\":[],\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"0.26\"}],\"features\":{\"__rustls-tls\":[\"rustls\",\"rustls-pki-types\"],\"default\":[\"handshake\"],\"deflate\":[\"headers\",\"flate2\"],\"handshake\":[\"data-encoding\",\"headers\",\"httparse\",\"sha1\"],\"headers\":[\"http\",\"dep:headers\"],\"native-tls\":[\"native-tls-crate\"],\"native-tls-vendored\":[\"native-tls\",\"native-tls-crate/vendored\"],\"proxy\":[\"handshake\"],\"rustls-tls-native-roots\":[\"__rustls-tls\",\"rustls-native-certs\"],\"rustls-tls-webpki-roots\":[\"__rustls-tls\",\"webpki-roots\"],\"url\":[\"dep:url\"]},\"strip_prefix\":\"\"}",
|
||||
"git+https://github.com/rust-lang/rust-clippy?rev=21baba9c10c5d179915cae82e6247bc2337872fb#21baba9c10c5d179915cae82e6247bc2337872fb_clippy_utils": "{\"dependencies\":[{\"default_features\":false,\"features\":[],\"name\":\"arrayvec\",\"optional\":false,\"req\":\"0.7\"},{\"name\":\"itertools\",\"req\":\"0.15\"},{\"name\":\"rustc_apfloat\",\"req\":\"0.2.0\"}],\"features\":{},\"strip_prefix\":\"clippy_utils\"}",
|
||||
"git+https://github.com/transact-rs/sqlx?rev=10462fa4414c6c7f1ed1d39bb31678e3b726878c#10462fa4414c6c7f1ed1d39bb31678e3b726878c_sqlx-core": "{\"dependencies\":[{\"default_features\":true,\"features\":[],\"name\":\"async-fs\",\"optional\":true,\"req\":\"2.1\"},{\"default_features\":false,\"features\":[\"async-io\"],\"name\":\"async-global-executor\",\"optional\":true,\"req\":\"3.1\"},{\"default_features\":true,\"features\":[],\"name\":\"async-io\",\"optional\":true,\"req\":\"2.4.1\"},{\"default_features\":true,\"features\":[],\"name\":\"async-std\",\"optional\":true,\"req\":\"1.13\"},{\"default_features\":true,\"features\":[],\"name\":\"async-task\",\"optional\":true,\"req\":\"4.7.1\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"base64\",\"optional\":false,\"req\":\"0.22.1\"},{\"name\":\"bigdecimal\",\"optional\":true,\"req\":\"0.4.0\"},{\"name\":\"bit-vec\",\"optional\":true,\"req\":\"0.8\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"bstr\",\"optional\":true,\"req\":\"1.0.1\"},{\"name\":\"bytes\",\"req\":\"1.2.0\"},{\"name\":\"cfg-if\",\"req\":\"1.0.0\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":true,\"req\":\"0.4.34\"},{\"default_features\":true,\"features\":[],\"name\":\"crc\",\"optional\":true,\"req\":\"3\"},{\"name\":\"crossbeam-queue\",\"req\":\"0.3.2\"},{\"name\":\"either\",\"req\":\"1.6.1\"},{\"name\":\"event-listener\",\"req\":\"5.2.0\"},{\"default_features\":false,\"features\":[],\"name\":\"futures-core\",\"optional\":false,\"req\":\"0.3.32\"},{\"name\":\"futures-intrusive\",\"req\":\"0.5.0\"},{\"name\":\"futures-io\",\"req\":\"0.3.32\"},{\"default_features\":false,\"features\":[\"alloc\",\"sink\",\"io\"],\"name\":\"futures-util\",\"optional\":false,\"req\":\"0.3.32\"},{\"name\":\"hashbrown\",\"req\":\"0.16.0\"},{\"name\":\"hashlink\",\"req\":\"0.11.0\"},{\"name\":\"indexmap\",\"req\":\"2.0\"},{\"name\":\"ipnet\",\"optional\":true,\"req\":\"2.3.0\"},{\"name\":\"ipnetwork\",\"optional\":true,\"req\":\"0.21.1\"},{\"default_features\":false,\"features\":[],\"name\":\"log\",\"optional\":false,\"req\":\"0.4.18\"},{\"name\":\"mac_address\",\"optional\":true,\"req\":\"1.1.5\"},{\"default_features\":false,\"features\":[],\"name\":\"memchr\",\"optional\":false,\"req\":\"2.5.0\"},{\"default_features\":true,\"features\":[],\"name\":\"native-tls\",\"optional\":true,\"req\":\"0.2.10\"},{\"name\":\"percent-encoding\",\"req\":\"2.3.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"rust_decimal\",\"optional\":true,\"req\":\"1.36.0\"},{\"default_features\":false,\"features\":[\"std\",\"tls12\"],\"name\":\"rustls\",\"optional\":true,\"req\":\"0.23.24\"},{\"default_features\":true,\"features\":[],\"name\":\"rustls-native-certs\",\"optional\":true,\"req\":\"0.8.0\"},{\"default_features\":true,\"features\":[\"derive\",\"rc\"],\"name\":\"serde\",\"optional\":true,\"req\":\"1.0.219\"},{\"default_features\":true,\"features\":[\"raw_value\"],\"name\":\"serde_json\",\"optional\":true,\"req\":\"1.0.142\"},{\"default_features\":false,\"features\":[],\"name\":\"sha2\",\"optional\":true,\"req\":\"0.11.0\"},{\"name\":\"smallvec\",\"req\":\"1.13.1\"},{\"default_features\":false,\"features\":[],\"name\":\"smol\",\"optional\":true,\"req\":\"2.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"optional\":false,\"req\":\"2.0.18\"},{\"default_features\":true,\"features\":[\"formatting\",\"parsing\",\"macros\"],\"name\":\"time\",\"optional\":true,\"req\":\"0.3.48\"},{\"default_features\":false,\"features\":[\"time\",\"net\",\"sync\",\"fs\",\"io-util\",\"rt\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"1.25.0\"},{\"default_features\":true,\"features\":[\"fs\"],\"name\":\"tokio-stream\",\"optional\":true,\"req\":\"0.1.8\"},{\"default_features\":true,\"features\":[],\"name\":\"toml\",\"optional\":true,\"req\":\"0.8.16\"},{\"default_features\":true,\"features\":[\"log\"],\"name\":\"tracing\",\"optional\":false,\"req\":\"0.1.37\"},{\"default_features\":true,\"features\":[],\"name\":\"url\",\"optional\":false,\"req\":\"2.2.2\"},{\"name\":\"uuid\",\"optional\":true,\"req\":\"1.12.1\"},{\"default_features\":true,\"features\":[],\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"1\"}],\"features\":{\"_rt-async-global-executor\":[\"async-global-executor\",\"_rt-async-io\",\"_rt-async-task\"],\"_rt-async-io\":[\"async-io\",\"async-fs\"],\"_rt-async-std\":[\"async-std\",\"_rt-async-io\"],\"_rt-async-task\":[\"async-task\"],\"_rt-smol\":[\"smol\",\"_rt-async-io\",\"_rt-async-task\"],\"_rt-tokio\":[\"tokio\",\"tokio-stream\"],\"_tls-native-tls\":[\"native-tls\"],\"_tls-none\":[],\"_tls-rustls\":[\"rustls\"],\"_tls-rustls-aws-lc-rs\":[\"_tls-rustls\",\"rustls/aws-lc-rs\",\"webpki-roots\"],\"_tls-rustls-ring-native-roots\":[\"_tls-rustls\",\"rustls/ring\",\"rustls-native-certs\"],\"_tls-rustls-ring-webpki\":[\"_tls-rustls\",\"rustls/ring\",\"webpki-roots\"],\"_unstable-doc\":[\"sqlx-toml\"],\"any\":[],\Line truncated
|
||||
"git+https://github.com/transact-rs/sqlx?rev=10462fa4414c6c7f1ed1d39bb31678e3b726878c#10462fa4414c6c7f1ed1d39bb31678e3b726878c_sqlx-sqlite": "{\"dependencies\":[{\"name\":\"atoi\",\"req\":\"2.0\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":true,\"req\":\"0.4.34\"},{\"default_features\":false,\"features\":[\"async\"],\"name\":\"flume\",\"optional\":false,\"req\":\"0.12.0\"},{\"name\":\"form_urlencoded\",\"req\":\"1.2.2\"},{\"default_features\":false,\"features\":[\"sink\",\"alloc\",\"std\"],\"name\":\"futures-channel\",\"optional\":false,\"req\":\"0.3.32\"},{\"default_features\":false,\"features\":[],\"name\":\"futures-core\",\"optional\":false,\"req\":\"0.3.32\"},{\"default_features\":true,\"features\":[],\"name\":\"futures-executor\",\"optional\":false,\"req\":\"0.3.32\"},{\"name\":\"futures-intrusive\",\"req\":\"0.5.0\"},{\"default_features\":false,\"features\":[\"alloc\",\"sink\"],\"name\":\"futures-util\",\"optional\":false,\"req\":\"0.3.32\"},{\"default_features\":false,\"features\":[\"pkg-config\",\"vcpkg\"],\"name\":\"libsqlite3-sys\",\"optional\":false,\"req\":\">=0.30.1, <0.40.0\"},{\"name\":\"log\",\"req\":\"0.4.18\"},{\"name\":\"percent-encoding\",\"req\":\"2.3.0\"},{\"default_features\":true,\"features\":[],\"name\":\"regex\",\"optional\":true,\"req\":\"1.6.0\"},{\"default_features\":true,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"1.0.219\"},{\"default_features\":true,\"features\":[],\"name\":\"sqlx-core\",\"optional\":false,\"req\":\"=0.9.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"optional\":false,\"req\":\"2.0.18\"},{\"default_features\":true,\"features\":[\"formatting\",\"parsing\",\"macros\"],\"name\":\"time\",\"optional\":true,\"req\":\"0.3.48\"},{\"default_features\":true,\"features\":[\"log\"],\"name\":\"tracing\",\"optional\":false,\"req\":\"0.1.37\"},{\"default_features\":true,\"features\":[],\"name\":\"url\",\"optional\":false,\"req\":\"2.2.2\"},{\"name\":\"uuid\",\"optional\":true,\"req\":\"1.12.1\"}],\"features\":{\"_unstable-all-sqlite-features\":[\"deserialize\",\"load-extension\",\"preupdate-hook\",\"unlock-notify\"],\"_unstable-all-types\":[\"json\",\"chrono\",\"time\",\"uuid\"],\"_unstable-docs\":[\"bundled\",\"any\",\"_unstable-all-types\",\"_unstable-all-sqlite-features\"],\"any\":[\"sqlx-core/any\"],\"bigdecimal\":[],\"bundled\":[\"libsqlite3-sys/bundled\"],\"chrono\":[\"dep:chrono\",\"sqlx-core/chrono\"],\"deserialize\":[],\"json\":[\"sqlx-core/json\",\"serde\"],\"load-extension\":[],\"migrate\":[\"sqlx-core/migrate\"],\"offline\":[\"sqlx-core/offline\",\"serde\"],\"preupdate-hook\":[\"libsqlite3-sys/preupdate_hook\"],\"regexp\":[\"dep:regex\"],\"rust_decimal\":[],\"sqlx-toml\":[\"sqlx-core/sqlx-toml\"],\"time\":[\"dep:time\",\"sqlx-core/time\"],\"unbundled\":[\"libsqlite3-sys/buildtime_bindgen\"],\"unlock-notify\":[\"libsqlite3-sys/unlock_notify\"],\"uuid\":[\"dep:uuid\",\"sqlx-core/uuid\"]},\"strip_prefix\":\"sqlx-sqlite\"}",
|
||||
"git2_0.21.0": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"^2.1.0\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"clap\",\"req\":\"^4.4.13\"},{\"name\":\"libc\",\"req\":\"^0.2\"},{\"name\":\"libgit2-sys\",\"req\":\"^0.18.4\"},{\"name\":\"log\",\"req\":\"^0.4.8\"},{\"name\":\"openssl-probe\",\"optional\":true,\"req\":\"^0.1\",\"target\":\"cfg(all(unix, not(target_os = \\\"macos\\\")))\"},{\"name\":\"openssl-sys\",\"optional\":true,\"req\":\"^0.9.45\",\"target\":\"cfg(all(unix, not(target_os = \\\"macos\\\")))\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.1.0\"},{\"features\":[\"formatting\"],\"kind\":\"dev\",\"name\":\"time\",\"req\":\"^0.3.47\"},{\"name\":\"url\",\"optional\":true,\"req\":\"^2.5.4\"},{\"kind\":\"dev\",\"name\":\"url\",\"req\":\"^2.5.4\"}],\"features\":{\"cred\":[\"dep:url\"],\"default\":[],\"https\":[\"libgit2-sys/https\",\"openssl-sys\",\"openssl-probe\",\"cred\"],\"ssh\":[\"libgit2-sys/ssh\",\"cred\"],\"unstable\":[],\"unstable-sha256\":[\"libgit2-sys/unstable-sha256\"],\"vendored-libgit2\":[\"libgit2-sys/vendored\"],\"vendored-openssl\":[\"openssl-sys/vendored\",\"libgit2-sys/vendored-openssl\"],\"zlib-ng-compat\":[\"libgit2-sys/zlib-ng-compat\"]}}",
|
||||
"git_archive_integrity:https://codeload.github.com/dzbarsky/rules_rust/tar.gz/b56cbaa8465e74127f1ea216f813cd377295ad81": "sha256-3b30DbjfaF32fDJg3+Wc9/+ksZOpMk4Qs1m76JgdueA=",
|
||||
"git_archive_integrity:https://codeload.github.com/helix-editor/nucleo/tar.gz/4253de9faabb4e5c6d81d946a5e35a90f87347ee": "sha256-0WdqwzqCxZA//t5oznPJ2SRmaqihArtkmo+5JqemHOE=",
|
||||
"git_archive_integrity:https://codeload.github.com/hyperium/h3/tar.gz/e07e69412876f7e26f026bd75a48b2704d8c8283": "sha256-O52KnRCEH+J/uGyXoGvs4UEfywrPrcDKhXtjZdTl0po=",
|
||||
"git_archive_integrity:https://codeload.github.com/microsoft/mxc/tar.gz/b21120168d70befe12356411423266bfef168446": "sha256-y1jhNgvGsVfkERZ48U4StdlXS9UIoCzKUUphwvu6+m8=",
|
||||
"git_archive_integrity:https://codeload.github.com/modelcontextprotocol/rust-sdk/tar.gz/98a54789b80110ad210495c4ad845c89e1980471": "sha256-u1NcSLjm/O48vcV54D6qYiUrp0n/IW7+GZ2DcSLJ/lI=",
|
||||
"git_archive_integrity:https://codeload.github.com/openai-oss-forks/crossterm/tar.gz/ed1cdab335221515706178d68495bba2aed1924f": "sha256-NTDNN30IByL2McZWbl7bSESri+j0sYXWvkoru6VZFTE=",
|
||||
"git_archive_integrity:https://codeload.github.com/openai-oss-forks/rusty_v8/tar.gz/90a65f887a0c0f048f3784afbcb320b373c8a2e0": "sha256-sLGI0fHYUavXgzeBiiihXoTxQ7CCzpZpdukgZhdoQ3M=",
|
||||
"git_archive_integrity:https://codeload.github.com/openai-oss-forks/tokio-tungstenite/tar.gz/7447c427513cfe685f236e1ac0513c4ea3dd9c0b": "sha256-RqW7OJVRvLIWfDNmNfxOcxrYW1dy5M6LrBwvXdCqfLw=",
|
||||
"git_archive_integrity:https://codeload.github.com/openai-oss-forks/tungstenite-rs/tar.gz/bc589d684755a8c02da0fc7e58d0861cbfc306f1": "sha256-1wR/jnCUwIJevFAotK6wvvee02nkOj4lCzLhdV29c18=",
|
||||
"git_archive_integrity:https://codeload.github.com/rust-lang/rust-clippy/tar.gz/21baba9c10c5d179915cae82e6247bc2337872fb": "sha256-hoAjPoWso23OSqakAcd6ghJRUEZp1CiOnHQPZpRNFS4=",
|
||||
"git_archive_integrity:https://codeload.github.com/transact-rs/sqlx/tar.gz/10462fa4414c6c7f1ed1d39bb31678e3b726878c": "sha256-jFe976E+ztpfve0rVarAyR59YIlWuCD4HS7GstpgFN4=",
|
||||
"gix-actor_0.44.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"std\",\"unicode\"],\"name\":\"bstr\",\"req\":\"^1.12.0\"},{\"name\":\"document-features\",\"optional\":true,\"req\":\"^0.2.0\"},{\"name\":\"gix-date\",\"req\":\"^0.18.0\"},{\"features\":[\"bstr\"],\"name\":\"gix-error\",\"req\":\"^0.5.0\"},{\"kind\":\"dev\",\"name\":\"insta\",\"req\":\"^1.46.3\"},{\"kind\":\"dev\",\"name\":\"pretty_assertions\",\"req\":\"^1.0.0\"},{\"default_features\":false,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.114\"}],\"features\":{\"serde\":[\"dep:serde\",\"bstr/serde\",\"gix-date/serde\"]}}",
|
||||
"gix-attributes_0.37.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"std\",\"unicode\"],\"name\":\"bstr\",\"req\":\"^1.12.0\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.8.2\"},{\"name\":\"document-features\",\"optional\":true,\"req\":\"^0.2.1\"},{\"features\":[\"bstr\"],\"name\":\"gix-error\",\"req\":\"^0.5.0\"},{\"name\":\"gix-glob\",\"req\":\"^0.29.0\"},{\"name\":\"gix-parallel\",\"req\":\"^0.50.0\"},{\"name\":\"gix-path\",\"req\":\"^0.14.0\"},{\"name\":\"gix-quote\",\"req\":\"^0.10.0\"},{\"name\":\"gix-trace\",\"req\":\"^0.3.0\"},{\"kind\":\"dev\",\"name\":\"insta\",\"req\":\"^1.46.3\"},{\"default_features\":false,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.114\"},{\"name\":\"smallvec\",\"req\":\"^1.15.1\"},{\"name\":\"unicode-bom\",\"req\":\"^2.0.3\"}],\"features\":{\"serde\":[\"dep:serde\",\"bstr/serde\",\"gix-glob/serde\"]}}",
|
||||
"gix-chunk_0.10.0": "{\"dependencies\":[{\"features\":[\"bstr\"],\"name\":\"gix-error\",\"req\":\"^0.5.0\"}],\"features\":{}}",
|
||||
@@ -1475,6 +1478,7 @@
|
||||
"hermit-abi_0.5.2": "{\"dependencies\":[{\"name\":\"alloc\",\"optional\":true,\"package\":\"rustc-std-workspace-alloc\",\"req\":\"^1.0.0\"},{\"name\":\"core\",\"optional\":true,\"package\":\"rustc-std-workspace-core\",\"req\":\"^1.0.0\"}],\"features\":{\"default\":[],\"rustc-dep-of-std\":[\"core\",\"alloc\"]}}",
|
||||
"hex_0.4.3": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.3\"},{\"kind\":\"dev\",\"name\":\"faster-hex\",\"req\":\"^0.5\"},{\"kind\":\"dev\",\"name\":\"pretty_assertions\",\"req\":\"^0.6\"},{\"kind\":\"dev\",\"name\":\"rustc-hex\",\"req\":\"^2.1\"},{\"default_features\":false,\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"version-sync\",\"req\":\"^0.9\"}],\"features\":{\"alloc\":[],\"default\":[\"std\"],\"std\":[\"alloc\"]}}",
|
||||
"hickory-proto_0.25.2": "{\"dependencies\":[{\"name\":\"async-trait\",\"req\":\"^0.1.43\"},{\"default_features\":false,\"features\":[\"prebuilt-nasm\"],\"name\":\"aws-lc-rs\",\"optional\":true,\"req\":\"^1.12.3\"},{\"name\":\"backtrace\",\"optional\":true,\"req\":\"^0.3.50\"},{\"name\":\"bitflags\",\"optional\":true,\"req\":\"^2.4.1\"},{\"name\":\"bytes\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"cfg-if\",\"req\":\"^1\"},{\"name\":\"critical-section\",\"optional\":true,\"req\":\"^1.1.1\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"data-encoding\",\"req\":\"^2.2.0\"},{\"name\":\"enum-as-inner\",\"req\":\"^0.6\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"futures-channel\",\"req\":\"^0.3.5\"},{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"futures-executor\",\"req\":\"^0.3.5\"},{\"default_features\":false,\"name\":\"futures-io\",\"optional\":true,\"req\":\"^0.3.5\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"futures-util\",\"req\":\"^0.3.5\"},{\"features\":[\"stream\"],\"name\":\"h2\",\"optional\":true,\"req\":\"^0.4.0\"},{\"name\":\"h3\",\"optional\":true,\"req\":\"^0.0.7\"},{\"name\":\"h3-quinn\",\"optional\":true,\"req\":\"^0.0.9\"},{\"name\":\"http\",\"optional\":true,\"req\":\"^1.1\"},{\"default_features\":false,\"features\":[\"alloc\",\"compiled_data\"],\"name\":\"idna\",\"req\":\"^1.0.3\"},{\"default_features\":false,\"name\":\"ipnet\",\"req\":\"^2.3.0\"},{\"name\":\"js-sys\",\"optional\":true,\"req\":\"^0.3.44\"},{\"default_features\":false,\"features\":[\"critical-section\"],\"name\":\"once_cell\",\"req\":\"^1.20.0\"},{\"name\":\"pin-project-lite\",\"optional\":true,\"req\":\"^0.2\"},{\"default_features\":false,\"features\":[\"log\",\"runtime-tokio\"],\"name\":\"quinn\",\"optional\":true,\"req\":\"^0.11.2\"},{\"default_features\":false,\"features\":[\"alloc\",\"std_rng\"],\"name\":\"rand\",\"req\":\"^0.9\"},{\"features\":[\"std\"],\"name\":\"ring\",\"optional\":true,\"req\":\"^0.17\"},{\"default_features\":false,\"features\":[\"logging\",\"std\",\"tls12\"],\"name\":\"rustls\",\"optional\":true,\"req\":\"^0.23.23\"},{\"name\":\"rustls-pki-types\",\"optional\":true,\"req\":\"^1.10\"},{\"name\":\"rustls-platform-verifier\",\"optional\":true,\"req\":\"^0.5\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"name\":\"socket2\",\"optional\":true,\"req\":\"^0.5\"},{\"default_features\":false,\"name\":\"thiserror\",\"req\":\"^2\"},{\"name\":\"time\",\"optional\":true,\"req\":\"^0.3\"},{\"features\":[\"alloc\"],\"name\":\"tinyvec\",\"req\":\"^1.1.1\"},{\"features\":[\"io-util\",\"macros\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1.21\"},{\"features\":[\"rt\",\"time\",\"macros\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.21\"},{\"default_features\":false,\"features\":[\"early-data\"],\"name\":\"tokio-rustls\",\"optional\":true,\"req\":\"^0.26\"},{\"default_features\":false,\"name\":\"tracing\",\"req\":\"^0.1.30\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"},{\"default_features\":false,\"name\":\"url\",\"req\":\"^2.5.4\"},{\"name\":\"wasm-bindgen-crate\",\"optional\":true,\"package\":\"wasm-bindgen\",\"req\":\"^0.2.58\"},{\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"^0.26\"}],\"features\":{\"__dnssec\":[\"dep:bitflags\",\"dep:rustls-pki-types\",\"dep:time\",\"std\"],\"__h3\":[\"dep:h3\",\"dep:h3-quinn\",\"dep:http\",\"std\"],\"__https\":[\"dep:bytes\",\"dep:h2\",\"dep:http\",\"std\"],\"__quic\":[\"dep:bytes\",\"dep:pin-project-lite\",\"dep:quinn\",\"std\"],\"__tls\":[\"dep:bytes\",\"dep:rustls\",\"dep:tokio-rustls\",\"std\",\"tokio\"],\"backtrace\":[\"dep:backtrace\",\"std\"],\"default\":[\"std\",\"tokio\"],\"dnssec-aws-lc-rs\":[\"dep:aws-lc-rs\",\"aws-lc-rs/aws-lc-sys\",\"aws-lc-rs/ring-io\",\"__dnssec\"],\"dnssec-ring\":[\"dep:ring\",\"__dnssec\"],\"h3-aws-lc-rs\":[\"quic-aws-lc-rs\",\"__h3\"],\"h3-ring\":[\"quic-ring\",\"__h3\"],\"https-aws-lc-rs\":[\"tls-aws-lc-rs\",\"__https\"],\"https-ring\":[\"tls-ring\",\"__https\"],\"mdns\":[\"socket2/all\",\"std\"],\"no-std-rand\":[\"once_cell/critical-section\",\"dep:critical-section\"],\"quic-aws-lc-rs\":[\"quinn/rustls-aws-lc-rs\",\"tls-aws-lc-rs\",\"__quic\"],\"quic-ring\":[\"quinn/rustls-ring\",\"tls-ring\",\"__quic\"],\"rustls-platform-verifier\":[\"dep:rustls-platform-verifier\",\"std\"],\"serde\":[\"dep:serde\",\"std\",\"url/serde\"],\"std\":[\"data-encoding/std\",\"futures-channel/std\",\"futures-io/std\",\"futures-util/std\",\"ipnet/std\",\"rand/std\",\"rand/thread_rng\",\"ring?/std\",\"thiserror/std\",\"tracing-subscriber/env-filter\",\"tracing-subscriber/fmt\",\"tracing-subscriber/std\",\"tracing/std\",\"url/std\"],\"testing\":[\"std\"],\"text-parsing\":[\"std\"],\"tls-aws-lc-rs\":[\"tokio-rustls/aws-lc-rs\",\"__tls\"],\"tls-ring\":[\"tokio-rustls/ring\",\"__tls\"],\"tokio\":[\"dep:tokio\",\"std\",\"tokio/net\",\"tokio/rt\",\"tokio/time\",\"tokLine truncated
|
||||
"hickory-proto_0.26.3": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"prebuilt-nasm\"],\"name\":\"aws-lc-rs\",\"optional\":true,\"req\":\"^1.12.3\"},{\"name\":\"bitflags\",\"optional\":true,\"req\":\"^2.4.1\"},{\"name\":\"critical-section\",\"optional\":true,\"req\":\"^1.1.1\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"data-encoding\",\"req\":\"^2.2.0\"},{\"default_features\":false,\"features\":[\"alloc\",\"compiled_data\"],\"name\":\"idna\",\"req\":\"^1.0.3\"},{\"default_features\":false,\"name\":\"ipnet\",\"req\":\"^2.11.0\"},{\"name\":\"jni\",\"req\":\"^0.22.1\",\"target\":\"cfg(target_os = \\\"android\\\")\"},{\"name\":\"js-sys\",\"optional\":true,\"req\":\"^0.3.44\"},{\"default_features\":false,\"features\":[\"critical-section\"],\"name\":\"once_cell\",\"req\":\"^1.20.0\"},{\"name\":\"prefix-trie\",\"optional\":true,\"req\":\"^0.8.4\"},{\"default_features\":false,\"features\":[\"alloc\",\"std_rng\"],\"name\":\"rand\",\"req\":\"^0.10.0\"},{\"features\":[\"std\"],\"name\":\"ring\",\"optional\":true,\"req\":\"^0.17\"},{\"name\":\"rustls-pki-types\",\"optional\":true,\"req\":\"^1.10\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"default_features\":false,\"name\":\"thiserror\",\"req\":\"^2\"},{\"name\":\"time\",\"optional\":true,\"req\":\"^0.3\"},{\"features\":[\"alloc\"],\"name\":\"tinyvec\",\"req\":\"^1.1.1\"},{\"default_features\":false,\"name\":\"tracing\",\"req\":\"^0.1.30\"},{\"default_features\":false,\"name\":\"url\",\"req\":\"^2.5.4\"},{\"name\":\"wasm-bindgen-crate\",\"optional\":true,\"package\":\"wasm-bindgen\",\"req\":\"^0.2.107\"}],\"features\":{\"__dnssec\":[\"dep:bitflags\",\"dep:rustls-pki-types\",\"dep:time\",\"std\"],\"access-control\":[\"std\",\"dep:prefix-trie\"],\"default\":[\"std\"],\"dnssec-aws-lc-rs\":[\"dep:aws-lc-rs\",\"aws-lc-rs/aws-lc-sys\",\"aws-lc-rs/ring-io\",\"__dnssec\"],\"dnssec-ring\":[\"dep:ring\",\"__dnssec\"],\"mdns\":[],\"no-std-rand\":[\"once_cell/critical-section\",\"dep:critical-section\"],\"serde\":[\"dep:serde\",\"std\",\"url/serde\"],\"std\":[\"data-encoding/std\",\"ipnet/std\",\"rand/std\",\"rand/thread_rng\",\"ring?/std\",\"thiserror/std\",\"tracing/std\",\"url/std\"],\"testing\":[\"std\"],\"wasm-bindgen\":[\"dep:wasm-bindgen-crate\",\"dep:js-sys\"]}}",
|
||||
"hickory-resolver_0.25.2": "{\"dependencies\":[{\"name\":\"backtrace\",\"optional\":true,\"req\":\"^0.3.50\"},{\"name\":\"cfg-if\",\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"futures-executor\",\"req\":\"^0.3.5\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"futures-util\",\"req\":\"^0.3.5\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"hickory-proto\",\"req\":\"^0.25\"},{\"name\":\"ipconfig\",\"optional\":true,\"req\":\"^0.3.0\",\"target\":\"cfg(windows)\"},{\"features\":[\"sync\"],\"name\":\"moka\",\"req\":\"^0.12\"},{\"default_features\":false,\"features\":[\"critical-section\"],\"name\":\"once_cell\",\"req\":\"^1.20.0\"},{\"name\":\"parking_lot\",\"req\":\"^0.12\"},{\"default_features\":false,\"features\":[\"log\",\"runtime-tokio\"],\"name\":\"quinn\",\"optional\":true,\"req\":\"^0.11.2\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"rand\",\"req\":\"^0.9\"},{\"features\":[\"system\"],\"name\":\"resolv-conf\",\"optional\":true,\"req\":\"^0.7.0\"},{\"default_features\":false,\"features\":[\"logging\",\"std\",\"tls12\"],\"name\":\"rustls\",\"optional\":true,\"req\":\"^0.23.23\"},{\"features\":[\"derive\",\"rc\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1\"},{\"name\":\"smallvec\",\"req\":\"^1.6\"},{\"default_features\":false,\"name\":\"thiserror\",\"req\":\"^2\"},{\"name\":\"tokio\",\"optional\":true,\"req\":\"^1.21\"},{\"features\":[\"macros\",\"test-util\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.21\"},{\"default_features\":false,\"name\":\"tokio-rustls\",\"optional\":true,\"req\":\"^0.26\"},{\"kind\":\"dev\",\"name\":\"toml\",\"req\":\"^0.8.14\"},{\"default_features\":false,\"name\":\"tracing\",\"req\":\"^0.1.30\"},{\"default_features\":false,\"features\":[\"env-filter\",\"fmt\",\"std\"],\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"},{\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"^0.26\"}],\"features\":{\"__dnssec\":[],\"__h3\":[\"__quic\"],\"__https\":[\"__tls\"],\"__quic\":[\"dep:quinn\",\"__tls\"],\"__tls\":[\"dep:rustls\",\"dep:tokio-rustls\",\"tokio\"],\"backtrace\":[\"dep:backtrace\",\"hickory-proto/backtrace\"],\"default\":[\"system-config\",\"tokio\"],\"dnssec-aws-lc-rs\":[\"hickory-proto/dnssec-aws-lc-rs\",\"__dnssec\"],\"dnssec-ring\":[\"hickory-proto/dnssec-ring\",\"__dnssec\"],\"h3-aws-lc-rs\":[\"hickory-proto/h3-aws-lc-rs\",\"__h3\"],\"h3-ring\":[\"hickory-proto/h3-ring\",\"__h3\"],\"https-aws-lc-rs\":[\"hickory-proto/https-aws-lc-rs\",\"__https\"],\"https-ring\":[\"hickory-proto/https-ring\",\"__https\"],\"quic-aws-lc-rs\":[\"hickory-proto/quic-aws-lc-rs\",\"__quic\",\"quinn/rustls-aws-lc-rs\"],\"quic-ring\":[\"hickory-proto/quic-ring\",\"__quic\",\"quinn/rustls-ring\"],\"rustls-platform-verifier\":[\"hickory-proto/rustls-platform-verifier\"],\"serde\":[\"dep:serde\",\"hickory-proto/serde\"],\"system-config\":[\"dep:ipconfig\",\"dep:resolv-conf\"],\"tls-aws-lc-rs\":[\"hickory-proto/tls-aws-lc-rs\",\"__tls\"],\"tls-ring\":[\"hickory-proto/tls-ring\",\"__tls\"],\"tokio\":[\"dep:tokio\",\"tokio/rt\",\"hickory-proto/tokio\"],\"webpki-roots\":[\"dep:webpki-roots\",\"hickory-proto/webpki-roots\"]}}",
|
||||
"hkdf_0.12.4": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"blobby\",\"req\":\"^0.3\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.2.2\"},{\"name\":\"hmac\",\"req\":\"^0.12.1\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"sha1\",\"req\":\"^0.10\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"sha2\",\"req\":\"^0.10\"}],\"features\":{\"std\":[\"hmac/std\"]}}",
|
||||
"hkdf_0.13.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"blobby\",\"req\":\"^0.4\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^1\"},{\"name\":\"hmac\",\"req\":\"^0.13\"},{\"name\":\"kdf\",\"optional\":true,\"req\":\"^0.1\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"sha1\",\"req\":\"^0.11\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"sha2\",\"req\":\"^0.11\"}],\"features\":{}}",
|
||||
@@ -1525,7 +1529,7 @@
|
||||
"idna_1.1.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"assert_matches\",\"req\":\"^1.3\"},{\"kind\":\"dev\",\"name\":\"bencher\",\"req\":\"^0.1\"},{\"name\":\"idna_adapter\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"features\":[\"const_generics\"],\"name\":\"smallvec\",\"req\":\"^1.13.1\"},{\"kind\":\"dev\",\"name\":\"tester\",\"req\":\"^0.9\"},{\"name\":\"utf8_iter\",\"req\":\"^1.0.4\"}],\"features\":{\"alloc\":[],\"compiled_data\":[\"idna_adapter/compiled_data\"],\"default\":[\"std\",\"compiled_data\"],\"std\":[\"alloc\"]}}",
|
||||
"idna_adapter_1.2.1": "{\"dependencies\":[{\"default_features\":false,\"name\":\"icu_normalizer\",\"req\":\"^2\"},{\"default_features\":false,\"name\":\"icu_properties\",\"req\":\"^2\"}],\"features\":{\"compiled_data\":[\"icu_normalizer/compiled_data\",\"icu_properties/compiled_data\"]}}",
|
||||
"idna_adapter_1.2.2": "{\"dependencies\":[{\"default_features\":false,\"name\":\"icu_normalizer\",\"req\":\"^2.2\"},{\"default_features\":false,\"name\":\"icu_properties\",\"req\":\"^2.2\"}],\"features\":{\"compiled_data\":[\"icu_normalizer/compiled_data\",\"icu_properties/compiled_data\"]}}",
|
||||
"ignore_0.4.25": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"bstr\",\"req\":\"^1.6.2\"},{\"kind\":\"dev\",\"name\":\"crossbeam-channel\",\"req\":\"^0.5.15\"},{\"name\":\"crossbeam-deque\",\"req\":\"^0.8.3\"},{\"name\":\"globset\",\"req\":\"^0.4.18\"},{\"name\":\"log\",\"req\":\"^0.4.20\"},{\"name\":\"memchr\",\"req\":\"^2.6.3\"},{\"default_features\":false,\"features\":[\"std\",\"perf\",\"syntax\",\"meta\",\"nfa\",\"hybrid\",\"dfa-onepass\"],\"name\":\"regex-automata\",\"req\":\"^0.4.0\"},{\"name\":\"same-file\",\"req\":\"^1.0.6\"},{\"name\":\"walkdir\",\"req\":\"^2.4.0\"},{\"name\":\"winapi-util\",\"req\":\"^0.1.2\",\"target\":\"cfg(windows)\"}],\"features\":{\"simd-accel\":[]}}",
|
||||
"ignore_0.4.30": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"bstr\",\"req\":\"^1.6.2\"},{\"kind\":\"dev\",\"name\":\"crossbeam-channel\",\"req\":\"^0.5.15\"},{\"name\":\"crossbeam-deque\",\"req\":\"^0.8.3\"},{\"name\":\"globset\",\"req\":\"^0.4.18\"},{\"name\":\"log\",\"req\":\"^0.4.20\"},{\"name\":\"memchr\",\"req\":\"^2.6.3\"},{\"default_features\":false,\"features\":[\"std\",\"perf\",\"syntax\",\"meta\",\"nfa\",\"hybrid\",\"dfa-onepass\"],\"name\":\"regex-automata\",\"req\":\"^0.4.0\"},{\"name\":\"same-file\",\"req\":\"^1.0.6\"},{\"name\":\"walkdir\",\"req\":\"^2.4.0\"},{\"name\":\"winapi-util\",\"req\":\"^0.1.2\",\"target\":\"cfg(windows)\"}],\"features\":{\"simd-accel\":[]}}",
|
||||
"image-webp_0.2.4": "{\"dependencies\":[{\"name\":\"byteorder-lite\",\"req\":\"^0.1.0\"},{\"kind\":\"dev\",\"name\":\"paste\",\"req\":\"^1.0.14\"},{\"kind\":\"dev\",\"name\":\"png\",\"req\":\"^0.17.12\"},{\"name\":\"quick-error\",\"req\":\"^2.0.1\"},{\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.8.5\"},{\"kind\":\"dev\",\"name\":\"webp\",\"req\":\"^0.3.0\"}],\"features\":{\"_benchmarks\":[]}}",
|
||||
"image_0.25.9": "{\"dependencies\":[{\"features\":[\"extern_crate_alloc\"],\"name\":\"bytemuck\",\"req\":\"^1.8.0\"},{\"name\":\"byteorder-lite\",\"req\":\"^0.1.0\"},{\"name\":\"color_quant\",\"optional\":true,\"req\":\"^1.1\"},{\"kind\":\"dev\",\"name\":\"crc32fast\",\"req\":\"^1.2.0\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.5.0\"},{\"name\":\"dav1d\",\"optional\":true,\"req\":\"^0.10.3\"},{\"default_features\":false,\"name\":\"exr\",\"optional\":true,\"req\":\"^1.74.0\"},{\"name\":\"gif\",\"optional\":true,\"req\":\"^0.14.0\"},{\"kind\":\"dev\",\"name\":\"glob\",\"req\":\"^0.3\"},{\"name\":\"image-webp\",\"optional\":true,\"req\":\"^0.2.0\"},{\"name\":\"moxcms\",\"req\":\"^0.7.4\"},{\"name\":\"mp4parse\",\"optional\":true,\"req\":\"^0.17.0\"},{\"kind\":\"dev\",\"name\":\"num-complex\",\"req\":\"^0.4\"},{\"name\":\"num-traits\",\"req\":\"^0.2.0\"},{\"name\":\"png\",\"optional\":true,\"req\":\"^0.18.0\"},{\"name\":\"qoi\",\"optional\":true,\"req\":\"^0.4\"},{\"kind\":\"dev\",\"name\":\"quickcheck\",\"req\":\"^1\"},{\"default_features\":false,\"name\":\"ravif\",\"optional\":true,\"req\":\"^0.12\"},{\"name\":\"rayon\",\"optional\":true,\"req\":\"^1.7.0\"},{\"default_features\":false,\"name\":\"rgb\",\"optional\":true,\"req\":\"^0.8.48\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.214\"},{\"name\":\"tiff\",\"optional\":true,\"req\":\"^0.10.3\"},{\"default_features\":false,\"name\":\"zune-core\",\"optional\":true,\"req\":\"^0.5.0\"},{\"name\":\"zune-jpeg\",\"optional\":true,\"req\":\"^0.5.5\"}],\"features\":{\"avif\":[\"dep:ravif\",\"dep:rgb\"],\"avif-native\":[\"dep:mp4parse\",\"dep:dav1d\"],\"benchmarks\":[],\"bmp\":[],\"color_quant\":[\"dep:color_quant\"],\"dds\":[],\"default\":[\"rayon\",\"default-formats\"],\"default-formats\":[\"avif\",\"bmp\",\"dds\",\"exr\",\"ff\",\"gif\",\"hdr\",\"ico\",\"jpeg\",\"png\",\"pnm\",\"qoi\",\"tga\",\"tiff\",\"webp\"],\"exr\":[\"dep:exr\"],\"ff\":[],\"gif\":[\"dep:gif\",\"dep:color_quant\"],\"hdr\":[],\"ico\":[\"bmp\",\"png\"],\"jpeg\":[\"dep:zune-core\",\"dep:zune-jpeg\"],\"nasm\":[\"ravif?/asm\"],\"png\":[\"dep:png\"],\"pnm\":[],\"qoi\":[\"dep:qoi\"],\"rayon\":[\"dep:rayon\",\"ravif?/threading\",\"exr?/rayon\"],\"serde\":[\"dep:serde\"],\"tga\":[],\"tiff\":[\"dep:tiff\"],\"webp\":[\"dep:image-webp\"]}}",
|
||||
"include_dir_0.7.4": "{\"dependencies\":[{\"name\":\"glob\",\"optional\":true,\"req\":\"^0.3\"},{\"name\":\"include_dir_macros\",\"req\":\"^0.7.4\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3\"}],\"features\":{\"default\":[],\"metadata\":[\"include_dir_macros/metadata\"],\"nightly\":[\"include_dir_macros/nightly\"]}}",
|
||||
@@ -1574,6 +1578,7 @@
|
||||
"jobserver_0.1.34": "{\"dependencies\":[{\"features\":[\"std\"],\"name\":\"getrandom\",\"req\":\"^0.3.2\",\"target\":\"cfg(windows)\"},{\"name\":\"libc\",\"req\":\"^0.2.171\",\"target\":\"cfg(unix)\"},{\"features\":[\"fs\"],\"kind\":\"dev\",\"name\":\"nix\",\"req\":\"^0.28.0\",\"target\":\"cfg(unix)\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.10.1\"}],\"features\":{}}",
|
||||
"js-sys_0.3.82": "{\"dependencies\":[{\"default_features\":false,\"name\":\"once_cell\",\"req\":\"^1.12\"},{\"default_features\":false,\"name\":\"wasm-bindgen\",\"req\":\"=0.2.105\"}],\"features\":{\"default\":[\"std\"],\"std\":[\"wasm-bindgen/std\"]}}",
|
||||
"js-sys_0.3.85": "{\"dependencies\":[{\"default_features\":false,\"name\":\"once_cell\",\"req\":\"^1.12\"},{\"default_features\":false,\"name\":\"wasm-bindgen\",\"req\":\"=0.2.108\"}],\"features\":{\"default\":[\"std\"],\"std\":[\"wasm-bindgen/std\"]}}",
|
||||
"jsonc-parser_0.26.2": "{\"dependencies\":[{\"name\":\"indexmap\",\"optional\":true,\"req\":\"^2.2.6\"},{\"kind\":\"dev\",\"name\":\"pretty_assertions\",\"req\":\"^1.0.0\"},{\"name\":\"serde_json\",\"optional\":true,\"req\":\"^1.0\"},{\"name\":\"unicode-width\",\"optional\":true,\"req\":\"^0.2.0\"}],\"features\":{\"cst\":[],\"error_unicode_width\":[\"unicode-width\"],\"preserve_order\":[\"indexmap\",\"serde_json/preserve_order\"],\"serde\":[\"serde_json\"]}}",
|
||||
"jsonptr_0.7.1": "{\"dependencies\":[{\"features\":[\"fancy\"],\"name\":\"miette\",\"optional\":true,\"req\":\"^7.4.0\"},{\"kind\":\"dev\",\"name\":\"quickcheck\",\"req\":\"^1.0.3\"},{\"kind\":\"dev\",\"name\":\"quickcheck_macros\",\"req\":\"^1.0.0\"},{\"features\":[\"alloc\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.203\"},{\"features\":[\"alloc\"],\"name\":\"serde_json\",\"optional\":true,\"req\":\"^1.0.119\"},{\"name\":\"syn\",\"optional\":true,\"req\":\"^1.0.109\",\"target\":\"cfg(any())\"},{\"name\":\"toml\",\"optional\":true,\"req\":\"^0.8\"}],\"features\":{\"assign\":[],\"default\":[\"std\",\"serde\",\"json\",\"resolve\",\"assign\",\"delete\"],\"delete\":[\"resolve\"],\"json\":[\"dep:serde_json\",\"serde\"],\"miette\":[\"dep:miette\",\"std\"],\"resolve\":[],\"std\":[\"serde/std\",\"serde_json?/std\"],\"toml\":[\"dep:toml\",\"serde\",\"std\"]}}",
|
||||
"jsonwebtoken_9.3.1": "{\"dependencies\":[{\"name\":\"base64\",\"req\":\"^0.22\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.4\",\"target\":\"cfg(all(target_arch = \\\"wasm32\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.4\",\"target\":\"cfg(not(all(target_arch = \\\"wasm32\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\")))))\"},{\"name\":\"js-sys\",\"req\":\"^0.3\",\"target\":\"cfg(target_arch = \\\"wasm32\\\")\"},{\"name\":\"pem\",\"optional\":true,\"req\":\"^3\"},{\"features\":[\"std\"],\"name\":\"ring\",\"req\":\"^0.17.4\",\"target\":\"cfg(not(target_arch = \\\"wasm32\\\"))\"},{\"features\":[\"std\",\"wasm32_unknown_unknown_js\"],\"name\":\"ring\",\"req\":\"^0.17.4\",\"target\":\"cfg(target_arch = \\\"wasm32\\\")\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"req\":\"^1.0\"},{\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"name\":\"simple_asn1\",\"optional\":true,\"req\":\"^0.6\"},{\"features\":[\"wasm-bindgen\"],\"kind\":\"dev\",\"name\":\"time\",\"req\":\"^0.3\",\"target\":\"cfg(all(target_arch = \\\"wasm32\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))\"},{\"kind\":\"dev\",\"name\":\"time\",\"req\":\"^0.3\",\"target\":\"cfg(not(all(target_arch = \\\"wasm32\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\")))))\"},{\"kind\":\"dev\",\"name\":\"wasm-bindgen-test\",\"req\":\"^0.3.1\"}],\"features\":{\"default\":[\"use_pem\"],\"use_pem\":[\"pem\",\"simple_asn1\"]}}",
|
||||
"kasuari_0.4.12": "{\"dependencies\":[{\"name\":\"document-features\",\"optional\":true,\"req\":\"^0.2\"},{\"name\":\"hashbrown\",\"req\":\"^0.16\"},{\"default_features\":false,\"features\":[\"require-cas\"],\"name\":\"portable-atomic\",\"optional\":true,\"req\":\"^1.13\"},{\"features\":[\"alloc\"],\"name\":\"portable-atomic-util\",\"optional\":true,\"req\":\"^0.2.5\"},{\"kind\":\"dev\",\"name\":\"rstest\",\"req\":\"^0.26\"},{\"default_features\":false,\"name\":\"thiserror\",\"req\":\"^2.0\"}],\"features\":{\"default\":[\"std\"],\"document-features\":[\"dep:document-features\"],\"portable-atomic\":[\"dep:portable-atomic\",\"dep:portable-atomic-util\"],\"std\":[\"thiserror/std\",\"portable-atomic?/std\"]}}",
|
||||
@@ -1597,7 +1602,7 @@
|
||||
"libm_0.2.16": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"no-panic\",\"req\":\"^0.1.35\"}],\"features\":{\"arch\":[],\"default\":[\"arch\"],\"force-soft-floats\":[],\"unstable\":[\"unstable-intrinsics\",\"unstable-float\"],\"unstable-float\":[],\"unstable-intrinsics\":[],\"unstable-public-internals\":[]}}",
|
||||
"libredox_0.1.12": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"^2\"},{\"name\":\"ioslice\",\"optional\":true,\"req\":\"^0.6\"},{\"name\":\"libc\",\"req\":\"^0.2\"},{\"name\":\"redox_syscall\",\"optional\":true,\"req\":\"^0.7\"}],\"features\":{\"call\":[],\"default\":[\"call\",\"std\",\"redox_syscall\"],\"mkns\":[\"ioslice\"],\"std\":[]}}",
|
||||
"libredox_0.1.14": "{\"dependencies\":[{\"name\":\"bitflags\",\"optional\":true,\"req\":\"^2\"},{\"name\":\"ioslice\",\"optional\":true,\"req\":\"^0.6\"},{\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2\"},{\"name\":\"plain\",\"optional\":true,\"req\":\"^0.2\"},{\"name\":\"redox_syscall\",\"optional\":true,\"req\":\"^0.7\"}],\"features\":{\"base\":[\"libc\"],\"call\":[\"base\"],\"default\":[\"base\",\"call\",\"std\",\"redox_syscall\",\"protocol\"],\"mkns\":[\"ioslice\"],\"protocol\":[\"plain\",\"bitflags\",\"redox_syscall\"],\"std\":[\"base\"]}}",
|
||||
"libsqlite3-sys_0.37.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"runtime\"],\"kind\":\"build\",\"name\":\"bindgen\",\"optional\":true,\"req\":\"^0.72\"},{\"kind\":\"build\",\"name\":\"cc\",\"optional\":true,\"req\":\"^1.2.27\"},{\"name\":\"openssl-sys\",\"optional\":true,\"req\":\"^0.9.103\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"optional\":true,\"req\":\"^0.3.19\"},{\"kind\":\"build\",\"name\":\"prettyplease\",\"optional\":true,\"req\":\"^0.2.20\"},{\"default_features\":false,\"kind\":\"build\",\"name\":\"quote\",\"optional\":true,\"req\":\"^1.0.36\"},{\"features\":[\"full\",\"extra-traits\",\"visit-mut\"],\"kind\":\"build\",\"name\":\"syn\",\"optional\":true,\"req\":\"^2.0.89\"},{\"kind\":\"build\",\"name\":\"vcpkg\",\"optional\":true,\"req\":\"^0.2.15\"}],\"features\":{\"buildtime_bindgen\":[\"bindgen\",\"pkg-config\",\"vcpkg\"],\"bundled\":[\"cc\",\"bundled_bindings\"],\"bundled-sqlcipher\":[\"bundled\"],\"bundled-sqlcipher-vendored-openssl\":[\"bundled-sqlcipher\",\"openssl-sys/vendored\"],\"bundled-windows\":[\"cc\",\"bundled_bindings\"],\"bundled_bindings\":[],\"column_metadata\":[],\"default\":[\"min_sqlite_version_3_34_1\"],\"in_gecko\":[],\"loadable_extension\":[\"prettyplease\",\"quote\",\"syn\"],\"min_sqlite_version_3_34_1\":[\"pkg-config\",\"vcpkg\"],\"preupdate_hook\":[\"buildtime_bindgen\"],\"session\":[\"preupdate_hook\",\"buildtime_bindgen\"],\"sqlcipher\":[],\"unlock_notify\":[],\"wasm32-wasi-vfs\":[],\"with-asan\":[]}}",
|
||||
"libsqlite3-sys_0.39.1": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"runtime\"],\"kind\":\"build\",\"name\":\"bindgen\",\"optional\":true,\"req\":\"^0.73\"},{\"kind\":\"build\",\"name\":\"cc\",\"optional\":true,\"req\":\"^1.2.27\"},{\"name\":\"openssl-sys\",\"optional\":true,\"req\":\"^0.9.103\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"optional\":true,\"req\":\"^0.3.19\"},{\"kind\":\"build\",\"name\":\"prettyplease\",\"optional\":true,\"req\":\"^0.3.0\"},{\"default_features\":false,\"kind\":\"build\",\"name\":\"quote\",\"optional\":true,\"req\":\"^1.0.36\"},{\"kind\":\"build\",\"name\":\"sqlcipher-src\",\"optional\":true,\"req\":\"=419.0.6\"},{\"features\":[\"full\",\"extra-traits\",\"visit-mut\"],\"kind\":\"build\",\"name\":\"syn\",\"optional\":true,\"req\":\"^3.0.1\"},{\"kind\":\"build\",\"name\":\"vcpkg\",\"optional\":true,\"req\":\"^0.2.15\"}],\"features\":{\"buildtime_bindgen\":[\"bindgen\",\"pkg-config\",\"vcpkg\"],\"bundled\":[\"cc\",\"bundled_bindings\"],\"bundled-sqlcipher\":[\"bundled\",\"dep:sqlcipher-src\"],\"bundled-sqlcipher-vendored-openssl\":[\"bundled-sqlcipher\",\"openssl-sys/vendored\"],\"bundled-windows\":[\"cc\",\"bundled_bindings\"],\"bundled_bindings\":[],\"column_metadata\":[],\"default\":[\"min_sqlite_version_3_45_3\"],\"in_gecko\":[],\"loadable_extension\":[\"prettyplease\",\"quote\",\"syn\"],\"min_sqlite_version_3_45_3\":[\"pkg-config\",\"vcpkg\"],\"preupdate_hook\":[\"buildtime_bindgen\"],\"session\":[\"preupdate_hook\",\"buildtime_bindgen\"],\"sqlcipher\":[],\"unlock_notify\":[],\"wasm32-wasi-vfs\":[],\"with-asan\":[]}}",
|
||||
"libz-sys_1.1.25": "{\"dependencies\":[{\"kind\":\"build\",\"name\":\"cc\",\"req\":\"^1.0.98\"},{\"kind\":\"build\",\"name\":\"cmake\",\"optional\":true,\"req\":\"^0.1.50\"},{\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.43\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"req\":\"^0.3.9\"},{\"kind\":\"build\",\"name\":\"vcpkg\",\"req\":\"^0.2.11\"}],\"features\":{\"asm\":[],\"default\":[\"libc\",\"stock-zlib\"],\"static\":[],\"stock-zlib\":[],\"zlib-ng\":[\"libc\",\"cmake\"],\"zlib-ng-no-cmake-experimental-community-maintained\":[\"libc\"]}}",
|
||||
"libz-sys_1.1.29": "{\"dependencies\":[{\"kind\":\"build\",\"name\":\"cc\",\"req\":\"^1.0.98\"},{\"kind\":\"build\",\"name\":\"cmake\",\"optional\":true,\"req\":\"^0.1.50\"},{\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.43\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"req\":\"^0.3.9\"},{\"kind\":\"build\",\"name\":\"vcpkg\",\"req\":\"^0.2.11\"}],\"features\":{\"asm\":[],\"default\":[\"libc\",\"stock-zlib\"],\"static\":[],\"stock-zlib\":[],\"zlib-ng\":[\"libc\",\"cmake\"],\"zlib-ng-no-cmake-experimental-community-maintained\":[\"libc\"]}}",
|
||||
"line-clipping_0.3.7": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"^2.11\"},{\"kind\":\"dev\",\"name\":\"rstest\",\"req\":\"^0.26\"}],\"features\":{}}",
|
||||
@@ -1670,8 +1675,8 @@
|
||||
"nu-ansi-term_0.50.3": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"doc-comment\",\"req\":\"^0.3.3\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.152\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.94\"},{\"features\":[\"Win32_Foundation\",\"Win32_System_Console\",\"Win32_Storage_FileSystem\",\"Win32_Security\"],\"name\":\"windows\",\"package\":\"windows-sys\",\"req\":\">=0.59, <=0.61\",\"target\":\"cfg(windows)\"}],\"features\":{\"default\":[\"std\"],\"derive_serde_style\":[\"serde\"],\"gnu_legacy\":[],\"std\":[]}}",
|
||||
"num-bigint_0.4.6": "{\"dependencies\":[{\"default_features\":false,\"name\":\"arbitrary\",\"optional\":true,\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"i128\"],\"name\":\"num-integer\",\"req\":\"^0.1.46\"},{\"default_features\":false,\"features\":[\"i128\"],\"name\":\"num-traits\",\"req\":\"^0.2.18\"},{\"default_features\":false,\"name\":\"quickcheck\",\"optional\":true,\"req\":\"^1\"},{\"default_features\":false,\"name\":\"rand\",\"optional\":true,\"req\":\"^0.8\"},{\"default_features\":false,\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"}],\"features\":{\"arbitrary\":[\"dep:arbitrary\"],\"default\":[\"std\"],\"quickcheck\":[\"dep:quickcheck\"],\"rand\":[\"dep:rand\"],\"serde\":[\"dep:serde\"],\"std\":[\"num-integer/std\",\"num-traits/std\"]}}",
|
||||
"num-complex_0.4.6": "{\"dependencies\":[{\"default_features\":false,\"name\":\"bytecheck\",\"optional\":true,\"req\":\"^0.6\"},{\"name\":\"bytemuck\",\"optional\":true,\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"i128\"],\"name\":\"num-traits\",\"req\":\"^0.2.18\"},{\"default_features\":false,\"name\":\"rand\",\"optional\":true,\"req\":\"^0.8\"},{\"default_features\":false,\"name\":\"rkyv\",\"optional\":true,\"req\":\"^0.7\"},{\"default_features\":false,\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"}],\"features\":{\"bytecheck\":[\"dep:bytecheck\"],\"bytemuck\":[\"dep:bytemuck\"],\"default\":[\"std\"],\"libm\":[\"num-traits/libm\"],\"rand\":[\"dep:rand\"],\"rkyv\":[\"dep:rkyv\"],\"serde\":[\"dep:serde\"],\"std\":[\"num-traits/std\"]}}",
|
||||
"num-conv_0.2.0": "{\"dependencies\":[],\"features\":{}}",
|
||||
"num-conv_0.2.1": "{\"dependencies\":[],\"features\":{}}",
|
||||
"num-conv_0.2.2": "{\"dependencies\":[],\"features\":{}}",
|
||||
"num-derive_0.4.2": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"num\",\"req\":\"^0.4\"},{\"kind\":\"dev\",\"name\":\"num-traits\",\"req\":\"^0.2\"},{\"name\":\"proc-macro2\",\"req\":\"^1\"},{\"name\":\"quote\",\"req\":\"^1\"},{\"name\":\"syn\",\"req\":\"^2.0.5\"}],\"features\":{}}",
|
||||
"num-integer_0.1.46": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"i128\"],\"name\":\"num-traits\",\"req\":\"^0.2.11\"}],\"features\":{\"default\":[\"std\"],\"i128\":[],\"std\":[\"num-traits/std\"]}}",
|
||||
"num-iter_0.1.45": "{\"dependencies\":[{\"kind\":\"build\",\"name\":\"autocfg\",\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"i128\"],\"name\":\"num-integer\",\"req\":\"^0.1.46\"},{\"default_features\":false,\"features\":[\"i128\"],\"name\":\"num-traits\",\"req\":\"^0.2.11\"}],\"features\":{\"default\":[\"std\"],\"i128\":[],\"std\":[\"num-integer/std\",\"num-traits/std\"]}}",
|
||||
@@ -1717,8 +1722,8 @@
|
||||
"openssl-probe_0.1.6": "{\"dependencies\":[],\"features\":{}}",
|
||||
"openssl-probe_0.2.1": "{\"dependencies\":[],\"features\":{}}",
|
||||
"openssl-src_300.6.1+3.6.3": "{\"dependencies\":[{\"name\":\"cc\",\"req\":\"^1.0.79\"}],\"features\":{\"camellia\":[],\"default\":[],\"force-engine\":[],\"idea\":[],\"ktls\":[],\"legacy\":[],\"no-dso\":[],\"seed\":[],\"ssl3\":[],\"weak-crypto\":[]}}",
|
||||
"openssl-sys_0.9.111": "{\"dependencies\":[{\"features\":[\"ssl\",\"bindgen\"],\"name\":\"aws-lc-fips-sys\",\"optional\":true,\"req\":\"^0.13\"},{\"features\":[\"ssl\"],\"name\":\"aws-lc-sys\",\"optional\":true,\"req\":\"^0.27\"},{\"features\":[\"experimental\"],\"kind\":\"build\",\"name\":\"bindgen\",\"optional\":true,\"req\":\"^0.72.0\"},{\"name\":\"bssl-sys\",\"optional\":true,\"req\":\"^0.1.0\"},{\"kind\":\"build\",\"name\":\"cc\",\"req\":\"^1.0.61\"},{\"name\":\"libc\",\"req\":\"^0.2\"},{\"features\":[\"legacy\"],\"kind\":\"build\",\"name\":\"openssl-src\",\"optional\":true,\"req\":\"^300.2.0\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"req\":\"^0.3.9\"},{\"kind\":\"build\",\"name\":\"vcpkg\",\"req\":\"^0.2.8\"}],\"features\":{\"aws-lc\":[\"dep:aws-lc-sys\"],\"aws-lc-fips\":[\"dep:aws-lc-fips-sys\"],\"unstable_boringssl\":[\"bssl-sys\"],\"vendored\":[\"openssl-src\"]}}",
|
||||
"openssl_0.10.75": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"^2.2.1\"},{\"name\":\"cfg-if\",\"req\":\"^1.0\"},{\"name\":\"ffi\",\"package\":\"openssl-sys\",\"req\":\"^0.9.111\"},{\"name\":\"foreign-types\",\"req\":\"^0.3.1\"},{\"kind\":\"dev\",\"name\":\"hex\",\"req\":\"^0.4\"},{\"name\":\"libc\",\"req\":\"^0.2\"},{\"name\":\"once_cell\",\"req\":\"^1.5.2\"},{\"name\":\"openssl-macros\",\"req\":\"^0.1.1\"}],\"features\":{\"aws-lc\":[\"ffi/aws-lc\"],\"aws-lc-fips\":[\"ffi/aws-lc-fips\"],\"bindgen\":[\"ffi/bindgen\"],\"default\":[],\"unstable_boringssl\":[\"ffi/unstable_boringssl\"],\"v101\":[],\"v102\":[],\"v110\":[],\"v111\":[],\"vendored\":[\"ffi/vendored\"]}}",
|
||||
"openssl-sys_0.9.118": "{\"dependencies\":[{\"features\":[\"ssl\",\"bindgen\"],\"name\":\"aws-lc-fips-sys\",\"optional\":true,\"req\":\"^0.14\"},{\"features\":[\"ssl\"],\"name\":\"aws-lc-sys\",\"optional\":true,\"req\":\"^0.41\"},{\"features\":[\"experimental\"],\"kind\":\"build\",\"name\":\"bindgen\",\"optional\":true,\"req\":\"^0.72.0\"},{\"name\":\"bssl-sys\",\"optional\":true,\"req\":\"^0.1.0\"},{\"kind\":\"build\",\"name\":\"cc\",\"req\":\"^1.0.61\"},{\"name\":\"libc\",\"req\":\"^0.2\"},{\"features\":[\"legacy\"],\"kind\":\"build\",\"name\":\"openssl-src\",\"optional\":true,\"req\":\"^300.2.0\"},{\"kind\":\"build\",\"name\":\"pkg-config\",\"req\":\"^0.3.9\"},{\"kind\":\"build\",\"name\":\"vcpkg\",\"req\":\"^0.2.8\"}],\"features\":{\"aws-lc\":[\"dep:aws-lc-sys\"],\"aws-lc-fips\":[\"dep:aws-lc-fips-sys\"],\"unstable_boringssl\":[\"bssl-sys\"],\"vendored\":[\"openssl-src\"]}}",
|
||||
"openssl_0.10.82": "{\"dependencies\":[{\"name\":\"bitflags\",\"req\":\"^2.2.1\"},{\"name\":\"cfg-if\",\"req\":\"^1.0\"},{\"name\":\"ffi\",\"package\":\"openssl-sys\",\"req\":\"^0.9.118\"},{\"name\":\"foreign-types\",\"req\":\"^0.3.1\"},{\"kind\":\"dev\",\"name\":\"hex\",\"req\":\"^0.4\"},{\"name\":\"libc\",\"req\":\"^0.2\"},{\"name\":\"openssl-macros\",\"req\":\"^0.1.1\"}],\"features\":{\"aws-lc\":[\"ffi/aws-lc\"],\"aws-lc-fips\":[\"ffi/aws-lc-fips\"],\"bindgen\":[\"ffi/bindgen\"],\"default\":[],\"unstable_boringssl\":[\"ffi/unstable_boringssl\"],\"v101\":[],\"v102\":[],\"v110\":[],\"v111\":[],\"vendored\":[\"ffi/vendored\"]}}",
|
||||
"opentelemetry-appender-tracing_0.31.1": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.5\"},{\"name\":\"log\",\"optional\":true,\"req\":\"^0.4.21\"},{\"kind\":\"dev\",\"name\":\"log\",\"req\":\"^0.4.21\"},{\"default_features\":false,\"features\":[\"logs\"],\"name\":\"opentelemetry\",\"req\":\"^0.31\"},{\"default_features\":false,\"features\":[\"logs\"],\"kind\":\"dev\",\"name\":\"opentelemetry-stdout\",\"req\":\"^0.31\"},{\"default_features\":false,\"features\":[\"logs\",\"testing\",\"internal-logs\"],\"kind\":\"dev\",\"name\":\"opentelemetry_sdk\",\"req\":\"^0.31\"},{\"features\":[\"flamegraph\",\"criterion\"],\"kind\":\"dev\",\"name\":\"pprof\",\"req\":\"^0.14\",\"target\":\"cfg(not(target_os = \\\"windows\\\"))\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"tracing\",\"req\":\">=0.1.40\"},{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"tracing\",\"req\":\">=0.1.40\"},{\"default_features\":false,\"name\":\"tracing-core\",\"req\":\">=0.1.33\"},{\"name\":\"tracing-log\",\"optional\":true,\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"tracing-log\",\"req\":\"^0.2\"},{\"name\":\"tracing-opentelemetry\",\"optional\":true,\"req\":\"^0.32\"},{\"default_features\":false,\"features\":[\"registry\",\"std\"],\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"},{\"default_features\":false,\"features\":[\"env-filter\",\"registry\",\"std\",\"fmt\"],\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"}],\"features\":{\"default\":[],\"experimental_metadata_attributes\":[\"dep:tracing-log\"],\"experimental_use_tracing_span_context\":[\"tracing-opentelemetry\"],\"spec_unstable_logs_enabled\":[\"opentelemetry/spec_unstable_logs_enabled\"]}}",
|
||||
"opentelemetry-http_0.31.0": "{\"dependencies\":[{\"name\":\"async-trait\",\"req\":\"^0.1\"},{\"name\":\"bytes\",\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"http\",\"req\":\"^1.1\"},{\"name\":\"http-body-util\",\"optional\":true,\"req\":\"^0.1\"},{\"default_features\":false,\"name\":\"hyper\",\"optional\":true,\"req\":\"^1.3\"},{\"features\":[\"client-legacy\",\"http1\",\"http2\"],\"name\":\"hyper-util\",\"optional\":true,\"req\":\"^0.1\"},{\"default_features\":false,\"features\":[\"trace\"],\"name\":\"opentelemetry\",\"req\":\"^0.31\"},{\"default_features\":false,\"name\":\"reqwest\",\"optional\":true,\"req\":\"^0.12\"},{\"default_features\":false,\"features\":[\"time\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1\"}],\"features\":{\"default\":[\"internal-logs\"],\"hyper\":[\"dep:http-body-util\",\"dep:hyper\",\"dep:hyper-util\",\"dep:tokio\"],\"internal-logs\":[\"opentelemetry/internal-logs\"],\"reqwest\":[\"dep:reqwest\"],\"reqwest-blocking\":[\"dep:reqwest\",\"reqwest/blocking\"],\"reqwest-rustls\":[\"dep:reqwest\",\"reqwest/rustls-tls-native-roots\"],\"reqwest-rustls-webpki-roots\":[\"dep:reqwest\",\"reqwest/rustls-tls-webpki-roots\"]}}",
|
||||
"opentelemetry-otlp_0.31.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"async-trait\",\"req\":\"^0.1\"},{\"name\":\"flate2\",\"optional\":true,\"req\":\"^1.1.2\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"futures-util\",\"req\":\"^0.3\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"http\",\"optional\":true,\"req\":\"^1.1\"},{\"default_features\":false,\"name\":\"opentelemetry\",\"req\":\"^0.31\"},{\"default_features\":false,\"name\":\"opentelemetry-http\",\"optional\":true,\"req\":\"^0.31\"},{\"default_features\":false,\"name\":\"opentelemetry-proto\",\"req\":\"^0.31\"},{\"default_features\":false,\"name\":\"opentelemetry_sdk\",\"req\":\"^0.31\"},{\"default_features\":false,\"features\":[\"trace\",\"testing\"],\"kind\":\"dev\",\"name\":\"opentelemetry_sdk\",\"req\":\"^0.31\"},{\"name\":\"prost\",\"optional\":true,\"req\":\"^0.14\"},{\"default_features\":false,\"name\":\"reqwest\",\"optional\":true,\"req\":\"^0.12\"},{\"default_features\":false,\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"name\":\"serde_json\",\"optional\":true,\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"temp-env\",\"req\":\"^0.3.6\"},{\"default_features\":false,\"name\":\"thiserror\",\"req\":\"^2\"},{\"default_features\":false,\"features\":[\"sync\",\"rt\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"macros\",\"rt-multi-thread\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1\"},{\"features\":[\"net\"],\"kind\":\"dev\",\"name\":\"tokio-stream\",\"req\":\"^0.1\"},{\"default_features\":false,\"name\":\"tonic\",\"optional\":true,\"req\":\"^0.14.1\"},{\"default_features\":false,\"features\":[\"router\",\"server\"],\"kind\":\"dev\",\"name\":\"tonic\",\"req\":\"^0.14.1\"},{\"default_features\":false,\"name\":\"tracing\",\"optional\":true,\"req\":\">=0.1.40\"},{\"name\":\"zstd\",\"optional\":true,\"req\":\"^0.13\"}],\"features\":{\"default\":[\"http-proto\",\"reqwest-blocking-client\",\"trace\",\"metrics\",\"logs\",\"internal-logs\"],\"grpc-tonic\":[\"tonic\",\"prost\",\"http\",\"tokio\",\"opentelemetry-proto/gen-tonic\"],\"gzip-http\":[\"flate2\"],\"gzip-tonic\":[\"tonic/gzip\"],\"http-json\":[\"serde_json\",\"prost\",\"opentelemetry-http\",\"opentelemetry-proto/gen-tonic-messages\",\"opentelemetry-proto/with-serde\",\"http\",\"trace\",\"metrics\"],\"http-proto\":[\"prost\",\"opentelemetry-http\",\"opentelemetry-proto/gen-tonic-messages\",\"http\",\"trace\",\"metrics\"],\"hyper-client\":[\"opentelemetry-http/hyper\"],\"integration-testing\":[\"tonic\",\"prost\",\"tokio/full\",\"trace\",\"logs\"],\"internal-logs\":[\"tracing\",\"opentelemetry_sdk/internal-logs\",\"opentelemetry-http/internal-logs\"],\"logs\":[\"opentelemetry/logs\",\"opentelemetry_sdk/logs\",\"opentelemetry-proto/logs\"],\"metrics\":[\"opentelemetry/metrics\",\"opentelemetry_sdk/metrics\",\"opentelemetry-proto/metrics\"],\"reqwest-blocking-client\":[\"reqwest/blocking\",\"opentelemetry-http/reqwest-blocking\"],\"reqwest-client\":[\"reqwest\",\"opentelemetry-http/reqwest\"],\"reqwest-rustls\":[\"reqwest\",\"opentelemetry-http/reqwest-rustls\"],\"reqwest-rustls-webpki-roots\":[\"reqwest\",\"opentelemetry-http/reqwest-rustls-webpki-roots\"],\"serialize\":[\"serde\",\"serde_json\"],\"tls\":[\"tonic/tls-ring\"],\"tls-roots\":[\"tls\",\"tonic/tls-native-roots\"],\"tls-webpki-roots\":[\"tls\",\"tonic/tls-webpki-roots\"],\"trace\":[\"opentelemetry/trace\",\"opentelemetry_sdk/trace\",\"opentelemetry-proto/trace\"],\"zstd-http\":[\"zstd\"],\"zstd-tonic\":[\"tonic/zstd\"]}}",
|
||||
@@ -2035,6 +2040,7 @@
|
||||
"smol_str_0.3.5": "{\"dependencies\":[{\"name\":\"arbitrary\",\"optional\":true,\"req\":\"^1.3\"},{\"default_features\":false,\"name\":\"borsh\",\"optional\":true,\"req\":\"^1.4.0\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.7\"},{\"kind\":\"dev\",\"name\":\"proptest\",\"req\":\"^1.5\"},{\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.9.2\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0\"}],\"features\":{\"default\":[\"std\"],\"serde\":[\"dep:serde_core\"],\"std\":[\"serde_core?/std\",\"borsh?/std\"]}}",
|
||||
"socket2_0.5.10": "{\"dependencies\":[{\"name\":\"libc\",\"req\":\"^0.2.171\",\"target\":\"cfg(unix)\"},{\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_System_IO\",\"Win32_System_Threading\",\"Win32_System_WindowsProgramming\"],\"name\":\"windows-sys\",\"req\":\"^0.52\",\"target\":\"cfg(windows)\"}],\"features\":{\"all\":[]}}",
|
||||
"socket2_0.6.3": "{\"dependencies\":[{\"name\":\"libc\",\"req\":\"^0.2.172\",\"target\":\"cfg(any(unix, target_os = \\\"wasi\\\"))\"},{\"features\":[\"Win32_Foundation\",\"Win32_Networking_WinSock\",\"Win32_System_IO\",\"Win32_System_Threading\",\"Win32_System_WindowsProgramming\"],\"name\":\"windows-sys\",\"req\":\">=0.60, <0.62\",\"target\":\"cfg(windows)\"}],\"features\":{\"all\":[]}}",
|
||||
"socks5-protocol_0.3.5": "{\"dependencies\":[{\"name\":\"thiserror\",\"req\":\"^1.0\"},{\"features\":[\"io-util\"],\"name\":\"tokio\",\"req\":\"^1.0\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.0\"}],\"features\":{\"default\":[\"sync\"],\"doc\":[\"tokio/rt-multi-thread\",\"tokio/macros\"],\"sync\":[]}}",
|
||||
"sonora-aec3_0.2.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"proptest\",\"req\":\"^1.11\"},{\"name\":\"sonora-common-audio\",\"req\":\"^0.2.0\"},{\"name\":\"sonora-fft\",\"req\":\"^0.2.0\"},{\"name\":\"sonora-simd\",\"req\":\"^0.2.0\"},{\"kind\":\"dev\",\"name\":\"test-strategy\",\"req\":\"^0.4\"}],\"features\":{}}",
|
||||
"sonora-agc2_0.2.0": "{\"dependencies\":[{\"features\":[\"derive\"],\"name\":\"bytemuck\",\"req\":\"^1\"},{\"features\":[\"debug\"],\"name\":\"derive_more\",\"req\":\"^2\"},{\"kind\":\"dev\",\"name\":\"proptest\",\"req\":\"^1.11\"},{\"name\":\"sonora-common-audio\",\"req\":\"^0.2.0\"},{\"name\":\"sonora-fft\",\"req\":\"^0.2.0\"},{\"name\":\"sonora-simd\",\"req\":\"^0.2.0\"},{\"kind\":\"dev\",\"name\":\"test-strategy\",\"req\":\"^0.4\"},{\"name\":\"tracing\",\"req\":\"^0.1\"}],\"features\":{}}",
|
||||
"sonora-common-audio_0.2.0": "{\"dependencies\":[{\"features\":[\"debug\"],\"name\":\"derive_more\",\"req\":\"^2\"},{\"name\":\"sonora-simd\",\"req\":\"^0.2.0\"}],\"features\":{}}",
|
||||
@@ -2045,12 +2051,10 @@
|
||||
"sorted_vector_map_0.2.1": "{\"dependencies\":[{\"name\":\"itertools\",\"req\":\"^0.14.0\"},{\"name\":\"quickcheck\",\"req\":\"^1.0\"}],\"features\":{}}",
|
||||
"spin_0.9.8": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.4\"},{\"name\":\"lock_api_crate\",\"optional\":true,\"package\":\"lock_api\",\"req\":\"^0.4\"},{\"default_features\":false,\"name\":\"portable-atomic\",\"optional\":true,\"req\":\"^1\"}],\"features\":{\"barrier\":[\"mutex\"],\"default\":[\"lock_api\",\"mutex\",\"spin_mutex\",\"rwlock\",\"once\",\"lazy\",\"barrier\"],\"fair_mutex\":[\"mutex\"],\"lazy\":[\"once\"],\"lock_api\":[\"lock_api_crate\"],\"mutex\":[],\"once\":[],\"portable_atomic\":[\"portable-atomic\"],\"rwlock\":[],\"spin_mutex\":[\"mutex\"],\"std\":[],\"ticket_mutex\":[\"mutex\"],\"use_ticket_mutex\":[\"mutex\",\"ticket_mutex\"]}}",
|
||||
"spki_0.7.3": "{\"dependencies\":[{\"features\":[\"derive\"],\"name\":\"arbitrary\",\"optional\":true,\"req\":\"^1.2\"},{\"default_features\":false,\"name\":\"base64ct\",\"optional\":true,\"req\":\"^1\"},{\"features\":[\"oid\"],\"name\":\"der\",\"req\":\"^0.7.2\"},{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.4\"},{\"default_features\":false,\"name\":\"sha2\",\"optional\":true,\"req\":\"^0.10\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3\"}],\"features\":{\"alloc\":[\"base64ct?/alloc\",\"der/alloc\"],\"arbitrary\":[\"std\",\"dep:arbitrary\",\"der/arbitrary\"],\"base64\":[\"dep:base64ct\"],\"fingerprint\":[\"sha2\"],\"pem\":[\"alloc\",\"der/pem\"],\"std\":[\"der/std\",\"alloc\"]}}",
|
||||
"sqlx-core_0.9.0": "{\"dependencies\":[{\"name\":\"async-fs\",\"optional\":true,\"req\":\"^2.1\"},{\"default_features\":false,\"features\":[\"async-io\"],\"name\":\"async-global-executor\",\"optional\":true,\"req\":\"^3.1\"},{\"name\":\"async-io\",\"optional\":true,\"req\":\"^2.4.1\"},{\"name\":\"async-std\",\"optional\":true,\"req\":\"^1.13\"},{\"name\":\"async-task\",\"optional\":true,\"req\":\"^4.7.1\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"base64\",\"req\":\"^0.22.1\"},{\"name\":\"bigdecimal\",\"optional\":true,\"req\":\"^0.4.0\"},{\"name\":\"bit-vec\",\"optional\":true,\"req\":\"^0.8\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"bstr\",\"optional\":true,\"req\":\"^1.0.1\"},{\"name\":\"bytes\",\"req\":\"^1.2.0\"},{\"name\":\"cfg-if\",\"req\":\"^1.0.0\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.34\"},{\"name\":\"crc\",\"optional\":true,\"req\":\"^3\"},{\"name\":\"crossbeam-queue\",\"req\":\"^0.3.2\"},{\"name\":\"either\",\"req\":\"^1.6.1\"},{\"name\":\"event-listener\",\"req\":\"^5.2.0\"},{\"default_features\":false,\"name\":\"futures-core\",\"req\":\"^0.3.32\"},{\"name\":\"futures-intrusive\",\"req\":\"^0.5.0\"},{\"name\":\"futures-io\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"features\":[\"alloc\",\"sink\",\"io\"],\"name\":\"futures-util\",\"req\":\"^0.3.32\"},{\"name\":\"hashbrown\",\"req\":\"^0.16.0\"},{\"name\":\"hashlink\",\"req\":\"^0.11.0\"},{\"name\":\"indexmap\",\"req\":\"^2.0\"},{\"name\":\"ipnet\",\"optional\":true,\"req\":\"^2.3.0\"},{\"name\":\"ipnetwork\",\"optional\":true,\"req\":\"^0.21.1\"},{\"default_features\":false,\"name\":\"log\",\"req\":\"^0.4.18\"},{\"name\":\"mac_address\",\"optional\":true,\"req\":\"^1.1.5\"},{\"default_features\":false,\"name\":\"memchr\",\"req\":\"^2.5.0\"},{\"name\":\"native-tls\",\"optional\":true,\"req\":\"^0.2.10\"},{\"name\":\"percent-encoding\",\"req\":\"^2.3.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"rust_decimal\",\"optional\":true,\"req\":\"^1.36.0\"},{\"default_features\":false,\"features\":[\"std\",\"tls12\"],\"name\":\"rustls\",\"optional\":true,\"req\":\"^0.23.24\"},{\"name\":\"rustls-native-certs\",\"optional\":true,\"req\":\"^0.8.0\"},{\"features\":[\"derive\",\"rc\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.219\"},{\"features\":[\"raw_value\"],\"name\":\"serde_json\",\"optional\":true,\"req\":\"^1.0.142\"},{\"default_features\":false,\"name\":\"sha2\",\"optional\":true,\"req\":\"^0.10.0\"},{\"name\":\"smallvec\",\"req\":\"^1.13.1\"},{\"default_features\":false,\"name\":\"smol\",\"optional\":true,\"req\":\"^2.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"req\":\"^2.0.18\"},{\"features\":[\"formatting\",\"parsing\",\"macros\"],\"name\":\"time\",\"optional\":true,\"req\":\"^0.3.47\"},{\"default_features\":false,\"features\":[\"time\",\"net\",\"sync\",\"fs\",\"io-util\",\"rt\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1.25.0\"},{\"features\":[\"rt\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.25.0\"},{\"features\":[\"fs\"],\"name\":\"tokio-stream\",\"optional\":true,\"req\":\"^0.1.8\"},{\"name\":\"toml\",\"optional\":true,\"req\":\"^0.8.16\"},{\"features\":[\"log\"],\"name\":\"tracing\",\"req\":\"^0.1.37\"},{\"name\":\"url\",\"req\":\"^2.2.2\"},{\"name\":\"uuid\",\"optional\":true,\"req\":\"^1.12.1\"},{\"name\":\"webpki-roots\",\"optional\":true,\"req\":\"^1\"}],\"features\":{\"_rt-async-global-executor\":[\"async-global-executor\",\"_rt-async-io\",\"_rt-async-task\"],\"_rt-async-io\":[\"async-io\",\"async-fs\"],\"_rt-async-std\":[\"async-std\",\"_rt-async-io\"],\"_rt-async-task\":[\"async-task\"],\"_rt-smol\":[\"smol\",\"_rt-async-io\",\"_rt-async-task\"],\"_rt-tokio\":[\"tokio\",\"tokio-stream\"],\"_tls-native-tls\":[\"native-tls\"],\"_tls-none\":[],\"_tls-rustls\":[\"rustls\"],\"_tls-rustls-aws-lc-rs\":[\"_tls-rustls\",\"rustls/aws-lc-rs\",\"webpki-roots\"],\"_tls-rustls-ring-native-roots\":[\"_tls-rustls\",\"rustls/ring\",\"rustls-native-certs\"],\"_tls-rustls-ring-webpki\":[\"_tls-rustls\",\"rustls/ring\",\"webpki-roots\"],\"_unstable-doc\":[\"sqlx-toml\"],\"any\":[],\"default\":[],\"json\":[\"serde\",\"serde_json\"],\"migrate\":[\"sha2\",\"crc\"],\"offline\":[\"serde\",\"either/serde\"],\"sqlx-toml\":[\"serde\",\"toml/parse\"]}}",
|
||||
"sqlx-macros-core_0.9.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"async-io\"],\"name\":\"async-global-executor\",\"optional\":true,\"req\":\"^3.1\"},{\"name\":\"async-std\",\"optional\":true,\"req\":\"^1.13\"},{\"name\":\"cfg-if\",\"req\":\"^1.0.0\"},{\"default_features\":false,\"name\":\"dotenvy\",\"req\":\"^0.15.7\"},{\"name\":\"either\",\"req\":\"^1.6.1\"},{\"name\":\"heck\",\"req\":\"^0.5\"},{\"name\":\"hex\",\"req\":\"^0.4.3\"},{\"default_features\":false,\"name\":\"proc-macro2\",\"req\":\"^1.0.83\"},{\"default_features\":false,\"name\":\"quote\",\"req\":\"^1.0.35\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"req\":\"^1.0.219\"},{\"name\":\"serde_json\",\"req\":\"^1.0.142\"},{\"name\":\"sha2\",\"req\":\"^0.10.0\"},{\"default_features\":false,\"name\":\"smol\",\"optional\":true,\"req\":\"^2.0\"},{\"features\":[\"offline\"],\"name\":\"sqlx-core\",\"req\":\"=0.9.0\"},{\"default_features\":false,\"features\":[\"offline\",\"migrate\"],\"name\":\"sqlx-mysql\",\"optional\":true,\"req\":\"=0.9.0\"},{\"features\":[\"offline\",\"migrate\"],\"name\":\"sqlx-postgres\",\"optional\":true,\"req\":\"=0.9.0\"},{\"features\":[\"offline\",\"migrate\"],\"name\":\"sqlx-sqlite\",\"optional\":true,\"req\":\"=0.9.0\"},{\"default_features\":false,\"features\":[\"full\",\"derive\",\"parsing\",\"printing\",\"clone-impls\"],\"name\":\"syn\",\"req\":\"^2.0.87\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"optional\":true,\"req\":\"^2.0.18\"},{\"default_features\":false,\"features\":[\"time\",\"net\",\"sync\",\"fs\",\"io-util\",\"rt\"],\"name\":\"tokio\",\"optional\":true,\"req\":\"^1.25.0\"},{\"name\":\"url\",\"req\":\"^2.2.2\"}],\"features\":{\"_rt-async-global-executor\":[\"async-global-executor\",\"sqlx-core/_rt-async-global-executor\"],\"_rt-async-std\":[\"async-std\",\"sqlx-core/_rt-async-std\"],\"_rt-smol\":[\"smol\",\"sqlx-core/_rt-smol\"],\"_rt-tokio\":[\"tokio\",\"sqlx-core/_rt-tokio\"],\"_sqlite\":[],\"_tls-native-tls\":[\"sqlx-core/_tls-native-tls\"],\"_tls-rustls-aws-lc-rs\":[\"sqlx-core/_tls-rustls-aws-lc-rs\"],\"_tls-rustls-ring-native-roots\":[\"sqlx-core/_tls-rustls-ring-native-roots\"],\"_tls-rustls-ring-webpki\":[\"sqlx-core/_tls-rustls-ring-webpki\"],\"bigdecimal\":[\"sqlx-core/bigdecimal\",\"sqlx-mysql?/bigdecimal\",\"sqlx-postgres?/bigdecimal\"],\"bit-vec\":[\"sqlx-core/bit-vec\",\"sqlx-postgres?/bit-vec\"],\"chrono\":[\"sqlx-core/chrono\",\"sqlx-mysql?/chrono\",\"sqlx-postgres?/chrono\",\"sqlx-sqlite?/chrono\"],\"default\":[],\"derive\":[],\"ipnet\":[\"sqlx-core/ipnet\",\"sqlx-postgres?/ipnet\"],\"ipnetwork\":[\"sqlx-core/ipnetwork\",\"sqlx-postgres?/ipnetwork\"],\"json\":[\"sqlx-core/json\",\"sqlx-mysql?/json\",\"sqlx-postgres?/json\",\"sqlx-sqlite?/json\"],\"mac_address\":[\"sqlx-core/mac_address\",\"sqlx-postgres?/mac_address\"],\"macros\":[\"thiserror\"],\"migrate\":[\"sqlx-core/migrate\"],\"mysql\":[\"sqlx-mysql\"],\"mysql-rsa\":[\"mysql\",\"sqlx-mysql/rsa\"],\"postgres\":[\"sqlx-postgres\"],\"rust_decimal\":[\"sqlx-core/rust_decimal\",\"sqlx-mysql?/rust_decimal\",\"sqlx-postgres?/rust_decimal\"],\"sqlite\":[\"_sqlite\",\"sqlx-sqlite/bundled\"],\"sqlite-load-extension\":[\"sqlx-sqlite/load-extension\"],\"sqlite-unbundled\":[\"_sqlite\",\"sqlx-sqlite/unbundled\"],\"sqlx-toml\":[\"sqlx-core/sqlx-toml\",\"sqlx-sqlite?/sqlx-toml\"],\"time\":[\"sqlx-core/time\",\"sqlx-mysql?/time\",\"sqlx-postgres?/time\",\"sqlx-sqlite?/time\"],\"uuid\":[\"sqlx-core/uuid\",\"sqlx-mysql?/uuid\",\"sqlx-postgres?/uuid\",\"sqlx-sqlite?/uuid\"]}}",
|
||||
"sqlx-macros_0.9.0": "{\"dependencies\":[{\"default_features\":false,\"name\":\"proc-macro2\",\"req\":\"^1.0.83\"},{\"default_features\":false,\"name\":\"quote\",\"req\":\"^1.0.35\"},{\"features\":[\"any\"],\"name\":\"sqlx-core\",\"req\":\"=0.9.0\"},{\"name\":\"sqlx-macros-core\",\"req\":\"=0.9.0\"},{\"default_features\":false,\"features\":[\"parsing\",\"proc-macro\"],\"name\":\"syn\",\"req\":\"^2.0.87\"}],\"features\":{\"_rt-async-global-executor\":[\"sqlx-macros-core/_rt-async-global-executor\"],\"_rt-async-std\":[\"sqlx-macros-core/_rt-async-std\"],\"_rt-smol\":[\"sqlx-macros-core/_rt-smol\"],\"_rt-tokio\":[\"sqlx-macros-core/_rt-tokio\"],\"_tls-native-tls\":[\"sqlx-macros-core/_tls-native-tls\"],\"_tls-rustls-aws-lc-rs\":[\"sqlx-macros-core/_tls-rustls-aws-lc-rs\"],\"_tls-rustls-ring-native-roots\":[\"sqlx-macros-core/_tls-rustls-ring-native-roots\"],\"_tls-rustls-ring-webpki\":[\"sqlx-macros-core/_tls-rustls-ring-webpki\"],\"bigdecimal\":[\"sqlx-macros-core/bigdecimal\"],\"bit-vec\":[\"sqlx-macros-core/bit-vec\"],\"chrono\":[\"sqlx-macros-core/chrono\"],\"default\":[],\"derive\":[\"sqlx-macros-core/derive\"],\"ipnet\":[\"sqlx-macros-core/ipnet\"],\"ipnetwork\":[\"sqlx-macros-core/ipnetwork\"],\"json\":[\"sqlx-macros-core/json\"],\"mac_address\":[\"sqlx-macros-core/mac_address\"],\"macros\":[\"sqlx-macros-core/macros\"],\"migrate\":[\"sqlx-macros-core/migrate\"],\"mysql\":[\"sqlx-macros-core/mysql\"],\"mysql-rsa\":[\"sqlx-macros-core/mysql-rsa\"],\"postgres\":[\"sqlx-macros-core/postgres\"],\"rust_decimal\":[\"sqlx-macros-core/rust_decimal\"],\"sqlite\":[\"sqlx-macros-core/sqlite\"],\"sqlite-load-extension\":[\"sqlx-macros-core/sqlite-load-extension\"],\"sqlite-unbundled\":[\"sqlx-macros-core/sqlite-unbundled\"],\"sqlx-toml\":[\"sqlx-macros-core/sqlx-toml\"],\"time\":[\"sqlx-macros-core/time\"],\"uuid\":[\"sqlx-macros-core/uuid\"]}}",
|
||||
"sqlx-mysql_0.9.0": "{\"dependencies\":[{\"name\":\"bigdecimal\",\"optional\":true,\"req\":\"^0.4.0\"},{\"default_features\":false,\"name\":\"bitflags\",\"req\":\"^2.4\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"byteorder\",\"req\":\"^1.4.3\"},{\"name\":\"bytes\",\"req\":\"^1.2.0\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.34\"},{\"name\":\"crc\",\"optional\":true,\"req\":\"^3.0.0\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"digest\",\"req\":\"^0.11.2\"},{\"default_features\":false,\"name\":\"dotenvy\",\"req\":\"^0.15.7\"},{\"name\":\"either\",\"req\":\"^1.6.1\"},{\"default_features\":false,\"name\":\"futures-core\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"features\":[\"alloc\",\"sink\",\"io\"],\"name\":\"futures-util\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"name\":\"generic-array\",\"req\":\"^0.14.4\"},{\"name\":\"log\",\"req\":\"^0.4.18\"},{\"name\":\"percent-encoding\",\"req\":\"^2.3.0\"},{\"default_features\":false,\"features\":[\"thread_rng\"],\"name\":\"rand\",\"optional\":true,\"req\":\"^0.10.1\"},{\"name\":\"rsa\",\"optional\":true,\"req\":\"^0.10.0-rc.18\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"rust_decimal\",\"optional\":true,\"req\":\"^1.36.0\"},{\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.219\"},{\"default_features\":false,\"name\":\"sha1\",\"req\":\"^0.11.0\"},{\"default_features\":false,\"name\":\"sha2\",\"req\":\"^0.11.0\"},{\"name\":\"sqlx-core\",\"req\":\"=0.9.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"req\":\"^2.0.18\"},{\"features\":[\"formatting\",\"parsing\",\"macros\"],\"name\":\"time\",\"optional\":true,\"req\":\"^0.3.47\"},{\"features\":[\"log\"],\"name\":\"tracing\",\"req\":\"^0.1.37\"},{\"name\":\"uuid\",\"optional\":true,\"req\":\"^1.12.1\"}],\"features\":{\"any\":[\"sqlx-core/any\"],\"bigdecimal\":[\"dep:bigdecimal\",\"sqlx-core/bigdecimal\"],\"chrono\":[\"dep:chrono\",\"sqlx-core/chrono\"],\"default\":[],\"json\":[\"sqlx-core/json\",\"serde\"],\"migrate\":[\"sqlx-core/migrate\",\"dep:crc\"],\"offline\":[\"sqlx-core/offline\",\"serde/derive\",\"bitflags/serde\"],\"rsa\":[\"dep:rand\",\"dep:rsa\"],\"rust_decimal\":[\"dep:rust_decimal\",\"rust_decimal/maths\",\"sqlx-core/rust_decimal\"],\"time\":[\"dep:time\",\"sqlx-core/time\"],\"uuid\":[\"dep:uuid\",\"sqlx-core/uuid\"]}}",
|
||||
"sqlx-postgres_0.9.0": "{\"dependencies\":[{\"name\":\"atoi\",\"req\":\"^2.0\"},{\"default_features\":false,\"features\":[\"alloc\"],\"name\":\"base64\",\"req\":\"^0.22.1\"},{\"name\":\"bigdecimal\",\"optional\":true,\"req\":\"^0.4.0\"},{\"name\":\"bit-vec\",\"optional\":true,\"req\":\"^0.8\"},{\"default_features\":false,\"name\":\"bitflags\",\"req\":\"^2.4\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"byteorder\",\"req\":\"^1.4.3\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.34\"},{\"name\":\"crc\",\"optional\":true,\"req\":\"^3.0.0\"},{\"default_features\":false,\"name\":\"dotenvy\",\"req\":\"^0.15.7\"},{\"name\":\"etcetera\",\"req\":\"^0.11.0\",\"target\":\"cfg(target_os = \\\"windows\\\")\"},{\"default_features\":false,\"features\":[\"sink\",\"alloc\",\"std\"],\"name\":\"futures-channel\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"name\":\"futures-core\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"features\":[\"alloc\",\"sink\",\"io\"],\"name\":\"futures-util\",\"req\":\"^0.3.32\"},{\"name\":\"hex\",\"req\":\"^0.4.3\"},{\"name\":\"hkdf\",\"req\":\"^0.13.0\"},{\"default_features\":false,\"name\":\"hmac\",\"req\":\"^0.13.0\"},{\"name\":\"ipnet\",\"optional\":true,\"req\":\"^2.3.0\"},{\"name\":\"ipnetwork\",\"optional\":true,\"req\":\"^0.21.1\"},{\"name\":\"itoa\",\"req\":\"^1.0.5\"},{\"name\":\"log\",\"req\":\"^0.4.18\"},{\"name\":\"mac_address\",\"optional\":true,\"req\":\"^1.1.5\"},{\"default_features\":false,\"name\":\"md-5\",\"req\":\"^0.11.0\"},{\"default_features\":false,\"name\":\"memchr\",\"req\":\"^2.5.0\"},{\"name\":\"num-bigint\",\"optional\":true,\"req\":\"^0.4.3\"},{\"default_features\":false,\"features\":[\"thread_rng\"],\"name\":\"rand\",\"req\":\"^0.10.1\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"rust_decimal\",\"optional\":true,\"req\":\"^1.36.0\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.219\"},{\"features\":[\"raw_value\"],\"name\":\"serde_json\",\"optional\":true,\"req\":\"^1.0.142\"},{\"default_features\":false,\"name\":\"sha2\",\"req\":\"^0.11.0\"},{\"name\":\"smallvec\",\"req\":\"^1.13.1\"},{\"name\":\"sqlx-core\",\"req\":\"=0.9.0\"},{\"name\":\"stringprep\",\"req\":\"^0.1.2\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"req\":\"^2.0.18\"},{\"features\":[\"formatting\",\"parsing\",\"macros\"],\"name\":\"time\",\"optional\":true,\"req\":\"^0.3.47\"},{\"features\":[\"log\"],\"name\":\"tracing\",\"req\":\"^0.1.37\"},{\"name\":\"uuid\",\"optional\":true,\"req\":\"^1.12.1\"},{\"default_features\":false,\"name\":\"whoami\",\"req\":\"^2.0.2\"}],\"features\":{\"any\":[\"sqlx-core/any\"],\"bigdecimal\":[\"dep:bigdecimal\",\"dep:num-bigint\",\"sqlx-core/bigdecimal\"],\"bit-vec\":[\"dep:bit-vec\",\"sqlx-core/bit-vec\"],\"chrono\":[\"dep:chrono\",\"sqlx-core/chrono\"],\"ipnet\":[\"dep:ipnet\",\"sqlx-core/ipnet\"],\"ipnetwork\":[\"dep:ipnetwork\",\"sqlx-core/ipnetwork\"],\"json\":[\"dep:serde\",\"dep:serde_json\",\"sqlx-core/json\"],\"mac_address\":[\"dep:mac_address\",\"sqlx-core/mac_address\"],\"migrate\":[\"sqlx-core/migrate\",\"dep:crc\"],\"offline\":[\"json\",\"sqlx-core/offline\",\"smallvec/serde\"],\"rust_decimal\":[\"dep:rust_decimal\",\"rust_decimal/maths\",\"sqlx-core/rust_decimal\"],\"time\":[\"dep:time\",\"sqlx-core/time\"],\"uuid\":[\"dep:uuid\",\"sqlx-core/uuid\"]}}",
|
||||
"sqlx-sqlite_0.9.0": "{\"dependencies\":[{\"name\":\"atoi\",\"req\":\"^2.0\"},{\"default_features\":false,\"features\":[\"std\",\"clock\"],\"name\":\"chrono\",\"optional\":true,\"req\":\"^0.4.34\"},{\"default_features\":false,\"features\":[\"async\"],\"name\":\"flume\",\"req\":\"^0.12.0\"},{\"name\":\"form_urlencoded\",\"req\":\"^1.2.2\"},{\"default_features\":false,\"features\":[\"sink\",\"alloc\",\"std\"],\"name\":\"futures-channel\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"name\":\"futures-core\",\"req\":\"^0.3.32\"},{\"name\":\"futures-executor\",\"req\":\"^0.3.32\"},{\"name\":\"futures-intrusive\",\"req\":\"^0.5.0\"},{\"default_features\":false,\"features\":[\"alloc\",\"sink\"],\"name\":\"futures-util\",\"req\":\"^0.3.32\"},{\"default_features\":false,\"features\":[\"pkg-config\",\"vcpkg\"],\"name\":\"libsqlite3-sys\",\"req\":\">=0.30.1, <0.38.0\"},{\"name\":\"log\",\"req\":\"^0.4.18\"},{\"name\":\"percent-encoding\",\"req\":\"^2.3.0\"},{\"name\":\"regex\",\"optional\":true,\"req\":\"^1.6.0\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.219\"},{\"name\":\"sqlx-core\",\"req\":\"=0.9.0\"},{\"default_features\":false,\"features\":[\"std\"],\"name\":\"thiserror\",\"req\":\"^2.0.18\"},{\"features\":[\"formatting\",\"parsing\",\"macros\"],\"name\":\"time\",\"optional\":true,\"req\":\"^0.3.47\"},{\"features\":[\"log\"],\"name\":\"tracing\",\"req\":\"^0.1.37\"},{\"name\":\"url\",\"req\":\"^2.2.2\"},{\"name\":\"uuid\",\"optional\":true,\"req\":\"^1.12.1\"}],\"features\":{\"_unstable-all-sqlite-features\":[\"deserialize\",\"load-extension\",\"preupdate-hook\",\"unlock-notify\"],\"_unstable-all-types\":[\"json\",\"chrono\",\"time\",\"uuid\"],\"_unstable-docs\":[\"bundled\",\"any\",\"_unstable-all-types\",\"_unstable-all-sqlite-features\"],\"any\":[\"sqlx-core/any\"],\"bigdecimal\":[],\"bundled\":[\"libsqlite3-sys/bundled\"],\"chrono\":[\"dep:chrono\",\"sqlx-core/chrono\"],\"deserialize\":[],\"json\":[\"sqlx-core/json\",\"serde\"],\"load-extension\":[],\"migrate\":[\"sqlx-core/migrate\"],\"offline\":[\"sqlx-core/offline\",\"serde\"],\"preupdate-hook\":[\"libsqlite3-sys/preupdate_hook\"],\"regexp\":[\"dep:regex\"],\"rust_decimal\":[],\"sqlx-toml\":[\"sqlx-core/sqlx-toml\"],\"time\":[\"dep:time\",\"sqlx-core/time\"],\"unbundled\":[\"libsqlite3-sys/buildtime_bindgen\"],\"unlock-notify\":[\"libsqlite3-sys/unlock_notify\"],\"uuid\":[\"dep:uuid\",\"sqlx-core/uuid\"]}}",
|
||||
"sqlx_0.9.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1.0.58\"},{\"features\":[\"attributes\"],\"kind\":\"dev\",\"name\":\"async-std\",\"req\":\"^1.13\"},{\"features\":[\"async_tokio\"],\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.5.1\"},{\"kind\":\"dev\",\"name\":\"dotenvy\",\"req\":\"^0.15.7\"},{\"kind\":\"dev\",\"name\":\"env_logger\",\"req\":\"^0.11\"},{\"default_features\":false,\"features\":[\"alloc\"],\"kind\":\"dev\",\"name\":\"futures-util\",\"req\":\"^0.3.32\"},{\"kind\":\"dev\",\"name\":\"hex\",\"req\":\"^0.4.3\"},{\"kind\":\"dev\",\"name\":\"libsqlite3-sys\",\"req\":\"^0.37.0\"},{\"features\":[\"bundled-sqlcipher\"],\"kind\":\"dev\",\"name\":\"libsqlite3-sys\",\"req\":\"^0.37.0\",\"target\":\"cfg(sqlite_test_sqlcipher)\"},{\"kind\":\"dev\",\"name\":\"paste\",\"req\":\"^1.0.6\"},{\"default_features\":false,\"features\":[\"thread_rng\"],\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.10.1\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0.219\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.142\"},{\"features\":[\"migrate\"],\"name\":\"sqlx-core\",\"req\":\"=0.9.0\"},{\"name\":\"sqlx-macros\",\"optional\":true,\"req\":\"=0.9.0\"},{\"default_features\":false,\"name\":\"sqlx-mysql\",\"optional\":true,\"req\":\"=0.9.0\"},{\"name\":\"sqlx-postgres\",\"optional\":true,\"req\":\"=0.9.0\"},{\"name\":\"sqlx-sqlite\",\"optional\":true,\"req\":\"=0.9.0\"},{\"kind\":\"dev\",\"name\":\"tempfile\",\"req\":\"^3.10.1\"},{\"kind\":\"dev\",\"name\":\"time_\",\"package\":\"time\",\"req\":\"^0.3.47\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.25.0\"},{\"kind\":\"dev\",\"name\":\"trybuild\",\"req\":\"^1.0.53\"},{\"kind\":\"dev\",\"name\":\"url\",\"req\":\"^2.2.2\"}],\"features\":{\"_rt-async-global-executor\":[],\"_rt-async-std\":[],\"_rt-smol\":[],\"_rt-tokio\":[],\"_sqlite\":[],\"_unstable-all-types\":[\"bigdecimal\",\"rust_decimal\",\"json\",\"time\",\"chrono\",\"ipnet\",\"ipnetwork\",\"mac_address\",\"uuid\",\"bit-vec\",\"bstr\"],\"_unstable-docs\":[\"all-databases\",\"_unstable-all-types\",\"sqlx-sqlite/_unstable-docs\"],\"all-databases\":[\"mysql\",\"sqlite\",\"postgres\",\"any\"],\"any\":[\"sqlx-core/any\",\"sqlx-mysql?/any\",\"sqlx-postgres?/any\",\"sqlx-sqlite?/any\"],\"bigdecimal\":[\"sqlx-core/bigdecimal\",\"sqlx-macros?/bigdecimal\",\"sqlx-mysql?/bigdecimal\",\"sqlx-postgres?/bigdecimal\"],\"bit-vec\":[\"sqlx-core/bit-vec\",\"sqlx-macros?/bit-vec\",\"sqlx-postgres?/bit-vec\"],\"bstr\":[\"sqlx-core/bstr\"],\"chrono\":[\"sqlx-core/chrono\",\"sqlx-macros?/chrono\",\"sqlx-mysql?/chrono\",\"sqlx-postgres?/chrono\",\"sqlx-sqlite?/chrono\"],\"default\":[\"any\",\"macros\",\"migrate\",\"json\"],\"derive\":[\"sqlx-macros/derive\"],\"ipnet\":[\"sqlx-core/ipnet\",\"sqlx-macros?/ipnet\",\"sqlx-postgres?/ipnet\"],\"ipnetwork\":[\"sqlx-core/ipnetwork\",\"sqlx-macros?/ipnetwork\",\"sqlx-postgres?/ipnetwork\"],\"json\":[\"sqlx-core/json\",\"sqlx-macros?/json\",\"sqlx-mysql?/json\",\"sqlx-postgres?/json\",\"sqlx-sqlite?/json\"],\"mac_address\":[\"sqlx-core/mac_address\",\"sqlx-macros?/mac_address\",\"sqlx-postgres?/mac_address\"],\"macros\":[\"derive\",\"sqlx-macros/macros\",\"sqlx-core/offline\",\"sqlx-mysql?/offline\",\"sqlx-postgres?/offline\",\"sqlx-sqlite?/offline\"],\"migrate\":[\"sqlx-core/migrate\",\"sqlx-macros?/migrate\",\"sqlx-mysql?/migrate\",\"sqlx-postgres?/migrate\",\"sqlx-sqlite?/migrate\"],\"mysql\":[\"sqlx-mysql\",\"sqlx-macros?/mysql\"],\"mysql-rsa\":[\"mysql\",\"sqlx-mysql/rsa\",\"sqlx-macros?/mysql-rsa\"],\"postgres\":[\"sqlx-postgres\",\"sqlx-macros?/postgres\"],\"regexp\":[\"sqlx-sqlite?/regexp\"],\"runtime-async-global-executor\":[\"_rt-async-global-executor\",\"sqlx-core/_rt-async-global-executor\",\"sqlx-macros?/_rt-async-global-executor\"],\"runtime-async-std\":[\"_rt-async-std\",\"sqlx-core/_rt-async-std\",\"sqlx-macros?/_rt-async-std\"],\"runtime-smol\":[\"_rt-smol\",\"sqlx-core/_rt-smol\",\"sqlx-macros?/_rt-smol\"],\"runtime-tokio\":[\"_rt-tokio\",\"sqlx-core/_rt-tokio\",\"sqlx-macros?/_rt-tokio\"],\"rust_decimal\":[\"sqlx-core/rust_decimal\",\"sqlx-macros?/rust_decimal\",\"sqlx-mysql?/rust_decimal\",\"sqlx-postgres?/rust_decimal\"],\"sqlite\":[\"sqlite-bundled\",\"sqlite-deserialize\",\"sqlite-load-extension\",\"sqlite-unlock-notify\"],\"sqlite-bundled\":[\"_sqlite\",\"sqlx-sqlite/bundled\",\"sqlx-macros?/sqlite\"],\"sqlite-deserialize\":[\"sqlx-sqlite/deserialize\"],\"sqlite-load-extension\":[\"sqlx-sqlite/load-extension\",\"sqlx-macros?/sqlite-load-extension\"],\"sqlite-preupdate-hook\":[\"sqlx-sqlite/preupdate-hook\"],\"sqlite-unbundled\":[\"_sqlite\",\"sqlx-sqlite/unbundled\",\"sqlx-macros?/sqlite-unbundled\"],\"sqlite-unlock-notify\":[\"sqlx-sqlite/unlock-notify\"],\"sqlx-toml\":[\"sqlx-core/sqlx-toml\",\"sqlx-macros?/sqlx-toml\",\"sqlx-sqlite?/sqlx-toml\"],\"time\":[\"sqlx-core/time\",\"sqlx-macros?/time\",\"sqlx-mysql?/time\",\"sqlx-postgres?/time\",\"sqlx-sqlite?/time\Line truncated
|
||||
"sse-stream_0.2.5": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1\"},{\"features\":[\"tracing\"],\"kind\":\"dev\",\"name\":\"axum\",\"req\":\"^0.8\"},{\"name\":\"bytes\",\"req\":\"^1\"},{\"name\":\"futures-util\",\"req\":\"^0.3\"},{\"name\":\"http-body\",\"req\":\"^1\"},{\"name\":\"http-body-util\",\"req\":\"^0.1\"},{\"features\":[\"client\",\"http1\"],\"kind\":\"dev\",\"name\":\"hyper\",\"req\":\"^1\"},{\"features\":[\"tokio\"],\"kind\":\"dev\",\"name\":\"hyper-util\",\"req\":\"^0.1\"},{\"name\":\"pin-project-lite\",\"req\":\"^0.2\"},{\"features\":[\"stream\"],\"kind\":\"dev\",\"name\":\"reqwest\",\"req\":\"^0.12\"},{\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1\"},{\"features\":[\"io\"],\"kind\":\"dev\",\"name\":\"tokio-util\",\"req\":\"^0.7\"},{\"name\":\"tracing\",\"optional\":true,\"req\":\"^0.1\"},{\"kind\":\"dev\",\"name\":\"tracing\",\"req\":\"^0.1\"},{\"features\":[\"env-filter\",\"std\",\"fmt\"],\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"}],\"features\":{\"default\":[],\"tracing\":[\"dep:tracing\"]}}",
|
||||
"stable_deref_trait_1.2.1": "{\"dependencies\":[],\"features\":{\"alloc\":[],\"default\":[\"std\"],\"std\":[\"alloc\"]}}",
|
||||
@@ -2132,8 +2136,10 @@
|
||||
"tikv-jemalloc-sys_0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8": "{\"dependencies\":[{\"kind\":\"build\",\"name\":\"cc\",\"req\":\"^1.0.13\"},{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.8\"}],\"features\":{\"background_threads\":[\"background_threads_runtime_support\"],\"background_threads_runtime_support\":[],\"debug\":[],\"default\":[\"background_threads_runtime_support\"],\"disable_cache_oblivious\":[],\"disable_initial_exec_tls\":[],\"override_allocator_on_supported_platforms\":[\"unprefixed_malloc_on_supported_platforms\"],\"profiling\":[],\"profiling_libunwind\":[\"profiling\"],\"stats\":[],\"unprefixed_malloc_on_supported_platforms\":[]}}",
|
||||
"tikv-jemallocator_0.7.0": "{\"dependencies\":[{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.8\"},{\"kind\":\"dev\",\"name\":\"paste\",\"req\":\"^1\"},{\"default_features\":false,\"name\":\"tikv-jemalloc-sys\",\"req\":\"^0.7.0\"}],\"features\":{\"alloc_trait\":[],\"background_threads\":[\"tikv-jemalloc-sys/background_threads\"],\"background_threads_runtime_support\":[\"tikv-jemalloc-sys/background_threads_runtime_support\"],\"debug\":[\"tikv-jemalloc-sys/debug\"],\"default\":[\"background_threads_runtime_support\"],\"disable_cache_oblivious\":[\"tikv-jemalloc-sys/disable_cache_oblivious\"],\"disable_initial_exec_tls\":[\"tikv-jemalloc-sys/disable_initial_exec_tls\"],\"override_allocator_on_supported_platforms\":[\"unprefixed_malloc_on_supported_platforms\",\"tikv-jemalloc-sys/override_allocator_on_supported_platforms\"],\"profiling\":[\"tikv-jemalloc-sys/profiling\"],\"profiling_libunwind\":[\"tikv-jemalloc-sys/profiling_libunwind\",\"profiling\"],\"stats\":[\"tikv-jemalloc-sys/stats\"],\"unprefixed_malloc_on_supported_platforms\":[\"tikv-jemalloc-sys/unprefixed_malloc_on_supported_platforms\"]}}",
|
||||
"time-core_0.1.8": "{\"dependencies\":[],\"features\":{\"large-dates\":[]}}",
|
||||
"time-macros_0.2.27": "{\"dependencies\":[{\"name\":\"num-conv\",\"req\":\"^0.2.0\"},{\"name\":\"time-core\",\"req\":\"=0.1.8\"}],\"features\":{\"formatting\":[],\"large-dates\":[],\"parsing\":[],\"serde\":[]}}",
|
||||
"time-core_0.1.9": "{\"dependencies\":[],\"features\":{\"large-dates\":[]}}",
|
||||
"time-macros_0.2.32": "{\"dependencies\":[{\"name\":\"num-conv\",\"req\":\"^0.2.2\"},{\"name\":\"time-core\",\"req\":\"=0.1.9\"}],\"features\":{\"formatting\":[],\"large-dates\":[],\"parsing\":[],\"serde\":[]}}",
|
||||
"time_0.3.47": "{\"dependencies\":[{\"default_features\":false,\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.8.1\",\"target\":\"cfg(bench)\"},{\"features\":[\"powerfmt\"],\"name\":\"deranged\",\"req\":\"^0.5.2\"},{\"name\":\"itoa\",\"optional\":true,\"req\":\"^1.0.1\"},{\"name\":\"js-sys\",\"optional\":true,\"req\":\"^0.3.58\",\"target\":\"cfg(all(target_family = \\\"wasm\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))\"},{\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.98\",\"target\":\"cfg(target_family = \\\"unix\\\")\"},{\"name\":\"num-conv\",\"req\":\"^0.2.0\"},{\"kind\":\"dev\",\"name\":\"num-conv\",\"req\":\"^0.2.0\"},{\"name\":\"num_threads\",\"optional\":true,\"req\":\"^0.1.2\",\"target\":\"cfg(target_family = \\\"unix\\\")\"},{\"default_features\":false,\"name\":\"powerfmt\",\"req\":\"^0.2.0\"},{\"default_features\":false,\"name\":\"quickcheck\",\"optional\":true,\"req\":\"^1.0.3\"},{\"kind\":\"dev\",\"name\":\"quickcheck_macros\",\"req\":\"^1.0.0\"},{\"default_features\":false,\"name\":\"rand08\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"rand08\",\"package\":\"rand\",\"req\":\"^0.8.4\"},{\"default_features\":false,\"name\":\"rand09\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.9.2\"},{\"default_features\":false,\"features\":[\"small_rng\"],\"kind\":\"dev\",\"name\":\"rand09\",\"package\":\"rand\",\"req\":\"^0.9.2\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"rstest\",\"req\":\"^0.26.1\"},{\"kind\":\"dev\",\"name\":\"rstest_reuse\",\"req\":\"^0.7.0\"},{\"default_features\":false,\"features\":[\"derive\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0.184\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.68\"},{\"kind\":\"dev\",\"name\":\"serde_test\",\"req\":\"^1.0.126\"},{\"name\":\"time-core\",\"req\":\"=0.1.8\"},{\"name\":\"time-macros\",\"optional\":true,\"req\":\"=0.2.27\"},{\"kind\":\"dev\",\"name\":\"time-macros\",\"req\":\"=0.2.27\"},{\"kind\":\"dev\",\"name\":\"trybuild\",\"req\":\"^1.0.102\",\"target\":\"cfg(__ui_tests)\"}],\"features\":{\"alloc\":[\"serde_core?/alloc\"],\"default\":[\"std\"],\"formatting\":[\"dep:itoa\",\"std\",\"time-macros?/formatting\"],\"large-dates\":[\"time-core/large-dates\",\"time-macros?/large-dates\"],\"local-offset\":[\"std\",\"dep:libc\",\"dep:num_threads\"],\"macros\":[\"dep:time-macros\"],\"parsing\":[\"time-macros?/parsing\"],\"quickcheck\":[\"dep:quickcheck\",\"alloc\",\"deranged/quickcheck\"],\"rand\":[\"rand08\",\"rand09\"],\"rand08\":[\"dep:rand08\",\"deranged/rand08\"],\"rand09\":[\"dep:rand09\",\"deranged/rand09\"],\"serde\":[\"dep:serde_core\",\"time-macros?/serde\",\"deranged/serde\"],\"serde-human-readable\":[\"serde\",\"formatting\",\"parsing\"],\"serde-well-known\":[\"serde\",\"formatting\",\"parsing\"],\"std\":[\"alloc\"],\"wasm-bindgen\":[\"dep:js-sys\"]}}",
|
||||
"time_0.3.55": "{\"dependencies\":[{\"default_features\":false,\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.8.1\",\"target\":\"cfg(bench)\"},{\"name\":\"deranged\",\"req\":\"^0.5.8\"},{\"name\":\"js-sys\",\"optional\":true,\"req\":\"^0.3.58\",\"target\":\"cfg(all(target_family = \\\"wasm\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))\"},{\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.98\",\"target\":\"cfg(target_family = \\\"unix\\\")\"},{\"name\":\"num-conv\",\"req\":\"^0.2.2\"},{\"kind\":\"dev\",\"name\":\"num-conv\",\"req\":\"^0.2.2\"},{\"name\":\"num_threads\",\"optional\":true,\"req\":\"^0.1.2\",\"target\":\"cfg(target_family = \\\"unix\\\")\"},{\"default_features\":false,\"name\":\"powerfmt\",\"req\":\"^0.2.0\"},{\"default_features\":false,\"name\":\"quickcheck\",\"optional\":true,\"req\":\"^1.0.3\"},{\"kind\":\"dev\",\"name\":\"quickcheck_macros\",\"req\":\"^1.0.0\"},{\"default_features\":false,\"name\":\"rand010\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.10.1\"},{\"default_features\":false,\"name\":\"rand08\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.8.6\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"rand08\",\"package\":\"rand\",\"req\":\"^0.8.6\"},{\"default_features\":false,\"name\":\"rand09\",\"optional\":true,\"package\":\"rand\",\"req\":\"^0.9.4\"},{\"default_features\":false,\"features\":[\"small_rng\"],\"kind\":\"dev\",\"name\":\"rand09\",\"package\":\"rand\",\"req\":\"^0.9.4\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"rstest\",\"req\":\"^0.26.1\"},{\"kind\":\"dev\",\"name\":\"rstest_reuse\",\"req\":\"^0.7.0\"},{\"default_features\":false,\"features\":[\"derive\",\"alloc\"],\"kind\":\"dev\",\"name\":\"serde\",\"req\":\"^1.0.184\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.68\"},{\"kind\":\"dev\",\"name\":\"serde_test2\",\"req\":\"^2.0.0\"},{\"name\":\"time-core\",\"req\":\"=0.1.9\"},{\"name\":\"time-macros\",\"optional\":true,\"req\":\"=0.2.32\"},{\"kind\":\"dev\",\"name\":\"time-macros\",\"req\":\"=0.2.32\"},{\"kind\":\"dev\",\"name\":\"trybuild\",\"req\":\"^1.0.102\",\"target\":\"cfg(__ui_tests)\"}],\"features\":{\"alloc\":[\"serde_core?/alloc\"],\"default\":[\"std\"],\"formatting\":[\"std\",\"time-macros?/formatting\"],\"large-dates\":[\"time-core/large-dates\",\"time-macros?/large-dates\"],\"local-offset\":[\"std\",\"dep:libc\",\"dep:num_threads\"],\"macros\":[\"dep:time-macros\"],\"parsing\":[\"time-macros?/parsing\"],\"quickcheck\":[\"dep:quickcheck\",\"alloc\",\"deranged/quickcheck\"],\"rand\":[\"rand08\",\"rand09\",\"rand010\"],\"rand010\":[\"dep:rand010\",\"deranged/rand010\"],\"rand08\":[\"dep:rand08\",\"deranged/rand08\"],\"rand09\":[\"dep:rand09\",\"deranged/rand09\"],\"serde\":[\"dep:serde_core\",\"time-macros?/serde\",\"deranged/serde\"],\"serde-human-readable\":[\"serde\",\"formatting\",\"parsing\"],\"serde-well-known\":[\"serde\",\"formatting\",\"parsing\"],\"std\":[\"alloc\"],\"wasm-bindgen\":[\"dep:js-sys\"]}}",
|
||||
"timezone_provider_0.2.3": "{\"dependencies\":[{\"name\":\"combine\",\"optional\":true,\"req\":\"^4.6.7\"},{\"features\":[\"derive\"],\"name\":\"databake\",\"optional\":true,\"req\":\"^0.2.0\"},{\"features\":[\"compiled_data\"],\"kind\":\"dev\",\"name\":\"icu_time\",\"req\":\"^2\"},{\"name\":\"jiff-tzdb\",\"optional\":true,\"req\":\"^0.1.4\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.225\"},{\"name\":\"serde_json\",\"optional\":true,\"req\":\"^1.0.145\"},{\"features\":[\"zerovec\"],\"name\":\"tinystr\",\"req\":\"^0.8.0\"},{\"name\":\"tzif\",\"optional\":true,\"req\":\"^0.4.0\"},{\"features\":[\"derive\"],\"name\":\"yoke\",\"optional\":true,\"req\":\"^0.8.0\"},{\"name\":\"zerofrom\",\"optional\":true,\"req\":\"^0.1.6\"},{\"name\":\"zerotrie\",\"req\":\"^0.2.0\"},{\"features\":[\"derive\",\"alloc\"],\"name\":\"zerovec\",\"req\":\"^0.11.0\"},{\"name\":\"zoneinfo64\",\"optional\":true,\"req\":\"^0.3.0\"},{\"default_features\":false,\"features\":[\"std\",\"unstable\"],\"name\":\"zoneinfo_rs\",\"optional\":true,\"req\":\"^0.1.0\"}],\"features\":{\"datagen\":[\"std\",\"dep:serde\",\"dep:databake\",\"dep:yoke\",\"dep:serde_json\",\"tinystr/serde\",\"tinystr/databake\",\"zerotrie/serde\",\"zerotrie/databake\",\"zerovec/serde\",\"zerovec/databake\",\"zerovec/derive\",\"dep:zoneinfo_rs\",\"experimental_tzif\"],\"default\":[],\"experimental_tzif\":[\"dep:zerofrom\",\"zerofrom/derive\"],\"std\":[],\"tzif\":[\"dep:tzif\",\"dep:jiff-tzdb\",\"dep:combine\",\"std\"],\"zoneinfo64\":[\"dep:zoneinfo64\"]}}",
|
||||
"tiny_http_0.12.0": "{\"dependencies\":[{\"name\":\"ascii\",\"req\":\"^1.0\"},{\"name\":\"chunked_transfer\",\"req\":\"^1\"},{\"kind\":\"dev\",\"name\":\"fdlimit\",\"req\":\"^0.1\"},{\"name\":\"httpdate\",\"req\":\"^1.0.2\"},{\"name\":\"log\",\"req\":\"^0.4.4\"},{\"name\":\"openssl\",\"optional\":true,\"req\":\"^0.10\"},{\"kind\":\"dev\",\"name\":\"rustc-serialize\",\"req\":\"^0.3\"},{\"name\":\"rustls\",\"optional\":true,\"req\":\"^0.20\"},{\"name\":\"rustls-pemfile\",\"optional\":true,\"req\":\"^0.2.1\"},{\"kind\":\"dev\",\"name\":\"sha1\",\"req\":\"^0.6.0\"},{\"name\":\"zeroize\",\"optional\":true,\"req\":\"^1\"}],\"features\":{\"default\":[],\"ssl\":[\"ssl-openssl\"],\"ssl-openssl\":[\"openssl\",\"zeroize\"],\"ssl-rustls\":[\"rustls\",\"rustls-pemfile\",\"zeroize\"]}}",
|
||||
"tinystr_0.8.3": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"bincode\",\"req\":\"^1.3.1\"},{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.5.0\",\"target\":\"cfg(not(target_arch = \\\"wasm32\\\"))\"},{\"default_features\":false,\"name\":\"databake\",\"optional\":true,\"req\":\"^0.2.0\"},{\"default_features\":false,\"name\":\"displaydoc\",\"req\":\"^0.2.3\"},{\"default_features\":false,\"features\":[\"use-std\"],\"kind\":\"dev\",\"name\":\"postcard\",\"req\":\"^1.0.3\"},{\"features\":[\"small_rng\"],\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.9\"},{\"default_features\":false,\"name\":\"serde_core\",\"optional\":true,\"req\":\"^1.0.220\"},{\"features\":[\"alloc\"],\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.45\"},{\"default_features\":false,\"name\":\"zerovec\",\"optional\":true,\"req\":\"^0.11.6\"}],\"features\":{\"alloc\":[\"serde_core?/alloc\",\"zerovec?/alloc\"],\"databake\":[\"dep:databake\"],\"default\":[\"alloc\"],\"serde\":[\"dep:serde_core\"],\"std\":[],\"zerovec\":[\"dep:zerovec\"]}}",
|
||||
@@ -2479,6 +2485,7 @@
|
||||
"rust-std-1.95.0-powerpc64-unknown-linux-gnu.tar.xz": "cc7fb9aa289ff1756502ae16a05e2885289165f01ed94a7c2db6576b3dae74a6",
|
||||
"rust-std-1.95.0-powerpc64le-unknown-linux-gnu.tar.xz": "2370d9266051a0b23346d42e43a00f91b2daff22a963fb03e28ae50cb0b76c50",
|
||||
"rust-std-1.95.0-powerpc64le-unknown-linux-musl.tar.xz": "0362ba4ecfe0bb508f0d2b064c6fbbfe72604d5ae1989d6a8a7b4fe5ff1889f1",
|
||||
"rust-std-1.95.0-riscv32imac-unknown-none-elf.tar.xz": "09d568f3f445670917ee9aeb3a86374dae760da8a92d4bfecde88af7fe0bd6ad",
|
||||
"rust-std-1.95.0-riscv32imc-unknown-none-elf.tar.xz": "04befebf3b15372dacb7e6c0fcdab842c17a63ea58bf2f4cdccd7182ae9195c6",
|
||||
"rust-std-1.95.0-riscv64gc-unknown-linux-gnu.tar.xz": "50fe7869e166bb4c990a0e1664366b1ffdbe669664b7663cd03c079bd0efdcac",
|
||||
"rust-std-1.95.0-riscv64gc-unknown-linux-musl.tar.xz": "e01bdbf5d6fa3e529671d49e87ba81dc9612101144f3ee5a0e1de3c48f27b47c",
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
LOCAL_RUST_BIN := $(CURDIR)/build/toolchain/bin
|
||||
CARGO ?= $(if $(wildcard $(LOCAL_RUST_BIN)/cargo),$(LOCAL_RUST_BIN)/cargo,cargo)
|
||||
RUSTC ?= $(if $(wildcard $(LOCAL_RUST_BIN)/rustc),$(LOCAL_RUST_BIN)/rustc,rustc)
|
||||
ZIRAN ?= ziran
|
||||
export CARGO_HOME := $(CURDIR)/build/cargo-home
|
||||
export CARGO_TARGET_DIR := $(CURDIR)/codex-rs/target
|
||||
export XCODER_RUNTIME_DIR := $(CURDIR)/build/native-runtime
|
||||
export RUSTC ZIRAN
|
||||
export CARGO_BUILD_JOBS ?= 1
|
||||
# `local` (default) skips LTO for fast builds; published releases use `release`.
|
||||
export XCODER_CARGO_PROFILE ?= local
|
||||
# UI plugins retain their separate JavaScript sandbox; tool execution is native.
|
||||
UI_FEATURES ?=
|
||||
CARGO_FEATURE_FLAGS := $(if $(UI_FEATURES),--features $(UI_FEATURES),)
|
||||
BACKGROUND_BUILD := python3 scripts/low-priority-build.py
|
||||
|
||||
.PHONY: all native-test native-test-build prebuild-tests test runtime-check install
|
||||
all:
|
||||
mkdir -p build/bin
|
||||
$(BACKGROUND_BUILD) $(CARGO) build --manifest-path codex-rs/Cargo.toml --profile $(XCODER_CARGO_PROFILE) -p codex-cli -p codex-code-mode-host $(CARGO_FEATURE_FLAGS)
|
||||
python3 scripts/package-xcoder.py
|
||||
|
||||
native-test-build:
|
||||
mkdir -p build/native-dispatch
|
||||
$(ZIRAN) build --project --target=c -o build/native-dispatch native/dispatch.zi
|
||||
$(CC) -O3 -std=c99 -c build/native-dispatch/dispatch.c -I build/native-dispatch -o build/native-dispatch/dispatch.o
|
||||
$(AR) rcs build/native-dispatch/libxcoder_dispatch.a build/native-dispatch/dispatch.o
|
||||
$(BACKGROUND_BUILD) $(RUSTC) --edition=2024 --test tests/native_abi.rs -L build/native-dispatch -l static=xcoder_dispatch -o build/native-dispatch/native-abi-test
|
||||
$(BACKGROUND_BUILD) $(RUSTC) --edition=2024 --test tests/native_allocator.rs -o build/native-dispatch/native-allocator-test
|
||||
rm -rf build/native-idle && mkdir -p build/native-idle
|
||||
$(ZIRAN) build --project --target=c -o build/native-idle native/idle.zi
|
||||
$(CC) -O3 -std=c99 -c build/native-idle/idle.c -I build/native-idle -o build/native-idle/idle.o
|
||||
$(AR) rcs build/native-idle/libxcoder_idle.a build/native-idle/idle.o
|
||||
$(BACKGROUND_BUILD) $(RUSTC) --edition=2024 --test tests/native_idle.rs -L build/native-idle -l static=xcoder_idle -o build/native-dispatch/native-idle-test
|
||||
|
||||
native-test: native-test-build
|
||||
build/native-dispatch/native-abi-test
|
||||
build/native-dispatch/native-allocator-test
|
||||
build/native-dispatch/native-idle-test
|
||||
XCODER_ZIRAN_TOOLCHAIN="$$($(ZIRAN) pkg path ziran)" python3 tests/native_cell_test.py
|
||||
|
||||
prebuild-tests: native-test-build
|
||||
$(BACKGROUND_BUILD) python3 scripts/prebuild-tests.py --cargo "$(CARGO)"
|
||||
|
||||
runtime-check:
|
||||
$(BACKGROUND_BUILD) $(CARGO) check --manifest-path codex-rs/Cargo.toml -p codex-code-mode-runtime
|
||||
|
||||
test:
|
||||
$(BACKGROUND_BUILD) python3 scripts/test-xcoder.py --cargo "$(CARGO)" --ui-features "$(UI_FEATURES)"
|
||||
|
||||
install:
|
||||
python3 scripts/install-xcoder.py
|
||||
|
||||
JAVASCRIPT_HOST ?= $(HOME)/.codex/packages/standalone/current/bin/codex-code-mode-host.javascript
|
||||
JAVASCRIPT_CLI ?= $(HOME)/.codex/packages/standalone/current/bin/codex-upstream
|
||||
.PHONY: benchmark-source benchmark-plan benchmark-fuzzy benchmark-memory benchmark-apply-patch
|
||||
benchmark-json:
|
||||
python3 scripts/benchmark-runtime.py --native-host build/bin/codex-code-mode-host --javascript-host "$(JAVASCRIPT_HOST)" --diagnose-json
|
||||
benchmark-source:
|
||||
python3 scripts/benchmark-runtime.py --native-host build/bin/codex-code-mode-host --native-cli build/bin/xcoder --javascript-host "$(JAVASCRIPT_HOST)" --javascript-cli "$(JAVASCRIPT_CLI)" --native-mode source
|
||||
benchmark-plan:
|
||||
python3 scripts/benchmark-runtime.py --native-host build/bin/codex-code-mode-host --native-cli build/bin/xcoder --javascript-host "$(JAVASCRIPT_HOST)" --javascript-cli "$(JAVASCRIPT_CLI)" --native-mode plan
|
||||
# A long offline session: memory per tool call, the idle footprint, and the
|
||||
# footprint and wake time after the idle release.
|
||||
benchmark-memory:
|
||||
python3 scripts/benchmark-memory.py --cli build/bin/xcoder --calls 150 --idle-seconds 5 --release-wait 30 --environment XCODER_IDLE_RELEASE_SECONDS=15 --output build/memory/benchmark.json
|
||||
benchmark-apply-patch:
|
||||
$(CARGO) test --manifest-path codex-rs/Cargo.toml --release -p codex-apply-patch --lib -- --ignored --nocapture bench
|
||||
benchmark-fuzzy:
|
||||
$(CARGO) run --manifest-path codex-rs/Cargo.toml --release -p codex-utils-fuzzy-match --example fuzzy_bench
|
||||
|
||||
.PHONY: mermaid-test
|
||||
MERMAID_LOCKED := $(if $(wildcard ziran.local.toml),,--locked)
|
||||
mermaid-test:
|
||||
$(MAKE) -C "$$($(ZIRAN) pkg path mermaid $(MERMAID_LOCKED))" test ZIRAN="$(ZIRAN)"
|
||||
$(BACKGROUND_BUILD) $(CARGO) test --manifest-path codex-rs/Cargo.toml -p codex-mermaid --lib
|
||||
@@ -1,6 +1,11 @@
|
||||
OpenAI Codex
|
||||
Copyright 2025 OpenAI
|
||||
|
||||
Xcoder fork modifications
|
||||
Copyright 2026 Waozi <[email protected]>
|
||||
This fork changes tool orchestration to native Ziran/Zi2c execution with
|
||||
embedded Rust supervision. The original license and upstream notices remain.
|
||||
|
||||
This project includes code derived from [Ratatui](https://github.com/ratatui/ratatui), licensed under the MIT license.
|
||||
Copyright (c) 2016-2022 Florian Dehau
|
||||
Copyright (c) 2023-2025 The Ratatui Developers
|
||||
@@ -1,3 +1,78 @@
|
||||
## Xcoder
|
||||
|
||||
For automatic Linux builds and downloads, see
|
||||
[Xcoder Linux](https://github.com/waozixyz/xcoder/actions/workflows/xcoder-linux.yml).
|
||||
|
||||
Xcoder is Waozi's source fork of OpenAI Codex, under the original Apache 2.0
|
||||
license. Tool orchestration uses Ziran compiled through Zi2c. Ordinary plans run
|
||||
through an executor linked into Rust, without a compiler or child process.
|
||||
Custom Ziran cells compile on a cache miss and reuse private cached executables.
|
||||
The Rust session
|
||||
and approval protocols remain the authority for host operations. JavaScript
|
||||
tool cells have no execution path in this fork. Sessions share the Rust process;
|
||||
only custom native cells start sandboxed children. Ordinary tool calls do not
|
||||
start a separate code-mode host. The optional JavaScript UI plugin renderer is
|
||||
excluded from the default build (`UI_FEATURES=codex-code-mode-runtime/ui` enables
|
||||
it when the corresponding upstream V8 artifacts are available).
|
||||
|
||||
The initial native backend targets Linux with bubblewrap, a C compiler, Rust
|
||||
1.95 and a built Ziran toolchain. `ziran lock` resolves the pinned toolchain;
|
||||
local development uses an ignored `ziran.local.toml` override.
|
||||
The Make targets run Rust work at nice 19 and the lowest best-effort I/O priority, with one
|
||||
Cargo job by default (set `CARGO_BUILD_JOBS` to use more). They add no memory limit of their
|
||||
own; run them under a build queue or scope that sizes memory for the machine. Completed
|
||||
artifacts are reused when a build is resumed.
|
||||
|
||||
Run `make test` for Rust/C ABI, Ziran-backed Mermaid and fuzzy-match, native
|
||||
sandbox, callback, host transport and offline full-CLI local tests. The CLI fixture runs a real shell tool through the
|
||||
embedded supervisor without contacting an external model service.
|
||||
`make` builds the CLI at `build/bin/xcoder` with its adjacent tool host.
|
||||
`make test` writes an installation receipt only after the full local suite passes;
|
||||
a failed rerun removes the earlier receipt. `make install` verifies the exact binaries and preserves
|
||||
Harmony's existing launcher, accounts and histories. It replaces the launcher's
|
||||
Codex executable for new invocations; running sessions are not restarted.
|
||||
Local interactive launches use the embedded server so an older stock Codex
|
||||
daemon cannot supply their tool runtime. Explicit remote endpoints keep their
|
||||
normal behavior.
|
||||
Update this fork from its source with `make test` and `make install`; the stock
|
||||
Codex package updater cannot replace the installed native fork.
|
||||
|
||||
Prefer a JSON tool plan for ordinary calls:
|
||||
|
||||
```json
|
||||
{"calls":[{"tool":"exec_command","input":{"cmd":"pwd"}}]}
|
||||
```
|
||||
|
||||
Plans validate structure, tool names and freeform input types before execution;
|
||||
each tool validates its own arguments. Results include the call index and tool
|
||||
name. Add `"parallel":true` for up to four independent calls at
|
||||
once. A plan supports up to 128 calls; dependent steps use a later cell or custom
|
||||
code. This path works without the compiler installed.
|
||||
|
||||
Custom native cells import `xcoder/runtime`. `Call(name, json)` returns caller-owned
|
||||
storage: inspect `Body(*reply)` and release it with `defer Release(*reply)`.
|
||||
`Text`, `Image`, `Audio`, `Notify`, `Store`, `Load`, `Catalog` and `Yield` provide
|
||||
output and session state. `CallBatch` runs arrays of `BatchCall` on up to four
|
||||
explicit threads, then joins them; release each result after use. A native cell has only its executable and callback
|
||||
socket; the compiler has only its binaries, headers, standard library and cell
|
||||
sources. Tool errors never fall back to JavaScript.
|
||||
|
||||
The custom-cell cache holds at most 64 executables and 256 MiB on disk.
|
||||
Files default to `~/.local/state/xcoder/runtime/cache`; an explicit
|
||||
`XCODER_RUNTIME_DIR` keeps its selected location. Cache keys include source,
|
||||
the runtime API, sandbox/compiler settings, toolchain inputs and the C compiler.
|
||||
Executables are verified before reuse; corruption triggers recompilation.
|
||||
|
||||
`scripts/benchmark-runtime.py --help` describes the offline comparison with
|
||||
preserved JavaScript binaries. It records raw samples, hashes, CPU time,
|
||||
process-tree proportional RAM and latency under ignored `backup/runtime-benchmark/`.
|
||||
Use `--native-mode source` for custom cells and `--native-mode plan` for ordinary
|
||||
calls. Compilation and sandbox startup are included; model inference is excluded.
|
||||
|
||||
The fork retains upstream documentation below.
|
||||
|
||||
---
|
||||
|
||||
<p align="center"><strong>Codex CLI</strong> is a coding agent from OpenAI that runs locally on your computer.
|
||||
<p align="center">
|
||||
<img src="https://github.com/openai/codex/blob/main/.github/codex-cli-splash.png" alt="Codex CLI splash" width="80%" />
|
||||
@@ -19,22 +94,12 @@ Run the following on Mac or Linux to install Codex CLI:
|
||||
curl -fsSL https://chatgpt.com/codex/install.sh | sh
|
||||
```
|
||||
|
||||
Run the following on Windows to install Codex CLI:
|
||||
|
||||
```shell
|
||||
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
|
||||
```
|
||||
|
||||
The standalone installers download from `https://releases.openai.com/codex` by default and fall back to GitHub Releases if a metadata or asset download is unavailable. To force GitHub Releases, set `CODEX_INSTALLER_USE_RELEASES_OPENAI_COM` to `false` (`0` and `no` are also accepted):
|
||||
|
||||
```shell
|
||||
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh
|
||||
```
|
||||
|
||||
```powershell
|
||||
$env:CODEX_INSTALLER_USE_RELEASES_OPENAI_COM='false'; irm https://chatgpt.com/codex/install.ps1 | iex
|
||||
```
|
||||
|
||||
Codex CLI can also be installed via the following package managers:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -16,7 +16,6 @@ _PROFILE_INPUTS = [
|
||||
"//command_line_option:host_action_env",
|
||||
"//command_line_option:macos_minimum_os",
|
||||
"//command_line_option:host_platform",
|
||||
"//command_line_option:extra_toolchains",
|
||||
_RUSTC_FLAGS,
|
||||
_EXEC_RUSTC_FLAGS,
|
||||
]
|
||||
@@ -61,11 +60,13 @@ def _release_profile_impl(settings, attr):
|
||||
# Compatibility with the Cargo musl release: aws-lc jitter can hang.
|
||||
profile["//command_line_option:copt"] += ["-DDISABLE_CPU_JITTER_ENTROPY"]
|
||||
elif attr.platform_os == "windows" and "@platforms//os:windows" in HOST_CONSTRAINTS:
|
||||
# Native MSVC supplies the SDK and host tools for both architectures.
|
||||
# Build tools run natively with the registered LLVM MSVC toolchain.
|
||||
profile["//command_line_option:host_platform"] = "//:local_windows_msvc"
|
||||
profile["//command_line_option:extra_toolchains"] += [
|
||||
"@local_config_cc//:cc-toolchain-x64_windows",
|
||||
"@local_config_cc//:cc-toolchain-arm64_windows",
|
||||
if attr.linux_x86_64_musl:
|
||||
# Match the Cargo release linker for x86-64 static PIEs.
|
||||
profile[_RUSTC_FLAGS] += [
|
||||
"-Cllvm-args=--addrsig",
|
||||
"-Clink-arg=-Wl,--icf=safe,-z,pack-relative-relocs",
|
||||
]
|
||||
return profile
|
||||
|
||||
@@ -132,6 +133,7 @@ _runtime_binary_files = rule(
|
||||
attrs = {
|
||||
"binary": attr.label(mandatory = True, executable = True, cfg = _release_profile),
|
||||
"platform_os": attr.string(),
|
||||
"linux_x86_64_musl": attr.bool(),
|
||||
"macos_minimum_os": attr.string(),
|
||||
"_allowlist_function_transition": attr.label(
|
||||
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
|
||||
@@ -159,6 +161,10 @@ def release_binary(binary, name = "release", macos_x86_64_minimum_os = "10.12",
|
||||
_runtime_binary_files(
|
||||
name = name + "_files",
|
||||
binary = binary,
|
||||
linux_x86_64_musl = select({
|
||||
"@llvm//platforms/config:linux_x86_64_musl": True,
|
||||
"//conditions:default": False,
|
||||
}),
|
||||
platform_os = select({
|
||||
"@platforms//os:macos": "macos",
|
||||
"@platforms//os:linux": "linux",
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
[advisories]
|
||||
# Reviewed 2026-07-02. Keep this list in sync with ../deny.toml.
|
||||
ignore = [
|
||||
"RUSTSEC-2024-0388", # derivative 2.2.0 via starlark/starlark_syntax; upstream crate is unmaintained
|
||||
"RUSTSEC-2024-0449", # unsafe-libyaml via serde_yaml in skills, ext/skills, core-plugins, external-agent-migration; remove when migrated off serde_yaml/unsafe-libyaml
|
||||
"RUSTSEC-2025-0057", # fxhash 0.2.1 via starlark_map/bm25; upstream crate is unmaintained
|
||||
"RUSTSEC-2024-0436", # paste 1.0.15 via starlark/v8; upstream crate is unmaintained
|
||||
"RUSTSEC-2023-0089", # atomic-polyfill via postcard/heapless/pagable; upstream crate is unmaintained
|
||||
"RUSTSEC-2025-0057", # fxhash 0.2.1 via bm25; upstream crate is unmaintained
|
||||
"RUSTSEC-2024-0436", # paste 1.0.15 via v8; upstream crate is unmaintained
|
||||
"RUSTSEC-2024-0320", # yaml-rust via syntect; remove when syntect drops or updates it
|
||||
"RUSTSEC-2025-0141", # bincode via syntect; remove when syntect drops or updates it
|
||||
"RUSTSEC-2026-0118", # hickory-proto via rama-dns/rama-tcp; remove when rama updates to hickory 0.26.1 or hickory-net
|
||||
|
||||
Generated
+306
-1726
File diff suppressed because it is too large.
Load diff
+42
-39
@@ -20,7 +20,6 @@ members = [
|
||||
"app-server-client",
|
||||
"app-server-protocol",
|
||||
"app-server-protocol-noop-macros",
|
||||
"app-server-test-client",
|
||||
"apply-patch",
|
||||
"arg0",
|
||||
"feedback",
|
||||
@@ -34,9 +33,6 @@ members = [
|
||||
"plugin-host",
|
||||
"codex-home",
|
||||
"cloud-config",
|
||||
"cloud-tasks",
|
||||
"cloud-tasks-client",
|
||||
"cloud-tasks-mock-client",
|
||||
"cli",
|
||||
"collaboration-mode-templates",
|
||||
"connectors",
|
||||
@@ -46,6 +42,7 @@ members = [
|
||||
"shell-command",
|
||||
"skills",
|
||||
"core",
|
||||
"core-config",
|
||||
"core-api",
|
||||
"core-plugin-common",
|
||||
"core-plugins",
|
||||
@@ -60,7 +57,6 @@ members = [
|
||||
"file-system",
|
||||
"exec-server-protocol",
|
||||
"exec-server",
|
||||
"exec-server-cli",
|
||||
"exec-server/tests/support",
|
||||
"execpolicy",
|
||||
"ext/agent",
|
||||
@@ -86,7 +82,6 @@ members = [
|
||||
"file-search",
|
||||
"file-watcher",
|
||||
"linux-sandbox",
|
||||
"lmstudio",
|
||||
"login",
|
||||
"codex-mcp",
|
||||
"memories/read",
|
||||
@@ -95,10 +90,9 @@ members = [
|
||||
"message-board",
|
||||
"message-board-mcp",
|
||||
"model-provider-info",
|
||||
"mxc-sandbox",
|
||||
"models-manager",
|
||||
"network-policy",
|
||||
"network-proxy",
|
||||
"ollama",
|
||||
"process-hardening",
|
||||
"realtime-webrtc",
|
||||
"voice-host",
|
||||
@@ -108,22 +102,18 @@ members = [
|
||||
"rollout",
|
||||
"rollout-trace",
|
||||
"rmcp-client",
|
||||
"responses-api-proxy",
|
||||
"runtime-agent-instance",
|
||||
"response-debug-context",
|
||||
"sandboxing",
|
||||
"stdio-to-uds",
|
||||
"otel",
|
||||
"otel-trace-websocket",
|
||||
"tcp-tunnel",
|
||||
"tui",
|
||||
"user-verification",
|
||||
"tools",
|
||||
"v8-poc",
|
||||
"websocket-auth",
|
||||
"websocket-client",
|
||||
"windows-sandbox-rs/tests/support",
|
||||
"windows-sandbox-service",
|
||||
"worktree",
|
||||
"workload-identity",
|
||||
"utils/absolute-path",
|
||||
@@ -144,6 +134,7 @@ members = [
|
||||
"utils/redacted-string",
|
||||
"utils/rustls-provider",
|
||||
"utils/string",
|
||||
"utils/text-diff",
|
||||
"utils/cli",
|
||||
"utils/elapsed",
|
||||
"utils/sandbox-summary",
|
||||
@@ -198,7 +189,6 @@ codex-app-server-daemon = { path = "app-server-daemon" }
|
||||
codex-app-server-client = { path = "app-server-client" }
|
||||
codex-app-server-protocol = { path = "app-server-protocol" }
|
||||
codex-app-server-protocol-noop-macros = { path = "app-server-protocol-noop-macros" }
|
||||
codex-app-server-test-client = { path = "app-server-test-client" }
|
||||
codex-apply-patch = { path = "apply-patch" }
|
||||
codex-arg0 = { path = "arg0" }
|
||||
codex-async-utils = { path = "async-utils" }
|
||||
@@ -208,8 +198,6 @@ codex-chatgpt = { path = "chatgpt" }
|
||||
codex-client = { path = "codex-client" }
|
||||
codex-collaboration-mode-templates = { path = "collaboration-mode-templates" }
|
||||
codex-cloud-config = { path = "cloud-config" }
|
||||
codex-cloud-tasks-client = { path = "cloud-tasks-client" }
|
||||
codex-cloud-tasks-mock-client = { path = "cloud-tasks-mock-client" }
|
||||
codex-code-mode = { path = "code-mode" }
|
||||
codex-code-mode-protocol = { path = "code-mode-protocol" }
|
||||
codex-code-mode-runtime = { path = "code-mode-runtime" }
|
||||
@@ -228,6 +216,7 @@ codex-message-board-mcp = { path = "message-board-mcp" }
|
||||
codex-connectors-extension = { path = "ext/connectors" }
|
||||
codex-context-fragments = { path = "context-fragments" }
|
||||
codex-core = { path = "core" }
|
||||
codex-core-config = { path = "core-config" }
|
||||
codex-core-api = { path = "core-api" }
|
||||
codex-core-plugin-common = { path = "core-plugin-common" }
|
||||
codex-core-plugins = { path = "core-plugins" }
|
||||
@@ -237,7 +226,6 @@ codex-exec = { path = "exec" }
|
||||
codex-file-system = { path = "file-system" }
|
||||
codex-exec-server-protocol = { path = "exec-server-protocol" }
|
||||
codex-exec-server = { path = "exec-server" }
|
||||
codex-exec-server-cli = { path = "exec-server-cli" }
|
||||
codex-exec-server-test-support = { path = "exec-server/tests/support" }
|
||||
codex-execpolicy = { path = "execpolicy" }
|
||||
codex-extension-api = { path = "ext/extension-api" }
|
||||
@@ -263,7 +251,6 @@ codex-hooks = { path = "hooks" }
|
||||
codex-history = { path = "history" }
|
||||
codex-keyring-store = { path = "keyring-store" }
|
||||
codex-linux-sandbox = { path = "linux-sandbox" }
|
||||
codex-lmstudio = { path = "lmstudio" }
|
||||
codex-login = { path = "login" }
|
||||
codex-mermaid = { path = "mermaid" }
|
||||
codex-message-history = { path = "message-history" }
|
||||
@@ -275,9 +262,8 @@ codex-mcp = { path = "codex-mcp" }
|
||||
codex-mcp-extension = { path = "ext/mcp" }
|
||||
codex-model-provider-info = { path = "model-provider-info" }
|
||||
codex-models-manager = { path = "models-manager" }
|
||||
codex-mxc-sandbox = { path = "mxc-sandbox" }
|
||||
codex-network-policy = { path = "network-policy" }
|
||||
codex-network-proxy = { path = "network-proxy" }
|
||||
codex-ollama = { path = "ollama" }
|
||||
codex-otel = { path = "otel" }
|
||||
codex-otel-trace-websocket = { path = "otel-trace-websocket" }
|
||||
codex-plugin = { path = "plugin" }
|
||||
@@ -287,7 +273,6 @@ codex-protocol = { path = "protocol" }
|
||||
codex-protocol-test-support = { path = "protocol/tests/support" }
|
||||
codex-prompts = { path = "prompts" }
|
||||
codex-queue-extension = { path = "ext/queue" }
|
||||
codex-responses-api-proxy = { path = "responses-api-proxy" }
|
||||
codex-response-debug-context = { path = "response-debug-context" }
|
||||
codex-rmcp-client = { path = "rmcp-client" }
|
||||
codex-rollout = { path = "rollout" }
|
||||
@@ -304,7 +289,6 @@ codex-terminal-detection = { path = "terminal-detection" }
|
||||
codex-test-binary-support = { path = "test-binary-support" }
|
||||
codex-thread-store = { path = "thread-store" }
|
||||
codex-tools = { path = "tools" }
|
||||
codex-tcp-tunnel = { path = "tcp-tunnel" }
|
||||
codex-tui = { path = "tui" }
|
||||
codex-uds = { path = "uds" }
|
||||
codex-utils-absolute-path = { path = "utils/absolute-path" }
|
||||
@@ -335,12 +319,11 @@ codex-worktree = { path = "worktree" }
|
||||
codex-utils-sleep-inhibitor = { path = "utils/sleep-inhibitor" }
|
||||
codex-utils-stream-parser = { path = "utils/stream-parser" }
|
||||
codex-utils-string = { path = "utils/string" }
|
||||
codex-utils-text-diff = { path = "utils/text-diff" }
|
||||
codex-utils-template = { path = "utils/template" }
|
||||
codex-user-verification = { path = "user-verification" }
|
||||
codex-v8-poc = { path = "v8-poc" }
|
||||
codex-workload-identity = { path = "workload-identity" }
|
||||
codex-windows-sandbox = { path = "windows-sandbox-rs" }
|
||||
codex-windows-sandbox-test-support = { path = "windows-sandbox-rs/tests/support" }
|
||||
core_test_support = { path = "core/tests/common" }
|
||||
|
||||
# External
|
||||
@@ -354,12 +337,8 @@ assert_matches = "1.5.0"
|
||||
async-channel = "2.3.1"
|
||||
async-io = "2.6.0"
|
||||
async-stream = "0.3.6"
|
||||
aws-config = "1"
|
||||
aws-credential-types = "1"
|
||||
aws-sigv4 = "1"
|
||||
aws-smithy-runtime-api = { version = "1", features = ["client", "http-1x"] }
|
||||
aws-smithy-types = { version = "1", features = ["http-body-1-x"] }
|
||||
aws-types = "1"
|
||||
axum = { version = "0.8", default-features = false }
|
||||
base64 = "0.22.1"
|
||||
bitflags = "2.13.1"
|
||||
@@ -413,7 +392,7 @@ iana-time-zone = "0.1.64"
|
||||
icu_decimal = "2.1"
|
||||
icu_locale_core = "2.1"
|
||||
icu_provider = { version = "2.1", features = ["sync"] }
|
||||
ignore = "0.4.23"
|
||||
ignore = "0.4.30"
|
||||
image = { version = "^0.25.9", default-features = false }
|
||||
include_dir = "0.7.4"
|
||||
indexmap = "2.12.0"
|
||||
@@ -428,7 +407,8 @@ lazy_static = "1"
|
||||
libc = "0.2.182"
|
||||
# Keep SQLx's bundled SQLite on a version containing the WAL-reset corruption fix:
|
||||
# https://www.sqlite.org/wal.html#the_wal_reset_bug
|
||||
libsqlite3-sys = { version = "0.37", default-features = false }
|
||||
# SQLite 3.54 also fixes RUSTSEC-2026-0459 when opening a database with a WAL.
|
||||
libsqlite3-sys = { version = "0.39.1", default-features = false }
|
||||
linkify = "0.11"
|
||||
log = "0.4"
|
||||
lru = "0.18.2"
|
||||
@@ -436,7 +416,6 @@ 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"
|
||||
@@ -519,7 +498,6 @@ sqlx = { version = "=0.9.0", default-features = false, features = [
|
||||
sqlx-macros = { version = "=0.9.0", default-features = false, features = ["derive", "migrate"] }
|
||||
# Preserve the target driver's query-description support without building it on the host.
|
||||
sqlx-sqlite = { version = "=0.9.0", default-features = false, features = ["offline"] }
|
||||
starlark = { version = "0.14.2", default-features = false }
|
||||
strum = "0.27.2"
|
||||
strum_macros = "0.28.0"
|
||||
supports-color = "3.0.2"
|
||||
@@ -554,10 +532,9 @@ tonic = { version = "0.14.3", default-features = false, features = ["channel", "
|
||||
tonic-prost = "0.14.3"
|
||||
tree-sitter = "0.25.10"
|
||||
tree-sitter-bash = "0.25"
|
||||
tree-sitter-powershell = "=0.26.4"
|
||||
ts-rs = "11"
|
||||
tungstenite = { version = "0.27.0", features = ["deflate", "proxy"] }
|
||||
uds_windows = "1.1.0"
|
||||
unicode-linebreak = "0.1.5"
|
||||
unicode-normalization = "0.1.25"
|
||||
unicode-segmentation = "1.12.0"
|
||||
unicode-width = "0.2"
|
||||
@@ -566,12 +543,12 @@ urlencoding = "2.1"
|
||||
uuid = "1"
|
||||
v8 = "=152.2.0"
|
||||
vt100 = "0.16.2"
|
||||
vtparse = "0.6.2"
|
||||
walkdir = "2.5.0"
|
||||
webbrowser = "1.2.2"
|
||||
which = "8"
|
||||
whoami = "1.6.1"
|
||||
wildmatch = "2.6.1"
|
||||
winapi-util = "0.1.11"
|
||||
windows-sys = "0.61.2"
|
||||
winreg = "0.55.0"
|
||||
# Keep the zip 2.x feature set. In zip 9, `bzip2-rs` selects the bzip2-sys
|
||||
@@ -591,8 +568,8 @@ zstd = "0.13"
|
||||
wiremock = "0.6"
|
||||
zeroize = "1.8.2"
|
||||
|
||||
[workspace.lints]
|
||||
rust = {}
|
||||
[workspace.lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(codex_bazel)'] }
|
||||
|
||||
[workspace.lints.clippy]
|
||||
await_holding_invalid_type = "deny"
|
||||
@@ -663,6 +640,28 @@ strip = false
|
||||
# Balance parallel release code generation against binary size.
|
||||
codegen-units = 4
|
||||
|
||||
# The TUI is a very large crate and can otherwise exhaust constrained builders
|
||||
# during release code generation. Keep its runtime-independent presentation
|
||||
# layer cheap to compile while the core remains optimized.
|
||||
[profile.release.package.codex-tui]
|
||||
opt-level = 0
|
||||
codegen-units = 256
|
||||
|
||||
# Local builds (`make`; XCODER_CARGO_PROFILE=local): no cross-crate LTO and
|
||||
# more codegen units, so the final link and the largest crates spread over
|
||||
# more cores and need far less memory. Published release builds keep the
|
||||
# `release` profile (XCODER_CARGO_PROFILE=release).
|
||||
[profile.local]
|
||||
inherits = "release"
|
||||
lto = false
|
||||
codegen-units = 16
|
||||
debug = false
|
||||
incremental = true
|
||||
|
||||
[profile.local.package.codex-tui]
|
||||
opt-level = 0
|
||||
codegen-units = 256
|
||||
|
||||
[profile.profiling]
|
||||
inherits = "release"
|
||||
debug = "full"
|
||||
@@ -678,12 +677,16 @@ opt-level = 0
|
||||
# Uncomment to debug local changes.
|
||||
# ratatui = { path = "../../ratatui" }
|
||||
crossterm = { git = "https://github.com/openai-oss-forks/crossterm", rev = "ed1cdab335221515706178d68495bba2aed1924f" }
|
||||
tokio-tungstenite = { git = "https://github.com/openai-oss-forks/tokio-tungstenite", rev = "0e5b2d73aa18dd9f0a50ee9ff199d5aef7594186" }
|
||||
tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "4fffad30fe373adbdcffab9545e9e9bf4f2fc19f" }
|
||||
# SQLx 0.9.0 excludes libsqlite3-sys 0.39. Keep its driver and Core traits on
|
||||
# the same reviewed source until a release includes transact-rs/sqlx#4502.
|
||||
sqlx-core = { git = "https://github.com/transact-rs/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" }
|
||||
sqlx-sqlite = { git = "https://github.com/transact-rs/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" }
|
||||
tokio-tungstenite = { git = "https://github.com/openai-oss-forks/tokio-tungstenite", rev = "7447c427513cfe685f236e1ac0513c4ea3dd9c0b" }
|
||||
tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "bc589d684755a8c02da0fc7e58d0861cbfc306f1" }
|
||||
v8 = { git = "https://github.com/openai-oss-forks/rusty_v8.git", rev = "90a65f887a0c0f048f3784afbcb320b373c8a2e0" }
|
||||
|
||||
# Uncomment to debug local changes.
|
||||
# rmcp = { path = "../../rust-sdk/crates/rmcp" }
|
||||
|
||||
[patch."ssh://[email protected]/openai-oss-forks/tungstenite-rs.git"]
|
||||
tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "4fffad30fe373adbdcffab9545e9e9bf4f2fc19f" }
|
||||
tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "bc589d684755a8c02da0fc7e58d0861cbfc306f1" }
|
||||
@@ -25,7 +25,6 @@ pub(crate) fn append_payload(path: &Path, payload: &TrackEventsRequest) -> io::R
|
||||
fn open_capture_file(path: &Path) -> io::Result<File> {
|
||||
let mut options = OpenOptions::new();
|
||||
options.create(true).append(true);
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::OpenOptionsExt;
|
||||
options.mode(0o600);
|
||||
|
||||
@@ -406,6 +406,23 @@ impl AnalyticsEventsClient {
|
||||
}
|
||||
}
|
||||
|
||||
/// Give a resumed actor its own queue while preserving the caller's analytics setting.
|
||||
pub fn for_auth_context(
|
||||
&self,
|
||||
auth_manager: Arc<AuthManager>,
|
||||
base_url: String,
|
||||
runtime_auth: Option<(RuntimeAuthSlot, RuntimeAuthMode)>,
|
||||
api_key_headers: HeaderMap,
|
||||
) -> Self {
|
||||
Self::new_with_runtime(
|
||||
auth_manager,
|
||||
base_url,
|
||||
Some(self.queue.is_some()),
|
||||
runtime_auth,
|
||||
api_key_headers,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn disabled() -> Self {
|
||||
Self { queue: None }
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ fn sample_skill_track_event(thread_id: &str, plugin_id: Option<&str>) -> TrackEv
|
||||
skill_id: format!("skill-{thread_id}"),
|
||||
skill_name: "doc".to_string(),
|
||||
event_params: SkillInvocationEventParams {
|
||||
turn_trigger: None,
|
||||
product_client_id: None,
|
||||
skill_scope: None,
|
||||
plugin_id: plugin_id.map(str::to_string),
|
||||
@@ -205,6 +206,7 @@ fn sample_mcp_tool_call_event(thread_id: &str, plugin_id: Option<&str>) -> Track
|
||||
event_type: "codex_mcp_tool_call_event",
|
||||
event_params: CodexMcpToolCallEventParams {
|
||||
base: CodexToolItemEventBase {
|
||||
turn_trigger: None,
|
||||
thread_id: thread_id.to_string(),
|
||||
session_id: format!("session-{thread_id}"),
|
||||
turn_id: "turn-1".to_string(),
|
||||
@@ -261,6 +263,7 @@ fn sample_plugin_used_track_event(thread_id: &str, plugin_id: Option<&str>) -> T
|
||||
TrackEventRequest::PluginUsed(CodexPluginUsedEventRequest {
|
||||
event_type: "codex_plugin_used",
|
||||
event_params: CodexPluginUsedMetadata {
|
||||
turn_trigger: None,
|
||||
plugin: CodexPluginMetadata {
|
||||
plugin_id: plugin_id.map(str::to_string),
|
||||
remote_plugin_id: None,
|
||||
@@ -324,7 +327,6 @@ fn analytics_destination_uses_explicit_capture_file() {
|
||||
fs::read_to_string(&capture_path).expect("read capture file"),
|
||||
""
|
||||
);
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
@@ -667,6 +669,7 @@ fn sample_thread(thread_id: &str) -> Thread {
|
||||
extra: None,
|
||||
session_id: format!("session-{thread_id}"),
|
||||
forked_from_id: None,
|
||||
attached_to_thread_id: None,
|
||||
parent_thread_id: None,
|
||||
preview: "first prompt".to_string(),
|
||||
ephemeral: false,
|
||||
@@ -920,7 +923,6 @@ fn track_response_only_enqueues_analytics_relevant_responses() {
|
||||
assert!(matches!(receiver.try_recv(), Err(TryRecvError::Empty)));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn track_response_ignores_unserializable_thread_responses() {
|
||||
use std::ffi::OsString;
|
||||
|
||||
@@ -23,6 +23,7 @@ use crate::facts::PluginState;
|
||||
use crate::facts::SubAgentThreadStartedInput;
|
||||
use crate::facts::ThreadInitializationMode;
|
||||
use crate::facts::TrackEventsContext;
|
||||
use crate::facts::TurnAnalyticsMetadata;
|
||||
use crate::facts::TurnStatus;
|
||||
use crate::facts::TurnSteerRejectionReason;
|
||||
use crate::facts::TurnSteerResult;
|
||||
@@ -108,6 +109,8 @@ pub(crate) enum TrackEventRequest {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexArtifactOperationEventParams {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
pub(crate) thread_id: String,
|
||||
pub(crate) turn_id: String,
|
||||
pub(crate) item_id: String,
|
||||
@@ -136,9 +139,11 @@ pub(crate) fn codex_artifact_operation_event_request(
|
||||
tracking: TrackEventsContext,
|
||||
operation: ArtifactOperation,
|
||||
) -> CodexArtifactOperationEventRequest {
|
||||
let turn = tracking.turn_metadata.as_deref();
|
||||
CodexArtifactOperationEventRequest {
|
||||
event_type: "codex_artifact_operation",
|
||||
event_params: CodexArtifactOperationEventParams {
|
||||
turn_trigger: turn.and_then(TurnAnalyticsMetadata::turn_trigger),
|
||||
thread_id: tracking.thread_id,
|
||||
turn_id: tracking.turn_id,
|
||||
item_id: operation.item_id,
|
||||
@@ -209,6 +214,8 @@ pub(crate) struct SkillInvocationEventRequest {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct SkillInvocationEventParams {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
pub(crate) product_client_id: Option<String>,
|
||||
pub(crate) skill_scope: Option<String>,
|
||||
pub(crate) plugin_id: Option<String>,
|
||||
@@ -682,6 +689,8 @@ pub(crate) enum ToolEventType {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexToolItemEventBase {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
pub(crate) thread_id: String,
|
||||
pub(crate) session_id: String,
|
||||
pub(crate) turn_id: String,
|
||||
@@ -719,6 +728,8 @@ pub(crate) struct CodexToolItemEventBase {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexCuaToolCallStartedEventParams {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
pub(crate) thread_id: String,
|
||||
pub(crate) session_id: String,
|
||||
pub(crate) turn_id: String,
|
||||
@@ -1000,6 +1011,8 @@ pub(crate) struct CodexImageGenerationEventRequest {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexAppMetadata {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
pub(crate) connector_id: Option<String>,
|
||||
pub(crate) thread_id: Option<String>,
|
||||
pub(crate) turn_id: Option<String>,
|
||||
@@ -1031,6 +1044,8 @@ pub(crate) struct CodexAppUsedEventRequest {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexHookRunMetadata {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
pub(crate) thread_id: Option<String>,
|
||||
pub(crate) turn_id: Option<String>,
|
||||
pub(crate) product_client_id: Option<String>,
|
||||
@@ -1230,6 +1245,8 @@ pub(crate) struct CodexPluginMetadata {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexPluginUsedMetadata {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) turn_trigger: Option<String>,
|
||||
#[serde(flatten)]
|
||||
pub(crate) plugin: CodexPluginMetadata,
|
||||
pub(crate) mcp_server_names: Option<Vec<String>>,
|
||||
@@ -1340,7 +1357,9 @@ pub(crate) fn codex_app_metadata(
|
||||
tracking: &TrackEventsContext,
|
||||
app: AppInvocation,
|
||||
) -> CodexAppMetadata {
|
||||
let turn = tracking.turn_metadata.as_deref();
|
||||
CodexAppMetadata {
|
||||
turn_trigger: turn.and_then(TurnAnalyticsMetadata::turn_trigger),
|
||||
connector_id: app.connector_id,
|
||||
thread_id: Some(tracking.thread_id.clone()),
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
@@ -1487,7 +1506,9 @@ pub(crate) fn codex_plugin_used_metadata(
|
||||
.capability_summary
|
||||
.as_ref()
|
||||
.map(|summary| summary.mcp_server_names.clone());
|
||||
let turn = tracking.turn_metadata.as_deref();
|
||||
CodexPluginUsedMetadata {
|
||||
turn_trigger: turn.and_then(TurnAnalyticsMetadata::turn_trigger),
|
||||
plugin: codex_plugin_metadata_with_product_client_id(
|
||||
plugin,
|
||||
tracking.product_client_id.clone(),
|
||||
@@ -1503,7 +1524,9 @@ pub(crate) fn codex_hook_run_metadata(
|
||||
tracking: &TrackEventsContext,
|
||||
hook: HookRunFact,
|
||||
) -> CodexHookRunMetadata {
|
||||
let turn = tracking.turn_metadata.as_deref();
|
||||
CodexHookRunMetadata {
|
||||
turn_trigger: turn.and_then(TurnAnalyticsMetadata::turn_trigger),
|
||||
thread_id: Some(tracking.thread_id.clone()),
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
product_client_id: Some(tracking.product_client_id.clone()),
|
||||
@@ -1556,7 +1579,7 @@ pub(crate) fn current_runtime_metadata() -> CodexRuntimeMetadata {
|
||||
static OS_INFO: LazyLock<os_info::Info> = LazyLock::new(os_info::get);
|
||||
let os_info = &*OS_INFO;
|
||||
CodexRuntimeMetadata {
|
||||
codex_rs_version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
codex_rs_version: codex_protocol::client_version::reported_client_version().to_string(),
|
||||
runtime_os: std::env::consts::OS.to_string(),
|
||||
runtime_os_version: os_info.version().to_string(),
|
||||
runtime_arch: std::env::consts::ARCH.to_string(),
|
||||
|
||||
@@ -110,6 +110,7 @@ use crate::facts::SkillInvocationLocation;
|
||||
use crate::facts::SkillInvokedInput;
|
||||
use crate::facts::SubAgentThreadStartedInput;
|
||||
use crate::facts::ThreadInitializationMode;
|
||||
use crate::facts::TurnAnalyticsMetadata;
|
||||
use crate::facts::TurnCodexError;
|
||||
use crate::facts::TurnCodexErrorFact;
|
||||
use crate::facts::TurnProfile;
|
||||
@@ -182,6 +183,7 @@ use std::collections::HashSet;
|
||||
use std::collections::VecDeque;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
const MAX_TOOL_RESPONSE_ENTRIES: usize = 256;
|
||||
const MAX_RECENT_VOICE_SESSION_WINDOWS: usize = 16;
|
||||
|
||||
@@ -1056,7 +1058,7 @@ impl AnalyticsReducer {
|
||||
self.record_tool_event(
|
||||
&thread_id,
|
||||
&turn_id,
|
||||
turn_metadata.root_turn_id(),
|
||||
Some(turn_metadata.as_ref()),
|
||||
event,
|
||||
ToolEventEmission::AwaitResponse,
|
||||
out,
|
||||
@@ -1133,7 +1135,7 @@ impl AnalyticsReducer {
|
||||
self.record_tool_event(
|
||||
&thread_id,
|
||||
&turn_id,
|
||||
turn_metadata.root_turn_id(),
|
||||
Some(turn_metadata.as_ref()),
|
||||
event,
|
||||
ToolEventEmission::AwaitResponse,
|
||||
out,
|
||||
@@ -1192,7 +1194,7 @@ impl AnalyticsReducer {
|
||||
&mut self,
|
||||
thread_id: &str,
|
||||
turn_id: &str,
|
||||
root_turn_id: Option<String>,
|
||||
turn_metadata: Option<&dyn TurnAnalyticsMetadata>,
|
||||
mut event: TrackEventRequest,
|
||||
emission: ToolEventEmission,
|
||||
out: &mut Vec<TrackEventRequest>,
|
||||
@@ -1201,7 +1203,8 @@ impl AnalyticsReducer {
|
||||
out.push(event);
|
||||
return;
|
||||
};
|
||||
base.root_turn_id = root_turn_id;
|
||||
base.root_turn_id = turn_metadata.and_then(TurnAnalyticsMetadata::root_turn_id);
|
||||
base.turn_trigger = turn_metadata.and_then(TurnAnalyticsMetadata::turn_trigger);
|
||||
let state = self
|
||||
.tool_response_states
|
||||
.entry((thread_id.to_string(), turn_id.to_string()))
|
||||
@@ -1489,12 +1492,14 @@ impl AnalyticsReducer {
|
||||
(skill_id, skill_scope)
|
||||
}
|
||||
};
|
||||
let turn = tracking.turn_metadata.as_deref();
|
||||
out.push(TrackEventRequest::SkillInvocation(
|
||||
SkillInvocationEventRequest {
|
||||
event_type: "skill_invocation",
|
||||
skill_id,
|
||||
skill_name: invocation.skill_name.clone(),
|
||||
event_params: SkillInvocationEventParams {
|
||||
turn_trigger: turn.and_then(TurnAnalyticsMetadata::turn_trigger),
|
||||
thread_id: Some(tracking.thread_id.clone()),
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
voice_session_id: self
|
||||
@@ -2120,11 +2125,11 @@ impl AnalyticsReducer {
|
||||
.get(&(notification.thread_id.clone(), notification.turn_id.clone())),
|
||||
self.code_mode_cells.get(¬ification.thread_id),
|
||||
);
|
||||
let root_turn_id = self
|
||||
let turn_metadata = self
|
||||
.turns
|
||||
.get(¬ification.turn_id)
|
||||
.and_then(|turn| turn.resolved_config.as_ref())
|
||||
.and_then(|config| config.turn_metadata.root_turn_id());
|
||||
.map(|config| config.turn_metadata.as_ref());
|
||||
out.push(TrackEventRequest::CuaToolCallStarted(
|
||||
CodexCuaToolCallStartedEventRequest {
|
||||
event_type: "codex_cua_tool_call_started",
|
||||
@@ -2132,7 +2137,10 @@ impl AnalyticsReducer {
|
||||
thread_id: notification.thread_id,
|
||||
session_id: thread_metadata.session_id.clone(),
|
||||
turn_id: notification.turn_id,
|
||||
root_turn_id,
|
||||
root_turn_id: turn_metadata
|
||||
.and_then(TurnAnalyticsMetadata::root_turn_id),
|
||||
turn_trigger: turn_metadata
|
||||
.and_then(TurnAnalyticsMetadata::turn_trigger),
|
||||
item_id: item_id.to_string(),
|
||||
cell_id: attribution.cell_id,
|
||||
parent_call_id: attribution.parent_call_id,
|
||||
@@ -2248,11 +2256,11 @@ impl AnalyticsReducer {
|
||||
.get(¬ification.turn_id)
|
||||
.and_then(|turn| turn.voice_session_id.clone());
|
||||
}
|
||||
let root_turn_id = self
|
||||
let turn_metadata = self
|
||||
.turns
|
||||
.get(¬ification.turn_id)
|
||||
.and_then(|turn| turn.resolved_config.as_ref())
|
||||
.and_then(|config| config.turn_metadata.root_turn_id());
|
||||
.map(|config| Arc::clone(&config.turn_metadata));
|
||||
// Fast collaborator tools can complete before their sampling response.
|
||||
// Keep the event until that response can supply its originating ID.
|
||||
let emission = if matches!(
|
||||
@@ -2266,7 +2274,7 @@ impl AnalyticsReducer {
|
||||
self.record_tool_event(
|
||||
¬ification.thread_id,
|
||||
¬ification.turn_id,
|
||||
root_turn_id,
|
||||
turn_metadata.as_deref(),
|
||||
event,
|
||||
emission,
|
||||
out,
|
||||
@@ -3469,6 +3477,7 @@ fn tool_item_base(
|
||||
thread_id: thread_id.to_string(),
|
||||
session_id: thread_metadata.session_id.clone(),
|
||||
turn_id: turn_id.to_string(),
|
||||
turn_trigger: None,
|
||||
root_turn_id: None,
|
||||
item_id,
|
||||
cell_id: None,
|
||||
|
||||
@@ -15,6 +15,7 @@ use crate::facts::InvocationType;
|
||||
use crate::reducer::AnalyticsReducer;
|
||||
use crate::tests::support::TEST_PRODUCT_CLIENT_ID;
|
||||
use crate::tests::support::test_tracking_context;
|
||||
use crate::tests::support::test_turn_metadata;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -54,7 +55,12 @@ fn app_mentioned_event_serializes_expected_shape() {
|
||||
|
||||
#[test]
|
||||
fn app_used_event_serializes_expected_shape() {
|
||||
let tracking = test_tracking_context("thread-2", "turn-2");
|
||||
let mut tracking = test_tracking_context("thread-2", "turn-2");
|
||||
let mut metadata = test_turn_metadata(/*root_turn_id*/ None);
|
||||
std::sync::Arc::get_mut(&mut metadata)
|
||||
.expect("unique metadata")
|
||||
.turn_trigger = Some("appServer-goal".to_string());
|
||||
tracking.turn_metadata = Some(metadata);
|
||||
let event = TrackEventRequest::AppUsed(CodexAppUsedEventRequest {
|
||||
event_type: "codex_app_used",
|
||||
event_params: CodexAppUsedMetadata {
|
||||
@@ -78,6 +84,7 @@ fn app_used_event_serializes_expected_shape() {
|
||||
json!({
|
||||
"event_type": "codex_app_used",
|
||||
"event_params": {
|
||||
"turn_trigger": "appServer-goal",
|
||||
"connector_id": "drive",
|
||||
"thread_id": "thread-2",
|
||||
"turn_id": "turn-2",
|
||||
@@ -97,6 +104,14 @@ async fn reducer_ingests_app_facts() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
let mut metadata = test_turn_metadata(/*root_turn_id*/ None);
|
||||
std::sync::Arc::get_mut(&mut metadata)
|
||||
.expect("unique metadata")
|
||||
.turn_trigger = Some("automation_cron_run_now".to_string());
|
||||
let tracking = crate::facts::TrackEventsContext {
|
||||
turn_metadata: Some(metadata),
|
||||
..tracking
|
||||
};
|
||||
|
||||
reducer
|
||||
.ingest(
|
||||
@@ -149,6 +164,16 @@ async fn reducer_ingests_app_facts() {
|
||||
("codex_app_used", Some(TEST_PRODUCT_CLIENT_ID)),
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
(
|
||||
mention.event_params.turn_trigger.as_deref(),
|
||||
usage.event_params.app.turn_trigger.as_deref()
|
||||
),
|
||||
(
|
||||
Some("automation_cron_run_now"),
|
||||
Some("automation_cron_run_now")
|
||||
)
|
||||
);
|
||||
assert_eq!(
|
||||
usage.event_params.elicitation_type,
|
||||
Some(ElicitationType::AuthOrLink)
|
||||
|
||||
@@ -83,17 +83,10 @@ fn normalize_path_for_skill_id_repo_root_not_in_skill_path_uses_absolute_path()
|
||||
/// Foreign paths keep native telemetry spelling without depending on host filesystem lookup.
|
||||
#[test]
|
||||
fn normalize_path_for_skill_id_foreign_path_uses_native_spelling() {
|
||||
let (uri, expected) = if cfg!(windows) {
|
||||
(
|
||||
"file:///Users/abc/.codex/skills/doc%20%23/SKILL.md",
|
||||
"/Users/abc/.codex/skills/doc #/SKILL.md",
|
||||
)
|
||||
} else {
|
||||
(
|
||||
"file:///C:/Users/abc/.codex/skills/doc%20%23/SKILL.md",
|
||||
"C:/Users/abc/.codex/skills/doc #/SKILL.md",
|
||||
)
|
||||
};
|
||||
let (uri, expected) = (
|
||||
"file:///C:/Users/abc/.codex/skills/doc%20%23/SKILL.md",
|
||||
"C:/Users/abc/.codex/skills/doc #/SKILL.md",
|
||||
);
|
||||
let path = normalize_path_for_skill_id(
|
||||
/*repo_url*/ None,
|
||||
/*repo_root*/ None,
|
||||
|
||||
@@ -105,6 +105,7 @@ fn command_execution_event_serializes_expected_shape() {
|
||||
model_slug: None,
|
||||
reasoning_effort: None,
|
||||
base: CodexToolItemEventBase {
|
||||
turn_trigger: None,
|
||||
thread_id: "thread-1".to_string(),
|
||||
session_id: "session-thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
@@ -313,149 +314,6 @@ async fn cua_tool_call_lifecycle_requires_a_start_and_deduplicates_replay() {
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn item_lifecycle_notifications_publish_command_execution_event() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
|
||||
ingest_review_prerequisites(&mut reducer, &mut events).await;
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Notification(Box::new(sample_turn_started_notification(
|
||||
"thread-1", "turn-1",
|
||||
))),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
for model in ["invoking-model", "later-model"] {
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Notification(Box::new(ServerNotification::ItemStarted(
|
||||
ItemStartedNotification::new(
|
||||
"thread-1".to_string(),
|
||||
"turn-1".to_string(),
|
||||
{
|
||||
let mut item = sample_command_execution_item(
|
||||
CommandExecutionStatus::InProgress,
|
||||
/*exit_code*/ None,
|
||||
/*duration_ms*/ None,
|
||||
);
|
||||
if let ThreadItemPayload::CommandExecution { model_context, .. } =
|
||||
&mut item
|
||||
{
|
||||
*model_context =
|
||||
Some(codex_protocol::items::ModelInvocationContext {
|
||||
model_slug: model.to_string(),
|
||||
reasoning_effort: Some("max".to_string()),
|
||||
});
|
||||
}
|
||||
item
|
||||
},
|
||||
/*started_at_ms*/ 1_000,
|
||||
),
|
||||
))),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
assert!(
|
||||
events.is_empty(),
|
||||
"tool item event should emit on completion"
|
||||
);
|
||||
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Notification(Box::new(ServerNotification::ItemCompleted(
|
||||
ItemCompletedNotification::new(
|
||||
"thread-1".to_string(),
|
||||
"turn-1".to_string(),
|
||||
sample_command_execution_item_with_actions(
|
||||
CommandExecutionStatus::Completed,
|
||||
Some(0),
|
||||
Some(42),
|
||||
vec![
|
||||
CommandAction::Read {
|
||||
command: "cat README.md".to_string(),
|
||||
name: "README.md".to_string(),
|
||||
path: test_path_buf("/tmp/README.md").abs().into(),
|
||||
},
|
||||
CommandAction::ListFiles {
|
||||
command: "ls".to_string(),
|
||||
path: None,
|
||||
},
|
||||
CommandAction::Search {
|
||||
command: "rg TODO".to_string(),
|
||||
query: Some("TODO".to_string()),
|
||||
path: None,
|
||||
},
|
||||
CommandAction::Unknown {
|
||||
command: "cargo test".to_string(),
|
||||
},
|
||||
],
|
||||
Some("sample@openai-curated"),
|
||||
Some("scripts/run.py"),
|
||||
Some(SandboxType::WindowsMxc),
|
||||
),
|
||||
/*started_at_ms*/ None,
|
||||
/*completed_at_ms*/ 1_045,
|
||||
),
|
||||
))),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
|
||||
let payload = serde_json::to_value(&events).expect("serialize events");
|
||||
assert_eq!(payload.as_array().expect("events array").len(), 1);
|
||||
assert_eq!(payload[0]["event_params"]["model_slug"], "invoking-model");
|
||||
assert_eq!(payload[0]["event_params"]["sandbox_backend"], "windows_mxc");
|
||||
assert_eq!(payload[0]["event_params"]["reasoning_effort"], "max");
|
||||
assert_eq!(payload[0]["event_type"], "codex_command_execution_event");
|
||||
assert_eq!(payload[0]["event_params"]["thread_id"], "thread-1");
|
||||
assert_eq!(payload[0]["event_params"]["session_id"], "session-thread-1");
|
||||
assert_eq!(payload[0]["event_params"]["turn_id"], "turn-1");
|
||||
assert_eq!(payload[0]["event_params"]["item_id"], "item-1");
|
||||
assert_eq!(payload[0]["event_params"]["tool_name"], "shell");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["plugin_id"],
|
||||
"sample@openai-curated"
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["script_path"], "scripts/run.py");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["command_execution_source"],
|
||||
"agent"
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["terminal_status"], "completed");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["final_approval_outcome"],
|
||||
"unknown"
|
||||
);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["failure_kind"],
|
||||
serde_json::Value::Null
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["exit_code"], 0);
|
||||
assert_eq!(payload[0]["event_params"]["command_total_action_count"], 4);
|
||||
assert_eq!(payload[0]["event_params"]["command_read_action_count"], 1);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["command_list_files_action_count"],
|
||||
1
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["command_search_action_count"], 1);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["command_unknown_action_count"],
|
||||
1
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["started_at_ms"], 1_000);
|
||||
assert_eq!(payload[0]["event_params"]["completed_at_ms"], 1_045);
|
||||
assert_eq!(payload[0]["event_params"]["duration_ms"], 45);
|
||||
assert_eq!(payload[0]["event_params"]["execution_duration_ms"], 42);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["app_server_client"]["client_name"],
|
||||
"codex-tui"
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["thread_source"], "user");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn collaborator_tool_events_keep_response_ids_when_completion_races_sampling() {
|
||||
for response_first in [false, true] {
|
||||
@@ -771,7 +629,10 @@ async fn mcp_elicitation_classification_survives_turn_completion_and_preserves_c
|
||||
)
|
||||
.await;
|
||||
|
||||
let turn_metadata = test_turn_metadata(/*root_turn_id*/ None);
|
||||
let mut turn_metadata = test_turn_metadata(/*root_turn_id*/ None);
|
||||
std::sync::Arc::get_mut(&mut turn_metadata)
|
||||
.expect("unique metadata")
|
||||
.turn_trigger = Some("automation_cron_scheduled".to_string());
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Custom(CustomAnalyticsFact::TurnResolvedConfig(Box::new(
|
||||
@@ -870,6 +731,12 @@ async fn mcp_elicitation_classification_survives_turn_completion_and_preserves_c
|
||||
}
|
||||
|
||||
let payload = serde_json::to_value(&events).expect("serialize analytics events");
|
||||
for event in payload.as_array().expect("analytics events array") {
|
||||
assert_eq!(
|
||||
event["event_params"]["turn_trigger"],
|
||||
"automation_cron_scheduled"
|
||||
);
|
||||
}
|
||||
let classifications = payload
|
||||
.as_array()
|
||||
.expect("analytics events array")
|
||||
@@ -1028,3 +895,146 @@ async fn image_generation_events_preserve_transparent_background_metadata() {
|
||||
assert_eq!(payload["event_params"]["terminal_status"], json!(status));
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn item_lifecycle_notifications_publish_command_execution_event() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
|
||||
ingest_review_prerequisites(&mut reducer, &mut events).await;
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Notification(Box::new(sample_turn_started_notification(
|
||||
"thread-1", "turn-1",
|
||||
))),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
for model in ["invoking-model", "later-model"] {
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Notification(Box::new(ServerNotification::ItemStarted(
|
||||
ItemStartedNotification::new(
|
||||
"thread-1".to_string(),
|
||||
"turn-1".to_string(),
|
||||
{
|
||||
let mut item = sample_command_execution_item(
|
||||
CommandExecutionStatus::InProgress,
|
||||
/*exit_code*/ None,
|
||||
/*duration_ms*/ None,
|
||||
);
|
||||
if let ThreadItemPayload::CommandExecution { model_context, .. } =
|
||||
&mut item
|
||||
{
|
||||
*model_context =
|
||||
Some(codex_protocol::items::ModelInvocationContext {
|
||||
model_slug: model.to_string(),
|
||||
reasoning_effort: Some("max".to_string()),
|
||||
});
|
||||
}
|
||||
item
|
||||
},
|
||||
/*started_at_ms*/ 1_000,
|
||||
),
|
||||
))),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
assert!(
|
||||
events.is_empty(),
|
||||
"tool item event should emit on completion"
|
||||
);
|
||||
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Notification(Box::new(ServerNotification::ItemCompleted(
|
||||
ItemCompletedNotification::new(
|
||||
"thread-1".to_string(),
|
||||
"turn-1".to_string(),
|
||||
sample_command_execution_item_with_actions(
|
||||
CommandExecutionStatus::Completed,
|
||||
Some(0),
|
||||
Some(42),
|
||||
vec![
|
||||
CommandAction::Read {
|
||||
command: "cat README.md".to_string(),
|
||||
name: "README.md".to_string(),
|
||||
path: test_path_buf("/tmp/README.md").abs().into(),
|
||||
},
|
||||
CommandAction::ListFiles {
|
||||
command: "ls".to_string(),
|
||||
path: None,
|
||||
},
|
||||
CommandAction::Search {
|
||||
command: "rg TODO".to_string(),
|
||||
query: Some("TODO".to_string()),
|
||||
path: None,
|
||||
},
|
||||
CommandAction::Unknown {
|
||||
command: "cargo test".to_string(),
|
||||
},
|
||||
],
|
||||
Some("sample@openai-curated"),
|
||||
Some("scripts/run.py"),
|
||||
Some(SandboxType::LinuxSeccomp),
|
||||
),
|
||||
/*started_at_ms*/ None,
|
||||
/*completed_at_ms*/ 1_045,
|
||||
),
|
||||
))),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
|
||||
let payload = serde_json::to_value(&events).expect("serialize events");
|
||||
assert_eq!(payload.as_array().expect("events array").len(), 1);
|
||||
assert_eq!(payload[0]["event_params"]["model_slug"], "invoking-model");
|
||||
assert_eq!(payload[0]["event_params"]["sandbox_backend"], "seccomp");
|
||||
assert_eq!(payload[0]["event_params"]["reasoning_effort"], "max");
|
||||
assert_eq!(payload[0]["event_type"], "codex_command_execution_event");
|
||||
assert_eq!(payload[0]["event_params"]["thread_id"], "thread-1");
|
||||
assert_eq!(payload[0]["event_params"]["session_id"], "session-thread-1");
|
||||
assert_eq!(payload[0]["event_params"]["turn_id"], "turn-1");
|
||||
assert_eq!(payload[0]["event_params"]["item_id"], "item-1");
|
||||
assert_eq!(payload[0]["event_params"]["tool_name"], "shell");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["plugin_id"],
|
||||
"sample@openai-curated"
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["script_path"], "scripts/run.py");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["command_execution_source"],
|
||||
"agent"
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["terminal_status"], "completed");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["final_approval_outcome"],
|
||||
"unknown"
|
||||
);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["failure_kind"],
|
||||
serde_json::Value::Null
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["exit_code"], 0);
|
||||
assert_eq!(payload[0]["event_params"]["command_total_action_count"], 4);
|
||||
assert_eq!(payload[0]["event_params"]["command_read_action_count"], 1);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["command_list_files_action_count"],
|
||||
1
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["command_search_action_count"], 1);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["command_unknown_action_count"],
|
||||
1
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["started_at_ms"], 1_000);
|
||||
assert_eq!(payload[0]["event_params"]["completed_at_ms"], 1_045);
|
||||
assert_eq!(payload[0]["event_params"]["duration_ms"], 45);
|
||||
assert_eq!(payload[0]["event_params"]["execution_duration_ms"], 42);
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["app_server_client"]["client_name"],
|
||||
"codex-tui"
|
||||
);
|
||||
assert_eq!(payload[0]["event_params"]["thread_source"], "user");
|
||||
}
|
||||
@@ -64,6 +64,7 @@ pub(super) const TEST_PRODUCT_CLIENT_ID: &str = "codex_work_desktop";
|
||||
|
||||
pub(super) struct TestTurnMetadata {
|
||||
pub(super) root_turn_id: Mutex<Option<String>>,
|
||||
pub(super) turn_trigger: Option<String>,
|
||||
}
|
||||
|
||||
impl TurnAnalyticsMetadata for TestTurnMetadata {
|
||||
@@ -72,7 +73,7 @@ impl TurnAnalyticsMetadata for TestTurnMetadata {
|
||||
}
|
||||
|
||||
fn turn_trigger(&self) -> Option<String> {
|
||||
None
|
||||
self.turn_trigger.clone()
|
||||
}
|
||||
|
||||
fn codex_turn_source(&self) -> Option<String> {
|
||||
@@ -83,6 +84,7 @@ impl TurnAnalyticsMetadata for TestTurnMetadata {
|
||||
pub(super) fn test_turn_metadata(root_turn_id: Option<&str>) -> Arc<TestTurnMetadata> {
|
||||
Arc::new(TestTurnMetadata {
|
||||
root_turn_id: Mutex::new(root_turn_id.map(str::to_string)),
|
||||
turn_trigger: None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -110,6 +112,7 @@ pub(super) fn sample_thread_with_metadata(
|
||||
extra: None,
|
||||
session_id: format!("session-{thread_id}"),
|
||||
forked_from_id: None,
|
||||
attached_to_thread_id: None,
|
||||
parent_thread_id,
|
||||
preview: "first prompt".to_string(),
|
||||
ephemeral,
|
||||
|
||||
@@ -19,6 +19,7 @@ codex-app-server-transport = { workspace = true }
|
||||
codex-arg0 = { workspace = true }
|
||||
codex-cloud-client = { path = "../cloud-client" }
|
||||
codex-config = { workspace = true }
|
||||
codex-login = { workspace = true }
|
||||
codex-core = { workspace = true }
|
||||
codex-exec-server = { workspace = true }
|
||||
codex-feedback = { workspace = true }
|
||||
@@ -42,3 +43,4 @@ pretty_assertions = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
||||
wiremock = { workspace = true }
|
||||
@@ -3,12 +3,21 @@
|
||||
|
||||
use crate::AppServerEvent;
|
||||
use crate::RequestResult;
|
||||
use crate::TypedRequestError;
|
||||
use codex_app_server_protocol::ClientNotification;
|
||||
use codex_app_server_protocol::ClientRequest;
|
||||
use codex_app_server_protocol::JSONRPCErrorError;
|
||||
use codex_app_server_protocol::ModelListParams;
|
||||
use codex_app_server_protocol::RequestId;
|
||||
use codex_app_server_protocol::Result as JsonRpcResult;
|
||||
use codex_app_server_protocol::Turn;
|
||||
use codex_app_server_protocol::TurnStartParams;
|
||||
use std::collections::HashMap;
|
||||
use std::io;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::MutexGuard;
|
||||
use std::sync::PoisonError;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
@@ -16,6 +25,13 @@ use tokio::sync::oneshot;
|
||||
/// Unsupported operations must return an explicit error; they must not claim success.
|
||||
pub enum CloudOperation {
|
||||
Request(Box<ClientRequest>),
|
||||
/// Host project metadata stays on the private transport, outside the app-server wire.
|
||||
StartProjectThread {
|
||||
request_id: RequestId,
|
||||
params: Box<codex_app_server_protocol::ThreadStartParams>,
|
||||
project: codex_cloud_client::ProjectEnvironment,
|
||||
},
|
||||
SubmitUserMessage(Box<TurnStartParams>),
|
||||
Notify(ClientNotification),
|
||||
Resolve {
|
||||
request_id: RequestId,
|
||||
@@ -28,6 +44,15 @@ pub enum CloudOperation {
|
||||
Shutdown,
|
||||
}
|
||||
|
||||
/// One server-decided admission, not completion. A duplicate carries identity
|
||||
/// only; read history or observe the reply stream before inferring its status.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub enum CloudUserMessageReceipt {
|
||||
Started(Turn),
|
||||
Steered(Turn),
|
||||
Duplicate { turn_id: Option<String> },
|
||||
}
|
||||
|
||||
/// An operation and its single response. Dropping a caller does not undo admission;
|
||||
/// cloud workers must not retry mutations when the receiver has gone away.
|
||||
pub struct CloudCommand {
|
||||
@@ -38,9 +63,57 @@ pub struct CloudCommand {
|
||||
#[derive(Clone)]
|
||||
pub struct CloudRequestHandle {
|
||||
commands: mpsc::Sender<CloudCommand>,
|
||||
catalog: Option<Arc<codex_cloud_client::Client>>,
|
||||
}
|
||||
|
||||
/// Tracks only losses queued for delivery. The worker remains the sole owner
|
||||
/// of the active attachment. A successful replacement supersedes earlier losses
|
||||
/// for that conversation, even if the replacement itself later ends.
|
||||
#[derive(Clone, Default)]
|
||||
pub(super) struct CloudStreamLosses(Arc<Mutex<HashMap<String, PendingLosses>>>);
|
||||
|
||||
#[derive(Default)]
|
||||
struct PendingLosses {
|
||||
remaining: usize,
|
||||
superseded: usize,
|
||||
}
|
||||
|
||||
impl CloudStreamLosses {
|
||||
fn pending(&self) -> MutexGuard<'_, HashMap<String, PendingLosses>> {
|
||||
self.0.lock().unwrap_or_else(PoisonError::into_inner)
|
||||
}
|
||||
|
||||
pub(super) fn record(&self, thread_id: &str) {
|
||||
self.pending()
|
||||
.entry(thread_id.to_owned())
|
||||
.or_default()
|
||||
.remaining += 1;
|
||||
}
|
||||
|
||||
pub(super) fn supersede(&self, thread_id: &str) {
|
||||
if let Some(losses) = self.pending().get_mut(thread_id) {
|
||||
losses.superseded = losses.remaining;
|
||||
}
|
||||
}
|
||||
|
||||
fn should_deliver(&self, thread_id: &str) -> bool {
|
||||
let mut pending = self.pending();
|
||||
let Some(losses) = pending.get_mut(thread_id) else {
|
||||
return true;
|
||||
};
|
||||
// A single worker sends losses in the same order as it records them.
|
||||
let deliver = losses.superseded == 0;
|
||||
losses.superseded = losses.superseded.saturating_sub(1);
|
||||
losses.remaining -= 1;
|
||||
if losses.remaining == 0 {
|
||||
pending.remove(thread_id);
|
||||
}
|
||||
deliver
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CloudClient {
|
||||
pub(super) stream_losses: CloudStreamLosses,
|
||||
handle: CloudRequestHandle,
|
||||
events: mpsc::UnboundedReceiver<AppServerEvent>,
|
||||
}
|
||||
@@ -55,12 +128,27 @@ impl CloudClient {
|
||||
Self,
|
||||
mpsc::Receiver<CloudCommand>,
|
||||
mpsc::UnboundedSender<AppServerEvent>,
|
||||
) {
|
||||
Self::channel_with_catalog(capacity, /*catalog*/ None)
|
||||
}
|
||||
|
||||
pub(super) fn channel_with_catalog(
|
||||
capacity: usize,
|
||||
catalog: Option<codex_cloud_client::Client>,
|
||||
) -> (
|
||||
Self,
|
||||
mpsc::Receiver<CloudCommand>,
|
||||
mpsc::UnboundedSender<AppServerEvent>,
|
||||
) {
|
||||
let (commands, receiver) = mpsc::channel(capacity.max(1));
|
||||
let (events, event_receiver) = mpsc::unbounded_channel();
|
||||
(
|
||||
Self {
|
||||
handle: CloudRequestHandle { commands },
|
||||
stream_losses: CloudStreamLosses::default(),
|
||||
handle: CloudRequestHandle {
|
||||
commands,
|
||||
catalog: catalog.map(Arc::new),
|
||||
},
|
||||
events: event_receiver,
|
||||
},
|
||||
receiver,
|
||||
@@ -73,7 +161,15 @@ impl CloudClient {
|
||||
}
|
||||
|
||||
pub(crate) async fn next_event(&mut self) -> Option<AppServerEvent> {
|
||||
self.events.recv().await
|
||||
while let Some(event) = self.events.recv().await {
|
||||
if let AppServerEvent::ThreadStreamDisconnected(error) = &event
|
||||
&& !self.stream_losses.should_deliver(&error.thread_id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return Some(event);
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub(crate) async fn request(&self, request: ClientRequest) -> io::Result<RequestResult> {
|
||||
@@ -111,6 +207,73 @@ impl CloudClient {
|
||||
}
|
||||
|
||||
impl CloudRequestHandle {
|
||||
/// Whether a completed model read still belongs to the bound Cloud account.
|
||||
pub fn model_catalog_is_current(&self) -> bool {
|
||||
self.catalog
|
||||
.as_ref()
|
||||
.is_none_or(|catalog| catalog.model_catalog_is_current())
|
||||
}
|
||||
|
||||
async fn model_list(
|
||||
catalog: &codex_cloud_client::Client,
|
||||
params: &ModelListParams,
|
||||
) -> RequestResult {
|
||||
if params.model_provider.is_some() {
|
||||
return Err(JSONRPCErrorError {
|
||||
code: -32602,
|
||||
message: "Cloud model discovery uses the server's model provider.".into(),
|
||||
data: None,
|
||||
});
|
||||
}
|
||||
let result = async {
|
||||
let body = catalog
|
||||
.list_models(
|
||||
params.cursor.as_deref(),
|
||||
params.limit,
|
||||
params.include_hidden,
|
||||
)
|
||||
.await
|
||||
.map_err(|error| error.to_string())?;
|
||||
if !catalog.model_catalog_is_current() {
|
||||
return Err("Cloud model catalog account changed.".into());
|
||||
}
|
||||
serde_json::from_slice(&body)
|
||||
.map_err(|_| "Invalid Cloud model catalog response.".into())
|
||||
}
|
||||
.await;
|
||||
result.map_err(|message| JSONRPCErrorError {
|
||||
code: -32000,
|
||||
message,
|
||||
data: None,
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) async fn start_project_thread(
|
||||
&self,
|
||||
request_id: RequestId,
|
||||
params: codex_app_server_protocol::ThreadStartParams,
|
||||
project: codex_cloud_client::ProjectEnvironment,
|
||||
) -> io::Result<RequestResult> {
|
||||
self.send(CloudOperation::StartProjectThread {
|
||||
request_id,
|
||||
params: Box::new(params),
|
||||
project,
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
/// Submit once with a stable message ID and saved thread settings. The server
|
||||
/// starts or steers; an error can mean admission is unknown. Never auto-resend.
|
||||
pub async fn submit_user_message(
|
||||
&self,
|
||||
params: TurnStartParams,
|
||||
) -> Result<CloudUserMessageReceipt, TypedRequestError> {
|
||||
let response = self
|
||||
.send(CloudOperation::SubmitUserMessage(Box::new(params)))
|
||||
.await;
|
||||
crate::decode_typed_response("cloud/submitUserMessage", response)
|
||||
}
|
||||
|
||||
async fn send(&self, operation: CloudOperation) -> io::Result<RequestResult> {
|
||||
let (response, result) = oneshot::channel();
|
||||
self.commands
|
||||
@@ -136,6 +299,12 @@ impl CloudRequestHandle {
|
||||
}
|
||||
|
||||
pub(crate) async fn request(&self, request: ClientRequest) -> io::Result<RequestResult> {
|
||||
// Catalog reads must not occupy the serialized send and attachment lane.
|
||||
if let (Some(catalog), ClientRequest::ModelList { params, .. }) = (&self.catalog, &request)
|
||||
{
|
||||
// Keep the catalog HTTP state out of the shared request future.
|
||||
return Ok(Box::pin(Self::model_list(catalog, params)).await);
|
||||
}
|
||||
self.send(CloudOperation::Request(Box::new(request))).await
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
//! Opens the internal Cloud preview with the selected ChatGPT credentials and local transport policy.
|
||||
|
||||
use super::start_worker;
|
||||
use crate::AppServerClient;
|
||||
use crate::legacy_core::config::Config;
|
||||
use codex_app_server_protocol as protocol;
|
||||
use codex_cloud_client as cloud;
|
||||
use codex_login::token_data::parse_jwt_expiration;
|
||||
use codex_protocol::account::PlanType;
|
||||
use color_eyre::eyre::Result;
|
||||
use color_eyre::eyre::bail;
|
||||
use color_eyre::eyre::eyre;
|
||||
|
||||
const ORIGIN: &str = "https://codex-cloud-backend.chatgpt.com";
|
||||
|
||||
pub async fn connect(config: &Config) -> Result<AppServerClient> {
|
||||
// The preview borrows Local's policy without owning credential updates.
|
||||
let factory = config.http_client_factory();
|
||||
let policy = factory.network_policy().clone().for_current_account();
|
||||
let factory = factory.with_network_policy(policy);
|
||||
let auth = config
|
||||
.auth_config()
|
||||
.load_auth(/*enable_codex_api_key_env*/ false)
|
||||
.await?
|
||||
.ok_or_else(|| eyre!("Sign in with ChatGPT and reopen Codex to use Cloud."))?;
|
||||
if !auth.is_chatgpt_auth() || auth.is_fedramp_account() {
|
||||
bail!("This account is not supported by the cloud conversation preview.");
|
||||
}
|
||||
let account_id = auth
|
||||
.get_account_id()
|
||||
.ok_or_else(|| eyre!("Cloud requires a selected account."))?;
|
||||
let token = auth.get_token()?;
|
||||
if let Ok(Some(expires)) = parse_jwt_expiration(&token)
|
||||
&& std::time::SystemTime::from(expires) <= std::time::SystemTime::now()
|
||||
{
|
||||
bail!("Your ChatGPT credential expired. Reopen Codex to reconnect.");
|
||||
}
|
||||
factory.network_policy().acquire(&ORIGIN.parse()?)?;
|
||||
let credentials = cloud::Credentials::new(&token, &account_id)?;
|
||||
let client = cloud::Client::new(&factory, ORIGIN, credentials)?;
|
||||
Ok(start_worker(
|
||||
client,
|
||||
protocol::GetAccountResponse {
|
||||
user_id: auth.get_chatgpt_user_id(),
|
||||
account: Some(protocol::Account::Chatgpt {
|
||||
email: auth.get_account_email(),
|
||||
plan_type: auth.account_plan_type().unwrap_or(PlanType::Unknown),
|
||||
workspace_name: None,
|
||||
}),
|
||||
requires_openai_auth: true,
|
||||
workspace_routing: None,
|
||||
},
|
||||
))
|
||||
}
|
||||
@@ -5,6 +5,147 @@
|
||||
use super::*;
|
||||
use futures::stream;
|
||||
use pretty_assertions::assert_eq;
|
||||
use wiremock::Mock;
|
||||
use wiremock::MockServer;
|
||||
use wiremock::ResponseTemplate;
|
||||
use wiremock::matchers::method;
|
||||
use wiremock::matchers::path;
|
||||
|
||||
#[tokio::test]
|
||||
async fn failed_archive_loaded_list_tracks_attachment_not_cached_metadata() -> Result<()> {
|
||||
let server = MockServer::start().await;
|
||||
let home = tempfile::tempdir()?;
|
||||
let config = crate::legacy_core::config::ConfigBuilder::default()
|
||||
.codex_home(home.path().to_owned())
|
||||
.fallback_cwd(Some(home.path().to_owned()))
|
||||
.without_project_context()
|
||||
.build()
|
||||
.await?;
|
||||
let cached = Box::new(serde_json::from_value::<protocol::ThreadResumeResponse>(
|
||||
serde_json::json!({
|
||||
"thread": {
|
||||
"id": "t", "sessionId": "t", "preview": "", "ephemeral": false,
|
||||
"modelProvider": "openai", "createdAt": 0, "updatedAt": 0,
|
||||
"status": {"type": "idle"}, "cwd": home.path(), "cliVersion": "",
|
||||
"source": "cli", "turns": [],
|
||||
},
|
||||
"model": "test", "modelProvider": "openai", "cwd": home.path(),
|
||||
"approvalPolicy": "never", "approvalsReviewer": "user",
|
||||
"sandbox": {"type": "readOnly"},
|
||||
}),
|
||||
)?);
|
||||
let mut requests = requests::Requests {
|
||||
client: cloud::Client::new(
|
||||
&config.http_client_factory(),
|
||||
&server.uri(),
|
||||
cloud::Credentials::new("synthetic-bearer", "synthetic-account")?,
|
||||
)?,
|
||||
account: protocol::GetAccountResponse {
|
||||
user_id: None,
|
||||
account: None,
|
||||
requires_openai_auth: true,
|
||||
workspace_routing: None,
|
||||
},
|
||||
loaded: Some(cached.clone()),
|
||||
warned_partial_history: None,
|
||||
};
|
||||
let (output, mut notifications) = mpsc::unbounded_channel();
|
||||
let (sender, stream) = futures::channel::mpsc::unbounded();
|
||||
let mut replies = Replies::default();
|
||||
replies
|
||||
.replace("t", async { Ok(stream.boxed()) }, &output)
|
||||
.await?;
|
||||
Mock::given(method("POST"))
|
||||
.and(path(
|
||||
"/oaiproto.codex_app_server_backend.ThreadService/ArchiveThread",
|
||||
))
|
||||
.respond_with(ResponseTemplate::new(503))
|
||||
.expect(2)
|
||||
.mount(&server)
|
||||
.await;
|
||||
|
||||
// A rejection before shutdown must preserve both this attachment and an
|
||||
// unrelated attachment when the rejected archive targets another thread.
|
||||
for id in ["t", "other"] {
|
||||
assert!(
|
||||
handle_request(
|
||||
protocol::ClientRequest::ThreadArchive {
|
||||
request_id: protocol::RequestId::Integer(1),
|
||||
params: protocol::ThreadArchiveParams {
|
||||
thread_id: id.into(),
|
||||
},
|
||||
},
|
||||
cloud::SubmissionMode::StartIfIdle,
|
||||
/*project*/ None,
|
||||
&mut requests,
|
||||
&mut replies,
|
||||
&output,
|
||||
)
|
||||
.await
|
||||
.is_err()
|
||||
);
|
||||
let loaded = handle_request(
|
||||
protocol::ClientRequest::ThreadLoadedList {
|
||||
request_id: protocol::RequestId::Integer(2),
|
||||
params: Default::default(),
|
||||
},
|
||||
cloud::SubmissionMode::StartIfIdle,
|
||||
/*project*/ None,
|
||||
&mut requests,
|
||||
&mut replies,
|
||||
&output,
|
||||
)
|
||||
.await?;
|
||||
assert_eq!(
|
||||
loaded,
|
||||
serde_json::json!({"data": ["t"], "nextCursor": null})
|
||||
);
|
||||
replies.admit_turn("t", &output)?;
|
||||
assert!(notifications.try_recv().is_err());
|
||||
}
|
||||
|
||||
// Model a late archive failure winning while_listening's biased select
|
||||
// when Attach's EOF is also ready. No worker poll has observed the EOF yet.
|
||||
drop(sender);
|
||||
let failed: Result<()> = replies
|
||||
.while_listening(
|
||||
async { Err(eyre!("archive failed after shutdown")) },
|
||||
&output,
|
||||
)
|
||||
.await;
|
||||
assert!(failed.is_err());
|
||||
assert!(replies.active.is_some());
|
||||
// The first query must notice EOF itself; the second sees an already
|
||||
// observed disconnect. Neither may use the cached resume response.
|
||||
for _ in 0..2 {
|
||||
let loaded = handle_request(
|
||||
protocol::ClientRequest::ThreadLoadedList {
|
||||
request_id: protocol::RequestId::Integer(3),
|
||||
params: Default::default(),
|
||||
},
|
||||
cloud::SubmissionMode::StartIfIdle,
|
||||
/*project*/ None,
|
||||
&mut requests,
|
||||
&mut replies,
|
||||
&output,
|
||||
)
|
||||
.await?;
|
||||
assert_eq!(loaded, serde_json::json!({"data": [], "nextCursor": null}));
|
||||
assert_eq!(requests.loaded.as_ref(), Some(&cached));
|
||||
}
|
||||
let AppServerEvent::ThreadStreamDisconnected(error) = notifications.try_recv()? else {
|
||||
panic!("expected the existing stream-loss recovery notification");
|
||||
};
|
||||
assert_eq!(
|
||||
*error,
|
||||
cloud_error(
|
||||
"t",
|
||||
"Cloud stream ended. Reopen the conversation to reconnect."
|
||||
)
|
||||
);
|
||||
assert!(notifications.try_recv().is_err());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn failed_replacement_keeps_old_thread_until_new_attachment_succeeds() -> Result<()> {
|
||||
@@ -44,19 +185,62 @@ async fn failed_replacement_keeps_old_thread_until_new_attachment_succeeds() ->
|
||||
|
||||
let _ = close.send(());
|
||||
assert!(replies.admit_turn("new", &output).is_err());
|
||||
let AppServerEvent::ServerNotification(notification) = notifications.try_recv()? else {
|
||||
let AppServerEvent::ThreadStreamDisconnected(notification) = notifications.try_recv()? else {
|
||||
panic!("expected a disconnect notification");
|
||||
};
|
||||
assert_eq!(
|
||||
serde_json::to_value(notification)?,
|
||||
serde_json::to_value(cloud_error(
|
||||
serde_json::to_value(protocol::ServerNotification::Error(*notification))?,
|
||||
serde_json::to_value(protocol::ServerNotification::Error(cloud_error(
|
||||
"new",
|
||||
"Cloud stream ended. Reopen the conversation to reconnect."
|
||||
))?
|
||||
)))?
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn successful_reopen_supersedes_only_earlier_losses_for_that_thread() -> Result<()> {
|
||||
let (mut client, _commands, output) = CloudClient::channel(/*capacity*/ 1);
|
||||
let mut replies = Replies {
|
||||
stream_losses: client.stream_losses.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
for id in ["reopened", "different", "reopened"] {
|
||||
let (sender, stream) = futures::channel::mpsc::unbounded();
|
||||
replies
|
||||
.replace(id, async { Ok(stream.boxed()) }, &output)
|
||||
.await?;
|
||||
drop(sender);
|
||||
replies.forward_next(&output).await;
|
||||
}
|
||||
assert!(
|
||||
replies
|
||||
.replace("reopened", async { Ok(stream::empty().boxed()) }, &output)
|
||||
.await
|
||||
.is_err()
|
||||
);
|
||||
|
||||
// The first EOF was followed by a successful reopen. A different thread's
|
||||
// EOF and the reopened thread's newer EOF must still be delivered, in order.
|
||||
drop(output);
|
||||
for expected in ["different", "reopened"] {
|
||||
let Some(AppServerEvent::ThreadStreamDisconnected(error)) = client.next_event().await
|
||||
else {
|
||||
panic!("expected a thread stream disconnect");
|
||||
};
|
||||
assert_eq!(
|
||||
*error,
|
||||
cloud_error(
|
||||
expected,
|
||||
"Cloud stream ended. Reopen the conversation to reconnect."
|
||||
)
|
||||
);
|
||||
}
|
||||
assert!(client.next_event().await.is_none());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn attachment_status_follows_its_server_notifications() -> Result<()> {
|
||||
let (output, _notifications) = mpsc::unbounded_channel();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use codex_app_server_protocol as protocol;
|
||||
use codex_cloud_client as cloud;
|
||||
use codex_protocol::models::ImageDetail;
|
||||
use color_eyre::eyre::Result;
|
||||
use color_eyre::eyre::bail;
|
||||
|
||||
@@ -92,15 +93,49 @@ pub(super) fn item_summary(item: cloud::ItemSummary) -> Option<protocol::ThreadI
|
||||
cloud::ItemSummary::UserMessage {
|
||||
id,
|
||||
client_id,
|
||||
text,
|
||||
content,
|
||||
} => protocol::ThreadItemPayload::UserMessage {
|
||||
id,
|
||||
client_id,
|
||||
content: text
|
||||
content: content
|
||||
.into_iter()
|
||||
.map(|text| protocol::UserInput::Text {
|
||||
text,
|
||||
text_elements: Vec::new(),
|
||||
.map(|item| match item {
|
||||
cloud::UserMessageInput::Text {
|
||||
text,
|
||||
text_elements,
|
||||
} => protocol::UserInput::Text {
|
||||
text,
|
||||
text_elements: text_elements
|
||||
.into_iter()
|
||||
.map(|element| {
|
||||
protocol::TextElement::new(
|
||||
protocol::ByteRange {
|
||||
start: element.start,
|
||||
end: element.end,
|
||||
},
|
||||
element.placeholder,
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
cloud::UserMessageInput::Image { image, detail } => {
|
||||
protocol::UserInput::Image {
|
||||
image: match image {
|
||||
cloud::ImageReference::Url(url) => {
|
||||
protocol::ImageReference::Inline { url }
|
||||
}
|
||||
cloud::ImageReference::FileId(file_id) => {
|
||||
protocol::ImageReference::File { file_id }
|
||||
}
|
||||
},
|
||||
detail: detail.map(|detail| match detail {
|
||||
cloud::ImageDetail::Auto => ImageDetail::Auto,
|
||||
cloud::ImageDetail::Low => ImageDetail::Low,
|
||||
cloud::ImageDetail::High => ImageDetail::High,
|
||||
cloud::ImageDetail::Original => ImageDetail::Original,
|
||||
}),
|
||||
}
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
@@ -109,6 +144,7 @@ pub(super) fn item_summary(item: cloud::ItemSummary) -> Option<protocol::ThreadI
|
||||
text,
|
||||
questions,
|
||||
} => protocol::ThreadItemPayload::AgentMessage {
|
||||
moderation: None,
|
||||
id,
|
||||
text,
|
||||
phase: None,
|
||||
|
||||
@@ -4,11 +4,25 @@ use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn text_receipt_preserves_submission_identity() {
|
||||
fn image_receipt_preserves_submission_identity_and_attachment() {
|
||||
let label = "[Image #1]";
|
||||
let actual = item_summary(cloud::ItemSummary::UserMessage {
|
||||
id: "item-1".into(),
|
||||
client_id: Some("submission-1".into()),
|
||||
text: vec!["hello".into(), "world".into()],
|
||||
content: vec![
|
||||
cloud::UserMessageInput::Image {
|
||||
image: cloud::ImageReference::FileId("file-synthetic".into()),
|
||||
detail: Some(cloud::ImageDetail::High),
|
||||
},
|
||||
cloud::UserMessageInput::Text {
|
||||
text: format!("{label} describe"),
|
||||
text_elements: vec![cloud::UserMessageTextElement {
|
||||
start: 0,
|
||||
end: label.len(),
|
||||
placeholder: Some(label.into()),
|
||||
}],
|
||||
},
|
||||
],
|
||||
});
|
||||
assert_eq!(
|
||||
actual,
|
||||
@@ -17,13 +31,21 @@ fn text_receipt_preserves_submission_identity() {
|
||||
id: "item-1".into(),
|
||||
client_id: Some("submission-1".into()),
|
||||
content: vec![
|
||||
protocol::UserInput::Text {
|
||||
text: "hello".into(),
|
||||
text_elements: Vec::new()
|
||||
protocol::UserInput::Image {
|
||||
image: protocol::ImageReference::File {
|
||||
file_id: "file-synthetic".into(),
|
||||
},
|
||||
detail: Some(ImageDetail::High),
|
||||
},
|
||||
protocol::UserInput::Text {
|
||||
text: "world".into(),
|
||||
text_elements: Vec::new()
|
||||
text: format!("{label} describe"),
|
||||
text_elements: vec![protocol::TextElement::new(
|
||||
protocol::ByteRange {
|
||||
start: 0,
|
||||
end: label.len(),
|
||||
},
|
||||
Some(label.into()),
|
||||
)],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -57,6 +79,7 @@ fn completed_reply_preserves_the_full_text_questions_and_timestamp() -> Result<(
|
||||
"thread".into(),
|
||||
"turn".into(),
|
||||
protocol::ThreadItemPayload::AgentMessage {
|
||||
moderation: None,
|
||||
id: "reply".into(),
|
||||
text: "Choose one".into(),
|
||||
phase: None,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
//! Adapts native Cloud requests and the currently open conversation’s reply stream.
|
||||
//! A replacement becomes active only after its native attachment opens successfully.
|
||||
//! Loaded-thread queries report reply attachments, not retained resume metadata.
|
||||
|
||||
mod auth;
|
||||
mod events;
|
||||
mod requests;
|
||||
|
||||
@@ -8,6 +10,7 @@ use crate::AppServerClient;
|
||||
use crate::AppServerEvent;
|
||||
use crate::CloudClient;
|
||||
use crate::CloudOperation;
|
||||
use crate::cloud::CloudStreamLosses;
|
||||
use codex_app_server_protocol as protocol;
|
||||
use codex_cloud_client as cloud;
|
||||
use color_eyre::eyre::Result;
|
||||
@@ -19,8 +22,19 @@ use futures::stream::BoxStream;
|
||||
use serde_json::Value;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
pub use auth::connect;
|
||||
|
||||
type ReplyStream = BoxStream<'static, Result<cloud::Event, cloud::Error>>;
|
||||
|
||||
/// Rejected locally before an admission request can be sent.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[error("{0}")]
|
||||
struct PreflightRejection(&'static str);
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[error("Cloud stream is not connected. Reopen the conversation before sending.")]
|
||||
struct MissingReplyAttachment;
|
||||
|
||||
struct Attachment {
|
||||
thread_id: String,
|
||||
stream: ReplyStream,
|
||||
@@ -29,6 +43,7 @@ struct Attachment {
|
||||
#[derive(Default)]
|
||||
struct Replies {
|
||||
active: Option<Attachment>,
|
||||
stream_losses: CloudStreamLosses,
|
||||
// Keep the last observed status through EOF until this conversation is unloaded.
|
||||
latest_status: Option<(String, cloud::ThreadStatus)>,
|
||||
}
|
||||
@@ -41,14 +56,13 @@ impl Replies {
|
||||
match active.stream.next().await {
|
||||
Some(Ok(event)) => forward(&active.thread_id, event, output, &mut self.latest_status),
|
||||
Some(Err(_)) | None => {
|
||||
send_notification(
|
||||
output,
|
||||
cloud_error(
|
||||
&active.thread_id,
|
||||
"Cloud stream ended. Reopen the conversation to reconnect.",
|
||||
),
|
||||
let error = cloud_error(
|
||||
&active.thread_id,
|
||||
"Cloud stream ended. Reopen the conversation to reconnect.",
|
||||
);
|
||||
self.active = None;
|
||||
self.stream_losses.record(&error.thread_id);
|
||||
let _ = output.send(AppServerEvent::ThreadStreamDisconnected(Box::new(error)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,14 +98,15 @@ impl Replies {
|
||||
Some(Some(Ok(event))) => Some(event),
|
||||
None => None,
|
||||
};
|
||||
self.latest_status = None;
|
||||
if let Some(event) = first_event {
|
||||
forward(id, event, output, &mut self.latest_status);
|
||||
}
|
||||
self.active = Some(Attachment {
|
||||
thread_id: id.to_owned(),
|
||||
stream,
|
||||
});
|
||||
self.stream_losses.supersede(id);
|
||||
self.latest_status = None;
|
||||
if let Some(event) = first_event {
|
||||
forward(id, event, output, &mut self.latest_status);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -119,7 +134,7 @@ impl Replies {
|
||||
&mut self,
|
||||
id: &str,
|
||||
output: &mpsc::UnboundedSender<AppServerEvent>,
|
||||
) -> Result<()> {
|
||||
) -> Result<(), MissingReplyAttachment> {
|
||||
// Notice a ready disconnect before sending. A continuous stream of events
|
||||
// must still allow commands to make progress.
|
||||
let _ = tokio::task::unconstrained(self.forward_next(output)).now_or_never();
|
||||
@@ -128,69 +143,126 @@ impl Replies {
|
||||
.as_ref()
|
||||
.is_none_or(|active| active.thread_id != id)
|
||||
{
|
||||
bail!("Cloud stream is not connected. Reopen the conversation before sending.");
|
||||
return Err(MissingReplyAttachment);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Opens an app-server client backed by the authenticated native Cloud client.
|
||||
pub fn connect(client: cloud::Client, account: protocol::GetAccountResponse) -> AppServerClient {
|
||||
let (app_client, mut commands, output) = CloudClient::channel(/*capacity*/ 32);
|
||||
fn start_worker(client: cloud::Client, account: protocol::GetAccountResponse) -> AppServerClient {
|
||||
let (app_client, commands, output) =
|
||||
CloudClient::channel_with_catalog(/*capacity*/ 32, Some(client.clone()));
|
||||
let mut requests = requests::Requests {
|
||||
client,
|
||||
account,
|
||||
loaded: None,
|
||||
warned_partial_history: None,
|
||||
};
|
||||
let mut replies = Replies {
|
||||
stream_losses: app_client.stream_losses.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
tokio::spawn(async move {
|
||||
let mut replies = Replies::default();
|
||||
loop {
|
||||
let command = tokio::select! {
|
||||
_ = output.closed() => break,
|
||||
() = replies.forward_next(&output) => continue,
|
||||
command = commands.recv() => match command { Some(command) => command, None => break },
|
||||
};
|
||||
let result = match command.operation {
|
||||
CloudOperation::Shutdown => {
|
||||
let _ = command.response.send(Ok(Ok(Value::Null)));
|
||||
break;
|
||||
}
|
||||
CloudOperation::Request(request) => tokio::select! {
|
||||
_ = output.closed() => break,
|
||||
result = handle_request(*request, &mut requests, &mut replies, &output) => result,
|
||||
},
|
||||
CloudOperation::Notify(_) => {
|
||||
Err(eyre!("Cloud client notifications are not supported yet."))
|
||||
}
|
||||
CloudOperation::Resolve { .. } | CloudOperation::Reject { .. } => Err(eyre!(
|
||||
"Answer this cloud approval in another client; TUI approval replies are not supported yet."
|
||||
)),
|
||||
};
|
||||
let result = result.map_err(|error| protocol::JSONRPCErrorError {
|
||||
code: if error
|
||||
.downcast_ref::<requests::UnsupportedOperation>()
|
||||
.is_some()
|
||||
{
|
||||
-32601
|
||||
} else {
|
||||
-32000
|
||||
},
|
||||
message: error.to_string(),
|
||||
data: None,
|
||||
});
|
||||
let _ = command.response.send(Ok(result));
|
||||
}
|
||||
run_worker(commands, &mut requests, &mut replies, &output).await;
|
||||
});
|
||||
AppServerClient::Cloud(app_client)
|
||||
}
|
||||
|
||||
async fn run_worker(
|
||||
mut commands: mpsc::Receiver<crate::CloudCommand>,
|
||||
requests: &mut requests::Requests,
|
||||
replies: &mut Replies,
|
||||
output: &mpsc::UnboundedSender<AppServerEvent>,
|
||||
) {
|
||||
loop {
|
||||
let command = tokio::select! {
|
||||
_ = output.closed() => return,
|
||||
() = replies.forward_next(output) => continue,
|
||||
command = commands.recv() => match command { Some(command) => command, None => return },
|
||||
};
|
||||
let user_message_submission =
|
||||
matches!(&command.operation, CloudOperation::SubmitUserMessage(_));
|
||||
let request = match command.operation {
|
||||
CloudOperation::Shutdown => {
|
||||
let _ = command.response.send(Ok(Ok(Value::Null)));
|
||||
return;
|
||||
}
|
||||
CloudOperation::Request(request) => {
|
||||
Ok((*request, cloud::SubmissionMode::StartIfIdle, None))
|
||||
}
|
||||
CloudOperation::StartProjectThread {
|
||||
request_id,
|
||||
params,
|
||||
project,
|
||||
} => Ok((
|
||||
protocol::ClientRequest::ThreadStart {
|
||||
request_id,
|
||||
params: *params,
|
||||
},
|
||||
cloud::SubmissionMode::StartIfIdle,
|
||||
Some(project),
|
||||
)),
|
||||
CloudOperation::SubmitUserMessage(params) => Ok((
|
||||
protocol::ClientRequest::TurnStart {
|
||||
// Native admission is keyed by the caller's stable message ID.
|
||||
request_id: protocol::RequestId::Integer(0),
|
||||
params: *params,
|
||||
},
|
||||
cloud::SubmissionMode::Steer,
|
||||
None,
|
||||
)),
|
||||
CloudOperation::Notify(_) => {
|
||||
Err(eyre!("Cloud client notifications are not supported yet."))
|
||||
}
|
||||
CloudOperation::Resolve { .. } | CloudOperation::Reject { .. } => Err(eyre!(
|
||||
"Answer this cloud approval in another client; TUI approval replies are not supported yet."
|
||||
)),
|
||||
};
|
||||
let result = match request {
|
||||
Ok((request, mode, project)) => tokio::select! {
|
||||
_ = output.closed() => return,
|
||||
result = handle_request(request, mode, project, requests, replies, output) => result,
|
||||
},
|
||||
Err(error) => Err(error),
|
||||
};
|
||||
let result = result.map_err(|error| protocol::JSONRPCErrorError {
|
||||
code: if error
|
||||
.downcast_ref::<requests::UnsupportedOperation>()
|
||||
.is_some()
|
||||
{
|
||||
-32601
|
||||
} else if error.is::<PreflightRejection>()
|
||||
|| user_message_submission && error.is::<MissingReplyAttachment>()
|
||||
{
|
||||
-32602
|
||||
} else {
|
||||
-32000
|
||||
},
|
||||
message: error.to_string(),
|
||||
data: None,
|
||||
});
|
||||
let _ = command.response.send(Ok(result));
|
||||
}
|
||||
}
|
||||
|
||||
async fn handle_request(
|
||||
request: protocol::ClientRequest,
|
||||
mode: cloud::SubmissionMode,
|
||||
project: Option<cloud::ProjectEnvironment>,
|
||||
requests: &mut requests::Requests,
|
||||
replies: &mut Replies,
|
||||
output: &mpsc::UnboundedSender<AppServerEvent>,
|
||||
) -> Result<Value> {
|
||||
if let protocol::ClientRequest::ThreadLoadedList { .. } = &request {
|
||||
// The archive RPC can fail after closing Attach. Observe a ready EOF even
|
||||
// when the RPC result won the worker's select before the stream did.
|
||||
let _ = tokio::task::unconstrained(replies.forward_next(output)).now_or_never();
|
||||
return Ok(serde_json::json!({
|
||||
"data": replies.active.iter().map(|active| &active.thread_id).collect::<Vec<_>>(),
|
||||
"nextCursor": null,
|
||||
}));
|
||||
}
|
||||
if let protocol::ClientRequest::ThreadRead { params, .. } = &request {
|
||||
return requests.read_thread(params, replies.thread_status(¶ms.thread_id));
|
||||
}
|
||||
@@ -212,10 +284,28 @@ async fn handle_request(
|
||||
replies.admit_turn(¶ms.thread_id, output)?;
|
||||
}
|
||||
match replies
|
||||
.while_listening(requests.handle(request, output), output)
|
||||
.while_listening(requests.handle(request, mode, project, output), output)
|
||||
.await?
|
||||
{
|
||||
requests::Response::Value(value) => Ok(value),
|
||||
requests::Response::Archived(thread_id) => {
|
||||
replies.detach(&thread_id);
|
||||
replies.stream_losses.supersede(&thread_id);
|
||||
if requests
|
||||
.loaded
|
||||
.as_ref()
|
||||
.is_some_and(|loaded| loaded.thread.id == thread_id)
|
||||
{
|
||||
requests.loaded = None;
|
||||
}
|
||||
send_notification(
|
||||
output,
|
||||
protocol::ServerNotification::ThreadArchived(
|
||||
protocol::ThreadArchivedNotification { thread_id },
|
||||
),
|
||||
);
|
||||
Ok(serde_json::to_value(protocol::ThreadArchiveResponse {})?)
|
||||
}
|
||||
requests::Response::Attach(settings) => {
|
||||
let id = &settings.thread.id;
|
||||
let result = serde_json::to_value(&settings)?;
|
||||
@@ -243,7 +333,10 @@ fn forward(
|
||||
cloud::Event::Transcript(event) => match events::transcript(event.thread_id, event.update) {
|
||||
Ok(Some(notification)) => notification,
|
||||
Ok(None) => return,
|
||||
Err(_) => cloud_error(id, "The cloud sent an unsupported transcript event."),
|
||||
Err(_) => protocol::ServerNotification::Error(cloud_error(
|
||||
id,
|
||||
"The cloud sent an unsupported transcript event.",
|
||||
)),
|
||||
},
|
||||
cloud::Event::ServerRequest(_) => protocol::ServerNotification::Warning(protocol::WarningNotification {
|
||||
thread_id: Some(id.to_owned()),
|
||||
@@ -261,8 +354,8 @@ fn send_notification(
|
||||
let _ = output.send(AppServerEvent::ServerNotification(Box::new(notification)));
|
||||
}
|
||||
|
||||
fn cloud_error(id: &str, message: &str) -> protocol::ServerNotification {
|
||||
protocol::ServerNotification::Error(protocol::ErrorNotification {
|
||||
fn cloud_error(id: &str, message: &str) -> protocol::ErrorNotification {
|
||||
protocol::ErrorNotification {
|
||||
thread_id: id.to_owned(),
|
||||
turn_id: String::new(),
|
||||
will_retry: false,
|
||||
@@ -272,9 +365,13 @@ fn cloud_error(id: &str, message: &str) -> protocol::ServerNotification {
|
||||
codex_error_info: None,
|
||||
misalignment: None,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "connection_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "submission_tests.rs"]
|
||||
mod submission_tests;
|
||||
@@ -7,7 +7,7 @@ use pretty_assertions::assert_eq;
|
||||
fn ordinary_multi_backend_resume_queries_cloud_interactive_threads_on_every_page() {
|
||||
// The mixed picker has no shared cwd/provider filter. It sends conventional
|
||||
// interactive source names, even when the connection belongs to Cloud.
|
||||
for (cursor, state_db_only) in [(None, true), (Some("page-2"), false)] {
|
||||
for (cursor, state_db_only, archived) in [(None, true, false), (Some("page-2"), false, true)] {
|
||||
let params = serde_json::from_value(json!({
|
||||
"currentAccountOnly": true,
|
||||
"cursor": cursor,
|
||||
@@ -15,13 +15,14 @@ fn ordinary_multi_backend_resume_queries_cloud_interactive_threads_on_every_page
|
||||
"sortKey": "updated_at",
|
||||
"modelProviders": [],
|
||||
"sourceKinds": ["cli", "vscode"],
|
||||
"archived": false,
|
||||
"archived": archived,
|
||||
"useStateDbOnly": state_db_only,
|
||||
}))
|
||||
.unwrap();
|
||||
let query = thread_list_query(params).unwrap();
|
||||
assert_eq!(query.cursor.as_deref(), cursor);
|
||||
assert_eq!(query.limit, Some(25));
|
||||
assert_eq!(query.archived, archived);
|
||||
assert!(matches!(query.sort_key, cloud::ThreadSortKey::UpdatedAt));
|
||||
assert!(matches!(
|
||||
query.sort_direction,
|
||||
@@ -34,7 +35,6 @@ fn ordinary_multi_backend_resume_queries_cloud_interactive_threads_on_every_page
|
||||
#[test]
|
||||
fn unsupported_filters_do_not_return_unrelated_cloud_rows() {
|
||||
for filter in [
|
||||
json!({"archived": true}),
|
||||
json!({"sourceKinds": ["exec"]}),
|
||||
json!({"attachedToThreadId": "other"}),
|
||||
json!({"modelProviders": ["other"]}),
|
||||
@@ -63,7 +63,13 @@ fn user_input_uses_stable_id_and_the_existing_cloud_configuration() {
|
||||
let request = cloud_message(message()).unwrap();
|
||||
assert_eq!(request.thread_id, "thread-a");
|
||||
assert_eq!(request.client_user_message_id, "submission-a");
|
||||
assert_eq!(request.text, "one\ntwo");
|
||||
assert_eq!(
|
||||
request.input,
|
||||
vec![cloud::UserMessageInput::Text {
|
||||
text: "one\ntwo".into(),
|
||||
text_elements: Vec::new(),
|
||||
}]
|
||||
);
|
||||
assert_eq!(
|
||||
request.turn_trigger.as_deref(),
|
||||
Some("safety_recourse_follow_up")
|
||||
@@ -89,6 +95,51 @@ fn user_input_uses_stable_id_and_the_existing_cloud_configuration() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn image_submission_keeps_attachment_markers_and_input_order() {
|
||||
let label = "[Image #1]";
|
||||
let request = cloud_message(protocol::TurnStartParams {
|
||||
input: vec![
|
||||
protocol::UserInput::Image {
|
||||
image: protocol::ImageReference::File {
|
||||
file_id: "file-synthetic".into(),
|
||||
},
|
||||
detail: Some(ImageDetail::High),
|
||||
},
|
||||
protocol::UserInput::Text {
|
||||
text: format!("{label} describe"),
|
||||
text_elements: vec![protocol::TextElement::new(
|
||||
protocol::ByteRange {
|
||||
start: 0,
|
||||
end: label.len(),
|
||||
},
|
||||
Some(label.into()),
|
||||
)],
|
||||
},
|
||||
],
|
||||
..message()
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
request.input,
|
||||
vec![
|
||||
cloud::UserMessageInput::Image {
|
||||
image: cloud::ImageReference::FileId("file-synthetic".into()),
|
||||
detail: Some(cloud::ImageDetail::High),
|
||||
},
|
||||
cloud::UserMessageInput::Text {
|
||||
text: format!("{label} describe"),
|
||||
text_elements: vec![cloud::UserMessageTextElement {
|
||||
start: 0,
|
||||
end: label.len(),
|
||||
placeholder: Some(label.into()),
|
||||
}],
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn duplicate_and_queued_admissions_never_invent_a_running_turn() {
|
||||
for outcome in [
|
||||
@@ -108,3 +159,43 @@ fn duplicate_and_queued_admissions_never_invent_a_running_turn() {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn admission_receipts_preserve_server_turns_and_duplicate_identity() -> Result<()> {
|
||||
let turn = |id: &str, status| cloud::TurnSummary {
|
||||
id: id.into(),
|
||||
status,
|
||||
error: None,
|
||||
started_at: None,
|
||||
completed_at: None,
|
||||
duration_ms: None,
|
||||
};
|
||||
for (outcome, expected) in [
|
||||
(
|
||||
cloud::AdmissionOutcome::Started(turn("u", cloud::TurnStatus::InProgress)),
|
||||
("started", "u", protocol::TurnStatus::InProgress),
|
||||
),
|
||||
(
|
||||
cloud::AdmissionOutcome::Steered(turn("v", cloud::TurnStatus::Completed)),
|
||||
("steered", "v", protocol::TurnStatus::Completed),
|
||||
),
|
||||
] {
|
||||
let (kind, turn) = match admitted_message(outcome)? {
|
||||
CloudUserMessageReceipt::Started(turn) => ("started", turn),
|
||||
CloudUserMessageReceipt::Steered(turn) => ("steered", turn),
|
||||
CloudUserMessageReceipt::Duplicate { .. } => panic!("expected a turn"),
|
||||
};
|
||||
assert_eq!((kind, turn.id.as_str(), turn.status), expected);
|
||||
}
|
||||
for turn_id in [None, Some("original".into())] {
|
||||
let CloudUserMessageReceipt::Duplicate { turn_id: actual } =
|
||||
admitted_message(cloud::AdmissionOutcome::Duplicate {
|
||||
turn_id: turn_id.clone(),
|
||||
})?
|
||||
else {
|
||||
panic!("a duplicate must not become a running turn");
|
||||
};
|
||||
assert_eq!(actual, turn_id);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
//! Maps conversation requests onto native Cloud operations.
|
||||
|
||||
use super::PreflightRejection;
|
||||
use super::events;
|
||||
use super::send_notification;
|
||||
use crate::CloudUserMessageReceipt;
|
||||
use codex_app_server_protocol as protocol;
|
||||
use codex_cloud_client as cloud;
|
||||
use codex_protocol::models::ImageDetail;
|
||||
use color_eyre::eyre::Result;
|
||||
use color_eyre::eyre::bail;
|
||||
use color_eyre::eyre::eyre;
|
||||
@@ -25,6 +28,7 @@ pub(super) struct Requests {
|
||||
pub(super) enum Response {
|
||||
Value(Value),
|
||||
Attach(Box<protocol::ThreadResumeResponse>),
|
||||
Archived(String),
|
||||
}
|
||||
|
||||
impl Requests {
|
||||
@@ -51,6 +55,8 @@ impl Requests {
|
||||
pub(super) async fn handle(
|
||||
&mut self,
|
||||
request: protocol::ClientRequest,
|
||||
mode: cloud::SubmissionMode,
|
||||
project: Option<cloud::ProjectEnvironment>,
|
||||
output: &mpsc::UnboundedSender<crate::AppServerEvent>,
|
||||
) -> Result<Response> {
|
||||
use protocol::ClientRequest as Request;
|
||||
@@ -65,6 +71,24 @@ impl Requests {
|
||||
}
|
||||
serde_json::to_value(page)?
|
||||
}
|
||||
Request::ThreadArchive { params, .. } => {
|
||||
self.client.archive_thread(¶ms.thread_id).await?;
|
||||
return Ok(Response::Archived(params.thread_id));
|
||||
}
|
||||
Request::ThreadUnarchive { params, .. } => {
|
||||
let mut thread = self.client.unarchive_thread(¶ms.thread_id).await?;
|
||||
use_paginated_history(&mut thread);
|
||||
let value = json!({ "thread": thread });
|
||||
send_notification(
|
||||
output,
|
||||
protocol::ServerNotification::ThreadUnarchived(
|
||||
protocol::ThreadUnarchivedNotification {
|
||||
thread_id: params.thread_id,
|
||||
},
|
||||
),
|
||||
);
|
||||
value
|
||||
}
|
||||
Request::ThreadStart { mut params, .. } => {
|
||||
let model = params.model.take();
|
||||
let provider = params.model_provider.take();
|
||||
@@ -76,7 +100,7 @@ impl Requests {
|
||||
"Cloud conversations start with server defaults. Custom settings are not supported yet."
|
||||
);
|
||||
}
|
||||
let settings = self.client.prewarm_default_thread(model, provider).await?;
|
||||
let settings = self.client.prewarm_thread(model, provider, project).await?;
|
||||
return attach_response(settings);
|
||||
}
|
||||
Request::ThreadResume { params, .. } => {
|
||||
@@ -93,14 +117,6 @@ impl Requests {
|
||||
let settings = self.client.activate(¶ms.thread_id).await?;
|
||||
return attach_response(settings);
|
||||
}
|
||||
Request::ThreadLoadedList { .. } => {
|
||||
let ids = self
|
||||
.loaded
|
||||
.iter()
|
||||
.map(|loaded| &loaded.thread.id)
|
||||
.collect::<Vec<_>>();
|
||||
json!({"data": ids, "nextCursor": null})
|
||||
}
|
||||
Request::ThreadTurnsList { params, .. } => {
|
||||
if params.items_view != Some(protocol::TurnItemsView::NotLoaded) {
|
||||
bail!("Read cloud turn items separately with thread/items/list.");
|
||||
@@ -188,12 +204,23 @@ impl Requests {
|
||||
})?
|
||||
}
|
||||
Request::TurnStart { params, .. } => {
|
||||
let admission = self
|
||||
.client
|
||||
.add_user_message(&cloud_message(params)?)
|
||||
.await?;
|
||||
let turn = admitted_turn(admission.outcome)?;
|
||||
serde_json::to_value(protocol::TurnStartResponse { turn })?
|
||||
let mut message = cloud_message(params)?;
|
||||
message.mode = mode;
|
||||
let admission = match self.client.add_user_message(&message).await {
|
||||
Err(cloud::MutationError::InvalidRequest) => {
|
||||
return Err(PreflightRejection(
|
||||
"The Cloud message is empty, invalid, or too large.",
|
||||
)
|
||||
.into());
|
||||
}
|
||||
result => result?,
|
||||
};
|
||||
if matches!(mode, cloud::SubmissionMode::Steer) {
|
||||
serde_json::to_value(admitted_message(admission.outcome)?)?
|
||||
} else {
|
||||
let turn = admitted_turn(admission.outcome)?;
|
||||
serde_json::to_value(protocol::TurnStartResponse { turn })?
|
||||
}
|
||||
}
|
||||
Request::TurnInterrupt { params, .. } => {
|
||||
self.client
|
||||
@@ -230,7 +257,6 @@ fn thread_list_query(params: protocol::ThreadListParams) -> Result<cloud::Thread
|
||||
// Its explicit CLI/VS Code defaults are conventional source names.
|
||||
let sources = params.source_kinds.as_deref().unwrap_or_default();
|
||||
if !matches!(sources, [] | [Cli, VsCode] | [VsCode, Cli])
|
||||
|| params.archived == Some(true)
|
||||
|| params.cwd.is_some()
|
||||
|| params.search_term.is_some()
|
||||
|| params.section_id.is_some()
|
||||
@@ -252,6 +278,7 @@ fn thread_list_query(params: protocol::ThreadListParams) -> Result<cloud::Thread
|
||||
Ok(cloud::ThreadListQuery {
|
||||
cursor: params.cursor,
|
||||
limit: params.limit,
|
||||
archived: params.archived.unwrap_or_default(),
|
||||
originators: params.originators.unwrap_or_default(),
|
||||
sort_key: match params.sort_key {
|
||||
Some(protocol::ThreadSortKey::CreatedAt) | None => cloud::ThreadSortKey::CreatedAt,
|
||||
@@ -275,48 +302,124 @@ fn history_order(direction: protocol::SortDirection) -> cloud::HistoryOrder {
|
||||
}
|
||||
}
|
||||
|
||||
fn cloud_message(mut params: protocol::TurnStartParams) -> Result<cloud::AddUserMessageRequest> {
|
||||
fn cloud_message(
|
||||
mut params: protocol::TurnStartParams,
|
||||
) -> Result<cloud::AddUserMessageRequest, PreflightRejection> {
|
||||
let thread_id = std::mem::take(&mut params.thread_id);
|
||||
let client_user_message_id = params
|
||||
.client_user_message_id
|
||||
.take()
|
||||
.ok_or_else(|| eyre!("A cloud message needs a stable submission ID."))?;
|
||||
.ok_or(PreflightRejection(
|
||||
"A cloud message needs a stable submission ID.",
|
||||
))?;
|
||||
let input = std::mem::take(&mut params.input);
|
||||
let turn_trigger = params.turn_trigger.take();
|
||||
let (model, effort) = if turn_trigger.as_deref() == Some("user") {
|
||||
(params.model.take(), params.effort.take())
|
||||
} else {
|
||||
(None, None)
|
||||
};
|
||||
if params != protocol::TurnStartParams::default() {
|
||||
bail!("Changing cloud settings or sending structured input is not supported yet.");
|
||||
return Err(PreflightRejection(
|
||||
"Changing cloud settings or sending structured input is not supported yet.",
|
||||
));
|
||||
}
|
||||
let text = input
|
||||
.into_iter()
|
||||
.map(|item| match item {
|
||||
let mut content = Vec::with_capacity(input.len());
|
||||
for item in input {
|
||||
let item = match item {
|
||||
protocol::UserInput::Text {
|
||||
text,
|
||||
text_elements,
|
||||
} if text_elements.is_empty() => Ok(text),
|
||||
_ => bail!("Cloud conversations currently accept plain text only."),
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()?
|
||||
.join("\n");
|
||||
} => {
|
||||
// Keep the existing line separation for consecutive plain text parts.
|
||||
if text_elements.is_empty()
|
||||
&& let Some(cloud::UserMessageInput::Text {
|
||||
text: previous,
|
||||
text_elements: previous_elements,
|
||||
}) = content.last_mut()
|
||||
&& previous_elements.is_empty()
|
||||
{
|
||||
previous.push('\n');
|
||||
previous.push_str(&text);
|
||||
continue;
|
||||
}
|
||||
cloud::UserMessageInput::Text {
|
||||
text,
|
||||
text_elements: text_elements
|
||||
.into_iter()
|
||||
.map(|element| cloud::UserMessageTextElement {
|
||||
placeholder: element.placeholder().map(str::to_owned),
|
||||
start: element.byte_range.start,
|
||||
end: element.byte_range.end,
|
||||
})
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
protocol::UserInput::Image { image, detail } => cloud::UserMessageInput::Image {
|
||||
image: match image {
|
||||
protocol::ImageReference::Inline { url } => cloud::ImageReference::Url(url),
|
||||
protocol::ImageReference::File { file_id } => {
|
||||
cloud::ImageReference::FileId(file_id)
|
||||
}
|
||||
},
|
||||
detail: detail.map(|detail| match detail {
|
||||
ImageDetail::Auto => cloud::ImageDetail::Auto,
|
||||
ImageDetail::Low => cloud::ImageDetail::Low,
|
||||
ImageDetail::High => cloud::ImageDetail::High,
|
||||
ImageDetail::Original => cloud::ImageDetail::Original,
|
||||
}),
|
||||
},
|
||||
protocol::UserInput::LocalImage { .. } => {
|
||||
return Err(PreflightRejection(
|
||||
"Prepare local images before sending them to Cloud.",
|
||||
));
|
||||
}
|
||||
protocol::UserInput::Audio { .. }
|
||||
| protocol::UserInput::LocalAudio { .. }
|
||||
| protocol::UserInput::Skill { .. }
|
||||
| protocol::UserInput::Mention { .. } => {
|
||||
return Err(PreflightRejection(
|
||||
"Cloud conversations currently accept text and images.",
|
||||
));
|
||||
}
|
||||
};
|
||||
content.push(item);
|
||||
}
|
||||
Ok(cloud::AddUserMessageRequest {
|
||||
thread_id,
|
||||
client_user_message_id,
|
||||
text,
|
||||
input: content,
|
||||
turn_trigger,
|
||||
model,
|
||||
effort: effort.map(|effort| effort.to_string()),
|
||||
mode: cloud::SubmissionMode::StartIfIdle,
|
||||
shared_access: false,
|
||||
})
|
||||
}
|
||||
|
||||
fn admitted_message(outcome: cloud::AdmissionOutcome) -> Result<CloudUserMessageReceipt> {
|
||||
Ok(match outcome {
|
||||
cloud::AdmissionOutcome::Started(turn) => {
|
||||
CloudUserMessageReceipt::Started(events::turn(turn)?)
|
||||
}
|
||||
cloud::AdmissionOutcome::Steered(turn) => {
|
||||
CloudUserMessageReceipt::Steered(events::turn(turn)?)
|
||||
}
|
||||
cloud::AdmissionOutcome::Duplicate { turn_id } => {
|
||||
CloudUserMessageReceipt::Duplicate { turn_id }
|
||||
}
|
||||
cloud::AdmissionOutcome::Queued { .. } => bail!(
|
||||
"Cloud already accepted this message without returning a turn. Reopen the conversation to see its status before sending again."
|
||||
),
|
||||
})
|
||||
}
|
||||
|
||||
fn admitted_turn(outcome: cloud::AdmissionOutcome) -> Result<protocol::Turn> {
|
||||
match outcome {
|
||||
cloud::AdmissionOutcome::Started(turn) | cloud::AdmissionOutcome::Steered(turn) => {
|
||||
events::turn(turn)
|
||||
}
|
||||
cloud::AdmissionOutcome::Duplicate { .. } | cloud::AdmissionOutcome::Queued { .. } => {
|
||||
bail!(
|
||||
"Cloud already accepted this message without returning a turn. Reopen the conversation to see its status before sending again."
|
||||
)
|
||||
}
|
||||
match admitted_message(outcome)? {
|
||||
CloudUserMessageReceipt::Started(turn) | CloudUserMessageReceipt::Steered(turn) => Ok(turn),
|
||||
CloudUserMessageReceipt::Duplicate { .. } => bail!(
|
||||
"Cloud already accepted this message without returning a turn. Reopen the conversation to see its status before sending again."
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
#![cfg(test)]
|
||||
//! Exercises native admission and local validation through the command worker.
|
||||
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
use wiremock::Mock;
|
||||
use wiremock::MockServer;
|
||||
use wiremock::ResponseTemplate;
|
||||
use wiremock::matchers::header;
|
||||
use wiremock::matchers::method;
|
||||
use wiremock::matchers::path;
|
||||
|
||||
fn submission(message_id: &str) -> protocol::TurnStartParams {
|
||||
protocol::TurnStartParams {
|
||||
thread_id: "t".into(),
|
||||
client_user_message_id: Some(message_id.into()),
|
||||
model: Some("chosen-model".into()),
|
||||
effort: Some(codex_protocol::openai_models::ReasoningEffort::High),
|
||||
turn_trigger: Some("user".into()),
|
||||
input: vec![protocol::UserInput::Text {
|
||||
text: "hello".into(),
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn native_submission_uses_one_admission_and_keeps_preflight_guards() -> Result<()> {
|
||||
let server = MockServer::start().await;
|
||||
let home = tempfile::tempdir()?;
|
||||
let config = crate::legacy_core::config::ConfigBuilder::default()
|
||||
.codex_home(home.path().to_owned())
|
||||
.fallback_cwd(Some(home.path().to_owned()))
|
||||
.without_project_context()
|
||||
.build()
|
||||
.await?;
|
||||
let native = cloud::Client::new(
|
||||
&config.http_client_factory(),
|
||||
&server.uri(),
|
||||
cloud::Credentials::new("synthetic-bearer", "synthetic-account")?,
|
||||
)?;
|
||||
let account = protocol::GetAccountResponse {
|
||||
user_id: None,
|
||||
account: None,
|
||||
requires_openai_auth: true,
|
||||
workspace_routing: None,
|
||||
};
|
||||
let (client, commands, output) = crate::CloudClient::channel(/*capacity*/ 4);
|
||||
let client = crate::AppServerClient::Cloud(client);
|
||||
let handle = client.request_handle();
|
||||
let crate::AppServerRequestHandle::Cloud(cloud_handle) = &handle else {
|
||||
panic!("expected a Cloud handle");
|
||||
};
|
||||
let (reply_sender, stream) = futures::channel::mpsc::unbounded();
|
||||
let mut replies = Replies {
|
||||
active: Some(Attachment {
|
||||
thread_id: "t".into(),
|
||||
stream: stream.boxed(),
|
||||
}),
|
||||
..Replies::default()
|
||||
};
|
||||
let worker = tokio::spawn(async move {
|
||||
let mut requests = crate::cloud_backend::requests::Requests {
|
||||
client: native,
|
||||
account,
|
||||
loaded: None,
|
||||
warned_partial_history: None,
|
||||
};
|
||||
crate::cloud_backend::run_worker(commands, &mut requests, &mut replies, &output).await
|
||||
});
|
||||
let rpc = "/oaiproto.codex_app_server_backend.ThreadService/AddUserMessage";
|
||||
Mock::given(method("POST"))
|
||||
.and(path(rpc))
|
||||
.and(header("authorization", "Bearer synthetic-bearer"))
|
||||
.respond_with(ResponseTemplate::new(503))
|
||||
.expect(2)
|
||||
.mount(&server)
|
||||
.await;
|
||||
let url = "data:image/png;base64,iVBORw0KGgo=";
|
||||
let image = protocol::UserInput::Image {
|
||||
image: protocol::ImageReference::Inline { url: url.into() },
|
||||
detail: None,
|
||||
};
|
||||
let Err(crate::TypedRequestError::Server { source, .. }) = cloud_handle
|
||||
.submit_user_message(protocol::TurnStartParams {
|
||||
input: vec![image.clone()],
|
||||
..submission("x")
|
||||
})
|
||||
.await
|
||||
else {
|
||||
panic!("a lost receipt must remain uncertain");
|
||||
};
|
||||
assert_eq!(source.code, -32000);
|
||||
assert!(source.message.contains("mutation outcome unknown"));
|
||||
// Existing typed turn/start callers keep StartIfIdle and the same native error.
|
||||
let Err(crate::TypedRequestError::Server { source, .. }) = handle
|
||||
.request_typed::<protocol::TurnStartResponse>(protocol::ClientRequest::TurnStart {
|
||||
request_id: protocol::RequestId::Integer(1),
|
||||
params: protocol::TurnStartParams {
|
||||
input: vec![
|
||||
image,
|
||||
protocol::UserInput::Text {
|
||||
text: "describe the image".into(),
|
||||
text_elements: Vec::new(),
|
||||
},
|
||||
],
|
||||
..submission("m")
|
||||
},
|
||||
})
|
||||
.await
|
||||
else {
|
||||
panic!("ordinary turn/start must retain its server error");
|
||||
};
|
||||
assert_eq!(source.code, -32000);
|
||||
assert!(source.message.contains("mutation outcome unknown"));
|
||||
|
||||
for params in [
|
||||
protocol::TurnStartParams {
|
||||
service_tier: Some(Some("other".into())),
|
||||
..submission("invalid")
|
||||
},
|
||||
protocol::TurnStartParams {
|
||||
client_user_message_id: None,
|
||||
..submission("missing")
|
||||
},
|
||||
protocol::TurnStartParams {
|
||||
input: Vec::new(),
|
||||
..submission("empty")
|
||||
},
|
||||
protocol::TurnStartParams {
|
||||
thread_id: "other".into(),
|
||||
..submission("foreign")
|
||||
},
|
||||
] {
|
||||
let Err(crate::TypedRequestError::Server { source, .. }) =
|
||||
cloud_handle.submit_user_message(params).await
|
||||
else {
|
||||
panic!("invalid input must fail before admission");
|
||||
};
|
||||
assert_eq!(source.code, -32602);
|
||||
}
|
||||
let queued = handle
|
||||
.request(protocol::ClientRequest::TurnStart {
|
||||
request_id: protocol::RequestId::Integer(3),
|
||||
params: protocol::TurnStartParams {
|
||||
input: vec![protocol::UserInput::LocalImage {
|
||||
path: "queued.png".into(),
|
||||
detail: None,
|
||||
}],
|
||||
..submission("queued-image")
|
||||
},
|
||||
})
|
||||
.await?
|
||||
.expect_err("a queued attachment must fail before admission");
|
||||
assert_eq!(queued.code, -32602);
|
||||
assert_eq!(
|
||||
queued.message,
|
||||
"Prepare local images before sending them to Cloud."
|
||||
);
|
||||
let invalid_image = handle
|
||||
.request(protocol::ClientRequest::TurnStart {
|
||||
request_id: protocol::RequestId::Integer(4),
|
||||
params: protocol::TurnStartParams {
|
||||
input: vec![protocol::UserInput::Image {
|
||||
image: protocol::ImageReference::Inline { url: String::new() },
|
||||
detail: None,
|
||||
}],
|
||||
..submission("invalid-image")
|
||||
},
|
||||
})
|
||||
.await?
|
||||
.expect_err("an invalid image must fail before admission");
|
||||
assert_eq!(invalid_image.code, -32602);
|
||||
|
||||
drop(reply_sender);
|
||||
let Err(crate::TypedRequestError::Server { source, .. }) =
|
||||
cloud_handle.submit_user_message(submission("closed")).await
|
||||
else {
|
||||
panic!("a disconnected stream must reject input");
|
||||
};
|
||||
assert_eq!(source.code, -32602);
|
||||
let ordinary = handle
|
||||
.request(protocol::ClientRequest::TurnStart {
|
||||
request_id: protocol::RequestId::Integer(2),
|
||||
params: submission("closed"),
|
||||
})
|
||||
.await?
|
||||
.expect_err("ordinary turn/start keeps its existing disconnected error");
|
||||
assert_eq!(ordinary.code, -32000);
|
||||
|
||||
client.shutdown().await?;
|
||||
worker.await?;
|
||||
let calls = server.received_requests().await.unwrap();
|
||||
for expected in [url.as_bytes(), b"\x4a\x04high", b"\x62\x0cchosen-model"] {
|
||||
assert!(calls.iter().all(|request| {
|
||||
request
|
||||
.body
|
||||
.windows(expected.len())
|
||||
.any(|bytes| bytes == expected)
|
||||
}));
|
||||
}
|
||||
assert_eq!(
|
||||
calls
|
||||
.iter()
|
||||
.map(|request| (request.body[7], *request.body.last().unwrap()))
|
||||
.collect::<Vec<_>>(),
|
||||
vec![(b'x', 1), (b'm', 3)]
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
@@ -102,3 +102,80 @@ async fn cloud_shutdown_times_out_when_owner_does_not_respond() {
|
||||
assert!(events.is_closed());
|
||||
assert!(commands.recv().await.is_none());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn native_model_list_bypasses_the_cloud_command_queue() -> color_eyre::Result<()> {
|
||||
use codex_app_server_protocol::ModelListResponse;
|
||||
use wiremock::Mock;
|
||||
use wiremock::MockServer;
|
||||
use wiremock::ResponseTemplate;
|
||||
use wiremock::matchers::header;
|
||||
use wiremock::matchers::method;
|
||||
use wiremock::matchers::path;
|
||||
use wiremock::matchers::query_param;
|
||||
|
||||
let server = MockServer::start().await;
|
||||
let home = tempfile::tempdir()?;
|
||||
let config = crate::legacy_core::config::ConfigBuilder::default()
|
||||
.codex_home(home.path().to_owned())
|
||||
.fallback_cwd(Some(home.path().to_owned()))
|
||||
.without_project_context()
|
||||
.build()
|
||||
.await?;
|
||||
let native = codex_cloud_client::Client::new(
|
||||
&config.http_client_factory(),
|
||||
&server.uri(),
|
||||
codex_cloud_client::Credentials::new("synthetic-bearer", "synthetic-account")?,
|
||||
)?;
|
||||
let response = serde_json::json!({
|
||||
"data": [{
|
||||
"id": "test-model",
|
||||
"model": "test-model",
|
||||
"displayName": "Test model",
|
||||
"description": "Cloud catalog fixture",
|
||||
"hidden": true,
|
||||
"supportedReasoningEfforts": [],
|
||||
"defaultReasoningEffort": "medium",
|
||||
"isDefault": false
|
||||
}],
|
||||
"nextCursor": "next"
|
||||
});
|
||||
Mock::given(method("GET"))
|
||||
.and(path("/v2/models"))
|
||||
.and(header("authorization", "Bearer synthetic-bearer"))
|
||||
.and(header("chatgpt-account-id", "synthetic-account"))
|
||||
.and(query_param("cursor", "previous"))
|
||||
.and(query_param("limit", "2"))
|
||||
.and(query_param("includeHidden", "true"))
|
||||
.respond_with(ResponseTemplate::new(200).set_body_json(&response))
|
||||
.expect(1)
|
||||
.mount(&server)
|
||||
.await;
|
||||
|
||||
// Leave the command receiver idle. The catalog must finish without its worker.
|
||||
let (client, mut commands, _events) =
|
||||
CloudClient::channel_with_catalog(/*capacity*/ 1, Some(native));
|
||||
let handle = AppServerClient::Cloud(client).request_handle();
|
||||
let result = tokio::time::timeout(
|
||||
std::time::Duration::from_secs(/*secs*/ 5),
|
||||
handle.request_typed::<ModelListResponse>(ClientRequest::ModelList {
|
||||
request_id: RequestId::Integer(1),
|
||||
params: ModelListParams {
|
||||
cursor: Some("previous".into()),
|
||||
limit: Some(2),
|
||||
include_hidden: Some(true),
|
||||
model_provider: None,
|
||||
},
|
||||
}),
|
||||
)
|
||||
.await??;
|
||||
assert_eq!(
|
||||
result,
|
||||
serde_json::from_value::<ModelListResponse>(response)?
|
||||
);
|
||||
assert!(matches!(
|
||||
commands.try_recv(),
|
||||
Err(mpsc::error::TryRecvError::Empty)
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
mod cloud;
|
||||
pub mod cloud_backend;
|
||||
pub use codex_cloud_client::ProjectEnvironment;
|
||||
mod path;
|
||||
mod remote;
|
||||
mod remote_websocket;
|
||||
@@ -29,6 +30,7 @@ pub use cloud::CloudClient;
|
||||
pub use cloud::CloudCommand;
|
||||
pub use cloud::CloudOperation;
|
||||
pub use cloud::CloudRequestHandle;
|
||||
pub use cloud::CloudUserMessageReceipt;
|
||||
mod server_request;
|
||||
pub use server_request::AppServerReplyHandle;
|
||||
|
||||
@@ -110,10 +112,16 @@ pub type RequestResult = std::result::Result<JsonRpcResult, JSONRPCErrorError>;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum AppServerEvent {
|
||||
Lagged { skipped: usize },
|
||||
Lagged {
|
||||
skipped: usize,
|
||||
},
|
||||
ServerNotification(Box<ServerNotification>),
|
||||
ServerRequest(Box<ServerRequest>),
|
||||
Disconnected { message: String },
|
||||
/// A native Cloud reply stream ended. The underlying thread can still be running.
|
||||
ThreadStreamDisconnected(Box<codex_app_server_protocol::ErrorNotification>),
|
||||
Disconnected {
|
||||
message: String,
|
||||
},
|
||||
}
|
||||
|
||||
impl From<InProcessServerEvent> for AppServerEvent {
|
||||
@@ -712,6 +720,27 @@ impl InProcessAppServerRequestHandle {
|
||||
}
|
||||
|
||||
impl AppServerRequestHandle {
|
||||
/// Starts a native cloud thread with host project metadata without adding wire fields.
|
||||
pub async fn start_cloud_project_thread(
|
||||
&self,
|
||||
request_id: RequestId,
|
||||
params: codex_app_server_protocol::ThreadStartParams,
|
||||
project: codex_cloud_client::ProjectEnvironment,
|
||||
) -> Result<codex_app_server_protocol::ThreadStartResponse, TypedRequestError> {
|
||||
let response = match self {
|
||||
Self::Cloud(handle) => {
|
||||
handle
|
||||
.start_project_thread(request_id, params, project)
|
||||
.await
|
||||
}
|
||||
Self::InProcess(_) | Self::Remote(_) => Err(IoError::new(
|
||||
std::io::ErrorKind::Unsupported,
|
||||
"Project checkout requires the native cloud transport.",
|
||||
)),
|
||||
};
|
||||
decode_typed_response("thread/start", response)
|
||||
}
|
||||
|
||||
pub(crate) async fn resolve_server_request(
|
||||
&self,
|
||||
request_id: RequestId,
|
||||
@@ -1145,6 +1174,7 @@ mod tests {
|
||||
"thread".to_string(),
|
||||
"turn".to_string(),
|
||||
codex_app_server_protocol::ThreadItemPayload::AgentMessage {
|
||||
moderation: None,
|
||||
id: "item".to_string(),
|
||||
text: text.to_string(),
|
||||
phase: None,
|
||||
@@ -1475,6 +1505,7 @@ mod tests {
|
||||
JSONRPCMessage::Response(JSONRPCResponse {
|
||||
id: request.id,
|
||||
result: serde_json::to_value(GetAccountResponse {
|
||||
user_id: None,
|
||||
workspace_routing: None,
|
||||
account: None,
|
||||
requires_openai_auth: false,
|
||||
@@ -1531,6 +1562,7 @@ mod tests {
|
||||
JSONRPCMessage::Response(JSONRPCResponse {
|
||||
id: request.id,
|
||||
result: serde_json::to_value(GetAccountResponse {
|
||||
user_id: None,
|
||||
workspace_routing: None,
|
||||
account: None,
|
||||
requires_openai_auth: false,
|
||||
@@ -1609,6 +1641,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
response,
|
||||
GetAccountResponse {
|
||||
user_id: None,
|
||||
workspace_routing: None,
|
||||
account: None,
|
||||
requires_openai_auth: false,
|
||||
@@ -1715,6 +1748,7 @@ mod tests {
|
||||
JSONRPCMessage::Response(JSONRPCResponse {
|
||||
id: request.id,
|
||||
result: serde_json::to_value(GetAccountResponse {
|
||||
user_id: None,
|
||||
workspace_routing: None,
|
||||
account: None,
|
||||
requires_openai_auth: false,
|
||||
@@ -1769,6 +1803,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
first_response,
|
||||
GetAccountResponse {
|
||||
user_id: None,
|
||||
workspace_routing: None,
|
||||
account: None,
|
||||
requires_openai_auth: false,
|
||||
|
||||
@@ -178,8 +178,6 @@ pub struct RemoteAppServerRequestHandle {
|
||||
|
||||
enum SocketPeerPolicy {
|
||||
ExplicitEndpoint,
|
||||
#[cfg(windows)]
|
||||
NonElevatedCurrentUser,
|
||||
}
|
||||
|
||||
impl RemoteAppServerClient {
|
||||
@@ -187,19 +185,6 @@ impl RemoteAppServerClient {
|
||||
Self::connect_with_policy(args, SocketPeerPolicy::ExplicitEndpoint).await
|
||||
}
|
||||
|
||||
/// Connects to an implicitly discovered Windows daemon, verifying its peer
|
||||
/// token before the WebSocket handshake or any session requests.
|
||||
#[cfg(windows)]
|
||||
pub async fn connect_local_daemon(args: RemoteAppServerConnectArgs) -> IoResult<Self> {
|
||||
if !matches!(args.endpoint, RemoteAppServerEndpoint::UnixSocket { .. }) {
|
||||
return Err(IoError::new(
|
||||
ErrorKind::InvalidInput,
|
||||
"local daemon requires a Unix socket",
|
||||
));
|
||||
}
|
||||
Self::connect_with_policy(args, SocketPeerPolicy::NonElevatedCurrentUser).await
|
||||
}
|
||||
|
||||
async fn connect_with_policy(
|
||||
args: RemoteAppServerConnectArgs,
|
||||
peer_policy: SocketPeerPolicy,
|
||||
@@ -810,8 +795,6 @@ async fn connect_unix_socket_endpoint(
|
||||
})?;
|
||||
match peer_policy {
|
||||
SocketPeerPolicy::ExplicitEndpoint => {}
|
||||
#[cfg(windows)]
|
||||
SocketPeerPolicy::NonElevatedCurrentUser => stream.ensure_non_elevated_peer()?,
|
||||
}
|
||||
let websocket_config = remote_websocket_config();
|
||||
let stream = timeout(
|
||||
|
||||
@@ -47,6 +47,3 @@ codex-utils-cargo-bin = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
tokio = { workspace = true, features = ["test-util"] }
|
||||
tracing-subscriber = { workspace = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_IO", "Win32_System_JobObjects", "Win32_Security", "Win32_Security_Authorization", "Win32_System_Threading"] }
|
||||
@@ -1,7 +1,5 @@
|
||||
mod pid;
|
||||
pub(crate) mod stderr_log;
|
||||
#[cfg(windows)]
|
||||
pub(crate) mod windows;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#[path = "pid_identity.rs"]
|
||||
mod identity;
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
use std::borrow::Cow;
|
||||
use std::collections::BTreeMap;
|
||||
use std::io::SeekFrom;
|
||||
@@ -16,14 +15,12 @@ use crate::managed_install::ExecutableIdentity;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::bail;
|
||||
#[cfg(any(unix, windows))]
|
||||
use codex_app_server_transport::REMOTE_CONTROL_DISABLED_ENV_VAR;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use tokio::fs;
|
||||
use tokio::io::AsyncReadExt;
|
||||
use tokio::io::AsyncSeekExt;
|
||||
#[cfg(unix)]
|
||||
use tokio::process::Command;
|
||||
use tokio::time::sleep;
|
||||
|
||||
@@ -35,7 +32,6 @@ const START_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
const STDERR_LOG_TAIL_BYTES: u64 = 4096;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(not(any(unix, windows)), allow(dead_code))]
|
||||
pub(crate) struct PidBackend {
|
||||
pub(super) feature_overrides: BTreeMap<String, bool>,
|
||||
codex_bin: PathBuf,
|
||||
@@ -84,7 +80,6 @@ enum PidFileState {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[cfg_attr(not(any(unix, windows)), allow(dead_code))]
|
||||
enum PidCommandKind {
|
||||
AppServer { remote_control_enabled: bool },
|
||||
UpdateLoop { restore_release: Option<String> },
|
||||
@@ -155,16 +150,10 @@ impl PidBackend {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
pub(crate) async fn start(&self) -> Result<Option<u32>> {
|
||||
self.start_inner(/*replacement*/ None).await
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
pub(crate) async fn start(&self) -> Result<Option<u32>> {
|
||||
bail!("pid-managed app-server startup is unsupported on this platform")
|
||||
}
|
||||
|
||||
pub(crate) async fn stop(&self) -> Result<()> {
|
||||
self.stop_with_grace(DEFAULT_SHUTDOWN_GRACE_SECONDS).await
|
||||
}
|
||||
@@ -186,42 +175,9 @@ impl PidBackend {
|
||||
let started_at = tokio::time::Instant::now();
|
||||
let force_after = Duration::from_secs(grace_seconds.into());
|
||||
let deadline = started_at + force_after + STOP_FORCE_TIMEOUT;
|
||||
#[cfg(unix)]
|
||||
self.terminate_process(pid)?;
|
||||
#[cfg(windows)]
|
||||
let process = {
|
||||
let Some(process) = super::windows::Process::open(pid)? else {
|
||||
continue;
|
||||
};
|
||||
if process.start_time()? != record.process_start_time {
|
||||
continue;
|
||||
}
|
||||
match self.command_kind {
|
||||
PidCommandKind::AppServer { .. } => {
|
||||
let codex_home = self
|
||||
.pid_file
|
||||
.parent()
|
||||
.and_then(Path::parent)
|
||||
.context("daemon pid path has no Codex home")?;
|
||||
let socket_path =
|
||||
codex_app_server_transport::app_server_control_socket_path(codex_home)?;
|
||||
if let Err(err) =
|
||||
crate::client::request_shutdown(socket_path.as_path(), pid).await
|
||||
{
|
||||
tracing::warn!(%pid, %err, "managed app-server shutdown request failed; waiting for force deadline");
|
||||
}
|
||||
}
|
||||
PidCommandKind::UpdateLoop { .. } => {
|
||||
fs::write(self.pid_file.with_extension("shutdown"), pid.to_string())
|
||||
.await
|
||||
.context("failed to request updater shutdown")?;
|
||||
}
|
||||
}
|
||||
process
|
||||
};
|
||||
let mut forced = false;
|
||||
loop {
|
||||
#[cfg(unix)]
|
||||
if let Ok(raw_pid) = libc::pid_t::try_from(pid)
|
||||
&& raw_pid > 0
|
||||
{
|
||||
@@ -239,10 +195,7 @@ impl PidBackend {
|
||||
}
|
||||
if !forced && started_at.elapsed() >= force_after {
|
||||
crate::diagnostics::event("shutdown_forced", serde_json::json!({ "pid": pid }));
|
||||
#[cfg(unix)]
|
||||
self.force_terminate_process(pid)?;
|
||||
#[cfg(windows)]
|
||||
process.terminate()?;
|
||||
forced = true;
|
||||
}
|
||||
sleep(STOP_POLL_INTERVAL).await;
|
||||
@@ -362,7 +315,6 @@ impl PidBackend {
|
||||
Ok(reservation_lock)
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
async fn open_stderr_log(&self) -> Result<fs::File> {
|
||||
let stderr_log_file = stderr_log_file_for_pid_file(&self.pid_file);
|
||||
super::stderr_log::preserve(&stderr_log_file).await;
|
||||
@@ -389,7 +341,6 @@ impl PidBackend {
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
fn command_args(&self) -> Vec<Cow<'_, str>> {
|
||||
let mut args = match &self.command_kind {
|
||||
PidCommandKind::AppServer {
|
||||
@@ -425,7 +376,6 @@ impl PidBackend {
|
||||
args
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
fn command_env(&self) -> Option<(&'static str, &'static str)> {
|
||||
match self.command_kind {
|
||||
PidCommandKind::AppServer {
|
||||
@@ -441,14 +391,10 @@ impl PidBackend {
|
||||
fn terminate_process(&self, pid: u32) -> Result<()> {
|
||||
match self.command_kind {
|
||||
PidCommandKind::AppServer { .. } => terminate_process(pid),
|
||||
#[cfg(unix)]
|
||||
PidCommandKind::UpdateLoop { .. } => terminate_process_group(pid),
|
||||
#[cfg(not(unix))]
|
||||
PidCommandKind::UpdateLoop { .. } => terminate_process(pid),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn force_terminate_process(&self, pid: u32) -> Result<()> {
|
||||
match self.command_kind {
|
||||
PidCommandKind::AppServer { .. } => force_terminate_process(pid),
|
||||
@@ -525,7 +471,6 @@ async fn read_log_tail(path: &Path, byte_limit: u64) -> Result<Option<String>> {
|
||||
Ok(Some(contents))
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn process_exists(pid: u32) -> bool {
|
||||
let Ok(pid) = libc::pid_t::try_from(pid) else {
|
||||
return false;
|
||||
@@ -534,7 +479,6 @@ fn process_exists(pid: u32) -> bool {
|
||||
result == 0 || std::io::Error::last_os_error().raw_os_error() == Some(libc::EPERM)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn terminate_process(pid: u32) -> Result<()> {
|
||||
let raw_pid = libc::pid_t::try_from(pid)
|
||||
.with_context(|| format!("pid-managed app server pid {pid} is out of range"))?;
|
||||
@@ -549,7 +493,6 @@ fn terminate_process(pid: u32) -> Result<()> {
|
||||
Err(err).with_context(|| format!("failed to terminate pid-managed app server {pid}"))
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn force_terminate_process(pid: u32) -> Result<()> {
|
||||
let raw_pid = libc::pid_t::try_from(pid)
|
||||
.with_context(|| format!("pid-managed app server pid {pid} is out of range"))?;
|
||||
@@ -564,7 +507,6 @@ fn force_terminate_process(pid: u32) -> Result<()> {
|
||||
Err(err).with_context(|| format!("failed to force terminate pid-managed app server {pid}"))
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn terminate_process_group(pid: u32) -> Result<()> {
|
||||
let raw_pid = libc::pid_t::try_from(pid)
|
||||
.with_context(|| format!("pid-managed updater pid {pid} is out of range"))?;
|
||||
@@ -579,7 +521,6 @@ fn terminate_process_group(pid: u32) -> Result<()> {
|
||||
Err(err).with_context(|| format!("failed to terminate pid-managed updater group {pid}"))
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn force_terminate_process_group(pid: u32) -> Result<()> {
|
||||
let raw_pid = libc::pid_t::try_from(pid)
|
||||
.with_context(|| format!("pid-managed updater pid {pid} is out of range"))?;
|
||||
@@ -594,29 +535,12 @@ fn force_terminate_process_group(pid: u32) -> Result<()> {
|
||||
Err(err).with_context(|| format!("failed to force terminate pid-managed updater group {pid}"))
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn terminate_process(_pid: u32) -> Result<()> {
|
||||
bail!("pid-managed app-server shutdown is unsupported on this platform")
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn force_terminate_process(_pid: u32) -> Result<()> {
|
||||
bail!("pid-managed app-server shutdown is unsupported on this platform")
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn force_terminate_process_group(_pid: u32) -> Result<()> {
|
||||
bail!("pid-managed updater shutdown is unsupported on this platform")
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn process_matches_record(record: &PidRecord) -> Result<bool> {
|
||||
if !process_exists(record.pid) {
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
let details = async {
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
if let Some(expected) = &record.process_identity {
|
||||
return expected.matches_process(record.pid).await;
|
||||
}
|
||||
@@ -652,20 +576,13 @@ async fn process_matches_record(record: &PidRecord) -> Result<bool> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
async fn process_matches_record(_record: &PidRecord) -> Result<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[cfg_attr(not(any(unix, windows)), allow(dead_code))]
|
||||
enum EmptyPidReservation {
|
||||
Active,
|
||||
Stale,
|
||||
Record(PidRecord),
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn try_lock_file(file: &fs::File) -> Result<bool> {
|
||||
use std::os::fd::AsRawFd;
|
||||
|
||||
@@ -681,12 +598,6 @@ fn try_lock_file(file: &fs::File) -> Result<bool> {
|
||||
Err(err).context("failed to lock pid reservation")
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn try_lock_file(_file: &fs::File) -> Result<bool> {
|
||||
bail!("pid-managed app-server startup is unsupported on this platform")
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
async fn reservation_lock_is_active(path: &Path) -> Result<bool> {
|
||||
let file = match fs::OpenOptions::new()
|
||||
.write(true)
|
||||
@@ -707,12 +618,10 @@ async fn reservation_lock_is_active(path: &Path) -> Result<bool> {
|
||||
probe_reservation_lock(file)
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
fn probe_reservation_lock(file: fs::File) -> Result<bool> {
|
||||
if !try_lock_file(&file)? {
|
||||
return Ok(true);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::fd::AsRawFd;
|
||||
|
||||
@@ -726,12 +635,6 @@ fn probe_reservation_lock(file: fs::File) -> Result<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
async fn reservation_lock_is_active(_path: &Path) -> Result<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
async fn inspect_empty_pid_reservation(
|
||||
pid_path: &Path,
|
||||
lock_path: &Path,
|
||||
@@ -753,10 +656,8 @@ async fn inspect_empty_pid_reservation(
|
||||
inspect_empty_pid_reservation_with_file(pid_path, file).await
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
struct EmptyPidProbeLock(fs::File);
|
||||
|
||||
#[cfg(unix)]
|
||||
impl Drop for EmptyPidProbeLock {
|
||||
fn drop(&mut self) {
|
||||
use std::os::fd::AsRawFd;
|
||||
@@ -770,7 +671,6 @@ impl Drop for EmptyPidProbeLock {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
async fn inspect_empty_pid_reservation_with_file(
|
||||
pid_path: &Path,
|
||||
file: fs::File,
|
||||
@@ -778,7 +678,6 @@ async fn inspect_empty_pid_reservation_with_file(
|
||||
if !try_lock_file(&file)? {
|
||||
return Ok(EmptyPidReservation::Active);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
let _probe_lock = EmptyPidProbeLock(file);
|
||||
|
||||
let contents = match fs::read_to_string(pid_path).await {
|
||||
@@ -801,20 +700,10 @@ async fn inspect_empty_pid_reservation_with_file(
|
||||
Ok(EmptyPidReservation::Record(record))
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
async fn inspect_empty_pid_reservation(
|
||||
_pid_path: &Path,
|
||||
_lock_path: &Path,
|
||||
) -> Result<EmptyPidReservation> {
|
||||
Ok(EmptyPidReservation::Stale)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn read_process_start_time(pid: u32) -> Result<String> {
|
||||
Ok(read_process_details(pid).await?.1)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn read_process_details(pid: u32) -> Result<(String, String)> {
|
||||
let output = Command::new("ps")
|
||||
.args(["-p", &pid.to_string(), "-o", "stat=", "-o", "lstart="])
|
||||
@@ -838,43 +727,9 @@ async fn read_process_details(pid: u32) -> Result<(String, String)> {
|
||||
Ok((state.to_string(), start_time.to_string()))
|
||||
}
|
||||
|
||||
#[cfg(all(test, any(unix, windows)))]
|
||||
#[cfg(test)]
|
||||
#[path = "pid_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
#[cfg(windows)]
|
||||
use super::windows::try_lock_file;
|
||||
|
||||
#[cfg(windows)]
|
||||
async fn read_process_start_time(pid: u32) -> Result<String> {
|
||||
super::windows::Process::open(pid)?
|
||||
.context("daemon process exited during startup")?
|
||||
.start_time()
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
async fn process_matches_record(record: &PidRecord) -> Result<bool> {
|
||||
let Some(process) = super::windows::Process::open(record.pid)? else {
|
||||
return Ok(false);
|
||||
};
|
||||
Ok(process.is_running()? && process.start_time()? == record.process_start_time)
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn force_terminate_process(pid: u32) -> Result<()> {
|
||||
if let Some(process) = super::windows::Process::open(pid)? {
|
||||
process.terminate()?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
use force_terminate_process as terminate_process;
|
||||
|
||||
#[cfg(windows)]
|
||||
#[path = "pid_windows.rs"]
|
||||
mod windows;
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[path = "pid_start.rs"]
|
||||
mod start;
|
||||
@@ -1,9 +1,7 @@
|
||||
//! Native process identities and zombie state, independent of locale and timezone.
|
||||
//! Boot IDs prevent records surviving reboot from matching reused process identifiers.
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", test))]
|
||||
use anyhow::Context;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", test))]
|
||||
use anyhow::Result;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
@@ -28,7 +26,6 @@ pub(super) enum ProcessIdentity {
|
||||
},
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
impl ProcessIdentity {
|
||||
pub(super) async fn matches_process(&self, pid: u32) -> Result<(bool, bool)> {
|
||||
// A different boot proves staleness even when the reused PID is inaccessible.
|
||||
@@ -65,7 +62,6 @@ impl ProcessIdentity {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
impl super::PidBackend {
|
||||
pub(crate) async fn promote_legacy_identity(&self) -> Result<()> {
|
||||
let _reservation = self.acquire_reservation_lock().await?;
|
||||
|
||||
@@ -25,7 +25,6 @@ fn reads_earlier_linux_identity_field() {
|
||||
assert_eq!(serde_json::to_value(record).unwrap(), expected);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
#[tokio::test]
|
||||
async fn previous_boot_does_not_require_process_inspection() {
|
||||
let (_, identity) = super::read_process_details(std::process::id())
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
//! Recover a deleted Unix cwd without changing workspace defaults for usable directories.
|
||||
|
||||
use super::PidBackend;
|
||||
#[cfg(windows)]
|
||||
use super::PidCommandKind;
|
||||
use super::PidFileState;
|
||||
use super::PidRecord;
|
||||
use super::read_process_start_time;
|
||||
@@ -20,28 +18,11 @@ use tokio::process::Command;
|
||||
|
||||
impl PidBackend {
|
||||
pub(super) async fn start_inner(&self, replacement: Option<PidRecord>) -> Result<Option<u32>> {
|
||||
#[cfg(windows)]
|
||||
crate::backend::windows::ensure_not_elevated()?;
|
||||
if let Some(parent) = self.pid_file.parent() {
|
||||
codex_uds::prepare_private_socket_directory(parent)
|
||||
.await
|
||||
.with_context(|| format!("failed to create pid directory {}", parent.display()))?;
|
||||
}
|
||||
#[cfg(windows)]
|
||||
let workdir = {
|
||||
let workdir = self
|
||||
.pid_file
|
||||
.parent()
|
||||
.context("daemon pid path has no parent")?
|
||||
.join("workdir");
|
||||
fs::create_dir_all(&workdir).await.with_context(|| {
|
||||
format!(
|
||||
"failed to create daemon working directory {}",
|
||||
workdir.display()
|
||||
)
|
||||
})?;
|
||||
workdir
|
||||
};
|
||||
let reservation_lock = self.acquire_reservation_lock().await?;
|
||||
loop {
|
||||
match fs::OpenOptions::new()
|
||||
@@ -158,7 +139,6 @@ impl PidBackend {
|
||||
.context("daemon pid path has no parent")?,
|
||||
)?;
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
unsafe {
|
||||
command.pre_exec(|| {
|
||||
@@ -170,50 +150,7 @@ impl PidBackend {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use windows_sys::Win32::System::Threading::CREATE_BREAKAWAY_FROM_JOB;
|
||||
use windows_sys::Win32::System::Threading::CREATE_NO_WINDOW;
|
||||
use windows_sys::Win32::System::Threading::DETACHED_PROCESS;
|
||||
// A Windows process pins its working directory for its lifetime.
|
||||
// Keep both managed children out of the launching project's directory.
|
||||
// Sandbox setup may broaden the cwd ACL, so do not use the private state directory.
|
||||
command.current_dir(&workdir);
|
||||
// Never retry inside the parent's Job Object: that would report a
|
||||
// successful launch that dies when the terminal/SSH session closes.
|
||||
command.creation_flags(CREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_BREAKAWAY_FROM_JOB);
|
||||
if matches!(self.command_kind, PidCommandKind::UpdateLoop { .. }) {
|
||||
match fs::remove_file(self.pid_file.with_extension("ready")).await {
|
||||
Ok(()) => {}
|
||||
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}
|
||||
Err(err) => return Err(err).context("failed to clear updater readiness"),
|
||||
}
|
||||
}
|
||||
match self.command_kind {
|
||||
PidCommandKind::AppServer { .. } => {
|
||||
command.env(codex_app_server_transport::DAEMON_SHUTDOWN_SOCKET_ENV, "1");
|
||||
}
|
||||
PidCommandKind::UpdateLoop { .. } => {
|
||||
let shutdown_file = self.pid_file.with_extension("shutdown");
|
||||
match fs::remove_file(&shutdown_file).await {
|
||||
Ok(()) => {}
|
||||
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}
|
||||
Err(err) => {
|
||||
return Err(err).context("failed to clear updater shutdown request");
|
||||
}
|
||||
}
|
||||
command.env(
|
||||
codex_app_server_transport::DAEMON_SHUTDOWN_FILE_ENV,
|
||||
shutdown_file,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let started = std::time::Instant::now();
|
||||
#[cfg(windows)]
|
||||
let child = super::super::windows::spawn_without_inheriting_stdio(&mut command);
|
||||
#[cfg(not(windows))]
|
||||
let child = command.spawn().map_err(anyhow::Error::from);
|
||||
let child = crate::diagnostics::result("process_spawn", started, child);
|
||||
let mut child = match child {
|
||||
@@ -223,11 +160,7 @@ impl PidBackend {
|
||||
let _ = fs::remove_file(&self.pid_file).await;
|
||||
}
|
||||
return Err(err).with_context(|| {
|
||||
let job_hint = if cfg!(windows) {
|
||||
" (the Windows host job must allow breakaway)"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
let job_hint = "";
|
||||
StartFailure::Spawn(format!(
|
||||
"failed to spawn detached app-server process using {}{job_hint}",
|
||||
self.codex_bin.display()
|
||||
@@ -242,13 +175,10 @@ impl PidBackend {
|
||||
let started = std::time::Instant::now();
|
||||
let record = async {
|
||||
let process_start_time = read_process_start_time(pid).await?;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
let process_identity = super::identity::read_process_details(pid)
|
||||
.await
|
||||
.ok()
|
||||
.map(|(_, identity)| identity);
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||
let process_identity = None;
|
||||
anyhow::Ok(PidRecord {
|
||||
pid,
|
||||
process_start_time,
|
||||
@@ -312,11 +242,6 @@ impl PidBackend {
|
||||
format!("failed to publish pid file {}", self.pid_file.display())
|
||||
});
|
||||
}
|
||||
#[cfg(windows)]
|
||||
if matches!(self.command_kind, PidCommandKind::UpdateLoop { .. }) {
|
||||
self.finish_updater_start(&record, replacement.as_ref())
|
||||
.await?;
|
||||
}
|
||||
drop(reservation_lock);
|
||||
Ok(Some(pid))
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#[cfg(any(unix, windows))]
|
||||
use std::process::Stdio;
|
||||
use std::time::Duration;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
#[cfg(any(unix, windows))]
|
||||
use tokio::time::sleep;
|
||||
|
||||
use codex_app_server_transport::REMOTE_CONTROL_DISABLED_ENV_VAR;
|
||||
@@ -14,33 +12,11 @@ use super::PidCommandKind;
|
||||
use super::PidFileState;
|
||||
use super::PidLogTail;
|
||||
use super::PidRecord;
|
||||
#[cfg(unix)]
|
||||
use super::read_process_start_time;
|
||||
use super::read_stderr_log_tail;
|
||||
use super::stderr_log_file_for_pid_file;
|
||||
use super::try_lock_file;
|
||||
|
||||
#[cfg(windows)]
|
||||
fn is_elevated_test_process() -> anyhow::Result<bool> {
|
||||
let output = std::process::Command::new("powershell.exe")
|
||||
.args([
|
||||
"-NoProfile",
|
||||
"-NonInteractive",
|
||||
"-Command",
|
||||
"[Security.Principal.WindowsPrincipal]::new([Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)",
|
||||
])
|
||||
.output()?;
|
||||
anyhow::ensure!(
|
||||
output.status.success(),
|
||||
"administrator membership query failed"
|
||||
);
|
||||
match String::from_utf8(output.stdout)?.trim() {
|
||||
"True" => Ok(true),
|
||||
"False" => Ok(false),
|
||||
other => anyhow::bail!("unexpected administrator membership: {other}"),
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn locked_empty_pid_file_is_treated_as_active_reservation() {
|
||||
let temp_dir = TempDir::new().expect("temp dir");
|
||||
@@ -100,7 +76,6 @@ async fn unlocked_empty_pid_file_is_treated_as_stale_reservation() {
|
||||
assert!(!pid_file.exists());
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn reservation_probe_releases_lock_with_duplicated_handle() {
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
@@ -259,16 +234,6 @@ async fn start_retries_stale_empty_pid_file_under_its_own_lock() {
|
||||
);
|
||||
|
||||
let err = backend.start().await.expect_err("start");
|
||||
#[cfg(windows)]
|
||||
if is_elevated_test_process().expect("query administrator membership") {
|
||||
assert!(err.to_string().contains("non-elevated terminal"));
|
||||
assert_eq!(
|
||||
tokio::fs::read(&backend.pid_file).await.unwrap(),
|
||||
Vec::<u8>::new()
|
||||
);
|
||||
assert!(!backend.lock_file.exists());
|
||||
return;
|
||||
}
|
||||
assert!(
|
||||
err.to_string()
|
||||
.starts_with("failed to spawn detached app-server process using ")
|
||||
@@ -279,7 +244,6 @@ async fn start_retries_stale_empty_pid_file_under_its_own_lock() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn legacy_launch_clears_recovery_best_effort() {
|
||||
for snapshot_is_directory in [false, true] {
|
||||
@@ -346,7 +310,6 @@ async fn stale_record_cleanup_preserves_replacement_record() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn pid_record_captures_the_resolved_launch_binary() {
|
||||
let temp = TempDir::new().expect("temp dir");
|
||||
@@ -396,7 +359,6 @@ async fn pid_record_captures_the_resolved_launch_binary() {
|
||||
backend.stop().await.expect("stop daemon");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn legacy_start_time_mismatch_preserves_record_and_process() {
|
||||
let temp = TempDir::new().unwrap();
|
||||
@@ -428,7 +390,6 @@ async fn legacy_start_time_mismatch_preserves_record_and_process() {
|
||||
assert_eq!(std::fs::read(&backend.pid_file).unwrap(), contents);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn stop_reaps_untracked_app_server_child() {
|
||||
let temp_dir = TempDir::new().expect("temp dir");
|
||||
@@ -470,28 +431,18 @@ async fn stop_reaps_untracked_app_server_child() {
|
||||
assert!(!pid_file.exists());
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[tokio::test]
|
||||
async fn shutdown_grace_child() {
|
||||
let Some(ready) = std::env::var_os("CODEX_TEST_SHUTDOWN_GRACE_READY") else {
|
||||
return;
|
||||
};
|
||||
let ready = std::path::PathBuf::from(ready);
|
||||
#[cfg(unix)]
|
||||
let mut terminate = tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())
|
||||
.expect("install shutdown handler");
|
||||
tokio::fs::write(&ready, "").await.expect("ready marker");
|
||||
// Outlive the parent's stop deadline so this watchdog cannot look like a forced stop.
|
||||
let _ = tokio::time::timeout(Duration::from_secs(/*secs*/ 30), async {
|
||||
#[cfg(unix)]
|
||||
terminate.recv().await;
|
||||
#[cfg(windows)]
|
||||
loop {
|
||||
if ready.with_extension("shutdown").exists() {
|
||||
break;
|
||||
}
|
||||
sleep(Duration::from_millis(10)).await;
|
||||
}
|
||||
if std::env::var_os("CODEX_TEST_SHUTDOWN_GRACE_EXIT").is_some() {
|
||||
sleep(Duration::from_millis(150)).await;
|
||||
tokio::fs::write(ready.with_extension("exited"), "")
|
||||
@@ -504,7 +455,6 @@ async fn shutdown_grace_child() {
|
||||
.await;
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[tokio::test]
|
||||
async fn shutdown_grace_handles_process_exit() {
|
||||
let temp = TempDir::new().expect("temp dir");
|
||||
@@ -546,18 +496,11 @@ async fn shutdown_grace_handles_process_exit() {
|
||||
)
|
||||
.await
|
||||
.expect("write pid file");
|
||||
#[cfg(unix)]
|
||||
let backend = PidBackend::new(
|
||||
temp.path().join("codex"),
|
||||
pid_file,
|
||||
/*remote_control_enabled*/ false,
|
||||
);
|
||||
#[cfg(windows)]
|
||||
let backend = PidBackend::new_update_loop(
|
||||
temp.path().join("codex"),
|
||||
pid_file,
|
||||
/*restore_release*/ None,
|
||||
);
|
||||
// Cover the backend's full stop budget, plus scheduling headroom on busy runners.
|
||||
let stop_timeout =
|
||||
super::STOP_FORCE_TIMEOUT + Duration::from_secs(u64::from(grace_seconds) + 5);
|
||||
@@ -577,7 +520,6 @@ async fn shutdown_grace_handles_process_exit() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn stopping_updater_signals_its_installer_process_group() {
|
||||
use std::os::unix::process::CommandExt;
|
||||
@@ -644,7 +586,6 @@ async fn stopping_updater_signals_its_installer_process_group() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn exited_unreaped_updater_is_reaped() {
|
||||
let temp = TempDir::new().expect("temp dir");
|
||||
@@ -652,15 +593,12 @@ async fn exited_unreaped_updater_is_reaped() {
|
||||
.arg("60")
|
||||
.spawn()
|
||||
.expect("spawn updater shim");
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
let process_identity = Some(
|
||||
super::identity::read_process_details(child.id())
|
||||
.await
|
||||
.unwrap()
|
||||
.1,
|
||||
);
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||
let process_identity = None;
|
||||
let record = PidRecord {
|
||||
pid: child.id(),
|
||||
process_start_time: read_process_start_time(child.id())
|
||||
@@ -783,7 +721,6 @@ async fn stale_creation_time_never_stops_reused_pid() {
|
||||
temp.path().join("server.pid"),
|
||||
/*remote_control_enabled*/ false,
|
||||
);
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
let identities = {
|
||||
use super::identity::ProcessIdentity;
|
||||
let (_, identity) = super::identity::read_process_details(std::process::id())
|
||||
@@ -807,8 +744,6 @@ async fn stale_creation_time_never_stops_reused_pid() {
|
||||
}
|
||||
[Some(stale_time), Some(stale_epoch)]
|
||||
};
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||
let identities = [None];
|
||||
for process_identity in identities {
|
||||
let record = PidRecord {
|
||||
pid: std::process::id(),
|
||||
@@ -824,311 +759,6 @@ async fn stale_creation_time_never_stops_reused_pid() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tokio::test]
|
||||
async fn managed_children_launch_in_workdir_without_changing_private_state_directory() {
|
||||
if is_elevated_test_process().expect("query administrator membership") {
|
||||
return;
|
||||
}
|
||||
let temp = TempDir::new().expect("temp dir");
|
||||
let state_dir = temp.path().join("state");
|
||||
let codex_bin = temp.path().join("codex.cmd");
|
||||
tokio::fs::write(
|
||||
&codex_bin,
|
||||
"@echo off\r\n\
|
||||
if \"%3\"==\"--help\" exit /b 1\r\n\
|
||||
echo ready > launched.cwd\r\n\
|
||||
if defined CODEX_DAEMON_SHUTDOWN_FILE (for %%F in (\"%CODEX_DAEMON_SHUTDOWN_FILE%\") do type nul > \"%%~dpnF.ready\")\r\n\
|
||||
for /l %%i in (1,1,10000000) do @rem\r\n",
|
||||
)
|
||||
.await
|
||||
.expect("write daemon fixture");
|
||||
let backends = [
|
||||
PidBackend::new(
|
||||
codex_bin.clone(),
|
||||
state_dir.join("app-server.pid"),
|
||||
/*remote_control_enabled*/ false,
|
||||
),
|
||||
PidBackend::new_update_loop(
|
||||
codex_bin,
|
||||
state_dir.join("updater.pid"),
|
||||
/*restore_release*/ None,
|
||||
),
|
||||
];
|
||||
for backend in backends {
|
||||
backend.start().await.expect("launch managed child");
|
||||
let marker = state_dir.join("workdir/launched.cwd");
|
||||
let launched_in_workdir = tokio::time::timeout(Duration::from_secs(5), async {
|
||||
while !marker.exists() {
|
||||
sleep(Duration::from_millis(10)).await;
|
||||
}
|
||||
})
|
||||
.await;
|
||||
backend
|
||||
.stop_with_grace(/*grace_seconds*/ 0)
|
||||
.await
|
||||
.expect("stop managed child");
|
||||
launched_in_workdir.expect("child did not write its relative marker in workdir");
|
||||
codex_uds::prepare_private_socket_directory(&state_dir)
|
||||
.await
|
||||
.expect("state directory remains private");
|
||||
assert!(!backend.pid_file.exists());
|
||||
tokio::fs::remove_file(marker)
|
||||
.await
|
||||
.expect("remove marker before next child launch");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tokio::test]
|
||||
async fn failed_updater_handoff_preserves_predecessor_record() {
|
||||
let elevated = is_elevated_test_process().expect("query administrator membership");
|
||||
let temp = TempDir::new().expect("temp");
|
||||
let state_dir = temp.path().join("state");
|
||||
codex_uds::prepare_private_socket_directory(&state_dir)
|
||||
.await
|
||||
.expect("private state directory");
|
||||
let backend = PidBackend::new_update_loop(
|
||||
temp.path().join("missing-codex.exe"),
|
||||
state_dir.join("updater.pid"),
|
||||
/*restore_release*/ None,
|
||||
);
|
||||
let record = PidRecord {
|
||||
pid: std::process::id(),
|
||||
process_start_time: super::read_process_start_time(std::process::id())
|
||||
.await
|
||||
.unwrap(),
|
||||
process_identity: None,
|
||||
executable_identity: None,
|
||||
};
|
||||
for record in [
|
||||
record.clone(),
|
||||
PidRecord {
|
||||
process_start_time: "stale".into(),
|
||||
..record
|
||||
},
|
||||
] {
|
||||
tokio::fs::write(&backend.pid_file, serde_json::to_vec(&record).unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
let error = backend.replace_current_updater().await.unwrap_err();
|
||||
if elevated {
|
||||
assert!(error.to_string().contains("non-elevated terminal"));
|
||||
} else {
|
||||
// Windows may reject breakaway before reporting the missing executable.
|
||||
// Both must reach process I/O rather than rejecting stale ownership.
|
||||
assert!(error.root_cause().is::<std::io::Error>(), "{error:#}");
|
||||
}
|
||||
assert_eq!(
|
||||
backend.read_pid_file_state().await.unwrap(),
|
||||
PidFileState::Running(record)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tokio::test]
|
||||
async fn updater_readiness_and_post_publication_failure_preserve_ownership() {
|
||||
use futures::FutureExt;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use windows_sys::Win32::Security::ImpersonateAnonymousToken;
|
||||
use windows_sys::Win32::Security::RevertToSelf;
|
||||
use windows_sys::Win32::System::Threading::GetCurrentThread;
|
||||
|
||||
let temp = TempDir::new().expect("temp");
|
||||
let backend = PidBackend::new_update_loop(
|
||||
temp.path().join("codex.exe"),
|
||||
temp.path().join("updater.pid"),
|
||||
/*restore_release*/ None,
|
||||
);
|
||||
let _lock = backend
|
||||
.acquire_reservation_lock()
|
||||
.await
|
||||
.expect("reservation lock");
|
||||
let mut predecessor_stderr = backend.open_stderr_log().await.expect("predecessor log");
|
||||
predecessor_stderr
|
||||
.write_all(&vec![b'x'; 512 * 1024])
|
||||
.await
|
||||
.unwrap();
|
||||
predecessor_stderr.flush().await.unwrap();
|
||||
let successor_stderr = backend.open_stderr_log().await.expect("successor log");
|
||||
let ready = backend.pid_file.with_extension("ready");
|
||||
let mut child = tokio::process::Command::new("powershell.exe")
|
||||
.args([
|
||||
"-NoProfile",
|
||||
"-NonInteractive",
|
||||
"-Command",
|
||||
"[Console]::Error.WriteLine('successor startup'); [IO.File]::WriteAllText($env:CODEX_TEST_UPDATER_READY, ''); Start-Sleep 60",
|
||||
])
|
||||
.env("CODEX_TEST_UPDATER_READY", &ready)
|
||||
.stderr(Stdio::from(successor_stderr.into_std().await))
|
||||
.creation_flags(windows_sys::Win32::System::Threading::CREATE_NO_WINDOW)
|
||||
.kill_on_drop(true)
|
||||
.spawn()
|
||||
.expect("successor fixture");
|
||||
let pid = child.id().expect("pid");
|
||||
let successor = PidRecord {
|
||||
pid,
|
||||
process_start_time: super::read_process_start_time(pid)
|
||||
.await
|
||||
.expect("creation time"),
|
||||
process_identity: None,
|
||||
executable_identity: None,
|
||||
};
|
||||
let predecessor = PidRecord {
|
||||
pid: std::process::id(),
|
||||
process_start_time: super::read_process_start_time(std::process::id())
|
||||
.await
|
||||
.expect("creation time"),
|
||||
process_identity: None,
|
||||
executable_identity: None,
|
||||
};
|
||||
tokio::fs::write(&backend.pid_file, serde_json::to_vec(&successor).unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
backend
|
||||
.finish_updater_start(&successor, Some(&predecessor))
|
||||
.await
|
||||
.expect("ready successor");
|
||||
predecessor_stderr
|
||||
.write_all(b"predecessor handoff complete\n")
|
||||
.await
|
||||
.unwrap();
|
||||
predecessor_stderr.flush().await.unwrap();
|
||||
let log_path = stderr_log_file_for_pid_file(&backend.pid_file);
|
||||
let log = tokio::fs::read(&log_path).await.unwrap();
|
||||
assert!(log.len() < 256 * 1024);
|
||||
let log = String::from_utf8(log).expect("no stale-offset gap");
|
||||
assert!(log.contains("successor startup"));
|
||||
assert!(log.contains("predecessor handoff complete"));
|
||||
assert!(!ready.exists());
|
||||
assert_eq!(
|
||||
backend.read_pid_file_state().await.unwrap(),
|
||||
PidFileState::Running(successor.clone())
|
||||
);
|
||||
|
||||
// If cleanup cannot even query the successor, leave its ownership intact.
|
||||
std::thread::scope(|scope| {
|
||||
scope
|
||||
.spawn(|| {
|
||||
assert_ne!(unsafe { ImpersonateAnonymousToken(GetCurrentThread()) }, 0);
|
||||
let result = backend
|
||||
.finish_updater_start(&successor, Some(&predecessor))
|
||||
.now_or_never();
|
||||
let reverted = unsafe { RevertToSelf() };
|
||||
assert_ne!(reverted, 0);
|
||||
let error = result
|
||||
.expect("denied cleanup must not suspend")
|
||||
.unwrap_err();
|
||||
assert_eq!(
|
||||
error
|
||||
.downcast_ref::<std::io::Error>()
|
||||
.unwrap()
|
||||
.raw_os_error(),
|
||||
Some(windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED as i32)
|
||||
);
|
||||
})
|
||||
.join()
|
||||
.expect("anonymous cleanup check");
|
||||
});
|
||||
assert_eq!(
|
||||
backend.read_pid_file_state().await.unwrap(),
|
||||
PidFileState::Running(successor.clone())
|
||||
);
|
||||
|
||||
let reused_pid = PidRecord {
|
||||
process_start_time: "stale".into(),
|
||||
..successor.clone()
|
||||
};
|
||||
assert!(
|
||||
backend
|
||||
.finish_updater_start(&reused_pid, Some(&predecessor))
|
||||
.await
|
||||
.is_err()
|
||||
);
|
||||
assert_eq!(
|
||||
backend.read_pid_file_state().await.unwrap(),
|
||||
PidFileState::Running(predecessor.clone())
|
||||
);
|
||||
assert!(
|
||||
child.try_wait().unwrap().is_none(),
|
||||
"PID reuse must not terminate another process"
|
||||
);
|
||||
tokio::fs::write(&backend.pid_file, serde_json::to_vec(&successor).unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
// An invalid readiness path triggers cleanup while the successor is alive.
|
||||
tokio::fs::create_dir(&ready).await.unwrap();
|
||||
assert!(
|
||||
backend
|
||||
.finish_updater_start(&successor, Some(&predecessor))
|
||||
.await
|
||||
.is_err()
|
||||
);
|
||||
assert!(
|
||||
child.try_wait().unwrap().is_some(),
|
||||
"successor must exit before rollback"
|
||||
);
|
||||
assert_eq!(
|
||||
backend.read_pid_file_state().await.unwrap(),
|
||||
PidFileState::Running(predecessor)
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn inaccessible_pid_preserves_identity_check_error() {
|
||||
use futures::FutureExt;
|
||||
use windows_sys::Win32::Security::ImpersonateAnonymousToken;
|
||||
use windows_sys::Win32::Security::RevertToSelf;
|
||||
use windows_sys::Win32::System::Threading::GetCurrentThread;
|
||||
|
||||
// Isolate impersonation from Tokio workers and other tests. Query our own
|
||||
// process anonymously instead of assuming a system PID is inaccessible.
|
||||
std::thread::spawn(|| {
|
||||
let record = PidRecord {
|
||||
pid: std::process::id(),
|
||||
process_start_time: "stale".into(),
|
||||
process_identity: None,
|
||||
executable_identity: None,
|
||||
};
|
||||
assert!(
|
||||
crate::backend::windows::Process::open(record.pid)
|
||||
.unwrap()
|
||||
.is_some()
|
||||
);
|
||||
assert_ne!(unsafe { ImpersonateAnonymousToken(GetCurrentThread()) }, 0);
|
||||
let opened = crate::backend::windows::Process::open(record.pid);
|
||||
// Windows identity checks are synchronous; never suspend while impersonating.
|
||||
let matches = super::process_matches_record(&record).now_or_never();
|
||||
let reverted = unsafe { RevertToSelf() };
|
||||
assert_ne!(reverted, 0);
|
||||
|
||||
let error = match opened {
|
||||
Err(error) => error,
|
||||
Ok(_) => panic!("anonymous caller unexpectedly queried the test process"),
|
||||
};
|
||||
assert_eq!(
|
||||
error
|
||||
.downcast_ref::<std::io::Error>()
|
||||
.unwrap()
|
||||
.raw_os_error(),
|
||||
Some(windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED as i32),
|
||||
);
|
||||
assert_eq!(
|
||||
matches
|
||||
.expect("identity check must not suspend")
|
||||
.unwrap_err()
|
||||
.downcast_ref::<std::io::Error>()
|
||||
.unwrap()
|
||||
.raw_os_error(),
|
||||
Some(windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED as i32),
|
||||
);
|
||||
})
|
||||
.join()
|
||||
.expect("anonymous identity check");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn stderr_preservation_failure_does_not_prevent_opening_new_log() -> anyhow::Result<()> {
|
||||
let home = TempDir::new()?;
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
//! Windows updater publication handshake. The predecessor holds the operation
|
||||
//! and reservation locks until its successor initializes and acknowledges readiness.
|
||||
|
||||
use super::super::windows::Process;
|
||||
use super::PidBackend;
|
||||
use super::PidFileState;
|
||||
use super::PidRecord;
|
||||
use super::START_TIMEOUT;
|
||||
use super::STOP_POLL_INTERVAL;
|
||||
use super::process_matches_record;
|
||||
use super::read_process_start_time;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::bail;
|
||||
use tokio::fs;
|
||||
use tokio::time::sleep;
|
||||
|
||||
impl PidBackend {
|
||||
pub(crate) async fn wait_for_ownership(&self) -> Result<()> {
|
||||
let deadline = tokio::time::Instant::now() + START_TIMEOUT;
|
||||
loop {
|
||||
if let PidFileState::Running(record) = self.read_pid_file_state().await?
|
||||
&& record.pid == std::process::id()
|
||||
&& self.record_is_active(&record).await?
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
if tokio::time::Instant::now() >= deadline {
|
||||
bail!("updater was not published by its launcher");
|
||||
}
|
||||
sleep(STOP_POLL_INTERVAL).await;
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn mark_ready(&self) -> Result<()> {
|
||||
fs::write(self.pid_file.with_extension("ready"), b"")
|
||||
.await
|
||||
.context("failed to acknowledge updater startup")
|
||||
}
|
||||
|
||||
// Keep pruning excluded until successor startup and any ownership rollback finish.
|
||||
#[allow(clippy::await_holding_invalid_type)]
|
||||
pub(crate) async fn replace_current_updater(&self) -> Result<()> {
|
||||
// Retry busy pruning instead of waiting on the logging worker. Keep it paused
|
||||
// before open_stderr_log() truncates the shared log and throughout startup.
|
||||
let mut pruning_enabled = super::super::stderr_log::PRUNING_ENABLED
|
||||
.try_lock()
|
||||
.context("stderr pruning is busy; retry updater handoff")?;
|
||||
let record = PidRecord {
|
||||
pid: std::process::id(),
|
||||
process_start_time: read_process_start_time(std::process::id()).await?,
|
||||
process_identity: None,
|
||||
executable_identity: None,
|
||||
};
|
||||
*pruning_enabled = false;
|
||||
let result = self.start_inner(Some(record.clone())).await;
|
||||
// Resume only after ownership is restored. Failed cleanup may leave the
|
||||
// successor alive, and successful handoff leaves it in charge of retention.
|
||||
if result.is_err()
|
||||
&& matches!(
|
||||
self.read_pid_file_state().await,
|
||||
Ok(PidFileState::Running(previous)) if previous == record
|
||||
)
|
||||
{
|
||||
*pruning_enabled = true;
|
||||
}
|
||||
result?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) async fn finish_updater_start(
|
||||
&self,
|
||||
record: &PidRecord,
|
||||
replacement: Option<&PidRecord>,
|
||||
) -> Result<()> {
|
||||
let temp_pid_file = self.pid_file.with_extension("pid.tmp");
|
||||
let ready = self.pid_file.with_extension("ready");
|
||||
let deadline = tokio::time::Instant::now() + START_TIMEOUT;
|
||||
let startup = async {
|
||||
loop {
|
||||
if !process_matches_record(record).await? {
|
||||
bail!("updater exited before becoming ready");
|
||||
}
|
||||
match fs::remove_file(&ready).await {
|
||||
Ok(()) => return Ok(()),
|
||||
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}
|
||||
Err(err) => return Err(err.into()),
|
||||
}
|
||||
if tokio::time::Instant::now() >= deadline {
|
||||
bail!("updater did not become ready");
|
||||
}
|
||||
sleep(STOP_POLL_INTERVAL).await;
|
||||
}
|
||||
}
|
||||
.await;
|
||||
if let Err(err) = startup {
|
||||
if let Some(process) = Process::open(record.pid)?
|
||||
&& process.start_time()? == record.process_start_time
|
||||
{
|
||||
process.terminate()?;
|
||||
let deadline = tokio::time::Instant::now() + START_TIMEOUT;
|
||||
while process.is_running()? {
|
||||
if tokio::time::Instant::now() >= deadline {
|
||||
bail!("failed updater did not exit; ownership was not restored");
|
||||
}
|
||||
sleep(STOP_POLL_INTERVAL).await;
|
||||
}
|
||||
}
|
||||
if let Some(previous) = replacement {
|
||||
fs::write(&temp_pid_file, serde_json::to_vec(previous)?).await?;
|
||||
fs::rename(&temp_pid_file, &self.pid_file).await?;
|
||||
} else {
|
||||
let _ = fs::remove_file(&self.pid_file).await;
|
||||
}
|
||||
return Err(err);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,6 @@ impl Write for LogFile {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn enable_append() -> io::Result<()> {
|
||||
use std::os::fd::AsRawFd;
|
||||
|
||||
@@ -121,47 +120,6 @@ fn enable_append() -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn enable_append() -> io::Result<()> {
|
||||
use std::os::windows::io::AsRawHandle;
|
||||
use std::os::windows::io::FromRawHandle;
|
||||
use std::os::windows::io::IntoRawHandle;
|
||||
use std::os::windows::io::OwnedHandle;
|
||||
use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_WRITE;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_DELETE;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_READ;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_WRITE;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_WRITE_DATA;
|
||||
use windows_sys::Win32::Storage::FileSystem::ReOpenFile;
|
||||
use windows_sys::Win32::System::Console::STD_ERROR_HANDLE;
|
||||
use windows_sys::Win32::System::Console::SetStdHandle;
|
||||
|
||||
let stderr = std::io::stderr();
|
||||
// SAFETY: stderr is borrowed and remains open; reopening does not truncate it.
|
||||
let handle = unsafe {
|
||||
ReOpenFile(
|
||||
stderr.as_raw_handle(),
|
||||
// Append-only access makes writes follow EOF after truncation.
|
||||
FILE_GENERIC_WRITE & !FILE_WRITE_DATA,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
/*dwflagsandattributes*/ 0,
|
||||
)
|
||||
};
|
||||
if handle == INVALID_HANDLE_VALUE {
|
||||
return Err(io::Error::last_os_error());
|
||||
}
|
||||
// SAFETY: ReOpenFile returned a new, valid handle owned by this function.
|
||||
let handle = unsafe { OwnedHandle::from_raw_handle(handle) };
|
||||
// SAFETY: the append handle is valid and retained for the process lifetime on success.
|
||||
if unsafe { SetStdHandle(STD_ERROR_HANDLE, handle.as_raw_handle()) } == 0 {
|
||||
return Err(io::Error::last_os_error());
|
||||
}
|
||||
// The process owns its new stderr. Keep the borrowed original valid for cached users.
|
||||
let _ = handle.into_raw_handle();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn prune(path: &Path, pruning_enabled: &Mutex<bool>) -> io::Result<()> {
|
||||
let Ok(enabled) = pruning_enabled.try_lock() else {
|
||||
return Ok(());
|
||||
|
||||
@@ -4,7 +4,6 @@ use super::preserve;
|
||||
use super::prune;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[tokio::test]
|
||||
async fn pruning_resets_the_write_position_of_a_legacy_nonappend_writer() -> anyhow::Result<()> {
|
||||
use std::io::Write;
|
||||
|
||||
@@ -1,327 +0,0 @@
|
||||
//! Windows process identity and file locks. Keep a process handle across shutdown
|
||||
//! so PID reuse can never redirect forced termination to a different process.
|
||||
//! Managed servers must not elevate ordinary clients sharing the account's socket.
|
||||
//! Installer jobs contain extraction processes when an update is cancelled.
|
||||
//! Detached launches stop the launcher's original stdio handles from propagating.
|
||||
//! Launch probes distinguish job restrictions from other failures without running the binary.
|
||||
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use std::os::windows::io::AsRawHandle;
|
||||
use std::os::windows::io::FromRawHandle;
|
||||
use std::os::windows::io::OwnedHandle;
|
||||
use std::os::windows::process::CommandExt;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::process::Stdio;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED;
|
||||
use windows_sys::Win32::Foundation::ERROR_INVALID_HANDLE;
|
||||
use windows_sys::Win32::Foundation::ERROR_INVALID_PARAMETER;
|
||||
use windows_sys::Win32::Foundation::ERROR_LOCK_VIOLATION;
|
||||
use windows_sys::Win32::Foundation::FILETIME;
|
||||
use windows_sys::Win32::Foundation::HANDLE;
|
||||
use windows_sys::Win32::Foundation::HANDLE_FLAG_INHERIT;
|
||||
use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE;
|
||||
use windows_sys::Win32::Foundation::SetHandleInformation;
|
||||
use windows_sys::Win32::Foundation::WAIT_OBJECT_0;
|
||||
use windows_sys::Win32::Foundation::WAIT_TIMEOUT;
|
||||
use windows_sys::Win32::Security::GetTokenInformation;
|
||||
use windows_sys::Win32::Security::TOKEN_ELEVATION;
|
||||
use windows_sys::Win32::Security::TOKEN_QUERY;
|
||||
use windows_sys::Win32::Security::TokenElevation;
|
||||
use windows_sys::Win32::Storage::FileSystem::LOCKFILE_EXCLUSIVE_LOCK;
|
||||
use windows_sys::Win32::Storage::FileSystem::LOCKFILE_FAIL_IMMEDIATELY;
|
||||
use windows_sys::Win32::Storage::FileSystem::LockFileEx;
|
||||
use windows_sys::Win32::System::JobObjects::AssignProcessToJobObject;
|
||||
use windows_sys::Win32::System::JobObjects::CreateJobObjectW;
|
||||
use windows_sys::Win32::System::JobObjects::JOB_OBJECT_LIMIT_BREAKAWAY_OK;
|
||||
use windows_sys::Win32::System::JobObjects::JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
|
||||
use windows_sys::Win32::System::JobObjects::JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
|
||||
use windows_sys::Win32::System::JobObjects::JobObjectExtendedLimitInformation;
|
||||
use windows_sys::Win32::System::JobObjects::SetInformationJobObject;
|
||||
use windows_sys::Win32::System::Threading::CREATE_BREAKAWAY_FROM_JOB;
|
||||
use windows_sys::Win32::System::Threading::CREATE_SUSPENDED;
|
||||
use windows_sys::Win32::System::Threading::DETACHED_PROCESS;
|
||||
use windows_sys::Win32::System::Threading::GetCurrentProcess;
|
||||
use windows_sys::Win32::System::Threading::GetProcessId;
|
||||
use windows_sys::Win32::System::Threading::GetProcessTimes;
|
||||
use windows_sys::Win32::System::Threading::OpenProcess;
|
||||
use windows_sys::Win32::System::Threading::OpenProcessToken;
|
||||
use windows_sys::Win32::System::Threading::PROCESS_ACCESS_RIGHTS;
|
||||
use windows_sys::Win32::System::Threading::PROCESS_QUERY_LIMITED_INFORMATION;
|
||||
use windows_sys::Win32::System::Threading::PROCESS_SYNCHRONIZE;
|
||||
use windows_sys::Win32::System::Threading::PROCESS_TERMINATE;
|
||||
use windows_sys::Win32::System::Threading::TerminateProcess;
|
||||
use windows_sys::Win32::System::Threading::WaitForSingleObject;
|
||||
|
||||
pub(super) fn spawn_without_inheriting_stdio(
|
||||
command: &mut tokio::process::Command,
|
||||
) -> Result<tokio::process::Child> {
|
||||
// The daemon must not inherit the launcher's output pipes: callers wait for
|
||||
// them to close after the launcher exits. Leave the flags cleared so concurrent
|
||||
// launches cannot inherit them either; Rust duplicates the child's chosen stdio.
|
||||
for (name, handle) in [
|
||||
("stdin", io::stdin().as_raw_handle()),
|
||||
("stdout", io::stdout().as_raw_handle()),
|
||||
("stderr", io::stderr().as_raw_handle()),
|
||||
] {
|
||||
if handle.is_null() || handle == INVALID_HANDLE_VALUE {
|
||||
continue;
|
||||
}
|
||||
// SAFETY: these are borrowed standard handles; changing the inherit
|
||||
// flag neither closes them nor changes their read/write access.
|
||||
if unsafe {
|
||||
SetHandleInformation(handle, HANDLE_FLAG_INHERIT, /*dwflags*/ 0)
|
||||
} == 0
|
||||
{
|
||||
let error = io::Error::last_os_error();
|
||||
// An already-closed handle cannot be inherited.
|
||||
if error.raw_os_error() == Some(ERROR_INVALID_HANDLE as i32) {
|
||||
continue;
|
||||
}
|
||||
return Err(error)
|
||||
.with_context(|| format!("failed to clear launcher {name} inheritance"));
|
||||
}
|
||||
}
|
||||
Ok(command.spawn()?)
|
||||
}
|
||||
|
||||
/// Reports whether this process has administrator privileges, rather than
|
||||
/// merely belonging to an administrator account.
|
||||
pub fn is_elevated() -> Result<bool> {
|
||||
let mut token = std::ptr::null_mut();
|
||||
if unsafe { OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &mut token) } == 0 {
|
||||
return Err(io::Error::last_os_error()).context("failed to query daemon launcher token");
|
||||
}
|
||||
let token = unsafe { OwnedHandle::from_raw_handle(token) };
|
||||
let mut elevation: TOKEN_ELEVATION = unsafe { std::mem::zeroed() };
|
||||
let mut returned = 0;
|
||||
if unsafe {
|
||||
GetTokenInformation(
|
||||
token.as_raw_handle(),
|
||||
TokenElevation,
|
||||
(&mut elevation as *mut TOKEN_ELEVATION).cast(),
|
||||
std::mem::size_of::<TOKEN_ELEVATION>() as u32,
|
||||
&mut returned,
|
||||
)
|
||||
} == 0
|
||||
{
|
||||
return Err(io::Error::last_os_error())
|
||||
.context("failed to query daemon launcher elevation");
|
||||
}
|
||||
Ok(elevation.TokenIsElevated != 0)
|
||||
}
|
||||
|
||||
pub(crate) fn ensure_not_elevated() -> Result<()> {
|
||||
anyhow::ensure!(
|
||||
!is_elevated()?,
|
||||
"start the Windows daemon from a non-elevated terminal; shared clients must not inherit administrator privileges"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// A launch that only fails when asked to leave the launcher's Windows job.
|
||||
/// Automatic CLI startup may use its embedded server; lifecycle operations
|
||||
/// must still return this error before stopping an existing daemon.
|
||||
#[derive(Debug)]
|
||||
pub struct DetachedLaunchRestricted;
|
||||
|
||||
impl fmt::Display for DetachedLaunchRestricted {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(
|
||||
"this Windows launcher prevents background processes from outliving it (for example, cargo run); build and run codex.exe directly to use the background server",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Check that breakaway launch is permitted before stopping an existing daemon.
|
||||
// An outer system job may remain attached; membership alone does not establish
|
||||
// whether it will terminate the daemon. Suspend the probe before cleanup.
|
||||
pub(crate) fn ensure_detached_launch(executable: &Path) -> Result<()> {
|
||||
let mut command = Command::new(executable);
|
||||
command
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
.creation_flags(CREATE_SUSPENDED | DETACHED_PROCESS | CREATE_BREAKAWAY_FROM_JOB);
|
||||
let (mut child, launch_result) = match command.spawn() {
|
||||
Ok(child) => (child, Ok(())),
|
||||
Err(err) if err.raw_os_error() == Some(ERROR_ACCESS_DENIED as i32) => {
|
||||
// Access denied can also mean the file cannot be executed. Only
|
||||
// classify a job restriction if removing breakaway makes it work.
|
||||
// This diagnostic child stays suspended and is always reaped.
|
||||
command.creation_flags(CREATE_SUSPENDED | DETACHED_PROCESS);
|
||||
let child = match command.spawn() {
|
||||
Ok(child) => child,
|
||||
Err(_) => {
|
||||
return Err(err).context(crate::telemetry::StartFailure::Spawn(
|
||||
"cannot launch detached daemon".into(),
|
||||
));
|
||||
}
|
||||
};
|
||||
(child, Err(err).context(DetachedLaunchRestricted))
|
||||
}
|
||||
Err(err) => {
|
||||
return Err(err).context(crate::telemetry::StartFailure::Spawn(
|
||||
"cannot launch detached daemon".into(),
|
||||
));
|
||||
}
|
||||
};
|
||||
child
|
||||
.kill()
|
||||
.context("failed to terminate suspended launch probe")?;
|
||||
child
|
||||
.wait()
|
||||
.context("failed to reap suspended launch probe")?;
|
||||
launch_result
|
||||
}
|
||||
|
||||
pub(super) struct Process(OwnedHandle);
|
||||
|
||||
impl Process {
|
||||
pub(super) fn open(pid: u32) -> Result<Option<Self>> {
|
||||
Self::open_with_access(pid, PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_SYNCHRONIZE)
|
||||
}
|
||||
|
||||
fn open_with_access(pid: u32, access: PROCESS_ACCESS_RIGHTS) -> Result<Option<Self>> {
|
||||
let handle = unsafe {
|
||||
OpenProcess(access, /*binherithandle*/ 0, pid)
|
||||
};
|
||||
if handle.is_null() {
|
||||
let err = io::Error::last_os_error();
|
||||
return if err.raw_os_error() == Some(ERROR_INVALID_PARAMETER as i32) {
|
||||
Ok(None)
|
||||
} else {
|
||||
Err(err).context("failed to open daemon process")
|
||||
};
|
||||
}
|
||||
Ok(Some(Self(unsafe { OwnedHandle::from_raw_handle(handle) })))
|
||||
}
|
||||
|
||||
pub(super) fn start_time(&self) -> Result<String> {
|
||||
let mut created: FILETIME = unsafe { std::mem::zeroed() };
|
||||
let mut exited = created;
|
||||
let mut kernel = created;
|
||||
let mut user = created;
|
||||
if unsafe {
|
||||
GetProcessTimes(
|
||||
self.0.as_raw_handle(),
|
||||
&mut created,
|
||||
&mut exited,
|
||||
&mut kernel,
|
||||
&mut user,
|
||||
)
|
||||
} == 0
|
||||
{
|
||||
return Err(io::Error::last_os_error()).context("failed to query daemon creation time");
|
||||
}
|
||||
Ok(
|
||||
((u64::from(created.dwHighDateTime) << 32) | u64::from(created.dwLowDateTime))
|
||||
.to_string(),
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn is_running(&self) -> Result<bool> {
|
||||
match unsafe {
|
||||
WaitForSingleObject(self.0.as_raw_handle(), /*dwmilliseconds*/ 0)
|
||||
} {
|
||||
WAIT_TIMEOUT => Ok(true),
|
||||
WAIT_OBJECT_0 => Ok(false),
|
||||
_ => Err(io::Error::last_os_error()).context("failed to wait for daemon process"),
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn terminate(&self) -> Result<()> {
|
||||
if !self.is_running()? {
|
||||
return Ok(());
|
||||
}
|
||||
let pid = unsafe { GetProcessId(self.0.as_raw_handle()) };
|
||||
let Some(target) = Self::open_with_access(
|
||||
pid,
|
||||
PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_SYNCHRONIZE | PROCESS_TERMINATE,
|
||||
)?
|
||||
else {
|
||||
return Ok(());
|
||||
};
|
||||
// Keep the original identity handle alive and validate the handle that
|
||||
// will actually be terminated, rather than trusting a second PID lookup.
|
||||
if target.start_time()? != self.start_time()? || !target.is_running()? {
|
||||
return Ok(());
|
||||
}
|
||||
if unsafe {
|
||||
TerminateProcess(target.0.as_raw_handle(), /*uexitcode*/ 1)
|
||||
} == 0
|
||||
{
|
||||
return Err(io::Error::last_os_error()).context("failed to terminate daemon process");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn try_lock_file(file: &tokio::fs::File) -> Result<bool> {
|
||||
let mut overlapped = unsafe { std::mem::zeroed() };
|
||||
if unsafe {
|
||||
LockFileEx(
|
||||
file.as_raw_handle(),
|
||||
LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY,
|
||||
/*dwreserved*/ 0,
|
||||
/*nnumberofbytestolocklow*/ 1,
|
||||
/*nnumberofbytestolockhigh*/ 0,
|
||||
&mut overlapped,
|
||||
)
|
||||
} != 0
|
||||
{
|
||||
return Ok(true);
|
||||
}
|
||||
let err = io::Error::last_os_error();
|
||||
if err.raw_os_error() == Some(ERROR_LOCK_VIOLATION as i32) {
|
||||
return Ok(false);
|
||||
}
|
||||
Err(err).context("failed to lock daemon state")
|
||||
}
|
||||
|
||||
// Keep installer descendants bounded by the updater's lifetime, while allowing
|
||||
// app-server launches and successor updaters to break away from this job.
|
||||
pub(crate) fn updater_job() -> Result<OwnedHandle> {
|
||||
process_job(unsafe { GetCurrentProcess() })
|
||||
}
|
||||
|
||||
/// Called before writing the installer script, while PowerShell is waiting on stdin.
|
||||
pub(crate) fn installer_job(child: &tokio::process::Child) -> Result<OwnedHandle> {
|
||||
let process = child
|
||||
.raw_handle()
|
||||
.context("installer process handle is unavailable")?;
|
||||
process_job(process)
|
||||
}
|
||||
|
||||
fn process_job(process: HANDLE) -> Result<OwnedHandle> {
|
||||
let job = unsafe { CreateJobObjectW(std::ptr::null(), std::ptr::null()) };
|
||||
if job.is_null() {
|
||||
return Err(io::Error::last_os_error()).context("failed to create updater job");
|
||||
}
|
||||
let owned = unsafe { OwnedHandle::from_raw_handle(job) };
|
||||
let mut limits: JOBOBJECT_EXTENDED_LIMIT_INFORMATION = unsafe { std::mem::zeroed() };
|
||||
limits.BasicLimitInformation.LimitFlags =
|
||||
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_BREAKAWAY_OK;
|
||||
if unsafe {
|
||||
SetInformationJobObject(
|
||||
job,
|
||||
JobObjectExtendedLimitInformation,
|
||||
(&limits as *const JOBOBJECT_EXTENDED_LIMIT_INFORMATION).cast(),
|
||||
std::mem::size_of_val(&limits) as u32,
|
||||
)
|
||||
} == 0
|
||||
|| unsafe { AssignProcessToJobObject(job, process) } == 0
|
||||
{
|
||||
return Err(io::Error::last_os_error())
|
||||
.context("failed to contain updater installer processes");
|
||||
}
|
||||
Ok(owned)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "windows_tests.rs"]
|
||||
mod tests;
|
||||
@@ -1,365 +0,0 @@
|
||||
use super::Process;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::os::windows::io::AsRawHandle;
|
||||
use std::os::windows::io::FromRawHandle;
|
||||
use std::os::windows::io::OwnedHandle;
|
||||
use std::os::windows::process::CommandExt;
|
||||
use std::process::Stdio;
|
||||
use std::time::Duration;
|
||||
use tokio::io::AsyncReadExt;
|
||||
use windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED;
|
||||
use windows_sys::Win32::Foundation::HANDLE_FLAG_INHERIT;
|
||||
use windows_sys::Win32::Foundation::SetHandleInformation;
|
||||
use windows_sys::Win32::System::JobObjects::IsProcessInJob;
|
||||
use windows_sys::Win32::System::Threading::CREATE_NO_WINDOW;
|
||||
use windows_sys::Win32::System::Threading::DETACHED_PROCESS;
|
||||
use windows_sys::Win32::System::Threading::TerminateProcess;
|
||||
|
||||
#[tokio::test]
|
||||
async fn captured_stdio_closes_while_child_is_alive() {
|
||||
const TEST: &str = "backend::windows::tests::captured_stdio_closes_while_child_is_alive";
|
||||
const ROLE: &str = "CODEX_TEST_STDIO_ROLE";
|
||||
const HOME: &str = "CODEX_TEST_STDIO_HOME";
|
||||
let executable = std::env::current_exe().expect("test executable");
|
||||
|
||||
if let Ok(role) = std::env::var(ROLE) {
|
||||
let home = std::path::PathBuf::from(std::env::var_os(HOME).expect("test home"));
|
||||
if role == "child" {
|
||||
eprintln!("child stderr");
|
||||
std::fs::write(home.join("ready"), []).unwrap();
|
||||
tokio::time::sleep(Duration::from_secs(30)).await;
|
||||
return;
|
||||
}
|
||||
|
||||
let handles = [
|
||||
std::io::stdout().as_raw_handle(),
|
||||
std::io::stderr().as_raw_handle(),
|
||||
];
|
||||
for handle in handles {
|
||||
assert_ne!(
|
||||
unsafe { SetHandleInformation(handle, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT) },
|
||||
0
|
||||
);
|
||||
}
|
||||
let mut command = tokio::process::Command::new(executable);
|
||||
command
|
||||
.args(["--exact", TEST, "--nocapture"])
|
||||
.env(ROLE, "child")
|
||||
// The CI job may forbid breakaway; it does not affect stdio inheritance.
|
||||
.creation_flags(DETACHED_PROCESS)
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(std::fs::File::create(home.join("child.log")).unwrap());
|
||||
let child = super::spawn_without_inheriting_stdio(&mut command).unwrap();
|
||||
let pid = child.id().unwrap();
|
||||
let started = Process::open(pid).unwrap().unwrap().start_time().unwrap();
|
||||
std::fs::write(
|
||||
home.join("pid"),
|
||||
serde_json::to_vec(&(pid, started)).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
println!("launcher stdout");
|
||||
eprintln!("launcher stderr");
|
||||
return;
|
||||
}
|
||||
|
||||
let home = tempfile::tempdir().unwrap();
|
||||
let mut launcher = tokio::process::Command::new(executable)
|
||||
.args(["--exact", TEST, "--nocapture"])
|
||||
.env(ROLE, "launcher")
|
||||
.env(HOME, home.path())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
.kill_on_drop(true)
|
||||
.spawn()
|
||||
.unwrap();
|
||||
let status = tokio::time::timeout(Duration::from_secs(10), launcher.wait())
|
||||
.await
|
||||
.expect("launcher exit")
|
||||
.unwrap();
|
||||
let (pid, started): (u32, String) =
|
||||
serde_json::from_slice(&std::fs::read(home.path().join("pid")).unwrap()).unwrap();
|
||||
let child = Process::open(pid).unwrap().expect("live child");
|
||||
assert_eq!(
|
||||
child.start_time().unwrap(),
|
||||
started,
|
||||
"fixture PID was reused"
|
||||
);
|
||||
let mut stdout = String::new();
|
||||
let mut stderr = String::new();
|
||||
let captured = tokio::time::timeout(Duration::from_secs(5), async {
|
||||
let ready = home.path().join("ready");
|
||||
while !ready.exists() {
|
||||
tokio::time::sleep(Duration::from_millis(25)).await;
|
||||
}
|
||||
tokio::try_join!(
|
||||
launcher
|
||||
.stdout
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.read_to_string(&mut stdout),
|
||||
launcher
|
||||
.stderr
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.read_to_string(&mut stderr),
|
||||
)
|
||||
})
|
||||
.await;
|
||||
let still_running = child.is_running();
|
||||
child.terminate().expect("cleanup child");
|
||||
tokio::time::timeout(Duration::from_secs(5), async {
|
||||
while child.is_running().unwrap() {
|
||||
tokio::time::sleep(Duration::from_millis(25)).await;
|
||||
}
|
||||
})
|
||||
.await
|
||||
.expect("child exit after cleanup");
|
||||
|
||||
captured.expect("launcher output must close").unwrap();
|
||||
assert!(status.success(), "{stderr}");
|
||||
assert!(
|
||||
still_running.unwrap(),
|
||||
"child exited before its launcher output closed"
|
||||
);
|
||||
assert!(stdout.contains("launcher stdout"));
|
||||
assert!(stderr.contains("launcher stderr"));
|
||||
assert!(
|
||||
std::fs::read_to_string(home.path().join("child.log"))
|
||||
.unwrap()
|
||||
.contains("child stderr")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn detached_launch_preflight_rejects_restrictive_job() {
|
||||
const CHILD: &str = "CODEX_TEST_RESTRICTIVE_LAUNCH_JOB";
|
||||
let executable = std::env::current_exe().expect("test executable");
|
||||
if std::env::var_os(CHILD).is_some() {
|
||||
let job = unsafe { super::CreateJobObjectW(std::ptr::null(), std::ptr::null()) };
|
||||
assert!(!job.is_null());
|
||||
let job = unsafe {
|
||||
<std::os::windows::io::OwnedHandle as std::os::windows::io::FromRawHandle>::from_raw_handle(job)
|
||||
};
|
||||
assert_ne!(
|
||||
unsafe {
|
||||
super::AssignProcessToJobObject(job.as_raw_handle(), super::GetCurrentProcess())
|
||||
},
|
||||
0
|
||||
);
|
||||
// A new job does not permit breakaway. Reject before any lifecycle mutation.
|
||||
let err = super::ensure_detached_launch(&executable).expect_err("breakaway forbidden");
|
||||
assert!(
|
||||
err.is::<super::DetachedLaunchRestricted>(),
|
||||
"expected a classified job restriction: {err:#}"
|
||||
);
|
||||
// File access failures must still fail normally, even in a restricted
|
||||
// job: a CLI must not hide corrupt or inaccessible installations.
|
||||
let temp = tempfile::tempdir().expect("test directory");
|
||||
let err =
|
||||
super::ensure_detached_launch(temp.path()).expect_err("directory is not an executable");
|
||||
assert!(!err.is::<super::DetachedLaunchRestricted>(), "{err:#}");
|
||||
return;
|
||||
}
|
||||
let output = std::process::Command::new(executable)
|
||||
.args([
|
||||
"--exact",
|
||||
"backend::windows::tests::detached_launch_preflight_rejects_restrictive_job",
|
||||
"--nocapture",
|
||||
])
|
||||
.env(CHILD, "1")
|
||||
.output()
|
||||
.expect("isolated job test");
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"{}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
assert!(String::from_utf8_lossy(&output.stdout).contains("1 passed"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn detached_launch_preflight_allows_residual_job() {
|
||||
const CHILD: &str = "CODEX_TEST_RESIDUAL_LAUNCH_JOB";
|
||||
let executable = std::env::current_exe().expect("test executable");
|
||||
if std::env::var_os(CHILD).is_some() {
|
||||
let mut jobs = Vec::new();
|
||||
for inner in [false, true] {
|
||||
let job = unsafe { super::CreateJobObjectW(std::ptr::null(), std::ptr::null()) };
|
||||
assert!(!job.is_null());
|
||||
let job = unsafe { OwnedHandle::from_raw_handle(job) };
|
||||
if inner {
|
||||
let mut limits: super::JOBOBJECT_EXTENDED_LIMIT_INFORMATION =
|
||||
unsafe { std::mem::zeroed() };
|
||||
limits.BasicLimitInformation.LimitFlags = super::JOB_OBJECT_LIMIT_BREAKAWAY_OK;
|
||||
assert_ne!(
|
||||
unsafe {
|
||||
super::SetInformationJobObject(
|
||||
job.as_raw_handle(),
|
||||
super::JobObjectExtendedLimitInformation,
|
||||
(&limits as *const super::JOBOBJECT_EXTENDED_LIMIT_INFORMATION).cast(),
|
||||
std::mem::size_of_val(&limits) as u32,
|
||||
)
|
||||
},
|
||||
0
|
||||
);
|
||||
}
|
||||
assert_ne!(
|
||||
unsafe {
|
||||
super::AssignProcessToJobObject(job.as_raw_handle(), super::GetCurrentProcess())
|
||||
},
|
||||
0
|
||||
);
|
||||
jobs.push(job);
|
||||
}
|
||||
|
||||
let mut probe = std::process::Command::new(&executable)
|
||||
.creation_flags(
|
||||
super::CREATE_SUSPENDED
|
||||
| super::DETACHED_PROCESS
|
||||
| super::CREATE_BREAKAWAY_FROM_JOB,
|
||||
)
|
||||
.spawn()
|
||||
.expect("breakaway probe");
|
||||
let mut in_outer = 0;
|
||||
let mut in_inner = 0;
|
||||
let outer_checked = unsafe {
|
||||
IsProcessInJob(
|
||||
probe.as_raw_handle(),
|
||||
jobs[0].as_raw_handle(),
|
||||
&mut in_outer,
|
||||
)
|
||||
};
|
||||
let inner_checked = unsafe {
|
||||
IsProcessInJob(
|
||||
probe.as_raw_handle(),
|
||||
jobs[1].as_raw_handle(),
|
||||
&mut in_inner,
|
||||
)
|
||||
};
|
||||
probe.kill().expect("terminate probe");
|
||||
probe.wait().expect("reap probe");
|
||||
assert_ne!(outer_checked, 0);
|
||||
assert_ne!(inner_checked, 0);
|
||||
assert_ne!(in_outer, 0, "probe must retain its outer job");
|
||||
assert_eq!(in_inner, 0, "probe must leave its inner job");
|
||||
super::ensure_detached_launch(&executable).expect("residual job must be accepted");
|
||||
|
||||
if let Err(err) = super::ensure_not_elevated() {
|
||||
assert!(err.to_string().contains("non-elevated terminal"));
|
||||
return;
|
||||
}
|
||||
let temp = tempfile::tempdir().expect("temp dir");
|
||||
let script = temp.path().join("codex.cmd");
|
||||
std::fs::write(
|
||||
&script,
|
||||
"@echo off\r\nif \"%3\"==\"--help\" exit /b 1\r\necho ready > \"%~dp0ready\"\r\nfor /l %%i in (1,1,10000000) do @rem\r\n",
|
||||
)
|
||||
.expect("write daemon fixture");
|
||||
let backend = crate::backend::pid::PidBackend::new(
|
||||
script,
|
||||
temp.path().join("state").join("daemon.pid"),
|
||||
/*remote_control_enabled*/ false,
|
||||
);
|
||||
let runtime = tokio::runtime::Builder::new_current_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.expect("runtime");
|
||||
let pid = runtime
|
||||
.block_on(backend.start())
|
||||
.expect("daemon launch")
|
||||
.expect("new daemon pid");
|
||||
let process = Process::open(pid)
|
||||
.expect("open daemon")
|
||||
.expect("live daemon");
|
||||
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5);
|
||||
while !temp.path().join("ready").exists() && std::time::Instant::now() < deadline {
|
||||
std::thread::sleep(std::time::Duration::from_millis(50));
|
||||
}
|
||||
let ready = temp.path().join("ready").exists();
|
||||
let outer_checked = unsafe {
|
||||
IsProcessInJob(
|
||||
process.0.as_raw_handle(),
|
||||
jobs[0].as_raw_handle(),
|
||||
&mut in_outer,
|
||||
)
|
||||
};
|
||||
let inner_checked = unsafe {
|
||||
IsProcessInJob(
|
||||
process.0.as_raw_handle(),
|
||||
jobs[1].as_raw_handle(),
|
||||
&mut in_inner,
|
||||
)
|
||||
};
|
||||
process.terminate().expect("terminate daemon fixture");
|
||||
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5);
|
||||
while process.is_running().expect("daemon liveness") && std::time::Instant::now() < deadline
|
||||
{
|
||||
std::thread::sleep(std::time::Duration::from_millis(50));
|
||||
}
|
||||
assert!(!process.is_running().expect("daemon liveness"));
|
||||
assert!(ready, "daemon fixture did not start");
|
||||
assert_ne!(outer_checked, 0);
|
||||
assert_ne!(inner_checked, 0);
|
||||
assert_ne!(in_outer, 0, "daemon must retain its outer job");
|
||||
assert_eq!(in_inner, 0, "daemon must leave its inner job");
|
||||
return;
|
||||
}
|
||||
let output = std::process::Command::new(executable)
|
||||
.args([
|
||||
"--exact",
|
||||
"backend::windows::tests::detached_launch_preflight_allows_residual_job",
|
||||
"--nocapture",
|
||||
])
|
||||
.env(CHILD, "1")
|
||||
.output()
|
||||
.expect("isolated job test");
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"{}\n{}",
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
assert!(String::from_utf8_lossy(&output.stdout).contains("1 passed"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn identity_queries_do_not_require_termination_access() {
|
||||
let mut child = tokio::process::Command::new("powershell.exe")
|
||||
.args([
|
||||
"-NoProfile",
|
||||
"-NonInteractive",
|
||||
"-Command",
|
||||
"Start-Sleep 60",
|
||||
])
|
||||
.creation_flags(CREATE_NO_WINDOW)
|
||||
.kill_on_drop(true)
|
||||
.spawn()
|
||||
.expect("child");
|
||||
let process = Process::open(child.id().expect("pid"))
|
||||
.expect("query handle")
|
||||
.expect("live process");
|
||||
assert!(!process.start_time().expect("creation time").is_empty());
|
||||
assert!(process.is_running().expect("liveness"));
|
||||
// Check the rights on the actual query handle, independent of privileges
|
||||
// that could let the caller reopen the process with termination access.
|
||||
assert_eq!(
|
||||
unsafe {
|
||||
TerminateProcess(process.0.as_raw_handle(), /*uexitcode*/ 1)
|
||||
},
|
||||
0
|
||||
);
|
||||
assert_eq!(
|
||||
std::io::Error::last_os_error().raw_os_error(),
|
||||
Some(ERROR_ACCESS_DENIED as i32)
|
||||
);
|
||||
assert!(
|
||||
process
|
||||
.is_running()
|
||||
.expect("query must not terminate child")
|
||||
);
|
||||
child
|
||||
.kill()
|
||||
.await
|
||||
.expect("cleanup through original spawn handle");
|
||||
}
|
||||
@@ -7,7 +7,6 @@ use std::process::Command;
|
||||
use anyhow::Result;
|
||||
|
||||
pub(crate) fn set_working_directory(command: &mut Command, state_dir: &Path) -> Result<()> {
|
||||
#[cfg(unix)]
|
||||
let cwd_missing = match std::env::current_dir() {
|
||||
Ok(_) => false,
|
||||
Err(err) if err.kind() == std::io::ErrorKind::NotFound => true,
|
||||
@@ -32,8 +31,6 @@ pub(crate) fn set_working_directory(command: &mut Command, state_dir: &Path) ->
|
||||
}
|
||||
// Preserve process-scoped paths before changing cwd; CA names match CUSTOM_CA_ENV_KEYS.
|
||||
for name in [
|
||||
#[cfg(windows)]
|
||||
"CODEX_SQLITE_HOME",
|
||||
"CODEX_CA_CERTIFICATE",
|
||||
"SSL_CERT_FILE",
|
||||
"REQUESTS_CA_BUNDLE",
|
||||
@@ -82,11 +79,8 @@ pub(crate) fn set_working_directory(command: &mut Command, state_dir: &Path) ->
|
||||
.collect::<std::io::Result<Vec<_>>>()?;
|
||||
command.env("SSL_CERT_DIR", std::env::join_paths(paths)?);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
if cwd_missing {
|
||||
command.current_dir(state_dir);
|
||||
}
|
||||
#[cfg(windows)]
|
||||
command.current_dir(state_dir);
|
||||
Ok(())
|
||||
}
|
||||
@@ -74,28 +74,6 @@ async fn connect_at(socket_path: &Path, url: &str) -> Result<WebSocketStream<Uni
|
||||
Ok(websocket)
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub(crate) async fn request_shutdown(socket_path: &Path, pid: u32) -> Result<()> {
|
||||
timeout(CONTROL_SOCKET_RESPONSE_TIMEOUT, async {
|
||||
let mut websocket = connect_at(socket_path, "ws://localhost/daemon/shutdown").await?;
|
||||
websocket
|
||||
.send(Message::Text(pid.to_string().into()))
|
||||
.await?;
|
||||
let reply = websocket
|
||||
.next()
|
||||
.await
|
||||
.context("shutdown socket closed without acknowledgment")??;
|
||||
anyhow::ensure!(
|
||||
matches!(reply, Message::Text(ack) if ack == pid.to_string()),
|
||||
"shutdown acknowledgment did not match the managed process {pid}"
|
||||
);
|
||||
websocket.close(None).await?;
|
||||
Ok(())
|
||||
})
|
||||
.await
|
||||
.context("timed out waiting for managed app-server shutdown acknowledgment")?
|
||||
}
|
||||
|
||||
pub(crate) async fn initialize<S>(
|
||||
websocket: &mut WebSocketStream<S>,
|
||||
experimental_api: bool,
|
||||
@@ -183,7 +161,7 @@ fn parse_version_from_user_agent(user_agent: &str) -> Result<String> {
|
||||
Ok(version.to_string())
|
||||
}
|
||||
|
||||
#[cfg(all(test, unix))]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ impl Drop for InstallLock {
|
||||
pub(crate) async fn acquire_install_lock(root: &Path) -> Result<InstallLock> {
|
||||
let lock = root.join("install.lock");
|
||||
let deadline = tokio::time::Instant::now() + Duration::from_secs(30);
|
||||
#[cfg(unix)]
|
||||
let use_lockf = {
|
||||
// Match the installer so both processes coordinate on the same lock.
|
||||
let choice = tokio::process::Command::new("/bin/sh")
|
||||
@@ -95,14 +94,8 @@ pub(crate) async fn acquire_install_lock(root: &Path) -> Result<InstallLock> {
|
||||
};
|
||||
let mut options = OpenOptions::new();
|
||||
options.create(true).truncate(false).write(true);
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use std::os::windows::fs::OpenOptionsExt;
|
||||
options.share_mode(0);
|
||||
}
|
||||
loop {
|
||||
let acquired = options.open(&lock);
|
||||
#[cfg(unix)]
|
||||
let acquired = acquired.and_then(|file| {
|
||||
{
|
||||
use std::os::fd::AsRawFd;
|
||||
@@ -125,11 +118,7 @@ pub(crate) async fn acquire_install_lock(root: &Path) -> Result<InstallLock> {
|
||||
_directory_owner: None,
|
||||
});
|
||||
}
|
||||
Err(error)
|
||||
if error.kind() == std::io::ErrorKind::WouldBlock
|
||||
|| cfg!(windows)
|
||||
&& (error.raw_os_error() == Some(32)
|
||||
|| error.kind() == std::io::ErrorKind::PermissionDenied) => {}
|
||||
Err(error) if error.kind() == std::io::ErrorKind::WouldBlock => {}
|
||||
Err(error) => return Err(error).context("failed to acquire daemon installer lock"),
|
||||
}
|
||||
if tokio::time::Instant::now() >= deadline {
|
||||
|
||||
@@ -24,8 +24,6 @@ pub async fn start_with_features_classified(
|
||||
features: &BTreeMap<String, bool>,
|
||||
) -> Result<LifecycleOutput, StartError> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
crate::backend::windows::ensure_not_elevated()?;
|
||||
let mut daemon = Daemon::from_environment()?;
|
||||
daemon.log_diagnostics = true;
|
||||
let _operation_lock = daemon.acquire_operation_lock().await?;
|
||||
@@ -40,8 +38,6 @@ pub async fn start_with_features_classified(
|
||||
/// then verify effective server compatibility after this operation completes.
|
||||
pub async fn restart_with_features(features: &BTreeMap<String, bool>) -> Result<LifecycleOutput> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
crate::backend::windows::ensure_not_elevated()?;
|
||||
let daemon = Daemon::from_environment()?;
|
||||
let _operation_lock = daemon.acquire_operation_lock().await?;
|
||||
let selected = daemon.current_installation()?;
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
|
||||
mod backend;
|
||||
mod background_command;
|
||||
#[cfg(windows)]
|
||||
pub use backend::windows::DetachedLaunchRestricted;
|
||||
#[cfg(windows)]
|
||||
pub use backend::windows::is_elevated;
|
||||
#[cfg(windows)]
|
||||
use backend::windows::try_lock_file;
|
||||
mod client;
|
||||
mod diagnostics;
|
||||
mod install_lock;
|
||||
@@ -42,7 +36,6 @@ use codex_app_server_protocol::RemoteControlPairingStartResponse;
|
||||
use codex_app_server_transport::app_server_control_socket_path;
|
||||
use codex_utils_home_dir::find_codex_home;
|
||||
use managed_install::managed_codex_bin;
|
||||
#[cfg(any(unix, windows))]
|
||||
use managed_install::managed_codex_version;
|
||||
use serde::Serialize;
|
||||
use settings::DaemonSettings;
|
||||
@@ -52,13 +45,7 @@ use telemetry::StartFailure;
|
||||
use tokio::time::sleep;
|
||||
|
||||
const START_POLL_INTERVAL: Duration = Duration::from_millis(50);
|
||||
// An older updater can pass background policy to a replacement daemon, so retain
|
||||
// the longer readiness allowance during upgrades on macOS. On Linux, a cold
|
||||
// start from a rotational disk can take more than ten seconds.
|
||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
||||
const START_TIMEOUT: Duration = Duration::from_secs(30);
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
|
||||
const START_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
// Leave room for the longest graceful stop, forced-exit check, and restart.
|
||||
const OPERATION_LOCK_TIMEOUT: Duration =
|
||||
Duration::from_secs(MAX_SHUTDOWN_GRACE_SECONDS as u64 + 75);
|
||||
@@ -72,7 +59,9 @@ const STATE_DIR_NAME: &str = "app-server-daemon";
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum LifecycleCommand {
|
||||
Start,
|
||||
Start {
|
||||
feature_overrides: BTreeMap<String, bool>,
|
||||
},
|
||||
Restart {
|
||||
feature_overrides: BTreeMap<String, bool>,
|
||||
},
|
||||
@@ -212,7 +201,6 @@ pub struct RemoteControlOutput {
|
||||
pub app_server_version: Option<String>,
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum RestartIfRunningOutcome {
|
||||
Busy,
|
||||
@@ -222,7 +210,6 @@ pub(crate) enum RestartIfRunningOutcome {
|
||||
Restarted,
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum RestartMode {
|
||||
IfVersionChanged,
|
||||
@@ -230,7 +217,6 @@ pub(crate) enum RestartMode {
|
||||
Always,
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
enum RestartDecision {
|
||||
NotReady,
|
||||
@@ -240,28 +226,17 @@ enum RestartDecision {
|
||||
|
||||
pub async fn run(command: LifecycleCommand) -> Result<LifecycleOutput> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
if matches!(
|
||||
command,
|
||||
LifecycleCommand::Start | LifecycleCommand::Restart { .. }
|
||||
) {
|
||||
backend::windows::ensure_not_elevated()?;
|
||||
}
|
||||
// Keep daemon package preparation off callers' async stack frames.
|
||||
Box::pin(Daemon::from_environment()?.run(command)).await
|
||||
}
|
||||
|
||||
pub async fn bootstrap(options: BootstrapOptions) -> Result<BootstrapOutput> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_not_elevated()?;
|
||||
Box::pin(Daemon::from_environment()?.bootstrap(options)).await
|
||||
}
|
||||
|
||||
pub async fn ensure_remote_control_ready() -> Result<RemoteControlReadyOutput> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_not_elevated()?;
|
||||
Box::pin(Daemon::from_environment()?.ensure_remote_control_ready()).await
|
||||
}
|
||||
|
||||
@@ -288,8 +263,6 @@ pub async fn start_remote_control_pairing() -> Result<RemoteControlPairingStartR
|
||||
|
||||
pub async fn set_remote_control(mode: RemoteControlMode) -> Result<RemoteControlOutput> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_not_elevated()?;
|
||||
Box::pin(Daemon::from_environment()?.set_remote_control(mode)).await
|
||||
}
|
||||
|
||||
@@ -298,8 +271,6 @@ pub async fn run_pid_update_loop(
|
||||
restore_release: Option<String>,
|
||||
) -> Result<()> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_not_elevated()?;
|
||||
update_loop::run(http_client_factory, restore_release).await
|
||||
}
|
||||
|
||||
@@ -321,23 +292,13 @@ pub async fn update(
|
||||
http_client_factory: codex_http_client::HttpClientFactory,
|
||||
) -> Result<UpdateOutput> {
|
||||
ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_not_elevated()?;
|
||||
update_loop::request_manual_update(&Daemon::from_environment()?, http_client_factory).await
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
fn ensure_supported_platform() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn ensure_supported_platform() -> Result<()> {
|
||||
Err(anyhow!(
|
||||
"codex app-server daemon lifecycle is only supported on Unix and Windows platforms"
|
||||
))
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct Daemon {
|
||||
// Feature-aware TUI startup owns a live terminal. Direct lifecycle commands
|
||||
@@ -423,8 +384,8 @@ impl Daemon {
|
||||
let _operation_lock = self.acquire_operation_lock().await?;
|
||||
let selected = self.current_installation()?;
|
||||
match command {
|
||||
LifecycleCommand::Start => selected
|
||||
.start(&BTreeMap::new())
|
||||
LifecycleCommand::Start { feature_overrides } => selected
|
||||
.start(&feature_overrides)
|
||||
.await
|
||||
.map_err(|err| err.error),
|
||||
LifecycleCommand::Restart { feature_overrides } => {
|
||||
@@ -553,7 +514,6 @@ impl Daemon {
|
||||
.await)
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
pub(crate) async fn try_restart_if_running(
|
||||
&self,
|
||||
mode: RestartMode,
|
||||
@@ -603,8 +563,6 @@ impl Daemon {
|
||||
}
|
||||
RestartDecision::AlreadyCurrent => RestartIfRunningOutcome::AlreadyCurrent,
|
||||
RestartDecision::Restart => {
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_detached_launch(managed_codex_bin)?;
|
||||
if let Err(err) = thread_recovery::discard_pending(self) {
|
||||
let _ = stderr_writer().write_all(format!(
|
||||
"warning: failed to clear stale daemon recovery before update: {err}\n"
|
||||
@@ -899,7 +857,6 @@ impl Daemon {
|
||||
backend::pid_update_loop_backend(self.backend_paths(&settings))
|
||||
.stop()
|
||||
.await?;
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::FileTypeExt;
|
||||
|
||||
@@ -925,7 +882,6 @@ impl Daemon {
|
||||
backend.start().await?;
|
||||
let info = self.wait_until_ready().await?;
|
||||
let auto_update_enabled = managed.ensure_managed_updater(&settings).await?;
|
||||
#[cfg(unix)]
|
||||
// Older automatic updaters have no manual request socket to wait for.
|
||||
if auto_update_enabled
|
||||
&& managed_install::supports_daemon_command(
|
||||
@@ -1097,8 +1053,6 @@ impl Daemon {
|
||||
|
||||
fn ensure_managed_codex_bin(&self) -> Result<()> {
|
||||
if self.managed_codex_bin.is_file() {
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_detached_launch(&self.managed_codex_bin)?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -1108,16 +1062,10 @@ impl Daemon {
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
async fn managed_codex_version_best_effort(&self) -> Option<String> {
|
||||
managed_codex_version(&self.managed_codex_bin).await.ok()
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
async fn managed_codex_version_best_effort(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
fn backend_paths(&self, settings: &DaemonSettings) -> BackendPaths {
|
||||
self.backend_paths_with_bin(settings, &self.managed_codex_bin)
|
||||
}
|
||||
@@ -1161,7 +1109,6 @@ impl Daemon {
|
||||
|
||||
async fn open_operation_lock_file(&self) -> Result<tokio::fs::File> {
|
||||
if let Some(parent) = self.operation_lock_file.parent() {
|
||||
#[cfg(unix)]
|
||||
if let Some(home) = parent.parent() {
|
||||
tokio::fs::create_dir_all(home).await?;
|
||||
}
|
||||
@@ -1240,7 +1187,6 @@ fn already_remote_control_status(mode: RemoteControlMode) -> RemoteControlStatus
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(unix, windows))]
|
||||
fn restart_decision(
|
||||
mode: RestartMode,
|
||||
info: Option<&client::ProbeInfo>,
|
||||
@@ -1260,7 +1206,6 @@ fn restart_decision(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn try_lock_file(file: &tokio::fs::File) -> Result<bool> {
|
||||
use std::os::fd::AsRawFd;
|
||||
|
||||
@@ -1276,12 +1221,7 @@ fn try_lock_file(file: &tokio::fs::File) -> Result<bool> {
|
||||
Err(err).context("failed to lock daemon operation")
|
||||
}
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn try_lock_file(_file: &tokio::fs::File) -> Result<bool> {
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
#[cfg(all(test, any(unix, windows)))]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
@@ -1298,7 +1238,6 @@ mod tests {
|
||||
use super::RestartMode;
|
||||
use super::restart_decision;
|
||||
use crate::client::ProbeInfo;
|
||||
#[cfg(unix)]
|
||||
use crate::settings::DaemonSettings;
|
||||
|
||||
#[test]
|
||||
@@ -1503,13 +1442,14 @@ mod tests {
|
||||
)
|
||||
.expect("legacy saved threads");
|
||||
daemon
|
||||
.run(super::LifecycleCommand::Start)
|
||||
.run(super::LifecycleCommand::Start {
|
||||
feature_overrides: Default::default(),
|
||||
})
|
||||
.await
|
||||
.expect_err("missing backend binary");
|
||||
assert!(!daemon.recovery_file().expect("recovery path").exists());
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn managed_local_backend_counts_as_bootstrapped_without_updater() {
|
||||
let home = TempDir::new().expect("home");
|
||||
|
||||
@@ -61,9 +61,7 @@ pub(crate) fn managed_codex_bin(codex_home: &Path) -> PathBuf {
|
||||
let current = root.join("current");
|
||||
let packaged = current.join("bin").join(managed_codex_file_name());
|
||||
let legacy = current.join(managed_codex_file_name());
|
||||
if packaged.is_file()
|
||||
|| !legacy.is_file() && (cfg!(windows) || root.ends_with("app-server-daemon"))
|
||||
{
|
||||
if packaged.is_file() || !legacy.is_file() && (root.ends_with("app-server-daemon")) {
|
||||
packaged
|
||||
} else {
|
||||
legacy
|
||||
@@ -123,8 +121,6 @@ pub(crate) async fn supports_daemon_update_loop(codex_bin: &Path) -> bool {
|
||||
/// Probe an internal daemon command without running a long-lived process.
|
||||
pub(crate) async fn supports_daemon_command(codex_bin: &Path, args: &[&str]) -> bool {
|
||||
let mut command = Command::new(codex_bin);
|
||||
#[cfg(windows)]
|
||||
command.creation_flags(windows_sys::Win32::System::Threading::CREATE_NO_WINDOW);
|
||||
timeout(
|
||||
Duration::from_secs(5),
|
||||
command
|
||||
@@ -151,8 +147,6 @@ pub(crate) async fn resolved_managed_codex_bin(codex_bin: &Path) -> Result<PathB
|
||||
|
||||
pub(crate) async fn managed_codex_version(codex_bin: &Path) -> Result<String> {
|
||||
let mut command = Command::new(codex_bin);
|
||||
#[cfg(windows)]
|
||||
command.creation_flags(windows_sys::Win32::System::Threading::CREATE_NO_WINDOW);
|
||||
let output = command
|
||||
.arg("--version")
|
||||
.kill_on_drop(true)
|
||||
@@ -224,23 +218,15 @@ pub(crate) fn executable_identity_from_reader(
|
||||
|
||||
pub(crate) fn path_digest(path: &Path) -> [u8; 32] {
|
||||
let mut hasher = blake3::Hasher::new();
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
hasher.update(path.as_os_str().as_bytes());
|
||||
}
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use std::os::windows::ffi::OsStrExt;
|
||||
for unit in path.as_os_str().encode_wide() {
|
||||
hasher.update(&unit.to_le_bytes());
|
||||
}
|
||||
}
|
||||
*hasher.finalize().as_bytes()
|
||||
}
|
||||
|
||||
fn managed_codex_file_name() -> &'static str {
|
||||
if cfg!(windows) { "codex.exe" } else { "codex" }
|
||||
"codex"
|
||||
}
|
||||
|
||||
fn parse_codex_version(output: &str) -> Result<String> {
|
||||
|
||||
@@ -54,7 +54,6 @@ fn discovers_package_and_legacy_installs() {
|
||||
home.path().join("packages/app-server-daemon")
|
||||
);
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let dedicated = home.path().join("packages/app-server-daemon");
|
||||
std::fs::write(&dedicated, b"not a directory").expect("unreadable selection");
|
||||
@@ -62,7 +61,6 @@ fn discovers_package_and_legacy_installs() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn updater_only_runs_for_stable_installer_owned_releases() {
|
||||
let home = tempfile::TempDir::new().expect("home");
|
||||
@@ -111,7 +109,6 @@ fn updater_only_runs_for_stable_installer_owned_releases() {
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn older_managed_binary_does_not_claim_updater_support() {
|
||||
let temp = tempfile::TempDir::new().expect("home");
|
||||
|
||||
@@ -101,8 +101,6 @@ pub(crate) async fn request(daemon: &Daemon) -> Result<UpdateOutput> {
|
||||
};
|
||||
let mut response = Vec::new();
|
||||
let transport = async {
|
||||
#[cfg(windows)]
|
||||
connection.ensure_non_elevated_peer()?;
|
||||
connection.write_all(b"update\n").await?;
|
||||
connection
|
||||
.take(MAX_RESPONSE_BYTES)
|
||||
@@ -185,10 +183,6 @@ pub(super) async fn handle_request(
|
||||
terminate: &mut Signal,
|
||||
trigger: UpdateTrigger<'_>,
|
||||
) -> Result<RequestDisposition> {
|
||||
#[cfg(windows)]
|
||||
if connection.ensure_non_elevated_peer().is_err() {
|
||||
return Ok(RequestDisposition::Unchanged);
|
||||
}
|
||||
let mut request = [0; 7];
|
||||
if !matches!(
|
||||
timeout(Duration::from_secs(5), connection.read_exact(&mut request)).await,
|
||||
|
||||
@@ -38,16 +38,12 @@ pub(super) async fn run(http: &impl InstallerHttp, legacy: &Daemon) -> Result<Up
|
||||
if running.is_none() && client::probe(&legacy.socket_path).await.is_ok() {
|
||||
return super::manual_update::unsupported(legacy).await;
|
||||
}
|
||||
#[cfg(unix)]
|
||||
let mut terminate = tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?;
|
||||
let cancellation = async {
|
||||
#[cfg(unix)]
|
||||
tokio::select! {
|
||||
_ = terminate.recv() => {},
|
||||
_ = tokio::signal::ctrl_c() => {},
|
||||
}
|
||||
#[cfg(windows)]
|
||||
let _ = tokio::signal::ctrl_c().await;
|
||||
Some(())
|
||||
};
|
||||
let mut cancellation = std::pin::pin!(cancellation);
|
||||
@@ -60,7 +56,6 @@ pub(super) async fn run(http: &impl InstallerHttp, legacy: &Daemon) -> Result<Up
|
||||
"the published installer does not support daemon migration yet; the legacy installation was left unchanged"
|
||||
);
|
||||
eprintln!("Preparing the daemon update in {}...", root.display());
|
||||
#[cfg(unix)]
|
||||
{
|
||||
if matches!(
|
||||
run_installer_script(
|
||||
@@ -75,11 +70,6 @@ pub(super) async fn run(http: &impl InstallerHttp, legacy: &Daemon) -> Result<Up
|
||||
return Err(std::io::Error::from(std::io::ErrorKind::Interrupted).into());
|
||||
}
|
||||
}
|
||||
#[cfg(windows)]
|
||||
tokio::select! {
|
||||
result = run_installer_script(&script, InstallerMode::Migration, &root) => { result?; },
|
||||
_ = &mut cancellation => return Err(std::io::Error::from(std::io::ErrorKind::Interrupted).into()),
|
||||
}
|
||||
|
||||
let _install_lock = acquire_install_lock(&root).await?;
|
||||
let pending = root.join(".migration-current");
|
||||
@@ -94,11 +84,7 @@ pub(super) async fn run(http: &impl InstallerHttp, legacy: &Daemon) -> Result<Up
|
||||
&& std::fs::read_to_string(root.join("auto-update-version"))? == name.to_string_lossy(),
|
||||
"installer did not prepare a latest-channel daemon package"
|
||||
);
|
||||
let entrypoint = if cfg!(windows) {
|
||||
"bin/codex.exe"
|
||||
} else {
|
||||
"bin/codex"
|
||||
};
|
||||
let entrypoint = "bin/codex";
|
||||
let binary = release.join(entrypoint);
|
||||
let version = managed_install::managed_codex_version(&binary).await?;
|
||||
anyhow::ensure!(
|
||||
@@ -114,8 +100,6 @@ pub(super) async fn run(http: &impl InstallerHttp, legacy: &Daemon) -> Result<Up
|
||||
.await,
|
||||
"the latest production release does not support daemon migration yet; the legacy daemon was left running"
|
||||
);
|
||||
#[cfg(windows)]
|
||||
backend::windows::ensure_detached_launch(&binary)?;
|
||||
anyhow::ensure!(
|
||||
selected_release(legacy)? == previous,
|
||||
"daemon selection changed; retry the update"
|
||||
|
||||
@@ -48,8 +48,6 @@ pub async fn update_from_cli(
|
||||
confirm: impl FnOnce(&InstallRequest) -> Result<bool>,
|
||||
) -> Result<Option<crate::UpdateOutput>> {
|
||||
crate::ensure_supported_platform()?;
|
||||
#[cfg(windows)]
|
||||
crate::backend::windows::ensure_not_elevated()?;
|
||||
let daemon = Daemon::from_environment()?;
|
||||
let settings = daemon.load_settings().await?;
|
||||
let source = InstallContext::current().package_layout.as_ref();
|
||||
@@ -157,15 +155,9 @@ async fn prepare_from_package(
|
||||
let version = manifest.version.to_string();
|
||||
let target = platform_target()?;
|
||||
let mut metadata: serde_json::Value = serde_json::from_slice(&manifest_bytes)?;
|
||||
let entrypoint = if cfg!(windows) {
|
||||
"bin/codex.exe"
|
||||
} else {
|
||||
"bin/codex"
|
||||
};
|
||||
let entrypoint = "bin/codex";
|
||||
let source_entrypoint = metadata["entrypoint"].as_str().unwrap_or_default();
|
||||
let winget = cfg!(windows)
|
||||
&& metadata["layoutVersion"] == 1
|
||||
&& source_entrypoint == format!("codex-{target}.exe");
|
||||
let winget = false;
|
||||
anyhow::ensure!(
|
||||
metadata["target"] == target && (source_entrypoint == entrypoint || winget),
|
||||
"the CLI package does not match this platform or executable"
|
||||
@@ -250,19 +242,6 @@ async fn prepare_from_package(
|
||||
// source. Hash the final tree for reuse, since it now differs from the source.
|
||||
let digest = if winget {
|
||||
std::fs::create_dir_all(stage.path().join("bin"))?;
|
||||
#[cfg(windows)]
|
||||
for (from, to) in [
|
||||
(staged_exe, Path::new(entrypoint)),
|
||||
(
|
||||
Path::new("codex-code-mode-host.exe"),
|
||||
Path::new("bin/codex-code-mode-host.exe"),
|
||||
),
|
||||
] {
|
||||
windows::publish_release(&stage.path().join(from), &stage.path().join(to)).await?;
|
||||
if let Some(digest) = staged_digests.remove(from) {
|
||||
staged_digests.insert(to.to_path_buf(), digest);
|
||||
}
|
||||
}
|
||||
let voice_path = stage.path().join("codex-resources/voice/manifest.json");
|
||||
if voice_path.try_exists()? {
|
||||
let mut voice: serde_json::Value =
|
||||
@@ -309,13 +288,9 @@ async fn prepare_from_package(
|
||||
"an existing daemon release has different contents; refusing to overwrite it"
|
||||
);
|
||||
} else {
|
||||
#[cfg(unix)]
|
||||
if !stage.path().join("codex").exists() {
|
||||
std::os::unix::fs::symlink("bin/codex", stage.path().join("codex"))?;
|
||||
}
|
||||
#[cfg(windows)]
|
||||
windows::publish_release(stage.path(), &release).await?;
|
||||
#[cfg(not(windows))]
|
||||
std::fs::rename(stage.path(), &release)?;
|
||||
}
|
||||
let release = release.canonicalize()?;
|
||||
@@ -334,12 +309,6 @@ async fn prepare_from_package(
|
||||
&& (backend.is_some() || crate::client::probe(&daemon.socket_path).await.is_err()),
|
||||
"daemon package location or socket ownership changed while preparing its package; retry the command"
|
||||
);
|
||||
#[cfg(windows)]
|
||||
if backend.is_some() {
|
||||
crate::backend::windows::ensure_detached_launch(&release.join(entrypoint))?;
|
||||
}
|
||||
#[cfg(windows)]
|
||||
windows::validate_selection(&root)?;
|
||||
if mode == InstallMode::Replace {
|
||||
let stopped = async {
|
||||
crate::backend::pid_update_loop_backend(daemon.backend_paths(settings))
|
||||
@@ -388,15 +357,12 @@ async fn prepare_from_package(
|
||||
std::fs::remove_file(marker)?;
|
||||
}
|
||||
if previous_release.as_deref() != Some(release.as_path()) {
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let temporary = tempfile::TempDir::new_in(&root)?;
|
||||
let link = temporary.path().join("current");
|
||||
std::os::unix::fs::symlink(&release, &link)?;
|
||||
std::fs::rename(link, root.join("current"))?;
|
||||
}
|
||||
#[cfg(windows)]
|
||||
windows::select_release(&root, &release)?;
|
||||
if let Err(error) =
|
||||
crate::release_pruning::record_selection(&root, previous_release.as_deref())
|
||||
{
|
||||
@@ -438,8 +404,7 @@ fn package_tree(
|
||||
while let Some(path) = paths.pop() {
|
||||
let relative = path.strip_prefix(root)?;
|
||||
// The Unix installer adds this alias outside the package layout.
|
||||
if cfg!(unix)
|
||||
&& relative == Path::new("codex")
|
||||
if relative == Path::new("codex")
|
||||
&& std::fs::read_link(&path).ok().as_deref() == Some(Path::new("bin/codex"))
|
||||
{
|
||||
continue;
|
||||
@@ -486,7 +451,6 @@ fn package_tree(
|
||||
};
|
||||
hasher.update(b"file");
|
||||
hasher.update(digest.as_bytes());
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
hasher.update(&(metadata.permissions().mode() & 0o777).to_le_bytes());
|
||||
@@ -505,28 +469,15 @@ fn stable_version(value: &str) -> Option<semver::Version> {
|
||||
}
|
||||
|
||||
fn validate_package(root: &Path, entrypoint: &str) -> Result<()> {
|
||||
let code_mode_host = Path::new(entrypoint).with_file_name(if cfg!(windows) {
|
||||
"codex-code-mode-host.exe"
|
||||
} else {
|
||||
"codex-code-mode-host"
|
||||
});
|
||||
let code_mode_host = Path::new(entrypoint).with_file_name("codex-code-mode-host");
|
||||
let code_mode_host = code_mode_host.to_string_lossy();
|
||||
let mut names = vec![
|
||||
"codex-package.json",
|
||||
entrypoint,
|
||||
code_mode_host.as_ref(),
|
||||
if cfg!(windows) {
|
||||
"codex-path/rg.exe"
|
||||
} else {
|
||||
"codex-path/rg"
|
||||
},
|
||||
"codex-path/rg",
|
||||
];
|
||||
if cfg!(windows) {
|
||||
names.extend([
|
||||
"codex-resources/codex-command-runner.exe",
|
||||
"codex-resources/codex-windows-sandbox-setup.exe",
|
||||
]);
|
||||
} else if cfg!(target_os = "linux") {
|
||||
if cfg!(target_os = "linux") {
|
||||
names.push("codex-resources/bwrap");
|
||||
}
|
||||
for name in names {
|
||||
@@ -535,7 +486,6 @@ fn validate_package(root: &Path, entrypoint: &str) -> Result<()> {
|
||||
"local Codex package is missing {name}; reinstall the CLI or use the standalone installer"
|
||||
));
|
||||
}
|
||||
#[cfg(unix)]
|
||||
if name != "codex-package.json" {
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
if std::fs::metadata(root.join(name))?.permissions().mode() & 0o111 == 0 {
|
||||
@@ -562,10 +512,6 @@ fn platform_target() -> Result<&'static str> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[path = "prepare_install_windows.rs"]
|
||||
mod windows;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "prepare_install_tests.rs"]
|
||||
mod tests;
|
||||
@@ -1,5 +1,4 @@
|
||||
//! Covers complete-package staging, conservative selection, and legacy preservation.
|
||||
#![cfg(unix)]
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use super::InstallMode;
|
||||
|
||||
@@ -1,212 +0,0 @@
|
||||
//! Publishes and selects Windows managed releases despite transient filesystem contention.
|
||||
|
||||
use std::os::windows::ffi::OsStrExt;
|
||||
use std::os::windows::fs::OpenOptionsExt;
|
||||
use std::os::windows::io::AsRawHandle;
|
||||
use std::os::windows::process::CommandExt;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use windows_sys::Win32::Foundation::ERROR_SHARING_VIOLATION;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_FLAG_BACKUP_SEMANTICS;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_FLAG_OPEN_REPARSE_POINT;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_DELETE;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_READ;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_WRITE;
|
||||
use windows_sys::Win32::System::IO::DeviceIoControl;
|
||||
use windows_sys::Win32::System::Threading::CREATE_NO_WINDOW;
|
||||
|
||||
const PUBLISH_RELEASE_RETRY_INTERVAL: Duration = Duration::from_millis(50);
|
||||
const PUBLISH_RELEASE_RETRY_LIMIT: usize = 100;
|
||||
|
||||
pub(super) async fn publish_release(stage: &Path, release: &Path) -> Result<()> {
|
||||
let mut retries = 0;
|
||||
loop {
|
||||
match std::fs::rename(stage, release) {
|
||||
Ok(()) => return Ok(()),
|
||||
// Executable scanners can briefly hold newly staged files without delete sharing.
|
||||
Err(error)
|
||||
if retries < PUBLISH_RELEASE_RETRY_LIMIT
|
||||
&& (error.kind() == std::io::ErrorKind::PermissionDenied
|
||||
|| error.raw_os_error() == Some(ERROR_SHARING_VIOLATION as i32)) =>
|
||||
{
|
||||
retries += 1;
|
||||
tokio::time::sleep(PUBLISH_RELEASE_RETRY_INTERVAL).await;
|
||||
}
|
||||
Err(error) => {
|
||||
return Err(error).with_context(|| {
|
||||
format!(
|
||||
"failed to publish managed daemon release from {} to {}",
|
||||
stage.display(),
|
||||
release.display()
|
||||
)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn select_release(root: &Path, release: &Path) -> Result<()> {
|
||||
select_release_with(root, release, retarget_junction)
|
||||
}
|
||||
|
||||
fn select_release_with(
|
||||
root: &Path,
|
||||
release: &Path,
|
||||
retarget: impl FnOnce(&Path, &Path) -> Result<()>,
|
||||
) -> Result<()> {
|
||||
let release = release.canonicalize()?;
|
||||
let current = root.join("current");
|
||||
if current.symlink_metadata().is_err() {
|
||||
let temporary = tempfile::TempDir::new_in(root)?;
|
||||
let junction = temporary.path().join("current");
|
||||
std::fs::create_dir(&junction)?;
|
||||
return match retarget(&junction, &release) {
|
||||
Ok(()) => Ok(std::fs::rename(junction, current)?),
|
||||
Err(error) if is_permission_denied(&error) => install_junction(root, &release)
|
||||
.with_context(|| format!("failed to create managed daemon junction after native creation was denied: {error:#}")),
|
||||
Err(error) => Err(error),
|
||||
};
|
||||
}
|
||||
validate_selection(root)?;
|
||||
match retarget(¤t, &release) {
|
||||
Ok(()) => Ok(()),
|
||||
Err(error) if is_permission_denied(&error) => {
|
||||
install_junction(root, &release).with_context(|| format!("failed to replace managed daemon junction after retargeting was denied: {error:#}"))
|
||||
}
|
||||
Err(error) => Err(error),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_permission_denied(error: &anyhow::Error) -> bool {
|
||||
error
|
||||
.downcast_ref::<std::io::Error>()
|
||||
.is_some_and(|error| error.kind() == std::io::ErrorKind::PermissionDenied)
|
||||
}
|
||||
|
||||
fn install_junction(root: &Path, release: &Path) -> Result<()> {
|
||||
let temporary = tempfile::TempDir::new_in(root)?;
|
||||
let junction = temporary.path().join("current");
|
||||
let current = root.join("current");
|
||||
let replacing = current.symlink_metadata().is_ok();
|
||||
if replacing {
|
||||
validate_selection(root)?;
|
||||
}
|
||||
// Some Windows policies deny in-process reparse-point mutation while allowing the system
|
||||
// junction creator. Pass paths through the environment so cmd metacharacters stay quoted.
|
||||
let system_root = std::env::var_os("SystemRoot").context("SystemRoot is not set")?;
|
||||
let command_shell = Path::new(&system_root).join("System32").join("cmd.exe");
|
||||
anyhow::ensure!(
|
||||
command_shell.is_absolute(),
|
||||
"SystemRoot must be an absolute path"
|
||||
);
|
||||
let output = Command::new(command_shell)
|
||||
.env("CODEX_DAEMON_JUNCTION_LINK", &junction)
|
||||
.env("CODEX_DAEMON_JUNCTION_TARGET", release)
|
||||
.args(["/d", "/s", "/e:on", "/v:off", "/c"])
|
||||
.raw_arg(r#""mklink /J "%CODEX_DAEMON_JUNCTION_LINK%" "%CODEX_DAEMON_JUNCTION_TARGET%"""#)
|
||||
.creation_flags(CREATE_NO_WINDOW)
|
||||
.output()
|
||||
.context("failed to run cmd.exe to create managed daemon junction")?;
|
||||
anyhow::ensure!(
|
||||
output.status.success(),
|
||||
"cmd.exe could not create managed daemon junction (status {}): stdout: {}; stderr: {}",
|
||||
output.status,
|
||||
String::from_utf8_lossy(&output.stdout).trim(),
|
||||
String::from_utf8_lossy(&output.stderr).trim()
|
||||
);
|
||||
if !replacing {
|
||||
std::fs::rename(junction, current)?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let previous = temporary.path().join("previous");
|
||||
std::fs::rename(¤t, &previous)?;
|
||||
if let Err(error) = std::fs::rename(&junction, ¤t) {
|
||||
if let Err(restore_error) = std::fs::rename(&previous, ¤t) {
|
||||
let preserved = temporary.keep();
|
||||
anyhow::bail!(
|
||||
"failed to replace managed daemon junction: {error}; also failed to restore the previous junction from {}: {restore_error}",
|
||||
preserved.display()
|
||||
);
|
||||
}
|
||||
return Err(error).context("failed to replace managed daemon junction");
|
||||
}
|
||||
if let Err(error) = std::fs::remove_dir(previous) {
|
||||
tracing::warn!(
|
||||
%error,
|
||||
"failed to remove previous managed daemon junction"
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn retarget_junction(current: &Path, release: &Path) -> Result<()> {
|
||||
// Use the same mount-point reparse operation as the standalone installer.
|
||||
// Retargeting in place keeps current available to concurrent readers.
|
||||
const FSCTL_SET_REPARSE_POINT: u32 = 0x0009_00a4;
|
||||
const IO_REPARSE_TAG_MOUNT_POINT: u32 = 0xa000_0003;
|
||||
const GENERIC_WRITE: u32 = 0x4000_0000;
|
||||
let release: Vec<u16> = release.as_os_str().encode_wide().collect();
|
||||
let prefix: Vec<u16> = r"\\?\".encode_utf16().collect();
|
||||
let release = release.strip_prefix(prefix.as_slice()).unwrap_or(&release);
|
||||
let substitute: Vec<u8> = r"\??\"
|
||||
.encode_utf16()
|
||||
.chain(release.iter().copied())
|
||||
.flat_map(u16::to_le_bytes)
|
||||
.collect();
|
||||
u16::try_from(substitute.len() + 20).context("managed release path is too long")?;
|
||||
let length = substitute.len() as u16;
|
||||
// REPARSE_DATA_BUFFER: an 8-byte header, then four u16 byte offsets/lengths
|
||||
// for substitute and print names. The UTF-16 path buffer starts at byte 16;
|
||||
// both names have a trailing NUL, and the print name is empty.
|
||||
let mut data = vec![0; substitute.len() + 20];
|
||||
data[0..4].copy_from_slice(&IO_REPARSE_TAG_MOUNT_POINT.to_le_bytes());
|
||||
data[4..6].copy_from_slice(&(length + 12).to_le_bytes());
|
||||
data[10..12].copy_from_slice(&length.to_le_bytes());
|
||||
data[12..14].copy_from_slice(&(length + 2).to_le_bytes());
|
||||
data[16..16 + substitute.len()].copy_from_slice(&substitute);
|
||||
let handle = std::fs::OpenOptions::new()
|
||||
.access_mode(GENERIC_WRITE)
|
||||
.share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
|
||||
.custom_flags(FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT)
|
||||
.open(current)?;
|
||||
let mut returned = 0;
|
||||
if unsafe {
|
||||
DeviceIoControl(
|
||||
handle.as_raw_handle(),
|
||||
FSCTL_SET_REPARSE_POINT,
|
||||
data.as_ptr().cast(),
|
||||
data.len() as u32,
|
||||
std::ptr::null_mut(),
|
||||
0,
|
||||
&mut returned,
|
||||
std::ptr::null_mut(),
|
||||
)
|
||||
} == 0
|
||||
{
|
||||
return Err(std::io::Error::last_os_error())
|
||||
.context("failed to retarget managed daemon junction");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) fn validate_selection(root: &Path) -> Result<()> {
|
||||
let current = root.join("current");
|
||||
if matches!(current.symlink_metadata(), Err(error) if error.kind() == std::io::ErrorKind::NotFound)
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
anyhow::ensure!(
|
||||
current.canonicalize()?.parent() == Some(root.join("releases").canonicalize()?.as_path()),
|
||||
"refusing to replace a daemon selection outside its releases directory"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "prepare_install_windows_tests.rs"]
|
||||
mod tests;
|
||||
@@ -1,60 +0,0 @@
|
||||
//! Verifies Windows package publication and selection without requiring an elevated daemon.
|
||||
|
||||
use anyhow::Context;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::os::windows::fs::OpenOptionsExt;
|
||||
use std::time::Duration;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_FLAG_BACKUP_SEMANTICS;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_READ;
|
||||
use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_WRITE;
|
||||
|
||||
#[tokio::test]
|
||||
async fn publishing_release_retries_transient_access_denied() {
|
||||
let home = tempfile::TempDir::new().unwrap();
|
||||
let stage = home.path().join(".staging");
|
||||
let release = home.path().join("release");
|
||||
std::fs::create_dir(&stage).unwrap();
|
||||
std::fs::write(stage.join("payload"), b"complete").unwrap();
|
||||
|
||||
let directory = std::fs::OpenOptions::new()
|
||||
.read(true)
|
||||
.share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE)
|
||||
.custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
|
||||
.open(&stage)
|
||||
.unwrap();
|
||||
let holder = tokio::spawn(async move {
|
||||
tokio::time::sleep(Duration::from_millis(150)).await;
|
||||
drop(directory);
|
||||
});
|
||||
|
||||
super::publish_release(&stage, &release).await.unwrap();
|
||||
holder.await.unwrap();
|
||||
assert_eq!(std::fs::read(release.join("payload")).unwrap(), b"complete");
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn daemon_junction_can_be_created_retargeted_and_replaced_without_cli_links() {
|
||||
let home = tempfile::TempDir::new().unwrap();
|
||||
let root = home
|
||||
.path()
|
||||
.join("home & 100% ready!/packages/app-server-daemon");
|
||||
for (version, native_denied) in [("first", true), ("second", false), ("third", true)] {
|
||||
let release = root.join("releases").join(version);
|
||||
std::fs::create_dir_all(&release).unwrap();
|
||||
if native_denied {
|
||||
super::select_release_with(&root, &release, |_, _| {
|
||||
Err(std::io::Error::from(std::io::ErrorKind::PermissionDenied))
|
||||
.context("failed to retarget managed daemon junction")
|
||||
})
|
||||
.unwrap();
|
||||
} else {
|
||||
super::select_release(&root, &release).unwrap();
|
||||
}
|
||||
assert_eq!(
|
||||
root.join("current").canonicalize().unwrap(),
|
||||
release.canonicalize().unwrap()
|
||||
);
|
||||
}
|
||||
assert!(!root.with_file_name("standalone").exists());
|
||||
}
|
||||
@@ -6,8 +6,6 @@ use std::path::Path;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
#[cfg(windows)]
|
||||
use windows_sys::Win32::Storage::FileSystem as winfs;
|
||||
|
||||
use crate::Daemon;
|
||||
use crate::backend;
|
||||
@@ -21,7 +19,6 @@ struct Manifest {
|
||||
entrypoint: String,
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn selection_identity(current: &Path) -> Result<String> {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
let meta = current.symlink_metadata()?;
|
||||
@@ -34,45 +31,6 @@ fn selection_identity(current: &Path) -> Result<String> {
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn selection_identity(current: &Path) -> Result<String> {
|
||||
use std::os::windows::fs::OpenOptionsExt;
|
||||
use std::os::windows::io::AsRawHandle;
|
||||
use windows_sys::Win32::System::IO::DeviceIoControl;
|
||||
|
||||
let file = std::fs::OpenOptions::new()
|
||||
.access_mode(winfs::FILE_READ_ATTRIBUTES)
|
||||
.share_mode(winfs::FILE_SHARE_READ | winfs::FILE_SHARE_WRITE | winfs::FILE_SHARE_DELETE)
|
||||
.custom_flags(winfs::FILE_FLAG_BACKUP_SEMANTICS | winfs::FILE_FLAG_OPEN_REPARSE_POINT)
|
||||
.open(current)?;
|
||||
// FSCTL_READ_FILE_USN_DATA, with default V2 record version. The input is always
|
||||
// "current", so 1024 bytes accommodates its journal record including the file name.
|
||||
let mut record = [0u8; 1024];
|
||||
let mut returned = 0;
|
||||
if unsafe {
|
||||
DeviceIoControl(
|
||||
file.as_raw_handle(),
|
||||
0x0009_00eb,
|
||||
std::ptr::null(),
|
||||
0,
|
||||
record.as_mut_ptr().cast(),
|
||||
record.len() as u32,
|
||||
&raw mut returned,
|
||||
std::ptr::null_mut(),
|
||||
)
|
||||
} == 0
|
||||
{
|
||||
return Err(std::io::Error::last_os_error().into());
|
||||
}
|
||||
let usn = i64::from_le_bytes(record[24..32].try_into()?);
|
||||
anyhow::ensure!(
|
||||
returned >= 32 && u16::from_le_bytes(record[4..6].try_into()?) == 2 && usn > 0,
|
||||
"no reliable daemon selection journal record"
|
||||
);
|
||||
let file_id = u64::from_le_bytes(record[8..16].try_into()?);
|
||||
Ok(format!("{file_id:x} {usn:x}"))
|
||||
}
|
||||
|
||||
/// Call after changing the selection, while holding the installer lock.
|
||||
pub(crate) fn record_selection(root: &Path, previous: Option<&Path>) -> Result<()> {
|
||||
let current = root.join("current");
|
||||
@@ -98,16 +56,6 @@ fn owned_mount(path: &Path) -> Result<u64> {
|
||||
meta.is_dir() || meta.is_file(),
|
||||
"not an ordinary package entry"
|
||||
);
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use std::os::windows::fs::MetadataExt;
|
||||
anyhow::ensure!(
|
||||
meta.file_attributes() & winfs::FILE_ATTRIBUTE_REPARSE_POINT == 0,
|
||||
"package entry is a reparse point"
|
||||
);
|
||||
// Volume mount points on Windows are reparse points.
|
||||
Ok(0)
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
use std::os::fd::AsRawFd;
|
||||
@@ -124,7 +72,7 @@ fn owned_mount(path: &Path) -> Result<u64> {
|
||||
.parse()
|
||||
.context("invalid package mount")
|
||||
}
|
||||
#[cfg(all(unix, not(target_os = "linux")))]
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
Ok(meta.dev())
|
||||
@@ -224,8 +172,6 @@ pub(crate) async fn prune(daemon: &Daemon, root: &Path, settings: &DaemonSetting
|
||||
}
|
||||
let mut pending = vec![path.clone()];
|
||||
while let Some(child) = pending.pop() {
|
||||
// The Unix installer adds this alias; it never traverses outside the release.
|
||||
#[cfg(unix)]
|
||||
if child == path.join("codex")
|
||||
&& std::fs::read_link(&child).ok().as_deref() == Some(Path::new("bin/codex"))
|
||||
{
|
||||
|
||||
@@ -373,7 +373,7 @@ impl From<RemoteControlStatusChangedNotification> for RemoteControlReadyStatus {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(test, unix))]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use anyhow::Result;
|
||||
use codex_app_server_protocol::JSONRPCError;
|
||||
|
||||
@@ -12,10 +12,6 @@ pub struct StartError {
|
||||
|
||||
impl StartError {
|
||||
pub fn failure_reason(&self) -> &'static str {
|
||||
#[cfg(windows)]
|
||||
if self.error.is::<crate::DetachedLaunchRestricted>() {
|
||||
return "spawn";
|
||||
}
|
||||
match self.error.downcast_ref::<StartFailure>() {
|
||||
Some(StartFailure::Spawn(_)) => "spawn",
|
||||
Some(StartFailure::EarlyChildExit(_)) => "early_child_exit",
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
use std::collections::VecDeque;
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
#[cfg(unix)]
|
||||
use std::process::Command as StdCommand;
|
||||
use std::process::Stdio;
|
||||
use std::sync::Arc;
|
||||
@@ -16,16 +15,12 @@ use codex_http_client::ClientRouteClass;
|
||||
use codex_http_client::HttpClientFactory;
|
||||
use codex_http_client::RouteAwareClientPool;
|
||||
use futures::FutureExt;
|
||||
#[cfg(unix)]
|
||||
use std::os::unix::process::CommandExt;
|
||||
use tokio::io::AsyncReadExt;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::process::Command;
|
||||
#[cfg(unix)]
|
||||
use tokio::signal::unix::Signal;
|
||||
#[cfg(unix)]
|
||||
use tokio::signal::unix::SignalKind;
|
||||
#[cfg(unix)]
|
||||
use tokio::signal::unix::signal;
|
||||
use tokio::time::Instant;
|
||||
use tokio::time::sleep;
|
||||
@@ -37,7 +32,6 @@ use crate::RestartMode;
|
||||
use crate::managed_install::ExecutableIdentity;
|
||||
use crate::managed_install::executable_identity;
|
||||
use crate::managed_install::resolved_managed_codex_bin;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", windows))]
|
||||
use crate::settings::DaemonSettings;
|
||||
use crate::settings::UpdaterSettings;
|
||||
|
||||
@@ -71,10 +65,7 @@ const RESTART_RETRY_INTERVAL: Duration = Duration::from_millis(50);
|
||||
// envelope, and the worst-case six-byte JSON escape for every captured byte.
|
||||
const INSTALLER_STDERR_TAIL_BYTES: usize = 2 * 1024;
|
||||
const INSTALLER_STDERR_DRAIN_TIMEOUT: Duration = Duration::from_secs(1);
|
||||
#[cfg(unix)]
|
||||
const INSTALL_URL: &str = "https://chatgpt.com/codex/install.sh";
|
||||
#[cfg(windows)]
|
||||
const INSTALL_URL: &str = "https://chatgpt.com/codex/install.ps1";
|
||||
|
||||
pub(crate) async fn run(
|
||||
http_client_factory: HttpClientFactory,
|
||||
@@ -101,10 +92,8 @@ async fn run_with_http(
|
||||
running_updater_identity: &ExecutableIdentity,
|
||||
mut restore_release: Option<String>,
|
||||
) -> Result<()> {
|
||||
#[cfg(unix)]
|
||||
let mut terminate =
|
||||
signal(SignalKind::terminate()).context("failed to install updater shutdown handler")?;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
{
|
||||
let paths = daemon.backend_paths(&DaemonSettings::default());
|
||||
for backend in [
|
||||
@@ -115,17 +104,6 @@ async fn run_with_http(
|
||||
let _ = backend.promote_legacy_identity().await;
|
||||
}
|
||||
}
|
||||
#[cfg(windows)]
|
||||
let updater = {
|
||||
// Updater ownership needs only paths, not settings that may be mid-edit.
|
||||
crate::backend::pid_update_loop_backend(daemon.backend_paths(&DaemonSettings::default()))
|
||||
};
|
||||
#[cfg(windows)]
|
||||
updater.wait_for_ownership().await?;
|
||||
#[cfg(windows)]
|
||||
let mut terminate = Signal;
|
||||
#[cfg(windows)]
|
||||
let _installer_job = crate::backend::windows::updater_job()?;
|
||||
let socket_path = daemon.manual_update_socket_path();
|
||||
codex_uds::prepare_private_socket_directory(
|
||||
socket_path
|
||||
@@ -133,19 +111,9 @@ async fn run_with_http(
|
||||
.context("updater socket has no parent")?,
|
||||
)
|
||||
.await?;
|
||||
#[cfg(unix)]
|
||||
let (listener, _socket_guard) =
|
||||
codex_app_server_transport::bind_private_daemon_socket(&socket_path).await?;
|
||||
#[cfg(windows)]
|
||||
let listener = {
|
||||
if socket_path.exists() {
|
||||
tokio::fs::remove_file(&socket_path).await?;
|
||||
}
|
||||
codex_uds::UnixListener::bind(&socket_path).await?
|
||||
};
|
||||
let mut listener = Some(listener);
|
||||
#[cfg(windows)]
|
||||
updater.mark_ready().await?;
|
||||
let needs_managed_handoff =
|
||||
match resolved_managed_codex_bin(&daemon.current_managed_codex_bin()?).await {
|
||||
Ok(managed_bin) => executable_identity(&managed_bin)
|
||||
@@ -279,7 +247,6 @@ async fn adopt_managed_updater(
|
||||
if !crate::managed_install::supports_daemon_update_loop(&managed_bin).await {
|
||||
return Ok(UpdateLoopControl::Stop);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let _ = listener;
|
||||
reexec_managed_updater(
|
||||
@@ -291,25 +258,6 @@ async fn adopt_managed_updater(
|
||||
)
|
||||
.map(|_| UpdateLoopControl::Stop)
|
||||
}
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let replacement = crate::backend::pid_update_loop_backend(
|
||||
daemon.backend_paths_with_bin(&daemon.load_settings().await?, &managed_bin),
|
||||
);
|
||||
listener.take();
|
||||
if let Err(err) = replacement.replace_current_updater().await {
|
||||
// A failed replacement may still own the PID if its cleanup could
|
||||
// not terminate the successor. Never reopen our request socket then.
|
||||
replacement.wait_for_ownership().await?;
|
||||
let socket_path = daemon.manual_update_socket_path();
|
||||
if socket_path.exists() {
|
||||
tokio::fs::remove_file(&socket_path).await?;
|
||||
}
|
||||
*listener = Some(codex_uds::UnixListener::bind(&socket_path).await?);
|
||||
return Err(err);
|
||||
}
|
||||
Ok(UpdateLoopControl::Stop)
|
||||
}
|
||||
}
|
||||
|
||||
async fn sleep_or_terminate(duration: Duration, terminate: &mut Signal) -> bool {
|
||||
@@ -405,7 +353,6 @@ async fn update_once(
|
||||
"daemon package root changed during the update; retry the command"
|
||||
);
|
||||
let started = std::time::Instant::now();
|
||||
#[cfg(unix)]
|
||||
if matches!(
|
||||
crate::diagnostics::result(
|
||||
"installer_run",
|
||||
@@ -416,11 +363,6 @@ async fn update_once(
|
||||
) {
|
||||
return Ok((UpdateLoopControl::Stop, None));
|
||||
}
|
||||
#[cfg(windows)]
|
||||
tokio::select! {
|
||||
result = run_installer_script(&script, installer_mode, &package_root) => { crate::diagnostics::result("installer_run", started, result)?; },
|
||||
_ = terminate.recv() => return Ok((UpdateLoopControl::Stop, None)),
|
||||
}
|
||||
anyhow::ensure!(
|
||||
trigger == UpdateTrigger::Scheduled || daemon.is_stable_standalone_release()?,
|
||||
"installer did not select a stable latest release; retry the update"
|
||||
@@ -553,7 +495,6 @@ async fn current_updater_identity() -> Result<ExecutableIdentity> {
|
||||
executable_identity(¤t_exe).await
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub(crate) fn reexec_managed_updater(managed_codex_bin: &Path, state_dir: &Path) -> Result<()> {
|
||||
let mut command = StdCommand::new(managed_codex_bin);
|
||||
command.args(["app-server", "daemon", "pid-update-loop"]);
|
||||
@@ -577,23 +518,14 @@ async fn run_installer_script(
|
||||
script: &[u8],
|
||||
mode: InstallerMode<'_>,
|
||||
package_root: &Path,
|
||||
#[cfg(unix)] terminate: impl std::future::Future<Output = Option<()>>,
|
||||
terminate: impl std::future::Future<Output = Option<()>>,
|
||||
) -> Result<UpdateLoopControl> {
|
||||
#[cfg(unix)]
|
||||
let mut command = {
|
||||
let mut command = Command::new("/bin/sh");
|
||||
command.arg("-s");
|
||||
command.process_group(0);
|
||||
command
|
||||
};
|
||||
#[cfg(windows)]
|
||||
let mut command = {
|
||||
let mut command = Command::new("powershell.exe");
|
||||
command.creation_flags(windows_sys::Win32::System::Threading::CREATE_NO_WINDOW);
|
||||
command.args(["-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false); try { Invoke-Expression ([Console]::In.ReadToEnd()) } catch { Write-Error $_; exit 1 }"])
|
||||
.kill_on_drop(true);
|
||||
command
|
||||
};
|
||||
let (latest_guard, current_guard, previous_release, defer_selection) = match mode {
|
||||
InstallerMode::Update(release) => ("1", "0", release, "0"),
|
||||
InstallerMode::RestoreProduction(release) => ("0", "1", release, "0"),
|
||||
@@ -662,23 +594,16 @@ async fn run_installer_script(
|
||||
}
|
||||
}
|
||||
});
|
||||
#[cfg(windows)]
|
||||
let _installer_job = crate::backend::windows::installer_job(&child)?;
|
||||
let mut stdin = child
|
||||
.stdin
|
||||
.take()
|
||||
.context("standalone Codex updater stdin was unavailable")?;
|
||||
#[cfg(unix)]
|
||||
let mut terminate = std::pin::pin!(terminate);
|
||||
#[cfg(unix)]
|
||||
let write_result = tokio::select! {
|
||||
result = stdin.write_all(script) => Some(result),
|
||||
_ = &mut terminate => None,
|
||||
};
|
||||
#[cfg(windows)]
|
||||
let write_result = Some(stdin.write_all(script).await);
|
||||
drop(stdin);
|
||||
#[cfg(unix)]
|
||||
if write_result.is_none() {
|
||||
cancel_installer(&mut child, package_root).await;
|
||||
stderr_task.abort();
|
||||
@@ -688,7 +613,6 @@ async fn run_installer_script(
|
||||
stderr_task.abort();
|
||||
return Err(err).context("failed to pass standalone Codex updater to shell");
|
||||
}
|
||||
#[cfg(unix)]
|
||||
let status = tokio::select! {
|
||||
result = child.wait() => result,
|
||||
_ = &mut terminate => {
|
||||
@@ -696,8 +620,6 @@ async fn run_installer_script(
|
||||
return Ok(UpdateLoopControl::Stop);
|
||||
}
|
||||
};
|
||||
#[cfg(windows)]
|
||||
let status = child.wait().await;
|
||||
let status = match status {
|
||||
Ok(status) => status,
|
||||
Err(err) => {
|
||||
@@ -725,7 +647,6 @@ async fn run_installer_script(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn cancel_installer(child: &mut tokio::process::Child, package_root: &Path) {
|
||||
let Some(pid) = child.id().and_then(|pid| libc::pid_t::try_from(pid).ok()) else {
|
||||
return;
|
||||
@@ -795,15 +716,3 @@ impl InstallerHttp for RouteAwareClientPool {
|
||||
#[cfg(test)]
|
||||
#[path = "update_loop_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
#[cfg(windows)]
|
||||
struct Signal;
|
||||
|
||||
#[cfg(windows)]
|
||||
impl Signal {
|
||||
async fn recv(&mut self) -> Option<()> {
|
||||
// An unreadable control path must stop the updater rather than disable shutdown.
|
||||
let _ = codex_app_server_transport::daemon_shutdown_signal().await;
|
||||
Some(())
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,19 @@
|
||||
use std::sync::Mutex;
|
||||
#[cfg(unix)]
|
||||
use std::time::Duration;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
#[cfg(unix)]
|
||||
use tempfile::TempDir;
|
||||
|
||||
use super::INSTALL_URL;
|
||||
use super::InstallerHttp;
|
||||
use super::InstallerResponse;
|
||||
use super::fetch_installer_script;
|
||||
#[cfg(unix)]
|
||||
use super::manual_update::run as manual_update_once;
|
||||
#[cfg(unix)]
|
||||
use crate::Daemon;
|
||||
#[cfg(unix)]
|
||||
use crate::RestartIfRunningOutcome;
|
||||
#[cfg(unix)]
|
||||
use crate::UpdateOutput;
|
||||
#[cfg(unix)]
|
||||
use crate::UpdateStatus;
|
||||
#[cfg(unix)]
|
||||
use crate::managed_install::executable_identity;
|
||||
#[cfg(unix)]
|
||||
use crate::managed_install::executable_identity_from_reader;
|
||||
|
||||
#[tokio::test]
|
||||
@@ -51,7 +42,6 @@ async fn installer_fetch_rejects_non_success_status() {
|
||||
assert_eq!(http.requested_urls(), vec![INSTALL_URL.to_string()]);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn updater_reexec_preserves_paths_and_recovers_deleted_working_directory() {
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
@@ -155,7 +145,6 @@ fn updater_reexec_preserves_paths_and_recovers_deleted_working_directory() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn updater_reexec_child() {
|
||||
use std::os::unix::process::CommandExt;
|
||||
@@ -194,7 +183,6 @@ struct FakeInstallerHttp {
|
||||
requested_urls: Mutex<Vec<String>>,
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn explicit_update_migrates_running_and_stopped_installations() {
|
||||
for (running, local) in [(false, false), (true, false), (false, true), (true, true)] {
|
||||
@@ -372,7 +360,6 @@ impl InstallerHttp for FakeInstallerHttp {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn cancelling_installer_stops_children_and_releases_fallback_lock() {
|
||||
let home = tempfile::TempDir::new().expect("home");
|
||||
@@ -417,7 +404,6 @@ async fn cancelling_installer_stops_children_and_releases_fallback_lock() {
|
||||
assert!(!delayed.exists());
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn manual_update_daemon(home: &TempDir) -> (Daemon, String) {
|
||||
let target = if cfg!(target_os = "macos") {
|
||||
format!("{}-apple-darwin", std::env::consts::ARCH)
|
||||
@@ -453,13 +439,11 @@ fn manual_update_daemon(home: &TempDir) -> (Daemon, String) {
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn test_terminate() -> tokio::signal::unix::Signal {
|
||||
tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())
|
||||
.expect("install test signal handler")
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn manual_request_retries_after_updater_replacement() {
|
||||
use tokio::io::AsyncReadExt;
|
||||
@@ -513,7 +497,6 @@ async fn manual_request_retries_after_updater_replacement() {
|
||||
server.await.expect("replacement task");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn manual_request_accepts_maximum_installer_stderr_detail() {
|
||||
use tokio::io::AsyncReadExt;
|
||||
@@ -553,7 +536,6 @@ async fn manual_request_accepts_maximum_installer_stderr_detail() {
|
||||
server.await.expect("server task");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn manual_request_recovers_when_one_shot_updater_exits() {
|
||||
use tokio::io::AsyncReadExt;
|
||||
@@ -591,7 +573,6 @@ async fn manual_request_recovers_when_one_shot_updater_exits() {
|
||||
server.await.expect("updater task");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn unsupported_request_preserves_updater_schedule() {
|
||||
use tokio::io::AsyncReadExt;
|
||||
@@ -667,7 +648,6 @@ async fn unsupported_request_preserves_updater_schedule() {
|
||||
worker.abort();
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn test_control_server(
|
||||
daemon: &Daemon,
|
||||
home: &std::path::Path,
|
||||
@@ -716,7 +696,6 @@ async fn test_control_server(
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn scheduled_no_op_preserves_daemon_and_hands_off_stale_updater() {
|
||||
let home = TempDir::new().expect("home");
|
||||
@@ -776,7 +755,6 @@ async fn scheduled_no_op_preserves_daemon_and_hands_off_stale_updater() {
|
||||
server.abort();
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn scheduled_resource_only_update_restarts_daemon() {
|
||||
let home = TempDir::new().expect("home");
|
||||
@@ -823,13 +801,11 @@ async fn scheduled_resource_only_update_restarts_daemon() {
|
||||
server.abort();
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn manual_update_restarts_managed_daemon_with_automatic_updates_disabled() {
|
||||
check_manual_update_restart("standalone").await;
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
#[tokio::test]
|
||||
async fn readiness_waits_for_a_slow_managed_daemon() {
|
||||
let home = TempDir::new().unwrap();
|
||||
@@ -858,7 +834,6 @@ async fn readiness_waits_for_a_slow_managed_daemon() {
|
||||
assert_eq!(ready.unwrap().app_server_version, "1.0.0");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn daemon_start_and_restart_preserve_launch_features() {
|
||||
for features in [
|
||||
@@ -934,7 +909,6 @@ async fn daemon_start_and_restart_preserve_launch_features() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn confirmed_feature_restart_preserves_ownership_and_skips_matching_settings() {
|
||||
use crate::LifecycleStatus;
|
||||
@@ -1002,13 +976,11 @@ async fn confirmed_feature_restart_preserves_ownership_and_skips_matching_settin
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn manual_update_restarts_local_daemon_with_automatic_updates_disabled() {
|
||||
check_manual_update_restart("app-server-daemon").await;
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn check_manual_update_restart(package_directory: &str) {
|
||||
use tokio::io::AsyncReadExt;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
@@ -1176,48 +1148,6 @@ async fn check_manual_update_restart(package_directory: &str) {
|
||||
server.abort();
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tokio::test]
|
||||
async fn powershell_installer_is_noninteractive_and_reports_script_failure() {
|
||||
let valid = FakeInstallerHttp::new(InstallerResponse::Success(
|
||||
br#"
|
||||
function Test-Installer {
|
||||
if ($env:CODEX_NON_INTERACTIVE -ne '1') { throw 'interactive installer' }
|
||||
if ($env:CODEX_INSTALL_DAEMON_ONLY -ne '1') { throw 'wrong package destination' }
|
||||
if ($env:CODEX_INSTALL_IF_CURRENT -ne '1' -or $env:CODEX_INSTALL_IF_LATEST -ne '0') { throw 'wrong update guard' }
|
||||
}
|
||||
Test-Installer
|
||||
"#
|
||||
.to_vec(),
|
||||
));
|
||||
let script = super::fetch_installer_script(&valid)
|
||||
.await
|
||||
.expect("fetch installer");
|
||||
super::run_installer_script(
|
||||
&script,
|
||||
super::InstallerMode::RestoreProduction("0.150.0-x86_64-pc-windows-msvc"),
|
||||
std::path::Path::new("packages/app-server-daemon"),
|
||||
)
|
||||
.await
|
||||
.expect("installer succeeds");
|
||||
let failing = FakeInstallerHttp::new(InstallerResponse::Success(
|
||||
b"throw ([string][char]0x00E9 + 'chec installation')".to_vec(),
|
||||
));
|
||||
let script = super::fetch_installer_script(&failing)
|
||||
.await
|
||||
.expect("fetch failing installer");
|
||||
let error = super::run_installer_script(
|
||||
&script,
|
||||
super::InstallerMode::RestoreProduction("0.150.0-x86_64-pc-windows-msvc"),
|
||||
std::path::Path::new("packages/app-server-daemon"),
|
||||
)
|
||||
.await
|
||||
.err()
|
||||
.expect("installer should fail");
|
||||
assert!(error.to_string().contains("échec installation"));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn installer_failure_includes_stderr() {
|
||||
let script = format!(
|
||||
@@ -1238,7 +1168,6 @@ async fn installer_failure_includes_stderr() {
|
||||
assert!(!error.contains("discard me"));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn installer_failure_preserves_stderr_before_drain_timeout() {
|
||||
let error = tokio::time::timeout(
|
||||
@@ -1257,7 +1186,6 @@ async fn installer_failure_preserves_stderr_before_drain_timeout() {
|
||||
assert!(error.to_string().contains("installer failed"));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn update_rejects_a_package_root_change_during_download() {
|
||||
struct ChangingRoot<'a>(&'a std::path::Path);
|
||||
@@ -1289,7 +1217,6 @@ async fn update_rejects_a_package_root_change_during_download() {
|
||||
assert!(error.to_string().contains("package root changed"));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn daemon_owned_updates_require_and_request_an_isolated_installer() {
|
||||
let home = TempDir::new().unwrap();
|
||||
|
||||
+76
-2
@@ -1678,6 +1678,36 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthLoginParams": {
|
||||
"description": "Authorize a configured provider without changing the default or any thread's provider.",
|
||||
"properties": {
|
||||
"deviceAuth": {
|
||||
"description": "Select device authorization when the server advertises support for it.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"modelProvider": {
|
||||
"description": "Defaults to the current provider when omitted.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthReadParams": {
|
||||
"description": "Read credential readiness for a configured provider without starting browser login.",
|
||||
"properties": {
|
||||
"modelProvider": {
|
||||
"description": "Defaults to the current provider when omitted.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GcpProviderId": {
|
||||
"enum": [
|
||||
"gcp"
|
||||
@@ -2459,6 +2489,13 @@
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"modelProvider": {
|
||||
"description": "List models for this configured provider instead of the app-server default.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -8178,7 +8215,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthReadParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -8201,7 +8245,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthLoginParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -8615,6 +8666,29 @@
|
||||
"title": "Account/logoutRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"account/securitySetup/read"
|
||||
],
|
||||
"title": "Account/securitySetup/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method"
|
||||
],
|
||||
"title": "Account/securitySetup/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
|
||||
@@ -177,6 +177,58 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageDisplay": {
|
||||
"description": "A presentation instruction for Chat to apply to this answer when recovering history.",
|
||||
"properties": {
|
||||
"action": {
|
||||
"description": "Unknown actions must be left for the producing client to handle.",
|
||||
"type": "string"
|
||||
},
|
||||
"blockType": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"checkTrustedContacts": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"cyberTrustedAccess": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageModeration": {
|
||||
"properties": {
|
||||
"display": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AgentMessageDisplay"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"moderated": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"moderated"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentPath": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -677,6 +729,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The workspace's inference hook explicitly denied this request.",
|
||||
"enum": [
|
||||
"inferenceHookDenied"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -1958,6 +2017,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"loginId": {
|
||||
"description": "Identifies the completed device login attempt.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"providerId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -4750,6 +4816,17 @@
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"moderation": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AgentMessageModeration"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"phase": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
+292
-3
@@ -1850,7 +1850,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/GatewayOAuthReadParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -1873,7 +1880,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/GatewayOAuthLoginParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2287,6 +2301,29 @@
|
||||
"title": "Account/logoutRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"account/securitySetup/read"
|
||||
],
|
||||
"title": "Account/securitySetup/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method"
|
||||
],
|
||||
"title": "Account/securitySetup/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -7002,6 +7039,48 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"AccountSecuritySetupAction": {
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"url"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AccountSecuritySetupNotice": {
|
||||
"properties": {
|
||||
"accountId": {
|
||||
"type": "string"
|
||||
},
|
||||
"action": {
|
||||
"$ref": "#/definitions/v2/AccountSecuritySetupAction"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accountId",
|
||||
"action",
|
||||
"description",
|
||||
"title",
|
||||
"userId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AccountSession": {
|
||||
"properties": {
|
||||
"displayName": {
|
||||
@@ -7329,6 +7408,37 @@
|
||||
"title": "AgentMessageDeltaNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageDisplay": {
|
||||
"description": "A presentation instruction for Chat to apply to this answer when recovering history.",
|
||||
"properties": {
|
||||
"action": {
|
||||
"description": "Unknown actions must be left for the producing client to handle.",
|
||||
"type": "string"
|
||||
},
|
||||
"blockType": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"checkTrustedContacts": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"cyberTrustedAccess": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageInputContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
@@ -7373,6 +7483,27 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"AgentMessageModeration": {
|
||||
"properties": {
|
||||
"display": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/AgentMessageDisplay"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"moderated": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"moderated"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentPath": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -8794,6 +8925,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The workspace's inference hook explicitly denied this request.",
|
||||
"enum": [
|
||||
"inferenceHookDenied"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -13163,6 +13301,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"loginId": {
|
||||
"description": "Identifies the completed device login attempt.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"providerId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -13177,11 +13322,72 @@
|
||||
"title": "GatewayOAuthChangedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthLoginParams": {
|
||||
"description": "Authorize a configured provider without changing the default or any thread's provider.",
|
||||
"properties": {
|
||||
"deviceAuth": {
|
||||
"description": "Select device authorization when the server advertises support for it.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"modelProvider": {
|
||||
"description": "Defaults to the current provider when omitted.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthLoginResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"prompt": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/GatewayOAuthPrompt"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "GatewayOAuthLoginResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthPrompt": {
|
||||
"properties": {
|
||||
"loginId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"verificationUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"loginId",
|
||||
"userCode",
|
||||
"verificationUrl"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthReadParams": {
|
||||
"description": "Read credential readiness for a configured provider without starting browser login.",
|
||||
"properties": {
|
||||
"modelProvider": {
|
||||
"description": "Defaults to the current provider when omitted.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthReadResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Current effective gateway policy and credential readiness; never contains credentials.",
|
||||
@@ -13212,6 +13418,11 @@
|
||||
}
|
||||
],
|
||||
"description": "Null when the effective provider does not use gateway OAuth."
|
||||
},
|
||||
"supportsDeviceAuth": {
|
||||
"default": false,
|
||||
"description": "Whether the administrator configured a device authorization endpoint.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -13332,6 +13543,14 @@
|
||||
},
|
||||
"requiresOpenaiAuth": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"userId": {
|
||||
"default": null,
|
||||
"description": "ChatGPT user ID belonging to this account response, when available.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -13340,6 +13559,24 @@
|
||||
"title": "GetAccountResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"GetAccountSecuritySetupResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Optional security reminder bound to the account that fetched it. Unavailable or ineligible accounts return no notice; this read never changes account security.",
|
||||
"properties": {
|
||||
"notice": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/AccountSecuritySetupNotice"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "GetAccountSecuritySetupResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"GetAccountTokenUsageParams": {
|
||||
"properties": {
|
||||
"threadId": {
|
||||
@@ -16270,6 +16507,13 @@
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"modelProvider": {
|
||||
"description": "List models for this configured provider instead of the app-server default.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "ModelListParams",
|
||||
@@ -16879,6 +17123,30 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"NullableGatewayOAuthLoginParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/GatewayOAuthLoginParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Nullable_GatewayOAuthLoginParams"
|
||||
},
|
||||
"NullableGatewayOAuthReadParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/GatewayOAuthReadParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Nullable_GatewayOAuthReadParams"
|
||||
},
|
||||
"NullableGetAccountRateLimitsParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"anyOf": [
|
||||
@@ -17660,7 +17928,7 @@
|
||||
]
|
||||
},
|
||||
"defaultPrompt": {
|
||||
"description": "Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.",
|
||||
"description": "Starter prompts for the plugin. Capped at 3 entries with a maximum of 512 characters per entry.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -19173,6 +19441,16 @@
|
||||
"$ref": "#/definitions/v2/UserInput"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"responsesapiClientMetadata": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Metadata retained with this input, including across reconnect and restoration.",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -23357,6 +23635,17 @@
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"moderation": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/AgentMessageModeration"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"phase": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
+292
-3
@@ -154,6 +154,48 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"AccountSecuritySetupAction": {
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"url"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AccountSecuritySetupNotice": {
|
||||
"properties": {
|
||||
"accountId": {
|
||||
"type": "string"
|
||||
},
|
||||
"action": {
|
||||
"$ref": "#/definitions/AccountSecuritySetupAction"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accountId",
|
||||
"action",
|
||||
"description",
|
||||
"title",
|
||||
"userId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AccountSession": {
|
||||
"properties": {
|
||||
"displayName": {
|
||||
@@ -481,6 +523,37 @@
|
||||
"title": "AgentMessageDeltaNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageDisplay": {
|
||||
"description": "A presentation instruction for Chat to apply to this answer when recovering history.",
|
||||
"properties": {
|
||||
"action": {
|
||||
"description": "Unknown actions must be left for the producing client to handle.",
|
||||
"type": "string"
|
||||
},
|
||||
"blockType": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"checkTrustedContacts": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"cyberTrustedAccess": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageInputContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
@@ -525,6 +598,27 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"AgentMessageModeration": {
|
||||
"properties": {
|
||||
"display": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AgentMessageDisplay"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"moderated": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"moderated"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentPath": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3594,7 +3688,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthReadParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3617,7 +3718,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthLoginParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -4031,6 +4139,29 @@
|
||||
"title": "Account/logoutRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"account/securitySetup/read"
|
||||
],
|
||||
"title": "Account/securitySetup/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method"
|
||||
],
|
||||
"title": "Account/securitySetup/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -4575,6 +4706,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The workspace's inference hook explicitly denied this request.",
|
||||
"enum": [
|
||||
"inferenceHookDenied"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -9055,6 +9193,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"loginId": {
|
||||
"description": "Identifies the completed device login attempt.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"providerId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -9069,11 +9214,72 @@
|
||||
"title": "GatewayOAuthChangedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthLoginParams": {
|
||||
"description": "Authorize a configured provider without changing the default or any thread's provider.",
|
||||
"properties": {
|
||||
"deviceAuth": {
|
||||
"description": "Select device authorization when the server advertises support for it.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"modelProvider": {
|
||||
"description": "Defaults to the current provider when omitted.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthLoginResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"prompt": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthPrompt"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "GatewayOAuthLoginResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthPrompt": {
|
||||
"properties": {
|
||||
"loginId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"verificationUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"loginId",
|
||||
"userCode",
|
||||
"verificationUrl"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthReadParams": {
|
||||
"description": "Read credential readiness for a configured provider without starting browser login.",
|
||||
"properties": {
|
||||
"modelProvider": {
|
||||
"description": "Defaults to the current provider when omitted.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GatewayOAuthReadResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Current effective gateway policy and credential readiness; never contains credentials.",
|
||||
@@ -9104,6 +9310,11 @@
|
||||
}
|
||||
],
|
||||
"description": "Null when the effective provider does not use gateway OAuth."
|
||||
},
|
||||
"supportsDeviceAuth": {
|
||||
"default": false,
|
||||
"description": "Whether the administrator configured a device authorization endpoint.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -9224,6 +9435,14 @@
|
||||
},
|
||||
"requiresOpenaiAuth": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"userId": {
|
||||
"default": null,
|
||||
"description": "ChatGPT user ID belonging to this account response, when available.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -9232,6 +9451,24 @@
|
||||
"title": "GetAccountResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"GetAccountSecuritySetupResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Optional security reminder bound to the account that fetched it. Unavailable or ineligible accounts return no notice; this read never changes account security.",
|
||||
"properties": {
|
||||
"notice": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AccountSecuritySetupNotice"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "GetAccountSecuritySetupResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"GetAccountTokenUsageParams": {
|
||||
"properties": {
|
||||
"threadId": {
|
||||
@@ -12231,6 +12468,13 @@
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"modelProvider": {
|
||||
"description": "List models for this configured provider instead of the app-server default.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "ModelListParams",
|
||||
@@ -12840,6 +13084,30 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"NullableGatewayOAuthLoginParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthLoginParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Nullable_GatewayOAuthLoginParams"
|
||||
},
|
||||
"NullableGatewayOAuthReadParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthReadParams"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Nullable_GatewayOAuthReadParams"
|
||||
},
|
||||
"NullableGetAccountRateLimitsParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"anyOf": [
|
||||
@@ -13621,7 +13889,7 @@
|
||||
]
|
||||
},
|
||||
"defaultPrompt": {
|
||||
"description": "Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.",
|
||||
"description": "Starter prompts for the plugin. Capped at 3 entries with a maximum of 512 characters per entry.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -15134,6 +15402,16 @@
|
||||
"$ref": "#/definitions/UserInput"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"responsesapiClientMetadata": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Metadata retained with this input, including across reconnect and restoration.",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -21060,6 +21338,17 @@
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"moderation": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AgentMessageModeration"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"phase": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The workspace's inference hook explicitly denied this request.",
|
||||
"enum": [
|
||||
"inferenceHookDenied"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
|
||||
+7
@@ -25,6 +25,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"loginId": {
|
||||
"description": "Identifies the completed device login attempt.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"providerId": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"GatewayOAuthPrompt": {
|
||||
"properties": {
|
||||
"loginId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"verificationUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"loginId",
|
||||
"userCode",
|
||||
"verificationUrl"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"prompt": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GatewayOAuthPrompt"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "GatewayOAuthLoginResponse",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -39,6 +39,11 @@
|
||||
}
|
||||
],
|
||||
"description": "Null when the effective provider does not use gateway OAuth."
|
||||
},
|
||||
"supportsDeviceAuth": {
|
||||
"default": false,
|
||||
"description": "Whether the administrator configured a device authorization endpoint.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -159,6 +159,14 @@
|
||||
},
|
||||
"requiresOpenaiAuth": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"userId": {
|
||||
"default": null,
|
||||
"description": "ChatGPT user ID belonging to this account response, when available.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"AccountSecuritySetupAction": {
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"url"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AccountSecuritySetupNotice": {
|
||||
"properties": {
|
||||
"accountId": {
|
||||
"type": "string"
|
||||
},
|
||||
"action": {
|
||||
"$ref": "#/definitions/AccountSecuritySetupAction"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accountId",
|
||||
"action",
|
||||
"description",
|
||||
"title",
|
||||
"userId"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"description": "Optional security reminder bound to the account that fetched it. Unavailable or ineligible accounts return no notice; this read never changes account security.",
|
||||
"properties": {
|
||||
"notice": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AccountSecuritySetupNotice"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "GetAccountSecuritySetupResponse",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -11,6 +11,58 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"AgentMessageDisplay": {
|
||||
"description": "A presentation instruction for Chat to apply to this answer when recovering history.",
|
||||
"properties": {
|
||||
"action": {
|
||||
"description": "Unknown actions must be left for the producing client to handle.",
|
||||
"type": "string"
|
||||
},
|
||||
"blockType": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"checkTrustedContacts": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"cyberTrustedAccess": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentMessageModeration": {
|
||||
"properties": {
|
||||
"display": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AgentMessageDisplay"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"moderated": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"moderated"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AsyncUserInputQuestion": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -886,6 +938,17 @@
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"moderation": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AgentMessageModeration"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"phase": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
Loaded 100 of 2718 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user