fix(runner): mirror Codex runtime profile in runnerd

This commit is contained in:
Dotta 2026-09-02 20:31:48 -05:00
parent 12fdb57ec8
commit 492ba3a46b
2 changed files with 31 additions and 21 deletions

View File

@ -96,8 +96,8 @@ impl AcpxProviderDescriptor {
"gpt-5.6-sol",
"@agentclientprotocol/codex-acp",
"1.6.2",
None,
None,
Some("@openai/codex"),
Some("0.148.0"),
"sha256:94049b3e3c3aee87de62703786e4fa81d031d7bd979f99bdf516d84f28791a79",
),
"pi" => return Err(DurableRunnerError::invalid(
@ -1315,21 +1315,26 @@ mod tests {
}
fn descriptor(agent: &str) -> Value {
let (model, package, version, digest) = if agent == "claude" {
(
"claude-sonnet-5",
"@agentclientprotocol/claude-agent-acp",
"0.70.0",
"sha256:9d73d1f0f121fb96cc8badb28c22d5bff02d8582eb2e40360a81c189e1b9422a",
)
} else {
(
"gpt-5.6-sol",
"@agentclientprotocol/codex-acp",
"1.6.2",
"sha256:94049b3e3c3aee87de62703786e4fa81d031d7bd979f99bdf516d84f28791a79",
)
};
let (model, package, version, runtime_package, runtime_version, digest) =
if agent == "claude" {
(
"claude-sonnet-5",
"@agentclientprotocol/claude-agent-acp",
"0.70.0",
Value::Null,
Value::Null,
"sha256:9d73d1f0f121fb96cc8badb28c22d5bff02d8582eb2e40360a81c189e1b9422a",
)
} else {
(
"gpt-5.6-sol",
"@agentclientprotocol/codex-acp",
"1.6.2",
json!("@openai/codex"),
json!("0.148.0"),
"sha256:94049b3e3c3aee87de62703786e4fa81d031d7bd979f99bdf516d84f28791a79",
)
};
json!({
"kind": "acpx",
"provider": "acpx",
@ -1340,8 +1345,8 @@ mod tests {
"acpxVersion": "0.13.1",
"agentServerPackage": package,
"agentServerVersion": version,
"agentRuntimePackage": null,
"agentRuntimeVersion": null,
"agentRuntimePackage": runtime_package,
"agentRuntimeVersion": runtime_version,
"commandDigest": digest,
"sidecarCommand": "/qualified/node",
"sidecarArgs": ["/qualified/acpx-sidecar.js"],

View File

@ -135,6 +135,11 @@ fn prepare_payload(directory: &Path, agent: &str) -> Value {
fn prepare_payload_with_mode(directory: &Path, agent: &str, mode: &str) -> Value {
let operations = Vec::new();
let (runtime_package, runtime_version) = if agent == "codex" {
(json!("@openai/codex"), json!("0.148.0"))
} else {
(Value::Null, Value::Null)
};
json!({
"authorizedTools": {
"schema": "paperclip.runner.authorized-tools.v1",
@ -152,8 +157,8 @@ fn prepare_payload_with_mode(directory: &Path, agent: &str, mode: &str) -> Value
"acpxVersion": "0.13.1",
"agentServerPackage": "@agentclientprotocol/codex-acp",
"agentServerVersion": "1.6.2",
"agentRuntimePackage": null,
"agentRuntimeVersion": null,
"agentRuntimePackage": runtime_package,
"agentRuntimeVersion": runtime_version,
"commandDigest": CODEX_ACPX_DIGEST,
"sidecarCommand": env!("CARGO_BIN_EXE_fake-acpx-sidecar"),
"sidecarArgs": [