Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c4a1983
feat(attestation): request device attestation from desktop app
jiamingz42 May 6, 2026
bc141c4
test(app-server): cover attestation websocket flow
jiamingz42 May 6, 2026
a96ba75
fix(attestation): tighten timeout behavior
jiamingz42 May 7, 2026
e11df6a
refactor(attestation): reuse existing constructors
jiamingz42 May 7, 2026
d6e3cb7
refactor(attestation): remove request purpose enum
jiamingz42 May 7, 2026
92a0b57
test(attestation): trim duplicate unit coverage
jiamingz42 May 7, 2026
bb55e05
refactor(attestation): move policy behind provider
jiamingz42 May 7, 2026
4e4e6b6
refactor(attestation): return header values from provider
jiamingz42 May 7, 2026
441a97b
refactor(app-server): track attestation on live connections
jiamingz42 May 7, 2026
5fdd555
codex: fix CI failure on PR #20619
jiamingz42 May 7, 2026
8ee7bf6
codex: wrap app-server attestation transport
jiamingz42 May 7, 2026
e77b359
codex: move app-server attestation into module
jiamingz42 May 7, 2026
bdb7772
fix(app-server): scope attestation to thread connections
jiamingz42 May 7, 2026
5daabda
codex: fix CI failure on PR #20619
jiamingz42 May 7, 2026
5da2ade
codex: fix CI failure on PR #20619
jiamingz42 May 7, 2026
a996616
codex: fix CI failure on PR #20619
jiamingz42 May 7, 2026
eac9cff
codex: address PR review feedback (#20619)
jiamingz42 May 8, 2026
0712d3b
codex: move attestation support to model provider
jiamingz42 May 8, 2026
10877f0
codex: inline attestation header insertion
jiamingz42 May 8, 2026
ed19393
codex: fix CI failure on PR #20619
jiamingz42 May 8, 2026
bd1da5f
codex: remove unused provider parameters
jiamingz42 May 8, 2026
f3cda57
codex: fix CI failure on PR #20619
jiamingz42 May 8, 2026
34bf9f5
codex: fix CI failure on PR #20619
jiamingz42 May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions codex-rs/analytics/src/analytics_client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ fn sample_initialize_fact(connection_id: u64) -> AnalyticsFact {
},
capabilities: Some(InitializeCapabilities {
experimental_api: false,
request_attestation: false,
opt_out_notification_methods: None,
}),
},
Expand Down Expand Up @@ -1122,6 +1123,7 @@ async fn initialize_caches_client_and_thread_lifecycle_publishes_once_initialize
},
capabilities: Some(InitializeCapabilities {
experimental_api: false,
request_attestation: false,
opt_out_notification_methods: None,
}),
},
Expand Down Expand Up @@ -1269,6 +1271,7 @@ async fn compaction_event_ingests_custom_fact() {
},
capabilities: Some(InitializeCapabilities {
experimental_api: false,
request_attestation: false,
opt_out_notification_methods: None,
}),
},
Expand Down Expand Up @@ -1382,6 +1385,7 @@ async fn guardian_review_event_ingests_custom_fact_with_optional_target_item() {
},
capabilities: Some(InitializeCapabilities {
experimental_api: false,
request_attestation: false,
opt_out_notification_methods: None,
}),
},
Expand Down
1 change: 1 addition & 0 deletions codex-rs/app-server-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ impl InProcessClientStartArgs {
pub fn initialize_params(&self) -> InitializeParams {
let capabilities = InitializeCapabilities {
experimental_api: self.experimental_api,
request_attestation: false,
opt_out_notification_methods: if self.opt_out_notification_methods.is_empty() {
None
} else {
Expand Down
1 change: 1 addition & 0 deletions codex-rs/app-server-client/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl RemoteAppServerConnectArgs {
fn initialize_params(&self) -> InitializeParams {
let capabilities = InitializeCapabilities {
experimental_api: self.experimental_api,
request_attestation: false,
opt_out_notification_methods: if self.opt_out_notification_methods.is_empty() {
None
} else {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions codex-rs/app-server-protocol/schema/json/ClientRequest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions codex-rs/app-server-protocol/schema/json/ServerRequest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions codex-rs/app-server-protocol/schema/typescript/v2/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,12 @@ server_request_definitions! {
response: v2::ChatgptAuthTokensRefreshResponse,
},

/// Generate a fresh upstream attestation result on demand.
AttestationGenerate => "attestation/generate" {
params: v2::AttestationGenerateParams,
response: v2::AttestationGenerateResponse,
},

/// DEPRECATED APIs below
/// Request to approve a patch.
/// This request is used for Turns started via the legacy APIs (i.e. SendUserTurn, SendUserMessage).
Expand Down Expand Up @@ -1891,6 +1897,7 @@ mod tests {
},
capabilities: Some(v1::InitializeCapabilities {
experimental_api: true,
request_attestation: true,
opt_out_notification_methods: Some(vec![
"thread/started".to_string(),
"item/agentMessage/delta".to_string(),
Expand All @@ -1911,6 +1918,7 @@ mod tests {
},
"capabilities": {
"experimentalApi": true,
"requestAttestation": true,
"optOutNotificationMethods": [
"thread/started",
"item/agentMessage/delta"
Expand All @@ -1936,6 +1944,7 @@ mod tests {
},
"capabilities": {
"experimentalApi": true,
"requestAttestation": true,
"optOutNotificationMethods": [
"thread/started",
"item/agentMessage/delta"
Expand All @@ -1956,6 +1965,7 @@ mod tests {
},
capabilities: Some(v1::InitializeCapabilities {
experimental_api: true,
request_attestation: true,
opt_out_notification_methods: Some(vec![
"thread/started".to_string(),
"item/agentMessage/delta".to_string(),
Expand Down Expand Up @@ -2072,6 +2082,28 @@ mod tests {
Ok(())
}

#[test]
fn serialize_attestation_generate_request() -> Result<()> {
let params = v2::AttestationGenerateParams {};
let request = ServerRequest::AttestationGenerate {
request_id: RequestId::Integer(9),
params: params.clone(),
};
assert_eq!(
json!({
"method": "attestation/generate",
"id": 9,
"params": {}
}),
serde_json::to_value(&request)?,
);

let payload = ServerRequestPayload::AttestationGenerate(params);
assert_eq!(request.id(), &RequestId::Integer(9));
assert_eq!(payload.request_with_id(RequestId::Integer(9)), request);
Ok(())
}

#[test]
fn serialize_server_response() -> Result<()> {
let response = ServerResponse::CommandExecutionRequestApproval {
Expand Down
3 changes: 3 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ pub struct InitializeCapabilities {
/// Opt into receiving experimental API methods and fields.
#[serde(default)]
pub experimental_api: bool,
/// Opt into `attestation/generate` requests for upstream `x-oai-attestation`.
#[serde(default)]
pub request_attestation: bool,
/// Exact notification method names that should be suppressed for this
/// connection (for example `thread/started`).
#[ts(optional = nullable)]
Expand Down
17 changes: 17 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/v2/attestation.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
use ts_rs::TS;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, Default)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct AttestationGenerateParams {}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct AttestationGenerateResponse {
/// Opaque client attestation token.
pub token: String,
}
2 changes: 2 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod shared;

mod account;
mod apps;
mod attestation;
mod collaboration_mode;
mod command_exec;
mod config;
Expand All @@ -26,6 +27,7 @@ mod windows_sandbox;

pub use account::*;
pub use apps::*;
pub use attestation::*;
pub use collaboration_mode::*;
pub use command_exec::*;
pub use config::*;
Expand Down
Loading
Loading