pub struct CodexAppServerClient { /* private fields */ }Expand description
Async client for the Codex app-server v2 JSON-RPC protocol.
Cheap to Clone; every clone shares the same underlying connection and
pending-request table. Construct one with Self::spawn (launches
codex app-server as a child process, the common case), Self::connect_streams
(bring your own duplex byte stream), or Self::connect_unix (a Unix
socket to an already-running codex app-server daemon).
You must complete the initialize / initialized handshake before calling
any other method - the app-server rejects everything else on a fresh
connection with a "Not initialized" error. See Self::initialize and
Self::send_initialized.
Implementations§
Source§impl CodexAppServerClient
impl CodexAppServerClient
Sourcepub fn spawn(
command: &str,
extra_args: &[String],
) -> Result<(Self, EventStream)>
pub fn spawn( command: &str, extra_args: &[String], ) -> Result<(Self, EventStream)>
Spawns command app-server (default command = "codex") with stdio
piped and connects to it over the stdio JSONL transport.
extra_args are appended after app-server, e.g.
["--enable".into(), "some_feature".into()] or
["-c".into(), r#"model="gpt-5.4""#.into()].
The child process is killed (kill_on_drop) once every clone of the
returned client has been dropped - dropping the last clone always
terminates the child, whether or not it’s currently mid-write. It’s
also reaped promptly and automatically the moment the connection is
otherwise known to be dead: a transport read error, clean EOF (e.g.
the child crashed or exited), or a write that exceeds the internal
stall timeout - none of these require the caller to drop the client or
issue another call first.
Sourcepub fn spawn_with_events_capacity(
command: &str,
extra_args: &[String],
events_capacity: usize,
) -> Result<(Self, EventStream)>
pub fn spawn_with_events_capacity( command: &str, extra_args: &[String], events_capacity: usize, ) -> Result<(Self, EventStream)>
Same as Self::spawn, but with an explicit capacity for the
internal event channel instead of DEFAULT_EVENTS_CHANNEL_CAPACITY.
See EventStream’s doc comment for what this bounds and the drop
policy once it fills up.
§Errors
Returns Error::Io if events_capacity is 0 -
tokio::sync::mpsc::channel panics on a zero capacity, and that
panic’s message doesn’t mention which knob caused it (useful context
this crate has and a bare unwrap deep inside tokio wouldn’t
surface), so it’s rejected here instead with a message that does.
Sourcepub fn connect_streams<R, W>(reader: R, writer: W) -> (Self, EventStream)
pub fn connect_streams<R, W>(reader: R, writer: W) -> (Self, EventStream)
Connects to an already-open duplex stream (e.g. any
AsyncBufRead + AsyncWrite pair) speaking the same NDJSON JSON-RPC
protocol. See also Self::connect_unix for the common case of a
codex app-server daemon’s Unix domain socket.
Sourcepub fn connect_streams_with_events_capacity<R, W>(
reader: R,
writer: W,
events_capacity: usize,
) -> Result<(Self, EventStream)>
pub fn connect_streams_with_events_capacity<R, W>( reader: R, writer: W, events_capacity: usize, ) -> Result<(Self, EventStream)>
Same as Self::connect_streams, but with an explicit capacity for
the internal event channel instead of
DEFAULT_EVENTS_CHANNEL_CAPACITY. See
Self::spawn_with_events_capacity for the zero-capacity error case
(identical here).
Sourcepub async fn connect_unix(path: impl AsRef<Path>) -> Result<(Self, EventStream)>
pub async fn connect_unix(path: impl AsRef<Path>) -> Result<(Self, EventStream)>
Connects to a codex app-server (or codex app-server daemon)
listening on a Unix domain socket (--listen unix://PATH).
Sourcepub async fn connect_unix_with_events_capacity(
path: impl AsRef<Path>,
events_capacity: usize,
) -> Result<(Self, EventStream)>
pub async fn connect_unix_with_events_capacity( path: impl AsRef<Path>, events_capacity: usize, ) -> Result<(Self, EventStream)>
Same as Self::connect_unix, but with an explicit capacity for the
internal event channel instead of DEFAULT_EVENTS_CHANNEL_CAPACITY.
See Self::spawn_with_events_capacity for the zero-capacity error
case (identical here).
Sourcepub fn with_call_timeout(self, timeout: Duration) -> Self
pub fn with_call_timeout(self, timeout: Duration) -> Self
Returns a client that applies timeout to every request/response call
instead of DEFAULT_CALL_TIMEOUT. Cloning preserves the timeout;
mixing timeouts across clones of the same connection is fine (it’s a
per-call setting checked in Self::call_request, not a property of
the shared connection state).
Sourcepub async fn call_raw_method(
&self,
method: impl Into<String>,
params: Value,
) -> Result<Value>
pub async fn call_raw_method( &self, method: impl Into<String>, params: Value, ) -> Result<Value>
Issues one raw JSON-RPC method call and returns its raw result value.
This is the escape hatch for bridges and generated surfaces that need to call app-server methods dynamically. Prefer the typed generated wrappers when the method is known at compile time.
Sourcepub fn send_initialized(&self) -> Result<()>
pub fn send_initialized(&self) -> Result<()>
Sends the initialized notification. Call this exactly once,
immediately after Self::initialize succeeds - the app-server
rejects every other method until it’s received.
Source§impl CodexAppServerClient
impl CodexAppServerClient
Sourcepub async fn initialize(
&self,
params: InitializeParams,
) -> Result<InitializeResponse>
pub async fn initialize( &self, params: InitializeParams, ) -> Result<InitializeResponse>
Calls the initialize app-server method.
Sourcepub async fn thread_start(
&self,
params: ThreadStartParams,
) -> Result<ThreadStartResponse>
pub async fn thread_start( &self, params: ThreadStartParams, ) -> Result<ThreadStartResponse>
Calls the thread/start app-server method.
Sourcepub async fn thread_resume(
&self,
params: ThreadResumeParams,
) -> Result<ThreadResumeResponse>
pub async fn thread_resume( &self, params: ThreadResumeParams, ) -> Result<ThreadResumeResponse>
Calls the thread/resume app-server method.
Sourcepub async fn thread_fork(
&self,
params: ThreadForkParams,
) -> Result<ThreadForkResponse>
pub async fn thread_fork( &self, params: ThreadForkParams, ) -> Result<ThreadForkResponse>
Calls the thread/fork app-server method.
Sourcepub async fn thread_archive(
&self,
params: ThreadArchiveParams,
) -> Result<ThreadArchiveResponse>
pub async fn thread_archive( &self, params: ThreadArchiveParams, ) -> Result<ThreadArchiveResponse>
Calls the thread/archive app-server method.
Sourcepub async fn thread_delete(
&self,
params: ThreadDeleteParams,
) -> Result<ThreadDeleteResponse>
pub async fn thread_delete( &self, params: ThreadDeleteParams, ) -> Result<ThreadDeleteResponse>
Calls the thread/delete app-server method.
Sourcepub async fn thread_unsubscribe(
&self,
params: ThreadUnsubscribeParams,
) -> Result<ThreadUnsubscribeResponse>
pub async fn thread_unsubscribe( &self, params: ThreadUnsubscribeParams, ) -> Result<ThreadUnsubscribeResponse>
Calls the thread/unsubscribe app-server method.
Sourcepub async fn thread_increment_elicitation(
&self,
params: ThreadIncrementElicitationParams,
) -> Result<ThreadIncrementElicitationResponse>
pub async fn thread_increment_elicitation( &self, params: ThreadIncrementElicitationParams, ) -> Result<ThreadIncrementElicitationResponse>
Calls the thread/increment_elicitation app-server method.
Sourcepub async fn thread_decrement_elicitation(
&self,
params: ThreadDecrementElicitationParams,
) -> Result<ThreadDecrementElicitationResponse>
pub async fn thread_decrement_elicitation( &self, params: ThreadDecrementElicitationParams, ) -> Result<ThreadDecrementElicitationResponse>
Calls the thread/decrement_elicitation app-server method.
Sourcepub async fn thread_name_set(
&self,
params: ThreadSetNameParams,
) -> Result<ThreadSetNameResponse>
pub async fn thread_name_set( &self, params: ThreadSetNameParams, ) -> Result<ThreadSetNameResponse>
Calls the thread/name/set app-server method.
Sourcepub async fn thread_goal_set(
&self,
params: ThreadGoalSetParams,
) -> Result<ThreadGoalSetResponse>
pub async fn thread_goal_set( &self, params: ThreadGoalSetParams, ) -> Result<ThreadGoalSetResponse>
Calls the thread/goal/set app-server method.
Sourcepub async fn thread_goal_get(
&self,
params: ThreadGoalGetParams,
) -> Result<ThreadGoalGetResponse>
pub async fn thread_goal_get( &self, params: ThreadGoalGetParams, ) -> Result<ThreadGoalGetResponse>
Calls the thread/goal/get app-server method.
Sourcepub async fn thread_goal_clear(
&self,
params: ThreadGoalClearParams,
) -> Result<ThreadGoalClearResponse>
pub async fn thread_goal_clear( &self, params: ThreadGoalClearParams, ) -> Result<ThreadGoalClearResponse>
Calls the thread/goal/clear app-server method.
Sourcepub async fn thread_metadata_update(
&self,
params: ThreadMetadataUpdateParams,
) -> Result<ThreadMetadataUpdateResponse>
pub async fn thread_metadata_update( &self, params: ThreadMetadataUpdateParams, ) -> Result<ThreadMetadataUpdateResponse>
Calls the thread/metadata/update app-server method.
Sourcepub async fn thread_settings_update(
&self,
params: ThreadSettingsUpdateParams,
) -> Result<ThreadSettingsUpdateResponse>
pub async fn thread_settings_update( &self, params: ThreadSettingsUpdateParams, ) -> Result<ThreadSettingsUpdateResponse>
Calls the thread/settings/update app-server method.
Sourcepub async fn thread_memory_mode_set(
&self,
params: ThreadMemoryModeSetParams,
) -> Result<ThreadMemoryModeSetResponse>
pub async fn thread_memory_mode_set( &self, params: ThreadMemoryModeSetParams, ) -> Result<ThreadMemoryModeSetResponse>
Calls the thread/memoryMode/set app-server method.
Sourcepub async fn memory_reset(&self) -> Result<MemoryResetResponse>
pub async fn memory_reset(&self) -> Result<MemoryResetResponse>
Calls the memory/reset app-server method.
Sourcepub async fn thread_unarchive(
&self,
params: ThreadUnarchiveParams,
) -> Result<ThreadUnarchiveResponse>
pub async fn thread_unarchive( &self, params: ThreadUnarchiveParams, ) -> Result<ThreadUnarchiveResponse>
Calls the thread/unarchive app-server method.
Sourcepub async fn thread_compact_start(
&self,
params: ThreadCompactStartParams,
) -> Result<ThreadCompactStartResponse>
pub async fn thread_compact_start( &self, params: ThreadCompactStartParams, ) -> Result<ThreadCompactStartResponse>
Calls the thread/compact/start app-server method.
Sourcepub async fn thread_shell_command(
&self,
params: ThreadShellCommandParams,
) -> Result<ThreadShellCommandResponse>
pub async fn thread_shell_command( &self, params: ThreadShellCommandParams, ) -> Result<ThreadShellCommandResponse>
Calls the thread/shellCommand app-server method.
Sourcepub async fn thread_approve_guardian_denied_action(
&self,
params: ThreadApproveGuardianDeniedActionParams,
) -> Result<ThreadApproveGuardianDeniedActionResponse>
pub async fn thread_approve_guardian_denied_action( &self, params: ThreadApproveGuardianDeniedActionParams, ) -> Result<ThreadApproveGuardianDeniedActionResponse>
Calls the thread/approveGuardianDeniedAction app-server method.
Sourcepub async fn thread_background_terminals_clean(
&self,
params: ThreadBackgroundTerminalsCleanParams,
) -> Result<ThreadBackgroundTerminalsCleanResponse>
pub async fn thread_background_terminals_clean( &self, params: ThreadBackgroundTerminalsCleanParams, ) -> Result<ThreadBackgroundTerminalsCleanResponse>
Calls the thread/backgroundTerminals/clean app-server method.
Sourcepub async fn thread_background_terminals_list(
&self,
params: ThreadBackgroundTerminalsListParams,
) -> Result<ThreadBackgroundTerminalsListResponse>
pub async fn thread_background_terminals_list( &self, params: ThreadBackgroundTerminalsListParams, ) -> Result<ThreadBackgroundTerminalsListResponse>
Calls the thread/backgroundTerminals/list app-server method.
Sourcepub async fn thread_background_terminals_terminate(
&self,
params: ThreadBackgroundTerminalsTerminateParams,
) -> Result<ThreadBackgroundTerminalsTerminateResponse>
pub async fn thread_background_terminals_terminate( &self, params: ThreadBackgroundTerminalsTerminateParams, ) -> Result<ThreadBackgroundTerminalsTerminateResponse>
Calls the thread/backgroundTerminals/terminate app-server method.
Sourcepub async fn thread_rollback(
&self,
params: ThreadRollbackParams,
) -> Result<ThreadRollbackResponse>
pub async fn thread_rollback( &self, params: ThreadRollbackParams, ) -> Result<ThreadRollbackResponse>
Calls the thread/rollback app-server method.
Sourcepub async fn thread_list(
&self,
params: ThreadListParams,
) -> Result<ThreadListResponse>
pub async fn thread_list( &self, params: ThreadListParams, ) -> Result<ThreadListResponse>
Calls the thread/list app-server method.
Sourcepub async fn thread_search(
&self,
params: ThreadSearchParams,
) -> Result<ThreadSearchResponse>
pub async fn thread_search( &self, params: ThreadSearchParams, ) -> Result<ThreadSearchResponse>
Calls the thread/search app-server method.
Sourcepub async fn thread_loaded_list(
&self,
params: ThreadLoadedListParams,
) -> Result<ThreadLoadedListResponse>
pub async fn thread_loaded_list( &self, params: ThreadLoadedListParams, ) -> Result<ThreadLoadedListResponse>
Calls the thread/loaded/list app-server method.
Sourcepub async fn thread_read(
&self,
params: ThreadReadParams,
) -> Result<ThreadReadResponse>
pub async fn thread_read( &self, params: ThreadReadParams, ) -> Result<ThreadReadResponse>
Calls the thread/read app-server method.
Sourcepub async fn thread_turns_list(
&self,
params: ThreadTurnsListParams,
) -> Result<ThreadTurnsListResponse>
pub async fn thread_turns_list( &self, params: ThreadTurnsListParams, ) -> Result<ThreadTurnsListResponse>
Calls the thread/turns/list app-server method.
Sourcepub async fn thread_items_list(
&self,
params: ThreadItemsListParams,
) -> Result<ThreadItemsListResponse>
pub async fn thread_items_list( &self, params: ThreadItemsListParams, ) -> Result<ThreadItemsListResponse>
Calls the thread/items/list app-server method.
Sourcepub async fn thread_inject_items(
&self,
params: ThreadInjectItemsParams,
) -> Result<ThreadInjectItemsResponse>
pub async fn thread_inject_items( &self, params: ThreadInjectItemsParams, ) -> Result<ThreadInjectItemsResponse>
Calls the thread/inject_items app-server method.
Sourcepub async fn skills_list(
&self,
params: SkillsListParams,
) -> Result<SkillsListResponse>
pub async fn skills_list( &self, params: SkillsListParams, ) -> Result<SkillsListResponse>
Calls the skills/list app-server method.
Sourcepub async fn skills_extra_roots_set(
&self,
params: SkillsExtraRootsSetParams,
) -> Result<SkillsExtraRootsSetResponse>
pub async fn skills_extra_roots_set( &self, params: SkillsExtraRootsSetParams, ) -> Result<SkillsExtraRootsSetResponse>
Calls the skills/extraRoots/set app-server method.
Sourcepub async fn hooks_list(
&self,
params: HooksListParams,
) -> Result<HooksListResponse>
pub async fn hooks_list( &self, params: HooksListParams, ) -> Result<HooksListResponse>
Calls the hooks/list app-server method.
Sourcepub async fn marketplace_add(
&self,
params: MarketplaceAddParams,
) -> Result<MarketplaceAddResponse>
pub async fn marketplace_add( &self, params: MarketplaceAddParams, ) -> Result<MarketplaceAddResponse>
Calls the marketplace/add app-server method.
Sourcepub async fn marketplace_remove(
&self,
params: MarketplaceRemoveParams,
) -> Result<MarketplaceRemoveResponse>
pub async fn marketplace_remove( &self, params: MarketplaceRemoveParams, ) -> Result<MarketplaceRemoveResponse>
Calls the marketplace/remove app-server method.
Sourcepub async fn marketplace_upgrade(
&self,
params: MarketplaceUpgradeParams,
) -> Result<MarketplaceUpgradeResponse>
pub async fn marketplace_upgrade( &self, params: MarketplaceUpgradeParams, ) -> Result<MarketplaceUpgradeResponse>
Calls the marketplace/upgrade app-server method.
Sourcepub async fn plugin_list(
&self,
params: PluginListParams,
) -> Result<PluginListResponse>
pub async fn plugin_list( &self, params: PluginListParams, ) -> Result<PluginListResponse>
Calls the plugin/list app-server method.
Sourcepub async fn plugin_installed(
&self,
params: PluginInstalledParams,
) -> Result<PluginInstalledResponse>
pub async fn plugin_installed( &self, params: PluginInstalledParams, ) -> Result<PluginInstalledResponse>
Calls the plugin/installed app-server method.
Sourcepub async fn plugin_read(
&self,
params: PluginReadParams,
) -> Result<PluginReadResponse>
pub async fn plugin_read( &self, params: PluginReadParams, ) -> Result<PluginReadResponse>
Calls the plugin/read app-server method.
Sourcepub async fn plugin_skill_read(
&self,
params: PluginSkillReadParams,
) -> Result<PluginSkillReadResponse>
pub async fn plugin_skill_read( &self, params: PluginSkillReadParams, ) -> Result<PluginSkillReadResponse>
Calls the plugin/skill/read app-server method.
Calls the plugin/share/save app-server method.
Calls the plugin/share/updateTargets app-server method.
Calls the plugin/share/list app-server method.
Calls the plugin/share/checkout app-server method.
Calls the plugin/share/delete app-server method.
Sourcepub async fn app_list(&self, params: AppsListParams) -> Result<AppsListResponse>
pub async fn app_list(&self, params: AppsListParams) -> Result<AppsListResponse>
Calls the app/list app-server method.
Sourcepub async fn fs_read_file(
&self,
params: FsReadFileParams,
) -> Result<FsReadFileResponse>
pub async fn fs_read_file( &self, params: FsReadFileParams, ) -> Result<FsReadFileResponse>
Calls the fs/readFile app-server method.
Sourcepub async fn fs_write_file(
&self,
params: FsWriteFileParams,
) -> Result<FsWriteFileResponse>
pub async fn fs_write_file( &self, params: FsWriteFileParams, ) -> Result<FsWriteFileResponse>
Calls the fs/writeFile app-server method.
Sourcepub async fn fs_create_directory(
&self,
params: FsCreateDirectoryParams,
) -> Result<FsCreateDirectoryResponse>
pub async fn fs_create_directory( &self, params: FsCreateDirectoryParams, ) -> Result<FsCreateDirectoryResponse>
Calls the fs/createDirectory app-server method.
Sourcepub async fn fs_get_metadata(
&self,
params: FsGetMetadataParams,
) -> Result<FsGetMetadataResponse>
pub async fn fs_get_metadata( &self, params: FsGetMetadataParams, ) -> Result<FsGetMetadataResponse>
Calls the fs/getMetadata app-server method.
Sourcepub async fn fs_read_directory(
&self,
params: FsReadDirectoryParams,
) -> Result<FsReadDirectoryResponse>
pub async fn fs_read_directory( &self, params: FsReadDirectoryParams, ) -> Result<FsReadDirectoryResponse>
Calls the fs/readDirectory app-server method.
Sourcepub async fn fs_remove(
&self,
params: FsRemoveParams,
) -> Result<FsRemoveResponse>
pub async fn fs_remove( &self, params: FsRemoveParams, ) -> Result<FsRemoveResponse>
Calls the fs/remove app-server method.
Sourcepub async fn fs_copy(&self, params: FsCopyParams) -> Result<FsCopyResponse>
pub async fn fs_copy(&self, params: FsCopyParams) -> Result<FsCopyResponse>
Calls the fs/copy app-server method.
Sourcepub async fn fs_watch(&self, params: FsWatchParams) -> Result<FsWatchResponse>
pub async fn fs_watch(&self, params: FsWatchParams) -> Result<FsWatchResponse>
Calls the fs/watch app-server method.
Sourcepub async fn fs_unwatch(
&self,
params: FsUnwatchParams,
) -> Result<FsUnwatchResponse>
pub async fn fs_unwatch( &self, params: FsUnwatchParams, ) -> Result<FsUnwatchResponse>
Calls the fs/unwatch app-server method.
Sourcepub async fn skills_config_write(
&self,
params: SkillsConfigWriteParams,
) -> Result<SkillsConfigWriteResponse>
pub async fn skills_config_write( &self, params: SkillsConfigWriteParams, ) -> Result<SkillsConfigWriteResponse>
Calls the skills/config/write app-server method.
Sourcepub async fn plugin_install(
&self,
params: PluginInstallParams,
) -> Result<PluginInstallResponse>
pub async fn plugin_install( &self, params: PluginInstallParams, ) -> Result<PluginInstallResponse>
Calls the plugin/install app-server method.
Sourcepub async fn plugin_uninstall(
&self,
params: PluginUninstallParams,
) -> Result<PluginUninstallResponse>
pub async fn plugin_uninstall( &self, params: PluginUninstallParams, ) -> Result<PluginUninstallResponse>
Calls the plugin/uninstall app-server method.
Sourcepub async fn turn_start(
&self,
params: TurnStartParams,
) -> Result<TurnStartResponse>
pub async fn turn_start( &self, params: TurnStartParams, ) -> Result<TurnStartResponse>
Calls the turn/start app-server method.
Sourcepub async fn turn_steer(
&self,
params: TurnSteerParams,
) -> Result<TurnSteerResponse>
pub async fn turn_steer( &self, params: TurnSteerParams, ) -> Result<TurnSteerResponse>
Calls the turn/steer app-server method.
Sourcepub async fn turn_interrupt(
&self,
params: TurnInterruptParams,
) -> Result<TurnInterruptResponse>
pub async fn turn_interrupt( &self, params: TurnInterruptParams, ) -> Result<TurnInterruptResponse>
Calls the turn/interrupt app-server method.
Sourcepub async fn thread_realtime_start(
&self,
params: ThreadRealtimeStartParams,
) -> Result<ThreadRealtimeStartResponse>
pub async fn thread_realtime_start( &self, params: ThreadRealtimeStartParams, ) -> Result<ThreadRealtimeStartResponse>
Calls the thread/realtime/start app-server method.
Sourcepub async fn thread_realtime_append_audio(
&self,
params: ThreadRealtimeAppendAudioParams,
) -> Result<ThreadRealtimeAppendAudioResponse>
pub async fn thread_realtime_append_audio( &self, params: ThreadRealtimeAppendAudioParams, ) -> Result<ThreadRealtimeAppendAudioResponse>
Calls the thread/realtime/appendAudio app-server method.
Sourcepub async fn thread_realtime_append_text(
&self,
params: ThreadRealtimeAppendTextParams,
) -> Result<ThreadRealtimeAppendTextResponse>
pub async fn thread_realtime_append_text( &self, params: ThreadRealtimeAppendTextParams, ) -> Result<ThreadRealtimeAppendTextResponse>
Calls the thread/realtime/appendText app-server method.
Sourcepub async fn thread_realtime_append_speech(
&self,
params: ThreadRealtimeAppendSpeechParams,
) -> Result<ThreadRealtimeAppendSpeechResponse>
pub async fn thread_realtime_append_speech( &self, params: ThreadRealtimeAppendSpeechParams, ) -> Result<ThreadRealtimeAppendSpeechResponse>
Calls the thread/realtime/appendSpeech app-server method.
Sourcepub async fn thread_realtime_stop(
&self,
params: ThreadRealtimeStopParams,
) -> Result<ThreadRealtimeStopResponse>
pub async fn thread_realtime_stop( &self, params: ThreadRealtimeStopParams, ) -> Result<ThreadRealtimeStopResponse>
Calls the thread/realtime/stop app-server method.
Sourcepub async fn thread_realtime_list_voices(
&self,
params: ThreadRealtimeListVoicesParams,
) -> Result<ThreadRealtimeListVoicesResponse>
pub async fn thread_realtime_list_voices( &self, params: ThreadRealtimeListVoicesParams, ) -> Result<ThreadRealtimeListVoicesResponse>
Calls the thread/realtime/listVoices app-server method.
Sourcepub async fn review_start(
&self,
params: ReviewStartParams,
) -> Result<ReviewStartResponse>
pub async fn review_start( &self, params: ReviewStartParams, ) -> Result<ReviewStartResponse>
Calls the review/start app-server method.
Sourcepub async fn model_list(
&self,
params: ModelListParams,
) -> Result<ModelListResponse>
pub async fn model_list( &self, params: ModelListParams, ) -> Result<ModelListResponse>
Calls the model/list app-server method.
Sourcepub async fn model_provider_capabilities_read(
&self,
params: ModelProviderCapabilitiesReadParams,
) -> Result<ModelProviderCapabilitiesReadResponse>
pub async fn model_provider_capabilities_read( &self, params: ModelProviderCapabilitiesReadParams, ) -> Result<ModelProviderCapabilitiesReadResponse>
Calls the modelProvider/capabilities/read app-server method.
Sourcepub async fn experimental_feature_list(
&self,
params: ExperimentalFeatureListParams,
) -> Result<ExperimentalFeatureListResponse>
pub async fn experimental_feature_list( &self, params: ExperimentalFeatureListParams, ) -> Result<ExperimentalFeatureListResponse>
Calls the experimentalFeature/list app-server method.
Sourcepub async fn permission_profile_list(
&self,
params: PermissionProfileListParams,
) -> Result<PermissionProfileListResponse>
pub async fn permission_profile_list( &self, params: PermissionProfileListParams, ) -> Result<PermissionProfileListResponse>
Calls the permissionProfile/list app-server method.
Sourcepub async fn experimental_feature_enablement_set(
&self,
params: ExperimentalFeatureEnablementSetParams,
) -> Result<ExperimentalFeatureEnablementSetResponse>
pub async fn experimental_feature_enablement_set( &self, params: ExperimentalFeatureEnablementSetParams, ) -> Result<ExperimentalFeatureEnablementSetResponse>
Calls the experimentalFeature/enablement/set app-server method.
Sourcepub async fn remote_control_enable(
&self,
params: Option<RemoteControlEnableParams>,
) -> Result<RemoteControlEnableResponse>
pub async fn remote_control_enable( &self, params: Option<RemoteControlEnableParams>, ) -> Result<RemoteControlEnableResponse>
Calls the remoteControl/enable app-server method.
Sourcepub async fn remote_control_disable(
&self,
params: Option<RemoteControlDisableParams>,
) -> Result<RemoteControlDisableResponse>
pub async fn remote_control_disable( &self, params: Option<RemoteControlDisableParams>, ) -> Result<RemoteControlDisableResponse>
Calls the remoteControl/disable app-server method.
Sourcepub async fn remote_control_status_read(
&self,
) -> Result<RemoteControlStatusReadResponse>
pub async fn remote_control_status_read( &self, ) -> Result<RemoteControlStatusReadResponse>
Calls the remoteControl/status/read app-server method.
Sourcepub async fn remote_control_pairing_start(
&self,
params: RemoteControlPairingStartParams,
) -> Result<RemoteControlPairingStartResponse>
pub async fn remote_control_pairing_start( &self, params: RemoteControlPairingStartParams, ) -> Result<RemoteControlPairingStartResponse>
Calls the remoteControl/pairing/start app-server method.
Sourcepub async fn remote_control_pairing_status(
&self,
params: RemoteControlPairingStatusParams,
) -> Result<RemoteControlPairingStatusResponse>
pub async fn remote_control_pairing_status( &self, params: RemoteControlPairingStatusParams, ) -> Result<RemoteControlPairingStatusResponse>
Calls the remoteControl/pairing/status app-server method.
Sourcepub async fn remote_control_client_list(
&self,
params: RemoteControlClientsListParams,
) -> Result<RemoteControlClientsListResponse>
pub async fn remote_control_client_list( &self, params: RemoteControlClientsListParams, ) -> Result<RemoteControlClientsListResponse>
Calls the remoteControl/client/list app-server method.
Sourcepub async fn remote_control_client_revoke(
&self,
params: RemoteControlClientsRevokeParams,
) -> Result<RemoteControlClientsRevokeResponse>
pub async fn remote_control_client_revoke( &self, params: RemoteControlClientsRevokeParams, ) -> Result<RemoteControlClientsRevokeResponse>
Calls the remoteControl/client/revoke app-server method.
Sourcepub async fn collaboration_mode_list(
&self,
params: CollaborationModeListParams,
) -> Result<CollaborationModeListResponse>
pub async fn collaboration_mode_list( &self, params: CollaborationModeListParams, ) -> Result<CollaborationModeListResponse>
Calls the collaborationMode/list app-server method.
Sourcepub async fn mock_experimental_method(
&self,
params: MockExperimentalMethodParams,
) -> Result<MockExperimentalMethodResponse>
pub async fn mock_experimental_method( &self, params: MockExperimentalMethodParams, ) -> Result<MockExperimentalMethodResponse>
Calls the mock/experimentalMethod app-server method.
Sourcepub async fn environment_add(
&self,
params: EnvironmentAddParams,
) -> Result<EnvironmentAddResponse>
pub async fn environment_add( &self, params: EnvironmentAddParams, ) -> Result<EnvironmentAddResponse>
Calls the environment/add app-server method.
Sourcepub async fn environment_info(
&self,
params: EnvironmentInfoParams,
) -> Result<EnvironmentInfoResponse>
pub async fn environment_info( &self, params: EnvironmentInfoParams, ) -> Result<EnvironmentInfoResponse>
Calls the environment/info app-server method.
Sourcepub async fn mcp_server_oauth_login(
&self,
params: McpServerOauthLoginParams,
) -> Result<McpServerOauthLoginResponse>
pub async fn mcp_server_oauth_login( &self, params: McpServerOauthLoginParams, ) -> Result<McpServerOauthLoginResponse>
Calls the mcpServer/oauth/login app-server method.
Sourcepub async fn config_mcp_server_reload(&self) -> Result<()>
pub async fn config_mcp_server_reload(&self) -> Result<()>
Calls the config/mcpServer/reload app-server method.
Sourcepub async fn mcp_server_status_list(
&self,
params: ListMcpServerStatusParams,
) -> Result<ListMcpServerStatusResponse>
pub async fn mcp_server_status_list( &self, params: ListMcpServerStatusParams, ) -> Result<ListMcpServerStatusResponse>
Calls the mcpServerStatus/list app-server method.
Sourcepub async fn mcp_server_resource_read(
&self,
params: McpResourceReadParams,
) -> Result<McpResourceReadResponse>
pub async fn mcp_server_resource_read( &self, params: McpResourceReadParams, ) -> Result<McpResourceReadResponse>
Calls the mcpServer/resource/read app-server method.
Sourcepub async fn mcp_server_tool_call(
&self,
params: McpServerToolCallParams,
) -> Result<McpServerToolCallResponse>
pub async fn mcp_server_tool_call( &self, params: McpServerToolCallParams, ) -> Result<McpServerToolCallResponse>
Calls the mcpServer/tool/call app-server method.
Sourcepub async fn windows_sandbox_setup_start(
&self,
params: WindowsSandboxSetupStartParams,
) -> Result<WindowsSandboxSetupStartResponse>
pub async fn windows_sandbox_setup_start( &self, params: WindowsSandboxSetupStartParams, ) -> Result<WindowsSandboxSetupStartResponse>
Calls the windowsSandbox/setupStart app-server method.
Sourcepub async fn windows_sandbox_readiness(
&self,
) -> Result<WindowsSandboxReadinessResponse>
pub async fn windows_sandbox_readiness( &self, ) -> Result<WindowsSandboxReadinessResponse>
Calls the windowsSandbox/readiness app-server method.
Sourcepub async fn account_login_start(
&self,
params: LoginAccountParams,
) -> Result<LoginAccountResponse>
pub async fn account_login_start( &self, params: LoginAccountParams, ) -> Result<LoginAccountResponse>
Calls the account/login/start app-server method.
Sourcepub async fn account_login_cancel(
&self,
params: CancelLoginAccountParams,
) -> Result<CancelLoginAccountResponse>
pub async fn account_login_cancel( &self, params: CancelLoginAccountParams, ) -> Result<CancelLoginAccountResponse>
Calls the account/login/cancel app-server method.
Sourcepub async fn account_logout(&self) -> Result<LogoutAccountResponse>
pub async fn account_logout(&self) -> Result<LogoutAccountResponse>
Calls the account/logout app-server method.
Sourcepub async fn account_rate_limits_read(
&self,
) -> Result<GetAccountRateLimitsResponse>
pub async fn account_rate_limits_read( &self, ) -> Result<GetAccountRateLimitsResponse>
Calls the account/rateLimits/read app-server method.
Sourcepub async fn account_rate_limit_reset_credit_consume(
&self,
params: ConsumeAccountRateLimitResetCreditParams,
) -> Result<ConsumeAccountRateLimitResetCreditResponse>
pub async fn account_rate_limit_reset_credit_consume( &self, params: ConsumeAccountRateLimitResetCreditParams, ) -> Result<ConsumeAccountRateLimitResetCreditResponse>
Calls the account/rateLimitResetCredit/consume app-server method.
Sourcepub async fn account_usage_read(&self) -> Result<GetAccountTokenUsageResponse>
pub async fn account_usage_read(&self) -> Result<GetAccountTokenUsageResponse>
Calls the account/usage/read app-server method.
Sourcepub async fn account_workspace_messages_read(
&self,
) -> Result<GetWorkspaceMessagesResponse>
pub async fn account_workspace_messages_read( &self, ) -> Result<GetWorkspaceMessagesResponse>
Calls the account/workspaceMessages/read app-server method.
Sourcepub async fn account_send_add_credits_nudge_email(
&self,
params: SendAddCreditsNudgeEmailParams,
) -> Result<SendAddCreditsNudgeEmailResponse>
pub async fn account_send_add_credits_nudge_email( &self, params: SendAddCreditsNudgeEmailParams, ) -> Result<SendAddCreditsNudgeEmailResponse>
Calls the account/sendAddCreditsNudgeEmail app-server method.
Sourcepub async fn feedback_upload(
&self,
params: FeedbackUploadParams,
) -> Result<FeedbackUploadResponse>
pub async fn feedback_upload( &self, params: FeedbackUploadParams, ) -> Result<FeedbackUploadResponse>
Calls the feedback/upload app-server method.
Sourcepub async fn command_exec(
&self,
params: CommandExecParams,
) -> Result<CommandExecResponse>
pub async fn command_exec( &self, params: CommandExecParams, ) -> Result<CommandExecResponse>
Calls the command/exec app-server method.
Sourcepub async fn command_exec_write(
&self,
params: CommandExecWriteParams,
) -> Result<CommandExecWriteResponse>
pub async fn command_exec_write( &self, params: CommandExecWriteParams, ) -> Result<CommandExecWriteResponse>
Calls the command/exec/write app-server method.
Sourcepub async fn command_exec_terminate(
&self,
params: CommandExecTerminateParams,
) -> Result<CommandExecTerminateResponse>
pub async fn command_exec_terminate( &self, params: CommandExecTerminateParams, ) -> Result<CommandExecTerminateResponse>
Calls the command/exec/terminate app-server method.
Sourcepub async fn command_exec_resize(
&self,
params: CommandExecResizeParams,
) -> Result<CommandExecResizeResponse>
pub async fn command_exec_resize( &self, params: CommandExecResizeParams, ) -> Result<CommandExecResizeResponse>
Calls the command/exec/resize app-server method.
Sourcepub async fn process_spawn(
&self,
params: ProcessSpawnParams,
) -> Result<ProcessSpawnResponse>
pub async fn process_spawn( &self, params: ProcessSpawnParams, ) -> Result<ProcessSpawnResponse>
Calls the process/spawn app-server method.
Sourcepub async fn process_write_stdin(
&self,
params: ProcessWriteStdinParams,
) -> Result<ProcessWriteStdinResponse>
pub async fn process_write_stdin( &self, params: ProcessWriteStdinParams, ) -> Result<ProcessWriteStdinResponse>
Calls the process/writeStdin app-server method.
Sourcepub async fn process_kill(
&self,
params: ProcessKillParams,
) -> Result<ProcessKillResponse>
pub async fn process_kill( &self, params: ProcessKillParams, ) -> Result<ProcessKillResponse>
Calls the process/kill app-server method.
Sourcepub async fn process_resize_pty(
&self,
params: ProcessResizePtyParams,
) -> Result<ProcessResizePtyResponse>
pub async fn process_resize_pty( &self, params: ProcessResizePtyParams, ) -> Result<ProcessResizePtyResponse>
Calls the process/resizePty app-server method.
Sourcepub async fn config_read(
&self,
params: ConfigReadParams,
) -> Result<ConfigReadResponse>
pub async fn config_read( &self, params: ConfigReadParams, ) -> Result<ConfigReadResponse>
Calls the config/read app-server method.
Sourcepub async fn external_agent_config_detect(
&self,
params: ExternalAgentConfigDetectParams,
) -> Result<ExternalAgentConfigDetectResponse>
pub async fn external_agent_config_detect( &self, params: ExternalAgentConfigDetectParams, ) -> Result<ExternalAgentConfigDetectResponse>
Calls the externalAgentConfig/detect app-server method.
Sourcepub async fn external_agent_config_import(
&self,
params: ExternalAgentConfigImportParams,
) -> Result<ExternalAgentConfigImportResponse>
pub async fn external_agent_config_import( &self, params: ExternalAgentConfigImportParams, ) -> Result<ExternalAgentConfigImportResponse>
Calls the externalAgentConfig/import app-server method.
Sourcepub async fn external_agent_config_import_read_histories(
&self,
) -> Result<ExternalAgentConfigImportHistoriesReadResponse>
pub async fn external_agent_config_import_read_histories( &self, ) -> Result<ExternalAgentConfigImportHistoriesReadResponse>
Calls the externalAgentConfig/import/readHistories app-server method.
Sourcepub async fn config_value_write(
&self,
params: ConfigValueWriteParams,
) -> Result<ConfigWriteResponse>
pub async fn config_value_write( &self, params: ConfigValueWriteParams, ) -> Result<ConfigWriteResponse>
Calls the config/value/write app-server method.
Sourcepub async fn config_batch_write(
&self,
params: ConfigBatchWriteParams,
) -> Result<ConfigWriteResponse>
pub async fn config_batch_write( &self, params: ConfigBatchWriteParams, ) -> Result<ConfigWriteResponse>
Calls the config/batchWrite app-server method.
Sourcepub async fn config_requirements_read(
&self,
) -> Result<ConfigRequirementsReadResponse>
pub async fn config_requirements_read( &self, ) -> Result<ConfigRequirementsReadResponse>
Calls the configRequirements/read app-server method.
Sourcepub async fn account_read(
&self,
params: GetAccountParams,
) -> Result<GetAccountResponse>
pub async fn account_read( &self, params: GetAccountParams, ) -> Result<GetAccountResponse>
Calls the account/read app-server method.
Sourcepub async fn fuzzy_file_search(
&self,
params: FuzzyFileSearchParams,
) -> Result<FuzzyFileSearchResponse>
pub async fn fuzzy_file_search( &self, params: FuzzyFileSearchParams, ) -> Result<FuzzyFileSearchResponse>
Calls the fuzzyFileSearch app-server method.
Sourcepub async fn fuzzy_file_search_session_start(
&self,
params: FuzzyFileSearchSessionStartParams,
) -> Result<FuzzyFileSearchSessionStartResponse>
pub async fn fuzzy_file_search_session_start( &self, params: FuzzyFileSearchSessionStartParams, ) -> Result<FuzzyFileSearchSessionStartResponse>
Calls the fuzzyFileSearch/sessionStart app-server method.
Sourcepub async fn fuzzy_file_search_session_update(
&self,
params: FuzzyFileSearchSessionUpdateParams,
) -> Result<FuzzyFileSearchSessionUpdateResponse>
pub async fn fuzzy_file_search_session_update( &self, params: FuzzyFileSearchSessionUpdateParams, ) -> Result<FuzzyFileSearchSessionUpdateResponse>
Calls the fuzzyFileSearch/sessionUpdate app-server method.
Sourcepub async fn fuzzy_file_search_session_stop(
&self,
params: FuzzyFileSearchSessionStopParams,
) -> Result<FuzzyFileSearchSessionStopResponse>
pub async fn fuzzy_file_search_session_stop( &self, params: FuzzyFileSearchSessionStopParams, ) -> Result<FuzzyFileSearchSessionStopResponse>
Calls the fuzzyFileSearch/sessionStop app-server method.
Trait Implementations§
Source§impl Clone for CodexAppServerClient
impl Clone for CodexAppServerClient
Source§fn clone(&self) -> CodexAppServerClient
fn clone(&self) -> CodexAppServerClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more