Documentation
¶
Overview ¶
Package types exposes native app-server parameters, results, and recursive model types from the exact official Codex revision recorded in the generated source. Experimental fields are included; using them may require negotiating experimentalApi during initialization.
Optional fields use Optional to distinguish omission, explicit null, and present zero values. Required nullable fields encode an unset Optional as null. Missing required members and malformed known variants fail decoding. Unknown object members are retained in UnknownFields, and unknown union variants in Unknown, so future data can be inspected and round-tripped without float64 coercion. String enums accept future values.
A union has one pointer field per native variant and an Unknown raw fallback. Set exactly one field, using Ptr if convenient. Object variants automatically emit their constant type discriminator. Required empty arrays encode as [] even when the Go slice is nil. UnknownFields must not duplicate known fields.
Domain constraints such as absolute-path validation and experimental feature gates remain server-enforced.
These types are protocol bindings, not evidence of live-server compatibility.
Index ¶
- Constants
- func Ptr[T any](value T) *T
- type AbsolutePathBuf
- type AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision
- type AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment
- type ActivePermissionProfile
- type ActiveThreadStatus
- type ActiveThreadStatusType
- type ActiveTurnNotSteerableCodexErrorInfo
- type ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable
- type AddFileChange
- type AddFileChangeType
- type AddPatchChangeKind
- type AddPatchChangeKindType
- type AdditionalContextEntry
- type AdditionalContextKind
- type AdditionalFileSystemPermissions
- type AdditionalNetworkPermissions
- type AdditionalPermissionProfile
- type AdditionalToolsResponseItem
- type AdditionalToolsResponseItemType
- type AgentMessageDelivery
- type AgentMessageDeltaNotification
- type AgentMessageInputContent
- type AgentMessageResponseItem
- type AgentMessageResponseItemType
- type AgentMessageThreadItem
- type AgentMessageThreadItemType
- type AgentPath
- type ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision
- type ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment
- type ApplyPatchApprovalParams
- type ApplyPatchApprovalResponse
- type ApprovalPolicy
- type ApprovalsReviewer
- type ApprovedExecpolicyAmendmentReviewDecision
- type ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment
- type AskForApproval
- type AskForApprovalValuedeprecated
- type AsyncUserInputQuestion
- type AudioUserInput
- type AudioUserInputType
- type ByteRange
- type CapabilityRootLocation
- type ClientInfo
- type CodexErrorInfo
- type CodexErrorInfoValue
- type CollabAgentState
- type CollabAgentStatus
- type CollabAgentTool
- type CollabAgentToolCallStatus
- type CollabAgentToolCallThreadItem
- type CollabAgentToolCallThreadItemType
- type CollaborationMode
- type CommandAction
- type CommandExecutionApprovalDecision
- type CommandExecutionApprovalDecisionValue
- type CommandExecutionApprovalKind
- type CommandExecutionRequestApprovalParams
- type CommandExecutionRequestApprovalResponse
- type CommandExecutionSource
- type CommandExecutionStatus
- type CommandExecutionThreadItem
- type CommandExecutionThreadItemType
- type CompactionResponseItem
- type CompactionResponseItemType
- type CompactionTriggerResponseItem
- type CompactionTriggerResponseItemType
- type ConfigurationReasoning
- type ConfigurationUpdateResponseItem
- type ConfigurationUpdateResponseItemType
- type ContentItem
- type ContextCompactionResponseItem
- type ContextCompactionResponseItemType
- type ContextCompactionThreadItem
- type ContextCompactionThreadItemType
- type CustomMultiAgentMode
- type CustomSessionSource
- type CustomToolCallOutputResponseItem
- type CustomToolCallOutputResponseItemType
- type CustomToolCallResponseItem
- type CustomToolCallResponseItemType
- type CyberAccessProgram
- type DangerFullAccessSandboxPolicy
- type DangerFullAccessSandboxPolicyType
- type DeleteFileChange
- type DeleteFileChangeType
- type DeletePatchChangeKind
- type DeletePatchChangeKindType
- type DeniedReviewDecision
- type DeniedReviewDecisionDenied
- type DynamicToolCallOutputContentItem
- type DynamicToolCallStatus
- type DynamicToolCallThreadItem
- type DynamicToolCallThreadItemType
- type DynamicToolNamespaceTool
- type DynamicToolSpec
- type EncryptedContentAgentMessageInputContent
- type EncryptedContentAgentMessageInputContentType
- type EncryptedContentFunctionCallOutputContentItem
- type EncryptedContentFunctionCallOutputContentItemType
- type EnteredReviewModeThreadItem
- type EnteredReviewModeThreadItemType
- type EnvironmentCapabilityRootLocation
- type EnvironmentCapabilityRootLocationType
- type ErrorNotification
- type Event
- type EventIdentity
- type ExecCommandApprovalParams
- type ExecCommandApprovalResponse
- type ExecLocalShellAction
- type ExecLocalShellActionType
- type ExitedReviewModeThreadItem
- type ExitedReviewModeThreadItemType
- type ExternalSandboxSandboxPolicy
- type ExternalSandboxSandboxPolicyType
- type FileChange
- type FileChangeApprovalDecision
- type FileChangeRequestApprovalParams
- type FileChangeRequestApprovalResponse
- type FileChangeThreadItem
- type FileChangeThreadItemType
- type FileSystemAccessMode
- type FileSystemPath
- type FileSystemSandboxEntry
- type FileSystemSpecialPath
- type FileSystemSpecialPathVariant5
- type FileSystemSpecialPathVariant5Kind
- type FileUpdateChange
- type FindInPageResponsesAPIWebSearchAction
- type FindInPageResponsesAPIWebSearchActionType
- type FindInPageWebSearchAction
- type FindInPageWebSearchActionType
- type FunctionCallOutputBody
- type FunctionCallOutputContentItem
- type FunctionCallOutputResponseItem
- type FunctionCallOutputResponseItemType
- type FunctionCallOutputThreadItem
- type FunctionCallOutputThreadItemType
- type FunctionCallResponseItem
- type FunctionCallResponseItemType
- type FunctionDynamicToolNamespaceTool
- type FunctionDynamicToolNamespaceToolType
- type FunctionDynamicToolSpec
- type FunctionDynamicToolSpecType
- type GitInfo
- type GlobPatternFileSystemPath
- type GlobPatternFileSystemPathType
- type GrantedPermissionProfile
- type GranularAskForApproval
- type GranularAskForApprovalGranular
- type HTTPConnectionFailedCodexErrorInfo
- type HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed
- type HookPromptFragment
- type HookPromptThreadItem
- type HookPromptThreadItemType
- type IdleThreadStatus
- type IdleThreadStatusType
- type ImageDetail
- type ImageGenerationCallResponseItem
- type ImageGenerationCallResponseItemType
- type ImageGenerationFailure
- type ImageGenerationThreadItem
- type ImageGenerationThreadItemType
- type ImageUserInput
- type ImageUserInputType
- type ImageViewThreadItem
- type ImageViewThreadItemType
- type InitializeCapabilities
- type InitializeParams
- type InitializeResponse
- type InputAudioContentItem
- type InputAudioContentItemType
- type InputAudioDynamicToolCallOutputContentItem
- type InputAudioDynamicToolCallOutputContentItemType
- type InputAudioFunctionCallOutputContentItem
- type InputAudioFunctionCallOutputContentItemType
- type InputImageContentItem
- type InputImageContentItemType
- type InputImageDynamicToolCallOutputContentItem
- type InputImageDynamicToolCallOutputContentItemType
- type InputImageFunctionCallOutputContentItem
- type InputImageFunctionCallOutputContentItemType
- type InputTextAgentMessageInputContent
- type InputTextAgentMessageInputContentType
- type InputTextContentItem
- type InputTextContentItemType
- type InputTextDynamicToolCallOutputContentItem
- type InputTextDynamicToolCallOutputContentItemType
- type InputTextFunctionCallOutputContentItem
- type InputTextFunctionCallOutputContentItemType
- type InternalChatMessageMetadataPassthrough
- type ItemCompletedNotification
- type ItemStartedNotification
- type ItemThreadItemsListAnchor
- type ItemThreadItemsListAnchorType
- type KindFileSystemSpecialPath
- type KindFileSystemSpecialPathKind
- type LegacyAppPathString
- type ListFilesCommandAction
- type ListFilesCommandActionType
- type ListFilesParsedCommand
- type ListFilesParsedCommandType
- type LocalAudioUserInput
- type LocalAudioUserInputType
- type LocalImageUserInput
- type LocalImageUserInputType
- type LocalShellAction
- type LocalShellCallResponseItem
- type LocalShellCallResponseItemType
- type LocalShellStatus
- type MCPAppDisplayMode
- type MCPAppUI
- type MCPToolCallAppContext
- type MCPToolCallError
- type MCPToolCallResult
- type MCPToolCallStatus
- type MCPToolCallThreadItem
- type MCPToolCallThreadItemType
- type MemoryCitation
- type MemoryCitationEntry
- type MentionUserInput
- type MentionUserInputType
- type MessagePhase
- type MessageResponseItem
- type MessageResponseItemType
- type MinimalFileSystemSpecialPath
- type MinimalFileSystemSpecialPathKind
- type MisalignmentErrorDetails
- type MisalignmentSteer
- type ModeKind
- type MultiAgentMode
- type MultiAgentModeValue
- type NamespaceDynamicToolSpec
- type NamespaceDynamicToolSpecType
- type NetworkAccess
- type NetworkApprovalContext
- type NetworkApprovalProtocol
- type NetworkPolicyAmendment
- type NetworkPolicyAmendmentReviewDecision
- type NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment
- type NetworkPolicyRuleAction
- type NonSteerableTurnKind
- type NotLoadedThreadStatus
- type NotLoadedThreadStatusType
- type OpenPageResponsesAPIWebSearchAction
- type OpenPageResponsesAPIWebSearchActionType
- type OpenPageWebSearchAction
- type OpenPageWebSearchActionType
- type Optional
- type OtherResponseItem
- type OtherResponseItemType
- type OtherResponsesAPIWebSearchAction
- type OtherResponsesAPIWebSearchActionType
- type OtherSubAgentSource
- type OtherWebSearchAction
- type OtherWebSearchActionType
- type OutputTextContentItem
- type OutputTextContentItemType
- type ParsedCommand
- type PatchApplyStatus
- type PatchChangeKind
- type PathFileSystemPath
- type PathFileSystemPathType
- type PermissionGrantScope
- type PermissionsRequestApprovalParams
- type PermissionsRequestApprovalResponse
- type Personalitydeprecated
- type PlanThreadItem
- type PlanThreadItemType
- type ReadCommandAction
- type ReadCommandActionType
- type ReadOnlySandboxPolicy
- type ReadOnlySandboxPolicyType
- type ReadParsedCommand
- type ReadParsedCommandType
- type ReasoningEffort
- type ReasoningItemContent
- type ReasoningItemReasoningSummary
- type ReasoningResponseItem
- type ReasoningResponseItemType
- type ReasoningSummary
- type ReasoningTextReasoningItemContent
- type ReasoningTextReasoningItemContentType
- type ReasoningThreadItem
- type ReasoningThreadItemType
- type RequestID
- type RequestPermissionProfile
- type ResponseItem
- type ResponseStreamConnectionFailedCodexErrorInfo
- type ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed
- type ResponseStreamDisconnectedCodexErrorInfo
- type ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected
- type ResponseTooManyFailedAttemptsCodexErrorInfo
- type ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts
- type ResponsesAPIWebSearchAction
- type ReviewDecision
- type ReviewDecisionValue
- type RootFileSystemSpecialPath
- type RootFileSystemSpecialPathKind
- type SandboxMode
- type SandboxPolicy
- type SearchCommandAction
- type SearchCommandActionType
- type SearchParsedCommand
- type SearchParsedCommandType
- type SearchResponsesAPIWebSearchAction
- type SearchResponsesAPIWebSearchActionType
- type SearchWebSearchAction
- type SearchWebSearchActionType
- type SelectedCapabilityRoot
- type ServerRequestResolvedNotification
- type SessionSource
- type SessionSourceValue
- type Settings
- type SkillUserInput
- type SkillUserInputType
- type SlashTmpFileSystemSpecialPath
- type SlashTmpFileSystemSpecialPathKind
- type SleepThreadItem
- type SleepThreadItemType
- type SortDirection
- type SpecialFileSystemPath
- type SpecialFileSystemPathType
- type SubAgentActivityKind
- type SubAgentActivityThreadItem
- type SubAgentActivityThreadItemType
- type SubAgentSessionSource
- type SubAgentSource
- type SubAgentSourceValue
- type SummaryTextReasoningItemReasoningSummary
- type SummaryTextReasoningItemReasoningSummaryType
- type SystemErrorThreadStatus
- type SystemErrorThreadStatusType
- type TextElement
- type TextReasoningItemContent
- type TextReasoningItemContentType
- type TextUserInput
- type TextUserInputType
- type Thread
- type ThreadActiveFlag
- type ThreadArchiveParams
- type ThreadArchiveResponse
- type ThreadEnvironment
- type ThreadExtra
- type ThreadHistoryMode
- type ThreadID
- type ThreadInjectItemsParams
- type ThreadInjectItemsResponse
- type ThreadItem
- type ThreadItemEntry
- type ThreadItemsListAnchor
- type ThreadItemsListCursor
- type ThreadItemsListParams
- type ThreadItemsListResponse
- type ThreadListCwdFilter
- type ThreadListParams
- type ThreadListResponse
- type ThreadReadParams
- type ThreadReadResponse
- type ThreadResumeInitialTurnsPageParams
- type ThreadResumeParams
- type ThreadResumeResponse
- type ThreadSection
- type ThreadSectionAppearance
- type ThreadSettings
- type ThreadSettingsUpdateParams
- type ThreadSettingsUpdateResponse
- type ThreadSettingsUpdatedNotification
- type ThreadSortKey
- type ThreadSource
- type ThreadSourceKind
- type ThreadSpawnSubAgentSource
- type ThreadSpawnSubAgentSourceThreadSpawn
- type ThreadStartParams
- type ThreadStartResponse
- type ThreadStartSource
- type ThreadStatus
- type ThreadTurnsListParams
- type ThreadTurnsListResponse
- type ThreadUnarchiveParams
- type ThreadUnarchiveResponse
- type ThreadUnsubscribeParams
- type ThreadUnsubscribeResponse
- type ThreadUnsubscribeStatus
- type TmpdirFileSystemSpecialPath
- type TmpdirFileSystemSpecialPathKind
- type ToolRequestUserInputAnswer
- type ToolRequestUserInputOption
- type ToolRequestUserInputParams
- type ToolRequestUserInputQuestion
- type ToolRequestUserInputResponse
- type ToolSearchCallResponseItem
- type ToolSearchCallResponseItemType
- type ToolSearchOutputResponseItem
- type ToolSearchOutputResponseItemType
- type Turn
- type TurnCompletedNotification
- type TurnEnvironmentParams
- type TurnError
- type TurnInterruptParams
- type TurnInterruptResponse
- type TurnItemsView
- type TurnStartParams
- type TurnStartResponse
- type TurnStartedNotification
- type TurnStatus
- type TurnToolOutput
- type TurnsPage
- type UnknownCommandAction
- type UnknownCommandActionType
- type UnknownParsedCommand
- type UnknownParsedCommandType
- type UpdateFileChange
- type UpdateFileChangeType
- type UpdatePatchChangeKind
- type UpdatePatchChangeKindType
- type UsageLimitExceededImageGenerationFailure
- type UsageLimitExceededImageGenerationFailureType
- type UserInput
- type UserMessageThreadItem
- type UserMessageThreadItemType
- type W3cTraceContext
- type WebSearchAction
- type WebSearchCallResponseItem
- type WebSearchCallResponseItemType
- type WebSearchThreadItem
- type WebSearchThreadItemType
- type WorkspaceWriteSandboxPolicy
- type WorkspaceWriteSandboxPolicyType
Examples ¶
Constants ¶
const ( // Deprecated: use ApprovalPolicyUntrusted. AskForApprovalValueUntrusted = ApprovalPolicyUntrusted // Deprecated: use ApprovalPolicyOnRequest. AskForApprovalValueOnRequest = ApprovalPolicyOnRequest // Deprecated: use ApprovalPolicyNever. AskForApprovalValueNever = ApprovalPolicyNever )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbsolutePathBuf ¶
type AbsolutePathBuf = string
A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).
IMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.
type AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision ¶
type AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision struct {
AcceptWithExecpolicyAmendment AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment `json:"acceptWithExecpolicyAmendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.
func (AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision) MarshalJSON ¶
func (v AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision) MarshalJSON() ([]byte, error)
func (*AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision) UnmarshalJSON ¶
func (v *AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision) UnmarshalJSON(data []byte) error
type AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment ¶
type AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment struct {
ExecpolicyAmendment []string `json:"execpolicy_amendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment) MarshalJSON ¶
func (v AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment) MarshalJSON() ([]byte, error)
func (*AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment) UnmarshalJSON ¶
func (v *AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment) UnmarshalJSON(data []byte) error
type ActivePermissionProfile ¶
type ActivePermissionProfile struct {
// Parent profile identifier from the selected permissions profile's `extends` setting, when present.
Extends Optional[string] `json:"extends" protocol:"nullable"`
// Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.
ID string `json:"id" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ActivePermissionProfile) MarshalJSON ¶
func (v ActivePermissionProfile) MarshalJSON() ([]byte, error)
func (*ActivePermissionProfile) UnmarshalJSON ¶
func (v *ActivePermissionProfile) UnmarshalJSON(data []byte) error
type ActiveThreadStatus ¶
type ActiveThreadStatus struct {
ActiveFlags []ThreadActiveFlag `json:"activeFlags" protocol:"required"`
Type ActiveThreadStatusType `json:"type" protocol:"required,const=active"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ActiveThreadStatus) MarshalJSON ¶
func (v ActiveThreadStatus) MarshalJSON() ([]byte, error)
func (*ActiveThreadStatus) UnmarshalJSON ¶
func (v *ActiveThreadStatus) UnmarshalJSON(data []byte) error
type ActiveThreadStatusType ¶
type ActiveThreadStatusType string
const (
ActiveThreadStatusTypeActive ActiveThreadStatusType = "active"
)
type ActiveTurnNotSteerableCodexErrorInfo ¶
type ActiveTurnNotSteerableCodexErrorInfo struct {
ActiveTurnNotSteerable ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable `json:"activeTurnNotSteerable" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.
func (ActiveTurnNotSteerableCodexErrorInfo) MarshalJSON ¶
func (v ActiveTurnNotSteerableCodexErrorInfo) MarshalJSON() ([]byte, error)
func (*ActiveTurnNotSteerableCodexErrorInfo) UnmarshalJSON ¶
func (v *ActiveTurnNotSteerableCodexErrorInfo) UnmarshalJSON(data []byte) error
type ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable ¶
type ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable struct {
TurnKind NonSteerableTurnKind `json:"turnKind" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable) MarshalJSON ¶
func (v ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable) MarshalJSON() ([]byte, error)
func (*ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable) UnmarshalJSON ¶
func (v *ActiveTurnNotSteerableCodexErrorInfoActiveTurnNotSteerable) UnmarshalJSON(data []byte) error
type AddFileChange ¶
type AddFileChange struct {
Content string `json:"content" protocol:"required"`
Type AddFileChangeType `json:"type" protocol:"required,const=add"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AddFileChange) MarshalJSON ¶
func (v AddFileChange) MarshalJSON() ([]byte, error)
func (*AddFileChange) UnmarshalJSON ¶
func (v *AddFileChange) UnmarshalJSON(data []byte) error
type AddFileChangeType ¶
type AddFileChangeType string
const (
AddFileChangeTypeAdd AddFileChangeType = "add"
)
type AddPatchChangeKind ¶
type AddPatchChangeKind struct {
Type AddPatchChangeKindType `json:"type" protocol:"required,const=add"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AddPatchChangeKind) MarshalJSON ¶
func (v AddPatchChangeKind) MarshalJSON() ([]byte, error)
func (*AddPatchChangeKind) UnmarshalJSON ¶
func (v *AddPatchChangeKind) UnmarshalJSON(data []byte) error
type AddPatchChangeKindType ¶
type AddPatchChangeKindType string
const (
AddPatchChangeKindTypeAdd AddPatchChangeKindType = "add"
)
type AdditionalContextEntry ¶
type AdditionalContextEntry struct {
Kind AdditionalContextKind `json:"kind" protocol:"required"`
Value string `json:"value" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AdditionalContextEntry) MarshalJSON ¶
func (v AdditionalContextEntry) MarshalJSON() ([]byte, error)
func (*AdditionalContextEntry) UnmarshalJSON ¶
func (v *AdditionalContextEntry) UnmarshalJSON(data []byte) error
type AdditionalContextKind ¶
type AdditionalContextKind string
const ( AdditionalContextKindUntrusted AdditionalContextKind = "untrusted" AdditionalContextKindApplication AdditionalContextKind = "application" )
type AdditionalFileSystemPermissions ¶
type AdditionalFileSystemPermissions struct {
Entries Optional[[]FileSystemSandboxEntry] `json:"entries" protocol:"nullable"`
GlobScanMaxDepth Optional[uint64] `json:"globScanMaxDepth" protocol:"nullable"`
// This will be removed in favor of `entries`.
Read Optional[[]LegacyAppPathString] `json:"read" protocol:"nullable"`
// This will be removed in favor of `entries`.
Write Optional[[]LegacyAppPathString] `json:"write" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AdditionalFileSystemPermissions) MarshalJSON ¶
func (v AdditionalFileSystemPermissions) MarshalJSON() ([]byte, error)
func (*AdditionalFileSystemPermissions) UnmarshalJSON ¶
func (v *AdditionalFileSystemPermissions) UnmarshalJSON(data []byte) error
type AdditionalNetworkPermissions ¶
type AdditionalNetworkPermissions struct {
Enabled Optional[bool] `json:"enabled" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AdditionalNetworkPermissions) MarshalJSON ¶
func (v AdditionalNetworkPermissions) MarshalJSON() ([]byte, error)
func (*AdditionalNetworkPermissions) UnmarshalJSON ¶
func (v *AdditionalNetworkPermissions) UnmarshalJSON(data []byte) error
type AdditionalPermissionProfile ¶
type AdditionalPermissionProfile struct {
FileSystem Optional[AdditionalFileSystemPermissions] `json:"fileSystem" protocol:"nullable"`
// Partial overlay used for per-command permission requests.
Network Optional[AdditionalNetworkPermissions] `json:"network" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AdditionalPermissionProfile) MarshalJSON ¶
func (v AdditionalPermissionProfile) MarshalJSON() ([]byte, error)
func (*AdditionalPermissionProfile) UnmarshalJSON ¶
func (v *AdditionalPermissionProfile) UnmarshalJSON(data []byte) error
type AdditionalToolsResponseItem ¶
type AdditionalToolsResponseItem struct {
ID Optional[string] `json:"id" protocol:"nullable"`
Role string `json:"role" protocol:"required"`
Tools []json.RawMessage `json:"tools" protocol:"required"`
Type AdditionalToolsResponseItemType `json:"type" protocol:"required,const=additional_tools"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AdditionalToolsResponseItem) MarshalJSON ¶
func (v AdditionalToolsResponseItem) MarshalJSON() ([]byte, error)
func (*AdditionalToolsResponseItem) UnmarshalJSON ¶
func (v *AdditionalToolsResponseItem) UnmarshalJSON(data []byte) error
type AdditionalToolsResponseItemType ¶
type AdditionalToolsResponseItemType string
const (
AdditionalToolsResponseItemTypeAdditionalTools AdditionalToolsResponseItemType = "additional_tools"
)
type AgentMessageDelivery ¶
type AgentMessageDelivery string
const (
AgentMessageDeliveryAsync AgentMessageDelivery = "async"
)
type AgentMessageDeltaNotification ¶
type AgentMessageDeltaNotification struct {
Delta string `json:"delta" protocol:"required"`
ItemID string `json:"itemId" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AgentMessageDeltaNotification) MarshalJSON ¶
func (v AgentMessageDeltaNotification) MarshalJSON() ([]byte, error)
func (*AgentMessageDeltaNotification) UnmarshalJSON ¶
func (v *AgentMessageDeltaNotification) UnmarshalJSON(data []byte) error
type AgentMessageInputContent ¶
type AgentMessageInputContent struct {
InputText *InputTextAgentMessageInputContent
EncryptedContent *EncryptedContentAgentMessageInputContent
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
AgentMessageInputContent contains exactly one typed variant or Unknown.
func (AgentMessageInputContent) MarshalJSON ¶
func (v AgentMessageInputContent) MarshalJSON() ([]byte, error)
func (*AgentMessageInputContent) UnmarshalJSON ¶
func (v *AgentMessageInputContent) UnmarshalJSON(data []byte) error
type AgentMessageResponseItem ¶
type AgentMessageResponseItem struct {
Author string `json:"author" protocol:"required"`
Content []AgentMessageInputContent `json:"content" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Recipient string `json:"recipient" protocol:"required"`
Type AgentMessageResponseItemType `json:"type" protocol:"required,const=agent_message"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AgentMessageResponseItem) MarshalJSON ¶
func (v AgentMessageResponseItem) MarshalJSON() ([]byte, error)
func (*AgentMessageResponseItem) UnmarshalJSON ¶
func (v *AgentMessageResponseItem) UnmarshalJSON(data []byte) error
type AgentMessageResponseItemType ¶
type AgentMessageResponseItemType string
const (
AgentMessageResponseItemTypeAgentMessage AgentMessageResponseItemType = "agent_message"
)
type AgentMessageThreadItem ¶
type AgentMessageThreadItem struct {
Delivery Optional[AgentMessageDelivery] `json:"delivery" protocol:"nullable"`
ID string `json:"id" protocol:"required"`
MemoryCitation Optional[MemoryCitation] `json:"memoryCitation" protocol:"nullable"`
Phase Optional[MessagePhase] `json:"phase" protocol:"nullable"`
Questions Optional[[]AsyncUserInputQuestion] `json:"questions" protocol:"nullable"`
Text string `json:"text" protocol:"required"`
Type AgentMessageThreadItemType `json:"type" protocol:"required,const=agentMessage"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AgentMessageThreadItem) MarshalJSON ¶
func (v AgentMessageThreadItem) MarshalJSON() ([]byte, error)
func (*AgentMessageThreadItem) UnmarshalJSON ¶
func (v *AgentMessageThreadItem) UnmarshalJSON(data []byte) error
type AgentMessageThreadItemType ¶
type AgentMessageThreadItemType string
const (
AgentMessageThreadItemTypeAgentMessage AgentMessageThreadItemType = "agentMessage"
)
type ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision ¶
type ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision struct {
ApplyNetworkPolicyAmendment ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment `json:"applyNetworkPolicyAmendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
User chose a persistent network policy rule (allow/deny) for this host.
func (ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision) MarshalJSON ¶
func (v ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision) MarshalJSON() ([]byte, error)
func (*ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision) UnmarshalJSON ¶
func (v *ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision) UnmarshalJSON(data []byte) error
type ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment ¶
type ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment struct {
NetworkPolicyAmendment NetworkPolicyAmendment `json:"network_policy_amendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment) MarshalJSON ¶
func (v ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment) MarshalJSON() ([]byte, error)
func (*ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment) UnmarshalJSON ¶
func (v *ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecisionApplyNetworkPolicyAmendment) UnmarshalJSON(data []byte) error
type ApplyPatchApprovalParams ¶
type ApplyPatchApprovalParams struct {
// Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].
CallID string `json:"callId" protocol:"required"`
ConversationID ThreadID `json:"conversationId" protocol:"required"`
FileChanges map[string]FileChange `json:"fileChanges" protocol:"required"`
// When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).
GrantRoot Optional[string] `json:"grantRoot" protocol:"nullable"`
// Optional explanatory reason (e.g. request for extra write access).
Reason Optional[string] `json:"reason" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ApplyPatchApprovalParams) MarshalJSON ¶
func (v ApplyPatchApprovalParams) MarshalJSON() ([]byte, error)
func (*ApplyPatchApprovalParams) UnmarshalJSON ¶
func (v *ApplyPatchApprovalParams) UnmarshalJSON(data []byte) error
type ApplyPatchApprovalResponse ¶
type ApplyPatchApprovalResponse struct {
Decision ReviewDecision `json:"decision" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ApplyPatchApprovalResponse) MarshalJSON ¶
func (v ApplyPatchApprovalResponse) MarshalJSON() ([]byte, error)
func (*ApplyPatchApprovalResponse) UnmarshalJSON ¶
func (v *ApplyPatchApprovalResponse) UnmarshalJSON(data []byte) error
type ApprovalPolicy ¶
type ApprovalPolicy string
const ( ApprovalPolicyUntrusted ApprovalPolicy = "untrusted" ApprovalPolicyOnRequest ApprovalPolicy = "on-request" ApprovalPolicyNever ApprovalPolicy = "never" )
type ApprovalsReviewer ¶
type ApprovalsReviewer string
Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.
const ( ApprovalsReviewerUser ApprovalsReviewer = "user" ApprovalsReviewerAutoReview ApprovalsReviewer = "auto_review" ApprovalsReviewerGuardianSubagent ApprovalsReviewer = "guardian_subagent" )
type ApprovedExecpolicyAmendmentReviewDecision ¶
type ApprovedExecpolicyAmendmentReviewDecision struct {
ApprovedExecpolicyAmendment ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment `json:"approved_execpolicy_amendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.
func (ApprovedExecpolicyAmendmentReviewDecision) MarshalJSON ¶
func (v ApprovedExecpolicyAmendmentReviewDecision) MarshalJSON() ([]byte, error)
func (*ApprovedExecpolicyAmendmentReviewDecision) UnmarshalJSON ¶
func (v *ApprovedExecpolicyAmendmentReviewDecision) UnmarshalJSON(data []byte) error
type ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment ¶
type ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment struct {
ProposedExecpolicyAmendment []string `json:"proposed_execpolicy_amendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment) MarshalJSON ¶
func (v ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment) MarshalJSON() ([]byte, error)
func (*ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment) UnmarshalJSON ¶
func (v *ApprovedExecpolicyAmendmentReviewDecisionApprovedExecpolicyAmendment) UnmarshalJSON(data []byte) error
type AskForApproval ¶
type AskForApproval struct {
Value *ApprovalPolicy
Granular *GranularAskForApproval
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
AskForApproval contains exactly one typed variant or Unknown.
func (AskForApproval) MarshalJSON ¶
func (v AskForApproval) MarshalJSON() ([]byte, error)
func (*AskForApproval) UnmarshalJSON ¶
func (v *AskForApproval) UnmarshalJSON(data []byte) error
type AskForApprovalValue
deprecated
type AskForApprovalValue = ApprovalPolicy
AskForApprovalValue is the former name of the scalar approval policy enum.
Deprecated: use ApprovalPolicy.
type AsyncUserInputQuestion ¶
type AsyncUserInputQuestion struct {
Options Optional[[]string] `json:"options" protocol:"nullable"`
Title string `json:"title" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AsyncUserInputQuestion) MarshalJSON ¶
func (v AsyncUserInputQuestion) MarshalJSON() ([]byte, error)
func (*AsyncUserInputQuestion) UnmarshalJSON ¶
func (v *AsyncUserInputQuestion) UnmarshalJSON(data []byte) error
type AudioUserInput ¶
type AudioUserInput struct {
Type AudioUserInputType `json:"type" protocol:"required,const=audio"`
URL string `json:"url" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (AudioUserInput) MarshalJSON ¶
func (v AudioUserInput) MarshalJSON() ([]byte, error)
func (*AudioUserInput) UnmarshalJSON ¶
func (v *AudioUserInput) UnmarshalJSON(data []byte) error
type AudioUserInputType ¶
type AudioUserInputType string
const (
AudioUserInputTypeAudio AudioUserInputType = "audio"
)
type ByteRange ¶
type ByteRange struct {
End uint64 `json:"end" protocol:"required"`
Start uint64 `json:"start" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ByteRange) MarshalJSON ¶
func (*ByteRange) UnmarshalJSON ¶
type CapabilityRootLocation ¶
type CapabilityRootLocation struct {
Environment *EnvironmentCapabilityRootLocation
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
Location used to resolve a selected capability root. CapabilityRootLocation contains exactly one typed variant or Unknown.
func (CapabilityRootLocation) MarshalJSON ¶
func (v CapabilityRootLocation) MarshalJSON() ([]byte, error)
func (*CapabilityRootLocation) UnmarshalJSON ¶
func (v *CapabilityRootLocation) UnmarshalJSON(data []byte) error
type ClientInfo ¶
type ClientInfo struct {
Name string `json:"name" protocol:"required"`
Title Optional[string] `json:"title" protocol:"nullable"`
Version string `json:"version" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ClientInfo) MarshalJSON ¶
func (v ClientInfo) MarshalJSON() ([]byte, error)
func (*ClientInfo) UnmarshalJSON ¶
func (v *ClientInfo) UnmarshalJSON(data []byte) error
type CodexErrorInfo ¶
type CodexErrorInfo struct {
Value *CodexErrorInfoValue
HTTPConnectionFailed *HTTPConnectionFailedCodexErrorInfo
ResponseStreamConnectionFailed *ResponseStreamConnectionFailedCodexErrorInfo
ResponseStreamDisconnected *ResponseStreamDisconnectedCodexErrorInfo
ResponseTooManyFailedAttempts *ResponseTooManyFailedAttemptsCodexErrorInfo
ActiveTurnNotSteerable *ActiveTurnNotSteerableCodexErrorInfo
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
This translation layer make sure that we expose codex error code in camel case.
When an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant. CodexErrorInfo contains exactly one typed variant or Unknown.
func (CodexErrorInfo) MarshalJSON ¶
func (v CodexErrorInfo) MarshalJSON() ([]byte, error)
func (*CodexErrorInfo) UnmarshalJSON ¶
func (v *CodexErrorInfo) UnmarshalJSON(data []byte) error
type CodexErrorInfoValue ¶
type CodexErrorInfoValue string
const ( CodexErrorInfoValueContextWindowExceeded CodexErrorInfoValue = "contextWindowExceeded" CodexErrorInfoValueSessionBudgetExceeded CodexErrorInfoValue = "sessionBudgetExceeded" CodexErrorInfoValueUsageLimitExceeded CodexErrorInfoValue = "usageLimitExceeded" CodexErrorInfoValueRateLimitExceeded CodexErrorInfoValue = "rateLimitExceeded" CodexErrorInfoValueServerOverloaded CodexErrorInfoValue = "serverOverloaded" CodexErrorInfoValueCyberPolicy CodexErrorInfoValue = "cyberPolicy" CodexErrorInfoValueMisalignmentPolicyViolation CodexErrorInfoValue = "misalignmentPolicyViolation" CodexErrorInfoValueTooManyDenials CodexErrorInfoValue = "tooManyDenials" CodexErrorInfoValueInternalServerError CodexErrorInfoValue = "internalServerError" CodexErrorInfoValueBadRequest CodexErrorInfoValue = "badRequest" CodexErrorInfoValueThreadRollbackFailed CodexErrorInfoValue = "threadRollbackFailed" CodexErrorInfoValueSandboxError CodexErrorInfoValue = "sandboxError" CodexErrorInfoValueOther CodexErrorInfoValue = "other" )
type CollabAgentState ¶
type CollabAgentState struct {
Message Optional[string] `json:"message" protocol:"nullable"`
Status CollabAgentStatus `json:"status" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CollabAgentState) MarshalJSON ¶
func (v CollabAgentState) MarshalJSON() ([]byte, error)
func (*CollabAgentState) UnmarshalJSON ¶
func (v *CollabAgentState) UnmarshalJSON(data []byte) error
type CollabAgentStatus ¶
type CollabAgentStatus string
const ( CollabAgentStatusPendingInit CollabAgentStatus = "pendingInit" CollabAgentStatusRunning CollabAgentStatus = "running" CollabAgentStatusInterrupted CollabAgentStatus = "interrupted" CollabAgentStatusCompleted CollabAgentStatus = "completed" CollabAgentStatusErrored CollabAgentStatus = "errored" CollabAgentStatusShutdown CollabAgentStatus = "shutdown" CollabAgentStatusNotFound CollabAgentStatus = "notFound" )
type CollabAgentTool ¶
type CollabAgentTool string
const ( CollabAgentToolSpawnAgent CollabAgentTool = "spawnAgent" CollabAgentToolSendInput CollabAgentTool = "sendInput" CollabAgentToolResumeAgent CollabAgentTool = "resumeAgent" CollabAgentToolWait CollabAgentTool = "wait" CollabAgentToolCloseAgent CollabAgentTool = "closeAgent" CollabAgentToolSendMessage CollabAgentTool = "sendMessage" CollabAgentToolFollowupTask CollabAgentTool = "followupTask" CollabAgentToolInterruptAgent CollabAgentTool = "interruptAgent" CollabAgentToolListAgents CollabAgentTool = "listAgents" )
type CollabAgentToolCallStatus ¶
type CollabAgentToolCallStatus string
const ( CollabAgentToolCallStatusInProgress CollabAgentToolCallStatus = "inProgress" CollabAgentToolCallStatusCompleted CollabAgentToolCallStatus = "completed" CollabAgentToolCallStatusFailed CollabAgentToolCallStatus = "failed" CollabAgentToolCallStatusInterrupted CollabAgentToolCallStatus = "interrupted" )
type CollabAgentToolCallThreadItem ¶
type CollabAgentToolCallThreadItem struct {
// Last known status of the target agents, when available.
AgentsStates map[string]CollabAgentState `json:"agentsStates" protocol:"required"`
// Unique identifier for this collab tool call.
ID string `json:"id" protocol:"required"`
// Model requested for the spawned agent, when applicable.
Model Optional[string] `json:"model" protocol:"nullable"`
// Prompt text sent as part of the collab tool call, when available.
Prompt Optional[string] `json:"prompt" protocol:"nullable"`
// Reasoning effort requested for the spawned agent, when applicable.
ReasoningEffort Optional[ReasoningEffort] `json:"reasoningEffort" protocol:"nullable"`
// Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.
ReceiverThreadIDs []string `json:"receiverThreadIds" protocol:"required"`
// Thread ID of the agent issuing the collab request.
SenderThreadID string `json:"senderThreadId" protocol:"required"`
// Current status of the collab tool call.
Status CollabAgentToolCallStatus `json:"status" protocol:"required"`
// Name of the collab tool that was invoked.
Tool CollabAgentTool `json:"tool" protocol:"required"`
Type CollabAgentToolCallThreadItemType `json:"type" protocol:"required,const=collabAgentToolCall"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CollabAgentToolCallThreadItem) MarshalJSON ¶
func (v CollabAgentToolCallThreadItem) MarshalJSON() ([]byte, error)
func (*CollabAgentToolCallThreadItem) UnmarshalJSON ¶
func (v *CollabAgentToolCallThreadItem) UnmarshalJSON(data []byte) error
type CollabAgentToolCallThreadItemType ¶
type CollabAgentToolCallThreadItemType string
const (
CollabAgentToolCallThreadItemTypeCollabAgentToolCall CollabAgentToolCallThreadItemType = "collabAgentToolCall"
)
type CollaborationMode ¶
type CollaborationMode struct {
Mode ModeKind `json:"mode" protocol:"required"`
Settings Settings `json:"settings" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Collaboration mode for a Codex session.
func (CollaborationMode) MarshalJSON ¶
func (v CollaborationMode) MarshalJSON() ([]byte, error)
func (*CollaborationMode) UnmarshalJSON ¶
func (v *CollaborationMode) UnmarshalJSON(data []byte) error
type CommandAction ¶
type CommandAction struct {
Read *ReadCommandAction
ListFiles *ListFilesCommandAction
Search *SearchCommandAction
UnknownVariant *UnknownCommandAction
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
CommandAction contains exactly one typed variant or Unknown.
func (CommandAction) MarshalJSON ¶
func (v CommandAction) MarshalJSON() ([]byte, error)
func (*CommandAction) UnmarshalJSON ¶
func (v *CommandAction) UnmarshalJSON(data []byte) error
type CommandExecutionApprovalDecision ¶
type CommandExecutionApprovalDecision struct {
Value *CommandExecutionApprovalDecisionValue
AcceptWithExecpolicyAmendment *AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision
ApplyNetworkPolicyAmendment *ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
CommandExecutionApprovalDecision contains exactly one typed variant or Unknown.
func (CommandExecutionApprovalDecision) MarshalJSON ¶
func (v CommandExecutionApprovalDecision) MarshalJSON() ([]byte, error)
func (*CommandExecutionApprovalDecision) UnmarshalJSON ¶
func (v *CommandExecutionApprovalDecision) UnmarshalJSON(data []byte) error
type CommandExecutionApprovalDecisionValue ¶
type CommandExecutionApprovalDecisionValue string
const ( CommandExecutionApprovalDecisionValueAccept CommandExecutionApprovalDecisionValue = "accept" CommandExecutionApprovalDecisionValueAcceptForSession CommandExecutionApprovalDecisionValue = "acceptForSession" CommandExecutionApprovalDecisionValueDecline CommandExecutionApprovalDecisionValue = "decline" CommandExecutionApprovalDecisionValueCancel CommandExecutionApprovalDecisionValue = "cancel" )
type CommandExecutionApprovalKind ¶
type CommandExecutionApprovalKind string
Distinguishes a command approval from input sent to an existing terminal.
const ( CommandExecutionApprovalKindCommand CommandExecutionApprovalKind = "command" CommandExecutionApprovalKindWriteStdin CommandExecutionApprovalKind = "writeStdin" )
type CommandExecutionRequestApprovalParams ¶
type CommandExecutionRequestApprovalParams struct {
// Optional additional permissions requested for this command.
AdditionalPermissions Optional[AdditionalPermissionProfile] `json:"additionalPermissions" protocol:"nullable"`
// Unique identifier for this specific approval callback.
//
// For regular shell/unified_exec approvals, this is null.
//
// For zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing. Stdin approvals also use a distinct callback id; inspect `kind` to distinguish them.
ApprovalID Optional[string] `json:"approvalId" protocol:"nullable"`
// Ordered list of decisions the client may present for this prompt.
AvailableDecisions Optional[[]CommandExecutionApprovalDecision] `json:"availableDecisions" protocol:"nullable"`
// The command to be executed.
Command Optional[string] `json:"command" protocol:"nullable"`
// Best-effort parsed command actions for friendly display.
CommandActions Optional[[]CommandAction] `json:"commandActions" protocol:"nullable"`
// The command's working directory.
Cwd Optional[LegacyAppPathString] `json:"cwd" protocol:"nullable"`
// Environment in which the command will run.
EnvironmentID Optional[string] `json:"environmentId" protocol:"nullable"`
ItemID string `json:"itemId" protocol:"required"`
// Kind of action under review. Defaults to `command` for older servers.
Kind Optional[CommandExecutionApprovalKind] `json:"kind" protocol:""`
// Optional context for a managed-network approval prompt.
NetworkApprovalContext Optional[NetworkApprovalContext] `json:"networkApprovalContext" protocol:"nullable"`
// Optional proposed execpolicy amendment to allow similar commands without prompting.
ProposedExecpolicyAmendment Optional[[]string] `json:"proposedExecpolicyAmendment" protocol:"nullable"`
// Optional proposed network policy amendments (allow/deny host) for future requests.
ProposedNetworkPolicyAmendments Optional[[]NetworkPolicyAmendment] `json:"proposedNetworkPolicyAmendments" protocol:"nullable"`
// Optional explanatory reason (e.g. request for network access).
Reason Optional[string] `json:"reason" protocol:"nullable"`
// Unix timestamp (in milliseconds) when this approval request started.
StartedAtMs int64 `json:"startedAtMs" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CommandExecutionRequestApprovalParams) MarshalJSON ¶
func (v CommandExecutionRequestApprovalParams) MarshalJSON() ([]byte, error)
func (*CommandExecutionRequestApprovalParams) UnmarshalJSON ¶
func (v *CommandExecutionRequestApprovalParams) UnmarshalJSON(data []byte) error
type CommandExecutionRequestApprovalResponse ¶
type CommandExecutionRequestApprovalResponse struct {
Decision CommandExecutionApprovalDecision `json:"decision" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CommandExecutionRequestApprovalResponse) MarshalJSON ¶
func (v CommandExecutionRequestApprovalResponse) MarshalJSON() ([]byte, error)
func (*CommandExecutionRequestApprovalResponse) UnmarshalJSON ¶
func (v *CommandExecutionRequestApprovalResponse) UnmarshalJSON(data []byte) error
type CommandExecutionSource ¶
type CommandExecutionSource string
const ( CommandExecutionSourceAgent CommandExecutionSource = "agent" CommandExecutionSourceUserShell CommandExecutionSource = "userShell" CommandExecutionSourceUnifiedExecStartup CommandExecutionSource = "unifiedExecStartup" CommandExecutionSourceUnifiedExecInteraction CommandExecutionSource = "unifiedExecInteraction" )
type CommandExecutionStatus ¶
type CommandExecutionStatus string
const ( CommandExecutionStatusInProgress CommandExecutionStatus = "inProgress" CommandExecutionStatusCompleted CommandExecutionStatus = "completed" CommandExecutionStatusFailed CommandExecutionStatus = "failed" CommandExecutionStatusDeclined CommandExecutionStatus = "declined" )
type CommandExecutionThreadItem ¶
type CommandExecutionThreadItem struct {
// The command's output, aggregated from stdout and stderr.
AggregatedOutput Optional[string] `json:"aggregatedOutput" protocol:"nullable"`
// The command to be executed.
Command string `json:"command" protocol:"required"`
// A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.
CommandActions []CommandAction `json:"commandActions" protocol:"required"`
// The command's working directory.
Cwd LegacyAppPathString `json:"cwd" protocol:"required"`
// The duration of the command execution in milliseconds.
DurationMs Optional[int64] `json:"durationMs" protocol:"nullable"`
// The command's exit code.
ExitCode Optional[int32] `json:"exitCode" protocol:"nullable"`
ID string `json:"id" protocol:"required"`
// Trusted first-party plugin id when this command resolves to one plugin script.
PluginID Optional[string] `json:"pluginId" protocol:"nullable"`
// Identifier for the underlying PTY process (when available).
ProcessID Optional[string] `json:"processId" protocol:"nullable"`
// Safe plugin-relative path when this command resolves to one plugin script.
ScriptPath Optional[string] `json:"scriptPath" protocol:"nullable"`
Source Optional[CommandExecutionSource] `json:"source" protocol:""`
Status CommandExecutionStatus `json:"status" protocol:"required"`
Type CommandExecutionThreadItemType `json:"type" protocol:"required,const=commandExecution"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CommandExecutionThreadItem) MarshalJSON ¶
func (v CommandExecutionThreadItem) MarshalJSON() ([]byte, error)
func (*CommandExecutionThreadItem) UnmarshalJSON ¶
func (v *CommandExecutionThreadItem) UnmarshalJSON(data []byte) error
type CommandExecutionThreadItemType ¶
type CommandExecutionThreadItemType string
const (
CommandExecutionThreadItemTypeCommandExecution CommandExecutionThreadItemType = "commandExecution"
)
type CompactionResponseItem ¶
type CompactionResponseItem struct {
EncryptedContent string `json:"encrypted_content" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Type CompactionResponseItemType `json:"type" protocol:"required,const=compaction"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CompactionResponseItem) MarshalJSON ¶
func (v CompactionResponseItem) MarshalJSON() ([]byte, error)
func (*CompactionResponseItem) UnmarshalJSON ¶
func (v *CompactionResponseItem) UnmarshalJSON(data []byte) error
type CompactionResponseItemType ¶
type CompactionResponseItemType string
const (
CompactionResponseItemTypeCompaction CompactionResponseItemType = "compaction"
)
type CompactionTriggerResponseItem ¶
type CompactionTriggerResponseItem struct {
Type CompactionTriggerResponseItemType `json:"type" protocol:"required,const=compaction_trigger"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CompactionTriggerResponseItem) MarshalJSON ¶
func (v CompactionTriggerResponseItem) MarshalJSON() ([]byte, error)
func (*CompactionTriggerResponseItem) UnmarshalJSON ¶
func (v *CompactionTriggerResponseItem) UnmarshalJSON(data []byte) error
type CompactionTriggerResponseItemType ¶
type CompactionTriggerResponseItemType string
const (
CompactionTriggerResponseItemTypeCompactionTrigger CompactionTriggerResponseItemType = "compaction_trigger"
)
type ConfigurationReasoning ¶
type ConfigurationReasoning struct {
Effort ReasoningEffort `json:"effort" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Reasoning settings interpreted by the backend for the routed model.
func (ConfigurationReasoning) MarshalJSON ¶
func (v ConfigurationReasoning) MarshalJSON() ([]byte, error)
func (*ConfigurationReasoning) UnmarshalJSON ¶
func (v *ConfigurationReasoning) UnmarshalJSON(data []byte) error
type ConfigurationUpdateResponseItem ¶
type ConfigurationUpdateResponseItem struct {
Reasoning ConfigurationReasoning `json:"reasoning" protocol:"required"`
Type ConfigurationUpdateResponseItemType `json:"type" protocol:"required,const=configuration_update"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
A durable input control interpreted by the backend at its position in history.
func (ConfigurationUpdateResponseItem) MarshalJSON ¶
func (v ConfigurationUpdateResponseItem) MarshalJSON() ([]byte, error)
func (*ConfigurationUpdateResponseItem) UnmarshalJSON ¶
func (v *ConfigurationUpdateResponseItem) UnmarshalJSON(data []byte) error
type ConfigurationUpdateResponseItemType ¶
type ConfigurationUpdateResponseItemType string
const (
ConfigurationUpdateResponseItemTypeConfigurationUpdate ConfigurationUpdateResponseItemType = "configuration_update"
)
type ContentItem ¶
type ContentItem struct {
InputText *InputTextContentItem
InputImage *InputImageContentItem
InputAudio *InputAudioContentItem
OutputText *OutputTextContentItem
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ContentItem contains exactly one typed variant or Unknown.
func (ContentItem) MarshalJSON ¶
func (v ContentItem) MarshalJSON() ([]byte, error)
func (*ContentItem) UnmarshalJSON ¶
func (v *ContentItem) UnmarshalJSON(data []byte) error
type ContextCompactionResponseItem ¶
type ContextCompactionResponseItem struct {
EncryptedContent Optional[string] `json:"encrypted_content" protocol:"nullable"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Type ContextCompactionResponseItemType `json:"type" protocol:"required,const=context_compaction"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ContextCompactionResponseItem) MarshalJSON ¶
func (v ContextCompactionResponseItem) MarshalJSON() ([]byte, error)
func (*ContextCompactionResponseItem) UnmarshalJSON ¶
func (v *ContextCompactionResponseItem) UnmarshalJSON(data []byte) error
type ContextCompactionResponseItemType ¶
type ContextCompactionResponseItemType string
const (
ContextCompactionResponseItemTypeContextCompaction ContextCompactionResponseItemType = "context_compaction"
)
type ContextCompactionThreadItem ¶
type ContextCompactionThreadItem struct {
ID string `json:"id" protocol:"required"`
Type ContextCompactionThreadItemType `json:"type" protocol:"required,const=contextCompaction"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ContextCompactionThreadItem) MarshalJSON ¶
func (v ContextCompactionThreadItem) MarshalJSON() ([]byte, error)
func (*ContextCompactionThreadItem) UnmarshalJSON ¶
func (v *ContextCompactionThreadItem) UnmarshalJSON(data []byte) error
type ContextCompactionThreadItemType ¶
type ContextCompactionThreadItemType string
const (
ContextCompactionThreadItemTypeContextCompaction ContextCompactionThreadItemType = "contextCompaction"
)
type CustomMultiAgentMode ¶
type CustomMultiAgentMode struct {
Custom string `json:"custom" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CustomMultiAgentMode) MarshalJSON ¶
func (v CustomMultiAgentMode) MarshalJSON() ([]byte, error)
func (*CustomMultiAgentMode) UnmarshalJSON ¶
func (v *CustomMultiAgentMode) UnmarshalJSON(data []byte) error
type CustomSessionSource ¶
type CustomSessionSource struct {
Custom string `json:"custom" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CustomSessionSource) MarshalJSON ¶
func (v CustomSessionSource) MarshalJSON() ([]byte, error)
func (*CustomSessionSource) UnmarshalJSON ¶
func (v *CustomSessionSource) UnmarshalJSON(data []byte) error
type CustomToolCallOutputResponseItem ¶
type CustomToolCallOutputResponseItem struct {
CallID string `json:"call_id" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Name Optional[string] `json:"name" protocol:"nullable"`
Output FunctionCallOutputBody `json:"output" protocol:"required"`
Type CustomToolCallOutputResponseItemType `json:"type" protocol:"required,const=custom_tool_call_output"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CustomToolCallOutputResponseItem) MarshalJSON ¶
func (v CustomToolCallOutputResponseItem) MarshalJSON() ([]byte, error)
func (*CustomToolCallOutputResponseItem) UnmarshalJSON ¶
func (v *CustomToolCallOutputResponseItem) UnmarshalJSON(data []byte) error
type CustomToolCallOutputResponseItemType ¶
type CustomToolCallOutputResponseItemType string
const (
CustomToolCallOutputResponseItemTypeCustomToolCallOutput CustomToolCallOutputResponseItemType = "custom_tool_call_output"
)
type CustomToolCallResponseItem ¶
type CustomToolCallResponseItem struct {
CallID string `json:"call_id" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
Input string `json:"input" protocol:"required"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Name string `json:"name" protocol:"required"`
Namespace Optional[string] `json:"namespace" protocol:"nullable"`
Status Optional[string] `json:"status" protocol:"nullable"`
Type CustomToolCallResponseItemType `json:"type" protocol:"required,const=custom_tool_call"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (CustomToolCallResponseItem) MarshalJSON ¶
func (v CustomToolCallResponseItem) MarshalJSON() ([]byte, error)
func (*CustomToolCallResponseItem) UnmarshalJSON ¶
func (v *CustomToolCallResponseItem) UnmarshalJSON(data []byte) error
type CustomToolCallResponseItemType ¶
type CustomToolCallResponseItemType string
const (
CustomToolCallResponseItemTypeCustomToolCall CustomToolCallResponseItemType = "custom_tool_call"
)
type CyberAccessProgram ¶
type CyberAccessProgram string
Requested cyber treatment for an OpenAI model turn. Authorization and model-tier restrictions remain server-owned.
const ( CyberAccessProgramStandard CyberAccessProgram = "standard" CyberAccessProgramDaybreakBlue CyberAccessProgram = "daybreakBlue" CyberAccessProgramDaybreakRed CyberAccessProgram = "daybreakRed" )
type DangerFullAccessSandboxPolicy ¶
type DangerFullAccessSandboxPolicy struct {
Type DangerFullAccessSandboxPolicyType `json:"type" protocol:"required,const=dangerFullAccess"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (DangerFullAccessSandboxPolicy) MarshalJSON ¶
func (v DangerFullAccessSandboxPolicy) MarshalJSON() ([]byte, error)
func (*DangerFullAccessSandboxPolicy) UnmarshalJSON ¶
func (v *DangerFullAccessSandboxPolicy) UnmarshalJSON(data []byte) error
type DangerFullAccessSandboxPolicyType ¶
type DangerFullAccessSandboxPolicyType string
const (
DangerFullAccessSandboxPolicyTypeDangerFullAccess DangerFullAccessSandboxPolicyType = "dangerFullAccess"
)
type DeleteFileChange ¶
type DeleteFileChange struct {
Content string `json:"content" protocol:"required"`
Type DeleteFileChangeType `json:"type" protocol:"required,const=delete"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (DeleteFileChange) MarshalJSON ¶
func (v DeleteFileChange) MarshalJSON() ([]byte, error)
func (*DeleteFileChange) UnmarshalJSON ¶
func (v *DeleteFileChange) UnmarshalJSON(data []byte) error
type DeleteFileChangeType ¶
type DeleteFileChangeType string
const (
DeleteFileChangeTypeDelete DeleteFileChangeType = "delete"
)
type DeletePatchChangeKind ¶
type DeletePatchChangeKind struct {
Type DeletePatchChangeKindType `json:"type" protocol:"required,const=delete"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (DeletePatchChangeKind) MarshalJSON ¶
func (v DeletePatchChangeKind) MarshalJSON() ([]byte, error)
func (*DeletePatchChangeKind) UnmarshalJSON ¶
func (v *DeletePatchChangeKind) UnmarshalJSON(data []byte) error
type DeletePatchChangeKindType ¶
type DeletePatchChangeKindType string
const (
DeletePatchChangeKindTypeDelete DeletePatchChangeKindType = "delete"
)
type DeniedReviewDecision ¶
type DeniedReviewDecision struct {
Denied DeniedReviewDecisionDenied `json:"denied" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
User has denied this command and the agent should not execute it, but it should continue the session and try something else.
func (DeniedReviewDecision) MarshalJSON ¶
func (v DeniedReviewDecision) MarshalJSON() ([]byte, error)
func (*DeniedReviewDecision) UnmarshalJSON ¶
func (v *DeniedReviewDecision) UnmarshalJSON(data []byte) error
type DeniedReviewDecisionDenied ¶
type DeniedReviewDecisionDenied struct {
Rejection string `json:"rejection" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (DeniedReviewDecisionDenied) MarshalJSON ¶
func (v DeniedReviewDecisionDenied) MarshalJSON() ([]byte, error)
func (*DeniedReviewDecisionDenied) UnmarshalJSON ¶
func (v *DeniedReviewDecisionDenied) UnmarshalJSON(data []byte) error
type DynamicToolCallOutputContentItem ¶
type DynamicToolCallOutputContentItem struct {
InputText *InputTextDynamicToolCallOutputContentItem
InputImage *InputImageDynamicToolCallOutputContentItem
InputAudio *InputAudioDynamicToolCallOutputContentItem
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
DynamicToolCallOutputContentItem contains exactly one typed variant or Unknown.
func (DynamicToolCallOutputContentItem) MarshalJSON ¶
func (v DynamicToolCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*DynamicToolCallOutputContentItem) UnmarshalJSON ¶
func (v *DynamicToolCallOutputContentItem) UnmarshalJSON(data []byte) error
type DynamicToolCallStatus ¶
type DynamicToolCallStatus string
const ( DynamicToolCallStatusInProgress DynamicToolCallStatus = "inProgress" DynamicToolCallStatusCompleted DynamicToolCallStatus = "completed" DynamicToolCallStatusFailed DynamicToolCallStatus = "failed" )
type DynamicToolCallThreadItem ¶
type DynamicToolCallThreadItem struct {
Arguments json.RawMessage `json:"arguments" protocol:"required,nullable"`
ContentItems Optional[[]DynamicToolCallOutputContentItem] `json:"contentItems" protocol:"nullable"`
// The duration of the dynamic tool call in milliseconds.
DurationMs Optional[int64] `json:"durationMs" protocol:"nullable"`
ID string `json:"id" protocol:"required"`
Namespace Optional[string] `json:"namespace" protocol:"nullable"`
Status DynamicToolCallStatus `json:"status" protocol:"required"`
Success Optional[bool] `json:"success" protocol:"nullable"`
Tool string `json:"tool" protocol:"required"`
Type DynamicToolCallThreadItemType `json:"type" protocol:"required,const=dynamicToolCall"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (DynamicToolCallThreadItem) MarshalJSON ¶
func (v DynamicToolCallThreadItem) MarshalJSON() ([]byte, error)
func (*DynamicToolCallThreadItem) UnmarshalJSON ¶
func (v *DynamicToolCallThreadItem) UnmarshalJSON(data []byte) error
type DynamicToolCallThreadItemType ¶
type DynamicToolCallThreadItemType string
const (
DynamicToolCallThreadItemTypeDynamicToolCall DynamicToolCallThreadItemType = "dynamicToolCall"
)
type DynamicToolNamespaceTool ¶
type DynamicToolNamespaceTool struct {
Function *FunctionDynamicToolNamespaceTool
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
DynamicToolNamespaceTool contains exactly one typed variant or Unknown.
func (DynamicToolNamespaceTool) MarshalJSON ¶
func (v DynamicToolNamespaceTool) MarshalJSON() ([]byte, error)
func (*DynamicToolNamespaceTool) UnmarshalJSON ¶
func (v *DynamicToolNamespaceTool) UnmarshalJSON(data []byte) error
type DynamicToolSpec ¶
type DynamicToolSpec struct {
Function *FunctionDynamicToolSpec
Namespace *NamespaceDynamicToolSpec
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
DynamicToolSpec contains exactly one typed variant or Unknown.
func (DynamicToolSpec) MarshalJSON ¶
func (v DynamicToolSpec) MarshalJSON() ([]byte, error)
func (*DynamicToolSpec) UnmarshalJSON ¶
func (v *DynamicToolSpec) UnmarshalJSON(data []byte) error
type EncryptedContentAgentMessageInputContent ¶
type EncryptedContentAgentMessageInputContent struct {
EncryptedContent string `json:"encrypted_content" protocol:"required"`
Type EncryptedContentAgentMessageInputContentType `json:"type" protocol:"required,const=encrypted_content"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (EncryptedContentAgentMessageInputContent) MarshalJSON ¶
func (v EncryptedContentAgentMessageInputContent) MarshalJSON() ([]byte, error)
func (*EncryptedContentAgentMessageInputContent) UnmarshalJSON ¶
func (v *EncryptedContentAgentMessageInputContent) UnmarshalJSON(data []byte) error
type EncryptedContentAgentMessageInputContentType ¶
type EncryptedContentAgentMessageInputContentType string
const (
EncryptedContentAgentMessageInputContentTypeEncryptedContent EncryptedContentAgentMessageInputContentType = "encrypted_content"
)
type EncryptedContentFunctionCallOutputContentItem ¶
type EncryptedContentFunctionCallOutputContentItem struct {
EncryptedContent string `json:"encrypted_content" protocol:"required"`
Type EncryptedContentFunctionCallOutputContentItemType `json:"type" protocol:"required,const=encrypted_content"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (EncryptedContentFunctionCallOutputContentItem) MarshalJSON ¶
func (v EncryptedContentFunctionCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*EncryptedContentFunctionCallOutputContentItem) UnmarshalJSON ¶
func (v *EncryptedContentFunctionCallOutputContentItem) UnmarshalJSON(data []byte) error
type EncryptedContentFunctionCallOutputContentItemType ¶
type EncryptedContentFunctionCallOutputContentItemType string
const (
EncryptedContentFunctionCallOutputContentItemTypeEncryptedContent EncryptedContentFunctionCallOutputContentItemType = "encrypted_content"
)
type EnteredReviewModeThreadItem ¶
type EnteredReviewModeThreadItem struct {
ID string `json:"id" protocol:"required"`
Review string `json:"review" protocol:"required"`
Type EnteredReviewModeThreadItemType `json:"type" protocol:"required,const=enteredReviewMode"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (EnteredReviewModeThreadItem) MarshalJSON ¶
func (v EnteredReviewModeThreadItem) MarshalJSON() ([]byte, error)
func (*EnteredReviewModeThreadItem) UnmarshalJSON ¶
func (v *EnteredReviewModeThreadItem) UnmarshalJSON(data []byte) error
type EnteredReviewModeThreadItemType ¶
type EnteredReviewModeThreadItemType string
const (
EnteredReviewModeThreadItemTypeEnteredReviewMode EnteredReviewModeThreadItemType = "enteredReviewMode"
)
type EnvironmentCapabilityRootLocation ¶
type EnvironmentCapabilityRootLocation struct {
EnvironmentID string `json:"environmentId" protocol:"required"`
// Absolute path for the root in the selected environment.
Path string `json:"path" protocol:"required"`
Type EnvironmentCapabilityRootLocationType `json:"type" protocol:"required,const=environment"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
A path owned by an execution environment.
func (EnvironmentCapabilityRootLocation) MarshalJSON ¶
func (v EnvironmentCapabilityRootLocation) MarshalJSON() ([]byte, error)
func (*EnvironmentCapabilityRootLocation) UnmarshalJSON ¶
func (v *EnvironmentCapabilityRootLocation) UnmarshalJSON(data []byte) error
type EnvironmentCapabilityRootLocationType ¶
type EnvironmentCapabilityRootLocationType string
const (
EnvironmentCapabilityRootLocationTypeEnvironment EnvironmentCapabilityRootLocationType = "environment"
)
type ErrorNotification ¶
type ErrorNotification struct {
Error TurnError `json:"error" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
WillRetry bool `json:"willRetry" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ErrorNotification) MarshalJSON ¶
func (v ErrorNotification) MarshalJSON() ([]byte, error)
func (*ErrorNotification) UnmarshalJSON ¶
func (v *ErrorNotification) UnmarshalJSON(data []byte) error
type Event ¶
type Event struct {
// Raw preserves the received notification envelope, excluding transport delimiters.
Raw json.RawMessage
Method string
Params json.RawMessage
Data any
DecodeError error
}
Event preserves a notification's method and parameter JSON as received. Params is nil when the member was absent; explicit null remains the bytes "null". Data is a pointer to a supported protocol notification or nil for unknown methods/decode failures. SDK observations are separate Received values. DecodeError is non-nil only for malformed supported payloads. Unknown fields and union variants remain in the native Data and in Params.
Each receiving Session owns its event's buffers and typed data independently. Thread identity stays in the notification payload.
type EventIdentity ¶
type EventIdentity struct{ ThreadID, TurnID, ItemID string }
EventIdentity contains only native thread, turn, and item identities.
type ExecCommandApprovalParams ¶
type ExecCommandApprovalParams struct {
// Identifier for this specific approval callback.
ApprovalID Optional[string] `json:"approvalId" protocol:"nullable"`
// Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].
CallID string `json:"callId" protocol:"required"`
Command []string `json:"command" protocol:"required"`
ConversationID ThreadID `json:"conversationId" protocol:"required"`
Cwd string `json:"cwd" protocol:"required"`
ParsedCmd []ParsedCommand `json:"parsedCmd" protocol:"required"`
Reason Optional[string] `json:"reason" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ExecCommandApprovalParams) MarshalJSON ¶
func (v ExecCommandApprovalParams) MarshalJSON() ([]byte, error)
func (*ExecCommandApprovalParams) UnmarshalJSON ¶
func (v *ExecCommandApprovalParams) UnmarshalJSON(data []byte) error
type ExecCommandApprovalResponse ¶
type ExecCommandApprovalResponse struct {
Decision ReviewDecision `json:"decision" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ExecCommandApprovalResponse) MarshalJSON ¶
func (v ExecCommandApprovalResponse) MarshalJSON() ([]byte, error)
func (*ExecCommandApprovalResponse) UnmarshalJSON ¶
func (v *ExecCommandApprovalResponse) UnmarshalJSON(data []byte) error
type ExecLocalShellAction ¶
type ExecLocalShellAction struct {
Command []string `json:"command" protocol:"required"`
Env Optional[map[string]string] `json:"env" protocol:"nullable"`
TimeoutMs Optional[uint64] `json:"timeout_ms" protocol:"nullable"`
Type ExecLocalShellActionType `json:"type" protocol:"required,const=exec"`
User Optional[string] `json:"user" protocol:"nullable"`
WorkingDirectory Optional[string] `json:"working_directory" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ExecLocalShellAction) MarshalJSON ¶
func (v ExecLocalShellAction) MarshalJSON() ([]byte, error)
func (*ExecLocalShellAction) UnmarshalJSON ¶
func (v *ExecLocalShellAction) UnmarshalJSON(data []byte) error
type ExecLocalShellActionType ¶
type ExecLocalShellActionType string
const (
ExecLocalShellActionTypeExec ExecLocalShellActionType = "exec"
)
type ExitedReviewModeThreadItem ¶
type ExitedReviewModeThreadItem struct {
ID string `json:"id" protocol:"required"`
Review string `json:"review" protocol:"required"`
Type ExitedReviewModeThreadItemType `json:"type" protocol:"required,const=exitedReviewMode"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ExitedReviewModeThreadItem) MarshalJSON ¶
func (v ExitedReviewModeThreadItem) MarshalJSON() ([]byte, error)
func (*ExitedReviewModeThreadItem) UnmarshalJSON ¶
func (v *ExitedReviewModeThreadItem) UnmarshalJSON(data []byte) error
type ExitedReviewModeThreadItemType ¶
type ExitedReviewModeThreadItemType string
const (
ExitedReviewModeThreadItemTypeExitedReviewMode ExitedReviewModeThreadItemType = "exitedReviewMode"
)
type ExternalSandboxSandboxPolicy ¶
type ExternalSandboxSandboxPolicy struct {
NetworkAccess Optional[NetworkAccess] `json:"networkAccess" protocol:""`
Type ExternalSandboxSandboxPolicyType `json:"type" protocol:"required,const=externalSandbox"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ExternalSandboxSandboxPolicy) MarshalJSON ¶
func (v ExternalSandboxSandboxPolicy) MarshalJSON() ([]byte, error)
func (*ExternalSandboxSandboxPolicy) UnmarshalJSON ¶
func (v *ExternalSandboxSandboxPolicy) UnmarshalJSON(data []byte) error
type ExternalSandboxSandboxPolicyType ¶
type ExternalSandboxSandboxPolicyType string
const (
ExternalSandboxSandboxPolicyTypeExternalSandbox ExternalSandboxSandboxPolicyType = "externalSandbox"
)
type FileChange ¶
type FileChange struct {
Add *AddFileChange
Delete *DeleteFileChange
Update *UpdateFileChange
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
FileChange contains exactly one typed variant or Unknown.
func (FileChange) MarshalJSON ¶
func (v FileChange) MarshalJSON() ([]byte, error)
func (*FileChange) UnmarshalJSON ¶
func (v *FileChange) UnmarshalJSON(data []byte) error
type FileChangeApprovalDecision ¶
type FileChangeApprovalDecision string
const ( FileChangeApprovalDecisionAccept FileChangeApprovalDecision = "accept" FileChangeApprovalDecisionAcceptForSession FileChangeApprovalDecision = "acceptForSession" FileChangeApprovalDecisionDecline FileChangeApprovalDecision = "decline" FileChangeApprovalDecisionCancel FileChangeApprovalDecision = "cancel" )
type FileChangeRequestApprovalParams ¶
type FileChangeRequestApprovalParams struct {
// [UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).
GrantRoot Optional[string] `json:"grantRoot" protocol:"nullable"`
ItemID string `json:"itemId" protocol:"required"`
// Optional explanatory reason (e.g. request for extra write access).
Reason Optional[string] `json:"reason" protocol:"nullable"`
// Unix timestamp (in milliseconds) when this approval request started.
StartedAtMs int64 `json:"startedAtMs" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FileChangeRequestApprovalParams) MarshalJSON ¶
func (v FileChangeRequestApprovalParams) MarshalJSON() ([]byte, error)
func (*FileChangeRequestApprovalParams) UnmarshalJSON ¶
func (v *FileChangeRequestApprovalParams) UnmarshalJSON(data []byte) error
type FileChangeRequestApprovalResponse ¶
type FileChangeRequestApprovalResponse struct {
Decision FileChangeApprovalDecision `json:"decision" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FileChangeRequestApprovalResponse) MarshalJSON ¶
func (v FileChangeRequestApprovalResponse) MarshalJSON() ([]byte, error)
func (*FileChangeRequestApprovalResponse) UnmarshalJSON ¶
func (v *FileChangeRequestApprovalResponse) UnmarshalJSON(data []byte) error
type FileChangeThreadItem ¶
type FileChangeThreadItem struct {
Changes []FileUpdateChange `json:"changes" protocol:"required"`
ID string `json:"id" protocol:"required"`
Status PatchApplyStatus `json:"status" protocol:"required"`
Type FileChangeThreadItemType `json:"type" protocol:"required,const=fileChange"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FileChangeThreadItem) MarshalJSON ¶
func (v FileChangeThreadItem) MarshalJSON() ([]byte, error)
func (*FileChangeThreadItem) UnmarshalJSON ¶
func (v *FileChangeThreadItem) UnmarshalJSON(data []byte) error
type FileChangeThreadItemType ¶
type FileChangeThreadItemType string
const (
FileChangeThreadItemTypeFileChange FileChangeThreadItemType = "fileChange"
)
type FileSystemAccessMode ¶
type FileSystemAccessMode string
const ( FileSystemAccessModeRead FileSystemAccessMode = "read" FileSystemAccessModeWrite FileSystemAccessMode = "write" FileSystemAccessModeDeny FileSystemAccessMode = "deny" )
type FileSystemPath ¶
type FileSystemPath struct {
Path *PathFileSystemPath
GlobPattern *GlobPatternFileSystemPath
Special *SpecialFileSystemPath
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
FileSystemPath contains exactly one typed variant or Unknown.
func (FileSystemPath) MarshalJSON ¶
func (v FileSystemPath) MarshalJSON() ([]byte, error)
func (*FileSystemPath) UnmarshalJSON ¶
func (v *FileSystemPath) UnmarshalJSON(data []byte) error
type FileSystemSandboxEntry ¶
type FileSystemSandboxEntry struct {
Access FileSystemAccessMode `json:"access" protocol:"required"`
Path FileSystemPath `json:"path" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FileSystemSandboxEntry) MarshalJSON ¶
func (v FileSystemSandboxEntry) MarshalJSON() ([]byte, error)
func (*FileSystemSandboxEntry) UnmarshalJSON ¶
func (v *FileSystemSandboxEntry) UnmarshalJSON(data []byte) error
type FileSystemSpecialPath ¶
type FileSystemSpecialPath struct {
Root *RootFileSystemSpecialPath
Minimal *MinimalFileSystemSpecialPath
Kind *KindFileSystemSpecialPath
Tmpdir *TmpdirFileSystemSpecialPath
SlashTmp *SlashTmpFileSystemSpecialPath
FileSystemSpecialPathVariant5 *FileSystemSpecialPathVariant5
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
FileSystemSpecialPath contains exactly one typed variant or Unknown.
func (FileSystemSpecialPath) MarshalJSON ¶
func (v FileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (*FileSystemSpecialPath) UnmarshalJSON ¶
func (v *FileSystemSpecialPath) UnmarshalJSON(data []byte) error
type FileSystemSpecialPathVariant5 ¶
type FileSystemSpecialPathVariant5 struct {
Kind FileSystemSpecialPathVariant5Kind `json:"kind" protocol:"required,const=unknown"`
Path string `json:"path" protocol:"required"`
Subpath Optional[LegacyAppPathString] `json:"subpath" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FileSystemSpecialPathVariant5) MarshalJSON ¶
func (v FileSystemSpecialPathVariant5) MarshalJSON() ([]byte, error)
func (*FileSystemSpecialPathVariant5) UnmarshalJSON ¶
func (v *FileSystemSpecialPathVariant5) UnmarshalJSON(data []byte) error
type FileSystemSpecialPathVariant5Kind ¶
type FileSystemSpecialPathVariant5Kind string
const (
FileSystemSpecialPathVariant5KindUnknown FileSystemSpecialPathVariant5Kind = "unknown"
)
type FileUpdateChange ¶
type FileUpdateChange struct {
Diff string `json:"diff" protocol:"required"`
Kind PatchChangeKind `json:"kind" protocol:"required"`
Path string `json:"path" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FileUpdateChange) MarshalJSON ¶
func (v FileUpdateChange) MarshalJSON() ([]byte, error)
func (*FileUpdateChange) UnmarshalJSON ¶
func (v *FileUpdateChange) UnmarshalJSON(data []byte) error
type FindInPageResponsesAPIWebSearchAction ¶
type FindInPageResponsesAPIWebSearchAction struct {
Pattern Optional[string] `json:"pattern" protocol:"nullable"`
Type FindInPageResponsesAPIWebSearchActionType `json:"type" protocol:"required,const=find_in_page"`
URL Optional[string] `json:"url" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FindInPageResponsesAPIWebSearchAction) MarshalJSON ¶
func (v FindInPageResponsesAPIWebSearchAction) MarshalJSON() ([]byte, error)
func (*FindInPageResponsesAPIWebSearchAction) UnmarshalJSON ¶
func (v *FindInPageResponsesAPIWebSearchAction) UnmarshalJSON(data []byte) error
type FindInPageResponsesAPIWebSearchActionType ¶
type FindInPageResponsesAPIWebSearchActionType string
const (
FindInPageResponsesAPIWebSearchActionTypeFindInPage FindInPageResponsesAPIWebSearchActionType = "find_in_page"
)
type FindInPageWebSearchAction ¶
type FindInPageWebSearchAction struct {
Pattern Optional[string] `json:"pattern" protocol:"nullable"`
Type FindInPageWebSearchActionType `json:"type" protocol:"required,const=findInPage"`
URL Optional[string] `json:"url" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FindInPageWebSearchAction) MarshalJSON ¶
func (v FindInPageWebSearchAction) MarshalJSON() ([]byte, error)
func (*FindInPageWebSearchAction) UnmarshalJSON ¶
func (v *FindInPageWebSearchAction) UnmarshalJSON(data []byte) error
type FindInPageWebSearchActionType ¶
type FindInPageWebSearchActionType string
const (
FindInPageWebSearchActionTypeFindInPage FindInPageWebSearchActionType = "findInPage"
)
type FunctionCallOutputBody ¶
type FunctionCallOutputBody struct {
Value *string
Items *[]FunctionCallOutputContentItem
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
FunctionCallOutputBody contains exactly one typed variant or Unknown.
func (FunctionCallOutputBody) MarshalJSON ¶
func (v FunctionCallOutputBody) MarshalJSON() ([]byte, error)
func (*FunctionCallOutputBody) UnmarshalJSON ¶
func (v *FunctionCallOutputBody) UnmarshalJSON(data []byte) error
type FunctionCallOutputContentItem ¶
type FunctionCallOutputContentItem struct {
InputText *InputTextFunctionCallOutputContentItem
InputImage *InputImageFunctionCallOutputContentItem
InputAudio *InputAudioFunctionCallOutputContentItem
EncryptedContent *EncryptedContentFunctionCallOutputContentItem
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs. FunctionCallOutputContentItem contains exactly one typed variant or Unknown.
func (FunctionCallOutputContentItem) MarshalJSON ¶
func (v FunctionCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*FunctionCallOutputContentItem) UnmarshalJSON ¶
func (v *FunctionCallOutputContentItem) UnmarshalJSON(data []byte) error
type FunctionCallOutputResponseItem ¶
type FunctionCallOutputResponseItem struct {
CallID Optional[string] `json:"call_id" protocol:"nullable"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Name Optional[string] `json:"name" protocol:"nullable"`
Namespace Optional[string] `json:"namespace" protocol:"nullable"`
Output FunctionCallOutputBody `json:"output" protocol:"required"`
Type FunctionCallOutputResponseItemType `json:"type" protocol:"required,const=function_call_output"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FunctionCallOutputResponseItem) MarshalJSON ¶
func (v FunctionCallOutputResponseItem) MarshalJSON() ([]byte, error)
func (*FunctionCallOutputResponseItem) UnmarshalJSON ¶
func (v *FunctionCallOutputResponseItem) UnmarshalJSON(data []byte) error
type FunctionCallOutputResponseItemType ¶
type FunctionCallOutputResponseItemType string
const (
FunctionCallOutputResponseItemTypeFunctionCallOutput FunctionCallOutputResponseItemType = "function_call_output"
)
type FunctionCallOutputThreadItem ¶
type FunctionCallOutputThreadItem struct {
ID string `json:"id" protocol:"required"`
Name string `json:"name" protocol:"required"`
Namespace Optional[string] `json:"namespace" protocol:"nullable"`
Output FunctionCallOutputBody `json:"output" protocol:"required"`
Type FunctionCallOutputThreadItemType `json:"type" protocol:"required,const=functionCallOutput"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FunctionCallOutputThreadItem) MarshalJSON ¶
func (v FunctionCallOutputThreadItem) MarshalJSON() ([]byte, error)
func (*FunctionCallOutputThreadItem) UnmarshalJSON ¶
func (v *FunctionCallOutputThreadItem) UnmarshalJSON(data []byte) error
type FunctionCallOutputThreadItemType ¶
type FunctionCallOutputThreadItemType string
const (
FunctionCallOutputThreadItemTypeFunctionCallOutput FunctionCallOutputThreadItemType = "functionCallOutput"
)
type FunctionCallResponseItem ¶
type FunctionCallResponseItem struct {
Arguments string `json:"arguments" protocol:"required"`
CallID string `json:"call_id" protocol:"required"`
EncryptedFunctionArgs Optional[[]string] `json:"encrypted_function_args" protocol:"nullable"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Name string `json:"name" protocol:"required"`
Namespace Optional[string] `json:"namespace" protocol:"nullable"`
Type FunctionCallResponseItemType `json:"type" protocol:"required,const=function_call"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FunctionCallResponseItem) MarshalJSON ¶
func (v FunctionCallResponseItem) MarshalJSON() ([]byte, error)
func (*FunctionCallResponseItem) UnmarshalJSON ¶
func (v *FunctionCallResponseItem) UnmarshalJSON(data []byte) error
type FunctionCallResponseItemType ¶
type FunctionCallResponseItemType string
const (
FunctionCallResponseItemTypeFunctionCall FunctionCallResponseItemType = "function_call"
)
type FunctionDynamicToolNamespaceTool ¶
type FunctionDynamicToolNamespaceTool struct {
DeferLoading Optional[bool] `json:"deferLoading" protocol:""`
Description string `json:"description" protocol:"required"`
InputSchema json.RawMessage `json:"inputSchema" protocol:"required,nullable"`
Name string `json:"name" protocol:"required"`
Type FunctionDynamicToolNamespaceToolType `json:"type" protocol:"required,const=function"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FunctionDynamicToolNamespaceTool) MarshalJSON ¶
func (v FunctionDynamicToolNamespaceTool) MarshalJSON() ([]byte, error)
func (*FunctionDynamicToolNamespaceTool) UnmarshalJSON ¶
func (v *FunctionDynamicToolNamespaceTool) UnmarshalJSON(data []byte) error
type FunctionDynamicToolNamespaceToolType ¶
type FunctionDynamicToolNamespaceToolType string
const (
FunctionDynamicToolNamespaceToolTypeFunction FunctionDynamicToolNamespaceToolType = "function"
)
type FunctionDynamicToolSpec ¶
type FunctionDynamicToolSpec struct {
DeferLoading Optional[bool] `json:"deferLoading" protocol:""`
Description string `json:"description" protocol:"required"`
InputSchema json.RawMessage `json:"inputSchema" protocol:"required,nullable"`
Name string `json:"name" protocol:"required"`
Type FunctionDynamicToolSpecType `json:"type" protocol:"required,const=function"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (FunctionDynamicToolSpec) MarshalJSON ¶
func (v FunctionDynamicToolSpec) MarshalJSON() ([]byte, error)
func (*FunctionDynamicToolSpec) UnmarshalJSON ¶
func (v *FunctionDynamicToolSpec) UnmarshalJSON(data []byte) error
type FunctionDynamicToolSpecType ¶
type FunctionDynamicToolSpecType string
const (
FunctionDynamicToolSpecTypeFunction FunctionDynamicToolSpecType = "function"
)
type GitInfo ¶
type GitInfo struct {
Branch Optional[string] `json:"branch" protocol:"nullable"`
OriginURL Optional[string] `json:"originUrl" protocol:"nullable"`
Sha Optional[string] `json:"sha" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (GitInfo) MarshalJSON ¶
func (*GitInfo) UnmarshalJSON ¶
type GlobPatternFileSystemPath ¶
type GlobPatternFileSystemPath struct {
Pattern string `json:"pattern" protocol:"required"`
Type GlobPatternFileSystemPathType `json:"type" protocol:"required,const=glob_pattern"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (GlobPatternFileSystemPath) MarshalJSON ¶
func (v GlobPatternFileSystemPath) MarshalJSON() ([]byte, error)
func (*GlobPatternFileSystemPath) UnmarshalJSON ¶
func (v *GlobPatternFileSystemPath) UnmarshalJSON(data []byte) error
type GlobPatternFileSystemPathType ¶
type GlobPatternFileSystemPathType string
const (
GlobPatternFileSystemPathTypeGlobPattern GlobPatternFileSystemPathType = "glob_pattern"
)
type GrantedPermissionProfile ¶
type GrantedPermissionProfile struct {
FileSystem Optional[AdditionalFileSystemPermissions] `json:"fileSystem" protocol:"nullable"`
Network Optional[AdditionalNetworkPermissions] `json:"network" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (GrantedPermissionProfile) MarshalJSON ¶
func (v GrantedPermissionProfile) MarshalJSON() ([]byte, error)
func (*GrantedPermissionProfile) UnmarshalJSON ¶
func (v *GrantedPermissionProfile) UnmarshalJSON(data []byte) error
type GranularAskForApproval ¶
type GranularAskForApproval struct {
Granular GranularAskForApprovalGranular `json:"granular" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (GranularAskForApproval) MarshalJSON ¶
func (v GranularAskForApproval) MarshalJSON() ([]byte, error)
func (*GranularAskForApproval) UnmarshalJSON ¶
func (v *GranularAskForApproval) UnmarshalJSON(data []byte) error
type GranularAskForApprovalGranular ¶
type GranularAskForApprovalGranular struct {
MCPElicitations bool `json:"mcp_elicitations" protocol:"required"`
RequestPermissions Optional[bool] `json:"request_permissions" protocol:""`
Rules bool `json:"rules" protocol:"required"`
SandboxApproval bool `json:"sandbox_approval" protocol:"required"`
SkillApproval Optional[bool] `json:"skill_approval" protocol:""`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (GranularAskForApprovalGranular) MarshalJSON ¶
func (v GranularAskForApprovalGranular) MarshalJSON() ([]byte, error)
func (*GranularAskForApprovalGranular) UnmarshalJSON ¶
func (v *GranularAskForApprovalGranular) UnmarshalJSON(data []byte) error
type HTTPConnectionFailedCodexErrorInfo ¶
type HTTPConnectionFailedCodexErrorInfo struct {
HTTPConnectionFailed HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed `json:"httpConnectionFailed" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (HTTPConnectionFailedCodexErrorInfo) MarshalJSON ¶
func (v HTTPConnectionFailedCodexErrorInfo) MarshalJSON() ([]byte, error)
func (*HTTPConnectionFailedCodexErrorInfo) UnmarshalJSON ¶
func (v *HTTPConnectionFailedCodexErrorInfo) UnmarshalJSON(data []byte) error
type HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed ¶
type HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed struct {
HTTPStatusCode Optional[uint16] `json:"httpStatusCode" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed) MarshalJSON ¶
func (v HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed) MarshalJSON() ([]byte, error)
func (*HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed) UnmarshalJSON ¶
func (v *HTTPConnectionFailedCodexErrorInfoHTTPConnectionFailed) UnmarshalJSON(data []byte) error
type HookPromptFragment ¶
type HookPromptFragment struct {
HookRunID string `json:"hookRunId" protocol:"required"`
Text string `json:"text" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (HookPromptFragment) MarshalJSON ¶
func (v HookPromptFragment) MarshalJSON() ([]byte, error)
func (*HookPromptFragment) UnmarshalJSON ¶
func (v *HookPromptFragment) UnmarshalJSON(data []byte) error
type HookPromptThreadItem ¶
type HookPromptThreadItem struct {
Fragments []HookPromptFragment `json:"fragments" protocol:"required"`
ID string `json:"id" protocol:"required"`
Type HookPromptThreadItemType `json:"type" protocol:"required,const=hookPrompt"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (HookPromptThreadItem) MarshalJSON ¶
func (v HookPromptThreadItem) MarshalJSON() ([]byte, error)
func (*HookPromptThreadItem) UnmarshalJSON ¶
func (v *HookPromptThreadItem) UnmarshalJSON(data []byte) error
type HookPromptThreadItemType ¶
type HookPromptThreadItemType string
const (
HookPromptThreadItemTypeHookPrompt HookPromptThreadItemType = "hookPrompt"
)
type IdleThreadStatus ¶
type IdleThreadStatus struct {
Type IdleThreadStatusType `json:"type" protocol:"required,const=idle"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (IdleThreadStatus) MarshalJSON ¶
func (v IdleThreadStatus) MarshalJSON() ([]byte, error)
func (*IdleThreadStatus) UnmarshalJSON ¶
func (v *IdleThreadStatus) UnmarshalJSON(data []byte) error
type IdleThreadStatusType ¶
type IdleThreadStatusType string
const (
IdleThreadStatusTypeIdle IdleThreadStatusType = "idle"
)
type ImageDetail ¶
type ImageDetail string
const ( ImageDetailAuto ImageDetail = "auto" ImageDetailLow ImageDetail = "low" ImageDetailHigh ImageDetail = "high" ImageDetailOriginal ImageDetail = "original" )
type ImageGenerationCallResponseItem ¶
type ImageGenerationCallResponseItem struct {
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Result string `json:"result" protocol:"required"`
RevisedPrompt Optional[string] `json:"revised_prompt" protocol:"nullable"`
Status string `json:"status" protocol:"required"`
Type ImageGenerationCallResponseItemType `json:"type" protocol:"required,const=image_generation_call"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ImageGenerationCallResponseItem) MarshalJSON ¶
func (v ImageGenerationCallResponseItem) MarshalJSON() ([]byte, error)
func (*ImageGenerationCallResponseItem) UnmarshalJSON ¶
func (v *ImageGenerationCallResponseItem) UnmarshalJSON(data []byte) error
type ImageGenerationCallResponseItemType ¶
type ImageGenerationCallResponseItemType string
const (
ImageGenerationCallResponseItemTypeImageGenerationCall ImageGenerationCallResponseItemType = "image_generation_call"
)
type ImageGenerationFailure ¶
type ImageGenerationFailure struct {
UsageLimitExceeded *UsageLimitExceededImageGenerationFailure
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ImageGenerationFailure contains exactly one typed variant or Unknown.
func (ImageGenerationFailure) MarshalJSON ¶
func (v ImageGenerationFailure) MarshalJSON() ([]byte, error)
func (*ImageGenerationFailure) UnmarshalJSON ¶
func (v *ImageGenerationFailure) UnmarshalJSON(data []byte) error
type ImageGenerationThreadItem ¶
type ImageGenerationThreadItem struct {
Failure Optional[ImageGenerationFailure] `json:"failure" protocol:"nullable"`
ID string `json:"id" protocol:"required"`
Result string `json:"result" protocol:"required"`
RevisedPrompt Optional[string] `json:"revisedPrompt" protocol:"nullable"`
SavedPath Optional[AbsolutePathBuf] `json:"savedPath" protocol:"nullable"`
Status string `json:"status" protocol:"required"`
TransparentBackground Optional[bool] `json:"transparentBackground" protocol:"nullable"`
Type ImageGenerationThreadItemType `json:"type" protocol:"required,const=imageGeneration"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ImageGenerationThreadItem) MarshalJSON ¶
func (v ImageGenerationThreadItem) MarshalJSON() ([]byte, error)
func (*ImageGenerationThreadItem) UnmarshalJSON ¶
func (v *ImageGenerationThreadItem) UnmarshalJSON(data []byte) error
type ImageGenerationThreadItemType ¶
type ImageGenerationThreadItemType string
const (
ImageGenerationThreadItemTypeImageGeneration ImageGenerationThreadItemType = "imageGeneration"
)
type ImageUserInput ¶
type ImageUserInput struct {
Detail Optional[ImageDetail] `json:"detail" protocol:"nullable"`
FileID Optional[string] `json:"fileId" protocol:""`
Type ImageUserInputType `json:"type" protocol:"required,const=image"`
URL Optional[string] `json:"url" protocol:""`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ImageUserInput) MarshalJSON ¶
func (v ImageUserInput) MarshalJSON() ([]byte, error)
func (*ImageUserInput) UnmarshalJSON ¶
func (v *ImageUserInput) UnmarshalJSON(data []byte) error
type ImageUserInputType ¶
type ImageUserInputType string
const (
ImageUserInputTypeImage ImageUserInputType = "image"
)
type ImageViewThreadItem ¶
type ImageViewThreadItem struct {
ID string `json:"id" protocol:"required"`
Path LegacyAppPathString `json:"path" protocol:"required"`
Type ImageViewThreadItemType `json:"type" protocol:"required,const=imageView"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ImageViewThreadItem) MarshalJSON ¶
func (v ImageViewThreadItem) MarshalJSON() ([]byte, error)
func (*ImageViewThreadItem) UnmarshalJSON ¶
func (v *ImageViewThreadItem) UnmarshalJSON(data []byte) error
type ImageViewThreadItemType ¶
type ImageViewThreadItemType string
const (
ImageViewThreadItemTypeImageView ImageViewThreadItemType = "imageView"
)
type InitializeCapabilities ¶
type InitializeCapabilities struct {
// Opt into receiving experimental API methods and fields.
ExperimentalAPI Optional[bool] `json:"experimentalApi" protocol:""`
// Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.
ExplicitGatewayOAuth Optional[bool] `json:"explicitGatewayOauth" protocol:""`
// MCP extension settings declared by the app-server client.
Extensions Optional[map[string]json.RawMessage] `json:"extensions" protocol:"nullable"`
// Legacy opt-in for the `openai/form` MCP extension.
//
// New clients should declare `openai/form` in [`Self::extensions`].
MCPServerOpenaiFormElicitation Optional[bool] `json:"mcpServerOpenaiFormElicitation" protocol:""`
// Exact notification method names that should be suppressed for this connection (for example `thread/started`).
OptOutNotificationMethods Optional[[]string] `json:"optOutNotificationMethods" protocol:"nullable"`
// Opt into `attestation/generate` requests for upstream `x-oai-attestation`.
RequestAttestation Optional[bool] `json:"requestAttestation" protocol:""`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Client-declared capabilities negotiated during initialize.
func (InitializeCapabilities) MarshalJSON ¶
func (v InitializeCapabilities) MarshalJSON() ([]byte, error)
func (*InitializeCapabilities) UnmarshalJSON ¶
func (v *InitializeCapabilities) UnmarshalJSON(data []byte) error
type InitializeParams ¶
type InitializeParams struct {
Capabilities Optional[InitializeCapabilities] `json:"capabilities" protocol:"nullable"`
ClientInfo ClientInfo `json:"clientInfo" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InitializeParams) MarshalJSON ¶
func (v InitializeParams) MarshalJSON() ([]byte, error)
func (*InitializeParams) UnmarshalJSON ¶
func (v *InitializeParams) UnmarshalJSON(data []byte) error
type InitializeResponse ¶
type InitializeResponse struct {
// Absolute path to the server's $CODEX_HOME directory.
CodexHome AbsolutePathBuf `json:"codexHome" protocol:"required"`
// Platform family for the running app-server target, for example `"unix"` or `"windows"`.
PlatformFamily string `json:"platformFamily" protocol:"required"`
// Operating system for the running app-server target, for example `"macos"`, `"linux"`, or `"windows"`.
PlatformOS string `json:"platformOs" protocol:"required"`
UserAgent string `json:"userAgent" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InitializeResponse) MarshalJSON ¶
func (v InitializeResponse) MarshalJSON() ([]byte, error)
func (*InitializeResponse) UnmarshalJSON ¶
func (v *InitializeResponse) UnmarshalJSON(data []byte) error
type InputAudioContentItem ¶
type InputAudioContentItem struct {
AudioURL string `json:"audio_url" protocol:"required"`
Type InputAudioContentItemType `json:"type" protocol:"required,const=input_audio"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputAudioContentItem) MarshalJSON ¶
func (v InputAudioContentItem) MarshalJSON() ([]byte, error)
func (*InputAudioContentItem) UnmarshalJSON ¶
func (v *InputAudioContentItem) UnmarshalJSON(data []byte) error
type InputAudioContentItemType ¶
type InputAudioContentItemType string
const (
InputAudioContentItemTypeInputAudio InputAudioContentItemType = "input_audio"
)
type InputAudioDynamicToolCallOutputContentItem ¶
type InputAudioDynamicToolCallOutputContentItem struct {
AudioURL string `json:"audioUrl" protocol:"required"`
Type InputAudioDynamicToolCallOutputContentItemType `json:"type" protocol:"required,const=inputAudio"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputAudioDynamicToolCallOutputContentItem) MarshalJSON ¶
func (v InputAudioDynamicToolCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*InputAudioDynamicToolCallOutputContentItem) UnmarshalJSON ¶
func (v *InputAudioDynamicToolCallOutputContentItem) UnmarshalJSON(data []byte) error
type InputAudioDynamicToolCallOutputContentItemType ¶
type InputAudioDynamicToolCallOutputContentItemType string
const (
InputAudioDynamicToolCallOutputContentItemTypeInputAudio InputAudioDynamicToolCallOutputContentItemType = "inputAudio"
)
type InputAudioFunctionCallOutputContentItem ¶
type InputAudioFunctionCallOutputContentItem struct {
AudioURL string `json:"audio_url" protocol:"required"`
Type InputAudioFunctionCallOutputContentItemType `json:"type" protocol:"required,const=input_audio"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputAudioFunctionCallOutputContentItem) MarshalJSON ¶
func (v InputAudioFunctionCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*InputAudioFunctionCallOutputContentItem) UnmarshalJSON ¶
func (v *InputAudioFunctionCallOutputContentItem) UnmarshalJSON(data []byte) error
type InputAudioFunctionCallOutputContentItemType ¶
type InputAudioFunctionCallOutputContentItemType string
const (
InputAudioFunctionCallOutputContentItemTypeInputAudio InputAudioFunctionCallOutputContentItemType = "input_audio"
)
type InputImageContentItem ¶
type InputImageContentItem struct {
Detail Optional[ImageDetail] `json:"detail" protocol:"nullable"`
FileID Optional[string] `json:"file_id" protocol:""`
ImageURL Optional[string] `json:"image_url" protocol:""`
Type InputImageContentItemType `json:"type" protocol:"required,const=input_image"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputImageContentItem) MarshalJSON ¶
func (v InputImageContentItem) MarshalJSON() ([]byte, error)
func (*InputImageContentItem) UnmarshalJSON ¶
func (v *InputImageContentItem) UnmarshalJSON(data []byte) error
type InputImageContentItemType ¶
type InputImageContentItemType string
const (
InputImageContentItemTypeInputImage InputImageContentItemType = "input_image"
)
type InputImageDynamicToolCallOutputContentItem ¶
type InputImageDynamicToolCallOutputContentItem struct {
ImageURL string `json:"imageUrl" protocol:"required"`
Type InputImageDynamicToolCallOutputContentItemType `json:"type" protocol:"required,const=inputImage"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputImageDynamicToolCallOutputContentItem) MarshalJSON ¶
func (v InputImageDynamicToolCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*InputImageDynamicToolCallOutputContentItem) UnmarshalJSON ¶
func (v *InputImageDynamicToolCallOutputContentItem) UnmarshalJSON(data []byte) error
type InputImageDynamicToolCallOutputContentItemType ¶
type InputImageDynamicToolCallOutputContentItemType string
const (
InputImageDynamicToolCallOutputContentItemTypeInputImage InputImageDynamicToolCallOutputContentItemType = "inputImage"
)
type InputImageFunctionCallOutputContentItem ¶
type InputImageFunctionCallOutputContentItem struct {
Detail Optional[ImageDetail] `json:"detail" protocol:"nullable"`
FileID Optional[string] `json:"file_id" protocol:""`
ImageURL Optional[string] `json:"image_url" protocol:""`
Type InputImageFunctionCallOutputContentItemType `json:"type" protocol:"required,const=input_image"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputImageFunctionCallOutputContentItem) MarshalJSON ¶
func (v InputImageFunctionCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*InputImageFunctionCallOutputContentItem) UnmarshalJSON ¶
func (v *InputImageFunctionCallOutputContentItem) UnmarshalJSON(data []byte) error
type InputImageFunctionCallOutputContentItemType ¶
type InputImageFunctionCallOutputContentItemType string
const (
InputImageFunctionCallOutputContentItemTypeInputImage InputImageFunctionCallOutputContentItemType = "input_image"
)
type InputTextAgentMessageInputContent ¶
type InputTextAgentMessageInputContent struct {
Text string `json:"text" protocol:"required"`
Type InputTextAgentMessageInputContentType `json:"type" protocol:"required,const=input_text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputTextAgentMessageInputContent) MarshalJSON ¶
func (v InputTextAgentMessageInputContent) MarshalJSON() ([]byte, error)
func (*InputTextAgentMessageInputContent) UnmarshalJSON ¶
func (v *InputTextAgentMessageInputContent) UnmarshalJSON(data []byte) error
type InputTextAgentMessageInputContentType ¶
type InputTextAgentMessageInputContentType string
const (
InputTextAgentMessageInputContentTypeInputText InputTextAgentMessageInputContentType = "input_text"
)
type InputTextContentItem ¶
type InputTextContentItem struct {
Text string `json:"text" protocol:"required"`
Type InputTextContentItemType `json:"type" protocol:"required,const=input_text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputTextContentItem) MarshalJSON ¶
func (v InputTextContentItem) MarshalJSON() ([]byte, error)
func (*InputTextContentItem) UnmarshalJSON ¶
func (v *InputTextContentItem) UnmarshalJSON(data []byte) error
type InputTextContentItemType ¶
type InputTextContentItemType string
const (
InputTextContentItemTypeInputText InputTextContentItemType = "input_text"
)
type InputTextDynamicToolCallOutputContentItem ¶
type InputTextDynamicToolCallOutputContentItem struct {
Text string `json:"text" protocol:"required"`
Type InputTextDynamicToolCallOutputContentItemType `json:"type" protocol:"required,const=inputText"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputTextDynamicToolCallOutputContentItem) MarshalJSON ¶
func (v InputTextDynamicToolCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*InputTextDynamicToolCallOutputContentItem) UnmarshalJSON ¶
func (v *InputTextDynamicToolCallOutputContentItem) UnmarshalJSON(data []byte) error
type InputTextDynamicToolCallOutputContentItemType ¶
type InputTextDynamicToolCallOutputContentItemType string
const (
InputTextDynamicToolCallOutputContentItemTypeInputText InputTextDynamicToolCallOutputContentItemType = "inputText"
)
type InputTextFunctionCallOutputContentItem ¶
type InputTextFunctionCallOutputContentItem struct {
Text string `json:"text" protocol:"required"`
Type InputTextFunctionCallOutputContentItemType `json:"type" protocol:"required,const=input_text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (InputTextFunctionCallOutputContentItem) MarshalJSON ¶
func (v InputTextFunctionCallOutputContentItem) MarshalJSON() ([]byte, error)
func (*InputTextFunctionCallOutputContentItem) UnmarshalJSON ¶
func (v *InputTextFunctionCallOutputContentItem) UnmarshalJSON(data []byte) error
type InputTextFunctionCallOutputContentItemType ¶
type InputTextFunctionCallOutputContentItemType string
const (
InputTextFunctionCallOutputContentItemTypeInputText InputTextFunctionCallOutputContentItemType = "input_text"
)
type InternalChatMessageMetadataPassthrough ¶
type InternalChatMessageMetadataPassthrough struct {
TurnID Optional[string] `json:"turn_id" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Internal Responses API passthrough metadata copied into underlying chat messages.
Responses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.
func (InternalChatMessageMetadataPassthrough) MarshalJSON ¶
func (v InternalChatMessageMetadataPassthrough) MarshalJSON() ([]byte, error)
func (*InternalChatMessageMetadataPassthrough) UnmarshalJSON ¶
func (v *InternalChatMessageMetadataPassthrough) UnmarshalJSON(data []byte) error
type ItemCompletedNotification ¶
type ItemCompletedNotification struct {
// Unix timestamp (in milliseconds) when this item lifecycle completed.
CompletedAtMs int64 `json:"completedAtMs" protocol:"required"`
Item ThreadItem `json:"item" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ItemCompletedNotification) MarshalJSON ¶
func (v ItemCompletedNotification) MarshalJSON() ([]byte, error)
func (*ItemCompletedNotification) UnmarshalJSON ¶
func (v *ItemCompletedNotification) UnmarshalJSON(data []byte) error
type ItemStartedNotification ¶
type ItemStartedNotification struct {
Item ThreadItem `json:"item" protocol:"required"`
// Unix timestamp (in milliseconds) when this item lifecycle started.
StartedAtMs int64 `json:"startedAtMs" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ItemStartedNotification) MarshalJSON ¶
func (v ItemStartedNotification) MarshalJSON() ([]byte, error)
func (*ItemStartedNotification) UnmarshalJSON ¶
func (v *ItemStartedNotification) UnmarshalJSON(data []byte) error
type ItemThreadItemsListAnchor ¶
type ItemThreadItemsListAnchor struct {
ItemID string `json:"itemId" protocol:"required"`
Type ItemThreadItemsListAnchorType `json:"type" protocol:"required,const=item"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ItemThreadItemsListAnchor) MarshalJSON ¶
func (v ItemThreadItemsListAnchor) MarshalJSON() ([]byte, error)
func (*ItemThreadItemsListAnchor) UnmarshalJSON ¶
func (v *ItemThreadItemsListAnchor) UnmarshalJSON(data []byte) error
type ItemThreadItemsListAnchorType ¶
type ItemThreadItemsListAnchorType string
const (
ItemThreadItemsListAnchorTypeItem ItemThreadItemsListAnchorType = "item"
)
type KindFileSystemSpecialPath ¶
type KindFileSystemSpecialPath struct {
Kind KindFileSystemSpecialPathKind `json:"kind" protocol:"required,const=project_roots"`
Subpath Optional[LegacyAppPathString] `json:"subpath" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (KindFileSystemSpecialPath) MarshalJSON ¶
func (v KindFileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (*KindFileSystemSpecialPath) UnmarshalJSON ¶
func (v *KindFileSystemSpecialPath) UnmarshalJSON(data []byte) error
type KindFileSystemSpecialPathKind ¶
type KindFileSystemSpecialPathKind string
const (
KindFileSystemSpecialPathKindProjectRoots KindFileSystemSpecialPathKind = "project_roots"
)
type LegacyAppPathString ¶
type LegacyAppPathString = string
type ListFilesCommandAction ¶
type ListFilesCommandAction struct {
Command string `json:"command" protocol:"required"`
Path Optional[string] `json:"path" protocol:"nullable"`
Type ListFilesCommandActionType `json:"type" protocol:"required,const=listFiles"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ListFilesCommandAction) MarshalJSON ¶
func (v ListFilesCommandAction) MarshalJSON() ([]byte, error)
func (*ListFilesCommandAction) UnmarshalJSON ¶
func (v *ListFilesCommandAction) UnmarshalJSON(data []byte) error
type ListFilesCommandActionType ¶
type ListFilesCommandActionType string
const (
ListFilesCommandActionTypeListFiles ListFilesCommandActionType = "listFiles"
)
type ListFilesParsedCommand ¶
type ListFilesParsedCommand struct {
Cmd string `json:"cmd" protocol:"required"`
Path Optional[string] `json:"path" protocol:"nullable"`
Type ListFilesParsedCommandType `json:"type" protocol:"required,const=list_files"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ListFilesParsedCommand) MarshalJSON ¶
func (v ListFilesParsedCommand) MarshalJSON() ([]byte, error)
func (*ListFilesParsedCommand) UnmarshalJSON ¶
func (v *ListFilesParsedCommand) UnmarshalJSON(data []byte) error
type ListFilesParsedCommandType ¶
type ListFilesParsedCommandType string
const (
ListFilesParsedCommandTypeListFiles ListFilesParsedCommandType = "list_files"
)
type LocalAudioUserInput ¶
type LocalAudioUserInput struct {
Path string `json:"path" protocol:"required"`
Type LocalAudioUserInputType `json:"type" protocol:"required,const=localAudio"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (LocalAudioUserInput) MarshalJSON ¶
func (v LocalAudioUserInput) MarshalJSON() ([]byte, error)
func (*LocalAudioUserInput) UnmarshalJSON ¶
func (v *LocalAudioUserInput) UnmarshalJSON(data []byte) error
type LocalAudioUserInputType ¶
type LocalAudioUserInputType string
const (
LocalAudioUserInputTypeLocalAudio LocalAudioUserInputType = "localAudio"
)
type LocalImageUserInput ¶
type LocalImageUserInput struct {
Detail Optional[ImageDetail] `json:"detail" protocol:"nullable"`
Path string `json:"path" protocol:"required"`
Type LocalImageUserInputType `json:"type" protocol:"required,const=localImage"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (LocalImageUserInput) MarshalJSON ¶
func (v LocalImageUserInput) MarshalJSON() ([]byte, error)
func (*LocalImageUserInput) UnmarshalJSON ¶
func (v *LocalImageUserInput) UnmarshalJSON(data []byte) error
type LocalImageUserInputType ¶
type LocalImageUserInputType string
const (
LocalImageUserInputTypeLocalImage LocalImageUserInputType = "localImage"
)
type LocalShellAction ¶
type LocalShellAction struct {
Exec *ExecLocalShellAction
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
LocalShellAction contains exactly one typed variant or Unknown.
func (LocalShellAction) MarshalJSON ¶
func (v LocalShellAction) MarshalJSON() ([]byte, error)
func (*LocalShellAction) UnmarshalJSON ¶
func (v *LocalShellAction) UnmarshalJSON(data []byte) error
type LocalShellCallResponseItem ¶
type LocalShellCallResponseItem struct {
Action LocalShellAction `json:"action" protocol:"required"`
// Set when using the Responses API.
CallID Optional[string] `json:"call_id" protocol:"nullable"`
// Legacy id field retained for compatibility with older payloads.
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Status LocalShellStatus `json:"status" protocol:"required"`
Type LocalShellCallResponseItemType `json:"type" protocol:"required,const=local_shell_call"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (LocalShellCallResponseItem) MarshalJSON ¶
func (v LocalShellCallResponseItem) MarshalJSON() ([]byte, error)
func (*LocalShellCallResponseItem) UnmarshalJSON ¶
func (v *LocalShellCallResponseItem) UnmarshalJSON(data []byte) error
type LocalShellCallResponseItemType ¶
type LocalShellCallResponseItemType string
const (
LocalShellCallResponseItemTypeLocalShellCall LocalShellCallResponseItemType = "local_shell_call"
)
type LocalShellStatus ¶
type LocalShellStatus string
const ( LocalShellStatusCompleted LocalShellStatus = "completed" LocalShellStatusInProgress LocalShellStatus = "in_progress" LocalShellStatusIncomplete LocalShellStatus = "incomplete" )
type MCPAppDisplayMode ¶
type MCPAppDisplayMode string
const ( MCPAppDisplayModeInline MCPAppDisplayMode = "inline" MCPAppDisplayModeFullscreen MCPAppDisplayMode = "fullscreen" )
type MCPAppUI ¶
type MCPAppUI struct {
PreferredModelDisplayMode MCPAppDisplayMode `json:"preferredModelDisplayMode" protocol:"required"`
ResourceURI string `json:"resourceUri" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
UI resource and display preference for model invocations, captured from the tool descriptor.
func (MCPAppUI) MarshalJSON ¶
func (*MCPAppUI) UnmarshalJSON ¶
type MCPToolCallAppContext ¶
type MCPToolCallAppContext struct {
ActionName Optional[string] `json:"actionName" protocol:"nullable"`
AppName Optional[string] `json:"appName" protocol:"nullable"`
ConnectorID string `json:"connectorId" protocol:"required"`
LinkID Optional[string] `json:"linkId" protocol:"nullable"`
ResourceURI Optional[string] `json:"resourceUri" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MCPToolCallAppContext) MarshalJSON ¶
func (v MCPToolCallAppContext) MarshalJSON() ([]byte, error)
func (*MCPToolCallAppContext) UnmarshalJSON ¶
func (v *MCPToolCallAppContext) UnmarshalJSON(data []byte) error
type MCPToolCallError ¶
type MCPToolCallError struct {
Message string `json:"message" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MCPToolCallError) MarshalJSON ¶
func (v MCPToolCallError) MarshalJSON() ([]byte, error)
func (*MCPToolCallError) UnmarshalJSON ¶
func (v *MCPToolCallError) UnmarshalJSON(data []byte) error
type MCPToolCallResult ¶
type MCPToolCallResult struct {
Meta Optional[json.RawMessage] `json:"_meta" protocol:"nullable"`
Content []json.RawMessage `json:"content" protocol:"required"`
StructuredContent Optional[json.RawMessage] `json:"structuredContent" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MCPToolCallResult) MarshalJSON ¶
func (v MCPToolCallResult) MarshalJSON() ([]byte, error)
func (*MCPToolCallResult) UnmarshalJSON ¶
func (v *MCPToolCallResult) UnmarshalJSON(data []byte) error
type MCPToolCallStatus ¶
type MCPToolCallStatus string
const ( MCPToolCallStatusInProgress MCPToolCallStatus = "inProgress" MCPToolCallStatusCompleted MCPToolCallStatus = "completed" MCPToolCallStatusFailed MCPToolCallStatus = "failed" )
type MCPToolCallThreadItem ¶
type MCPToolCallThreadItem struct {
AppContext Optional[MCPToolCallAppContext] `json:"appContext" protocol:"nullable"`
Arguments json.RawMessage `json:"arguments" protocol:"required,nullable"`
// The duration of the MCP tool call in milliseconds.
DurationMs Optional[int64] `json:"durationMs" protocol:"nullable"`
Error Optional[MCPToolCallError] `json:"error" protocol:"nullable"`
ID string `json:"id" protocol:"required"`
// Legacy compatibility field; prefer `mcpAppUi.resourceUri` when available.
MCPAppResourceURI Optional[string] `json:"mcpAppResourceUri" protocol:"nullable"`
// Presentation captured from the invoked descriptor; absent in older history.
MCPAppUI Optional[MCPAppUI] `json:"mcpAppUi" protocol:"nullable"`
PluginID Optional[string] `json:"pluginId" protocol:"nullable"`
ReadOnlyHint Optional[bool] `json:"readOnlyHint" protocol:"nullable"`
Result Optional[MCPToolCallResult] `json:"result" protocol:"nullable"`
Server string `json:"server" protocol:"required"`
Status MCPToolCallStatus `json:"status" protocol:"required"`
Tool string `json:"tool" protocol:"required"`
Type MCPToolCallThreadItemType `json:"type" protocol:"required,const=mcpToolCall"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MCPToolCallThreadItem) MarshalJSON ¶
func (v MCPToolCallThreadItem) MarshalJSON() ([]byte, error)
func (*MCPToolCallThreadItem) UnmarshalJSON ¶
func (v *MCPToolCallThreadItem) UnmarshalJSON(data []byte) error
type MCPToolCallThreadItemType ¶
type MCPToolCallThreadItemType string
const (
MCPToolCallThreadItemTypeMCPToolCall MCPToolCallThreadItemType = "mcpToolCall"
)
type MemoryCitation ¶
type MemoryCitation struct {
Entries []MemoryCitationEntry `json:"entries" protocol:"required"`
ThreadIDs []string `json:"threadIds" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MemoryCitation) MarshalJSON ¶
func (v MemoryCitation) MarshalJSON() ([]byte, error)
func (*MemoryCitation) UnmarshalJSON ¶
func (v *MemoryCitation) UnmarshalJSON(data []byte) error
type MemoryCitationEntry ¶
type MemoryCitationEntry struct {
LineEnd uint32 `json:"lineEnd" protocol:"required"`
LineStart uint32 `json:"lineStart" protocol:"required"`
Note string `json:"note" protocol:"required"`
Path string `json:"path" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MemoryCitationEntry) MarshalJSON ¶
func (v MemoryCitationEntry) MarshalJSON() ([]byte, error)
func (*MemoryCitationEntry) UnmarshalJSON ¶
func (v *MemoryCitationEntry) UnmarshalJSON(data []byte) error
type MentionUserInput ¶
type MentionUserInput struct {
Name string `json:"name" protocol:"required"`
Path string `json:"path" protocol:"required"`
Type MentionUserInputType `json:"type" protocol:"required,const=mention"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MentionUserInput) MarshalJSON ¶
func (v MentionUserInput) MarshalJSON() ([]byte, error)
func (*MentionUserInput) UnmarshalJSON ¶
func (v *MentionUserInput) UnmarshalJSON(data []byte) error
type MentionUserInputType ¶
type MentionUserInputType string
const (
MentionUserInputTypeMention MentionUserInputType = "mention"
)
type MessagePhase ¶
type MessagePhase string
Classifies assistant text as commentary, a partial answer, or a terminal answer.
Providers do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.
const ( MessagePhaseCommentary MessagePhase = "commentary" MessagePhasePartialAnswer MessagePhase = "partial_answer" MessagePhaseFinalAnswer MessagePhase = "final_answer" )
type MessageResponseItem ¶
type MessageResponseItem struct {
Content []ContentItem `json:"content" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Phase Optional[MessagePhase] `json:"phase" protocol:"nullable"`
Role string `json:"role" protocol:"required"`
Type MessageResponseItemType `json:"type" protocol:"required,const=message"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MessageResponseItem) MarshalJSON ¶
func (v MessageResponseItem) MarshalJSON() ([]byte, error)
func (*MessageResponseItem) UnmarshalJSON ¶
func (v *MessageResponseItem) UnmarshalJSON(data []byte) error
type MessageResponseItemType ¶
type MessageResponseItemType string
const (
MessageResponseItemTypeMessage MessageResponseItemType = "message"
)
type MinimalFileSystemSpecialPath ¶
type MinimalFileSystemSpecialPath struct {
Kind MinimalFileSystemSpecialPathKind `json:"kind" protocol:"required,const=minimal"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MinimalFileSystemSpecialPath) MarshalJSON ¶
func (v MinimalFileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (*MinimalFileSystemSpecialPath) UnmarshalJSON ¶
func (v *MinimalFileSystemSpecialPath) UnmarshalJSON(data []byte) error
type MinimalFileSystemSpecialPathKind ¶
type MinimalFileSystemSpecialPathKind string
const (
MinimalFileSystemSpecialPathKindMinimal MinimalFileSystemSpecialPathKind = "minimal"
)
type MisalignmentErrorDetails ¶
type MisalignmentErrorDetails struct {
// A substantive localized explanation is required before offering continuation.
DetailedExplanation Optional[string] `json:"detailedExplanation" protocol:"nullable"`
// Open-ended classification; clients must accept categories added by Responses.
ErrorType Optional[string] `json:"errorType" protocol:"nullable"`
// Opaque server-issued block target. Presence alone does not enable target-based continuation.
ReviewTarget Optional[string] `json:"reviewTarget" protocol:"nullable"`
// Instruction to submit as the next turn's user input if continuation is confirmed.
Steer Optional[MisalignmentSteer] `json:"steer" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MisalignmentErrorDetails) MarshalJSON ¶
func (v MisalignmentErrorDetails) MarshalJSON() ([]byte, error)
func (*MisalignmentErrorDetails) UnmarshalJSON ¶
func (v *MisalignmentErrorDetails) UnmarshalJSON(data []byte) error
type MisalignmentSteer ¶
type MisalignmentSteer struct {
Message string `json:"message" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (MisalignmentSteer) MarshalJSON ¶
func (v MisalignmentSteer) MarshalJSON() ([]byte, error)
func (*MisalignmentSteer) UnmarshalJSON ¶
func (v *MisalignmentSteer) UnmarshalJSON(data []byte) error
type MultiAgentMode ¶
type MultiAgentMode struct {
Value *MultiAgentModeValue
Custom *CustomMultiAgentMode
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy. MultiAgentMode contains exactly one typed variant or Unknown.
func (MultiAgentMode) MarshalJSON ¶
func (v MultiAgentMode) MarshalJSON() ([]byte, error)
func (*MultiAgentMode) UnmarshalJSON ¶
func (v *MultiAgentMode) UnmarshalJSON(data []byte) error
type MultiAgentModeValue ¶
type MultiAgentModeValue string
const ( MultiAgentModeValueExplicitRequestOnly MultiAgentModeValue = "explicitRequestOnly" MultiAgentModeValueProactive MultiAgentModeValue = "proactive" )
type NamespaceDynamicToolSpec ¶
type NamespaceDynamicToolSpec struct {
Description string `json:"description" protocol:"required"`
Name string `json:"name" protocol:"required"`
Tools []DynamicToolNamespaceTool `json:"tools" protocol:"required"`
Type NamespaceDynamicToolSpecType `json:"type" protocol:"required,const=namespace"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (NamespaceDynamicToolSpec) MarshalJSON ¶
func (v NamespaceDynamicToolSpec) MarshalJSON() ([]byte, error)
func (*NamespaceDynamicToolSpec) UnmarshalJSON ¶
func (v *NamespaceDynamicToolSpec) UnmarshalJSON(data []byte) error
type NamespaceDynamicToolSpecType ¶
type NamespaceDynamicToolSpecType string
const (
NamespaceDynamicToolSpecTypeNamespace NamespaceDynamicToolSpecType = "namespace"
)
type NetworkAccess ¶
type NetworkAccess string
const ( NetworkAccessRestricted NetworkAccess = "restricted" NetworkAccessEnabled NetworkAccess = "enabled" )
type NetworkApprovalContext ¶
type NetworkApprovalContext struct {
Host string `json:"host" protocol:"required"`
Protocol NetworkApprovalProtocol `json:"protocol" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (NetworkApprovalContext) MarshalJSON ¶
func (v NetworkApprovalContext) MarshalJSON() ([]byte, error)
func (*NetworkApprovalContext) UnmarshalJSON ¶
func (v *NetworkApprovalContext) UnmarshalJSON(data []byte) error
type NetworkApprovalProtocol ¶
type NetworkApprovalProtocol string
const ( NetworkApprovalProtocolHTTP NetworkApprovalProtocol = "http" NetworkApprovalProtocolHttps NetworkApprovalProtocol = "https" NetworkApprovalProtocolSocks5Tcp NetworkApprovalProtocol = "socks5Tcp" NetworkApprovalProtocolSocks5Udp NetworkApprovalProtocol = "socks5Udp" )
type NetworkPolicyAmendment ¶
type NetworkPolicyAmendment struct {
Action NetworkPolicyRuleAction `json:"action" protocol:"required"`
Host string `json:"host" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (NetworkPolicyAmendment) MarshalJSON ¶
func (v NetworkPolicyAmendment) MarshalJSON() ([]byte, error)
func (*NetworkPolicyAmendment) UnmarshalJSON ¶
func (v *NetworkPolicyAmendment) UnmarshalJSON(data []byte) error
type NetworkPolicyAmendmentReviewDecision ¶
type NetworkPolicyAmendmentReviewDecision struct {
NetworkPolicyAmendment NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment `json:"network_policy_amendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
User chose to persist a network policy rule (allow/deny) for future requests to the same host.
func (NetworkPolicyAmendmentReviewDecision) MarshalJSON ¶
func (v NetworkPolicyAmendmentReviewDecision) MarshalJSON() ([]byte, error)
func (*NetworkPolicyAmendmentReviewDecision) UnmarshalJSON ¶
func (v *NetworkPolicyAmendmentReviewDecision) UnmarshalJSON(data []byte) error
type NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment ¶
type NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment struct {
NetworkPolicyAmendment NetworkPolicyAmendment `json:"network_policy_amendment" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment) MarshalJSON ¶
func (v NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment) MarshalJSON() ([]byte, error)
func (*NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment) UnmarshalJSON ¶
func (v *NetworkPolicyAmendmentReviewDecisionNetworkPolicyAmendment) UnmarshalJSON(data []byte) error
type NetworkPolicyRuleAction ¶
type NetworkPolicyRuleAction string
const ( NetworkPolicyRuleActionAllow NetworkPolicyRuleAction = "allow" NetworkPolicyRuleActionDeny NetworkPolicyRuleAction = "deny" )
type NonSteerableTurnKind ¶
type NonSteerableTurnKind string
const ( NonSteerableTurnKindReview NonSteerableTurnKind = "review" NonSteerableTurnKindCompact NonSteerableTurnKind = "compact" )
type NotLoadedThreadStatus ¶
type NotLoadedThreadStatus struct {
Type NotLoadedThreadStatusType `json:"type" protocol:"required,const=notLoaded"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (NotLoadedThreadStatus) MarshalJSON ¶
func (v NotLoadedThreadStatus) MarshalJSON() ([]byte, error)
func (*NotLoadedThreadStatus) UnmarshalJSON ¶
func (v *NotLoadedThreadStatus) UnmarshalJSON(data []byte) error
type NotLoadedThreadStatusType ¶
type NotLoadedThreadStatusType string
const (
NotLoadedThreadStatusTypeNotLoaded NotLoadedThreadStatusType = "notLoaded"
)
type OpenPageResponsesAPIWebSearchAction ¶
type OpenPageResponsesAPIWebSearchAction struct {
Type OpenPageResponsesAPIWebSearchActionType `json:"type" protocol:"required,const=open_page"`
URL Optional[string] `json:"url" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OpenPageResponsesAPIWebSearchAction) MarshalJSON ¶
func (v OpenPageResponsesAPIWebSearchAction) MarshalJSON() ([]byte, error)
func (*OpenPageResponsesAPIWebSearchAction) UnmarshalJSON ¶
func (v *OpenPageResponsesAPIWebSearchAction) UnmarshalJSON(data []byte) error
type OpenPageResponsesAPIWebSearchActionType ¶
type OpenPageResponsesAPIWebSearchActionType string
const (
OpenPageResponsesAPIWebSearchActionTypeOpenPage OpenPageResponsesAPIWebSearchActionType = "open_page"
)
type OpenPageWebSearchAction ¶
type OpenPageWebSearchAction struct {
Type OpenPageWebSearchActionType `json:"type" protocol:"required,const=openPage"`
URL Optional[string] `json:"url" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OpenPageWebSearchAction) MarshalJSON ¶
func (v OpenPageWebSearchAction) MarshalJSON() ([]byte, error)
func (*OpenPageWebSearchAction) UnmarshalJSON ¶
func (v *OpenPageWebSearchAction) UnmarshalJSON(data []byte) error
type OpenPageWebSearchActionType ¶
type OpenPageWebSearchActionType string
const (
OpenPageWebSearchActionTypeOpenPage OpenPageWebSearchActionType = "openPage"
)
type Optional ¶
type Optional[T any] struct { // contains filtered or unexported fields }
Optional preserves the three distinct JSON field states: omitted, null, and present with a value. Its zero value is omitted. Use Some or Null to construct a present value. Generated object codecs omit unset fields without relying on encoding/json's treatment of zero-valued structs.
Example ¶
package main
import (
"encoding/json"
"github.com/zoumo/agent-sdk-go/codex/types"
)
func main() {
params := types.ThreadStartParams{
Model: types.Some("configured-model"),
ServiceTier: types.Null[string](),
Ephemeral: types.Some(false),
}
if _, err := json.Marshal(params); err != nil {
panic(err)
}
// The model and false value are present, serviceTier is null, and every
// other optional field is omitted.
}
Output:
func (Optional[T]) MarshalJSON ¶
MarshalJSON encodes a present value. Outside a generated object, an unset Optional encodes as null because JSON values have no standalone omitted state.
func (*Optional[T]) UnmarshalJSON ¶
UnmarshalJSON records null separately from a value. It replaces the receiver only after successful decoding.
type OtherResponseItem ¶
type OtherResponseItem struct {
Type OtherResponseItemType `json:"type" protocol:"required,const=other"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OtherResponseItem) MarshalJSON ¶
func (v OtherResponseItem) MarshalJSON() ([]byte, error)
func (*OtherResponseItem) UnmarshalJSON ¶
func (v *OtherResponseItem) UnmarshalJSON(data []byte) error
type OtherResponseItemType ¶
type OtherResponseItemType string
const (
OtherResponseItemTypeOther OtherResponseItemType = "other"
)
type OtherResponsesAPIWebSearchAction ¶
type OtherResponsesAPIWebSearchAction struct {
Type OtherResponsesAPIWebSearchActionType `json:"type" protocol:"required,const=other"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OtherResponsesAPIWebSearchAction) MarshalJSON ¶
func (v OtherResponsesAPIWebSearchAction) MarshalJSON() ([]byte, error)
func (*OtherResponsesAPIWebSearchAction) UnmarshalJSON ¶
func (v *OtherResponsesAPIWebSearchAction) UnmarshalJSON(data []byte) error
type OtherResponsesAPIWebSearchActionType ¶
type OtherResponsesAPIWebSearchActionType string
const (
OtherResponsesAPIWebSearchActionTypeOther OtherResponsesAPIWebSearchActionType = "other"
)
type OtherSubAgentSource ¶
type OtherSubAgentSource struct {
Other string `json:"other" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OtherSubAgentSource) MarshalJSON ¶
func (v OtherSubAgentSource) MarshalJSON() ([]byte, error)
func (*OtherSubAgentSource) UnmarshalJSON ¶
func (v *OtherSubAgentSource) UnmarshalJSON(data []byte) error
type OtherWebSearchAction ¶
type OtherWebSearchAction struct {
Type OtherWebSearchActionType `json:"type" protocol:"required,const=other"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OtherWebSearchAction) MarshalJSON ¶
func (v OtherWebSearchAction) MarshalJSON() ([]byte, error)
func (*OtherWebSearchAction) UnmarshalJSON ¶
func (v *OtherWebSearchAction) UnmarshalJSON(data []byte) error
type OtherWebSearchActionType ¶
type OtherWebSearchActionType string
const (
OtherWebSearchActionTypeOther OtherWebSearchActionType = "other"
)
type OutputTextContentItem ¶
type OutputTextContentItem struct {
Text string `json:"text" protocol:"required"`
Type OutputTextContentItemType `json:"type" protocol:"required,const=output_text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (OutputTextContentItem) MarshalJSON ¶
func (v OutputTextContentItem) MarshalJSON() ([]byte, error)
func (*OutputTextContentItem) UnmarshalJSON ¶
func (v *OutputTextContentItem) UnmarshalJSON(data []byte) error
type OutputTextContentItemType ¶
type OutputTextContentItemType string
const (
OutputTextContentItemTypeOutputText OutputTextContentItemType = "output_text"
)
type ParsedCommand ¶
type ParsedCommand struct {
Read *ReadParsedCommand
ListFiles *ListFilesParsedCommand
Search *SearchParsedCommand
UnknownVariant *UnknownParsedCommand
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ParsedCommand contains exactly one typed variant or Unknown.
func (ParsedCommand) MarshalJSON ¶
func (v ParsedCommand) MarshalJSON() ([]byte, error)
func (*ParsedCommand) UnmarshalJSON ¶
func (v *ParsedCommand) UnmarshalJSON(data []byte) error
type PatchApplyStatus ¶
type PatchApplyStatus string
const ( PatchApplyStatusInProgress PatchApplyStatus = "inProgress" PatchApplyStatusCompleted PatchApplyStatus = "completed" PatchApplyStatusFailed PatchApplyStatus = "failed" PatchApplyStatusDeclined PatchApplyStatus = "declined" )
type PatchChangeKind ¶
type PatchChangeKind struct {
Add *AddPatchChangeKind
Delete *DeletePatchChangeKind
Update *UpdatePatchChangeKind
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
PatchChangeKind contains exactly one typed variant or Unknown.
func (PatchChangeKind) MarshalJSON ¶
func (v PatchChangeKind) MarshalJSON() ([]byte, error)
func (*PatchChangeKind) UnmarshalJSON ¶
func (v *PatchChangeKind) UnmarshalJSON(data []byte) error
type PathFileSystemPath ¶
type PathFileSystemPath struct {
Path LegacyAppPathString `json:"path" protocol:"required"`
Type PathFileSystemPathType `json:"type" protocol:"required,const=path"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (PathFileSystemPath) MarshalJSON ¶
func (v PathFileSystemPath) MarshalJSON() ([]byte, error)
func (*PathFileSystemPath) UnmarshalJSON ¶
func (v *PathFileSystemPath) UnmarshalJSON(data []byte) error
type PathFileSystemPathType ¶
type PathFileSystemPathType string
const (
PathFileSystemPathTypePath PathFileSystemPathType = "path"
)
type PermissionGrantScope ¶
type PermissionGrantScope string
const ( PermissionGrantScopeTurn PermissionGrantScope = "turn" PermissionGrantScopeSession PermissionGrantScope = "session" )
type PermissionsRequestApprovalParams ¶
type PermissionsRequestApprovalParams struct {
Cwd LegacyAppPathString `json:"cwd" protocol:"required"`
EnvironmentID Optional[string] `json:"environmentId" protocol:"nullable"`
ItemID string `json:"itemId" protocol:"required"`
Permissions RequestPermissionProfile `json:"permissions" protocol:"required"`
Reason Optional[string] `json:"reason" protocol:"nullable"`
// Unix timestamp (in milliseconds) when this approval request started.
StartedAtMs int64 `json:"startedAtMs" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (PermissionsRequestApprovalParams) MarshalJSON ¶
func (v PermissionsRequestApprovalParams) MarshalJSON() ([]byte, error)
func (*PermissionsRequestApprovalParams) UnmarshalJSON ¶
func (v *PermissionsRequestApprovalParams) UnmarshalJSON(data []byte) error
type PermissionsRequestApprovalResponse ¶
type PermissionsRequestApprovalResponse struct {
Permissions GrantedPermissionProfile `json:"permissions" protocol:"required"`
Scope Optional[PermissionGrantScope] `json:"scope" protocol:""`
// Review every subsequent command in this turn before normal sandboxed execution.
StrictAutoReview Optional[bool] `json:"strictAutoReview" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (PermissionsRequestApprovalResponse) MarshalJSON ¶
func (v PermissionsRequestApprovalResponse) MarshalJSON() ([]byte, error)
func (*PermissionsRequestApprovalResponse) UnmarshalJSON ¶
func (v *PermissionsRequestApprovalResponse) UnmarshalJSON(data []byte) error
type Personality
deprecated
type Personality string
Deprecated: `friendly` and `pragmatic` no longer select a style.
const ( PersonalityNone Personality = "none" PersonalityFriendly Personality = "friendly" PersonalityPragmatic Personality = "pragmatic" )
type PlanThreadItem ¶
type PlanThreadItem struct {
ID string `json:"id" protocol:"required"`
Text string `json:"text" protocol:"required"`
Type PlanThreadItemType `json:"type" protocol:"required,const=plan"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.
func (PlanThreadItem) MarshalJSON ¶
func (v PlanThreadItem) MarshalJSON() ([]byte, error)
func (*PlanThreadItem) UnmarshalJSON ¶
func (v *PlanThreadItem) UnmarshalJSON(data []byte) error
type PlanThreadItemType ¶
type PlanThreadItemType string
const (
PlanThreadItemTypePlan PlanThreadItemType = "plan"
)
type ReadCommandAction ¶
type ReadCommandAction struct {
Command string `json:"command" protocol:"required"`
Name string `json:"name" protocol:"required"`
Path LegacyAppPathString `json:"path" protocol:"required"`
Type ReadCommandActionType `json:"type" protocol:"required,const=read"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ReadCommandAction) MarshalJSON ¶
func (v ReadCommandAction) MarshalJSON() ([]byte, error)
func (*ReadCommandAction) UnmarshalJSON ¶
func (v *ReadCommandAction) UnmarshalJSON(data []byte) error
type ReadCommandActionType ¶
type ReadCommandActionType string
const (
ReadCommandActionTypeRead ReadCommandActionType = "read"
)
type ReadOnlySandboxPolicy ¶
type ReadOnlySandboxPolicy struct {
NetworkAccess Optional[bool] `json:"networkAccess" protocol:""`
Type ReadOnlySandboxPolicyType `json:"type" protocol:"required,const=readOnly"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ReadOnlySandboxPolicy) MarshalJSON ¶
func (v ReadOnlySandboxPolicy) MarshalJSON() ([]byte, error)
func (*ReadOnlySandboxPolicy) UnmarshalJSON ¶
func (v *ReadOnlySandboxPolicy) UnmarshalJSON(data []byte) error
type ReadOnlySandboxPolicyType ¶
type ReadOnlySandboxPolicyType string
const (
ReadOnlySandboxPolicyTypeReadOnly ReadOnlySandboxPolicyType = "readOnly"
)
type ReadParsedCommand ¶
type ReadParsedCommand struct {
Cmd string `json:"cmd" protocol:"required"`
Name string `json:"name" protocol:"required"`
// (Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd“ that will be used to run the command to derive the absolute path.
Path string `json:"path" protocol:"required"`
Type ReadParsedCommandType `json:"type" protocol:"required,const=read"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ReadParsedCommand) MarshalJSON ¶
func (v ReadParsedCommand) MarshalJSON() ([]byte, error)
func (*ReadParsedCommand) UnmarshalJSON ¶
func (v *ReadParsedCommand) UnmarshalJSON(data []byte) error
type ReadParsedCommandType ¶
type ReadParsedCommandType string
const (
ReadParsedCommandTypeRead ReadParsedCommandType = "read"
)
type ReasoningEffort ¶
type ReasoningEffort = string
A non-empty reasoning effort value advertised by the model.
type ReasoningItemContent ¶
type ReasoningItemContent struct {
ReasoningText *ReasoningTextReasoningItemContent
Text *TextReasoningItemContent
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ReasoningItemContent contains exactly one typed variant or Unknown.
func (ReasoningItemContent) MarshalJSON ¶
func (v ReasoningItemContent) MarshalJSON() ([]byte, error)
func (*ReasoningItemContent) UnmarshalJSON ¶
func (v *ReasoningItemContent) UnmarshalJSON(data []byte) error
type ReasoningItemReasoningSummary ¶
type ReasoningItemReasoningSummary struct {
SummaryText *SummaryTextReasoningItemReasoningSummary
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ReasoningItemReasoningSummary contains exactly one typed variant or Unknown.
func (ReasoningItemReasoningSummary) MarshalJSON ¶
func (v ReasoningItemReasoningSummary) MarshalJSON() ([]byte, error)
func (*ReasoningItemReasoningSummary) UnmarshalJSON ¶
func (v *ReasoningItemReasoningSummary) UnmarshalJSON(data []byte) error
type ReasoningResponseItem ¶
type ReasoningResponseItem struct {
Content Optional[[]ReasoningItemContent] `json:"content" protocol:"nullable"`
EncryptedContent Optional[string] `json:"encrypted_content" protocol:"nullable"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Summary []ReasoningItemReasoningSummary `json:"summary" protocol:"required"`
Type ReasoningResponseItemType `json:"type" protocol:"required,const=reasoning"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ReasoningResponseItem) MarshalJSON ¶
func (v ReasoningResponseItem) MarshalJSON() ([]byte, error)
func (*ReasoningResponseItem) UnmarshalJSON ¶
func (v *ReasoningResponseItem) UnmarshalJSON(data []byte) error
type ReasoningResponseItemType ¶
type ReasoningResponseItemType string
const (
ReasoningResponseItemTypeReasoning ReasoningResponseItemType = "reasoning"
)
type ReasoningSummary ¶
type ReasoningSummary string
A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries
const ( ReasoningSummaryAuto ReasoningSummary = "auto" ReasoningSummaryConcise ReasoningSummary = "concise" ReasoningSummaryDetailed ReasoningSummary = "detailed" ReasoningSummaryNone ReasoningSummary = "none" )
type ReasoningTextReasoningItemContent ¶
type ReasoningTextReasoningItemContent struct {
Text string `json:"text" protocol:"required"`
Type ReasoningTextReasoningItemContentType `json:"type" protocol:"required,const=reasoning_text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ReasoningTextReasoningItemContent) MarshalJSON ¶
func (v ReasoningTextReasoningItemContent) MarshalJSON() ([]byte, error)
func (*ReasoningTextReasoningItemContent) UnmarshalJSON ¶
func (v *ReasoningTextReasoningItemContent) UnmarshalJSON(data []byte) error
type ReasoningTextReasoningItemContentType ¶
type ReasoningTextReasoningItemContentType string
const (
ReasoningTextReasoningItemContentTypeReasoningText ReasoningTextReasoningItemContentType = "reasoning_text"
)
type ReasoningThreadItem ¶
type ReasoningThreadItem struct {
Content Optional[[]string] `json:"content" protocol:""`
ID string `json:"id" protocol:"required"`
Summary Optional[[]string] `json:"summary" protocol:""`
Type ReasoningThreadItemType `json:"type" protocol:"required,const=reasoning"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ReasoningThreadItem) MarshalJSON ¶
func (v ReasoningThreadItem) MarshalJSON() ([]byte, error)
func (*ReasoningThreadItem) UnmarshalJSON ¶
func (v *ReasoningThreadItem) UnmarshalJSON(data []byte) error
type ReasoningThreadItemType ¶
type ReasoningThreadItemType string
const (
ReasoningThreadItemTypeReasoning ReasoningThreadItemType = "reasoning"
)
type RequestID ¶
type RequestID struct {
Value *string
Integer *int64
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
RequestID contains exactly one typed variant or Unknown.
func (RequestID) MarshalJSON ¶
func (*RequestID) UnmarshalJSON ¶
type RequestPermissionProfile ¶
type RequestPermissionProfile struct {
FileSystem Optional[AdditionalFileSystemPermissions] `json:"fileSystem" protocol:"nullable"`
Network Optional[AdditionalNetworkPermissions] `json:"network" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (RequestPermissionProfile) MarshalJSON ¶
func (v RequestPermissionProfile) MarshalJSON() ([]byte, error)
func (*RequestPermissionProfile) UnmarshalJSON ¶
func (v *RequestPermissionProfile) UnmarshalJSON(data []byte) error
type ResponseItem ¶
type ResponseItem struct {
AdditionalTools *AdditionalToolsResponseItem
Message *MessageResponseItem
AgentMessage *AgentMessageResponseItem
Reasoning *ReasoningResponseItem
LocalShellCall *LocalShellCallResponseItem
FunctionCall *FunctionCallResponseItem
ToolSearchCall *ToolSearchCallResponseItem
FunctionCallOutput *FunctionCallOutputResponseItem
CustomToolCall *CustomToolCallResponseItem
CustomToolCallOutput *CustomToolCallOutputResponseItem
ToolSearchOutput *ToolSearchOutputResponseItem
WebSearchCall *WebSearchCallResponseItem
ImageGenerationCall *ImageGenerationCallResponseItem
Compaction *CompactionResponseItem
ConfigurationUpdate *ConfigurationUpdateResponseItem
CompactionTrigger *CompactionTriggerResponseItem
ContextCompaction *ContextCompactionResponseItem
Other *OtherResponseItem
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ResponseItem contains exactly one typed variant or Unknown.
func (ResponseItem) MarshalJSON ¶
func (v ResponseItem) MarshalJSON() ([]byte, error)
func (*ResponseItem) UnmarshalJSON ¶
func (v *ResponseItem) UnmarshalJSON(data []byte) error
type ResponseStreamConnectionFailedCodexErrorInfo ¶
type ResponseStreamConnectionFailedCodexErrorInfo struct {
ResponseStreamConnectionFailed ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed `json:"responseStreamConnectionFailed" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Failed to connect to the response SSE stream.
func (ResponseStreamConnectionFailedCodexErrorInfo) MarshalJSON ¶
func (v ResponseStreamConnectionFailedCodexErrorInfo) MarshalJSON() ([]byte, error)
func (*ResponseStreamConnectionFailedCodexErrorInfo) UnmarshalJSON ¶
func (v *ResponseStreamConnectionFailedCodexErrorInfo) UnmarshalJSON(data []byte) error
type ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed ¶
type ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed struct {
HTTPStatusCode Optional[uint16] `json:"httpStatusCode" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed) MarshalJSON ¶
func (v ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed) MarshalJSON() ([]byte, error)
func (*ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed) UnmarshalJSON ¶
func (v *ResponseStreamConnectionFailedCodexErrorInfoResponseStreamConnectionFailed) UnmarshalJSON(data []byte) error
type ResponseStreamDisconnectedCodexErrorInfo ¶
type ResponseStreamDisconnectedCodexErrorInfo struct {
ResponseStreamDisconnected ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected `json:"responseStreamDisconnected" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
The response SSE stream disconnected in the middle of a turn before completion.
func (ResponseStreamDisconnectedCodexErrorInfo) MarshalJSON ¶
func (v ResponseStreamDisconnectedCodexErrorInfo) MarshalJSON() ([]byte, error)
func (*ResponseStreamDisconnectedCodexErrorInfo) UnmarshalJSON ¶
func (v *ResponseStreamDisconnectedCodexErrorInfo) UnmarshalJSON(data []byte) error
type ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected ¶
type ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected struct {
HTTPStatusCode Optional[uint16] `json:"httpStatusCode" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected) MarshalJSON ¶
func (v ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected) MarshalJSON() ([]byte, error)
func (*ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected) UnmarshalJSON ¶
func (v *ResponseStreamDisconnectedCodexErrorInfoResponseStreamDisconnected) UnmarshalJSON(data []byte) error
type ResponseTooManyFailedAttemptsCodexErrorInfo ¶
type ResponseTooManyFailedAttemptsCodexErrorInfo struct {
ResponseTooManyFailedAttempts ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts `json:"responseTooManyFailedAttempts" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Reached the retry limit for responses.
func (ResponseTooManyFailedAttemptsCodexErrorInfo) MarshalJSON ¶
func (v ResponseTooManyFailedAttemptsCodexErrorInfo) MarshalJSON() ([]byte, error)
func (*ResponseTooManyFailedAttemptsCodexErrorInfo) UnmarshalJSON ¶
func (v *ResponseTooManyFailedAttemptsCodexErrorInfo) UnmarshalJSON(data []byte) error
type ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts ¶
type ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts struct {
HTTPStatusCode Optional[uint16] `json:"httpStatusCode" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts) MarshalJSON ¶
func (v ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts) MarshalJSON() ([]byte, error)
func (*ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts) UnmarshalJSON ¶
func (v *ResponseTooManyFailedAttemptsCodexErrorInfoResponseTooManyFailedAttempts) UnmarshalJSON(data []byte) error
type ResponsesAPIWebSearchAction ¶
type ResponsesAPIWebSearchAction struct {
Search *SearchResponsesAPIWebSearchAction
OpenPage *OpenPageResponsesAPIWebSearchAction
FindInPage *FindInPageResponsesAPIWebSearchAction
Other *OtherResponsesAPIWebSearchAction
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ResponsesAPIWebSearchAction contains exactly one typed variant or Unknown.
func (ResponsesAPIWebSearchAction) MarshalJSON ¶
func (v ResponsesAPIWebSearchAction) MarshalJSON() ([]byte, error)
func (*ResponsesAPIWebSearchAction) UnmarshalJSON ¶
func (v *ResponsesAPIWebSearchAction) UnmarshalJSON(data []byte) error
type ReviewDecision ¶
type ReviewDecision struct {
Value *ReviewDecisionValue
ApprovedExecpolicyAmendment *ApprovedExecpolicyAmendmentReviewDecision
NetworkPolicyAmendment *NetworkPolicyAmendmentReviewDecision
Denied *DeniedReviewDecision
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
User's decision in response to an ExecApprovalRequest. ReviewDecision contains exactly one typed variant or Unknown.
func (ReviewDecision) MarshalJSON ¶
func (v ReviewDecision) MarshalJSON() ([]byte, error)
func (*ReviewDecision) UnmarshalJSON ¶
func (v *ReviewDecision) UnmarshalJSON(data []byte) error
type ReviewDecisionValue ¶
type ReviewDecisionValue string
const ( ReviewDecisionValueApproved ReviewDecisionValue = "approved" ReviewDecisionValueApprovedForSession ReviewDecisionValue = "approved_for_session" ReviewDecisionValueApprovedMCPPolicyAmendment ReviewDecisionValue = "approved_mcp_policy_amendment" ReviewDecisionValueTimedOut ReviewDecisionValue = "timed_out" ReviewDecisionValueAbort ReviewDecisionValue = "abort" )
type RootFileSystemSpecialPath ¶
type RootFileSystemSpecialPath struct {
Kind RootFileSystemSpecialPathKind `json:"kind" protocol:"required,const=root"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (RootFileSystemSpecialPath) MarshalJSON ¶
func (v RootFileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (*RootFileSystemSpecialPath) UnmarshalJSON ¶
func (v *RootFileSystemSpecialPath) UnmarshalJSON(data []byte) error
type RootFileSystemSpecialPathKind ¶
type RootFileSystemSpecialPathKind string
const (
RootFileSystemSpecialPathKindRoot RootFileSystemSpecialPathKind = "root"
)
type SandboxMode ¶
type SandboxMode string
const ( SandboxModeReadOnly SandboxMode = "read-only" SandboxModeWorkspaceWrite SandboxMode = "workspace-write" SandboxModeDangerFullAccess SandboxMode = "danger-full-access" )
type SandboxPolicy ¶
type SandboxPolicy struct {
DangerFullAccess *DangerFullAccessSandboxPolicy
ReadOnly *ReadOnlySandboxPolicy
ExternalSandbox *ExternalSandboxSandboxPolicy
WorkspaceWrite *WorkspaceWriteSandboxPolicy
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
SandboxPolicy contains exactly one typed variant or Unknown.
func (SandboxPolicy) MarshalJSON ¶
func (v SandboxPolicy) MarshalJSON() ([]byte, error)
func (*SandboxPolicy) UnmarshalJSON ¶
func (v *SandboxPolicy) UnmarshalJSON(data []byte) error
type SearchCommandAction ¶
type SearchCommandAction struct {
Command string `json:"command" protocol:"required"`
Path Optional[string] `json:"path" protocol:"nullable"`
Query Optional[string] `json:"query" protocol:"nullable"`
Type SearchCommandActionType `json:"type" protocol:"required,const=search"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SearchCommandAction) MarshalJSON ¶
func (v SearchCommandAction) MarshalJSON() ([]byte, error)
func (*SearchCommandAction) UnmarshalJSON ¶
func (v *SearchCommandAction) UnmarshalJSON(data []byte) error
type SearchCommandActionType ¶
type SearchCommandActionType string
const (
SearchCommandActionTypeSearch SearchCommandActionType = "search"
)
type SearchParsedCommand ¶
type SearchParsedCommand struct {
Cmd string `json:"cmd" protocol:"required"`
Path Optional[string] `json:"path" protocol:"nullable"`
Query Optional[string] `json:"query" protocol:"nullable"`
Type SearchParsedCommandType `json:"type" protocol:"required,const=search"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SearchParsedCommand) MarshalJSON ¶
func (v SearchParsedCommand) MarshalJSON() ([]byte, error)
func (*SearchParsedCommand) UnmarshalJSON ¶
func (v *SearchParsedCommand) UnmarshalJSON(data []byte) error
type SearchParsedCommandType ¶
type SearchParsedCommandType string
const (
SearchParsedCommandTypeSearch SearchParsedCommandType = "search"
)
type SearchResponsesAPIWebSearchAction ¶
type SearchResponsesAPIWebSearchAction struct {
Queries Optional[[]string] `json:"queries" protocol:"nullable"`
Query Optional[string] `json:"query" protocol:"nullable"`
Type SearchResponsesAPIWebSearchActionType `json:"type" protocol:"required,const=search"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SearchResponsesAPIWebSearchAction) MarshalJSON ¶
func (v SearchResponsesAPIWebSearchAction) MarshalJSON() ([]byte, error)
func (*SearchResponsesAPIWebSearchAction) UnmarshalJSON ¶
func (v *SearchResponsesAPIWebSearchAction) UnmarshalJSON(data []byte) error
type SearchResponsesAPIWebSearchActionType ¶
type SearchResponsesAPIWebSearchActionType string
const (
SearchResponsesAPIWebSearchActionTypeSearch SearchResponsesAPIWebSearchActionType = "search"
)
type SearchWebSearchAction ¶
type SearchWebSearchAction struct {
Queries Optional[[]string] `json:"queries" protocol:"nullable"`
Query Optional[string] `json:"query" protocol:"nullable"`
Type SearchWebSearchActionType `json:"type" protocol:"required,const=search"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SearchWebSearchAction) MarshalJSON ¶
func (v SearchWebSearchAction) MarshalJSON() ([]byte, error)
func (*SearchWebSearchAction) UnmarshalJSON ¶
func (v *SearchWebSearchAction) UnmarshalJSON(data []byte) error
type SearchWebSearchActionType ¶
type SearchWebSearchActionType string
const (
SearchWebSearchActionTypeSearch SearchWebSearchActionType = "search"
)
type SelectedCapabilityRoot ¶
type SelectedCapabilityRoot struct {
// Stable identifier supplied by the capability selection platform.
ID string `json:"id" protocol:"required"`
// Where the selected root can be resolved.
Location CapabilityRootLocation `json:"location" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
A user-selected root that can expose one or more runtime capabilities.
func (SelectedCapabilityRoot) MarshalJSON ¶
func (v SelectedCapabilityRoot) MarshalJSON() ([]byte, error)
func (*SelectedCapabilityRoot) UnmarshalJSON ¶
func (v *SelectedCapabilityRoot) UnmarshalJSON(data []byte) error
type ServerRequestResolvedNotification ¶
type ServerRequestResolvedNotification struct {
RequestID RequestID `json:"requestId" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ServerRequestResolvedNotification) MarshalJSON ¶
func (v ServerRequestResolvedNotification) MarshalJSON() ([]byte, error)
func (*ServerRequestResolvedNotification) UnmarshalJSON ¶
func (v *ServerRequestResolvedNotification) UnmarshalJSON(data []byte) error
type SessionSource ¶
type SessionSource struct {
Value *SessionSourceValue
Custom *CustomSessionSource
SubAgent *SubAgentSessionSource
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
SessionSource contains exactly one typed variant or Unknown.
func (SessionSource) MarshalJSON ¶
func (v SessionSource) MarshalJSON() ([]byte, error)
func (*SessionSource) UnmarshalJSON ¶
func (v *SessionSource) UnmarshalJSON(data []byte) error
type SessionSourceValue ¶
type SessionSourceValue string
const ( SessionSourceValueCLI SessionSourceValue = "cli" SessionSourceValueVscode SessionSourceValue = "vscode" SessionSourceValueExec SessionSourceValue = "exec" SessionSourceValueAppServer SessionSourceValue = "appServer" SessionSourceValueUnknown SessionSourceValue = "unknown" )
type Settings ¶
type Settings struct {
DeveloperInstructions Optional[string] `json:"developer_instructions" protocol:"nullable"`
Model string `json:"model" protocol:"required"`
ReasoningEffort Optional[ReasoningEffort] `json:"reasoning_effort" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Settings for a collaboration mode.
func (Settings) MarshalJSON ¶
func (*Settings) UnmarshalJSON ¶
type SkillUserInput ¶
type SkillUserInput struct {
Name string `json:"name" protocol:"required"`
Path string `json:"path" protocol:"required"`
Type SkillUserInputType `json:"type" protocol:"required,const=skill"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SkillUserInput) MarshalJSON ¶
func (v SkillUserInput) MarshalJSON() ([]byte, error)
func (*SkillUserInput) UnmarshalJSON ¶
func (v *SkillUserInput) UnmarshalJSON(data []byte) error
type SkillUserInputType ¶
type SkillUserInputType string
const (
SkillUserInputTypeSkill SkillUserInputType = "skill"
)
type SlashTmpFileSystemSpecialPath ¶
type SlashTmpFileSystemSpecialPath struct {
Kind SlashTmpFileSystemSpecialPathKind `json:"kind" protocol:"required,const=slash_tmp"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SlashTmpFileSystemSpecialPath) MarshalJSON ¶
func (v SlashTmpFileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (*SlashTmpFileSystemSpecialPath) UnmarshalJSON ¶
func (v *SlashTmpFileSystemSpecialPath) UnmarshalJSON(data []byte) error
type SlashTmpFileSystemSpecialPathKind ¶
type SlashTmpFileSystemSpecialPathKind string
const (
SlashTmpFileSystemSpecialPathKindSlashTmp SlashTmpFileSystemSpecialPathKind = "slash_tmp"
)
type SleepThreadItem ¶
type SleepThreadItem struct {
DurationMs uint64 `json:"durationMs" protocol:"required"`
ID string `json:"id" protocol:"required"`
Type SleepThreadItemType `json:"type" protocol:"required,const=sleep"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Display item emitted by the interruptible `clock.sleep` tool.
func (SleepThreadItem) MarshalJSON ¶
func (v SleepThreadItem) MarshalJSON() ([]byte, error)
func (*SleepThreadItem) UnmarshalJSON ¶
func (v *SleepThreadItem) UnmarshalJSON(data []byte) error
type SleepThreadItemType ¶
type SleepThreadItemType string
const (
SleepThreadItemTypeSleep SleepThreadItemType = "sleep"
)
type SortDirection ¶
type SortDirection string
const ( SortDirectionAsc SortDirection = "asc" SortDirectionDesc SortDirection = "desc" )
type SpecialFileSystemPath ¶
type SpecialFileSystemPath struct {
Type SpecialFileSystemPathType `json:"type" protocol:"required,const=special"`
Value FileSystemSpecialPath `json:"value" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SpecialFileSystemPath) MarshalJSON ¶
func (v SpecialFileSystemPath) MarshalJSON() ([]byte, error)
func (*SpecialFileSystemPath) UnmarshalJSON ¶
func (v *SpecialFileSystemPath) UnmarshalJSON(data []byte) error
type SpecialFileSystemPathType ¶
type SpecialFileSystemPathType string
const (
SpecialFileSystemPathTypeSpecial SpecialFileSystemPathType = "special"
)
type SubAgentActivityKind ¶
type SubAgentActivityKind string
const ( SubAgentActivityKindStarted SubAgentActivityKind = "started" SubAgentActivityKindInteracted SubAgentActivityKind = "interacted" SubAgentActivityKindInterrupted SubAgentActivityKind = "interrupted" SubAgentActivityKindCompleted SubAgentActivityKind = "completed" )
type SubAgentActivityThreadItem ¶
type SubAgentActivityThreadItem struct {
AgentPath string `json:"agentPath" protocol:"required"`
AgentThreadID string `json:"agentThreadId" protocol:"required"`
ID string `json:"id" protocol:"required"`
Kind SubAgentActivityKind `json:"kind" protocol:"required"`
// Resolved model at sub-agent creation; absent from older records and other activities.
Model Optional[string] `json:"model" protocol:"nullable"`
// Resolved reasoning effort at sub-agent creation, when known.
ReasoningEffort Optional[ReasoningEffort] `json:"reasoningEffort" protocol:"nullable"`
Type SubAgentActivityThreadItemType `json:"type" protocol:"required,const=subAgentActivity"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SubAgentActivityThreadItem) MarshalJSON ¶
func (v SubAgentActivityThreadItem) MarshalJSON() ([]byte, error)
func (*SubAgentActivityThreadItem) UnmarshalJSON ¶
func (v *SubAgentActivityThreadItem) UnmarshalJSON(data []byte) error
type SubAgentActivityThreadItemType ¶
type SubAgentActivityThreadItemType string
const (
SubAgentActivityThreadItemTypeSubAgentActivity SubAgentActivityThreadItemType = "subAgentActivity"
)
type SubAgentSessionSource ¶
type SubAgentSessionSource struct {
SubAgent SubAgentSource `json:"subAgent" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SubAgentSessionSource) MarshalJSON ¶
func (v SubAgentSessionSource) MarshalJSON() ([]byte, error)
func (*SubAgentSessionSource) UnmarshalJSON ¶
func (v *SubAgentSessionSource) UnmarshalJSON(data []byte) error
type SubAgentSource ¶
type SubAgentSource struct {
Value *SubAgentSourceValue
ThreadSpawn *ThreadSpawnSubAgentSource
Other *OtherSubAgentSource
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
SubAgentSource contains exactly one typed variant or Unknown.
func (SubAgentSource) MarshalJSON ¶
func (v SubAgentSource) MarshalJSON() ([]byte, error)
func (*SubAgentSource) UnmarshalJSON ¶
func (v *SubAgentSource) UnmarshalJSON(data []byte) error
type SubAgentSourceValue ¶
type SubAgentSourceValue string
const ( SubAgentSourceValueReview SubAgentSourceValue = "review" SubAgentSourceValueCompact SubAgentSourceValue = "compact" SubAgentSourceValueMemoryConsolidation SubAgentSourceValue = "memory_consolidation" )
type SummaryTextReasoningItemReasoningSummary ¶
type SummaryTextReasoningItemReasoningSummary struct {
Text string `json:"text" protocol:"required"`
Type SummaryTextReasoningItemReasoningSummaryType `json:"type" protocol:"required,const=summary_text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SummaryTextReasoningItemReasoningSummary) MarshalJSON ¶
func (v SummaryTextReasoningItemReasoningSummary) MarshalJSON() ([]byte, error)
func (*SummaryTextReasoningItemReasoningSummary) UnmarshalJSON ¶
func (v *SummaryTextReasoningItemReasoningSummary) UnmarshalJSON(data []byte) error
type SummaryTextReasoningItemReasoningSummaryType ¶
type SummaryTextReasoningItemReasoningSummaryType string
const (
SummaryTextReasoningItemReasoningSummaryTypeSummaryText SummaryTextReasoningItemReasoningSummaryType = "summary_text"
)
type SystemErrorThreadStatus ¶
type SystemErrorThreadStatus struct {
Type SystemErrorThreadStatusType `json:"type" protocol:"required,const=systemError"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (SystemErrorThreadStatus) MarshalJSON ¶
func (v SystemErrorThreadStatus) MarshalJSON() ([]byte, error)
func (*SystemErrorThreadStatus) UnmarshalJSON ¶
func (v *SystemErrorThreadStatus) UnmarshalJSON(data []byte) error
type SystemErrorThreadStatusType ¶
type SystemErrorThreadStatusType string
const (
SystemErrorThreadStatusTypeSystemError SystemErrorThreadStatusType = "systemError"
)
type TextElement ¶
type TextElement struct {
// Byte range in the parent `text` buffer that this element occupies.
ByteRange ByteRange `json:"byteRange" protocol:"required"`
// Optional human-readable placeholder for the element, displayed in the UI.
Placeholder Optional[string] `json:"placeholder" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TextElement) MarshalJSON ¶
func (v TextElement) MarshalJSON() ([]byte, error)
func (*TextElement) UnmarshalJSON ¶
func (v *TextElement) UnmarshalJSON(data []byte) error
type TextReasoningItemContent ¶
type TextReasoningItemContent struct {
Text string `json:"text" protocol:"required"`
Type TextReasoningItemContentType `json:"type" protocol:"required,const=text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TextReasoningItemContent) MarshalJSON ¶
func (v TextReasoningItemContent) MarshalJSON() ([]byte, error)
func (*TextReasoningItemContent) UnmarshalJSON ¶
func (v *TextReasoningItemContent) UnmarshalJSON(data []byte) error
type TextReasoningItemContentType ¶
type TextReasoningItemContentType string
const (
TextReasoningItemContentTypeText TextReasoningItemContentType = "text"
)
type TextUserInput ¶
type TextUserInput struct {
Text string `json:"text" protocol:"required"`
// UI-defined spans within `text` used to render or persist special elements.
TextElements Optional[[]TextElement] `json:"text_elements" protocol:""`
Type TextUserInputType `json:"type" protocol:"required,const=text"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TextUserInput) MarshalJSON ¶
func (v TextUserInput) MarshalJSON() ([]byte, error)
func (*TextUserInput) UnmarshalJSON ¶
func (v *TextUserInput) UnmarshalJSON(data []byte) error
type TextUserInputType ¶
type TextUserInputType string
const (
TextUserInputTypeText TextUserInputType = "text"
)
type Thread ¶
type Thread struct {
// Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
AgentNickname Optional[string] `json:"agentNickname" protocol:"nullable"`
// Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
AgentRole Optional[string] `json:"agentRole" protocol:"nullable"`
// Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread.
CanAcceptDirectInput Optional[bool] `json:"canAcceptDirectInput" protocol:"nullable"`
// Version of the CLI that created the thread.
CLIVersion string `json:"cliVersion" protocol:"required"`
// Unix timestamp (in seconds) when the thread was created.
CreatedAt int64 `json:"createdAt" protocol:"required"`
// Working directory captured for the thread.
Cwd AbsolutePathBuf `json:"cwd" protocol:"required"`
// Saved Daybreak choice, independent of turn execution. Null if unset.
DaybreakEnabled Optional[bool] `json:"daybreakEnabled" protocol:"nullable"`
// Current environments for a loaded thread, in priority order, primary first. `null` means the thread is not loaded or the server does not expose its selection. An empty list means no environments are selected. This does not report connection status.
Environments Optional[[]ThreadEnvironment] `json:"environments" protocol:"nullable"`
// Whether the thread is ephemeral and should not be materialized on disk.
Ephemeral bool `json:"ephemeral" protocol:"required"`
// Optional implementation-specific thread data.
Extra Optional[ThreadExtra] `json:"extra" protocol:"nullable"`
// Source thread id when this thread was created by forking another thread.
ForkedFromID Optional[string] `json:"forkedFromId" protocol:"nullable"`
// Optional Git metadata captured when the thread was created.
GitInfo Optional[GitInfo] `json:"gitInfo" protocol:"nullable"`
// Persisted thread history contract selected when this thread was created.
HistoryMode Optional[ThreadHistoryMode] `json:"historyMode" protocol:""`
// Identifier for this thread. Codex-generated thread IDs are UUIDv7.
ID string `json:"id" protocol:"required"`
// Current configured model when loaded, otherwise the latest persisted model. Null when unavailable. This is not per-turn execution telemetry.
Model Optional[string] `json:"model" protocol:"nullable"`
// Model provider used for this thread (for example, 'openai').
ModelProvider string `json:"modelProvider" protocol:"required"`
// Optional user-facing thread title.
Name Optional[string] `json:"name" protocol:"nullable"`
// Originator recorded when the thread was created, independent of its current client or executor. Null when the recorded originator is unavailable.
Originator Optional[string] `json:"originator" protocol:"nullable"`
// The ID of the parent thread. This will only be set if this thread is a subagent.
ParentThreadID Optional[string] `json:"parentThreadId" protocol:"nullable"`
// [UNSTABLE] Path to the thread on disk.
Path Optional[string] `json:"path" protocol:"nullable"`
// Usually the first user message in the thread, if available.
Preview string `json:"preview" protocol:"required"`
// Canonical project assignment owned by app-server, if any.
ProjectID Optional[string] `json:"projectId" protocol:"required,nullable"`
// Current configured reasoning effort when loaded, otherwise the latest persisted effort. Null when unset or unavailable. This is not per-turn execution telemetry.
ReasoningEffort Optional[ReasoningEffort] `json:"reasoningEffort" protocol:"nullable"`
// Unix timestamp (in seconds) used for thread recency ordering.
RecencyAt Optional[int64] `json:"recencyAt" protocol:"nullable"`
// The independently persisted section selected for this thread, if any.
Section Optional[ThreadSection] `json:"section" protocol:"nullable"`
// Unix timestamp in seconds when the thread entered its current section.
SectionEnteredAt Optional[int64] `json:"sectionEnteredAt" protocol:"nullable"`
// Session id shared by threads that belong to the same session tree.
SessionID string `json:"sessionId" protocol:"required"`
// Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
Source SessionSource `json:"source" protocol:"required"`
// Current runtime status for the thread.
Status ThreadStatus `json:"status" protocol:"required"`
// Optional analytics source classification for this thread.
ThreadSource Optional[ThreadSource] `json:"threadSource" protocol:"nullable"`
// Only populated on `thread/resume`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.
Turns []Turn `json:"turns" protocol:"required"`
// Unix timestamp (in seconds) when the thread was last updated.
UpdatedAt int64 `json:"updatedAt" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (Thread) MarshalJSON ¶
func (*Thread) UnmarshalJSON ¶
type ThreadActiveFlag ¶
type ThreadActiveFlag string
const ( ThreadActiveFlagWaitingOnApproval ThreadActiveFlag = "waitingOnApproval" ThreadActiveFlagWaitingOnUserInput ThreadActiveFlag = "waitingOnUserInput" )
type ThreadArchiveParams ¶
type ThreadArchiveParams struct {
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadArchiveParams) MarshalJSON ¶
func (v ThreadArchiveParams) MarshalJSON() ([]byte, error)
func (*ThreadArchiveParams) UnmarshalJSON ¶
func (v *ThreadArchiveParams) UnmarshalJSON(data []byte) error
type ThreadArchiveResponse ¶
type ThreadArchiveResponse struct {
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadArchiveResponse) MarshalJSON ¶
func (v ThreadArchiveResponse) MarshalJSON() ([]byte, error)
func (*ThreadArchiveResponse) UnmarshalJSON ¶
func (v *ThreadArchiveResponse) UnmarshalJSON(data []byte) error
type ThreadEnvironment ¶
type ThreadEnvironment struct {
Cwd LegacyAppPathString `json:"cwd" protocol:"required"`
EnvironmentID string `json:"environmentId" protocol:"required"`
RuntimeWorkspaceRoots []LegacyAppPathString `json:"runtimeWorkspaceRoots" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
An environment selected by a loaded thread, independent of connection status.
func (ThreadEnvironment) MarshalJSON ¶
func (v ThreadEnvironment) MarshalJSON() ([]byte, error)
func (*ThreadEnvironment) UnmarshalJSON ¶
func (v *ThreadEnvironment) UnmarshalJSON(data []byte) error
type ThreadExtra ¶
type ThreadExtra struct {
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Extra app-server data for a thread.
func (ThreadExtra) MarshalJSON ¶
func (v ThreadExtra) MarshalJSON() ([]byte, error)
func (*ThreadExtra) UnmarshalJSON ¶
func (v *ThreadExtra) UnmarshalJSON(data []byte) error
type ThreadHistoryMode ¶
type ThreadHistoryMode string
const ( ThreadHistoryModeLegacy ThreadHistoryMode = "legacy" ThreadHistoryModePaginated ThreadHistoryMode = "paginated" )
type ThreadInjectItemsParams ¶
type ThreadInjectItemsParams struct {
// Raw Responses API items to append to the thread's model-visible history.
Items []json.RawMessage `json:"items" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadInjectItemsParams) MarshalJSON ¶
func (v ThreadInjectItemsParams) MarshalJSON() ([]byte, error)
func (*ThreadInjectItemsParams) UnmarshalJSON ¶
func (v *ThreadInjectItemsParams) UnmarshalJSON(data []byte) error
type ThreadInjectItemsResponse ¶
type ThreadInjectItemsResponse struct {
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadInjectItemsResponse) MarshalJSON ¶
func (v ThreadInjectItemsResponse) MarshalJSON() ([]byte, error)
func (*ThreadInjectItemsResponse) UnmarshalJSON ¶
func (v *ThreadInjectItemsResponse) UnmarshalJSON(data []byte) error
type ThreadItem ¶
type ThreadItem struct {
UserMessage *UserMessageThreadItem
HookPrompt *HookPromptThreadItem
AgentMessage *AgentMessageThreadItem
FunctionCallOutput *FunctionCallOutputThreadItem
Plan *PlanThreadItem
Reasoning *ReasoningThreadItem
CommandExecution *CommandExecutionThreadItem
FileChange *FileChangeThreadItem
MCPToolCall *MCPToolCallThreadItem
DynamicToolCall *DynamicToolCallThreadItem
CollabAgentToolCall *CollabAgentToolCallThreadItem
SubAgentActivity *SubAgentActivityThreadItem
WebSearch *WebSearchThreadItem
ImageView *ImageViewThreadItem
Sleep *SleepThreadItem
ImageGeneration *ImageGenerationThreadItem
EnteredReviewMode *EnteredReviewModeThreadItem
ExitedReviewMode *ExitedReviewModeThreadItem
ContextCompaction *ContextCompactionThreadItem
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ThreadItem contains exactly one typed variant or Unknown.
func (ThreadItem) MarshalJSON ¶
func (v ThreadItem) MarshalJSON() ([]byte, error)
func (*ThreadItem) UnmarshalJSON ¶
func (v *ThreadItem) UnmarshalJSON(data []byte) error
type ThreadItemEntry ¶
type ThreadItemEntry struct {
// Unix timestamp (milliseconds) when the item completed, if recorded by the producer.
CompletedAtMs Optional[int64] `json:"completedAtMs" protocol:"nullable"`
Item ThreadItem `json:"item" protocol:"required"`
// Unix timestamp (milliseconds) when the item started, if recorded by the producer.
StartedAtMs Optional[int64] `json:"startedAtMs" protocol:"nullable"`
// Turn containing this item.
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadItemEntry) MarshalJSON ¶
func (v ThreadItemEntry) MarshalJSON() ([]byte, error)
func (*ThreadItemEntry) UnmarshalJSON ¶
func (v *ThreadItemEntry) UnmarshalJSON(data []byte) error
type ThreadItemsListAnchor ¶
type ThreadItemsListAnchor struct {
Item *ItemThreadItemsListAnchor
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
An exclusive item position within the requested visible turn. ThreadItemsListAnchor contains exactly one typed variant or Unknown.
func (ThreadItemsListAnchor) MarshalJSON ¶
func (v ThreadItemsListAnchor) MarshalJSON() ([]byte, error)
func (*ThreadItemsListAnchor) UnmarshalJSON ¶
func (v *ThreadItemsListAnchor) UnmarshalJSON(data []byte) error
type ThreadItemsListCursor ¶
type ThreadItemsListCursor struct {
Value *string
ItemThreadItemsListAnchor *ItemThreadItemsListAnchor
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
Starting position for an item-history page. ThreadItemsListCursor contains exactly one typed variant or Unknown.
func (ThreadItemsListCursor) MarshalJSON ¶
func (v ThreadItemsListCursor) MarshalJSON() ([]byte, error)
func (*ThreadItemsListCursor) UnmarshalJSON ¶
func (v *ThreadItemsListCursor) UnmarshalJSON(data []byte) error
type ThreadItemsListParams ¶
type ThreadItemsListParams struct {
// Opaque continuation cursor or an exclusive item anchor in the requested visible turn. An item anchor requires a non-empty `turnId`; ascending (the default) returns items after it, and descending returns items before it. Continue with the returned string cursor.
Cursor Optional[ThreadItemsListCursor] `json:"cursor" protocol:"nullable"`
// Optional item page size.
Limit Optional[uint32] `json:"limit" protocol:"nullable"`
// Optional item pagination direction; defaults to ascending.
SortDirection Optional[SortDirection] `json:"sortDirection" protocol:"nullable"`
ThreadID string `json:"threadId" protocol:"required"`
// Optional turn id to filter by. When omitted, returns items across the thread.
TurnID Optional[string] `json:"turnId" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadItemsListParams) MarshalJSON ¶
func (v ThreadItemsListParams) MarshalJSON() ([]byte, error)
func (*ThreadItemsListParams) UnmarshalJSON ¶
func (v *ThreadItemsListParams) UnmarshalJSON(data []byte) error
type ThreadItemsListResponse ¶
type ThreadItemsListResponse struct {
// Opaque cursor to pass as `cursor` when reversing `sortDirection`. This is only populated when the page contains at least one item.
BackwardsCursor Optional[string] `json:"backwardsCursor" protocol:"nullable"`
Data []ThreadItemEntry `json:"data" protocol:"required"`
// Opaque cursor to pass to the next call to continue after the last item. if None, there are no more items to return.
NextCursor Optional[string] `json:"nextCursor" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadItemsListResponse) MarshalJSON ¶
func (v ThreadItemsListResponse) MarshalJSON() ([]byte, error)
func (*ThreadItemsListResponse) UnmarshalJSON ¶
func (v *ThreadItemsListResponse) UnmarshalJSON(data []byte) error
type ThreadListCwdFilter ¶
type ThreadListCwdFilter struct {
Value *string
Items *[]string
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ThreadListCwdFilter contains exactly one typed variant or Unknown.
func (ThreadListCwdFilter) MarshalJSON ¶
func (v ThreadListCwdFilter) MarshalJSON() ([]byte, error)
func (*ThreadListCwdFilter) UnmarshalJSON ¶
func (v *ThreadListCwdFilter) UnmarshalJSON(data []byte) error
type ThreadListParams ¶
type ThreadListParams struct {
// Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with `parentThreadId`.
AncestorThreadID Optional[string] `json:"ancestorThreadId" protocol:"nullable"`
// Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.
Archived Optional[bool] `json:"archived" protocol:"nullable"`
// Opaque pagination cursor returned by a previous call.
Cursor Optional[string] `json:"cursor" protocol:"nullable"`
// Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.
Cwd Optional[ThreadListCwdFilter] `json:"cwd" protocol:"nullable"`
// Optional page size; defaults to a reasonable server-side value.
Limit Optional[uint32] `json:"limit" protocol:"nullable"`
// Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.
ModelProviders Optional[[]string] `json:"modelProviders" protocol:"nullable"`
// Optional originator allowlist, matching any supplied value exactly. Supported by hosted backends only; the local app-server rejects a nonempty list. Omitted or empty lists leave originators unrestricted.
Originators Optional[[]string] `json:"originators" protocol:"nullable"`
// Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`.
ParentThreadID Optional[string] `json:"parentThreadId" protocol:"nullable"`
// Omit to include every project, set to null for unassigned threads, or provide a project ID to return only threads in that project.
ProjectID Optional[string] `json:"projectId" protocol:"nullable"`
// Optional substring filter for the extracted thread title.
SearchTerm Optional[string] `json:"searchTerm" protocol:"nullable"`
// Omit to include every section, set to `null` for unsectioned threads, or provide a section ID to return only threads in that section.
SectionID Optional[string] `json:"sectionId" protocol:"nullable"`
// Optional sort direction; defaults to descending (newest first).
SortDirection Optional[SortDirection] `json:"sortDirection" protocol:"nullable"`
// Optional sort key; defaults to created_at.
SortKey Optional[ThreadSortKey] `json:"sortKey" protocol:"nullable"`
// Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.
SourceKinds Optional[[]ThreadSourceKind] `json:"sourceKinds" protocol:"nullable"`
// If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.
UseStateDbOnly Optional[bool] `json:"useStateDbOnly" protocol:""`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadListParams) MarshalJSON ¶
func (v ThreadListParams) MarshalJSON() ([]byte, error)
func (*ThreadListParams) UnmarshalJSON ¶
func (v *ThreadListParams) UnmarshalJSON(data []byte) error
type ThreadListResponse ¶
type ThreadListResponse struct {
// Opaque cursor to pass as `cursor` when reversing `sortDirection`. This is only populated when the page contains at least one thread. Use it with the opposite `sortDirection`; for timestamp sorts it anchors at the start of the page timestamp so same-second updates are not skipped.
BackwardsCursor Optional[string] `json:"backwardsCursor" protocol:"nullable"`
Data []Thread `json:"data" protocol:"required"`
// Opaque cursor to pass to the next call to continue after the last item. if None, there are no more items to return.
NextCursor Optional[string] `json:"nextCursor" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadListResponse) MarshalJSON ¶
func (v ThreadListResponse) MarshalJSON() ([]byte, error)
func (*ThreadListResponse) UnmarshalJSON ¶
func (v *ThreadListResponse) UnmarshalJSON(data []byte) error
type ThreadReadParams ¶
type ThreadReadParams struct {
// When true, include turns and their items from rollout history. Full-history hydration is deprecated for paginated threads; prefer a metadata-only read and page with `thread/turns/list` and `thread/items/list`.
IncludeTurns Optional[bool] `json:"includeTurns" protocol:""`
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadReadParams) MarshalJSON ¶
func (v ThreadReadParams) MarshalJSON() ([]byte, error)
func (*ThreadReadParams) UnmarshalJSON ¶
func (v *ThreadReadParams) UnmarshalJSON(data []byte) error
type ThreadReadResponse ¶
type ThreadReadResponse struct {
Thread Thread `json:"thread" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadReadResponse) MarshalJSON ¶
func (v ThreadReadResponse) MarshalJSON() ([]byte, error)
func (*ThreadReadResponse) UnmarshalJSON ¶
func (v *ThreadReadResponse) UnmarshalJSON(data []byte) error
type ThreadResumeInitialTurnsPageParams ¶
type ThreadResumeInitialTurnsPageParams struct {
// How much item detail to include for each returned turn; defaults to summary.
ItemsView Optional[TurnItemsView] `json:"itemsView" protocol:"nullable"`
// Optional turn page size.
Limit Optional[uint32] `json:"limit" protocol:"nullable"`
// Optional turn pagination direction; defaults to descending.
SortDirection Optional[SortDirection] `json:"sortDirection" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadResumeInitialTurnsPageParams) MarshalJSON ¶
func (v ThreadResumeInitialTurnsPageParams) MarshalJSON() ([]byte, error)
func (*ThreadResumeInitialTurnsPageParams) UnmarshalJSON ¶
func (v *ThreadResumeInitialTurnsPageParams) UnmarshalJSON(data []byte) error
type ThreadResumeParams ¶
type ThreadResumeParams struct {
ApprovalPolicy Optional[AskForApproval] `json:"approvalPolicy" protocol:"nullable"`
// Override where approval requests are routed for review on this thread and subsequent turns.
ApprovalsReviewer Optional[ApprovalsReviewer] `json:"approvalsReviewer" protocol:"nullable"`
BaseInstructions Optional[string] `json:"baseInstructions" protocol:"nullable"`
Config Optional[map[string]json.RawMessage] `json:"config" protocol:"nullable"`
Cwd Optional[string] `json:"cwd" protocol:"nullable"`
DeveloperInstructions Optional[string] `json:"developerInstructions" protocol:"nullable"`
// When true, return only thread metadata and live-resume state without populating `thread.turns`. This is useful when the client plans to call `thread/turns/list` immediately after resuming. Full-history hydration is deprecated for paginated threads; use this with `thread/turns/list` and `thread/items/list` instead.
ExcludeTurns Optional[bool] `json:"excludeTurns" protocol:""`
// [UNSTABLE] FOR CODEX CLOUD - DO NOT USE. If specified, the thread will be resumed with the provided history instead of loaded from disk.
History Optional[[]ResponseItem] `json:"history" protocol:"nullable"`
// When present, include a `thread/turns/list` page in the resume response so clients can bootstrap recent turns without a second request.
InitialTurnsPage Optional[ThreadResumeInitialTurnsPageParams] `json:"initialTurnsPage" protocol:"nullable"`
// Configuration overrides for the resumed thread, if any.
Model Optional[string] `json:"model" protocol:"nullable"`
ModelProvider Optional[string] `json:"modelProvider" protocol:"nullable"`
// [UNSTABLE] Specify the rollout path to resume from. If specified for a non-running thread, the thread_id param will be ignored. If thread_id identifies a running thread, the path must match the active rollout path.
Path Optional[string] `json:"path" protocol:"nullable"`
// Named profile id for the resumed thread. Cannot be combined with `sandbox`.
Permissions Optional[string] `json:"permissions" protocol:"nullable"`
// @deprecated `friendly` and `pragmatic` no longer select a style. Changing this does not rewrite the thread's existing instructions.
Personality Optional[Personality] `json:"personality" protocol:"nullable"`
// Replace the thread's runtime workspace roots. Paths must be absolute.
RuntimeWorkspaceRoots Optional[[]AbsolutePathBuf] `json:"runtimeWorkspaceRoots" protocol:"nullable"`
Sandbox Optional[SandboxMode] `json:"sandbox" protocol:"nullable"`
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.
For non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.
If thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.
Prefer using thread_id whenever possible.
func (ThreadResumeParams) MarshalJSON ¶
func (v ThreadResumeParams) MarshalJSON() ([]byte, error)
func (*ThreadResumeParams) UnmarshalJSON ¶
func (v *ThreadResumeParams) UnmarshalJSON(data []byte) error
type ThreadResumeResponse ¶
type ThreadResumeResponse struct {
// Named or implicit built-in profile that produced the active permissions, when known.
ActivePermissionProfile Optional[ActivePermissionProfile] `json:"activePermissionProfile" protocol:"nullable"`
ApprovalPolicy AskForApproval `json:"approvalPolicy" protocol:"required"`
// Reviewer currently used for approval requests on this thread.
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer" protocol:"required"`
// Effective collaboration mode. Absent when resuming from an older server.
CollaborationMode Optional[CollaborationMode] `json:"collaborationMode" protocol:"nullable"`
Cwd AbsolutePathBuf `json:"cwd" protocol:"required"`
// Saved list of disabled plugin IDs. Does not yet filter plugin capabilities.
DisabledPluginIDs Optional[[]string] `json:"disabledPluginIds" protocol:""`
// `thread/turns/list` page returned when requested by `initialTurnsPage`.
InitialTurnsPage Optional[TurnsPage] `json:"initialTurnsPage" protocol:"nullable"`
// Environment-native paths to instruction source files currently loaded for this thread.
InstructionSources Optional[[]LegacyAppPathString] `json:"instructionSources" protocol:""`
// Opaque cursor for hydrating paginated items backwards.
//
// Pass this as `cursor` to `thread/items/list` with `sortDirection: "desc"`. The first page includes the item identified by the cursor.
ItemsBackwardsCursor Optional[string] `json:"itemsBackwardsCursor" protocol:"nullable"`
Model string `json:"model" protocol:"required"`
ModelProvider string `json:"modelProvider" protocol:"required"`
// @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior.
MultiAgentMode Optional[MultiAgentMode] `json:"multiAgentMode" protocol:""`
ReasoningEffort Optional[ReasoningEffort] `json:"reasoningEffort" protocol:"nullable"`
// Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.
RuntimeWorkspaceRoots Optional[[]AbsolutePathBuf] `json:"runtimeWorkspaceRoots" protocol:""`
// Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.
Sandbox SandboxPolicy `json:"sandbox" protocol:"required"`
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
Thread Thread `json:"thread" protocol:"required"`
// Opaque cursor for hydrating paginated turns backwards.
//
// Pass this as `cursor` to `thread/turns/list` with `sortDirection: "desc"`. The first page includes the turn identified by the cursor.
TurnsBackwardsCursor Optional[string] `json:"turnsBackwardsCursor" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadResumeResponse) MarshalJSON ¶
func (v ThreadResumeResponse) MarshalJSON() ([]byte, error)
func (*ThreadResumeResponse) UnmarshalJSON ¶
func (v *ThreadResumeResponse) UnmarshalJSON(data []byte) error
type ThreadSection ¶
type ThreadSection struct {
// Optional appearance synchronized across clients.
Appearance Optional[ThreadSectionAppearance] `json:"appearance" protocol:"nullable"`
// Opaque UUIDv7 identity that remains stable when the section is renamed.
ID string `json:"id" protocol:"required"`
// The current user-visible section name.
Name string `json:"name" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
An independently persisted, user-visible thread section.
func (ThreadSection) MarshalJSON ¶
func (v ThreadSection) MarshalJSON() ([]byte, error)
func (*ThreadSection) UnmarshalJSON ¶
func (v *ThreadSection) UnmarshalJSON(data []byte) error
type ThreadSectionAppearance ¶
type ThreadSectionAppearance struct {
Color Optional[string] `json:"color" protocol:"nullable"`
Icon Optional[string] `json:"icon" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
Extensible visual presentation for a custom thread section.
func (ThreadSectionAppearance) MarshalJSON ¶
func (v ThreadSectionAppearance) MarshalJSON() ([]byte, error)
func (*ThreadSectionAppearance) UnmarshalJSON ¶
func (v *ThreadSectionAppearance) UnmarshalJSON(data []byte) error
type ThreadSettings ¶
type ThreadSettings struct {
ActivePermissionProfile Optional[ActivePermissionProfile] `json:"activePermissionProfile" protocol:"nullable"`
ApprovalPolicy AskForApproval `json:"approvalPolicy" protocol:"required"`
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer" protocol:"required"`
CollaborationMode CollaborationMode `json:"collaborationMode" protocol:"required"`
Cwd AbsolutePathBuf `json:"cwd" protocol:"required"`
// Saved list of disabled plugin IDs. Does not yet filter plugin capabilities.
DisabledPluginIDs Optional[[]string] `json:"disabledPluginIds" protocol:""`
Effort Optional[ReasoningEffort] `json:"effort" protocol:"nullable"`
Model string `json:"model" protocol:"required"`
ModelProvider string `json:"modelProvider" protocol:"required"`
// @deprecated Always `explicitRequestOnly`. Use `effort` for Ultra behavior.
MultiAgentMode Optional[MultiAgentMode] `json:"multiAgentMode" protocol:""`
// @deprecated Reports the saved setting; `friendly` and `pragmatic` no longer select a style.
Personality Optional[Personality] `json:"personality" protocol:"nullable"`
SandboxPolicy SandboxPolicy `json:"sandboxPolicy" protocol:"required"`
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
Summary Optional[ReasoningSummary] `json:"summary" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadSettings) MarshalJSON ¶
func (v ThreadSettings) MarshalJSON() ([]byte, error)
func (*ThreadSettings) UnmarshalJSON ¶
func (v *ThreadSettings) UnmarshalJSON(data []byte) error
type ThreadSettingsUpdateParams ¶
type ThreadSettingsUpdateParams struct {
// Override the approval policy for subsequent turns.
ApprovalPolicy Optional[AskForApproval] `json:"approvalPolicy" protocol:"nullable"`
// Override where approval requests are routed for subsequent turns.
ApprovalsReviewer Optional[ApprovalsReviewer] `json:"approvalsReviewer" protocol:"nullable"`
// EXPERIMENTAL - Set a pre-set collaboration mode for subsequent turns.
//
// For `collaboration_mode.settings.developer_instructions`, `null` means "use the built-in instructions for the selected mode".
CollaborationMode Optional[CollaborationMode] `json:"collaborationMode" protocol:"nullable"`
// Override the working directory for subsequent turns.
Cwd Optional[string] `json:"cwd" protocol:"nullable"`
// Replace this thread's disabled plugin IDs. Omitted/null preserves the list; [] clears it.
DisabledPluginIDs Optional[[]string] `json:"disabledPluginIds" protocol:"nullable"`
// Override the reasoning effort for subsequent turns.
Effort Optional[ReasoningEffort] `json:"effort" protocol:"nullable"`
// Override the model for subsequent turns.
Model Optional[string] `json:"model" protocol:"nullable"`
// @deprecated Ignored. Use `effort: "ultra"` for proactive multi-agent behavior.
MultiAgentMode Optional[MultiAgentMode] `json:"multiAgentMode" protocol:"nullable"`
// Select a named permissions profile id for subsequent turns. Cannot be combined with `sandboxPolicy`.
Permissions Optional[string] `json:"permissions" protocol:"nullable"`
// @deprecated `friendly` and `pragmatic` no longer select a style. Changing this does not rewrite the thread's existing instructions.
Personality Optional[Personality] `json:"personality" protocol:"nullable"`
// Override the sandbox policy for subsequent turns.
SandboxPolicy Optional[SandboxPolicy] `json:"sandboxPolicy" protocol:"nullable"`
// Override the service tier for subsequent turns. `null` clears the current service tier; omission leaves it unchanged.
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
// Override the reasoning summary for subsequent turns.
Summary Optional[ReasoningSummary] `json:"summary" protocol:"nullable"`
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadSettingsUpdateParams) MarshalJSON ¶
func (v ThreadSettingsUpdateParams) MarshalJSON() ([]byte, error)
func (*ThreadSettingsUpdateParams) UnmarshalJSON ¶
func (v *ThreadSettingsUpdateParams) UnmarshalJSON(data []byte) error
type ThreadSettingsUpdateResponse ¶
type ThreadSettingsUpdateResponse struct {
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadSettingsUpdateResponse) MarshalJSON ¶
func (v ThreadSettingsUpdateResponse) MarshalJSON() ([]byte, error)
func (*ThreadSettingsUpdateResponse) UnmarshalJSON ¶
func (v *ThreadSettingsUpdateResponse) UnmarshalJSON(data []byte) error
type ThreadSettingsUpdatedNotification ¶
type ThreadSettingsUpdatedNotification struct {
ThreadID string `json:"threadId" protocol:"required"`
ThreadSettings ThreadSettings `json:"threadSettings" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadSettingsUpdatedNotification) MarshalJSON ¶
func (v ThreadSettingsUpdatedNotification) MarshalJSON() ([]byte, error)
func (*ThreadSettingsUpdatedNotification) UnmarshalJSON ¶
func (v *ThreadSettingsUpdatedNotification) UnmarshalJSON(data []byte) error
type ThreadSortKey ¶
type ThreadSortKey string
const ( ThreadSortKeyCreatedAt ThreadSortKey = "created_at" ThreadSortKeyUpdatedAt ThreadSortKey = "updated_at" ThreadSortKeyRecencyAt ThreadSortKey = "recency_at" ThreadSortKeySectionPosition ThreadSortKey = "section_position" )
type ThreadSource ¶
type ThreadSource = string
type ThreadSourceKind ¶
type ThreadSourceKind string
const ( ThreadSourceKindCLI ThreadSourceKind = "cli" ThreadSourceKindVscode ThreadSourceKind = "vscode" ThreadSourceKindExec ThreadSourceKind = "exec" ThreadSourceKindAppServer ThreadSourceKind = "appServer" ThreadSourceKindSubAgent ThreadSourceKind = "subAgent" ThreadSourceKindSubAgentReview ThreadSourceKind = "subAgentReview" ThreadSourceKindSubAgentCompact ThreadSourceKind = "subAgentCompact" ThreadSourceKindSubAgentThreadSpawn ThreadSourceKind = "subAgentThreadSpawn" ThreadSourceKindSubAgentOther ThreadSourceKind = "subAgentOther" ThreadSourceKindUnknown ThreadSourceKind = "unknown" )
type ThreadSpawnSubAgentSource ¶
type ThreadSpawnSubAgentSource struct {
ThreadSpawn ThreadSpawnSubAgentSourceThreadSpawn `json:"thread_spawn" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadSpawnSubAgentSource) MarshalJSON ¶
func (v ThreadSpawnSubAgentSource) MarshalJSON() ([]byte, error)
func (*ThreadSpawnSubAgentSource) UnmarshalJSON ¶
func (v *ThreadSpawnSubAgentSource) UnmarshalJSON(data []byte) error
type ThreadSpawnSubAgentSourceThreadSpawn ¶
type ThreadSpawnSubAgentSourceThreadSpawn struct {
AgentNickname Optional[string] `json:"agent_nickname" protocol:"nullable"`
AgentPath Optional[AgentPath] `json:"agent_path" protocol:"nullable"`
AgentRole Optional[string] `json:"agent_role" protocol:"nullable"`
Depth int32 `json:"depth" protocol:"required"`
ParentThreadID ThreadID `json:"parent_thread_id" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadSpawnSubAgentSourceThreadSpawn) MarshalJSON ¶
func (v ThreadSpawnSubAgentSourceThreadSpawn) MarshalJSON() ([]byte, error)
func (*ThreadSpawnSubAgentSourceThreadSpawn) UnmarshalJSON ¶
func (v *ThreadSpawnSubAgentSourceThreadSpawn) UnmarshalJSON(data []byte) error
type ThreadStartParams ¶
type ThreadStartParams struct {
// Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default.
AllowProviderModelFallback Optional[bool] `json:"allowProviderModelFallback" protocol:""`
ApprovalPolicy Optional[AskForApproval] `json:"approvalPolicy" protocol:"nullable"`
// Override where approval requests are routed for review on this thread and subsequent turns.
ApprovalsReviewer Optional[ApprovalsReviewer] `json:"approvalsReviewer" protocol:"nullable"`
BaseInstructions Optional[string] `json:"baseInstructions" protocol:"nullable"`
Config Optional[map[string]json.RawMessage] `json:"config" protocol:"nullable"`
Cwd Optional[string] `json:"cwd" protocol:"nullable"`
// Initial Daybreak choice for this persistent thread. Omitted or null leaves it unset. This does not select a turn's `cyberAccessProgram` or grant access. Not supported for ephemeral threads.
DaybreakEnabled Optional[bool] `json:"daybreakEnabled" protocol:"nullable"`
DeveloperInstructions Optional[string] `json:"developerInstructions" protocol:"nullable"`
DynamicTools Optional[[]DynamicToolSpec] `json:"dynamicTools" protocol:"nullable"`
// Optional sticky environments for this thread.
//
// Omitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment.
Environments Optional[[]TurnEnvironmentParams] `json:"environments" protocol:"nullable"`
Ephemeral Optional[bool] `json:"ephemeral" protocol:"nullable"`
// If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud).
ExperimentalRawEvents Optional[bool] `json:"experimentalRawEvents" protocol:""`
// Persisted thread history contract to use for this new thread.
HistoryMode Optional[ThreadHistoryMode] `json:"historyMode" protocol:"nullable"`
// Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way.
MockExperimentalField Optional[string] `json:"mockExperimentalField" protocol:"nullable"`
Model Optional[string] `json:"model" protocol:"nullable"`
ModelProvider Optional[string] `json:"modelProvider" protocol:"nullable"`
// @deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior.
MultiAgentMode Optional[MultiAgentMode] `json:"multiAgentMode" protocol:"nullable"`
// Named profile id for this thread. Cannot be combined with `sandbox`.
Permissions Optional[string] `json:"permissions" protocol:"nullable"`
// @deprecated `friendly` and `pragmatic` no longer select a style.
Personality Optional[Personality] `json:"personality" protocol:"nullable"`
// Optional project identity for this new thread. Durable threads persist the assignment; ephemeral threads expose it only in live responses.
ProjectID Optional[string] `json:"projectId" protocol:"nullable"`
// Replace the thread's runtime workspace roots. Paths must be absolute.
RuntimeWorkspaceRoots Optional[[]AbsolutePathBuf] `json:"runtimeWorkspaceRoots" protocol:"nullable"`
Sandbox Optional[SandboxMode] `json:"sandbox" protocol:"nullable"`
// Capability roots selected for this thread by the hosting platform.
SelectedCapabilityRoots Optional[[]SelectedCapabilityRoot] `json:"selectedCapabilityRoots" protocol:"nullable"`
ServiceName Optional[string] `json:"serviceName" protocol:"nullable"`
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
SessionStartSource Optional[ThreadStartSource] `json:"sessionStartSource" protocol:"nullable"`
// Optional client-supplied analytics source classification for this thread.
ThreadSource Optional[ThreadSource] `json:"threadSource" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadStartParams) MarshalJSON ¶
func (v ThreadStartParams) MarshalJSON() ([]byte, error)
func (*ThreadStartParams) UnmarshalJSON ¶
func (v *ThreadStartParams) UnmarshalJSON(data []byte) error
type ThreadStartResponse ¶
type ThreadStartResponse struct {
// Named or implicit built-in profile that produced the active permissions, when known.
ActivePermissionProfile Optional[ActivePermissionProfile] `json:"activePermissionProfile" protocol:"nullable"`
ApprovalPolicy AskForApproval `json:"approvalPolicy" protocol:"required"`
// Reviewer currently used for approval requests on this thread.
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer" protocol:"required"`
Cwd AbsolutePathBuf `json:"cwd" protocol:"required"`
// Saved list of disabled plugin IDs. Does not yet filter plugin capabilities.
DisabledPluginIDs Optional[[]string] `json:"disabledPluginIds" protocol:""`
// Environment-native paths to instruction source files currently loaded for this thread.
InstructionSources Optional[[]LegacyAppPathString] `json:"instructionSources" protocol:""`
Model string `json:"model" protocol:"required"`
ModelProvider string `json:"modelProvider" protocol:"required"`
// @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior.
MultiAgentMode Optional[MultiAgentMode] `json:"multiAgentMode" protocol:""`
ReasoningEffort Optional[ReasoningEffort] `json:"reasoningEffort" protocol:"nullable"`
// Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.
RuntimeWorkspaceRoots Optional[[]AbsolutePathBuf] `json:"runtimeWorkspaceRoots" protocol:""`
// Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.
Sandbox SandboxPolicy `json:"sandbox" protocol:"required"`
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
Thread Thread `json:"thread" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadStartResponse) MarshalJSON ¶
func (v ThreadStartResponse) MarshalJSON() ([]byte, error)
func (*ThreadStartResponse) UnmarshalJSON ¶
func (v *ThreadStartResponse) UnmarshalJSON(data []byte) error
type ThreadStartSource ¶
type ThreadStartSource string
const ( ThreadStartSourceStartup ThreadStartSource = "startup" ThreadStartSourceClear ThreadStartSource = "clear" )
type ThreadStatus ¶
type ThreadStatus struct {
NotLoaded *NotLoadedThreadStatus
Idle *IdleThreadStatus
SystemError *SystemErrorThreadStatus
Active *ActiveThreadStatus
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
ThreadStatus contains exactly one typed variant or Unknown.
func (ThreadStatus) MarshalJSON ¶
func (v ThreadStatus) MarshalJSON() ([]byte, error)
func (*ThreadStatus) UnmarshalJSON ¶
func (v *ThreadStatus) UnmarshalJSON(data []byte) error
type ThreadTurnsListParams ¶
type ThreadTurnsListParams struct {
// Opaque cursor to pass to the next call to continue after the last turn.
Cursor Optional[string] `json:"cursor" protocol:"nullable"`
// How much item detail to include for each returned turn; defaults to summary.
ItemsView Optional[TurnItemsView] `json:"itemsView" protocol:"nullable"`
// Optional turn page size.
Limit Optional[uint32] `json:"limit" protocol:"nullable"`
// Optional turn pagination direction; defaults to descending.
SortDirection Optional[SortDirection] `json:"sortDirection" protocol:"nullable"`
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadTurnsListParams) MarshalJSON ¶
func (v ThreadTurnsListParams) MarshalJSON() ([]byte, error)
func (*ThreadTurnsListParams) UnmarshalJSON ¶
func (v *ThreadTurnsListParams) UnmarshalJSON(data []byte) error
type ThreadTurnsListResponse ¶
type ThreadTurnsListResponse struct {
// Opaque cursor to pass as `cursor` when reversing `sortDirection`. This is only populated when the page contains at least one turn. Use it with the opposite `sortDirection` to include the anchor turn again and catch updates to that turn.
BackwardsCursor Optional[string] `json:"backwardsCursor" protocol:"nullable"`
Data []Turn `json:"data" protocol:"required"`
// Opaque cursor to pass to the next call to continue after the last turn. if None, there are no more turns to return.
NextCursor Optional[string] `json:"nextCursor" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadTurnsListResponse) MarshalJSON ¶
func (v ThreadTurnsListResponse) MarshalJSON() ([]byte, error)
func (*ThreadTurnsListResponse) UnmarshalJSON ¶
func (v *ThreadTurnsListResponse) UnmarshalJSON(data []byte) error
type ThreadUnarchiveParams ¶
type ThreadUnarchiveParams struct {
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadUnarchiveParams) MarshalJSON ¶
func (v ThreadUnarchiveParams) MarshalJSON() ([]byte, error)
func (*ThreadUnarchiveParams) UnmarshalJSON ¶
func (v *ThreadUnarchiveParams) UnmarshalJSON(data []byte) error
type ThreadUnarchiveResponse ¶
type ThreadUnarchiveResponse struct {
Thread Thread `json:"thread" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadUnarchiveResponse) MarshalJSON ¶
func (v ThreadUnarchiveResponse) MarshalJSON() ([]byte, error)
func (*ThreadUnarchiveResponse) UnmarshalJSON ¶
func (v *ThreadUnarchiveResponse) UnmarshalJSON(data []byte) error
type ThreadUnsubscribeParams ¶
type ThreadUnsubscribeParams struct {
ThreadID string `json:"threadId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadUnsubscribeParams) MarshalJSON ¶
func (v ThreadUnsubscribeParams) MarshalJSON() ([]byte, error)
func (*ThreadUnsubscribeParams) UnmarshalJSON ¶
func (v *ThreadUnsubscribeParams) UnmarshalJSON(data []byte) error
type ThreadUnsubscribeResponse ¶
type ThreadUnsubscribeResponse struct {
Status ThreadUnsubscribeStatus `json:"status" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ThreadUnsubscribeResponse) MarshalJSON ¶
func (v ThreadUnsubscribeResponse) MarshalJSON() ([]byte, error)
func (*ThreadUnsubscribeResponse) UnmarshalJSON ¶
func (v *ThreadUnsubscribeResponse) UnmarshalJSON(data []byte) error
type ThreadUnsubscribeStatus ¶
type ThreadUnsubscribeStatus string
const ( ThreadUnsubscribeStatusNotLoaded ThreadUnsubscribeStatus = "notLoaded" ThreadUnsubscribeStatusNotSubscribed ThreadUnsubscribeStatus = "notSubscribed" ThreadUnsubscribeStatusUnsubscribed ThreadUnsubscribeStatus = "unsubscribed" )
type TmpdirFileSystemSpecialPath ¶
type TmpdirFileSystemSpecialPath struct {
Kind TmpdirFileSystemSpecialPathKind `json:"kind" protocol:"required,const=tmpdir"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TmpdirFileSystemSpecialPath) MarshalJSON ¶
func (v TmpdirFileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (*TmpdirFileSystemSpecialPath) UnmarshalJSON ¶
func (v *TmpdirFileSystemSpecialPath) UnmarshalJSON(data []byte) error
type TmpdirFileSystemSpecialPathKind ¶
type TmpdirFileSystemSpecialPathKind string
const (
TmpdirFileSystemSpecialPathKindTmpdir TmpdirFileSystemSpecialPathKind = "tmpdir"
)
type ToolRequestUserInputAnswer ¶
type ToolRequestUserInputAnswer struct {
Answers []string `json:"answers" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
EXPERIMENTAL. Captures a user's answer to a request_user_input question.
func (ToolRequestUserInputAnswer) MarshalJSON ¶
func (v ToolRequestUserInputAnswer) MarshalJSON() ([]byte, error)
func (*ToolRequestUserInputAnswer) UnmarshalJSON ¶
func (v *ToolRequestUserInputAnswer) UnmarshalJSON(data []byte) error
type ToolRequestUserInputOption ¶
type ToolRequestUserInputOption struct {
Description string `json:"description" protocol:"required"`
Label string `json:"label" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
EXPERIMENTAL. Defines a single selectable option for request_user_input.
func (ToolRequestUserInputOption) MarshalJSON ¶
func (v ToolRequestUserInputOption) MarshalJSON() ([]byte, error)
func (*ToolRequestUserInputOption) UnmarshalJSON ¶
func (v *ToolRequestUserInputOption) UnmarshalJSON(data []byte) error
type ToolRequestUserInputParams ¶
type ToolRequestUserInputParams struct {
// @deprecated Use `isBlocking` to decide whether the request should block.
AutoResolutionMs Optional[uint64] `json:"autoResolutionMs" protocol:"nullable"`
IsBlocking bool `json:"isBlocking" protocol:"required"`
ItemID string `json:"itemId" protocol:"required"`
Questions []ToolRequestUserInputQuestion `json:"questions" protocol:"required"`
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
EXPERIMENTAL. Params sent with a request_user_input event.
func (ToolRequestUserInputParams) MarshalJSON ¶
func (v ToolRequestUserInputParams) MarshalJSON() ([]byte, error)
func (*ToolRequestUserInputParams) UnmarshalJSON ¶
func (v *ToolRequestUserInputParams) UnmarshalJSON(data []byte) error
type ToolRequestUserInputQuestion ¶
type ToolRequestUserInputQuestion struct {
Header string `json:"header" protocol:"required"`
ID string `json:"id" protocol:"required"`
IsOther Optional[bool] `json:"isOther" protocol:""`
IsSecret Optional[bool] `json:"isSecret" protocol:""`
Options Optional[[]ToolRequestUserInputOption] `json:"options" protocol:"nullable"`
Question string `json:"question" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
EXPERIMENTAL. Represents one request_user_input question and its required options.
func (ToolRequestUserInputQuestion) MarshalJSON ¶
func (v ToolRequestUserInputQuestion) MarshalJSON() ([]byte, error)
func (*ToolRequestUserInputQuestion) UnmarshalJSON ¶
func (v *ToolRequestUserInputQuestion) UnmarshalJSON(data []byte) error
type ToolRequestUserInputResponse ¶
type ToolRequestUserInputResponse struct {
Answers map[string]ToolRequestUserInputAnswer `json:"answers" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
EXPERIMENTAL. Response payload mapping question ids to answers.
func (ToolRequestUserInputResponse) MarshalJSON ¶
func (v ToolRequestUserInputResponse) MarshalJSON() ([]byte, error)
func (*ToolRequestUserInputResponse) UnmarshalJSON ¶
func (v *ToolRequestUserInputResponse) UnmarshalJSON(data []byte) error
type ToolSearchCallResponseItem ¶
type ToolSearchCallResponseItem struct {
Arguments json.RawMessage `json:"arguments" protocol:"required,nullable"`
CallID Optional[string] `json:"call_id" protocol:"nullable"`
Execution string `json:"execution" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Status Optional[string] `json:"status" protocol:"nullable"`
Type ToolSearchCallResponseItemType `json:"type" protocol:"required,const=tool_search_call"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ToolSearchCallResponseItem) MarshalJSON ¶
func (v ToolSearchCallResponseItem) MarshalJSON() ([]byte, error)
func (*ToolSearchCallResponseItem) UnmarshalJSON ¶
func (v *ToolSearchCallResponseItem) UnmarshalJSON(data []byte) error
type ToolSearchCallResponseItemType ¶
type ToolSearchCallResponseItemType string
const (
ToolSearchCallResponseItemTypeToolSearchCall ToolSearchCallResponseItemType = "tool_search_call"
)
type ToolSearchOutputResponseItem ¶
type ToolSearchOutputResponseItem struct {
CallID Optional[string] `json:"call_id" protocol:"nullable"`
Execution string `json:"execution" protocol:"required"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Status string `json:"status" protocol:"required"`
Tools []json.RawMessage `json:"tools" protocol:"required"`
Type ToolSearchOutputResponseItemType `json:"type" protocol:"required,const=tool_search_output"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (ToolSearchOutputResponseItem) MarshalJSON ¶
func (v ToolSearchOutputResponseItem) MarshalJSON() ([]byte, error)
func (*ToolSearchOutputResponseItem) UnmarshalJSON ¶
func (v *ToolSearchOutputResponseItem) UnmarshalJSON(data []byte) error
type ToolSearchOutputResponseItemType ¶
type ToolSearchOutputResponseItemType string
const (
ToolSearchOutputResponseItemTypeToolSearchOutput ToolSearchOutputResponseItemType = "tool_search_output"
)
type Turn ¶
type Turn struct {
// Unix timestamp (in seconds) when the turn completed.
CompletedAt Optional[int64] `json:"completedAt" protocol:"nullable"`
// Duration between turn start and completion in milliseconds, if known.
DurationMs Optional[int64] `json:"durationMs" protocol:"nullable"`
// Error associated with a failed or interrupted turn.
Error Optional[TurnError] `json:"error" protocol:"nullable"`
// Identifier for this turn. Codex-generated turn IDs are UUIDv7.
ID string `json:"id" protocol:"required"`
// Thread items currently included in this turn payload.
Items []ThreadItem `json:"items" protocol:"required"`
// Describes how much of `items` has been loaded for this turn.
ItemsView Optional[TurnItemsView] `json:"itemsView" protocol:""`
// ID of the first turn in the chain of work that led to this turn. Pass this as `rootTurnId` when starting work on behalf of this turn. May be null in older history or a `review/start` response.
RootTurnID Optional[string] `json:"rootTurnId" protocol:"nullable"`
// Unix timestamp (in seconds) when the turn started.
StartedAt Optional[int64] `json:"startedAt" protocol:"nullable"`
Status TurnStatus `json:"status" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (Turn) MarshalJSON ¶
func (*Turn) UnmarshalJSON ¶
type TurnCompletedNotification ¶
type TurnCompletedNotification struct {
ThreadID string `json:"threadId" protocol:"required"`
Turn Turn `json:"turn" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnCompletedNotification) MarshalJSON ¶
func (v TurnCompletedNotification) MarshalJSON() ([]byte, error)
func (*TurnCompletedNotification) UnmarshalJSON ¶
func (v *TurnCompletedNotification) UnmarshalJSON(data []byte) error
type TurnEnvironmentParams ¶
type TurnEnvironmentParams struct {
Cwd LegacyAppPathString `json:"cwd" protocol:"required"`
EnvironmentID string `json:"environmentId" protocol:"required"`
// Environment-native runtime workspace roots. Omitted defaults to `cwd`.
RuntimeWorkspaceRoots Optional[[]LegacyAppPathString] `json:"runtimeWorkspaceRoots" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnEnvironmentParams) MarshalJSON ¶
func (v TurnEnvironmentParams) MarshalJSON() ([]byte, error)
func (*TurnEnvironmentParams) UnmarshalJSON ¶
func (v *TurnEnvironmentParams) UnmarshalJSON(data []byte) error
type TurnError ¶
type TurnError struct {
AdditionalDetails Optional[string] `json:"additionalDetails" protocol:"nullable"`
CodexErrorInfo Optional[CodexErrorInfo] `json:"codexErrorInfo" protocol:"nullable"`
Message string `json:"message" protocol:"required"`
// Optional public explanation and continuation instruction for a misalignment block.
Misalignment Optional[MisalignmentErrorDetails] `json:"misalignment" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnError) MarshalJSON ¶
func (*TurnError) UnmarshalJSON ¶
type TurnInterruptParams ¶
type TurnInterruptParams struct {
ThreadID string `json:"threadId" protocol:"required"`
TurnID string `json:"turnId" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnInterruptParams) MarshalJSON ¶
func (v TurnInterruptParams) MarshalJSON() ([]byte, error)
func (*TurnInterruptParams) UnmarshalJSON ¶
func (v *TurnInterruptParams) UnmarshalJSON(data []byte) error
type TurnInterruptResponse ¶
type TurnInterruptResponse struct {
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnInterruptResponse) MarshalJSON ¶
func (v TurnInterruptResponse) MarshalJSON() ([]byte, error)
func (*TurnInterruptResponse) UnmarshalJSON ¶
func (v *TurnInterruptResponse) UnmarshalJSON(data []byte) error
type TurnItemsView ¶
type TurnItemsView string
const ( TurnItemsViewNotLoaded TurnItemsView = "notLoaded" TurnItemsViewSummary TurnItemsView = "summary" TurnItemsViewFull TurnItemsView = "full" )
type TurnStartParams ¶
type TurnStartParams struct {
// Optional client-provided context fragments keyed by an opaque source identifier.
AdditionalContext Optional[map[string]AdditionalContextEntry] `json:"additionalContext" protocol:"nullable"`
// Override the approval policy for this turn and subsequent turns.
ApprovalPolicy Optional[AskForApproval] `json:"approvalPolicy" protocol:"nullable"`
// Override where approval requests are routed for review on this turn and subsequent turns.
ApprovalsReviewer Optional[ApprovalsReviewer] `json:"approvalsReviewer" protocol:"nullable"`
ClientUserMessageID Optional[string] `json:"clientUserMessageId" protocol:"nullable"`
// EXPERIMENTAL - Set a pre-set collaboration mode. Takes precedence over model, reasoning_effort, and developer instructions if set.
//
// For `collaboration_mode.settings.developer_instructions`, `null` means "use the built-in instructions for the selected mode".
CollaborationMode Optional[CollaborationMode] `json:"collaborationMode" protocol:"nullable"`
// Override the working directory for this turn and subsequent turns.
Cwd Optional[string] `json:"cwd" protocol:"nullable"`
// EXPERIMENTAL - Request an authorized cyber program for this turn. Omission preserves automatic behavior. This does not grant access.
CyberAccessProgram Optional[CyberAccessProgram] `json:"cyberAccessProgram" protocol:"nullable"`
// Replace this thread's disabled plugin IDs. Omitted/null preserves the list; [] clears it.
DisabledPluginIDs Optional[[]string] `json:"disabledPluginIds" protocol:"nullable"`
// Override the reasoning effort for this turn and subsequent turns.
Effort Optional[ReasoningEffort] `json:"effort" protocol:"nullable"`
// Optional environments for this turn and subsequent turns.
//
// Omitted uses the thread sticky environments. Empty disables environment access for this turn. Non-empty selects the first environment as the current turn environment for this turn.
Environments Optional[[]TurnEnvironmentParams] `json:"environments" protocol:"nullable"`
Input []UserInput `json:"input" protocol:"required"`
// Override the model for this turn and subsequent turns.
Model Optional[string] `json:"model" protocol:"nullable"`
// @deprecated Ignored. Use `effort: "ultra"` for proactive multi-agent behavior.
MultiAgentMode Optional[MultiAgentMode] `json:"multiAgentMode" protocol:"nullable"`
// Optional JSON Schema used to constrain the final assistant message for this turn.
OutputSchema Optional[json.RawMessage] `json:"outputSchema" protocol:"nullable"`
// ID of the turn that caused this new turn to start.
//
// Set this when starting work on behalf of another turn, such as delegated work in a different thread. Leave unset for work started directly by the user. Ignored when this request adds input to an active turn.
ParentTurnID Optional[string] `json:"parentTurnId" protocol:"nullable"`
// Select a named permissions profile id for this turn and subsequent turns. Cannot be combined with `sandboxPolicy`.
Permissions Optional[string] `json:"permissions" protocol:"nullable"`
// @deprecated `friendly` and `pragmatic` no longer select a style. Changing this does not rewrite the thread's existing instructions.
Personality Optional[Personality] `json:"personality" protocol:"nullable"`
// Optional metadata to enrich Codex's ResponsesAPI turn metadata.
//
// Entries are flattened into the JSON string sent as `client_metadata["x-codex-turn-metadata"]` on ResponsesAPI HTTP and websocket requests.
//
// They are not sent as top-level ResponsesAPI `client_metadata` keys, and reserved keys such as `session_id`, `thread_id`, `turn_id`, and `window_id` cannot be overridden.
ResponsesapiClientMetadata Optional[map[string]string] `json:"responsesapiClientMetadata" protocol:"nullable"`
// ID of the first turn in the chain of work that led to this new turn.
//
// When setting `parentTurnId`, set this to the parent turn's `rootTurnId` when known. This keeps descendant work attributed to the original turn. If omitted, the new turn becomes its own root. Ignored when this request adds input to an active turn.
RootTurnID Optional[string] `json:"rootTurnId" protocol:"nullable"`
// Replace the thread's runtime workspace roots for this turn and subsequent turns. Paths must be absolute.
RuntimeWorkspaceRoots Optional[[]AbsolutePathBuf] `json:"runtimeWorkspaceRoots" protocol:"nullable"`
// Override the sandbox policy for this turn and subsequent turns.
SandboxPolicy Optional[SandboxPolicy] `json:"sandboxPolicy" protocol:"nullable"`
// Override the service tier for this turn and subsequent turns.
ServiceTier Optional[string] `json:"serviceTier" protocol:"nullable"`
// Override the service tier only when this request starts a new turn. Use "default" for standard speed. Omitted or null inherits the thread's tier. Does not change the thread's tier or a turn being steered.
ServiceTierForTurn Optional[string] `json:"serviceTierForTurn" protocol:"nullable"`
// Override the reasoning summary for this turn and subsequent turns.
Summary Optional[ReasoningSummary] `json:"summary" protocol:"nullable"`
ThreadID string `json:"threadId" protocol:"required"`
ToolOutput Optional[TurnToolOutput] `json:"toolOutput" protocol:"nullable"`
// Optional source classification for the caller that starts this turn. Ignored when this request steers an already-active turn.
TurnTrigger Optional[string] `json:"turnTrigger" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnStartParams) MarshalJSON ¶
func (v TurnStartParams) MarshalJSON() ([]byte, error)
func (*TurnStartParams) UnmarshalJSON ¶
func (v *TurnStartParams) UnmarshalJSON(data []byte) error
type TurnStartResponse ¶
type TurnStartResponse struct {
Turn Turn `json:"turn" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnStartResponse) MarshalJSON ¶
func (v TurnStartResponse) MarshalJSON() ([]byte, error)
func (*TurnStartResponse) UnmarshalJSON ¶
func (v *TurnStartResponse) UnmarshalJSON(data []byte) error
type TurnStartedNotification ¶
type TurnStartedNotification struct {
ThreadID string `json:"threadId" protocol:"required"`
Turn Turn `json:"turn" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnStartedNotification) MarshalJSON ¶
func (v TurnStartedNotification) MarshalJSON() ([]byte, error)
func (*TurnStartedNotification) UnmarshalJSON ¶
func (v *TurnStartedNotification) UnmarshalJSON(data []byte) error
type TurnStatus ¶
type TurnStatus string
const ( TurnStatusCompleted TurnStatus = "completed" TurnStatusInterrupted TurnStatus = "interrupted" TurnStatusFailed TurnStatus = "failed" TurnStatusInProgress TurnStatus = "inProgress" )
type TurnToolOutput ¶
type TurnToolOutput struct {
Name string `json:"name" protocol:"required"`
Namespace Optional[string] `json:"namespace" protocol:"nullable"`
Output FunctionCallOutputBody `json:"output" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnToolOutput) MarshalJSON ¶
func (v TurnToolOutput) MarshalJSON() ([]byte, error)
func (*TurnToolOutput) UnmarshalJSON ¶
func (v *TurnToolOutput) UnmarshalJSON(data []byte) error
type TurnsPage ¶
type TurnsPage struct {
BackwardsCursor Optional[string] `json:"backwardsCursor" protocol:"nullable"`
Data []Turn `json:"data" protocol:"required"`
NextCursor Optional[string] `json:"nextCursor" protocol:"nullable"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (TurnsPage) MarshalJSON ¶
func (*TurnsPage) UnmarshalJSON ¶
type UnknownCommandAction ¶
type UnknownCommandAction struct {
Command string `json:"command" protocol:"required"`
Type UnknownCommandActionType `json:"type" protocol:"required,const=unknown"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (UnknownCommandAction) MarshalJSON ¶
func (v UnknownCommandAction) MarshalJSON() ([]byte, error)
func (*UnknownCommandAction) UnmarshalJSON ¶
func (v *UnknownCommandAction) UnmarshalJSON(data []byte) error
type UnknownCommandActionType ¶
type UnknownCommandActionType string
const (
UnknownCommandActionTypeUnknown UnknownCommandActionType = "unknown"
)
type UnknownParsedCommand ¶
type UnknownParsedCommand struct {
Cmd string `json:"cmd" protocol:"required"`
Type UnknownParsedCommandType `json:"type" protocol:"required,const=unknown"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (UnknownParsedCommand) MarshalJSON ¶
func (v UnknownParsedCommand) MarshalJSON() ([]byte, error)
func (*UnknownParsedCommand) UnmarshalJSON ¶
func (v *UnknownParsedCommand) UnmarshalJSON(data []byte) error
type UnknownParsedCommandType ¶
type UnknownParsedCommandType string
const (
UnknownParsedCommandTypeUnknown UnknownParsedCommandType = "unknown"
)
type UpdateFileChange ¶
type UpdateFileChange struct {
MovePath Optional[string] `json:"move_path" protocol:"nullable"`
Type UpdateFileChangeType `json:"type" protocol:"required,const=update"`
UnifiedDiff string `json:"unified_diff" protocol:"required"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (UpdateFileChange) MarshalJSON ¶
func (v UpdateFileChange) MarshalJSON() ([]byte, error)
func (*UpdateFileChange) UnmarshalJSON ¶
func (v *UpdateFileChange) UnmarshalJSON(data []byte) error
type UpdateFileChangeType ¶
type UpdateFileChangeType string
const (
UpdateFileChangeTypeUpdate UpdateFileChangeType = "update"
)
type UpdatePatchChangeKind ¶
type UpdatePatchChangeKind struct {
MovePath Optional[string] `json:"move_path" protocol:"nullable"`
Type UpdatePatchChangeKindType `json:"type" protocol:"required,const=update"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (UpdatePatchChangeKind) MarshalJSON ¶
func (v UpdatePatchChangeKind) MarshalJSON() ([]byte, error)
func (*UpdatePatchChangeKind) UnmarshalJSON ¶
func (v *UpdatePatchChangeKind) UnmarshalJSON(data []byte) error
type UpdatePatchChangeKindType ¶
type UpdatePatchChangeKindType string
const (
UpdatePatchChangeKindTypeUpdate UpdatePatchChangeKindType = "update"
)
type UsageLimitExceededImageGenerationFailure ¶
type UsageLimitExceededImageGenerationFailure struct {
LimitID string `json:"limitId" protocol:"required"`
ResetsAt Optional[int64] `json:"resetsAt" protocol:"nullable"`
Type UsageLimitExceededImageGenerationFailureType `json:"type" protocol:"required,const=usageLimitExceeded"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (UsageLimitExceededImageGenerationFailure) MarshalJSON ¶
func (v UsageLimitExceededImageGenerationFailure) MarshalJSON() ([]byte, error)
func (*UsageLimitExceededImageGenerationFailure) UnmarshalJSON ¶
func (v *UsageLimitExceededImageGenerationFailure) UnmarshalJSON(data []byte) error
type UsageLimitExceededImageGenerationFailureType ¶
type UsageLimitExceededImageGenerationFailureType string
const (
UsageLimitExceededImageGenerationFailureTypeUsageLimitExceeded UsageLimitExceededImageGenerationFailureType = "usageLimitExceeded"
)
type UserInput ¶
type UserInput struct {
Text *TextUserInput
Image *ImageUserInput
LocalImage *LocalImageUserInput
Audio *AudioUserInput
LocalAudio *LocalAudioUserInput
Skill *SkillUserInput
Mention *MentionUserInput
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
UserInput contains exactly one typed variant or Unknown.
func (UserInput) MarshalJSON ¶
func (*UserInput) UnmarshalJSON ¶
type UserMessageThreadItem ¶
type UserMessageThreadItem struct {
ClientID Optional[string] `json:"clientId" protocol:"nullable"`
Content []UserInput `json:"content" protocol:"required"`
ID string `json:"id" protocol:"required"`
Type UserMessageThreadItemType `json:"type" protocol:"required,const=userMessage"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (UserMessageThreadItem) MarshalJSON ¶
func (v UserMessageThreadItem) MarshalJSON() ([]byte, error)
func (*UserMessageThreadItem) UnmarshalJSON ¶
func (v *UserMessageThreadItem) UnmarshalJSON(data []byte) error
type UserMessageThreadItemType ¶
type UserMessageThreadItemType string
const (
UserMessageThreadItemTypeUserMessage UserMessageThreadItemType = "userMessage"
)
type W3cTraceContext ¶
type W3cTraceContext struct {
Traceparent Optional[string] `json:"traceparent" protocol:"nullable"`
Tracestate Optional[string] `json:"tracestate" protocol:"nullable"`
UnknownFields map[string]json.RawMessage `json:"-"`
}
W3cTraceContext is the optional request-envelope carrier from codex-rs/app-server-protocol/src/rpc.rs at revision 092d3acd6bec3e3a14bdc7e7a2810ab628ab759d. It is handwritten because the request envelope is outside the generated parameter/result schema closure. Encoding preserves native optional values; Session.Submit separately checks W3C syntax before propagating a carrier.
func (W3cTraceContext) MarshalJSON ¶
func (v W3cTraceContext) MarshalJSON() ([]byte, error)
func (*W3cTraceContext) UnmarshalJSON ¶
func (v *W3cTraceContext) UnmarshalJSON(data []byte) error
type WebSearchAction ¶
type WebSearchAction struct {
Search *SearchWebSearchAction
OpenPage *OpenPageWebSearchAction
FindInPage *FindInPageWebSearchAction
Other *OtherWebSearchAction
// Unknown preserves an unrecognized future variant as raw JSON.
Unknown json.RawMessage
}
WebSearchAction contains exactly one typed variant or Unknown.
func (WebSearchAction) MarshalJSON ¶
func (v WebSearchAction) MarshalJSON() ([]byte, error)
func (*WebSearchAction) UnmarshalJSON ¶
func (v *WebSearchAction) UnmarshalJSON(data []byte) error
type WebSearchCallResponseItem ¶
type WebSearchCallResponseItem struct {
Action Optional[ResponsesAPIWebSearchAction] `json:"action" protocol:"nullable"`
ID Optional[string] `json:"id" protocol:"nullable"`
InternalChatMessageMetadataPassthrough Optional[InternalChatMessageMetadataPassthrough] `json:"internal_chat_message_metadata_passthrough" protocol:"nullable"`
Status Optional[string] `json:"status" protocol:"nullable"`
Type WebSearchCallResponseItemType `json:"type" protocol:"required,const=web_search_call"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (WebSearchCallResponseItem) MarshalJSON ¶
func (v WebSearchCallResponseItem) MarshalJSON() ([]byte, error)
func (*WebSearchCallResponseItem) UnmarshalJSON ¶
func (v *WebSearchCallResponseItem) UnmarshalJSON(data []byte) error
type WebSearchCallResponseItemType ¶
type WebSearchCallResponseItemType string
const (
WebSearchCallResponseItemTypeWebSearchCall WebSearchCallResponseItemType = "web_search_call"
)
type WebSearchThreadItem ¶
type WebSearchThreadItem struct {
Action Optional[WebSearchAction] `json:"action" protocol:"nullable"`
ID string `json:"id" protocol:"required"`
Query string `json:"query" protocol:"required"`
// Structured search results returned out-of-band by standalone web search.
//
// These stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.
Results Optional[[]json.RawMessage] `json:"results" protocol:"nullable"`
Type WebSearchThreadItemType `json:"type" protocol:"required,const=webSearch"`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (WebSearchThreadItem) MarshalJSON ¶
func (v WebSearchThreadItem) MarshalJSON() ([]byte, error)
func (*WebSearchThreadItem) UnmarshalJSON ¶
func (v *WebSearchThreadItem) UnmarshalJSON(data []byte) error
type WebSearchThreadItemType ¶
type WebSearchThreadItemType string
const (
WebSearchThreadItemTypeWebSearch WebSearchThreadItemType = "webSearch"
)
type WorkspaceWriteSandboxPolicy ¶
type WorkspaceWriteSandboxPolicy struct {
ExcludeSlashTmp Optional[bool] `json:"excludeSlashTmp" protocol:""`
ExcludeTmpdirEnvVar Optional[bool] `json:"excludeTmpdirEnvVar" protocol:""`
NetworkAccess Optional[bool] `json:"networkAccess" protocol:""`
Type WorkspaceWriteSandboxPolicyType `json:"type" protocol:"required,const=workspaceWrite"`
WritableRoots Optional[[]AbsolutePathBuf] `json:"writableRoots" protocol:""`
// UnknownFields preserves unrecognized members for forward-compatible round trips.
UnknownFields map[string]json.RawMessage `json:"-"`
}
func (WorkspaceWriteSandboxPolicy) MarshalJSON ¶
func (v WorkspaceWriteSandboxPolicy) MarshalJSON() ([]byte, error)
func (*WorkspaceWriteSandboxPolicy) UnmarshalJSON ¶
func (v *WorkspaceWriteSandboxPolicy) UnmarshalJSON(data []byte) error
type WorkspaceWriteSandboxPolicyType ¶
type WorkspaceWriteSandboxPolicyType string
const (
WorkspaceWriteSandboxPolicyTypeWorkspaceWrite WorkspaceWriteSandboxPolicyType = "workspaceWrite"
)