Add config bundle transport types (#24617)

## Summary

PR 1 of 5 in the cloud-managed config client stack.

Adds the generated backend models and client transport surface for the
config bundle endpoint. This bundle endpoint is the replacement backend
surface for legacy cloud requirements; the final PR in the stack
switches runtime consumers over to it.

## Details

- This is transport-only plumbing: no runtime config behavior changes in
this PR.
- The bundle endpoint is the new shared backend surface for
cloud-delivered config and requirements data.
- Both supported path styles are wired here: `/api/codex/config/bundle`
and `/wham/config/bundle`.
- The response types come from generated backend models so later PRs
consume the backend contract directly instead of maintaining
hand-written mirror structs.

## Validation

Validated through the targeted stack checks after rebasing onto current
`main`:

- Rust crate tests for
config/hooks/cloud-config/backend-client/app-server-protocol
- Filtered `codex-core` and `codex-app-server` `cloud_config_bundle`
tests
- Python generated-file contract test
- `cargo shear --deny-warnings`
- Targeted `argument-comment-lint` for config/hooks
This commit is contained in:
joeflorencio-openai
2026-05-31 11:52:18 -07:00
committed by GitHub
Unverified
parent 2f0726ad6d
commit e93dc98a48
8 changed files with 170 additions and 0 deletions
@@ -0,0 +1,40 @@
/*
* codex-backend
*
* codex-backend
*
* The version of the OpenAPI document: 0.0.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::Deserialize;
use serde::Serialize;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConfigBundleResponse {
#[serde(
rename = "config_toml",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub config_toml: Option<Option<Box<models::DeliveredConfigToml>>>,
#[serde(
rename = "requirements_toml",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub requirements_toml: Option<Option<Box<models::DeliveredRequirementsToml>>>,
}
impl ConfigBundleResponse {
pub fn new() -> ConfigBundleResponse {
ConfigBundleResponse {
config_toml: None,
requirements_toml: None,
}
}
}
@@ -0,0 +1,32 @@
/*
* codex-backend
*
* codex-backend
*
* The version of the OpenAPI document: 0.0.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::Deserialize;
use serde::Serialize;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeliveredConfigToml {
#[serde(
rename = "enterprise_managed",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub enterprise_managed: Option<Option<Vec<models::DeliveredTomlFragment>>>,
}
impl DeliveredConfigToml {
pub fn new() -> DeliveredConfigToml {
DeliveredConfigToml {
enterprise_managed: None,
}
}
}
@@ -0,0 +1,32 @@
/*
* codex-backend
*
* codex-backend
*
* The version of the OpenAPI document: 0.0.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::Deserialize;
use serde::Serialize;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeliveredRequirementsToml {
#[serde(
rename = "enterprise_managed",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub enterprise_managed: Option<Option<Vec<models::DeliveredTomlFragment>>>,
}
impl DeliveredRequirementsToml {
pub fn new() -> DeliveredRequirementsToml {
DeliveredRequirementsToml {
enterprise_managed: None,
}
}
}
@@ -0,0 +1,28 @@
/*
* codex-backend
*
* codex-backend
*
* The version of the OpenAPI document: 0.0.1
*
* Generated by: https://openapi-generator.tech
*/
use serde::Deserialize;
use serde::Serialize;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeliveredTomlFragment {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "contents")]
pub contents: String,
}
impl DeliveredTomlFragment {
pub fn new(id: String, name: String, contents: String) -> DeliveredTomlFragment {
DeliveredTomlFragment { id, name, contents }
}
}
@@ -4,9 +4,21 @@
// The process for this will change
// Config
pub(crate) mod config_bundle_response;
pub use self::config_bundle_response::ConfigBundleResponse;
pub(crate) mod config_file_response;
pub use self::config_file_response::ConfigFileResponse;
pub(crate) mod delivered_config_toml;
pub use self::delivered_config_toml::DeliveredConfigToml;
pub(crate) mod delivered_requirements_toml;
pub use self::delivered_requirements_toml::DeliveredRequirementsToml;
pub(crate) mod delivered_toml_fragment;
pub use self::delivered_toml_fragment::DeliveredTomlFragment;
// Cloud Tasks
pub(crate) mod code_task_details_response;
pub use self::code_task_details_response::CodeTaskDetailsResponse;