mirror of
https://github.com/openai/codex.git
synced 2026-11-27 15:30:27 +00:00
exec-server: expose environment registry payloads (#28651)
## Why Services that proxy the exec-server environment registry endpoints need to deserialize and forward the same Noise registration and harness-key validation payloads. Those wire models currently live as private, serialize-only structs in `exec-server`, which forces consumers to duplicate the contract. ## What changed - Add owned serde models for registration and harness-key validation requests and responses. - Use those models in the existing exec-server registry client. - Re-export the models from `codex-exec-server` and `codex-core-api`. - Keep the harness authorization request free of a derived `Debug` implementation so it is not accidentally logged. ## Testing - Focused exec-server registration and harness-key validation tests: 2 passed. - `cargo check -p codex-core-api` The full `codex-exec-server` suite compiled and ran 254 tests: 222 passed, while 32 existing filesystem sandbox tests could not run under the nested macOS sandbox (`sandbox_apply: Operation not permitted`). Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
1 parent
3959ab0ffc
commit
a0586ad12d
4 files changed
+52
-32
No files matched your search
@@ -0,0 +1,34 @@
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::NoiseChannelPublicKey;
|
||||
|
||||
/// Request body for registering an executor with the environment registry.
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryRegistrationRequest {
|
||||
pub security_profile: String,
|
||||
pub executor_public_key: NoiseChannelPublicKey,
|
||||
}
|
||||
|
||||
/// Environment registry response returned after executor registration.
|
||||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryRegistrationResponse {
|
||||
pub environment_id: String,
|
||||
pub url: String,
|
||||
pub security_profile: String,
|
||||
pub executor_registration_id: String,
|
||||
}
|
||||
|
||||
/// Request body for authorizing a harness key with the environment registry.
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryHarnessKeyValidationRequest {
|
||||
pub executor_registration_id: String,
|
||||
pub harness_public_key: NoiseChannelPublicKey,
|
||||
pub harness_key_authorization: String,
|
||||
}
|
||||
|
||||
/// Environment registry response returned after harness key validation.
|
||||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryHarnessKeyValidationResponse {
|
||||
pub valid: bool,
|
||||
}
|
||||
Reference in new issue
Block a user