pub struct CodexEndpoint { /* private fields */ }Expand description
Local endpoint configuration around one canonical coordinated runtime.
Implementations§
Source§impl CodexEndpoint
impl CodexEndpoint
pub fn new( runtime: Arc<dyn SdkRuntime>, runtime_id: impl Into<String>, cwd: impl Into<PathBuf>, ) -> Result<(Arc<Self>, CodexBootstrapCredential), CredentialError>
pub fn with_mode( runtime: Arc<dyn SdkRuntime>, runtime_id: impl Into<String>, cwd: impl Into<PathBuf>, mode: CodexCompatibilityMode, ) -> Result<(Arc<Self>, CodexBootstrapCredential), CredentialError>
Sourcepub fn with_forwarded_ports(
self: Arc<Self>,
ports: impl IntoIterator<Item = u16>,
) -> Result<Arc<Self>, CredentialError>
pub fn with_forwarded_ports( self: Arc<Self>, ports: impl IntoIterator<Item = u16>, ) -> Result<Arc<Self>, CredentialError>
Declare operator-created SSH forward ports without opening or managing a tunnel. The listener remains numeric IPv4 loopback.
Sourcepub fn with_client_home(
self: Arc<Self>,
path: impl Into<PathBuf>,
) -> Result<Arc<Self>, CredentialError>
pub fn with_client_home( self: Arc<Self>, path: impl Into<PathBuf>, ) -> Result<Arc<Self>, CredentialError>
Declare the isolated Codex preference home returned by initialize.
The directory remains owned by the launcher, not by canonical state.
pub fn issue_interactive( self: &Arc<Self>, bootstrap: &CodexBootstrapCredential, client_id: impl Into<String>, ) -> Result<CodexClientCredential, CredentialError>
pub fn issue_observer( self: &Arc<Self>, bootstrap: &CodexBootstrapCredential, client_id: impl Into<String>, ) -> Result<CodexClientCredential, CredentialError>
pub async fn rotate_interactive( self: &Arc<Self>, bootstrap: &CodexBootstrapCredential, credential: &mut CodexClientCredential, client_id: impl Into<String>, ) -> Result<CodexClientCredential, CredentialError>
Sourcepub fn rotate_bootstrap(
&self,
bootstrap: &mut CodexBootstrapCredential,
) -> Result<CodexBootstrapCredential, CredentialError>
pub fn rotate_bootstrap( &self, bootstrap: &mut CodexBootstrapCredential, ) -> Result<CodexBootstrapCredential, CredentialError>
Replace the operator bootstrap capability for this runtime generation. The old value is invalidated and zeroized before the replacement is returned to the caller.
Sourcepub fn rotate_bootstrap_file(
&self,
bootstrap: &mut CodexBootstrapCredential,
bootstrap_file: &mut CodexBootstrapFile,
runtime_dir: impl Into<PathBuf>,
) -> Result<(CodexBootstrapCredential, CodexBootstrapFile), CredentialError>
pub fn rotate_bootstrap_file( &self, bootstrap: &mut CodexBootstrapCredential, bootstrap_file: &mut CodexBootstrapFile, runtime_dir: impl Into<PathBuf>, ) -> Result<(CodexBootstrapCredential, CodexBootstrapFile), CredentialError>
Rotate both the in-memory bootstrap and its private Unix file. The new destination is created first; the authenticated server map is then switched and the old file/value are removed before acknowledgement.
Sourcepub async fn revoke_frontend(
&self,
bootstrap: &CodexBootstrapCredential,
credential: &mut CodexClientCredential,
) -> Result<(), CredentialError>
pub async fn revoke_frontend( &self, bootstrap: &CodexBootstrapCredential, credential: &mut CodexClientCredential, ) -> Result<(), CredentialError>
Revoke a frontend credential and wait until its active channel and lease have been released before acknowledging.
Sourcepub fn write_bootstrap_file(
&self,
bootstrap: &CodexBootstrapCredential,
runtime_dir: impl Into<PathBuf>,
) -> Result<CodexBootstrapFile, CredentialError>
pub fn write_bootstrap_file( &self, bootstrap: &CodexBootstrapCredential, runtime_dir: impl Into<PathBuf>, ) -> Result<CodexBootstrapFile, CredentialError>
Persist the bootstrap capability through the single private writer. This is the launcher path; frontend credentials never use this file.
Sourcepub fn issue_interactive_from_file(
self: &Arc<Self>,
bootstrap_file: &CodexBootstrapFile,
client_id: impl Into<String>,
) -> Result<CodexClientCredential, CredentialError>
pub fn issue_interactive_from_file( self: &Arc<Self>, bootstrap_file: &CodexBootstrapFile, client_id: impl Into<String>, ) -> Result<CodexClientCredential, CredentialError>
Mint the stock TUI credential after authenticating the private bootstrap file. The returned frontend grant still excludes terminate.
pub async fn revoke_frontend_from_file( &self, bootstrap_file: &CodexBootstrapFile, credential: &mut CodexClientCredential, ) -> Result<(), CredentialError>
Sourcepub async fn terminate(
self: &Arc<Self>,
bootstrap: &CodexBootstrapCredential,
) -> Result<(), CredentialError>
pub async fn terminate( self: &Arc<Self>, bootstrap: &CodexBootstrapCredential, ) -> Result<(), CredentialError>
Close the canonical runtime through the operator-only bootstrap path.
Sourcepub async fn bind_websocket(
self: &Arc<Self>,
port: u16,
) -> Result<CodexServerHandle>
pub async fn bind_websocket( self: &Arc<Self>, port: u16, ) -> Result<CodexServerHandle>
Bind only numeric IPv4 loopback. There is no arbitrary-address API.