Codex SDK, with some useful tools for building AI applications.
Dependencies
pnpm install -g @openai/codex@0.128.0///|
#skip
async test {
let codex = @codex.Codex::new()
let thread = codex.start_thread()
let turn = thread.run("Hello, what model are you using?")
// I’m `GPT-5.2`, running inside the Codex CLI harness in your repo (`/Users/../codex-sdk`).
println(turn.final_response)
println(turn.items.to_json().stringify())
println(turn.usage.to_json().stringify())
}///|
#skip
async test {
let codex = @codex.Codex::new(
options=@codex.CodexOptions::new(base_url="https://openrouter.ai/api/v1"),
)
let thread = codex.start_thread(
options=@codex.ThreadOptions::new(model="anthropic/claude-sonnet-4.5"),
)
let turn = thread.run("Hello?")
println(turn.final_response)
println(turn.items.to_json().stringify())
println(turn.usage.to_json().stringify())
}///|
#skip
async test {
let codex = @codex.Codex::new(
options=@codex.CodexOptions::new(base_url="https://openrouter.ai/api/v1"),
)
let thread = codex.start_thread(
options=@codex.ThreadOptions::new(model="anthropic/claude-sonnet-4.5"),
)
@async.with_task_group(tg => {
let streamed_turn = thread.run_streamed("Hello?", tg)
while streamed_turn.events.next() is Some(event) {
println(event.to_json().stringify())
}
}) catch {
e => println(e)
}
}///|
#skip
async test {
let codex = @codex.Codex::new()
let thread = codex.start_thread()
@async.with_task_group(tg => {
let turn = thread.run_streamed("Summarize today's commits", tg)
while turn.events.next() is Some(event) {
match event {
ItemStarted(item) => println("started: \{item.to_json().stringify()}")
ItemCompleted(AgentMessageItem(text~, ..)) =>
println("assistant: \{text}")
TurnCompleted(usage) =>
println("tokens in/out: \{usage.input_tokens}/\{usage.output_tokens}")
TurnFailed(error) => fail("codex turn failed: \{error.message}")
_ => ()
}
}
})
}///|
#skip
async test {
let codex = @codex.Codex::new()
let thread = codex.start_thread()
let turn = thread.run(
"Plan the next refactor as JSON",
turn_options=@codex.TurnOptions::new(output_schema={
"type": "object",
"properties": {
"summary": { "type": "string" },
"files_to_touch": { "type": "array", "items": { "type": "string" } },
},
"required": ["summary", "files_to_touch"],
"additionalProperties": false, // required to be supplied as valid schema
}),
)
println(turn.final_response)
let plan_json = @json.parse(turn.final_response)
println(plan_json.stringify(indent=2))
}///|
#skip
async test {
@codex.Codex::new().with_app_server_session(async fn(session) {
let _ = session.plugin_list(@codex.AppPluginListParams::{
cwds: None,
marketplace_kinds: None,
})
let thread = session.start_thread()
let review_thread = session.start_thread()
let turn_input = [@codex.AppUserInput::AppInputText(text="hello")]
let turn = thread.run_streamed(turn_input, request_handler=fn(request) {
match request.details {
@codex.AppServerRequestDetails::AppCommandExecutionApprovalRequest(_) =>
@codex.AppServerResponse::AppCommandExecutionApprovalResponse(
decision=@codex.AppCommandExecutionApprovalDecision::AppCommandDecline,
)
@codex.AppServerRequestDetails::AppFileChangeApprovalRequest(_) =>
@codex.AppServerResponse::AppFileChangeApprovalResponse(
decision=@codex.AppFileChangeApprovalDecision::AppFileChangeDecline,
)
@codex.AppServerRequestDetails::AppToolRequestUserInputRequest(_) =>
@codex.AppServerResponse::AppToolRequestUserInputResponse(answers={})
@codex.AppServerRequestDetails::AppDynamicToolCallRequest(_) =>
@codex.AppServerResponse::AppDynamicToolCallResponse(
content_items=[
@codex.AppDynamicToolCallOutputContentItem::AppDynamicToolCallOutputText(
text="declined",
),
],
success=false,
)
@codex.AppServerRequestDetails::AppPermissionsRequestApprovalRequest(_) =>
@codex.AppServerResponse::AppPermissionsRequestApprovalResponse(
permissions=@codex.AppGrantedPermissionProfile::{
network: None,
file_system: None,
},
scope=@codex.AppPermissionGrantScope::AppPermissionGrantTurn,
strict_auto_review=None,
)
@codex.AppServerRequestDetails::AppChatgptAuthTokensRefreshRequest(_) =>
@codex.AppServerResponse::AppChatgptAuthTokensRefreshResponse(
access_token="",
chatgpt_account_id="",
chatgpt_plan_type=None,
)
@codex.AppServerRequestDetails::AppAttestationGenerateRequest(_) =>
@codex.AppServerResponse::AppAttestationGenerateResponse(token="")
@codex.AppServerRequestDetails::AppMcpServerElicitationRequest(_) =>
@codex.AppServerResponse::AppMcpServerElicitationResponse(
action=@codex.AppMcpServerElicitationAction::AppMcpElicitationDecline,
content=None,
meta=None,
)
}
})
let review_turn = review_thread.run_streamed([
@codex.AppUserInput::AppInputText(text="review this"),
])
while turn.next() is Some(event) {
match event.thread_event() {
Some(@codex.Event::ItemStarted(item)) =>
println(item.to_json().stringify())
_ => ()
}
}
review_turn.close()
while session.next_global_event() is Some(event) {
ignore(event)
}
})
}///|
#skip
async test {
@codex.Codex::new().with_app_server(async fn(connection) {
while connection.next_event() is Some(event) {
ignore(event)
}
})
}pub enum AppAccount {
AppAccountApiKey
AppAccountChatGPT(String, AppPlanType)
AppAccountAmazonBedrock
} derive(Debug)impl FromJson for AppAccountpub enum AppAccountLoginStartResponse {
AppAccountLoginApiKey
AppAccountLoginChatGPT(String, String)
AppAccountLoginChatGPTDeviceCode(String, String, String)
AppAccountLoginChatGPTAuthTokens
} derive(Debug)impl FromJson for AppAccountLoginStartResponsepub struct AppAccountRateLimitsReadResponse {
rate_limits : AppRateLimitSnapshot
rate_limits_by_limit_id : Map[String, AppRateLimitSnapshot]?
} derive(Debug)impl FromJson for AppAccountRateLimitsReadResponsefn from_json(value : Json, path : JsonPath) -> AppAccountRateLimitsReadResponse raise JsonDecodeErrorpub struct AppAccountReadResponse {
account : AppAccount?
requires_openai_auth : Bool
} derive(Debug)impl FromJson for AppAccountReadResponsepub struct AppAccountSendAddCreditsNudgeEmailResponse {
status : AppAddCreditsNudgeEmailStatus
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppAccountSendAddCreditsNudgeEmailResponse raise JsonDecodeErrorpub enum AppAddCreditsNudgeEmailStatus {
AppAddCreditsNudgeSent
AppAddCreditsNudgeCooldownActive
} derive(Debug)impl FromJson for AppAddCreditsNudgeEmailStatuspub(all) struct AppAdditionalFileSystemPermissions {
read : ArrayView[String]?
write : ArrayView[String]?
glob_scan_max_depth : UInt64?
entries : ArrayView[AppFileSystemSandboxEntry]?
} derive(Debug)impl ToJson for AppAdditionalFileSystemPermissionsfn from_json(value : Json, path : JsonPath) -> AppAdditionalFileSystemPermissions raise JsonDecodeErrorimpl ToJson for AppAdditionalNetworkPermissionsimpl FromJson for AppAdditionalNetworkPermissionsfn from_json(value : Json, path : JsonPath) -> AppAdditionalNetworkPermissions raise JsonDecodeErrorpub(all) enum AppApprovalPolicy {
AppApprovalUntrusted
AppApprovalOnFailure
AppApprovalOnRequest
AppApprovalNever
AppApprovalGranular(Bool, Bool, Bool, Bool, Bool)
} derive(Debug)pub(all) enum AppApprovalsReviewer {
AppReviewerUser
AppReviewerAutoReview
AppReviewerGuardianSubagent
} derive(Debug)pub struct AppAppsConfig {
default_config : AppAppsDefaultConfig?
apps : Map[String, AppConnectorConfig]
} derive(Debug)impl FromJson for AppAppsConfigpub struct AppAppsDefaultConfig {
enabled : Bool
destructive_enabled : Bool
open_world_enabled : Bool
} derive(Debug)impl FromJson for AppAppsDefaultConfigpub enum AppAuthMode {
AppAuthApiKey
AppAuthChatGPT
AppAuthChatGPTAuthTokens
AppAuthAgentIdentity
} derive(Debug)impl FromJson for AppAuthModefn from_json(value : Json, path : JsonPath) -> AppChatgptAuthTokensRefreshReason raise JsonDecodeErrorpub(all) struct AppChatgptAuthTokensRefreshRequest {
reason : AppChatgptAuthTokensRefreshReason
previous_account_id : String?
// private fields
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppChatgptAuthTokensRefreshRequest raise JsonDecodeErrorpub enum AppCodexErrorInfo {
AppContextWindowExceeded
AppUsageLimitExceeded
AppServerOverloaded
AppCyberPolicy
AppHttpConnectionFailed(Int?)
AppResponseStreamConnectionFailed(Int?)
AppInternalServerError
AppUnauthorized
AppBadRequest
AppThreadRollbackFailed
AppSandboxError
AppResponseStreamDisconnected(Int?)
AppResponseTooManyFailedAttempts(Int?)
AppActiveTurnNotSteerable(AppNonSteerableTurnKind)
AppCodexOtherError
} derive(Debug)impl FromJson for AppCodexErrorInfopub(all) enum AppCollaborationModeKind {
AppCollaborationPlan
AppCollaborationDefault
} derive(Debug)impl FromJson for AppCollaborationModeKindpub(all) struct AppCollaborationModeListResponse {
data : ArrayView[AppCollaborationModeMask]
} derive(Debug)impl FromJson for AppCollaborationModeListResponsefn from_json(value : Json, path : JsonPath) -> AppCollaborationModeListResponse raise JsonDecodeErrorpub(all) struct AppCollaborationModeMask {
name : String
mode : AppCollaborationModeKind?
model : String?
reasoning_effort : AppReasoningEffort?
} derive(Debug)impl FromJson for AppCollaborationModeMaskpub enum AppCommandAction {
AppCommandReadAction(String, String, String)
AppCommandListFilesAction(String, String?)
AppCommandSearchAction(String, String?, String?)
AppCommandUnknownAction(String)
} derive(Debug)impl FromJson for AppCommandActionpub(all) struct AppCommandExecParams {
command : Array[String]
process_id : String?
tty : Bool?
stream_stdin : Bool?
stream_stdout_stderr : Bool?
output_bytes_cap : UInt64?
disable_output_cap : Bool?
disable_timeout : Bool?
timeout_ms : Int64?
cwd : String?
env : Map[String, String?]?
size : AppCommandExecTerminalSize?
sandbox_policy : AppSandboxPolicy?
} derive(Debug)impl ToJson for AppCommandExecParamspub(all) struct AppCommandExecResizeParams {
process_id : String
size : AppCommandExecTerminalSize
} derive(Debug)impl ToJson for AppCommandExecResizeParamspub(all) struct AppCommandExecWriteParams {
process_id : String
delta_base64 : String?
close_stdin : Bool?
} derive(Debug)impl ToJson for AppCommandExecWriteParamspub(all) enum AppCommandExecutionApprovalDecision {
AppCommandAccept
AppCommandAcceptForSession
AppCommandDecline
AppCommandCancel
AppCommandAcceptWithExecpolicyAmendment(ArrayView[String])
AppCommandApplyNetworkPolicyAmendment(AppNetworkPolicyAmendment)
} derive(Debug)pub(all) struct AppCommandExecutionApprovalRequest {
thread_id : String
turn_id : String
item_id : String
started_at_ms : Int64
approval_id : String?
reason : String?
network_approval_context : AppNetworkApprovalContext?
command : String?
cwd : String?
command_actions : ArrayView[AppCommandAction]?
proposed_execpolicy_amendment : ArrayView[String]?
proposed_network_policy_amendments : ArrayView[AppNetworkPolicyAmendment]?
// private fields
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppCommandExecutionApprovalRequest raise JsonDecodeErrorpub(all) struct AppConfigBatchWriteParams {
edits : Array[AppConfigEdit]
file_path : String?
expected_version : String?
reload_user_config : Bool?
} derive(Debug)impl ToJson for AppConfigBatchWriteParamspub struct AppConfigBatchWriteResponse {
status : AppConfigWriteStatus
version : String
file_path : String
overridden_metadata : AppConfigOverriddenMetadata?
} derive(Debug)impl FromJson for AppConfigBatchWriteResponsepub(all) struct AppConfigEdit {
key_path : String
value : Json
merge_strategy : AppMergeStrategy
} derive(Debug)impl ToJson for AppConfigEditpub struct AppConfigLayer {
name : AppConfigLayerSource
version : String
config : Json
disabled_reason : String?
} derive(Debug)impl FromJson for AppConfigLayerpub enum AppConfigLayerSource {
AppConfigLayerMdm(String, String)
AppConfigLayerSystem(String)
AppConfigLayerUser(String)
AppConfigLayerProject(String)
AppConfigLayerSessionFlags
AppConfigLayerLegacyManagedConfigTomlFromFile(String)
AppConfigLayerLegacyManagedConfigTomlFromMdm
} derive(Debug)impl FromJson for AppConfigLayerSourcepub struct AppConfigOverriddenMetadata {
message : String
overriding_layer : AppConfigLayerMetadata
effective_value : Json
} derive(Debug)impl FromJson for AppConfigOverriddenMetadatapub struct AppConfigReadResponse {
config : AppConfigSnapshot
origins : Map[String, AppConfigLayerMetadata]
layers : ArrayView[AppConfigLayer]?
} derive(Debug)impl FromJson for AppConfigReadResponsepub struct AppConfigRequirements {
allowed_approval_policies : ArrayView[AppApprovalPolicy]?
allowed_sandbox_modes : ArrayView[SandboxMode]?
allowed_web_search_modes : ArrayView[AppWebSearchMode]?
allow_managed_hooks_only : Bool?
feature_requirements : Map[String, Bool]?
enforce_residency : AppResidencyRequirement?
} derive(Debug)impl FromJson for AppConfigRequirementsfn from_json(value : Json, path : JsonPath) -> AppConfigRequirementsReadResponse raise JsonDecodeErrorpub struct AppConfigSnapshot {
model : String?
review_model : String?
model_context_window : Int64?
model_auto_compact_token_limit : Int64?
model_provider : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
sandbox_mode : SandboxMode?
sandbox_workspace_write : AppSandboxWorkspaceWrite?
forced_chatgpt_workspace_id : String?
forced_login_method : AppForcedLoginMethod?
web_search : AppWebSearchMode?
tools : AppConfigToolsV2?
profile : String?
profiles : Map[String, AppProfileV2]
instructions : String?
developer_instructions : String?
compact_prompt : String?
model_reasoning_effort : AppReasoningEffort?
model_reasoning_summary : AppReasoningSummary?
model_verbosity : AppModelVerbosity?
service_tier : String?
analytics : AppAnalyticsConfig?
apps : AppAppsConfig?
additional : Map[String, Json]
// private fields
} derive(Debug)pub struct AppConfigToolsV2 {
web_search : AppWebSearchToolConfig?
view_image : Bool?
} derive(Debug)impl FromJson for AppConfigToolsV2pub(all) struct AppConfigValueWriteParams {
key_path : String
value : Json
merge_strategy : AppMergeStrategy
file_path : String?
expected_version : String?
} derive(Debug)impl ToJson for AppConfigValueWriteParamspub struct AppConfigValueWriteResponse {
status : AppConfigWriteStatus
version : String
file_path : String
overridden_metadata : AppConfigOverriddenMetadata?
} derive(Debug)impl FromJson for AppConfigValueWriteResponsepub struct AppConnectorConfig {
enabled : Bool
destructive_enabled : Bool?
open_world_enabled : Bool?
default_tools_approval_mode : AppToolApproval?
default_tools_enabled : Bool?
tools : AppToolsConfig?
} derive(Debug)impl FromJson for AppConnectorConfigpub struct AppConversationGitInfo {
sha : String?
branch : String?
origin_url : String?
} derive(Debug)impl FromJson for AppConversationGitInfopub struct AppCreditsSnapshot {
has_credits : Bool
unlimited : Bool
balance : String?
} derive(Debug)impl FromJson for AppCreditsSnapshotpub(all) enum AppDynamicToolCallOutputContentItem {
AppDynamicToolCallOutputText(String)
AppDynamicToolCallOutputImage(String)
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppDynamicToolCallOutputContentItem raise JsonDecodeErrorpub struct AppExperimentalFeature {
name : String
stage : AppExperimentalFeatureStage
display_name : String?
description : String?
announcement : String?
enabled : Bool
default_enabled : Bool
} derive(Debug)impl FromJson for AppExperimentalFeaturefn from_json(value : Json, path : JsonPath) -> AppExperimentalFeatureEnablementSetResponse raise JsonDecodeErrorpub struct AppExperimentalFeatureListResponse {
data : ArrayView[AppExperimentalFeature]
next_cursor : String?
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppExperimentalFeatureListResponse raise JsonDecodeErrorpub enum AppExperimentalFeatureStage {
AppFeatureBeta
AppFeatureUnderDevelopment
AppFeatureStable
AppFeatureDeprecated
AppFeatureRemoved
} derive(Debug)impl FromJson for AppExperimentalFeatureStagepub struct AppExternalAgentConfigDetectResponse {
items : ArrayView[AppExternalAgentConfigMigrationItem]
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppExternalAgentConfigDetectResponse raise JsonDecodeErrorpub(all) struct AppExternalAgentConfigImportParams {
migration_items : Array[AppExternalAgentConfigMigrationItem]
} derive(Debug)impl ToJson for AppExternalAgentConfigImportParamspub(all) struct AppExternalAgentConfigMigrationItem {
item_type : AppExternalAgentConfigMigrationItemType
description : String
cwd : String?
details : AppMigrationDetails?
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppExternalAgentConfigMigrationItem raise JsonDecodeErrorpub(all) enum AppExternalAgentConfigMigrationItemType {
AppMigrationAgentsMd
AppMigrationConfig
AppMigrationSkills
AppMigrationPlugins
AppMigrationMcpServerConfig
AppMigrationSubagents
AppMigrationHooks
AppMigrationCommands
AppMigrationSessions
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppExternalAgentConfigMigrationItemType raise JsonDecodeErrorpub(all) enum AppFileChangeApprovalDecision {
AppFileChangeAccept
AppFileChangeAcceptForSession
AppFileChangeDecline
AppFileChangeCancel
} derive(Debug)impl ToJson for AppFileChangeApprovalDecisionpub(all) struct AppFileChangeApprovalRequest {
thread_id : String
turn_id : String
item_id : String
started_at_ms : Int64
reason : String?
grant_root : String?
// private fields
} derive(Debug)impl FromJson for AppFileChangeApprovalRequestpub(all) enum AppFileSystemAccessMode {
AppFileSystemReadAccess
AppFileSystemWriteAccess
AppFileSystemNoAccess
} derive(Debug)pub(all) enum AppFileSystemPath {
AppFileSystemAbsolutePath(String)
AppFileSystemGlobPattern(String)
AppFileSystemSpecialPath(AppFileSystemSpecialPath)
} derive(Debug)pub(all) struct AppFileSystemSandboxEntry {
path : AppFileSystemPath
access : AppFileSystemAccessMode
} derive(Debug)pub(all) enum AppFileSystemSpecialPath {
AppFileSystemRoot
AppFileSystemMinimal
AppFileSystemProjectRoots(String?)
AppFileSystemTmpdir
AppFileSystemSlashTmp
AppFileSystemUnknown(String, String?)
} derive(Debug)pub(all) struct AppFsCopyParams {
source_path : String
destination_path : String
recursive : Bool?
} derive(Debug)impl ToJson for AppFsCopyParamspub struct AppFsGetMetadataResponse {
is_directory : Bool
is_file : Bool
is_symlink : Bool
created_at_ms : Int64
modified_at_ms : Int64
} derive(Debug)impl FromJson for AppFsGetMetadataResponsepub struct AppFsReadDirectoryEntry {
file_name : String
is_directory : Bool
is_file : Bool
} derive(Debug)impl FromJson for AppFsReadDirectoryEntrypub struct AppFuzzyFileSearchResult {
root : String
path : String
match_type : AppFuzzyFileSearchMatchType
file_name : String
score : UInt
indices : ArrayView[UInt]?
} derive(Debug)impl FromJson for AppFuzzyFileSearchResultpub(all) struct AppFuzzyFileSearchSessionUpdateParams {
session_id : String
query : String
} derive(Debug)pub(all) struct AppGrantedPermissionProfile {
network : AppAdditionalNetworkPermissions?
file_system : AppAdditionalFileSystemPermissions?
} derive(Debug)pub(all) struct AppGuardianApprovalReview {
status : AppGuardianApprovalReviewStatus
risk_level : AppGuardianRiskLevel?
user_authorization : AppGuardianUserAuthorization?
rationale : String?
} derive(Debug)impl FromJson for AppGuardianApprovalReviewpub(all) enum AppGuardianApprovalReviewAction {
AppGuardianCommandAction(AppGuardianCommandSource, String, String)
AppGuardianExecveAction(AppGuardianCommandSource, String, ArrayView[String], String)
AppGuardianApplyPatchAction(String, ArrayView[String])
AppGuardianNetworkAccessAction(String, String, AppNetworkApprovalProtocol, UInt)
AppGuardianMcpToolCallAction(String, String, String?, String?, String?)
AppGuardianRequestPermissionsAction(String?, AppRequestPermissionProfile)
} derive(Debug)impl FromJson for AppGuardianApprovalReviewActionfn from_json(value : Json, path : JsonPath) -> AppGuardianApprovalReviewAction raise JsonDecodeErrorpub(all) enum AppGuardianApprovalReviewStatus {
AppGuardianReviewInProgress
AppGuardianReviewApproved
AppGuardianReviewDenied
AppGuardianReviewTimedOut
AppGuardianReviewAborted
} derive(Debug)impl FromJson for AppGuardianApprovalReviewStatusfn from_json(value : Json, path : JsonPath) -> AppGuardianApprovalReviewStatus raise JsonDecodeErrorpub(all) enum AppGuardianCommandSource {
AppGuardianCommandSourceShell
AppGuardianCommandSourceUnifiedExec
} derive(Debug)impl FromJson for AppGuardianCommandSourcepub(all) enum AppGuardianRiskLevel {
AppGuardianRiskLow
AppGuardianRiskMedium
AppGuardianRiskHigh
AppGuardianRiskCritical
} derive(Debug)impl FromJson for AppGuardianRiskLevelpub(all) enum AppGuardianUserAuthorization {
AppGuardianUserAuthorizationUnknown
AppGuardianUserAuthorizationLow
AppGuardianUserAuthorizationMedium
AppGuardianUserAuthorizationHigh
} derive(Debug)impl FromJson for AppGuardianUserAuthorizationpub enum AppHookEventName {
AppHookPreToolUse
AppHookPermissionRequest
AppHookPostToolUse
AppHookPreCompact
AppHookPostCompact
AppHookSessionStart
AppHookUserPromptSubmit
AppHookStop
} derive(Debug)impl FromJson for AppHookEventNamepub enum AppHookHandlerType {
AppHookCommandHandler
AppHookPromptHandler
AppHookAgentHandler
} derive(Debug)impl FromJson for AppHookHandlerTypepub struct AppHookMetadata {
key : String
event_name : AppHookEventName
handler_type : AppHookHandlerType
matcher : String?
command : String?
timeout_sec : UInt64
status_message : String?
source_path : String
source : AppHookSource
plugin_id : String?
display_order : Int64
enabled : Bool
is_managed : Bool
current_hash : String
trust_status : AppHookTrustStatus
// private fields
} derive(Debug)impl FromJson for AppHookMetadatapub(all) enum AppHookOutputEntryKind {
AppHookOutputWarning
AppHookOutputStop
AppHookOutputFeedback
AppHookOutputContext
AppHookOutputError
} derive(Debug)impl FromJson for AppHookOutputEntryKindpub(all) enum AppHookRunStatus {
AppHookRunning
AppHookCompleted
AppHookFailed
AppHookBlocked
AppHookStopped
} derive(Debug)impl FromJson for AppHookRunStatuspub(all) struct AppHookRunSummary {
id : String
event_name : AppHookEventName
handler_type : AppHookHandlerType
execution_mode : AppHookExecutionMode
scope : AppHookScope
source_path : String
source : AppHookSource
display_order : Int64
status : AppHookRunStatus
status_message : String?
started_at : Int64
completed_at : Int64?
duration_ms : Int64?
entries : ArrayView[AppHookOutputEntry]
} derive(Debug)impl FromJson for AppHookRunSummarypub enum AppHookSource {
AppHookSystemSource
AppHookUserSource
AppHookProjectSource
AppHookMdmSource
AppHookSessionFlagsSource
AppHookPluginSource
AppHookCloudRequirementsSource
AppHookLegacyManagedConfigFileSource
AppHookLegacyManagedConfigMdmSource
AppHookUnknownSource
} derive(Debug)impl FromJson for AppHookSourcepub enum AppHookTrustStatus {
AppHookManagedTrust
AppHookUntrusted
AppHookTrusted
AppHookModified
} derive(Debug)impl FromJson for AppHookTrustStatuspub struct AppHooksListEntry {
cwd : String
hooks : ArrayView[AppHookMetadata]
warnings : ArrayView[String]
errors : ArrayView[AppHookErrorInfo]
} derive(Debug)impl FromJson for AppHooksListEntryimpl ToJson for AppHooksListParamsimpl ToJson for AppInitializeCapabilitiesfn AppInitializeCapabilities::new(experimental_api? : Bool, request_attestation? : Bool, opt_out_notification_methods? : Array[String]) -> AppInitializeCapabilitiespub(all) struct AppInitializeParams {
client_info : AppClientInfo
capabilities : AppInitializeCapabilities?
} derive(Debug)impl ToJson for AppInitializeParamspub struct AppInitializeResponse {
user_agent : String
codex_home : String
platform_family : String
platform_os : String
} derive(Debug)impl FromJson for AppInitializeResponsepub struct AppListParams {
cursor : String?
limit : UInt?
thread_id : String?
force_refetch : Bool?
} derive(Debug)impl ToJson for AppListParamsfn AppListParams::new(cursor? : String, limit? : UInt, thread_id? : String, force_refetch? : Bool) -> AppListParamsimpl FromJson for AppListResponsepub(all) enum AppLoginAccountParams {
AppLoginApiKey(String)
AppLoginChatGPT(Bool?)
AppLoginChatGPTDeviceCode
AppLoginChatGPTAuthTokens(String, String, String?)
} derive(Debug)impl ToJson for AppLoginAccountParamspub struct AppMarketplaceAddResponse {
marketplace_name : String
installed_root : String
already_added : Bool
} derive(Debug)impl FromJson for AppMarketplaceAddResponsepub struct AppMarketplaceRemoveResponse {
marketplace_name : String
installed_root : String?
} derive(Debug)impl FromJson for AppMarketplaceRemoveResponsepub struct AppMarketplaceUpgradeErrorInfo {
marketplace_name : String
message : String
} derive(Debug)impl FromJson for AppMarketplaceUpgradeErrorInfopub struct AppMarketplaceUpgradeResponse {
selected_marketplaces : ArrayView[String]
upgraded_roots : ArrayView[String]
errors : ArrayView[AppMarketplaceUpgradeErrorInfo]
} derive(Debug)impl FromJson for AppMarketplaceUpgradeResponsepub enum AppMcpAuthStatus {
AppMcpUnsupported
AppMcpNotLoggedIn
AppMcpBearerToken
AppMcpOAuth
} derive(Debug)impl FromJson for AppMcpAuthStatuspub(all) struct AppMcpElicitationBooleanSchema {
title : String?
description : String?
default : Bool?
} derive(Debug)impl FromJson for AppMcpElicitationBooleanSchemapub(all) struct AppMcpElicitationNumberSchema {
number_type : AppMcpElicitationNumberType
title : String?
description : String?
minimum : Double?
maximum : Double?
default : Double?
} derive(Debug)impl FromJson for AppMcpElicitationNumberSchemapub(all) enum AppMcpElicitationNumberType {
AppMcpElicitationNumberTypeNumber
AppMcpElicitationNumberTypeInteger
} derive(Debug)impl FromJson for AppMcpElicitationNumberTypepub(all) enum AppMcpElicitationPrimitiveSchema {
AppMcpElicitationString(AppMcpElicitationStringSchema)
AppMcpElicitationNumber(AppMcpElicitationNumberSchema)
AppMcpElicitationBoolean(AppMcpElicitationBooleanSchema)
AppMcpElicitationStringEnum(AppMcpElicitationStringEnumSchema)
AppMcpElicitationTitledStringEnum(AppMcpElicitationTitledStringEnumSchema)
AppMcpElicitationUntitledMultiSelect(AppMcpElicitationUntitledMultiSelectSchema)
AppMcpElicitationTitledMultiSelect(AppMcpElicitationTitledMultiSelectSchema)
} derive(Debug)impl FromJson for AppMcpElicitationPrimitiveSchemafn from_json(value : Json, path : JsonPath) -> AppMcpElicitationPrimitiveSchema raise JsonDecodeErrorpub(all) struct AppMcpElicitationSchema {
schema_uri : String?
object_type : AppMcpElicitationObjectType
properties : Map[String, AppMcpElicitationPrimitiveSchema]
required : ArrayView[String]?
} derive(Debug)impl FromJson for AppMcpElicitationSchemafn from_json(value : Json, path : JsonPath) -> AppMcpElicitationStringEnumSchema raise JsonDecodeErrorpub(all) enum AppMcpElicitationStringFormat {
AppMcpElicitationEmailFormat
AppMcpElicitationUriFormat
AppMcpElicitationDateFormat
AppMcpElicitationDateTimeFormat
} derive(Debug)impl FromJson for AppMcpElicitationStringFormatpub(all) struct AppMcpElicitationStringSchema {
title : String?
description : String?
min_length : UInt?
max_length : UInt?
format : AppMcpElicitationStringFormat?
default : String?
} derive(Debug)impl FromJson for AppMcpElicitationStringSchemapub(all) struct AppMcpElicitationTitledEnumItems {
any_of : ArrayView[AppMcpElicitationConstOption]
} derive(Debug)impl FromJson for AppMcpElicitationTitledEnumItemsfn from_json(value : Json, path : JsonPath) -> AppMcpElicitationTitledEnumItems raise JsonDecodeErrorpub(all) struct AppMcpElicitationTitledMultiSelectSchema {
title : String?
description : String?
min_items : UInt64?
max_items : UInt64?
items : AppMcpElicitationTitledEnumItems
default : ArrayView[String]?
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppMcpElicitationTitledMultiSelectSchema raise JsonDecodeErrorpub(all) struct AppMcpElicitationTitledStringEnumSchema {
title : String?
description : String?
one_of : ArrayView[AppMcpElicitationConstOption]
default : String?
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppMcpElicitationTitledStringEnumSchema raise JsonDecodeErrorfn from_json(value : Json, path : JsonPath) -> AppMcpElicitationUntitledEnumItems raise JsonDecodeErrorpub(all) struct AppMcpElicitationUntitledMultiSelectSchema {
title : String?
description : String?
min_items : UInt64?
max_items : UInt64?
items : AppMcpElicitationUntitledEnumItems
default : ArrayView[String]?
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppMcpElicitationUntitledMultiSelectSchema raise JsonDecodeErrorpub(all) struct AppMcpResourceReadParams {
thread_id : String?
server : String
uri : String
} derive(Debug)impl ToJson for AppMcpResourceReadParamspub(all) enum AppMcpServerElicitationAction {
AppMcpElicitationAccept
AppMcpElicitationDecline
AppMcpElicitationCancel
} derive(Debug)impl ToJson for AppMcpServerElicitationActionpub(all) enum AppMcpServerElicitationContent {
AppMcpElicitationForm(Json?, String, AppMcpElicitationSchema)
AppMcpElicitationUrl(Json?, String, String, String)
} derive(Debug)impl FromJson for AppMcpServerElicitationContentpub(all) struct AppMcpServerElicitationRequest {
thread_id : String
turn_id : String?
server_name : String
elicitation : AppMcpServerElicitationContent
// private fields
} derive(Debug)impl FromJson for AppMcpServerElicitationRequestpub struct AppMcpServerResourceReadResponse {
contents : ArrayView[AppMcpResourceContent]
} derive(Debug)impl FromJson for AppMcpServerResourceReadResponsefn from_json(value : Json, path : JsonPath) -> AppMcpServerResourceReadResponse raise JsonDecodeErrorpub enum AppMcpServerStartupState {
AppMcpServerStarting
AppMcpServerReady
AppMcpServerFailed
AppMcpServerCancelled
} derive(Debug)impl FromJson for AppMcpServerStartupStatepub struct AppMcpServerStatus {
name : String
tools : Map[String, AppMcpTool]
resources : ArrayView[AppMcpResource]
resource_templates : ArrayView[AppMcpResourceTemplate]
auth_status : AppMcpAuthStatus
} derive(Debug)impl FromJson for AppMcpServerStatuspub(all) enum AppMcpServerStatusDetail {
AppMcpServerStatusFull
AppMcpServerStatusToolsAndAuthOnly
} derive(Debug)impl ToJson for AppMcpServerStatusDetailpub(all) struct AppMcpServerStatusListParams {
cursor : String?
limit : UInt?
detail : AppMcpServerStatusDetail?
} derive(Debug)impl ToJson for AppMcpServerStatusListParamspub struct AppMcpServerStatusListResponse {
data : ArrayView[AppMcpServerStatus]
next_cursor : String?
} derive(Debug)impl FromJson for AppMcpServerStatusListResponsepub struct AppMemoryCitation {
entries : ArrayView[AppMemoryCitationEntry]
thread_ids : ArrayView[String]
} derive(Debug)impl FromJson for AppMemoryCitationpub struct AppMemoryCitationEntry {
path : String
line_start : UInt
line_end : UInt
note : String
} derive(Debug)impl FromJson for AppMemoryCitationEntrypub(all) struct AppMigrationDetails {
plugins : ArrayView[AppPluginsMigration]
sessions : ArrayView[AppSessionMigration]
mcp_servers : ArrayView[AppNamedMigration]
hooks : ArrayView[AppNamedMigration]
subagents : ArrayView[AppNamedMigration]
commands : ArrayView[AppNamedMigration]
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppMockExperimentalMethodResponse raise JsonDecodeErrorpub struct AppModel {
id : String
model : String
upgrade : String?
upgrade_info : AppModelUpgradeInfo?
availability_nux : AppModelAvailabilityNux?
display_name : String
description : String
hidden : Bool
supported_reasoning_efforts : ArrayView[AppReasoningEffortOption]
default_reasoning_effort : AppReasoningEffort
input_modalities : ArrayView[AppInputModality]
supports_personality : Bool
additional_speed_tiers : ArrayView[String]
service_tiers : ArrayView[AppModelServiceTier]
is_default : Bool
// private fields
} derive(Debug)pub struct AppModelListParams {
cursor : String?
limit : UInt?
include_hidden : Bool?
} derive(Debug)impl ToJson for AppModelListParamsfn AppModelListParams::new(cursor? : String, limit? : UInt, include_hidden? : Bool) -> AppModelListParamsimpl FromJson for AppModelListResponsepub struct AppModelProviderCapabilitiesReadResponse {
namespace_tools : Bool
image_generation : Bool
web_search : Bool
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppModelProviderCapabilitiesReadResponse raise JsonDecodeErrorpub struct AppModelUpgradeInfo {
model : String
upgrade_copy : String?
model_link : String?
migration_markdown : String?
} derive(Debug)impl FromJson for AppModelUpgradeInfopub struct AppNetworkApprovalContext {
host : String
protocol : AppNetworkApprovalProtocol
} derive(Debug)impl FromJson for AppNetworkApprovalContextpub enum AppNetworkApprovalProtocol {
AppNetworkApprovalHttp
AppNetworkApprovalHttps
AppNetworkApprovalSocks5Tcp
AppNetworkApprovalSocks5Udp
} derive(Debug)impl FromJson for AppNetworkApprovalProtocolpub(all) struct AppNetworkPolicyAmendment {
host : String
action : AppNetworkPolicyRuleAction
} derive(Debug)pub(all) enum AppNetworkPolicyRuleAction {
AppNetworkPolicyAllow
AppNetworkPolicyDeny
} derive(Debug)pub(all) enum AppNullableString {
AppNullableStringNull
AppNullableStringValue(String)
} derive(Debug)impl ToJson for AppNullableStringpub(all) enum AppPermissionGrantScope {
AppPermissionGrantTurn
AppPermissionGrantSession
} derive(Debug)pub(all) struct AppPermissionsRequestApprovalRequest {
thread_id : String
turn_id : String
item_id : String
started_at_ms : Int64
cwd : String
reason : String?
permissions : AppRequestPermissionProfile
// private fields
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppPermissionsRequestApprovalRequest raise JsonDecodeErrorpub(all) enum AppPersonality {
AppNoPersonality
AppFriendlyPersonality
AppPragmaticPersonality
} derive(Debug)impl ToJson for AppPersonalitypub enum AppPlanType {
AppPlanFree
AppPlanGo
AppPlanPlus
AppPlanPro
AppPlanProlite
AppPlanTeam
AppPlanSelfServeBusinessUsageBased
AppPlanBusiness
AppPlanEnterpriseCbpUsageBased
AppPlanEnterprise
AppPlanEdu
AppPlanUnknown
} derive(Debug)impl FromJson for AppPlanTypepub struct AppPluginDetail {
marketplace_name : String
marketplace_path : String?
summary : AppPluginSummary
description : String?
skills : ArrayView[AppSkillSummary]
apps : ArrayView[AppSummary]
mcp_servers : ArrayView[String]
// private fields
} derive(Debug)impl FromJson for AppPluginDetailpub(all) struct AppPluginInstallParams {
marketplace_path : String?
remote_marketplace_name : String?
plugin_name : String
} derive(Debug)impl ToJson for AppPluginInstallParamspub enum AppPluginInstallPolicy {
AppPluginInstallNotAvailable
AppPluginInstallAvailable
AppPluginInstallInstalledByDefault
} derive(Debug)impl FromJson for AppPluginInstallPolicypub struct AppPluginInstallResponse {
auth_policy : AppPluginAuthPolicy
apps_needing_auth : ArrayView[AppSummary]
} derive(Debug)impl FromJson for AppPluginInstallResponsepub struct AppPluginInterface {
display_name : String?
short_description : String?
long_description : String?
developer_name : String?
category : String?
capabilities : ArrayView[String]
website_url : String?
privacy_policy_url : String?
terms_of_service_url : String?
default_prompt : ArrayView[String]?
brand_color : String?
composer_icon : String?
composer_icon_url : String?
logo : String?
logo_url : String?
screenshots : ArrayView[String]
screenshot_urls : ArrayView[String]
// private fields
} derive(Debug)impl FromJson for AppPluginInterfacepub(all) enum AppPluginListMarketplaceKind {
AppPluginMarketplaceLocal
AppPluginMarketplaceWorkspaceDirectory
AppPluginMarketplaceSharedWithMe
} derive(Debug)impl ToJson for AppPluginListMarketplaceKindpub(all) struct AppPluginListParams {
cwds : Array[String]?
marketplace_kinds : Array[AppPluginListMarketplaceKind]?
} derive(Debug)impl ToJson for AppPluginListParamspub struct AppPluginListResponse {
marketplaces : ArrayView[AppPluginMarketplaceEntry]
marketplace_load_errors : ArrayView[AppMarketplaceLoadErrorInfo]
featured_plugin_ids : ArrayView[String]
} derive(Debug)impl FromJson for AppPluginListResponsepub struct AppPluginMarketplaceEntry {
name : String
path : String?
interface : AppMarketplaceInterface?
plugins : ArrayView[AppPluginSummary]
// private fields
} derive(Debug)impl FromJson for AppPluginMarketplaceEntrypub(all) struct AppPluginReadParams {
marketplace_path : String?
remote_marketplace_name : String?
plugin_name : String
} derive(Debug)impl ToJson for AppPluginReadParamspub enum AppPluginSource {
AppPluginSourceLocal(String)
AppPluginSourceGit(String, String?, String?, String?)
AppPluginSourceRemote
} derive(Debug)impl FromJson for AppPluginSourcepub struct AppPluginSummary {
id : String
name : String
source : AppPluginSource
installed : Bool
enabled : Bool
install_policy : AppPluginInstallPolicy
auth_policy : AppPluginAuthPolicy
interface : AppPluginInterface?
// private fields
} derive(Debug)impl FromJson for AppPluginSummarypub struct AppProfileV2 {
model : String?
model_provider : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
service_tier : String?
model_reasoning_effort : AppReasoningEffort?
model_reasoning_summary : AppReasoningSummary?
model_verbosity : AppModelVerbosity?
web_search : AppWebSearchMode?
tools : AppConfigToolsV2?
chatgpt_base_url : String?
additional : Map[String, Json]
// private fields
} derive(Debug)impl FromJson for AppProfileV2pub enum AppRateLimitReachedType {
AppRateLimitReached
AppWorkspaceOwnerCreditsDepleted
AppWorkspaceMemberCreditsDepleted
AppWorkspaceOwnerUsageLimitReached
AppWorkspaceMemberUsageLimitReached
} derive(Debug)impl FromJson for AppRateLimitReachedTypepub struct AppRateLimitSnapshot {
limit_id : String?
limit_name : String?
primary : AppRateLimitWindow?
secondary : AppRateLimitWindow?
credits : AppCreditsSnapshot?
plan_type : AppPlanType?
rate_limit_reached_type : AppRateLimitReachedType?
// private fields
} derive(Debug)impl FromJson for AppRateLimitSnapshotpub struct AppRateLimitWindow {
used_percent : Int
window_duration_mins : Int64?
resets_at : Int64?
} derive(Debug)impl FromJson for AppRateLimitWindowpub(all) enum AppRealtimeConversationVersion {
AppRealtimeConversationV1
AppRealtimeConversationV2
} derive(Debug)impl FromJson for AppRealtimeConversationVersionpub(all) enum AppRealtimeVoice {
AppRealtimeVoiceAlloy
AppRealtimeVoiceArbor
AppRealtimeVoiceAsh
AppRealtimeVoiceBallad
AppRealtimeVoiceBreeze
AppRealtimeVoiceCedar
AppRealtimeVoiceCoral
AppRealtimeVoiceCove
AppRealtimeVoiceEcho
AppRealtimeVoiceEmber
AppRealtimeVoiceJuniper
AppRealtimeVoiceMaple
AppRealtimeVoiceMarin
AppRealtimeVoiceSage
AppRealtimeVoiceShimmer
AppRealtimeVoiceSol
AppRealtimeVoiceSpruce
AppRealtimeVoiceVale
AppRealtimeVoiceVerse
} derive(Debug)pub(all) struct AppRealtimeVoicesList {
v1 : ArrayView[AppRealtimeVoice]
v2 : ArrayView[AppRealtimeVoice]
default_v1 : AppRealtimeVoice
default_v2 : AppRealtimeVoice
} derive(Debug)impl FromJson for AppRealtimeVoicesListpub(all) enum AppReasoningEffort {
AppEffortNone
AppEffortMinimal
AppEffortLow
AppEffortMedium
AppEffortHigh
AppEffortXhigh
} derive(Debug)pub struct AppReasoningEffortOption {
reasoning_effort : AppReasoningEffort
description : String
} derive(Debug)impl FromJson for AppReasoningEffortOptionpub(all) enum AppReasoningSummary {
AppSummaryAuto
AppSummaryConcise
AppSummaryDetailed
AppSummaryNone
} derive(Debug)pub(all) enum AppRemoteControlConnectionStatus {
AppRemoteControlDisabled
AppRemoteControlConnecting
AppRemoteControlConnected
AppRemoteControlErrored
} derive(Debug)impl FromJson for AppRemoteControlConnectionStatusfn from_json(value : Json, path : JsonPath) -> AppRemoteControlConnectionStatus raise JsonDecodeErrorimpl ToJson for AppRequestIdimpl FromJson for AppRequestIdpub(all) struct AppRequestPermissionProfile {
network : AppAdditionalNetworkPermissions?
file_system : AppAdditionalFileSystemPermissions?
} derive(Debug)impl FromJson for AppRequestPermissionProfilepub(all) enum AppResponseContentItem {
AppResponseInputText(String)
AppResponseInputImage(String, AppResponseImageDetail?)
AppResponseOutputText(String)
} derive(Debug)impl FromJson for AppResponseContentItempub(all) enum AppResponseFunctionCallOutputBody {
AppResponseFunctionOutputText(String)
AppResponseFunctionOutputContentItems(ArrayView[AppResponseFunctionCallOutputContentItem])
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppResponseFunctionCallOutputBody raise JsonDecodeErrorpub(all) enum AppResponseFunctionCallOutputContentItem {
AppResponseFunctionOutputInputText(String)
AppResponseFunctionOutputInputImage(String, AppResponseImageDetail?)
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppResponseFunctionCallOutputContentItem raise JsonDecodeErrorpub(all) enum AppResponseImageDetail {
AppResponseImageAuto
AppResponseImageLow
AppResponseImageHigh
AppResponseImageOriginal
} derive(Debug)impl FromJson for AppResponseImageDetailpub(all) enum AppResponseItem {
AppResponseMessage(String, ArrayView[AppResponseContentItem], AppResponseMessagePhase?)
AppResponseReasoning(ArrayView[AppResponseReasoningSummary], ArrayView[AppResponseReasoningContent]?, String?)
AppResponseLocalShellCall(String?, AppResponseLocalShellStatus, AppResponseLocalShellAction)
AppResponseFunctionCall(String, String?, String, String)
AppResponseToolSearchCall(String?, String?, String, Json)
AppResponseFunctionCallOutput(String, AppResponseFunctionCallOutputBody)
AppResponseCustomToolCall(String?, String, String, String)
AppResponseCustomToolCallOutput(String, String?, AppResponseFunctionCallOutputBody)
AppResponseToolSearchOutput(String?, String, String, ArrayView[Json])
AppResponseWebSearchCall(String?, AppResponseWebSearchAction?)
AppResponseImageGenerationCall(String, String, String?, String)
AppResponseCompaction(String)
AppResponseContextCompaction(String?)
AppResponseOther
} derive(Debug)impl FromJson for AppResponseItempub(all) enum AppResponseLocalShellStatus {
AppResponseLocalShellCompleted
AppResponseLocalShellInProgress
AppResponseLocalShellIncomplete
} derive(Debug)impl FromJson for AppResponseLocalShellStatuspub(all) enum AppResponseReasoningContent {
AppResponseReasoningText(String)
AppResponseReasoningPlainText(String)
} derive(Debug)impl FromJson for AppResponseReasoningContentpub(all) struct AppReviewStartParams {
thread_id : String
target : AppReviewTarget
delivery : AppReviewDelivery?
} derive(Debug)impl ToJson for AppReviewStartParamsimpl FromJson for AppReviewStartResponsepub(all) enum AppReviewTarget {
AppReviewUncommittedChanges
AppReviewBaseBranch(String)
AppReviewCommit(String, String?)
AppReviewCustom(String)
} derive(Debug)impl ToJson for AppReviewTargetpub(all) enum AppSandboxPolicy {
AppDangerFullAccess
AppReadOnly(Bool)
AppExternalSandbox(AppNetworkAccess)
AppWorkspaceWrite(Array[String], Bool, Bool, Bool)
} derive(Debug)pub enum AppServerEvent {
AppThreadStarted(AppThread)
AppThreadStatusChanged(String, AppThreadStatus)
AppThreadArchived(String)
AppThreadUnarchived(String)
AppThreadClosed(String)
AppSkillsChanged
AppThreadNameUpdated(String, String?)
AppThreadGoalUpdated(String, String?, AppThreadGoal)
AppThreadGoalCleared(String)
AppTurnStarted(String, AppTurn)
AppHookStarted(String, String?, AppHookRunSummary)
AppTurnCompleted(String, AppTurn)
AppHookCompleted(String, String?, AppHookRunSummary)
AppTurnDiffUpdated(String, String, String)
AppTurnPlanUpdated(String, String, String?, ArrayView[AppTurnPlanStep])
AppTurnError(String, String, AppTurnError, Bool)
AppItemStarted(AppThreadItemEvent)
AppItemGuardianApprovalReviewStarted(String, String, Int64, String, String?, AppGuardianApprovalReview, AppGuardianApprovalReviewAction)
AppItemGuardianApprovalReviewCompleted(String, String, Int64, Int64, String, String?, AppAutoReviewDecisionSource, AppGuardianApprovalReview, AppGuardianApprovalReviewAction)
AppItemCompleted(AppThreadItemEvent)
AppRawResponseItemCompleted(String, String, AppResponseItem)
AppAgentMessageDelta(String, String, String, String)
AppPlanDelta(String, String, String, String)
AppCommandExecOutputDelta(String, AppOutputStream, String, Bool)
AppCommandExecutionOutputDelta(String, String, String, String)
AppTerminalInteraction(String, String, String, String, String)
AppFileChangeOutputDelta(String, String, String, String)
AppFileChangePatchUpdated(String, String, String, ArrayView[AppThreadFileUpdateChange])
AppServerRequestResolved(String, AppRequestId)
AppMcpToolCallProgress(String, String, String, String)
AppMcpServerOauthLoginCompleted(String, Bool, String?)
AppMcpServerStatusUpdated(String, AppMcpServerStartupState, String?)
AppAccountUpdated(AppAuthMode?, AppPlanType?)
AppAccountRateLimitsUpdated(AppRateLimitSnapshot)
AppAppListUpdated(ArrayView[AppInfo])
AppRemoteControlStatusChanged(AppRemoteControlConnectionStatus, String, String?)
AppExternalAgentConfigImportCompleted
AppFsChanged(String, ArrayView[String])
AppContextCompacted(String, String)
AppFuzzyFileSearchSessionUpdated(String, String, ArrayView[AppFuzzyFileSearchResult])
AppFuzzyFileSearchSessionCompleted(String)
AppReasoningSummaryTextDelta(String, String, String, String, Int64)
AppReasoningSummaryPartAdded(String, String, String, Int64)
AppReasoningTextDelta(String, String, String, String, Int64)
AppWindowsWorldWritableWarning(ArrayView[String], UInt64, Bool)
AppWindowsSandboxSetupCompleted(AppWindowsSandboxSetupMode, Bool, String?)
AppAccountLoginCompleted(String?, Bool, String?)
AppModelRerouted(String, String, String, String, AppModelRerouteReason)
AppModelVerification(String, String, ArrayView[AppModelVerification])
AppWarning(String?, String)
AppGuardianWarning(String, String)
AppDeprecationNotice(String, String?)
AppConfigWarning(String, String?, String?, AppTextRange?)
AppThreadTokenUsageUpdated(String, String, AppThreadTokenUsage)
AppThreadRealtimeStarted(String, String?, AppRealtimeConversationVersion)
AppThreadRealtimeItemAdded(String, Json)
AppThreadRealtimeTranscriptDelta(String, String, String)
AppThreadRealtimeTranscriptDone(String, String, String)
AppThreadRealtimeOutputAudioDelta(String, AppThreadRealtimeAudioChunk)
AppThreadRealtimeSdp(String, String)
AppThreadRealtimeError(String, String)
AppThreadRealtimeClosed(String, String?)
} derive(Debug)impl FromJson for AppServerEventpub struct AppServerOptions {
executable_path_override : String?
client_info : AppClientInfo?
capabilities : AppInitializeCapabilities?
} derive(Default)fn AppServerOptions::new(executable_path_override? : String, client_info? : AppClientInfo, capabilities? : AppInitializeCapabilities) -> AppServerOptionspub enum AppServerRequestDetails {
AppCommandExecutionApprovalRequest(AppCommandExecutionApprovalRequest)
AppFileChangeApprovalRequest(AppFileChangeApprovalRequest)
AppToolRequestUserInputRequest(AppToolRequestUserInputRequest)
AppDynamicToolCallRequest(AppDynamicToolCallRequest)
AppPermissionsRequestApprovalRequest(AppPermissionsRequestApprovalRequest)
AppChatgptAuthTokensRefreshRequest(AppChatgptAuthTokensRefreshRequest)
AppAttestationGenerateRequest(AppAttestationGenerateRequest)
AppMcpServerElicitationRequest(AppMcpServerElicitationRequest)
} derive(Debug)pub(all) enum AppServerResponse {
AppCommandExecutionApprovalResponse(AppCommandExecutionApprovalDecision)
AppFileChangeApprovalResponse(AppFileChangeApprovalDecision)
AppToolRequestUserInputResponse(Map[String, AppToolRequestUserInputAnswer])
AppDynamicToolCallResponse(ArrayView[AppDynamicToolCallOutputContentItem], Bool)
AppPermissionsRequestApprovalResponse(AppGrantedPermissionProfile, AppPermissionGrantScope, Bool?)
AppChatgptAuthTokensRefreshResponse(String, String, String?)
AppAttestationGenerateResponse(String)
AppMcpServerElicitationResponse(AppMcpServerElicitationAction, Json?, Json?)
} derive(Debug)impl ToJson for AppServerResponsepub enum AppSessionSource {
AppSessionCli
AppSessionVsCode
AppSessionExec
AppSessionAppServer
AppSessionCustom(String)
AppSessionSubAgent(AppSubAgentSource)
AppSessionUnknown
} derive(Debug)impl FromJson for AppSessionSourcepub struct AppSkillInterface {
display_name : String?
short_description : String?
icon_small : String?
icon_large : String?
brand_color : String?
default_prompt : String?
} derive(Debug)impl FromJson for AppSkillInterfacepub struct AppSkillMetadata {
name : String
description : String
short_description : String?
interface : AppSkillInterface?
dependencies : AppSkillDependencies?
path : String
scope : AppSkillScope
enabled : Bool
} derive(Debug)impl FromJson for AppSkillMetadatapub enum AppSkillScope {
AppSkillScopeUser
AppSkillScopeRepo
AppSkillScopeSystem
AppSkillScopeAdmin
} derive(Debug)impl FromJson for AppSkillScopepub struct AppSkillSummary {
name : String
description : String
short_description : String?
interface : AppSkillInterface?
path : String?
enabled : Bool
} derive(Debug)impl FromJson for AppSkillSummarypub struct AppSkillToolDependency {
dep_type : String
value : String
description : String?
transport : String?
command : String?
url : String?
} derive(Debug)impl FromJson for AppSkillToolDependencypub(all) struct AppSkillsConfigWriteParams {
path : String?
name : String?
enabled : Bool
} derive(Debug)impl ToJson for AppSkillsConfigWriteParamspub struct AppSkillsListEntry {
cwd : String
skills : ArrayView[AppSkillMetadata]
errors : ArrayView[AppSkillErrorInfo]
} derive(Debug)impl FromJson for AppSkillsListEntrypub enum AppSubAgentSource {
AppSubAgentReview
AppSubAgentCompact
AppSubAgentThreadSpawn(String, Int, String?, String?, String?)
AppSubAgentMemoryConsolidation
AppSubAgentOther(String)
} derive(Debug)impl FromJson for AppSubAgentSourcepub struct AppSummary {
id : String
name : String
description : String?
install_url : String?
needs_auth : Bool
} derive(Debug)impl FromJson for AppSummarypub struct AppThread {
id : String
forked_from_id : String?
preview : String
ephemeral : Bool
model_provider : String
created_at : Int64
updated_at : Int64
status : AppThreadStatus
path : String?
cwd : String
cli_version : String
source : AppSessionSource
agent_nickname : String?
agent_role : String?
git_info : AppConversationGitInfo?
name : String?
turns : ArrayView[AppTurn]
// private fields
} derive(Debug)pub enum AppThreadActiveFlag {
AppThreadWaitingOnApproval
AppThreadWaitingOnUserInput
} derive(Debug)impl FromJson for AppThreadActiveFlagpub struct AppThreadCollabAgentState {
status : AppThreadCollabAgentStatus
message : String?
} derive(Debug)impl FromJson for AppThreadCollabAgentStatepub enum AppThreadCollabAgentStatus {
AppThreadCollabAgentPendingInit
AppThreadCollabAgentRunning
AppThreadCollabAgentInterrupted
AppThreadCollabAgentCompleted
AppThreadCollabAgentErrored
AppThreadCollabAgentShutdown
AppThreadCollabAgentNotFound
} derive(Debug)impl FromJson for AppThreadCollabAgentStatuspub enum AppThreadCollabAgentTool {
AppThreadCollabSpawnAgent
AppThreadCollabSendInput
AppThreadCollabResumeAgent
AppThreadCollabWait
AppThreadCollabCloseAgent
} derive(Debug)impl FromJson for AppThreadCollabAgentToolpub enum AppThreadCollabAgentToolCallStatus {
AppThreadCollabInProgress
AppThreadCollabCompleted
AppThreadCollabFailed
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppThreadCollabAgentToolCallStatus raise JsonDecodeErrorpub enum AppThreadCommandExecutionSource {
AppThreadCommandSourceAgent
AppThreadCommandSourceUserShell
AppThreadCommandSourceUnifiedExecStartup
AppThreadCommandSourceUnifiedExecInteraction
} derive(Debug)impl FromJson for AppThreadCommandExecutionSourcefn from_json(value : Json, path : JsonPath) -> AppThreadCommandExecutionSource raise JsonDecodeErrorpub enum AppThreadCommandExecutionStatus {
AppThreadCommandInProgress
AppThreadCommandCompleted
AppThreadCommandFailed
AppThreadCommandDeclined
} derive(Debug)impl FromJson for AppThreadCommandExecutionStatusfn from_json(value : Json, path : JsonPath) -> AppThreadCommandExecutionStatus raise JsonDecodeErrorpub enum AppThreadDynamicToolCallStatus {
AppThreadDynamicInProgress
AppThreadDynamicCompleted
AppThreadDynamicFailed
} derive(Debug)impl FromJson for AppThreadDynamicToolCallStatusfn from_json(value : Json, path : JsonPath) -> AppThreadElicitationCounterResponse raise JsonDecodeErrorpub struct AppThreadFileUpdateChange {
path : String
kind : AppThreadPatchChangeKind
diff : String
} derive(Debug)impl FromJson for AppThreadFileUpdateChangepub(all) struct AppThreadForkParams {
thread_id : String
model : String?
model_provider : String?
service_tier : AppNullableString?
cwd : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
sandbox : SandboxMode?
config : Map[String, Json]?
base_instructions : String?
developer_instructions : String?
ephemeral : Bool?
} derive(Debug)impl ToJson for AppThreadForkParamspub struct AppThreadForkResponse {
thread : AppThread
model : String
model_provider : String
service_tier : String?
cwd : String
instruction_sources : ArrayView[String]
approval_policy : AppApprovalPolicy
approvals_reviewer : AppApprovalsReviewer
sandbox : AppSandboxPolicy
reasoning_effort : AppReasoningEffort?
} derive(Debug)impl FromJson for AppThreadForkResponsepub(all) struct AppThreadGoal {
thread_id : String
objective : String
status : AppThreadGoalStatus
token_budget : Int64?
tokens_used : Int64
time_used_seconds : Int64
created_at : Int64
updated_at : Int64
} derive(Debug)impl FromJson for AppThreadGoalpub(all) struct AppThreadGoalSetParams {
thread_id : String
objective : String?
status : AppThreadGoalStatus?
token_budget : AppNullableInt64?
} derive(Debug)impl ToJson for AppThreadGoalSetParamspub(all) enum AppThreadGoalStatus {
AppThreadGoalActive
AppThreadGoalPaused
AppThreadGoalBudgetLimited
AppThreadGoalComplete
} derive(Debug)impl ToJson for AppThreadInjectItemsParamspub enum AppThreadItem {
AppThreadUserMessageItem(String, ArrayView[AppThreadUserInput])
AppThreadHookPromptItem(String, ArrayView[AppHookPromptFragment])
AppThreadAgentMessageItem(String, String, AppMessagePhase?, AppMemoryCitation?)
AppThreadPlanItem(String, String)
AppThreadReasoningItem(String, ArrayView[String], ArrayView[String])
AppThreadCommandExecutionItem(String, String, String, String?, AppThreadCommandExecutionSource, AppThreadCommandExecutionStatus, ArrayView[AppCommandAction], String?, Int?, Int64?)
AppThreadFileChangeItem(String, ArrayView[AppThreadFileUpdateChange], AppThreadPatchApplyStatus)
AppThreadMcpToolCallItem(String, String, String, AppThreadMcpToolCallStatus, Json, String?, AppThreadMcpToolCallResult?, AppThreadMcpToolCallError?, Int64?)
AppThreadDynamicToolCallItem(String, String?, String, Json, AppThreadDynamicToolCallStatus, ArrayView[AppDynamicToolCallOutputContentItem]?, Bool?, Int64?)
AppThreadCollabAgentToolCallItem(String, AppThreadCollabAgentTool, AppThreadCollabAgentToolCallStatus, String, ArrayView[String], String?, String?, AppReasoningEffort?, Map[String, AppThreadCollabAgentState])
AppThreadWebSearchItem(String, String, AppWebSearchAction?)
AppThreadImageViewItem(String, String)
AppThreadImageGenerationItem(String, String, String?, String, String?)
AppThreadEnteredReviewModeItem(String, String)
AppThreadExitedReviewModeItem(String, String)
AppThreadContextCompactionItem(String)
} derive(Debug)impl FromJson for AppThreadItempub struct AppThreadItemEvent {
thread_id : String
turn_id : String
app_item : AppThreadItem
item : ThreadItem?
raw_item : Json
timestamp_ms : Int64
} derive(Debug)impl FromJson for AppThreadItemEventimpl ToJson for AppThreadListCwdpub struct AppThreadListParams {
cursor : String?
limit : UInt?
sort_key : AppThreadSortKey?
sort_direction : AppSortDirection?
model_providers : Array[String]?
source_kinds : Array[AppThreadSourceKind]?
archived : Bool?
cwd : AppThreadListCwd?
use_state_db_only : Bool?
search_term : String?
} derive(Debug)impl ToJson for AppThreadListParamsfn AppThreadListParams::new(cursor? : String, limit? : UInt, sort_key? : AppThreadSortKey, sort_direction? : AppSortDirection, model_providers? : Array[String], source_kinds? : Array[AppThreadSourceKind], archived? : Bool, cwd? : AppThreadListCwd, use_state_db_only? : Bool, search_term? : String) -> AppThreadListParamspub enum AppThreadMcpToolCallStatus {
AppThreadMcpInProgress
AppThreadMcpCompleted
AppThreadMcpFailed
} derive(Debug)impl FromJson for AppThreadMcpToolCallStatuspub(all) struct AppThreadMemoryModeSetParams {
thread_id : String
mode : AppThreadMemoryMode
} derive(Debug)impl ToJson for AppThreadMemoryModeSetParamspub(all) struct AppThreadMetadataGitInfoUpdateParams {
sha : AppNullableString?
branch : AppNullableString?
origin_url : AppNullableString?
} derive(Debug)pub(all) struct AppThreadMetadataUpdateParams {
thread_id : String
git_info : AppThreadMetadataGitInfoUpdateParams?
} derive(Debug)impl ToJson for AppThreadMetadataUpdateParamsimpl FromJson for AppThreadMetadataUpdateResponsefn from_json(value : Json, path : JsonPath) -> AppThreadMetadataUpdateResponse raise JsonDecodeErrorpub enum AppThreadPatchApplyStatus {
AppThreadPatchInProgress
AppThreadPatchCompleted
AppThreadPatchFailed
AppThreadPatchDeclined
} derive(Debug)impl FromJson for AppThreadPatchApplyStatuspub enum AppThreadPatchChangeKind {
AppThreadPatchAdd
AppThreadPatchDelete
AppThreadPatchUpdate(String?)
} derive(Debug)impl FromJson for AppThreadPatchChangeKindimpl ToJson for AppThreadReadParamsimpl FromJson for AppThreadReadResponsepub(all) struct AppThreadRealtimeAppendAudioParams {
thread_id : String
audio : AppThreadRealtimeAudioChunk
} derive(Debug)impl ToJson for AppThreadRealtimeAppendAudioParamspub(all) struct AppThreadRealtimeAudioChunk {
data : String
sample_rate : UInt
num_channels : UInt
samples_per_channel : UInt?
item_id : String?
} derive(Debug)fn from_json(value : Json, path : JsonPath) -> AppThreadRealtimeListVoicesResponse raise JsonDecodeErrorpub(all) struct AppThreadRealtimeStartParams {
thread_id : String
output_modality : AppRealtimeOutputModality
prompt : AppNullableString?
realtime_session_id : String?
transport : AppThreadRealtimeStartTransport?
voice : AppRealtimeVoice?
} derive(Debug)impl ToJson for AppThreadRealtimeStartParamspub(all) enum AppThreadRealtimeStartTransport {
AppThreadRealtimeWebsocket
AppThreadRealtimeWebrtc(String)
} derive(Debug)impl ToJson for AppThreadRealtimeStartTransportpub struct AppThreadResumeParams {
thread_id : String
model : String?
model_provider : String?
service_tier : AppNullableString?
cwd : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
sandbox : SandboxMode?
config : Map[String, Json]?
base_instructions : String?
developer_instructions : String?
personality : AppPersonality?
} derive(Debug)impl ToJson for AppThreadResumeParamsfn AppThreadResumeParams::new(thread_id : String, model? : String, model_provider? : String, service_tier? : AppNullableString, cwd? : String, approval_policy? : AppApprovalPolicy, approvals_reviewer? : AppApprovalsReviewer, sandbox? : SandboxMode, config? : Map[String, Json], base_instructions? : String, developer_instructions? : String, personality? : AppPersonality) -> AppThreadResumeParamspub struct AppThreadResumeResponse {
thread : AppThread
model : String
model_provider : String
service_tier : String?
cwd : String
instruction_sources : ArrayView[String]
approval_policy : AppApprovalPolicy
approvals_reviewer : AppApprovalsReviewer
sandbox : AppSandboxPolicy
reasoning_effort : AppReasoningEffort?
} derive(Debug)impl FromJson for AppThreadResumeResponseimpl FromJson for AppThreadRollbackResponsepub(all) enum AppThreadSourceKind {
SourceCli
SourceVscode
SourceExec
SourceAppServer
SourceSubAgent
SourceSubAgentReview
SourceSubAgentCompact
SourceSubAgentThreadSpawn
SourceSubAgentOther
SourceUnknown
} derive(Debug)impl ToJson for AppThreadSourceKindpub struct AppThreadStartParams {
model : String?
model_provider : String?
service_tier : AppNullableString?
cwd : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
sandbox : SandboxMode?
config : Map[String, Json]?
service_name : String?
base_instructions : String?
developer_instructions : String?
personality : AppPersonality?
ephemeral : Bool?
session_start_source : AppThreadStartSource?
} derive(Debug)impl ToJson for AppThreadStartParamsfn AppThreadStartParams::new(model? : String, model_provider? : String, service_tier? : AppNullableString, cwd? : String, approval_policy? : AppApprovalPolicy, approvals_reviewer? : AppApprovalsReviewer, sandbox? : SandboxMode, config? : Map[String, Json], service_name? : String, base_instructions? : String, developer_instructions? : String, personality? : AppPersonality, ephemeral? : Bool, session_start_source? : AppThreadStartSource) -> AppThreadStartParamspub struct AppThreadStartResponse {
thread : AppThread
model : String
model_provider : String
service_tier : String?
cwd : String
instruction_sources : ArrayView[String]
approval_policy : AppApprovalPolicy
approvals_reviewer : AppApprovalsReviewer
sandbox : AppSandboxPolicy
reasoning_effort : AppReasoningEffort?
} derive(Debug)impl FromJson for AppThreadStartResponsepub enum AppThreadStatus {
ThreadNotLoaded
ThreadIdle
ThreadSystemError
ThreadActive(ArrayView[AppThreadActiveFlag])
} derive(Debug)impl FromJson for AppThreadStatuspub struct AppThreadTokenUsage {
total : AppTokenUsageBreakdown
last : AppTokenUsageBreakdown
model_context_window : Int64?
} derive(Debug)impl FromJson for AppThreadTokenUsagepub(all) struct AppThreadTurnsListParams {
thread_id : String
cursor : String?
limit : UInt?
sort_direction : AppSortDirection?
} derive(Debug)impl ToJson for AppThreadTurnsListParamspub(all) enum AppThreadUnsubscribeStatus {
AppThreadNotLoaded
AppThreadNotSubscribed
AppThreadUnsubscribed
} derive(Debug)impl FromJson for AppThreadUnsubscribeStatuspub enum AppThreadUserInput {
AppThreadInputText(String, ArrayView[AppTextElement])
AppThreadInputImage(String)
AppThreadInputLocalImage(String)
AppThreadInputSkill(String, String)
AppThreadInputMention(String, String)
} derive(Debug)impl FromJson for AppThreadUserInputpub struct AppTokenUsageBreakdown {
total_tokens : Int64
input_tokens : Int64
cached_input_tokens : Int64
output_tokens : Int64
reasoning_output_tokens : Int64
} derive(Debug)impl FromJson for AppTokenUsageBreakdownpub enum AppToolApproval {
AppToolApprovalAuto
AppToolApprovalPrompt
AppToolApprovalApprove
} derive(Debug)impl FromJson for AppToolApprovalpub(all) struct AppToolRequestUserInputQuestion {
id : String
header : String
question : String
is_other : Bool
is_secret : Bool
options : ArrayView[AppToolRequestUserInputOption]?
} derive(Debug)impl FromJson for AppToolRequestUserInputQuestionfn from_json(value : Json, path : JsonPath) -> AppToolRequestUserInputQuestion raise JsonDecodeErrorpub(all) struct AppToolRequestUserInputRequest {
thread_id : String
turn_id : String
item_id : String
questions : ArrayView[AppToolRequestUserInputQuestion]
// private fields
} derive(Debug)impl FromJson for AppToolRequestUserInputRequestpub struct AppTurn {
id : String
items : ArrayView[AppThreadItem]
status : AppTurnStatus
error : AppTurnError?
started_at : Int64?
completed_at : Int64?
duration_ms : Int64?
// private fields
} derive(Debug)pub struct AppTurnError {
message : String
codex_error_info : AppCodexErrorInfo?
additional_details : String?
// private fields
} derive(Debug)impl FromJson for AppTurnErrorimpl ToJson for AppTurnInterruptParamspub(all) enum AppTurnPlanStepStatus {
AppTurnPlanPending
AppTurnPlanInProgress
AppTurnPlanCompleted
} derive(Debug)impl FromJson for AppTurnPlanStepStatuspub struct AppTurnStartOptions {
cwd : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
sandbox_policy : AppSandboxPolicy?
model : String?
service_tier : AppNullableString?
effort : AppReasoningEffort?
summary : AppReasoningSummary?
personality : AppPersonality?
output_schema : Json?
} derive(Default, Debug)fn AppTurnStartOptions::new(cwd? : String, approval_policy? : AppApprovalPolicy, approvals_reviewer? : AppApprovalsReviewer, sandbox_policy? : AppSandboxPolicy, model? : String, service_tier? : AppNullableString, effort? : AppReasoningEffort, summary? : AppReasoningSummary, personality? : AppPersonality, output_schema? : Json) -> AppTurnStartOptionspub struct AppTurnStartParams {
thread_id : String
input : Array[AppUserInput]
cwd : String?
approval_policy : AppApprovalPolicy?
approvals_reviewer : AppApprovalsReviewer?
sandbox_policy : AppSandboxPolicy?
model : String?
service_tier : AppNullableString?
effort : AppReasoningEffort?
summary : AppReasoningSummary?
personality : AppPersonality?
output_schema : Json?
} derive(Debug)impl ToJson for AppTurnStartParamsfn AppTurnStartParams::new(thread_id : String, input : Array[AppUserInput], cwd? : String, approval_policy? : AppApprovalPolicy, approvals_reviewer? : AppApprovalsReviewer, sandbox_policy? : AppSandboxPolicy, model? : String, service_tier? : AppNullableString, effort? : AppReasoningEffort, summary? : AppReasoningSummary, personality? : AppPersonality, output_schema? : Json) -> AppTurnStartParamsimpl FromJson for AppTurnStartResponsepub struct AppTurnSteerParams {
thread_id : String
input : Array[AppUserInput]
expected_turn_id : String
} derive(Debug)impl ToJson for AppTurnSteerParamsfn AppTurnSteerParams::new(thread_id : String, input : Array[AppUserInput], expected_turn_id : String) -> AppTurnSteerParamspub struct AppTurnStream {
thread_id : String
turn_id : String
// private fields
}pub(all) enum AppUserInput {
AppInputText(String)
AppInputImage(String)
AppInputLocalImage(String)
AppInputSkill(String, String)
AppInputMention(String, String)
} derive(Debug)impl ToJson for AppUserInputpub enum AppWebSearchContextSize {
AppWebSearchContextLow
AppWebSearchContextMedium
AppWebSearchContextHigh
} derive(Debug)impl FromJson for AppWebSearchContextSizepub struct AppWebSearchLocation {
country : String?
region : String?
city : String?
timezone : String?
} derive(Debug)impl FromJson for AppWebSearchLocationpub struct AppWebSearchToolConfig {
context_size : AppWebSearchContextSize?
allowed_domains : ArrayView[String]?
location : AppWebSearchLocation?
} derive(Debug)impl FromJson for AppWebSearchToolConfigpub(all) enum AppWindowsSandboxSetupMode {
AppWindowsSandboxElevated
AppWindowsSandboxUnelevated
} derive(Debug)pub(all) struct AppWindowsSandboxSetupStartParams {
mode : AppWindowsSandboxSetupMode
cwd : String?
} derive(Debug)impl ToJson for AppWindowsSandboxSetupStartParamsfn from_json(value : Json, path : JsonPath) -> AppWindowsSandboxSetupStartResponse raise JsonDecodeErrorpub(all) enum ApprovalMode {
Never
OnRequest
OnFailure
Untrusted
}impl Show for ApprovalModetype Codexasync fn[R] Codex::with_app_server(self : Codex, options? : AppServerOptions, request_handler? : async (AppServerRequest) -> AppServerResponse, body : async (CodexAppConnection) -> R) -> Rasync fn[R] Codex::with_app_server_session(self : Codex, options? : AppServerOptions, request_handler? : async (AppServerRequest) -> AppServerResponse, body : async (CodexAppSession) -> R) -> Rtype CodexAppConnectionasync fn CodexAppConnection::account_login_cancel(self : CodexAppConnection, params : AppCancelLoginAccountParams) -> AppAccountLoginCancelResponseasync fn CodexAppConnection::account_login_start(self : CodexAppConnection, params : AppLoginAccountParams) -> AppAccountLoginStartResponseasync fn CodexAppConnection::account_rate_limits_read(self : CodexAppConnection) -> AppAccountRateLimitsReadResponseasync fn CodexAppConnection::account_read(self : CodexAppConnection, params : AppAccountReadParams) -> AppAccountReadResponseasync fn CodexAppConnection::account_send_add_credits_nudge_email(self : CodexAppConnection, params : AppSendAddCreditsNudgeEmailParams) -> AppAccountSendAddCreditsNudgeEmailResponseasync fn CodexAppConnection::app_list(self : CodexAppConnection, params? : AppListParams) -> AppListResponseasync fn CodexAppConnection::collaboration_mode_list(self : CodexAppConnection) -> AppCollaborationModeListResponseasync fn CodexAppConnection::command_exec(self : CodexAppConnection, params : AppCommandExecParams) -> AppCommandExecResponseasync fn CodexAppConnection::command_exec_resize(self : CodexAppConnection, params : AppCommandExecResizeParams) -> Unitasync fn CodexAppConnection::command_exec_terminate(self : CodexAppConnection, params : AppCommandExecProcessParams) -> Unitasync fn CodexAppConnection::command_exec_write(self : CodexAppConnection, params : AppCommandExecWriteParams) -> Unitasync fn CodexAppConnection::config_batch_write(self : CodexAppConnection, params : AppConfigBatchWriteParams) -> AppConfigBatchWriteResponseasync fn CodexAppConnection::config_read(self : CodexAppConnection, params : AppConfigReadParams) -> AppConfigReadResponseasync fn CodexAppConnection::config_requirements_read(self : CodexAppConnection) -> AppConfigRequirementsReadResponseasync fn CodexAppConnection::config_value_write(self : CodexAppConnection, params : AppConfigValueWriteParams) -> AppConfigValueWriteResponseasync fn CodexAppConnection::experimental_feature_enablement_set(self : CodexAppConnection, params : AppExperimentalFeatureEnablementSetParams) -> AppExperimentalFeatureEnablementSetResponseasync fn CodexAppConnection::experimental_feature_list(self : CodexAppConnection, params : AppCursorLimitParams) -> AppExperimentalFeatureListResponseasync fn CodexAppConnection::external_agent_config_detect(self : CodexAppConnection, params : AppExternalAgentConfigDetectParams) -> AppExternalAgentConfigDetectResponseasync fn CodexAppConnection::external_agent_config_import(self : CodexAppConnection, params : AppExternalAgentConfigImportParams) -> Unitasync fn CodexAppConnection::feedback_upload(self : CodexAppConnection, params : AppFeedbackUploadParams) -> AppFeedbackUploadResponseasync fn CodexAppConnection::fs_create_directory(self : CodexAppConnection, params : AppFsCreateDirectoryParams) -> Unitasync fn CodexAppConnection::fs_get_metadata(self : CodexAppConnection, params : AppFsPathParams) -> AppFsGetMetadataResponseasync fn CodexAppConnection::fs_read_directory(self : CodexAppConnection, params : AppFsPathParams) -> AppFsReadDirectoryResponseasync fn CodexAppConnection::fs_read_file(self : CodexAppConnection, params : AppFsPathParams) -> AppFsReadFileResponseasync fn CodexAppConnection::fs_remove(self : CodexAppConnection, params : AppFsRemoveParams) -> Unitasync fn CodexAppConnection::fs_unwatch(self : CodexAppConnection, params : AppFsUnwatchParams) -> Unitasync fn CodexAppConnection::fs_watch(self : CodexAppConnection, params : AppFsWatchParams) -> AppFsWatchResponseasync fn CodexAppConnection::fs_write_file(self : CodexAppConnection, params : AppFsWriteFileParams) -> Unitasync fn CodexAppConnection::fuzzy_file_search(self : CodexAppConnection, params : AppFuzzyFileSearchParams) -> AppFuzzyFileSearchResponseasync fn CodexAppConnection::fuzzy_file_search_session_start(self : CodexAppConnection, params : AppFuzzyFileSearchSessionStartParams) -> Unitasync fn CodexAppConnection::fuzzy_file_search_session_stop(self : CodexAppConnection, params : AppFuzzyFileSearchSessionStopParams) -> Unitasync fn CodexAppConnection::fuzzy_file_search_session_update(self : CodexAppConnection, params : AppFuzzyFileSearchSessionUpdateParams) -> Unitasync fn CodexAppConnection::hooks_list(self : CodexAppConnection, params : AppHooksListParams) -> AppHooksListResponseasync fn CodexAppConnection::marketplace_add(self : CodexAppConnection, params : AppMarketplaceAddParams) -> AppMarketplaceAddResponseasync fn CodexAppConnection::marketplace_remove(self : CodexAppConnection, params : AppMarketplaceRemoveParams) -> AppMarketplaceRemoveResponseasync fn CodexAppConnection::marketplace_upgrade(self : CodexAppConnection, params : AppMarketplaceUpgradeParams) -> AppMarketplaceUpgradeResponseasync fn CodexAppConnection::mcp_server_oauth_login(self : CodexAppConnection, params : AppMcpServerOauthLoginParams) -> AppMcpServerOauthLoginResponseasync fn CodexAppConnection::mcp_server_resource_read(self : CodexAppConnection, params : AppMcpResourceReadParams) -> AppMcpServerResourceReadResponseasync fn CodexAppConnection::mcp_server_status_list(self : CodexAppConnection, params : AppMcpServerStatusListParams) -> AppMcpServerStatusListResponseasync fn CodexAppConnection::mcp_server_tool_call(self : CodexAppConnection, params : AppMcpServerToolCallParams) -> AppMcpServerToolCallResponseasync fn CodexAppConnection::mock_experimental_method(self : CodexAppConnection, params : AppMockExperimentalMethodParams) -> AppMockExperimentalMethodResponseasync fn CodexAppConnection::model_list(self : CodexAppConnection, params? : AppModelListParams) -> AppModelListResponseasync fn CodexAppConnection::model_provider_capabilities_read(self : CodexAppConnection) -> AppModelProviderCapabilitiesReadResponseasync fn CodexAppConnection::plugin_install(self : CodexAppConnection, params : AppPluginInstallParams) -> AppPluginInstallResponseasync fn CodexAppConnection::plugin_list(self : CodexAppConnection, params : AppPluginListParams) -> AppPluginListResponseasync fn CodexAppConnection::plugin_read(self : CodexAppConnection, params : AppPluginReadParams) -> AppPluginReadResponseasync fn CodexAppConnection::plugin_uninstall(self : CodexAppConnection, params : AppPluginUninstallParams) -> Unitasync fn CodexAppConnection::review_start(self : CodexAppConnection, params : AppReviewStartParams) -> AppReviewStartResponseasync fn CodexAppConnection::skills_config_write(self : CodexAppConnection, params : AppSkillsConfigWriteParams) -> AppSkillsConfigWriteResponseasync fn CodexAppConnection::skills_list(self : CodexAppConnection, params? : AppSkillsListParams) -> AppSkillsListResponseasync fn CodexAppConnection::thread_approve_guardian_denied_action(self : CodexAppConnection, params : AppThreadApproveGuardianDeniedActionParams) -> Unitasync fn CodexAppConnection::thread_archive(self : CodexAppConnection, params : AppThreadIdParams) -> Unitasync fn CodexAppConnection::thread_background_terminals_clean(self : CodexAppConnection, params : AppThreadIdParams) -> Unitasync fn CodexAppConnection::thread_compact_start(self : CodexAppConnection, params : AppThreadIdParams) -> Unitasync fn CodexAppConnection::thread_decrement_elicitation(self : CodexAppConnection, params : AppThreadElicitationCounterParams) -> AppThreadElicitationCounterResponseasync fn CodexAppConnection::thread_fork(self : CodexAppConnection, params : AppThreadForkParams) -> AppThreadForkResponseasync fn CodexAppConnection::thread_goal_clear(self : CodexAppConnection, params : AppThreadIdParams) -> AppThreadGoalClearResponseasync fn CodexAppConnection::thread_goal_get(self : CodexAppConnection, params : AppThreadIdParams) -> AppThreadGoalGetResponseasync fn CodexAppConnection::thread_goal_set(self : CodexAppConnection, params : AppThreadGoalSetParams) -> AppThreadGoalSetResponseasync fn CodexAppConnection::thread_increment_elicitation(self : CodexAppConnection, params : AppThreadElicitationCounterParams) -> AppThreadElicitationCounterResponseasync fn CodexAppConnection::thread_inject_items(self : CodexAppConnection, params : AppThreadInjectItemsParams) -> Unitasync fn CodexAppConnection::thread_list(self : CodexAppConnection, params? : AppThreadListParams) -> AppThreadListResponseasync fn CodexAppConnection::thread_loaded_list(self : CodexAppConnection, params? : AppThreadLoadedListParams) -> AppThreadLoadedListResponseasync fn CodexAppConnection::thread_memory_mode_set(self : CodexAppConnection, params : AppThreadMemoryModeSetParams) -> Unitasync fn CodexAppConnection::thread_metadata_update(self : CodexAppConnection, params : AppThreadMetadataUpdateParams) -> AppThreadMetadataUpdateResponseasync fn CodexAppConnection::thread_read(self : CodexAppConnection, params : AppThreadReadParams) -> AppThreadReadResponseasync fn CodexAppConnection::thread_realtime_append_audio(self : CodexAppConnection, params : AppThreadRealtimeAppendAudioParams) -> Unitasync fn CodexAppConnection::thread_realtime_append_text(self : CodexAppConnection, params : AppThreadRealtimeAppendTextParams) -> Unitasync fn CodexAppConnection::thread_realtime_list_voices(self : CodexAppConnection) -> AppThreadRealtimeListVoicesResponseasync fn CodexAppConnection::thread_realtime_start(self : CodexAppConnection, params : AppThreadRealtimeStartParams) -> Unitasync fn CodexAppConnection::thread_realtime_stop(self : CodexAppConnection, params : AppThreadIdParams) -> Unitasync fn CodexAppConnection::thread_resume(self : CodexAppConnection, params : AppThreadResumeParams) -> AppThreadResumeResponseasync fn CodexAppConnection::thread_rollback(self : CodexAppConnection, params : AppThreadRollbackParams) -> AppThreadRollbackResponseasync fn CodexAppConnection::thread_set_name(self : CodexAppConnection, params : AppThreadSetNameParams) -> Unitasync fn CodexAppConnection::thread_shell_command(self : CodexAppConnection, params : AppThreadShellCommandParams) -> Unitasync fn CodexAppConnection::thread_start(self : CodexAppConnection, params? : AppThreadStartParams) -> AppThreadStartResponseasync fn CodexAppConnection::thread_turns_list(self : CodexAppConnection, params : AppThreadTurnsListParams) -> AppThreadTurnsListResponseasync fn CodexAppConnection::thread_unarchive(self : CodexAppConnection, params : AppThreadIdParams) -> AppThreadReadResponseasync fn CodexAppConnection::thread_unsubscribe(self : CodexAppConnection, params : AppThreadIdParams) -> AppThreadUnsubscribeResponseasync fn CodexAppConnection::turn_interrupt(self : CodexAppConnection, params : AppTurnInterruptParams) -> Unitasync fn CodexAppConnection::turn_start(self : CodexAppConnection, params : AppTurnStartParams) -> AppTurnStartResponseasync fn CodexAppConnection::turn_steer(self : CodexAppConnection, params : AppTurnSteerParams) -> AppTurnSteerResponseasync fn CodexAppConnection::windows_sandbox_setup_start(self : CodexAppConnection, params : AppWindowsSandboxSetupStartParams) -> AppWindowsSandboxSetupStartResponsepub struct CodexAppSession {
// private fields
}async fn CodexAppSession::account_login_cancel(self : CodexAppSession, params : AppCancelLoginAccountParams) -> AppAccountLoginCancelResponseasync fn CodexAppSession::account_login_start(self : CodexAppSession, params : AppLoginAccountParams) -> AppAccountLoginStartResponseasync fn CodexAppSession::account_rate_limits_read(self : CodexAppSession) -> AppAccountRateLimitsReadResponseasync fn CodexAppSession::account_read(self : CodexAppSession, params : AppAccountReadParams) -> AppAccountReadResponseasync fn CodexAppSession::account_send_add_credits_nudge_email(self : CodexAppSession, params : AppSendAddCreditsNudgeEmailParams) -> AppAccountSendAddCreditsNudgeEmailResponseasync fn CodexAppSession::app_list(self : CodexAppSession, params? : AppListParams) -> AppListResponseasync fn CodexAppSession::collaboration_mode_list(self : CodexAppSession) -> AppCollaborationModeListResponseasync fn CodexAppSession::command_exec(self : CodexAppSession, params : AppCommandExecParams) -> AppCommandExecResponseasync fn CodexAppSession::command_exec_resize(self : CodexAppSession, params : AppCommandExecResizeParams) -> Unitasync fn CodexAppSession::command_exec_terminate(self : CodexAppSession, params : AppCommandExecProcessParams) -> Unitasync fn CodexAppSession::command_exec_write(self : CodexAppSession, params : AppCommandExecWriteParams) -> Unitasync fn CodexAppSession::config_batch_write(self : CodexAppSession, params : AppConfigBatchWriteParams) -> AppConfigBatchWriteResponseasync fn CodexAppSession::config_read(self : CodexAppSession, params : AppConfigReadParams) -> AppConfigReadResponseasync fn CodexAppSession::config_requirements_read(self : CodexAppSession) -> AppConfigRequirementsReadResponseasync fn CodexAppSession::config_value_write(self : CodexAppSession, params : AppConfigValueWriteParams) -> AppConfigValueWriteResponseasync fn CodexAppSession::experimental_feature_enablement_set(self : CodexAppSession, params : AppExperimentalFeatureEnablementSetParams) -> AppExperimentalFeatureEnablementSetResponseasync fn CodexAppSession::experimental_feature_list(self : CodexAppSession, params : AppCursorLimitParams) -> AppExperimentalFeatureListResponseasync fn CodexAppSession::external_agent_config_detect(self : CodexAppSession, params : AppExternalAgentConfigDetectParams) -> AppExternalAgentConfigDetectResponseasync fn CodexAppSession::external_agent_config_import(self : CodexAppSession, params : AppExternalAgentConfigImportParams) -> Unitasync fn CodexAppSession::feedback_upload(self : CodexAppSession, params : AppFeedbackUploadParams) -> AppFeedbackUploadResponseasync fn CodexAppSession::fs_create_directory(self : CodexAppSession, params : AppFsCreateDirectoryParams) -> Unitasync fn CodexAppSession::fs_get_metadata(self : CodexAppSession, params : AppFsPathParams) -> AppFsGetMetadataResponseasync fn CodexAppSession::fs_read_directory(self : CodexAppSession, params : AppFsPathParams) -> AppFsReadDirectoryResponseasync fn CodexAppSession::fs_read_file(self : CodexAppSession, params : AppFsPathParams) -> AppFsReadFileResponseasync fn CodexAppSession::fs_watch(self : CodexAppSession, params : AppFsWatchParams) -> AppFsWatchResponseasync fn CodexAppSession::fs_write_file(self : CodexAppSession, params : AppFsWriteFileParams) -> Unitasync fn CodexAppSession::fuzzy_file_search(self : CodexAppSession, params : AppFuzzyFileSearchParams) -> AppFuzzyFileSearchResponseasync fn CodexAppSession::fuzzy_file_search_session_start(self : CodexAppSession, params : AppFuzzyFileSearchSessionStartParams) -> Unitasync fn CodexAppSession::fuzzy_file_search_session_stop(self : CodexAppSession, params : AppFuzzyFileSearchSessionStopParams) -> Unitasync fn CodexAppSession::fuzzy_file_search_session_update(self : CodexAppSession, params : AppFuzzyFileSearchSessionUpdateParams) -> Unitasync fn CodexAppSession::hooks_list(self : CodexAppSession, params : AppHooksListParams) -> AppHooksListResponseasync fn CodexAppSession::marketplace_add(self : CodexAppSession, params : AppMarketplaceAddParams) -> AppMarketplaceAddResponseasync fn CodexAppSession::marketplace_remove(self : CodexAppSession, params : AppMarketplaceRemoveParams) -> AppMarketplaceRemoveResponseasync fn CodexAppSession::marketplace_upgrade(self : CodexAppSession, params : AppMarketplaceUpgradeParams) -> AppMarketplaceUpgradeResponseasync fn CodexAppSession::mcp_server_oauth_login(self : CodexAppSession, params : AppMcpServerOauthLoginParams) -> AppMcpServerOauthLoginResponseasync fn CodexAppSession::mcp_server_resource_read(self : CodexAppSession, params : AppMcpResourceReadParams) -> AppMcpServerResourceReadResponseasync fn CodexAppSession::mcp_server_status_list(self : CodexAppSession, params : AppMcpServerStatusListParams) -> AppMcpServerStatusListResponseasync fn CodexAppSession::mcp_server_tool_call(self : CodexAppSession, params : AppMcpServerToolCallParams) -> AppMcpServerToolCallResponseasync fn CodexAppSession::mock_experimental_method(self : CodexAppSession, params : AppMockExperimentalMethodParams) -> AppMockExperimentalMethodResponseasync fn CodexAppSession::model_list(self : CodexAppSession, params? : AppModelListParams) -> AppModelListResponseasync fn CodexAppSession::model_provider_capabilities_read(self : CodexAppSession) -> AppModelProviderCapabilitiesReadResponseasync fn CodexAppSession::plugin_install(self : CodexAppSession, params : AppPluginInstallParams) -> AppPluginInstallResponseasync fn CodexAppSession::plugin_list(self : CodexAppSession, params : AppPluginListParams) -> AppPluginListResponseasync fn CodexAppSession::plugin_read(self : CodexAppSession, params : AppPluginReadParams) -> AppPluginReadResponseasync fn CodexAppSession::plugin_uninstall(self : CodexAppSession, params : AppPluginUninstallParams) -> Unitasync fn CodexAppSession::resume_thread(self : CodexAppSession, params : AppThreadResumeParams, request_handler? : async (AppServerRequest) -> AppServerResponse) -> CodexAppThreadasync fn CodexAppSession::review_start(self : CodexAppSession, params : AppReviewStartParams) -> AppReviewStartResponseasync fn CodexAppSession::skills_config_write(self : CodexAppSession, params : AppSkillsConfigWriteParams) -> AppSkillsConfigWriteResponseasync fn CodexAppSession::skills_list(self : CodexAppSession, params? : AppSkillsListParams) -> AppSkillsListResponseasync fn CodexAppSession::start_thread(self : CodexAppSession, params? : AppThreadStartParams, request_handler? : async (AppServerRequest) -> AppServerResponse) -> CodexAppThreadasync fn CodexAppSession::thread_approve_guardian_denied_action(self : CodexAppSession, params : AppThreadApproveGuardianDeniedActionParams) -> Unitasync fn CodexAppSession::thread_archive(self : CodexAppSession, params : AppThreadIdParams) -> Unitasync fn CodexAppSession::thread_background_terminals_clean(self : CodexAppSession, params : AppThreadIdParams) -> Unitasync fn CodexAppSession::thread_compact_start(self : CodexAppSession, params : AppThreadIdParams) -> Unitasync fn CodexAppSession::thread_decrement_elicitation(self : CodexAppSession, params : AppThreadElicitationCounterParams) -> AppThreadElicitationCounterResponseasync fn CodexAppSession::thread_fork(self : CodexAppSession, params : AppThreadForkParams) -> AppThreadForkResponseasync fn CodexAppSession::thread_goal_clear(self : CodexAppSession, params : AppThreadIdParams) -> AppThreadGoalClearResponseasync fn CodexAppSession::thread_goal_get(self : CodexAppSession, params : AppThreadIdParams) -> AppThreadGoalGetResponseasync fn CodexAppSession::thread_goal_set(self : CodexAppSession, params : AppThreadGoalSetParams) -> AppThreadGoalSetResponseasync fn CodexAppSession::thread_increment_elicitation(self : CodexAppSession, params : AppThreadElicitationCounterParams) -> AppThreadElicitationCounterResponseasync fn CodexAppSession::thread_inject_items(self : CodexAppSession, params : AppThreadInjectItemsParams) -> Unitasync fn CodexAppSession::thread_list(self : CodexAppSession, params? : AppThreadListParams) -> AppThreadListResponseasync fn CodexAppSession::thread_loaded_list(self : CodexAppSession, params? : AppThreadLoadedListParams) -> AppThreadLoadedListResponseasync fn CodexAppSession::thread_memory_mode_set(self : CodexAppSession, params : AppThreadMemoryModeSetParams) -> Unitasync fn CodexAppSession::thread_metadata_update(self : CodexAppSession, params : AppThreadMetadataUpdateParams) -> AppThreadMetadataUpdateResponseasync fn CodexAppSession::thread_read(self : CodexAppSession, params : AppThreadReadParams) -> AppThreadReadResponseasync fn CodexAppSession::thread_realtime_append_audio(self : CodexAppSession, params : AppThreadRealtimeAppendAudioParams) -> Unitasync fn CodexAppSession::thread_realtime_append_text(self : CodexAppSession, params : AppThreadRealtimeAppendTextParams) -> Unitasync fn CodexAppSession::thread_realtime_list_voices(self : CodexAppSession) -> AppThreadRealtimeListVoicesResponseasync fn CodexAppSession::thread_realtime_start(self : CodexAppSession, params : AppThreadRealtimeStartParams) -> Unitasync fn CodexAppSession::thread_realtime_stop(self : CodexAppSession, params : AppThreadIdParams) -> Unitasync fn CodexAppSession::thread_resume(self : CodexAppSession, params : AppThreadResumeParams) -> AppThreadResumeResponseasync fn CodexAppSession::thread_rollback(self : CodexAppSession, params : AppThreadRollbackParams) -> AppThreadRollbackResponseasync fn CodexAppSession::thread_set_name(self : CodexAppSession, params : AppThreadSetNameParams) -> Unitasync fn CodexAppSession::thread_shell_command(self : CodexAppSession, params : AppThreadShellCommandParams) -> Unitasync fn CodexAppSession::thread_start(self : CodexAppSession, params? : AppThreadStartParams) -> AppThreadStartResponseasync fn CodexAppSession::thread_turns_list(self : CodexAppSession, params : AppThreadTurnsListParams) -> AppThreadTurnsListResponseasync fn CodexAppSession::thread_unarchive(self : CodexAppSession, params : AppThreadIdParams) -> AppThreadReadResponseasync fn CodexAppSession::thread_unsubscribe(self : CodexAppSession, params : AppThreadIdParams) -> AppThreadUnsubscribeResponseasync fn CodexAppSession::turn_interrupt(self : CodexAppSession, params : AppTurnInterruptParams) -> Unitasync fn CodexAppSession::turn_start(self : CodexAppSession, params : AppTurnStartParams) -> AppTurnStartResponseasync fn CodexAppSession::turn_steer(self : CodexAppSession, params : AppTurnSteerParams) -> AppTurnSteerResponseasync fn CodexAppSession::windows_sandbox_setup_start(self : CodexAppSession, params : AppWindowsSandboxSetupStartParams) -> AppWindowsSandboxSetupStartResponsepub struct CodexAppThread {
thread : AppThread
model : String
model_provider : String
service_tier : String?
cwd : String
instruction_sources : ArrayView[String]
approval_policy : AppApprovalPolicy
approvals_reviewer : AppApprovalsReviewer
sandbox : AppSandboxPolicy
reasoning_effort : AppReasoningEffort?
// private fields
}async fn CodexAppThread::read(self : CodexAppThread, include_turns? : Bool) -> AppThreadReadResponseasync fn CodexAppThread::run_streamed(self : CodexAppThread, input : Array[AppUserInput], options? : AppTurnStartOptions, request_handler? : async (AppServerRequest) -> AppServerResponse) -> AppTurnStreamfn CodexAppThread::set_request_handler(self : CodexAppThread, request_handler? : async (AppServerRequest) -> AppServerResponse) -> Unitasync fn CodexAppThread::start_turn(self : CodexAppThread, input : Array[AppUserInput], options? : AppTurnStartOptions) -> AppTurnStartResponsefn CodexOptions::new(codex_path_override? : String, base_url? : String, api_key? : String, env? : Map[String, String]) -> CodexOptionsimpl ToJson for CollabAgentStateimpl FromJson for CollabAgentStatepub enum CollabAgentStatus {
PendingInit
Running
Interrupted
Completed
Errored
Shutdown
NotFound
} derive(Debug)impl Show for CollabAgentStatusimpl ToJson for CollabAgentStatusimpl FromJson for CollabAgentStatusimpl Show for CollabToolimpl ToJson for CollabToolimpl FromJson for CollabToolimpl Show for CollabToolCallStatusimpl ToJson for CollabToolCallStatusimpl FromJson for CollabToolCallStatusimpl Show for CommandExecutionStatusimpl ToJson for CommandExecutionStatusimpl FromJson for CommandExecutionStatuspub enum Event {
ThreadStarted(String)
TurnStarted
TurnCompleted(Usage)
TurnFailed(ThreadError)
ItemStarted(ThreadItem)
ItemUpdated(ThreadItem)
ItemCompleted(ThreadItem)
ThreadErrorEvent(String)
}impl Show for McpToolCallStatusimpl ToJson for McpToolCallStatusimpl FromJson for McpToolCallStatuspub(all) enum ModelReasoningEffort {
Minimal
Low
High
Xhigh
}impl Show for ModelReasoningEffortimpl Show for PatchApplyStatusimpl ToJson for PatchApplyStatusimpl FromJson for PatchApplyStatusimpl Show for PatchChangeKindimpl ToJson for PatchChangeKindimpl FromJson for PatchChangeKindimpl Show for SandboxModeimpl ToJson for SandboxModeimpl FromJson for SandboxModetype Threadasync fn[G] Thread::run_streamed(self : Thread, prompt : String, extra_input? : Array[UserInput], turn_options? : TurnOptions, taskgroup : TaskGroup[G]) -> StreamedTurnpub enum ThreadItem {
AgentMessageItem(String, String)
ReasoningItem(String, String)
CommandExecutionItem(String, String, String, Int?, CommandExecutionStatus)
FileChangeItem(String, Array[FileUpdateChange], PatchApplyStatus)
McpToolCallItem(String, String, String, McpToolCallStatus, Json?, Result[McpToolCallResult, String]?)
CollabToolCallItem(String, CollabTool, String, Array[String], String?, Map[String, CollabAgentState], CollabToolCallStatus)
WebSearchItem(String, String)
TodoListItem(String, Array[TodoItem])
ErrorItem(String, String)
} derive(Debug)fn ThreadOptions::new(model? : String, sandbox_mode? : SandboxMode, working_directory? : String, skip_git_repo_check? : Bool, model_reasoning_effort? : ModelReasoningEffort, network_access_enabled? : Bool, web_search_enabled? : Bool, approval_policy? : ApprovalMode, additional_directories? : Array[String]) -> ThreadOptions#alias(RunResult)
pub struct Turn {
items : Array[ThreadItem]
final_response : String
usage : Usage?
}Codex SDK, with some useful tools for building AI applications.
Dependencies