Download codex-rs/exec-server/src/environment_registry.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 2.54 kB
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/exec-server/src/environment_registry.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/exec-server/src/environment_registry.rs
-
curl -L -o environment_registry.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/exec-server/src/environment_registry.rs
2.54 kB
| use serde::Deserialize; | |
| use serde::Serialize; | |
| use crate::NoiseChannelPublicKey; | |
| /// Request body for registering an executor with the environment registry. | |
| pub struct EnvironmentRegistryRegistrationRequest { | |
| pub security_profile: String, | |
| pub executor_public_key: NoiseChannelPublicKey, | |
| } | |
| /// Environment registry response returned after executor registration. | |
| pub struct EnvironmentRegistryRegistrationResponse { | |
| pub environment_id: String, | |
| pub url: String, | |
| pub security_profile: String, | |
| pub executor_registration_id: String, | |
| } | |
| /// Request body for connecting a harness key with the environment registry. | |
| pub struct EnvironmentRegistryConnectRequest { | |
| pub harness_public_key: NoiseChannelPublicKey, | |
| } | |
| /// Environment registry response returned after connecting a harness key. | |
| pub struct EnvironmentRegistryConnectResponse { | |
| pub environment_id: String, | |
| pub url: String, | |
| pub security_profile: String, | |
| pub executor_registration_id: String, | |
| pub executor_public_key: NoiseChannelPublicKey, | |
| pub harness_key_authorization: String, | |
| } | |
| impl std::fmt::Debug for EnvironmentRegistryConnectResponse { | |
| fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | |
| f.debug_struct("EnvironmentRegistryConnectResponse") | |
| .field("environment_id", &self.environment_id) | |
| .field("url", &"<redacted>") | |
| .field("security_profile", &self.security_profile) | |
| .field("executor_registration_id", &self.executor_registration_id) | |
| .field("executor_public_key", &self.executor_public_key) | |
| .field("harness_key_authorization", &"<redacted>") | |
| .finish() | |
| } | |
| } | |
| /// Request body for authorizing a harness key with the environment registry. | |
| 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. | |
| pub struct EnvironmentRegistryHarnessKeyValidationResponse { | |
| pub valid: bool, | |
| } | |
| mod tests; | |