Documentation
¶
Overview ¶
Package protocol implements the wire contract Memoh speaks with the codex app-server: JSON-RPC 2.0 semantics over newline-delimited JSON on stdio, with the `jsonrpc` version field omitted, as the app-server does.
The typed protocol surface (*.gen.go) is generated from the vendored JSON Schema snapshot by cmd/gen-codex-protocol; this file holds the version-independent core: envelopes, request ids, inbound classification, and the union runtime helpers the generated code relies on.
Decoding is deliberately tolerant: unknown methods, notification kinds, and union variants never fail — they surface with their raw bytes retained — so a pinned CLI upgrade can only add information, not break the stream.
Index ¶
- Constants
- func DecodeServerNotificationParams(method string, params []byte) (decoded any, ok bool, err error)
- func DecodeServerRequestParams(method string, params []byte) (decoded any, ok bool, err error)
- func NewResponseForMethod(method string) (resp any, ok bool)
- type APIKeyLoginAccountParams
- type APIKeyLoginAccountResponse
- type AbsolutePathBuf
- type Account
- type AccountLoginCompletedNotification
- type AccountRateLimitsUpdatedNotification
- type AccountUpdatedNotification
- type ActivePermissionProfile
- type ActiveThreadStatus
- type AddPatchChangeKind
- type AdditionalContextEntry
- type AdditionalContextKind
- type AdditionalFileSystemPermissions
- type AdditionalNetworkPermissions
- type AdditionalPermissionProfile
- type AgentMessageDelivery
- type AgentMessageDeltaNotification
- type AgentMessageInputContent
- type AgentMessageResponseItem
- type AgentMessageThreadItem
- type AgentPath
- type AmazonBedrockAccessKeysLoginAccountParams
- type AmazonBedrockAccount
- type AmazonBedrockLoginAccountParams
- type AmazonBedrockLoginAccountResponse
- type ApiKeyAccount
- type ApprovalsReviewer
- type AskForApproval
- type AskForApprovalGranular
- type AsyncUserInputQuestion
- type AudioUserInput
- type AuthMode
- type BaseBranchReviewTarget
- type ByteRange
- type CancelLoginAccountParams
- type CancelLoginAccountResponse
- type CancelLoginAccountStatus
- type CapabilityRootLocation
- type ChatgptAccount
- type ChatgptAuthTokensLoginAccountParams
- type ChatgptAuthTokensLoginAccountResponse
- type ChatgptAuthTokensRefreshParams
- type ChatgptAuthTokensRefreshReason
- type ChatgptAuthTokensRefreshResponse
- type ChatgptDeviceCodeLoginAccountParams
- type ChatgptDeviceCodeLoginAccountResponse
- type ChatgptLoginAccountParams
- type ChatgptLoginAccountResponse
- type ClientInfo
- type CodexErrorInfo
- type CodexErrorInfoActiveTurnNotSteerable
- type CodexErrorInfoHTTPConnectionFailed
- type CodexErrorInfoResponseStreamConnectionFailed
- type CodexErrorInfoResponseStreamDisconnected
- type CodexErrorInfoResponseTooManyFailedAttempts
- type CollabAgentState
- type CollabAgentStatus
- type CollabAgentTool
- type CollabAgentToolCallStatus
- type CollabAgentToolCallThreadItem
- type CollaborationMode
- type CommandAction
- type CommandExecutionApprovalDecision
- type CommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment
- type CommandExecutionApprovalDecisionApplyNetworkPolicyAmendment
- type CommandExecutionApprovalKind
- type CommandExecutionOutputDeltaNotification
- type CommandExecutionRequestApprovalParams
- type CommandExecutionRequestApprovalResponse
- type CommandExecutionSource
- type CommandExecutionStatus
- type CommandExecutionThreadItem
- type CommitReviewTarget
- type CompactionResponseItem
- type CompactionTriggerResponseItem
- type ConfigWarningNotification
- type ConfigurationReasoning
- type ConfigurationUpdateResponseItem
- type ContentItem
- type ContextCompactedNotificationdeprecated
- type ContextCompactionResponseItem
- type ContextCompactionThreadItem
- type CreditsSnapshot
- type CustomReviewTarget
- type CustomToolCallOutputResponseItem
- type CustomToolCallResponseItem
- type CyberAccessProgram
- type DangerFullAccessSandboxPolicy
- type DeletePatchChangeKind
- type DeprecationNoticeNotification
- type DesktopOnboardingEntrypoint
- type DynamicToolCallOutputContentItem
- type DynamicToolCallStatus
- type DynamicToolCallThreadItem
- type DynamicToolNamespaceTool
- type DynamicToolSpec
- type EncryptedContentAgentMessageInputContent
- type EncryptedContentFunctionCallOutputContentItem
- type EnteredReviewModeThreadItem
- type EnvironmentCapabilityRootLocation
- type ErrorNotification
- type ErrorResponse
- type ExecLocalShellAction
- type ExitedReviewModeThreadItem
- type ExternalSandboxSandboxPolicy
- type FileChangeApprovalDecision
- type FileChangeOutputDeltaNotification
- type FileChangeRequestApprovalParams
- type FileChangeRequestApprovalResponse
- type FileChangeThreadItem
- type FileSystemAccessMode
- type FileSystemPath
- type FileSystemSandboxEntry
- type FileSystemSpecialPath
- type FileUpdateChange
- type FindInPageResponsesApiWebSearchAction
- type FindInPageWebSearchAction
- type FormMcpServerElicitationRequestParams
- type FunctionCallOutputContentItem
- type FunctionCallOutputResponseItem
- type FunctionCallOutputThreadItem
- type FunctionCallResponseItem
- type FunctionDynamicToolNamespaceTool
- type FunctionDynamicToolSpec
- type GetAccountParams
- type GetAccountRateLimitsResponse
- type GetAccountResponse
- type GitInfo
- type GlobPatternFileSystemPath
- type GrantedPermissionProfile
- type HookPromptFragment
- type HookPromptThreadItem
- type IdleThreadStatus
- type ImageDetail
- type ImageGenerationCallResponseItem
- type ImageGenerationFailure
- type ImageGenerationThreadItem
- type ImageUserInput
- type ImageViewThreadItem
- type Inbound
- type InboundKind
- type InitializeCapabilities
- type InitializeParams
- type InitializeResponse
- type InputAudioContentItem
- type InputAudioDynamicToolCallOutputContentItem
- type InputAudioFunctionCallOutputContentItem
- type InputImageContentItem
- type InputImageDynamicToolCallOutputContentItem
- type InputImageFunctionCallOutputContentItem
- type InputModality
- type InputTextAgentMessageInputContent
- type InputTextContentItem
- type InputTextDynamicToolCallOutputContentItem
- type InputTextFunctionCallOutputContentItem
- type InternalChatMessageMetadataPassthrough
- type ItemCompletedNotification
- type ItemStartedNotification
- type KindFileSystemSpecialPath
- type LegacyAppPathString
- type ListFilesCommandAction
- type ListMcpServerStatusParams
- type ListMcpServerStatusResponse
- type LocalAudioUserInput
- type LocalImageUserInput
- type LocalShellAction
- type LocalShellCallResponseItem
- type LocalShellStatus
- type LoginAccountParams
- type LoginAccountResponse
- type LoginAppBrand
- type LogoutAccountResponse
- type McpAuthStatus
- type McpElicitationArrayType
- type McpElicitationBooleanSchema
- type McpElicitationBooleanType
- type McpElicitationConstOption
- type McpElicitationEnumSchema
- type McpElicitationLegacyTitledEnumSchema
- type McpElicitationMultiSelectEnumSchema
- type McpElicitationNumberSchema
- type McpElicitationNumberType
- type McpElicitationObjectType
- type McpElicitationPrimitiveSchema
- type McpElicitationSchema
- type McpElicitationSingleSelectEnumSchema
- type McpElicitationStringFormat
- type McpElicitationStringSchema
- type McpElicitationStringType
- type McpElicitationTitledEnumItems
- type McpElicitationTitledMultiSelectEnumSchema
- type McpElicitationTitledSingleSelectEnumSchema
- type McpElicitationUntitledEnumItems
- type McpElicitationUntitledMultiSelectEnumSchema
- type McpElicitationUntitledSingleSelectEnumSchema
- type McpServerConnectionStatus
- type McpServerElicitationAction
- type McpServerElicitationRequestParams
- type McpServerElicitationRequestResponse
- type McpServerInfo
- type McpServerStatus
- type McpServerStatusDetail
- type McpToolCallAppContext
- type McpToolCallError
- type McpToolCallResult
- type McpToolCallStatus
- type McpToolCallThreadItem
- type MemoryCitation
- type MemoryCitationEntry
- type MentionUserInput
- type MessagePhase
- type MessageResponseItem
- type MinimalFileSystemSpecialPath
- type MisalignmentErrorDetails
- type MisalignmentSteer
- type ModeKind
- type Model
- type ModelAvailabilityNux
- type ModelListParams
- type ModelListResponse
- type ModelServiceTier
- type ModelUpgradeInfo
- type MultiAgentMode
- type MultiAgentVersion
- type NamespaceDynamicToolSpec
- type NetworkAccess
- type NetworkApprovalContext
- type NetworkApprovalProtocol
- type NetworkPolicyAmendment
- type NetworkPolicyRuleAction
- type NonSteerableTurnKind
- type NotLoadedThreadStatus
- type Notification
- type OpenPageResponsesApiWebSearchAction
- type OpenPageWebSearchAction
- type OpenaiFormCamelCaseMcpServerElicitationRequestParams
- type OpenaiFormMcpServerElicitationRequestParams
- type OpenaiUserVerificationMcpServerElicitationRequestParams
- type OtherResponseItem
- type OtherResponsesApiWebSearchAction
- type OtherWebSearchAction
- type OutputTextContentItem
- type PatchApplyStatus
- type PatchChangeKind
- type PathFileSystemPath
- type PermissionGrantScope
- type PermissionsRequestApprovalParams
- type PermissionsRequestApprovalResponse
- type Personality
- type PlanThreadItem
- type PlanType
- type RPCError
- type RateLimitReachedType
- type RateLimitResetCredit
- type RateLimitResetCreditStatus
- type RateLimitResetCreditsSummary
- type RateLimitResetType
- type RateLimitSnapshot
- type RateLimitWindow
- type ReadCommandAction
- type ReadOnlySandboxPolicy
- type ReasoningEffort
- type ReasoningEffortOption
- type ReasoningItemContent
- type ReasoningItemReasoningSummary
- type ReasoningResponseItem
- type ReasoningSummary
- type ReasoningSummaryPartAddedNotification
- type ReasoningSummaryTextDeltaNotification
- type ReasoningTextDeltaNotification
- type ReasoningTextReasoningItemContent
- type ReasoningThreadItem
- type Request
- type RequestID
- type RequestPermissionProfile
- type Resource
- type ResourceTemplate
- type Response
- type ResponseItem
- type ResponsesApiWebSearchAction
- type ReviewDelivery
- type ReviewStartParams
- type ReviewStartResponse
- type ReviewTarget
- type RootFileSystemSpecialPath
- type SandboxMode
- type SandboxPolicy
- type SearchCommandAction
- type SearchResponsesApiWebSearchAction
- type SearchWebSearchAction
- type SelectedCapabilityRoot
- type ServerRequestResolvedNotification
- type SessionSource
- type Settings
- type SkillDependencies
- type SkillErrorInfo
- type SkillInterface
- type SkillMetadata
- type SkillScope
- type SkillToolDependency
- type SkillUserInput
- type SkillsListEntry
- type SkillsListParams
- type SkillsListResponse
- type SlashTmpFileSystemSpecialPath
- type SleepThreadItem
- type SortDirection
- type SpecialFileSystemPath
- type SpendControlLimitSnapshot
- type SubAgentActivityKind
- type SubAgentActivityThreadItem
- type SubAgentSource
- type SubAgentSourceThreadSpawn
- type SummaryTextReasoningItemReasoningSummary
- type SystemErrorThreadStatus
- type TextElement
- type TextPosition
- type TextRange
- type TextReasoningItemContent
- type TextUserInput
- type Thread
- type ThreadActiveFlag
- type ThreadCompactStartParams
- type ThreadCompactStartResponse
- type ThreadEnvironment
- type ThreadExtra
- type ThreadForkParams
- type ThreadForkResponse
- type ThreadGoal
- type ThreadGoalClearParams
- type ThreadGoalClearResponse
- type ThreadGoalClearedNotification
- type ThreadGoalGetParams
- type ThreadGoalGetResponse
- type ThreadGoalSetParams
- type ThreadGoalSetResponse
- type ThreadGoalStatus
- type ThreadGoalUpdatedNotification
- type ThreadHistoryMode
- type ThreadId
- type ThreadItem
- type ThreadReadParams
- type ThreadReadResponse
- type ThreadResumeInitialTurnsPageParams
- type ThreadResumeParams
- type ThreadResumeResponse
- type ThreadSection
- type ThreadSectionAppearance
- type ThreadSettingsUpdateParams
- type ThreadSettingsUpdateResponse
- type ThreadSource
- type ThreadStartParams
- type ThreadStartResponse
- type ThreadStartSource
- type ThreadStartedNotification
- type ThreadStatus
- type ThreadStatusChangedNotification
- type ThreadTokenUsage
- type ThreadTokenUsageUpdatedNotification
- type TmpdirFileSystemSpecialPath
- type TokenUsageBreakdown
- type Tool
- type ToolRequestUserInputAnswer
- type ToolRequestUserInputOption
- type ToolRequestUserInputParams
- type ToolRequestUserInputQuestion
- type ToolRequestUserInputResponse
- type ToolSearchCallResponseItem
- type ToolSearchOutputResponseItem
- type Turn
- type TurnCompletedNotification
- type TurnEnvironmentParams
- type TurnError
- type TurnInterruptParams
- type TurnInterruptResponse
- type TurnItemsView
- type TurnPlanStep
- type TurnPlanStepStatus
- type TurnPlanUpdatedNotification
- type TurnStartParams
- type TurnStartResponse
- type TurnStartedNotification
- type TurnStatus
- type TurnSteerParams
- type TurnSteerResponse
- type TurnToolOutput
- type TurnsPage
- type URLMcpServerElicitationRequestParams
- type UncommittedChangesReviewTarget
- type UnknownCommandAction
- type UnknownFileSystemSpecialPath
- type UpdatePatchChangeKind
- type UsageLimitExceededImageGenerationFailure
- type UserInput
- type UserMessageThreadItem
- type WarningNotification
- type WebSearchAction
- type WebSearchCallResponseItem
- type WebSearchThreadItem
- type WorkspaceWriteSandboxPolicy
Constants ¶
const ( MethodInitialize = "initialize" MethodThreadStart = "thread/start" MethodThreadResume = "thread/resume" MethodThreadSettingsUpdate = "thread/settings/update" MethodThreadFork = "thread/fork" MethodThreadRead = "thread/read" MethodThreadGoalSet = "thread/goal/set" MethodThreadGoalGet = "thread/goal/get" MethodThreadGoalClear = "thread/goal/clear" MethodThreadCompactStart = "thread/compact/start" MethodReviewStart = "review/start" MethodSkillsList = "skills/list" MethodMCPServerStatusList = "mcpServerStatus/list" MethodTurnStart = "turn/start" MethodTurnSteer = "turn/steer" MethodTurnInterrupt = "turn/interrupt" MethodModelList = "model/list" MethodAccountRead = "account/read" MethodAccountRateLimitsRead = "account/rateLimits/read" MethodAccountLoginStart = "account/login/start" MethodAccountLoginCancel = "account/login/cancel" MethodAccountLogout = "account/logout" )
Client request methods (Memoh → app-server).
const ( MethodItemCommandExecutionRequestApproval = "item/commandExecution/requestApproval" MethodItemFileChangeRequestApproval = "item/fileChange/requestApproval" MethodItemPermissionsRequestApproval = "item/permissions/requestApproval" MethodItemToolRequestUserInput = "item/tool/requestUserInput" MethodMCPServerElicitationRequest = "mcpServer/elicitation/request" MethodAccountChatgptAuthTokensRefresh = "account/chatgptAuthTokens/refresh" )
Server request methods (app-server → Memoh, expect a response).
const ( MethodError = "error" MethodWarning = "warning" MethodConfigWarning = "configWarning" MethodDeprecationNotice = "deprecationNotice" MethodThreadStarted = "thread/started" MethodThreadStatusChanged = "thread/status/changed" MethodThreadTokenUsageUpdated = "thread/tokenUsage/updated" MethodThreadCompacted = "thread/compacted" MethodThreadGoalUpdated = "thread/goal/updated" MethodThreadGoalCleared = "thread/goal/cleared" MethodTurnStarted = "turn/started" MethodTurnCompleted = "turn/completed" MethodTurnPlanUpdated = "turn/plan/updated" MethodItemStarted = "item/started" MethodItemCompleted = "item/completed" MethodItemAgentMessageDelta = "item/agentMessage/delta" MethodItemReasoningTextDelta = "item/reasoning/textDelta" MethodItemReasoningSummaryTextDelta = "item/reasoning/summaryTextDelta" MethodItemReasoningSummaryPartAdded = "item/reasoning/summaryPartAdded" MethodItemCommandExecutionOutputDelta = "item/commandExecution/outputDelta" MethodItemFileChangeOutputDelta = "item/fileChange/outputDelta" MethodAccountUpdated = "account/updated" MethodAccountLoginCompleted = "account/login/completed" MethodAccountRateLimitsUpdated = "account/rateLimits/updated" MethodServerRequestResolved = "serverRequest/resolved" )
Server notification methods decoded into typed params.
const ( AccountTagAmazonBedrock = "amazonBedrock" AccountTagAPIKey = "apiKey" AccountTagChatgpt = "chatgpt" )
const ( AgentMessageInputContentTagEncryptedContent = "encrypted_content" AgentMessageInputContentTagInputText = "input_text" )
const ( AskForApprovalUnitNever = "never" AskForApprovalUnitOnRequest = "on-request" AskForApprovalUnitUntrusted = "untrusted" )
const ( CodexErrorInfoUnitBadRequest = "badRequest" CodexErrorInfoUnitContextWindowExceeded = "contextWindowExceeded" CodexErrorInfoUnitCyberPolicy = "cyberPolicy" CodexErrorInfoUnitInternalServerError = "internalServerError" CodexErrorInfoUnitMisalignmentPolicyViolation = "misalignmentPolicyViolation" CodexErrorInfoUnitOther = "other" CodexErrorInfoUnitRateLimitExceeded = "rateLimitExceeded" CodexErrorInfoUnitSandboxError = "sandboxError" CodexErrorInfoUnitServerOverloaded = "serverOverloaded" CodexErrorInfoUnitSessionBudgetExceeded = "sessionBudgetExceeded" CodexErrorInfoUnitThreadRollbackFailed = "threadRollbackFailed" CodexErrorInfoUnitUsageLimitExceeded = "usageLimitExceeded" )
const ( CommandActionTagListFiles = "listFiles" CommandActionTagRead = "read" CommandActionTagSearch = "search" CommandActionTagUnknown = "unknown" )
const ( CommandExecutionApprovalDecisionUnitAccept = "accept" CommandExecutionApprovalDecisionUnitAcceptForSession = "acceptForSession" CommandExecutionApprovalDecisionUnitCancel = "cancel" CommandExecutionApprovalDecisionUnitDecline = "decline" )
const ( ContentItemTagInputAudio = "input_audio" ContentItemTagInputImage = "input_image" ContentItemTagInputText = "input_text" ContentItemTagOutputText = "output_text" )
const ( DynamicToolCallOutputContentItemTagInputAudio = "inputAudio" DynamicToolCallOutputContentItemTagInputImage = "inputImage" DynamicToolCallOutputContentItemTagInputText = "inputText" )
const ( DynamicToolSpecTagFunction = "function" DynamicToolSpecTagNamespace = "namespace" )
const ( FileSystemPathTagGlobPattern = "glob_pattern" FileSystemPathTagPath = "path" FileSystemPathTagSpecial = "special" )
const ( FileSystemSpecialPathTagMinimal = "minimal" FileSystemSpecialPathTagProjectRoots = "project_roots" FileSystemSpecialPathTagRoot = "root" FileSystemSpecialPathTagSlashTmp = "slash_tmp" FileSystemSpecialPathTagTmpdir = "tmpdir" FileSystemSpecialPathTagUnknown = "unknown" )
const ( FunctionCallOutputContentItemTagEncryptedContent = "encrypted_content" FunctionCallOutputContentItemTagInputAudio = "input_audio" FunctionCallOutputContentItemTagInputImage = "input_image" FunctionCallOutputContentItemTagInputText = "input_text" )
const ( LoginAccountParamsTagAmazonBedrock = "amazonBedrock" LoginAccountParamsTagAmazonBedrockAccessKeys = "amazonBedrockAccessKeys" LoginAccountParamsTagAPIKey = "apiKey" LoginAccountParamsTagChatgpt = "chatgpt" LoginAccountParamsTagChatgptAuthTokens = "chatgptAuthTokens" LoginAccountParamsTagChatgptDeviceCode = "chatgptDeviceCode" )
const ( LoginAccountResponseTagAmazonBedrock = "amazonBedrock" LoginAccountResponseTagAPIKey = "apiKey" LoginAccountResponseTagChatgpt = "chatgpt" LoginAccountResponseTagChatgptAuthTokens = "chatgptAuthTokens" LoginAccountResponseTagChatgptDeviceCode = "chatgptDeviceCode" )
const ( McpServerElicitationRequestParamsTagForm = "form" McpServerElicitationRequestParamsTagOpenaiForm = "openai/form" McpServerElicitationRequestParamsTagOpenaiUserVerification = "openai/userVerification" McpServerElicitationRequestParamsTagOpenaiFormCamelCase = "openaiForm" McpServerElicitationRequestParamsTagURL = "url" )
const ( MultiAgentModeUnitExplicitRequestOnly = "explicitRequestOnly" MultiAgentModeUnitProactive = "proactive" )
const ( PatchChangeKindTagAdd = "add" PatchChangeKindTagDelete = "delete" PatchChangeKindTagUpdate = "update" )
const ( ReasoningItemContentTagReasoningText = "reasoning_text" ReasoningItemContentTagText = "text" )
const ( ResponseItemTagAgentMessage = "agent_message" ResponseItemTagCompaction = "compaction" ResponseItemTagCompactionTrigger = "compaction_trigger" ResponseItemTagConfigurationUpdate = "configuration_update" ResponseItemTagContextCompaction = "context_compaction" ResponseItemTagCustomToolCall = "custom_tool_call" ResponseItemTagCustomToolCallOutput = "custom_tool_call_output" ResponseItemTagFunctionCall = "function_call" ResponseItemTagFunctionCallOutput = "function_call_output" ResponseItemTagImageGenerationCall = "image_generation_call" ResponseItemTagLocalShellCall = "local_shell_call" ResponseItemTagMessage = "message" ResponseItemTagOther = "other" ResponseItemTagReasoning = "reasoning" ResponseItemTagToolSearchCall = "tool_search_call" ResponseItemTagToolSearchOutput = "tool_search_output" ResponseItemTagWebSearchCall = "web_search_call" )
const ( ResponsesApiWebSearchActionTagFindInPage = "find_in_page" ResponsesApiWebSearchActionTagOpenPage = "open_page" ResponsesApiWebSearchActionTagOther = "other" ResponsesApiWebSearchActionTagSearch = "search" )
const ( ReviewTargetTagBaseBranch = "baseBranch" ReviewTargetTagCommit = "commit" ReviewTargetTagCustom = "custom" ReviewTargetTagUncommittedChanges = "uncommittedChanges" )
const ( SandboxPolicyTagDangerFullAccess = "dangerFullAccess" SandboxPolicyTagExternalSandbox = "externalSandbox" SandboxPolicyTagReadOnly = "readOnly" SandboxPolicyTagWorkspaceWrite = "workspaceWrite" )
const ( SessionSourceUnitAppServer = "appServer" SessionSourceUnitCli = "cli" SessionSourceUnitExec = "exec" SessionSourceUnitUnknown = "unknown" SessionSourceUnitVscode = "vscode" )
const ( SubAgentSourceUnitCompact = "compact" SubAgentSourceUnitMemoryConsolidation = "memory_consolidation" SubAgentSourceUnitReview = "review" )
const ( ThreadItemTagAgentMessage = "agentMessage" ThreadItemTagCollabAgentToolCall = "collabAgentToolCall" ThreadItemTagCommandExecution = "commandExecution" ThreadItemTagContextCompaction = "contextCompaction" ThreadItemTagDynamicToolCall = "dynamicToolCall" ThreadItemTagEnteredReviewMode = "enteredReviewMode" ThreadItemTagExitedReviewMode = "exitedReviewMode" ThreadItemTagFileChange = "fileChange" ThreadItemTagFunctionCallOutput = "functionCallOutput" ThreadItemTagHookPrompt = "hookPrompt" ThreadItemTagImageGeneration = "imageGeneration" ThreadItemTagImageView = "imageView" ThreadItemTagMCPToolCall = "mcpToolCall" ThreadItemTagPlan = "plan" ThreadItemTagReasoning = "reasoning" ThreadItemTagSleep = "sleep" ThreadItemTagSubAgentActivity = "subAgentActivity" ThreadItemTagUserMessage = "userMessage" ThreadItemTagWebSearch = "webSearch" )
const ( ThreadStatusTagActive = "active" ThreadStatusTagIdle = "idle" ThreadStatusTagNotLoaded = "notLoaded" ThreadStatusTagSystemError = "systemError" )
const ( UserInputTagAudio = "audio" UserInputTagImage = "image" UserInputTagLocalAudio = "localAudio" UserInputTagLocalImage = "localImage" UserInputTagMention = "mention" UserInputTagSkill = "skill" UserInputTagText = "text" )
const ( WebSearchActionTagFindInPage = "findInPage" WebSearchActionTagOpenPage = "openPage" WebSearchActionTagOther = "other" WebSearchActionTagSearch = "search" )
const (
CapabilityRootLocationTagEnvironment = "environment"
)
const (
DynamicToolNamespaceToolTagFunction = "function"
)
const (
ImageGenerationFailureTagUsageLimitExceeded = "usageLimitExceeded"
)
const (
LocalShellActionTagExec = "exec"
)
const MethodInitialized = "initialized"
MethodInitialized is the client notification completing the handshake.
const PinnedCodexVersion = "0.154.0"
PinnedCodexVersion is the codex CLI version the vendored schema snapshot (and therefore these generated types) corresponds to.
const (
ReasoningItemReasoningSummaryTagSummaryText = "summary_text"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeServerNotificationParams ¶
DecodeServerNotificationParams decodes the params of an app-server notification into its generated type. ok is false for methods outside the typed subset; those still surface to the caller as raw envelopes.
func DecodeServerRequestParams ¶
DecodeServerRequestParams decodes the params of an app-server → Memoh request into its generated type. ok is false for unknown methods; the caller keeps the raw envelope in that case.
func NewResponseForMethod ¶
NewResponseForMethod returns a pointer to the zero response value for a client request method, ready for unmarshaling. ok is false for methods whose responses are not generated (initialize) or unknown methods.
Types ¶
type APIKeyLoginAccountParams ¶
type APIKeyLoginAccountParams struct {
APIKey string `json:"apiKey"`
}
type APIKeyLoginAccountResponse ¶
type APIKeyLoginAccountResponse struct {
}
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).
type Account ¶
type Account struct {
// Tag is the value of the "type" property observed on decode.
Tag string
AmazonBedrock *AmazonBedrockAccount
APIKey *ApiKeyAccount
Chatgpt *ChatgptAccount
// contains filtered or unexported fields
}
Account is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (Account) MarshalJSON ¶
func (*Account) UnmarshalJSON ¶
type AccountLoginCompletedNotification ¶
type AccountLoginCompletedNotification struct {
Error *string `json:"error,omitempty"`
LoginID *string `json:"loginId,omitempty"`
OnboardingEntrypoint *DesktopOnboardingEntrypoint `json:"onboardingEntrypoint,omitempty"`
Success bool `json:"success"`
}
type AccountRateLimitsUpdatedNotification ¶
type AccountRateLimitsUpdatedNotification struct {
RateLimits RateLimitSnapshot `json:"rateLimits"`
}
Sparse rolling rate-limit update.
type ActivePermissionProfile ¶
type ActivePermissionProfile struct {
// Parent profile identifier from the selected permissions profile's `extends` setting, when present.
Extends *string `json:"extends,omitempty"`
// Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.
ID string `json:"id"`
}
type ActiveThreadStatus ¶
type ActiveThreadStatus struct {
ActiveFlags []ThreadActiveFlag `json:"activeFlags"`
}
func (ActiveThreadStatus) MarshalJSON ¶
func (v ActiveThreadStatus) MarshalJSON() ([]byte, error)
type AddPatchChangeKind ¶
type AddPatchChangeKind struct {
}
type AdditionalContextEntry ¶
type AdditionalContextEntry struct {
Kind AdditionalContextKind `json:"kind"`
Value string `json:"value"`
}
type AdditionalContextKind ¶
type AdditionalContextKind string
const ( AdditionalContextKindApplication AdditionalContextKind = "application" AdditionalContextKindUntrusted AdditionalContextKind = "untrusted" )
type AdditionalFileSystemPermissions ¶
type AdditionalFileSystemPermissions struct {
Entries []FileSystemSandboxEntry `json:"entries,omitempty"`
GlobScanMaxDepth *uint64 `json:"globScanMaxDepth,omitempty"`
// This will be removed in favor of `entries`.
Read []LegacyAppPathString `json:"read,omitempty"`
// This will be removed in favor of `entries`.
Write []LegacyAppPathString `json:"write,omitempty"`
}
type AdditionalNetworkPermissions ¶
type AdditionalNetworkPermissions struct {
Enabled *bool `json:"enabled,omitempty"`
}
type AdditionalPermissionProfile ¶
type AdditionalPermissionProfile struct {
FileSystem *AdditionalFileSystemPermissions `json:"fileSystem,omitempty"`
// Partial overlay used for per-command permission requests.
Network *AdditionalNetworkPermissions `json:"network,omitempty"`
}
type AgentMessageDelivery ¶
type AgentMessageDelivery string
const (
AgentMessageDeliveryAsync AgentMessageDelivery = "async"
)
type AgentMessageInputContent ¶
type AgentMessageInputContent struct {
// Tag is the value of the "type" property observed on decode.
Tag string
EncryptedContent *EncryptedContentAgentMessageInputContent
InputText *InputTextAgentMessageInputContent
// contains filtered or unexported fields
}
AgentMessageInputContent is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (AgentMessageInputContent) MarshalJSON ¶
func (u AgentMessageInputContent) MarshalJSON() ([]byte, error)
func (AgentMessageInputContent) Raw ¶
func (u AgentMessageInputContent) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*AgentMessageInputContent) UnmarshalJSON ¶
func (u *AgentMessageInputContent) UnmarshalJSON(data []byte) error
type AgentMessageResponseItem ¶
type AgentMessageResponseItem struct {
Author string `json:"author"`
Content []AgentMessageInputContent `json:"content"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Recipient string `json:"recipient"`
}
func (AgentMessageResponseItem) MarshalJSON ¶
func (v AgentMessageResponseItem) MarshalJSON() ([]byte, error)
type AgentMessageThreadItem ¶
type AgentMessageThreadItem struct {
Delivery *AgentMessageDelivery `json:"delivery,omitempty"`
ID string `json:"id"`
MemoryCitation *MemoryCitation `json:"memoryCitation,omitempty"`
Phase *MessagePhase `json:"phase,omitempty"`
Questions []AsyncUserInputQuestion `json:"questions,omitempty"`
Text string `json:"text"`
}
type AmazonBedrockAccessKeysLoginAccountParams ¶
type AmazonBedrockAccessKeysLoginAccountParams struct {
AccessKeyID string `json:"accessKeyId"`
Region string `json:"region"`
SecretAccessKey string `json:"secretAccessKey"`
SessionToken *string `json:"sessionToken,omitempty"`
}
[UNSTABLE] Managed Amazon Bedrock AWS access key login is experimental.
type AmazonBedrockAccount ¶
type AmazonBedrockAccount struct {
UsesCodexManagedCredentials *bool `json:"usesCodexManagedCredentials,omitempty"`
}
type AmazonBedrockLoginAccountParams ¶
type AmazonBedrockLoginAccountParams struct {
APIKey string `json:"apiKey"`
Region string `json:"region"`
}
[UNSTABLE] Managed Amazon Bedrock login is experimental.
type AmazonBedrockLoginAccountResponse ¶
type AmazonBedrockLoginAccountResponse struct {
}
type ApiKeyAccount ¶
type ApiKeyAccount struct {
}
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 ( ApprovalsReviewerAutoReview ApprovalsReviewer = "auto_review" ApprovalsReviewerGuardianSubagent ApprovalsReviewer = "guardian_subagent" ApprovalsReviewerUser ApprovalsReviewer = "user" )
type AskForApproval ¶
type AskForApproval struct {
// Unit holds the bare-string variant value, if that form was used.
Unit string
Granular *AskForApprovalGranular
// contains filtered or unexported fields
}
AskForApproval is a mixed union: on the wire it is either a bare string (Unit) or a single-key object (one payload field set). Unknown variants decode without error and are retained in Raw().
func (AskForApproval) MarshalJSON ¶
func (u AskForApproval) MarshalJSON() ([]byte, error)
func (AskForApproval) Raw ¶
func (u AskForApproval) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*AskForApproval) UnmarshalJSON ¶
func (u *AskForApproval) UnmarshalJSON(data []byte) error
type AskForApprovalGranular ¶
type AsyncUserInputQuestion ¶
type AudioUserInput ¶
type AudioUserInput struct {
URL string `json:"url"`
}
type AuthMode ¶
type AuthMode string
Authentication mode for OpenAI-backed providers.
const ( AuthModeAgentIdentity AuthMode = "agentIdentity" AuthModeApikey AuthMode = "apikey" AuthModeBedrockAccessKeys AuthMode = "bedrockAccessKeys" AuthModeBedrockAPIKey AuthMode = "bedrockApiKey" AuthModeChatgpt AuthMode = "chatgpt" AuthModeChatgptAuthTokens AuthMode = "chatgptAuthTokens" AuthModeHeaders AuthMode = "headers" AuthModePersonalAccessToken AuthMode = "personalAccessToken" )
type BaseBranchReviewTarget ¶
type BaseBranchReviewTarget struct {
Branch string `json:"branch"`
}
Review changes between the current branch and the given base branch.
type CancelLoginAccountParams ¶
type CancelLoginAccountParams struct {
LoginID string `json:"loginId"`
}
type CancelLoginAccountResponse ¶
type CancelLoginAccountResponse struct {
Status CancelLoginAccountStatus `json:"status"`
}
type CancelLoginAccountStatus ¶
type CancelLoginAccountStatus string
const ( CancelLoginAccountStatusCanceled CancelLoginAccountStatus = "canceled" CancelLoginAccountStatusNotFound CancelLoginAccountStatus = "notFound" )
type CapabilityRootLocation ¶
type CapabilityRootLocation struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Environment *EnvironmentCapabilityRootLocation
// contains filtered or unexported fields
}
Location used to resolve a selected capability root. CapabilityRootLocation is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (CapabilityRootLocation) MarshalJSON ¶
func (u CapabilityRootLocation) MarshalJSON() ([]byte, error)
func (CapabilityRootLocation) Raw ¶
func (u CapabilityRootLocation) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*CapabilityRootLocation) UnmarshalJSON ¶
func (u *CapabilityRootLocation) UnmarshalJSON(data []byte) error
type ChatgptAccount ¶
type ChatgptAuthTokensLoginAccountParams ¶
type ChatgptAuthTokensLoginAccountParams struct {
// Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.
AccessToken string `json:"accessToken"`
// Workspace/account identifier supplied by the client.
ChatgptAccountID string `json:"chatgptAccountId"`
// Optional plan type supplied by the client.
ChatgptPlanType *string `json:"chatgptPlanType,omitempty"`
}
[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.
type ChatgptAuthTokensLoginAccountResponse ¶
type ChatgptAuthTokensLoginAccountResponse struct {
}
type ChatgptAuthTokensRefreshParams ¶
type ChatgptAuthTokensRefreshParams struct {
// Workspace/account identifier that Codex was previously using.
PreviousAccountID *string `json:"previousAccountId,omitempty"`
Reason ChatgptAuthTokensRefreshReason `json:"reason"`
}
type ChatgptDeviceCodeLoginAccountParams ¶
type ChatgptDeviceCodeLoginAccountParams struct {
}
type ChatgptDeviceCodeLoginAccountResponse ¶
type ChatgptDeviceCodeLoginAccountResponse struct {
LoginID string `json:"loginId"`
// One-time code the user must enter after signing in.
UserCode string `json:"userCode"`
// URL the client should open in a browser to complete device code authorization.
VerificationURL string `json:"verificationUrl"`
}
type ChatgptLoginAccountParams ¶
type ChatgptLoginAccountParams struct {
AppBrand *LoginAppBrand `json:"appBrand,omitempty"`
CodexStreamlinedLogin *bool `json:"codexStreamlinedLogin,omitempty"`
UseHostedLoginSuccessPage *bool `json:"useHostedLoginSuccessPage,omitempty"`
}
type ClientInfo ¶
type CodexErrorInfo ¶
type CodexErrorInfo struct {
// Unit holds the bare-string variant value, if that form was used.
Unit string
ActiveTurnNotSteerable *CodexErrorInfoActiveTurnNotSteerable
HTTPConnectionFailed *CodexErrorInfoHTTPConnectionFailed
ResponseStreamConnectionFailed *CodexErrorInfoResponseStreamConnectionFailed
ResponseStreamDisconnected *CodexErrorInfoResponseStreamDisconnected
ResponseTooManyFailedAttempts *CodexErrorInfoResponseTooManyFailedAttempts
// contains filtered or unexported fields
}
This translation layer make sure that we expose codex error code in camel case. CodexErrorInfo is a mixed union: on the wire it is either a bare string (Unit) or a single-key object (one payload field set). Unknown variants decode without error and are retained in Raw().
func (CodexErrorInfo) MarshalJSON ¶
func (u CodexErrorInfo) MarshalJSON() ([]byte, error)
func (CodexErrorInfo) Raw ¶
func (u CodexErrorInfo) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*CodexErrorInfo) UnmarshalJSON ¶
func (u *CodexErrorInfo) UnmarshalJSON(data []byte) error
type CodexErrorInfoActiveTurnNotSteerable ¶
type CodexErrorInfoActiveTurnNotSteerable struct {
TurnKind NonSteerableTurnKind `json:"turnKind"`
}
type CodexErrorInfoHTTPConnectionFailed ¶
type CodexErrorInfoHTTPConnectionFailed struct {
HTTPStatusCode *uint64 `json:"httpStatusCode,omitempty"`
}
type CodexErrorInfoResponseStreamConnectionFailed ¶
type CodexErrorInfoResponseStreamConnectionFailed struct {
HTTPStatusCode *uint64 `json:"httpStatusCode,omitempty"`
}
type CodexErrorInfoResponseStreamDisconnected ¶
type CodexErrorInfoResponseStreamDisconnected struct {
HTTPStatusCode *uint64 `json:"httpStatusCode,omitempty"`
}
type CodexErrorInfoResponseTooManyFailedAttempts ¶
type CodexErrorInfoResponseTooManyFailedAttempts struct {
HTTPStatusCode *uint64 `json:"httpStatusCode,omitempty"`
}
type CollabAgentState ¶
type CollabAgentState struct {
Message *string `json:"message,omitempty"`
Status CollabAgentStatus `json:"status"`
}
type CollabAgentStatus ¶
type CollabAgentStatus string
const ( CollabAgentStatusCompleted CollabAgentStatus = "completed" CollabAgentStatusErrored CollabAgentStatus = "errored" CollabAgentStatusInterrupted CollabAgentStatus = "interrupted" CollabAgentStatusNotFound CollabAgentStatus = "notFound" CollabAgentStatusPendingInit CollabAgentStatus = "pendingInit" CollabAgentStatusRunning CollabAgentStatus = "running" CollabAgentStatusShutdown CollabAgentStatus = "shutdown" )
type CollabAgentTool ¶
type CollabAgentTool string
const ( CollabAgentToolCloseAgent CollabAgentTool = "closeAgent" CollabAgentToolFollowupTask CollabAgentTool = "followupTask" CollabAgentToolInterruptAgent CollabAgentTool = "interruptAgent" CollabAgentToolListAgents CollabAgentTool = "listAgents" CollabAgentToolResumeAgent CollabAgentTool = "resumeAgent" CollabAgentToolSendInput CollabAgentTool = "sendInput" CollabAgentToolSendMessage CollabAgentTool = "sendMessage" CollabAgentToolSpawnAgent CollabAgentTool = "spawnAgent" CollabAgentToolWait CollabAgentTool = "wait" )
type CollabAgentToolCallStatus ¶
type CollabAgentToolCallStatus string
const ( CollabAgentToolCallStatusCompleted CollabAgentToolCallStatus = "completed" CollabAgentToolCallStatusFailed CollabAgentToolCallStatus = "failed" CollabAgentToolCallStatusInProgress CollabAgentToolCallStatus = "inProgress" CollabAgentToolCallStatusInterrupted CollabAgentToolCallStatus = "interrupted" )
type CollabAgentToolCallThreadItem ¶
type CollabAgentToolCallThreadItem struct {
// Last known status of the target agents, when available.
AgentsStates map[string]CollabAgentState `json:"agentsStates"`
// Unique identifier for this collab tool call.
ID string `json:"id"`
// Model requested for the spawned agent, when applicable.
Model *string `json:"model,omitempty"`
// Prompt text sent as part of the collab tool call, when available.
Prompt *string `json:"prompt,omitempty"`
// Reasoning effort requested for the spawned agent, when applicable.
ReasoningEffort *ReasoningEffort `json:"reasoningEffort,omitempty"`
// Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.
ReceiverThreadIds []string `json:"receiverThreadIds"`
// Thread ID of the agent issuing the collab request.
SenderThreadID string `json:"senderThreadId"`
// Current status of the collab tool call.
Status CollabAgentToolCallStatus `json:"status"`
// Name of the collab tool that was invoked.
Tool CollabAgentTool `json:"tool"`
}
func (CollabAgentToolCallThreadItem) MarshalJSON ¶
func (v CollabAgentToolCallThreadItem) MarshalJSON() ([]byte, error)
type CollaborationMode ¶
Collaboration mode for a Codex session.
type CommandAction ¶
type CommandAction struct {
// Tag is the value of the "type" property observed on decode.
Tag string
ListFiles *ListFilesCommandAction
Read *ReadCommandAction
Search *SearchCommandAction
Unknown *UnknownCommandAction
// contains filtered or unexported fields
}
CommandAction is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (CommandAction) MarshalJSON ¶
func (u CommandAction) MarshalJSON() ([]byte, error)
func (CommandAction) Raw ¶
func (u CommandAction) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*CommandAction) UnmarshalJSON ¶
func (u *CommandAction) UnmarshalJSON(data []byte) error
type CommandExecutionApprovalDecision ¶
type CommandExecutionApprovalDecision struct {
// Unit holds the bare-string variant value, if that form was used.
Unit string
AcceptWithExecpolicyAmendment *CommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment
ApplyNetworkPolicyAmendment *CommandExecutionApprovalDecisionApplyNetworkPolicyAmendment
// contains filtered or unexported fields
}
CommandExecutionApprovalDecision is a mixed union: on the wire it is either a bare string (Unit) or a single-key object (one payload field set). Unknown variants decode without error and are retained in Raw().
func (CommandExecutionApprovalDecision) MarshalJSON ¶
func (u CommandExecutionApprovalDecision) MarshalJSON() ([]byte, error)
func (CommandExecutionApprovalDecision) Raw ¶
func (u CommandExecutionApprovalDecision) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*CommandExecutionApprovalDecision) UnmarshalJSON ¶
func (u *CommandExecutionApprovalDecision) UnmarshalJSON(data []byte) error
type CommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment ¶
type CommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment struct {
ExecpolicyAmendment []string `json:"execpolicy_amendment"`
}
func (CommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment) MarshalJSON ¶
func (v CommandExecutionApprovalDecisionAcceptWithExecpolicyAmendment) MarshalJSON() ([]byte, error)
type CommandExecutionApprovalDecisionApplyNetworkPolicyAmendment ¶
type CommandExecutionApprovalDecisionApplyNetworkPolicyAmendment struct {
NetworkPolicyAmendment NetworkPolicyAmendment `json:"network_policy_amendment"`
}
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 *AdditionalPermissionProfile `json:"additionalPermissions,omitempty"`
// Unique identifier for this specific approval callback.
ApprovalID *string `json:"approvalId,omitempty"`
// Ordered list of decisions the client may present for this prompt.
AvailableDecisions []CommandExecutionApprovalDecision `json:"availableDecisions,omitempty"`
// The command to be executed.
Command *string `json:"command,omitempty"`
// Best-effort parsed command actions for friendly display.
CommandActions []CommandAction `json:"commandActions,omitempty"`
// The command's working directory.
Cwd *LegacyAppPathString `json:"cwd,omitempty"`
// Environment in which the command will run.
EnvironmentID *string `json:"environmentId,omitempty"`
ItemID string `json:"itemId"`
// Kind of action under review. Defaults to `command` for older servers.
Kind *CommandExecutionApprovalKind `json:"kind,omitempty"`
// Optional context for a managed-network approval prompt.
NetworkApprovalContext *NetworkApprovalContext `json:"networkApprovalContext,omitempty"`
// Optional proposed execpolicy amendment to allow similar commands without prompting.
ProposedExecpolicyAmendment []string `json:"proposedExecpolicyAmendment,omitempty"`
// Optional proposed network policy amendments (allow/deny host) for future requests.
ProposedNetworkPolicyAmendments []NetworkPolicyAmendment `json:"proposedNetworkPolicyAmendments,omitempty"`
// Optional explanatory reason (e.g. request for network access).
Reason *string `json:"reason,omitempty"`
// Unix timestamp (in milliseconds) when this approval request started.
StartedAtMs int64 `json:"startedAtMs"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
type CommandExecutionRequestApprovalResponse ¶
type CommandExecutionRequestApprovalResponse struct {
Decision CommandExecutionApprovalDecision `json:"decision"`
}
type CommandExecutionSource ¶
type CommandExecutionSource string
const ( CommandExecutionSourceAgent CommandExecutionSource = "agent" CommandExecutionSourceUnifiedExecInteraction CommandExecutionSource = "unifiedExecInteraction" CommandExecutionSourceUnifiedExecStartup CommandExecutionSource = "unifiedExecStartup" CommandExecutionSourceUserShell CommandExecutionSource = "userShell" )
type CommandExecutionStatus ¶
type CommandExecutionStatus string
const ( CommandExecutionStatusCompleted CommandExecutionStatus = "completed" CommandExecutionStatusDeclined CommandExecutionStatus = "declined" CommandExecutionStatusFailed CommandExecutionStatus = "failed" CommandExecutionStatusInProgress CommandExecutionStatus = "inProgress" )
type CommandExecutionThreadItem ¶
type CommandExecutionThreadItem struct {
// The command's output, aggregated from stdout and stderr.
AggregatedOutput *string `json:"aggregatedOutput,omitempty"`
// The command to be executed.
Command string `json:"command"`
// 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"`
// The command's working directory.
Cwd LegacyAppPathString `json:"cwd"`
// The duration of the command execution in milliseconds.
DurationMs *int64 `json:"durationMs,omitempty"`
// The command's exit code.
ExitCode *int64 `json:"exitCode,omitempty"`
ID string `json:"id"`
// Trusted first-party plugin id when this command resolves to one plugin script.
PluginID *string `json:"pluginId,omitempty"`
// Identifier for the underlying PTY process (when available).
ProcessID *string `json:"processId,omitempty"`
// Safe plugin-relative path when this command resolves to one plugin script.
ScriptPath *string `json:"scriptPath,omitempty"`
Source *CommandExecutionSource `json:"source,omitempty"`
Status CommandExecutionStatus `json:"status"`
}
func (CommandExecutionThreadItem) MarshalJSON ¶
func (v CommandExecutionThreadItem) MarshalJSON() ([]byte, error)
type CommitReviewTarget ¶
type CommitReviewTarget struct {
Sha string `json:"sha"`
// Optional human-readable label (e.g., commit subject) for UIs.
Title *string `json:"title,omitempty"`
}
Review the changes introduced by a specific commit.
type CompactionResponseItem ¶
type CompactionResponseItem struct {
EncryptedContent string `json:"encrypted_content"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
}
type CompactionTriggerResponseItem ¶
type CompactionTriggerResponseItem struct {
}
type ConfigWarningNotification ¶
type ConfigWarningNotification struct {
// Optional extra guidance or error details.
Details *string `json:"details,omitempty"`
// Optional path to the config file that triggered the warning.
Path *string `json:"path,omitempty"`
// Optional range for the error location inside the config file.
Range *TextRange `json:"range,omitempty"`
// Concise summary of the warning.
Summary string `json:"summary"`
}
type ConfigurationReasoning ¶
type ConfigurationReasoning struct {
Effort ReasoningEffort `json:"effort"`
}
Reasoning settings interpreted by the backend for the routed model.
type ConfigurationUpdateResponseItem ¶
type ConfigurationUpdateResponseItem struct {
Reasoning ConfigurationReasoning `json:"reasoning"`
}
A durable input control interpreted by the backend at its position in history.
type ContentItem ¶
type ContentItem struct {
// Tag is the value of the "type" property observed on decode.
Tag string
InputAudio *InputAudioContentItem
InputImage *InputImageContentItem
InputText *InputTextContentItem
OutputText *OutputTextContentItem
// contains filtered or unexported fields
}
ContentItem is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ContentItem) MarshalJSON ¶
func (u ContentItem) MarshalJSON() ([]byte, error)
func (ContentItem) Raw ¶
func (u ContentItem) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ContentItem) UnmarshalJSON ¶
func (u *ContentItem) UnmarshalJSON(data []byte) error
type ContextCompactedNotification
deprecated
type ContextCompactionResponseItem ¶
type ContextCompactionResponseItem struct {
EncryptedContent *string `json:"encrypted_content,omitempty"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
}
type ContextCompactionThreadItem ¶
type ContextCompactionThreadItem struct {
ID string `json:"id"`
}
type CreditsSnapshot ¶
type CustomReviewTarget ¶
type CustomReviewTarget struct {
Instructions string `json:"instructions"`
}
Arbitrary instructions, equivalent to the old free-form prompt.
type CustomToolCallOutputResponseItem ¶
type CustomToolCallOutputResponseItem struct {
CallID string `json:"call_id"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Name *string `json:"name,omitempty"`
Output rawMessage `json:"output"`
}
type CustomToolCallResponseItem ¶
type CustomToolCallResponseItem struct {
CallID string `json:"call_id"`
ID *string `json:"id,omitempty"`
Input string `json:"input"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Name string `json:"name"`
Namespace *string `json:"namespace,omitempty"`
Status *string `json:"status,omitempty"`
}
type CyberAccessProgram ¶
type CyberAccessProgram string
Requested cyber treatment for a ChatGPT-authenticated Codex turn. Authorization and model-tier restrictions remain server-owned.
const ( CyberAccessProgramDaybreakBlue CyberAccessProgram = "daybreakBlue" CyberAccessProgramDaybreakRed CyberAccessProgram = "daybreakRed" CyberAccessProgramStandard CyberAccessProgram = "standard" )
type DangerFullAccessSandboxPolicy ¶
type DangerFullAccessSandboxPolicy struct {
}
type DeletePatchChangeKind ¶
type DeletePatchChangeKind struct {
}
type DesktopOnboardingEntrypoint ¶
type DesktopOnboardingEntrypoint string
const (
DesktopOnboardingEntrypointLifeSciences DesktopOnboardingEntrypoint = "life_sciences"
)
type DynamicToolCallOutputContentItem ¶
type DynamicToolCallOutputContentItem struct {
// Tag is the value of the "type" property observed on decode.
Tag string
InputAudio *InputAudioDynamicToolCallOutputContentItem
InputImage *InputImageDynamicToolCallOutputContentItem
InputText *InputTextDynamicToolCallOutputContentItem
// contains filtered or unexported fields
}
DynamicToolCallOutputContentItem is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (DynamicToolCallOutputContentItem) MarshalJSON ¶
func (u DynamicToolCallOutputContentItem) MarshalJSON() ([]byte, error)
func (DynamicToolCallOutputContentItem) Raw ¶
func (u DynamicToolCallOutputContentItem) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*DynamicToolCallOutputContentItem) UnmarshalJSON ¶
func (u *DynamicToolCallOutputContentItem) UnmarshalJSON(data []byte) error
type DynamicToolCallStatus ¶
type DynamicToolCallStatus string
const ( DynamicToolCallStatusCompleted DynamicToolCallStatus = "completed" DynamicToolCallStatusFailed DynamicToolCallStatus = "failed" DynamicToolCallStatusInProgress DynamicToolCallStatus = "inProgress" )
type DynamicToolCallThreadItem ¶
type DynamicToolCallThreadItem struct {
Arguments any `json:"arguments"`
ContentItems []DynamicToolCallOutputContentItem `json:"contentItems,omitempty"`
// The duration of the dynamic tool call in milliseconds.
DurationMs *int64 `json:"durationMs,omitempty"`
ID string `json:"id"`
Namespace *string `json:"namespace,omitempty"`
Status DynamicToolCallStatus `json:"status"`
Success *bool `json:"success,omitempty"`
Tool string `json:"tool"`
}
type DynamicToolNamespaceTool ¶
type DynamicToolNamespaceTool struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Function *FunctionDynamicToolNamespaceTool
// contains filtered or unexported fields
}
DynamicToolNamespaceTool is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (DynamicToolNamespaceTool) MarshalJSON ¶
func (u DynamicToolNamespaceTool) MarshalJSON() ([]byte, error)
func (DynamicToolNamespaceTool) Raw ¶
func (u DynamicToolNamespaceTool) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*DynamicToolNamespaceTool) UnmarshalJSON ¶
func (u *DynamicToolNamespaceTool) UnmarshalJSON(data []byte) error
type DynamicToolSpec ¶
type DynamicToolSpec struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Function *FunctionDynamicToolSpec
Namespace *NamespaceDynamicToolSpec
// contains filtered or unexported fields
}
DynamicToolSpec is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (DynamicToolSpec) MarshalJSON ¶
func (u DynamicToolSpec) MarshalJSON() ([]byte, error)
func (DynamicToolSpec) Raw ¶
func (u DynamicToolSpec) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*DynamicToolSpec) UnmarshalJSON ¶
func (u *DynamicToolSpec) UnmarshalJSON(data []byte) error
type EncryptedContentAgentMessageInputContent ¶
type EncryptedContentAgentMessageInputContent struct {
EncryptedContent string `json:"encrypted_content"`
}
type EncryptedContentFunctionCallOutputContentItem ¶
type EncryptedContentFunctionCallOutputContentItem struct {
EncryptedContent string `json:"encrypted_content"`
}
type EnvironmentCapabilityRootLocation ¶
type EnvironmentCapabilityRootLocation struct {
EnvironmentID string `json:"environmentId"`
// Absolute path for the root in the selected environment.
Path string `json:"path"`
}
A path owned by an execution environment.
type ErrorNotification ¶
type ErrorResponse ¶
ErrorResponse rejects an app-server → Memoh request.
type ExecLocalShellAction ¶
type ExecLocalShellAction struct {
Command []string `json:"command"`
Env map[string]string `json:"env,omitempty"`
TimeoutMs *uint64 `json:"timeout_ms,omitempty"`
User *string `json:"user,omitempty"`
WorkingDirectory *string `json:"working_directory,omitempty"`
}
func (ExecLocalShellAction) MarshalJSON ¶
func (v ExecLocalShellAction) MarshalJSON() ([]byte, error)
type ExternalSandboxSandboxPolicy ¶
type ExternalSandboxSandboxPolicy struct {
NetworkAccess *NetworkAccess `json:"networkAccess,omitempty"`
}
type FileChangeApprovalDecision ¶
type FileChangeApprovalDecision string
const ( FileChangeApprovalDecisionAccept FileChangeApprovalDecision = "accept" FileChangeApprovalDecisionAcceptForSession FileChangeApprovalDecision = "acceptForSession" FileChangeApprovalDecisionCancel FileChangeApprovalDecision = "cancel" FileChangeApprovalDecisionDecline FileChangeApprovalDecision = "decline" )
type FileChangeOutputDeltaNotification ¶
type FileChangeOutputDeltaNotification struct {
Delta string `json:"delta"`
ItemID string `json:"itemId"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
Deprecated legacy notification for `apply_patch` textual output.
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 *string `json:"grantRoot,omitempty"`
ItemID string `json:"itemId"`
// Optional explanatory reason (e.g. request for extra write access).
Reason *string `json:"reason,omitempty"`
// Unix timestamp (in milliseconds) when this approval request started.
StartedAtMs int64 `json:"startedAtMs"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
type FileChangeRequestApprovalResponse ¶
type FileChangeRequestApprovalResponse struct {
Decision FileChangeApprovalDecision `json:"decision"`
}
type FileChangeThreadItem ¶
type FileChangeThreadItem struct {
Changes []FileUpdateChange `json:"changes"`
ID string `json:"id"`
Status PatchApplyStatus `json:"status"`
}
func (FileChangeThreadItem) MarshalJSON ¶
func (v FileChangeThreadItem) MarshalJSON() ([]byte, error)
type FileSystemAccessMode ¶
type FileSystemAccessMode string
const ( FileSystemAccessModeDeny FileSystemAccessMode = "deny" FileSystemAccessModeRead FileSystemAccessMode = "read" FileSystemAccessModeWrite FileSystemAccessMode = "write" )
type FileSystemPath ¶
type FileSystemPath struct {
// Tag is the value of the "type" property observed on decode.
Tag string
GlobPattern *GlobPatternFileSystemPath
Path *PathFileSystemPath
Special *SpecialFileSystemPath
// contains filtered or unexported fields
}
FileSystemPath is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (FileSystemPath) MarshalJSON ¶
func (u FileSystemPath) MarshalJSON() ([]byte, error)
func (FileSystemPath) Raw ¶
func (u FileSystemPath) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*FileSystemPath) UnmarshalJSON ¶
func (u *FileSystemPath) UnmarshalJSON(data []byte) error
type FileSystemSandboxEntry ¶
type FileSystemSandboxEntry struct {
Access FileSystemAccessMode `json:"access"`
Path FileSystemPath `json:"path"`
}
type FileSystemSpecialPath ¶
type FileSystemSpecialPath struct {
// Tag is the value of the "kind" property observed on decode.
Tag string
Minimal *MinimalFileSystemSpecialPath
ProjectRoots *KindFileSystemSpecialPath
Root *RootFileSystemSpecialPath
SlashTmp *SlashTmpFileSystemSpecialPath
Tmpdir *TmpdirFileSystemSpecialPath
Unknown *UnknownFileSystemSpecialPath
// contains filtered or unexported fields
}
FileSystemSpecialPath is an internally-tagged union (tag property "kind"). Unknown variants decode without error: only Tag and Raw() are populated.
func (FileSystemSpecialPath) MarshalJSON ¶
func (u FileSystemSpecialPath) MarshalJSON() ([]byte, error)
func (FileSystemSpecialPath) Raw ¶
func (u FileSystemSpecialPath) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*FileSystemSpecialPath) UnmarshalJSON ¶
func (u *FileSystemSpecialPath) UnmarshalJSON(data []byte) error
type FileUpdateChange ¶
type FileUpdateChange struct {
Diff string `json:"diff"`
Kind PatchChangeKind `json:"kind"`
Path string `json:"path"`
}
type FormMcpServerElicitationRequestParams ¶
type FormMcpServerElicitationRequestParams struct {
Meta any `json:"_meta,omitempty"`
Message string `json:"message"`
RequestedSchema McpElicitationSchema `json:"requestedSchema"`
}
type FunctionCallOutputContentItem ¶
type FunctionCallOutputContentItem struct {
// Tag is the value of the "type" property observed on decode.
Tag string
EncryptedContent *EncryptedContentFunctionCallOutputContentItem
InputAudio *InputAudioFunctionCallOutputContentItem
InputImage *InputImageFunctionCallOutputContentItem
InputText *InputTextFunctionCallOutputContentItem
// contains filtered or unexported fields
}
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 is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (FunctionCallOutputContentItem) MarshalJSON ¶
func (u FunctionCallOutputContentItem) MarshalJSON() ([]byte, error)
func (FunctionCallOutputContentItem) Raw ¶
func (u FunctionCallOutputContentItem) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*FunctionCallOutputContentItem) UnmarshalJSON ¶
func (u *FunctionCallOutputContentItem) UnmarshalJSON(data []byte) error
type FunctionCallOutputResponseItem ¶
type FunctionCallOutputResponseItem struct {
CallID *string `json:"call_id,omitempty"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
Output rawMessage `json:"output"`
}
type FunctionCallResponseItem ¶
type FunctionCallResponseItem struct {
Arguments string `json:"arguments"`
CallID string `json:"call_id"`
EncryptedFunctionArgs []string `json:"encrypted_function_args,omitempty"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Name string `json:"name"`
Namespace *string `json:"namespace,omitempty"`
}
type FunctionDynamicToolSpec ¶
type GetAccountParams ¶
type GetAccountParams struct {
// When `true`, requests a proactive token refresh before returning.
RefreshToken *bool `json:"refreshToken,omitempty"`
}
type GetAccountRateLimitsResponse ¶
type GetAccountRateLimitsResponse struct {
// Account associated with this usage snapshot, when supplied by the backend.
AccountID *string `json:"accountId,omitempty"`
// Backend permission for ordinary included usage, validated against the active account. Null means unavailable; clients must not infer recovery from percentages or reset times.
OrdinaryUsageAllowed *bool `json:"ordinaryUsageAllowed,omitempty"`
RateLimitResetCredits *RateLimitResetCreditsSummary `json:"rateLimitResetCredits,omitempty"`
// Optional backend-owned banner from the same usage read. Its nested keys retain the backend's snake_case contract; an absent banner leaves the client's existing UI unchanged.
RateLimitUpsell any `json:"rateLimitUpsell,omitempty"`
// Backward-compatible single-bucket view; mirrors the historical payload.
RateLimits RateLimitSnapshot `json:"rateLimits"`
// Multi-bucket view keyed by metered `limit_id` (for example, `codex`).
RateLimitsByLimitID map[string]RateLimitSnapshot `json:"rateLimitsByLimitId,omitempty"`
}
type GetAccountResponse ¶
type GlobPatternFileSystemPath ¶
type GlobPatternFileSystemPath struct {
Pattern string `json:"pattern"`
}
type GrantedPermissionProfile ¶
type GrantedPermissionProfile struct {
FileSystem *AdditionalFileSystemPermissions `json:"fileSystem,omitempty"`
Network *AdditionalNetworkPermissions `json:"network,omitempty"`
}
type HookPromptFragment ¶
type HookPromptThreadItem ¶
type HookPromptThreadItem struct {
Fragments []HookPromptFragment `json:"fragments"`
ID string `json:"id"`
}
func (HookPromptThreadItem) MarshalJSON ¶
func (v HookPromptThreadItem) MarshalJSON() ([]byte, error)
type IdleThreadStatus ¶
type IdleThreadStatus struct {
}
type ImageDetail ¶
type ImageDetail string
const ( ImageDetailAuto ImageDetail = "auto" ImageDetailHigh ImageDetail = "high" ImageDetailLow ImageDetail = "low" ImageDetailOriginal ImageDetail = "original" )
type ImageGenerationCallResponseItem ¶
type ImageGenerationCallResponseItem struct {
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Result string `json:"result"`
RevisedPrompt *string `json:"revised_prompt,omitempty"`
Status string `json:"status"`
}
type ImageGenerationFailure ¶
type ImageGenerationFailure struct {
// Tag is the value of the "type" property observed on decode.
Tag string
UsageLimitExceeded *UsageLimitExceededImageGenerationFailure
// contains filtered or unexported fields
}
ImageGenerationFailure is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ImageGenerationFailure) MarshalJSON ¶
func (u ImageGenerationFailure) MarshalJSON() ([]byte, error)
func (ImageGenerationFailure) Raw ¶
func (u ImageGenerationFailure) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ImageGenerationFailure) UnmarshalJSON ¶
func (u *ImageGenerationFailure) UnmarshalJSON(data []byte) error
type ImageGenerationThreadItem ¶
type ImageGenerationThreadItem struct {
Failure *ImageGenerationFailure `json:"failure,omitempty"`
ID string `json:"id"`
Result string `json:"result"`
RevisedPrompt *string `json:"revisedPrompt,omitempty"`
SavedPath *AbsolutePathBuf `json:"savedPath,omitempty"`
Status string `json:"status"`
TransparentBackground *bool `json:"transparentBackground,omitempty"`
}
type ImageUserInput ¶
type ImageUserInput struct {
Detail *ImageDetail `json:"detail,omitempty"`
URL string `json:"url"`
}
type ImageViewThreadItem ¶
type ImageViewThreadItem struct {
ID string `json:"id"`
Path LegacyAppPathString `json:"path"`
}
type Inbound ¶
type Inbound struct {
Kind InboundKind
ID RequestID // requests and responses
Method string // requests and notifications
Params json.RawMessage // requests and notifications
Result json.RawMessage // successful responses
Err *RPCError // failed responses
Raw json.RawMessage // the full original line
}
Inbound is one decoded line from the app-server stream.
func DecodeInbound ¶
DecodeInbound classifies one NDJSON line from the app-server.
type InboundKind ¶
type InboundKind int
InboundKind classifies a line received from the app-server.
const ( // InboundResponse answers one of our requests. InboundResponse InboundKind = iota + 1 // InboundRequest is a server → client request that expects a Response. InboundRequest // InboundNotification is fire-and-forget. InboundNotification )
type InitializeCapabilities ¶
type InitializeCapabilities struct {
// Opt into receiving experimental API methods and fields.
ExperimentalAPI *bool `json:"experimentalApi,omitempty"`
// MCP extension settings declared by the app-server client.
Extensions map[string]any `json:"extensions,omitempty"`
// Legacy opt-in for the `openai/form` MCP extension.
MCPServerOpenaiFormElicitation *bool `json:"mcpServerOpenaiFormElicitation,omitempty"`
// Exact notification method names that should be suppressed for this connection (for example `thread/started`).
OptOutNotificationMethods []string `json:"optOutNotificationMethods,omitempty"`
// Opt into `attestation/generate` requests for upstream `x-oai-attestation`.
RequestAttestation *bool `json:"requestAttestation,omitempty"`
}
Client-declared capabilities negotiated during initialize.
type InitializeParams ¶
type InitializeParams struct {
Capabilities *InitializeCapabilities `json:"capabilities,omitempty"`
ClientInfo ClientInfo `json:"clientInfo"`
}
type InitializeResponse ¶
type InitializeResponse struct {
UserAgent string `json:"userAgent"`
CodexHome string `json:"codexHome"`
PlatformFamily string `json:"platformFamily"`
PlatformOS string `json:"platformOs"`
}
InitializeResponse is the app-server's answer to `initialize`. It belongs to the version-independent bootstrap layer, which is why it is not part of the generated v2 surface.
type InputAudioContentItem ¶
type InputAudioContentItem struct {
AudioURL string `json:"audio_url"`
}
type InputAudioDynamicToolCallOutputContentItem ¶
type InputAudioDynamicToolCallOutputContentItem struct {
AudioURL string `json:"audioUrl"`
}
type InputAudioFunctionCallOutputContentItem ¶
type InputAudioFunctionCallOutputContentItem struct {
AudioURL string `json:"audio_url"`
}
type InputImageContentItem ¶
type InputImageContentItem struct {
Detail *ImageDetail `json:"detail,omitempty"`
ImageURL string `json:"image_url"`
}
type InputImageDynamicToolCallOutputContentItem ¶
type InputImageDynamicToolCallOutputContentItem struct {
ImageURL string `json:"imageUrl"`
}
type InputImageFunctionCallOutputContentItem ¶
type InputImageFunctionCallOutputContentItem struct {
Detail *ImageDetail `json:"detail,omitempty"`
ImageURL string `json:"image_url"`
}
type InputModality ¶
type InputModality string
Canonical user-input modality tags advertised by a model.
const ( InputModalityAudio InputModality = "audio" InputModalityImage InputModality = "image" InputModalityText InputModality = "text" )
type InputTextAgentMessageInputContent ¶
type InputTextAgentMessageInputContent struct {
Text string `json:"text"`
}
type InputTextContentItem ¶
type InputTextContentItem struct {
Text string `json:"text"`
}
type InputTextDynamicToolCallOutputContentItem ¶
type InputTextDynamicToolCallOutputContentItem struct {
Text string `json:"text"`
}
type InputTextFunctionCallOutputContentItem ¶
type InputTextFunctionCallOutputContentItem struct {
Text string `json:"text"`
}
type InternalChatMessageMetadataPassthrough ¶
type InternalChatMessageMetadataPassthrough struct {
TurnID *string `json:"turn_id,omitempty"`
}
Internal Responses API passthrough metadata copied into underlying chat messages.
type ItemCompletedNotification ¶
type ItemCompletedNotification struct {
// Unix timestamp (in milliseconds) when this item lifecycle completed.
CompletedAtMs int64 `json:"completedAtMs"`
Item ThreadItem `json:"item"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
type ItemStartedNotification ¶
type ItemStartedNotification struct {
Item ThreadItem `json:"item"`
// Unix timestamp (in milliseconds) when this item lifecycle started.
StartedAtMs int64 `json:"startedAtMs"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
type KindFileSystemSpecialPath ¶
type KindFileSystemSpecialPath struct {
Subpath *LegacyAppPathString `json:"subpath,omitempty"`
}
type LegacyAppPathString ¶
type LegacyAppPathString = string
type ListFilesCommandAction ¶
type ListMcpServerStatusParams ¶
type ListMcpServerStatusParams struct {
// Opaque pagination cursor returned by a previous call.
Cursor *string `json:"cursor,omitempty"`
// Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted.
Detail *McpServerStatusDetail `json:"detail,omitempty"`
// Optional page size; defaults to a server-defined value.
Limit *uint64 `json:"limit,omitempty"`
ThreadID *string `json:"threadId,omitempty"`
}
type ListMcpServerStatusResponse ¶
type ListMcpServerStatusResponse struct {
Data []McpServerStatus `json:"data"`
// Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.
NextCursor *string `json:"nextCursor,omitempty"`
}
func (ListMcpServerStatusResponse) MarshalJSON ¶
func (v ListMcpServerStatusResponse) MarshalJSON() ([]byte, error)
type LocalAudioUserInput ¶
type LocalAudioUserInput struct {
Path string `json:"path"`
}
type LocalImageUserInput ¶
type LocalImageUserInput struct {
Detail *ImageDetail `json:"detail,omitempty"`
Path string `json:"path"`
}
type LocalShellAction ¶
type LocalShellAction struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Exec *ExecLocalShellAction
// contains filtered or unexported fields
}
LocalShellAction is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (LocalShellAction) MarshalJSON ¶
func (u LocalShellAction) MarshalJSON() ([]byte, error)
func (LocalShellAction) Raw ¶
func (u LocalShellAction) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*LocalShellAction) UnmarshalJSON ¶
func (u *LocalShellAction) UnmarshalJSON(data []byte) error
type LocalShellCallResponseItem ¶
type LocalShellCallResponseItem struct {
Action LocalShellAction `json:"action"`
// Set when using the Responses API.
CallID *string `json:"call_id,omitempty"`
// Legacy id field retained for compatibility with older payloads.
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Status LocalShellStatus `json:"status"`
}
type LocalShellStatus ¶
type LocalShellStatus string
const ( LocalShellStatusCompleted LocalShellStatus = "completed" LocalShellStatusInProgress LocalShellStatus = "in_progress" LocalShellStatusIncomplete LocalShellStatus = "incomplete" )
type LoginAccountParams ¶
type LoginAccountParams struct {
// Tag is the value of the "type" property observed on decode.
Tag string
AmazonBedrock *AmazonBedrockLoginAccountParams
AmazonBedrockAccessKeys *AmazonBedrockAccessKeysLoginAccountParams
APIKey *APIKeyLoginAccountParams
Chatgpt *ChatgptLoginAccountParams
ChatgptAuthTokens *ChatgptAuthTokensLoginAccountParams
ChatgptDeviceCode *ChatgptDeviceCodeLoginAccountParams
// contains filtered or unexported fields
}
LoginAccountParams is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (LoginAccountParams) MarshalJSON ¶
func (u LoginAccountParams) MarshalJSON() ([]byte, error)
func (LoginAccountParams) Raw ¶
func (u LoginAccountParams) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*LoginAccountParams) UnmarshalJSON ¶
func (u *LoginAccountParams) UnmarshalJSON(data []byte) error
type LoginAccountResponse ¶
type LoginAccountResponse struct {
// Tag is the value of the "type" property observed on decode.
Tag string
AmazonBedrock *AmazonBedrockLoginAccountResponse
APIKey *APIKeyLoginAccountResponse
Chatgpt *ChatgptLoginAccountResponse
ChatgptAuthTokens *ChatgptAuthTokensLoginAccountResponse
ChatgptDeviceCode *ChatgptDeviceCodeLoginAccountResponse
// contains filtered or unexported fields
}
LoginAccountResponse is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (LoginAccountResponse) MarshalJSON ¶
func (u LoginAccountResponse) MarshalJSON() ([]byte, error)
func (LoginAccountResponse) Raw ¶
func (u LoginAccountResponse) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*LoginAccountResponse) UnmarshalJSON ¶
func (u *LoginAccountResponse) UnmarshalJSON(data []byte) error
type LoginAppBrand ¶
type LoginAppBrand string
const ( LoginAppBrandChatgpt LoginAppBrand = "chatgpt" LoginAppBrandCodex LoginAppBrand = "codex" )
type LogoutAccountResponse ¶
type LogoutAccountResponse struct {
}
type McpAuthStatus ¶
type McpAuthStatus string
const ( McpAuthStatusBearerToken McpAuthStatus = "bearerToken" McpAuthStatusNotLoggedIn McpAuthStatus = "notLoggedIn" McpAuthStatusOAuth McpAuthStatus = "oAuth" McpAuthStatusUnknown McpAuthStatus = "unknown" McpAuthStatusUnsupported McpAuthStatus = "unsupported" )
type McpElicitationArrayType ¶
type McpElicitationArrayType string
const (
McpElicitationArrayTypeArray McpElicitationArrayType = "array"
)
type McpElicitationBooleanSchema ¶
type McpElicitationBooleanSchema struct {
Default *bool `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Title *string `json:"title,omitempty"`
Type McpElicitationBooleanType `json:"type"`
}
type McpElicitationBooleanType ¶
type McpElicitationBooleanType string
const (
McpElicitationBooleanTypeBoolean McpElicitationBooleanType = "boolean"
)
type McpElicitationEnumSchema ¶
type McpElicitationEnumSchema = rawMessage
McpElicitationEnumSchema is an untagged union with no discriminator; decode the raw JSON into one of: McpElicitationSingleSelectEnumSchema, McpElicitationMultiSelectEnumSchema, McpElicitationLegacyTitledEnumSchema.
type McpElicitationLegacyTitledEnumSchema ¶
type McpElicitationLegacyTitledEnumSchema struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Enum []string `json:"enum"`
EnumNames []string `json:"enumNames,omitempty"`
Title *string `json:"title,omitempty"`
Type McpElicitationStringType `json:"type"`
}
func (McpElicitationLegacyTitledEnumSchema) MarshalJSON ¶
func (v McpElicitationLegacyTitledEnumSchema) MarshalJSON() ([]byte, error)
type McpElicitationMultiSelectEnumSchema ¶
type McpElicitationMultiSelectEnumSchema = rawMessage
McpElicitationMultiSelectEnumSchema is an untagged union with no discriminator; decode the raw JSON into one of: McpElicitationUntitledMultiSelectEnumSchema, McpElicitationTitledMultiSelectEnumSchema.
type McpElicitationNumberSchema ¶
type McpElicitationNumberSchema struct {
Default *float64 `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Title *string `json:"title,omitempty"`
Type McpElicitationNumberType `json:"type"`
}
type McpElicitationNumberType ¶
type McpElicitationNumberType string
const ( McpElicitationNumberTypeInteger McpElicitationNumberType = "integer" McpElicitationNumberTypeNumber McpElicitationNumberType = "number" )
type McpElicitationObjectType ¶
type McpElicitationObjectType string
const (
McpElicitationObjectTypeObject McpElicitationObjectType = "object"
)
type McpElicitationPrimitiveSchema ¶
type McpElicitationPrimitiveSchema = rawMessage
McpElicitationPrimitiveSchema is an untagged union with no discriminator; decode the raw JSON into one of: McpElicitationEnumSchema, McpElicitationStringSchema, McpElicitationNumberSchema, McpElicitationBooleanSchema.
type McpElicitationSchema ¶
type McpElicitationSchema struct {
Schema *string `json:"$schema,omitempty"`
Properties map[string]McpElicitationPrimitiveSchema `json:"properties"`
Required []string `json:"required,omitempty"`
Type McpElicitationObjectType `json:"type"`
}
Typed form schema for MCP `elicitation/create` requests.
func (McpElicitationSchema) MarshalJSON ¶
func (v McpElicitationSchema) MarshalJSON() ([]byte, error)
type McpElicitationSingleSelectEnumSchema ¶
type McpElicitationSingleSelectEnumSchema = rawMessage
McpElicitationSingleSelectEnumSchema is an untagged union with no discriminator; decode the raw JSON into one of: McpElicitationUntitledSingleSelectEnumSchema, McpElicitationTitledSingleSelectEnumSchema.
type McpElicitationStringFormat ¶
type McpElicitationStringFormat string
const ( McpElicitationStringFormatDate McpElicitationStringFormat = "date" McpElicitationStringFormatDateTime McpElicitationStringFormat = "date-time" McpElicitationStringFormatEmail McpElicitationStringFormat = "email" McpElicitationStringFormatURI McpElicitationStringFormat = "uri" )
type McpElicitationStringSchema ¶
type McpElicitationStringSchema struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Format *McpElicitationStringFormat `json:"format,omitempty"`
MaxLength *uint64 `json:"maxLength,omitempty"`
MinLength *uint64 `json:"minLength,omitempty"`
Title *string `json:"title,omitempty"`
Type McpElicitationStringType `json:"type"`
}
type McpElicitationStringType ¶
type McpElicitationStringType string
const (
McpElicitationStringTypeString McpElicitationStringType = "string"
)
type McpElicitationTitledEnumItems ¶
type McpElicitationTitledEnumItems struct {
AnyOf []McpElicitationConstOption `json:"anyOf"`
}
func (McpElicitationTitledEnumItems) MarshalJSON ¶
func (v McpElicitationTitledEnumItems) MarshalJSON() ([]byte, error)
type McpElicitationTitledMultiSelectEnumSchema ¶
type McpElicitationTitledMultiSelectEnumSchema struct {
Default []string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Items McpElicitationTitledEnumItems `json:"items"`
MaxItems *uint64 `json:"maxItems,omitempty"`
MinItems *uint64 `json:"minItems,omitempty"`
Title *string `json:"title,omitempty"`
Type McpElicitationArrayType `json:"type"`
}
type McpElicitationTitledSingleSelectEnumSchema ¶
type McpElicitationTitledSingleSelectEnumSchema struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
OneOf []McpElicitationConstOption `json:"oneOf"`
Title *string `json:"title,omitempty"`
Type McpElicitationStringType `json:"type"`
}
func (McpElicitationTitledSingleSelectEnumSchema) MarshalJSON ¶
func (v McpElicitationTitledSingleSelectEnumSchema) MarshalJSON() ([]byte, error)
type McpElicitationUntitledEnumItems ¶
type McpElicitationUntitledEnumItems struct {
Enum []string `json:"enum"`
Type McpElicitationStringType `json:"type"`
}
func (McpElicitationUntitledEnumItems) MarshalJSON ¶
func (v McpElicitationUntitledEnumItems) MarshalJSON() ([]byte, error)
type McpElicitationUntitledMultiSelectEnumSchema ¶
type McpElicitationUntitledMultiSelectEnumSchema struct {
Default []string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Items McpElicitationUntitledEnumItems `json:"items"`
MaxItems *uint64 `json:"maxItems,omitempty"`
MinItems *uint64 `json:"minItems,omitempty"`
Title *string `json:"title,omitempty"`
Type McpElicitationArrayType `json:"type"`
}
type McpElicitationUntitledSingleSelectEnumSchema ¶
type McpElicitationUntitledSingleSelectEnumSchema struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Enum []string `json:"enum"`
Title *string `json:"title,omitempty"`
Type McpElicitationStringType `json:"type"`
}
func (McpElicitationUntitledSingleSelectEnumSchema) MarshalJSON ¶
func (v McpElicitationUntitledSingleSelectEnumSchema) MarshalJSON() ([]byte, error)
type McpServerConnectionStatus ¶
type McpServerConnectionStatus string
const ( McpServerConnectionStatusAuthenticationRequired McpServerConnectionStatus = "authenticationRequired" McpServerConnectionStatusCancelled McpServerConnectionStatus = "cancelled" McpServerConnectionStatusConnected McpServerConnectionStatus = "connected" McpServerConnectionStatusDisabled McpServerConnectionStatus = "disabled" McpServerConnectionStatusFailed McpServerConnectionStatus = "failed" McpServerConnectionStatusNotStarted McpServerConnectionStatus = "notStarted" McpServerConnectionStatusStarting McpServerConnectionStatus = "starting" )
type McpServerElicitationAction ¶
type McpServerElicitationAction string
const ( McpServerElicitationActionAccept McpServerElicitationAction = "accept" McpServerElicitationActionCancel McpServerElicitationAction = "cancel" McpServerElicitationActionDecline McpServerElicitationAction = "decline" )
type McpServerElicitationRequestParams ¶
type McpServerElicitationRequestParams struct {
// Tag is the value of the "mode" property observed on decode.
Tag string
Form *FormMcpServerElicitationRequestParams
OpenaiForm *OpenaiFormMcpServerElicitationRequestParams
OpenaiUserVerification *OpenaiUserVerificationMcpServerElicitationRequestParams
OpenaiFormCamelCase *OpenaiFormCamelCaseMcpServerElicitationRequestParams
URL *URLMcpServerElicitationRequestParams
// contains filtered or unexported fields
}
McpServerElicitationRequestParams is an internally-tagged union (tag property "mode"). Unknown variants decode without error: only Tag and Raw() are populated.
func (McpServerElicitationRequestParams) MarshalJSON ¶
func (u McpServerElicitationRequestParams) MarshalJSON() ([]byte, error)
func (McpServerElicitationRequestParams) Raw ¶
func (u McpServerElicitationRequestParams) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*McpServerElicitationRequestParams) UnmarshalJSON ¶
func (u *McpServerElicitationRequestParams) UnmarshalJSON(data []byte) error
type McpServerElicitationRequestResponse ¶
type McpServerElicitationRequestResponse struct {
// Optional client metadata for form-mode action handling.
Meta any `json:"_meta,omitempty"`
Action McpServerElicitationAction `json:"action"`
// Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.
Content any `json:"content,omitempty"`
}
type McpServerInfo ¶
type McpServerInfo struct {
Description *string `json:"description,omitempty"`
Icons []any `json:"icons,omitempty"`
Name string `json:"name"`
Title *string `json:"title,omitempty"`
Version string `json:"version"`
WebsiteURL *string `json:"websiteUrl,omitempty"`
}
Presentation metadata advertised by an initialized MCP server.
type McpServerStatus ¶
type McpServerStatus struct {
AuthStatus McpAuthStatus `json:"authStatus"`
Name string `json:"name"`
PluginID *string `json:"pluginId,omitempty"`
ResourceTemplates []ResourceTemplate `json:"resourceTemplates"`
Resources []Resource `json:"resources"`
// Current thread-runtime connection state; null when unavailable or the configuration changed.
RuntimeStatus *McpServerConnectionStatus `json:"runtimeStatus,omitempty"`
ServerInfo *McpServerInfo `json:"serverInfo,omitempty"`
Tools map[string]Tool `json:"tools"`
// Tool discovery failed and no catalog was returned. Null when a catalog is returned, including cached or empty catalogs.
ToolsError *string `json:"toolsError,omitempty"`
}
func (McpServerStatus) MarshalJSON ¶
func (v McpServerStatus) MarshalJSON() ([]byte, error)
type McpServerStatusDetail ¶
type McpServerStatusDetail string
const ( McpServerStatusDetailFull McpServerStatusDetail = "full" McpServerStatusDetailToolsAndAuthOnly McpServerStatusDetail = "toolsAndAuthOnly" )
type McpToolCallAppContext ¶
type McpToolCallError ¶
type McpToolCallError struct {
Message string `json:"message"`
}
type McpToolCallResult ¶
type McpToolCallResult struct {
Meta any `json:"_meta,omitempty"`
Content []any `json:"content"`
StructuredContent any `json:"structuredContent,omitempty"`
}
func (McpToolCallResult) MarshalJSON ¶
func (v McpToolCallResult) MarshalJSON() ([]byte, error)
type McpToolCallStatus ¶
type McpToolCallStatus string
const ( McpToolCallStatusCompleted McpToolCallStatus = "completed" McpToolCallStatusFailed McpToolCallStatus = "failed" McpToolCallStatusInProgress McpToolCallStatus = "inProgress" )
type McpToolCallThreadItem ¶
type McpToolCallThreadItem struct {
AppContext *McpToolCallAppContext `json:"appContext,omitempty"`
Arguments any `json:"arguments"`
// The duration of the MCP tool call in milliseconds.
DurationMs *int64 `json:"durationMs,omitempty"`
Error *McpToolCallError `json:"error,omitempty"`
ID string `json:"id"`
// Deprecated: use `appContext.resourceUri` instead.
MCPAppResourceURI *string `json:"mcpAppResourceUri,omitempty"`
PluginID *string `json:"pluginId,omitempty"`
ReadOnlyHint *bool `json:"readOnlyHint,omitempty"`
Result *McpToolCallResult `json:"result,omitempty"`
Server string `json:"server"`
Status McpToolCallStatus `json:"status"`
Tool string `json:"tool"`
}
type MemoryCitation ¶
type MemoryCitation struct {
Entries []MemoryCitationEntry `json:"entries"`
ThreadIds []string `json:"threadIds"`
}
func (MemoryCitation) MarshalJSON ¶
func (v MemoryCitation) MarshalJSON() ([]byte, error)
type MemoryCitationEntry ¶
type MentionUserInput ¶
type MessagePhase ¶
type MessagePhase string
Classifies an assistant message as interim commentary or final answer text.
const ( MessagePhaseCommentary MessagePhase = "commentary" MessagePhaseFinalAnswer MessagePhase = "final_answer" )
type MessageResponseItem ¶
type MessageResponseItem struct {
Content []ContentItem `json:"content"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Phase *MessagePhase `json:"phase,omitempty"`
Role string `json:"role"`
}
func (MessageResponseItem) MarshalJSON ¶
func (v MessageResponseItem) MarshalJSON() ([]byte, error)
type MinimalFileSystemSpecialPath ¶
type MinimalFileSystemSpecialPath struct {
}
type MisalignmentErrorDetails ¶
type MisalignmentErrorDetails struct {
// A substantive localized explanation is required before offering continuation.
DetailedExplanation *string `json:"detailedExplanation,omitempty"`
// Open-ended classification; clients must accept categories added by Responses.
ErrorType *string `json:"errorType,omitempty"`
// Instruction to submit as the next turn's user input if continuation is confirmed.
Steer *MisalignmentSteer `json:"steer,omitempty"`
}
type MisalignmentSteer ¶
type MisalignmentSteer struct {
Message string `json:"message"`
}
type Model ¶
type Model struct {
// Deprecated: use `serviceTiers` instead.
AdditionalSpeedTiers []string `json:"additionalSpeedTiers,omitempty"`
AvailabilityNux *ModelAvailabilityNux `json:"availabilityNux,omitempty"`
DefaultReasoningEffort ReasoningEffort `json:"defaultReasoningEffort"`
// Catalog default service tier id for this model, when one is configured.
DefaultServiceTier *string `json:"defaultServiceTier,omitempty"`
Description string `json:"description"`
DisplayName string `json:"displayName"`
Hidden bool `json:"hidden"`
ID string `json:"id"`
InputModalities []InputModality `json:"inputModalities,omitempty"`
IsDefault bool `json:"isDefault"`
Model string `json:"model"`
ModelSpecialty *string `json:"modelSpecialty,omitempty"`
// Multi-agent runtime declared by this model, when available.
MultiAgentVersion *MultiAgentVersion `json:"multiAgentVersion,omitempty"`
ServiceTiers []ModelServiceTier `json:"serviceTiers,omitempty"`
SupportedReasoningEfforts []ReasoningEffortOption `json:"supportedReasoningEfforts"`
SupportsPersonality *bool `json:"supportsPersonality,omitempty"`
Upgrade *string `json:"upgrade,omitempty"`
UpgradeInfo *ModelUpgradeInfo `json:"upgradeInfo,omitempty"`
}
func (Model) MarshalJSON ¶
type ModelAvailabilityNux ¶
type ModelAvailabilityNux struct {
Message string `json:"message"`
}
type ModelListParams ¶
type ModelListParams struct {
// Opaque pagination cursor returned by a previous call.
Cursor *string `json:"cursor,omitempty"`
// When true, include models that are hidden from the default picker list.
IncludeHidden *bool `json:"includeHidden,omitempty"`
// Optional page size; defaults to a reasonable server-side value.
Limit *uint64 `json:"limit,omitempty"`
}
type ModelListResponse ¶
type ModelListResponse struct {
Data []Model `json:"data"`
// Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.
NextCursor *string `json:"nextCursor,omitempty"`
}
func (ModelListResponse) MarshalJSON ¶
func (v ModelListResponse) MarshalJSON() ([]byte, error)
type ModelServiceTier ¶
type ModelUpgradeInfo ¶
type ModelUpgradeInfo struct {
MigrationMarkdown *string `json:"migrationMarkdown,omitempty"`
Model string `json:"model"`
ModelLink *string `json:"modelLink,omitempty"`
// Informational Unix timestamp for this upgrade's scheduled retirement, if known.
RetirementAt *int64 `json:"retirementAt,omitempty"`
UpgradeCopy *string `json:"upgradeCopy,omitempty"`
}
type MultiAgentMode ¶
type MultiAgentMode struct {
// Unit holds the bare-string variant value, if that form was used.
Unit string
Custom *string
// contains filtered or unexported fields
}
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 is a mixed union: on the wire it is either a bare string (Unit) or a single-key object (one payload field set). Unknown variants decode without error and are retained in Raw().
func (MultiAgentMode) MarshalJSON ¶
func (u MultiAgentMode) MarshalJSON() ([]byte, error)
func (MultiAgentMode) Raw ¶
func (u MultiAgentMode) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*MultiAgentMode) UnmarshalJSON ¶
func (u *MultiAgentMode) UnmarshalJSON(data []byte) error
type MultiAgentVersion ¶
type MultiAgentVersion string
Multi-agent runtime supported by a model.
const ( MultiAgentVersionDisabled MultiAgentVersion = "disabled" MultiAgentVersionV1 MultiAgentVersion = "v1" MultiAgentVersionV2 MultiAgentVersion = "v2" )
type NamespaceDynamicToolSpec ¶
type NamespaceDynamicToolSpec struct {
Description string `json:"description"`
Name string `json:"name"`
Tools []DynamicToolNamespaceTool `json:"tools"`
}
func (NamespaceDynamicToolSpec) MarshalJSON ¶
func (v NamespaceDynamicToolSpec) MarshalJSON() ([]byte, error)
type NetworkAccess ¶
type NetworkAccess string
const ( NetworkAccessEnabled NetworkAccess = "enabled" NetworkAccessRestricted NetworkAccess = "restricted" )
type NetworkApprovalContext ¶
type NetworkApprovalContext struct {
Host string `json:"host"`
Protocol NetworkApprovalProtocol `json:"protocol"`
}
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"`
Host string `json:"host"`
}
type NetworkPolicyRuleAction ¶
type NetworkPolicyRuleAction string
const ( NetworkPolicyRuleActionAllow NetworkPolicyRuleAction = "allow" NetworkPolicyRuleActionDeny NetworkPolicyRuleAction = "deny" )
type NonSteerableTurnKind ¶
type NonSteerableTurnKind string
const ( NonSteerableTurnKindCompact NonSteerableTurnKind = "compact" NonSteerableTurnKindReview NonSteerableTurnKind = "review" )
type NotLoadedThreadStatus ¶
type NotLoadedThreadStatus struct {
}
type Notification ¶
Notification is an outbound Memoh → app-server notification.
func (Notification) MarshalJSON ¶
func (n Notification) MarshalJSON() ([]byte, error)
type OpenPageResponsesApiWebSearchAction ¶
type OpenPageResponsesApiWebSearchAction struct {
URL *string `json:"url,omitempty"`
}
type OpenPageWebSearchAction ¶
type OpenPageWebSearchAction struct {
URL *string `json:"url,omitempty"`
}
type OpenaiUserVerificationMcpServerElicitationRequestParams ¶
type OpenaiUserVerificationMcpServerElicitationRequestParams struct {
Challenge string `json:"challenge"`
Description string `json:"description"`
Title string `json:"title"`
}
A device-authenticated approval; accepted responses contain the proof in `content`.
type OtherResponseItem ¶
type OtherResponseItem struct {
}
type OtherResponsesApiWebSearchAction ¶
type OtherResponsesApiWebSearchAction struct {
}
type OtherWebSearchAction ¶
type OtherWebSearchAction struct {
}
type OutputTextContentItem ¶
type OutputTextContentItem struct {
Text string `json:"text"`
}
type PatchApplyStatus ¶
type PatchApplyStatus string
const ( PatchApplyStatusCompleted PatchApplyStatus = "completed" PatchApplyStatusDeclined PatchApplyStatus = "declined" PatchApplyStatusFailed PatchApplyStatus = "failed" PatchApplyStatusInProgress PatchApplyStatus = "inProgress" )
type PatchChangeKind ¶
type PatchChangeKind struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Add *AddPatchChangeKind
Delete *DeletePatchChangeKind
Update *UpdatePatchChangeKind
// contains filtered or unexported fields
}
PatchChangeKind is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (PatchChangeKind) MarshalJSON ¶
func (u PatchChangeKind) MarshalJSON() ([]byte, error)
func (PatchChangeKind) Raw ¶
func (u PatchChangeKind) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*PatchChangeKind) UnmarshalJSON ¶
func (u *PatchChangeKind) UnmarshalJSON(data []byte) error
type PathFileSystemPath ¶
type PathFileSystemPath struct {
Path LegacyAppPathString `json:"path"`
}
type PermissionGrantScope ¶
type PermissionGrantScope string
const ( PermissionGrantScopeSession PermissionGrantScope = "session" PermissionGrantScopeTurn PermissionGrantScope = "turn" )
type PermissionsRequestApprovalParams ¶
type PermissionsRequestApprovalParams struct {
Cwd LegacyAppPathString `json:"cwd"`
EnvironmentID *string `json:"environmentId,omitempty"`
ItemID string `json:"itemId"`
Permissions RequestPermissionProfile `json:"permissions"`
Reason *string `json:"reason,omitempty"`
// Unix timestamp (in milliseconds) when this approval request started.
StartedAtMs int64 `json:"startedAtMs"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
type PermissionsRequestApprovalResponse ¶
type PermissionsRequestApprovalResponse struct {
Permissions GrantedPermissionProfile `json:"permissions"`
Scope *PermissionGrantScope `json:"scope,omitempty"`
// Review every subsequent command in this turn before normal sandboxed execution.
StrictAutoReview *bool `json:"strictAutoReview,omitempty"`
}
type Personality ¶
type Personality string
const ( PersonalityFriendly Personality = "friendly" PersonalityNone Personality = "none" PersonalityPragmatic Personality = "pragmatic" )
type PlanThreadItem ¶
EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.
type PlanType ¶
type PlanType string
const ( PlanTypeBusiness PlanType = "business" PlanTypeEdu PlanType = "edu" PlanTypeEduPlus PlanType = "edu_plus" PlanTypeEduPro PlanType = "edu_pro" PlanTypeEnt26 PlanType = "ent26" PlanTypeEnterprise PlanType = "enterprise" PlanTypeEnterpriseCbpAutomation PlanType = "enterprise_cbp_automation" PlanTypeEnterpriseCbpUsageBased PlanType = "enterprise_cbp_usage_based" PlanTypeFree PlanType = "free" PlanTypeGo PlanType = "go" PlanTypePlus PlanType = "plus" PlanTypePro PlanType = "pro" PlanTypeProlite PlanType = "prolite" PlanTypeSelfServeBusinessProlite PlanType = "self_serve_business_prolite" PlanTypeSelfServeBusinessUsageBased PlanType = "self_serve_business_usage_based" PlanTypeTeam PlanType = "team" PlanTypeUnknown PlanType = "unknown" )
type RPCError ¶
type RPCError struct {
Code int64 `json:"code"`
Message string `json:"message"`
Data json.RawMessage `json:"data,omitempty"`
}
RPCError is the JSON-RPC error object. Codes are not enumerated by the schema; treat them as opaque and rely on CodexErrorInfo where present.
type RateLimitReachedType ¶
type RateLimitReachedType string
const ( RateLimitReachedTypeRateLimitReached RateLimitReachedType = "rate_limit_reached" RateLimitReachedTypeWorkspaceMemberCreditsDepleted RateLimitReachedType = "workspace_member_credits_depleted" RateLimitReachedTypeWorkspaceMemberUsageLimitReached RateLimitReachedType = "workspace_member_usage_limit_reached" RateLimitReachedTypeWorkspaceOwnerCreditsDepleted RateLimitReachedType = "workspace_owner_credits_depleted" RateLimitReachedTypeWorkspaceOwnerUsageLimitReached RateLimitReachedType = "workspace_owner_usage_limit_reached" )
type RateLimitResetCredit ¶
type RateLimitResetCredit struct {
// Backend-provided display description for this credit, or `null` when unavailable.
Description *string `json:"description,omitempty"`
// Unix timestamp in seconds when the credit expires, or `null` if it does not expire.
ExpiresAt *int64 `json:"expiresAt,omitempty"`
// Unix timestamp in seconds when the credit was granted.
GrantedAt int64 `json:"grantedAt"`
// Opaque backend identifier for this reset credit.
ID string `json:"id"`
ResetType RateLimitResetType `json:"resetType"`
Status RateLimitResetCreditStatus `json:"status"`
// Backend-provided display title for this credit, or `null` when unavailable.
Title *string `json:"title,omitempty"`
}
type RateLimitResetCreditStatus ¶
type RateLimitResetCreditStatus string
const ( RateLimitResetCreditStatusAvailable RateLimitResetCreditStatus = "available" RateLimitResetCreditStatusRedeemed RateLimitResetCreditStatus = "redeemed" RateLimitResetCreditStatusRedeeming RateLimitResetCreditStatus = "redeeming" RateLimitResetCreditStatusUnknown RateLimitResetCreditStatus = "unknown" )
type RateLimitResetCreditsSummary ¶
type RateLimitResetCreditsSummary struct {
AvailableCount int64 `json:"availableCount"`
// Detail rows for available reset credits, when the backend provides them.
Credits []RateLimitResetCredit `json:"credits,omitempty"`
}
type RateLimitResetType ¶
type RateLimitResetType string
const ( RateLimitResetTypeCodexRateLimits RateLimitResetType = "codexRateLimits" RateLimitResetTypeUnknown RateLimitResetType = "unknown" )
type RateLimitSnapshot ¶
type RateLimitSnapshot struct {
Credits *CreditsSnapshot `json:"credits,omitempty"`
IndividualLimit *SpendControlLimitSnapshot `json:"individualLimit,omitempty"`
LimitID *string `json:"limitId,omitempty"`
LimitName *string `json:"limitName,omitempty"`
// Normal model whose display name and reasoning options describe this quota alias.
NormalModelSlug *string `json:"normalModelSlug,omitempty"`
PlanType *PlanType `json:"planType,omitempty"`
Primary *RateLimitWindow `json:"primary,omitempty"`
RateLimitReachedType *RateLimitReachedType `json:"rateLimitReachedType,omitempty"`
Secondary *RateLimitWindow `json:"secondary,omitempty"`
// Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.
SpendControlReached *bool `json:"spendControlReached,omitempty"`
}
type RateLimitWindow ¶
type ReadCommandAction ¶
type ReadCommandAction struct {
Command string `json:"command"`
Name string `json:"name"`
Path LegacyAppPathString `json:"path"`
}
type ReadOnlySandboxPolicy ¶
type ReadOnlySandboxPolicy struct {
NetworkAccess *bool `json:"networkAccess,omitempty"`
}
type ReasoningEffort ¶
type ReasoningEffort = string
A non-empty reasoning effort value advertised by the model.
type ReasoningEffortOption ¶
type ReasoningEffortOption struct {
Description string `json:"description"`
ReasoningEffort ReasoningEffort `json:"reasoningEffort"`
}
type ReasoningItemContent ¶
type ReasoningItemContent struct {
// Tag is the value of the "type" property observed on decode.
Tag string
ReasoningText *ReasoningTextReasoningItemContent
Text *TextReasoningItemContent
// contains filtered or unexported fields
}
ReasoningItemContent is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ReasoningItemContent) MarshalJSON ¶
func (u ReasoningItemContent) MarshalJSON() ([]byte, error)
func (ReasoningItemContent) Raw ¶
func (u ReasoningItemContent) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ReasoningItemContent) UnmarshalJSON ¶
func (u *ReasoningItemContent) UnmarshalJSON(data []byte) error
type ReasoningItemReasoningSummary ¶
type ReasoningItemReasoningSummary struct {
// Tag is the value of the "type" property observed on decode.
Tag string
SummaryText *SummaryTextReasoningItemReasoningSummary
// contains filtered or unexported fields
}
ReasoningItemReasoningSummary is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ReasoningItemReasoningSummary) MarshalJSON ¶
func (u ReasoningItemReasoningSummary) MarshalJSON() ([]byte, error)
func (ReasoningItemReasoningSummary) Raw ¶
func (u ReasoningItemReasoningSummary) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ReasoningItemReasoningSummary) UnmarshalJSON ¶
func (u *ReasoningItemReasoningSummary) UnmarshalJSON(data []byte) error
type ReasoningResponseItem ¶
type ReasoningResponseItem struct {
Content []ReasoningItemContent `json:"content,omitempty"`
EncryptedContent *string `json:"encrypted_content,omitempty"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Summary []ReasoningItemReasoningSummary `json:"summary"`
}
func (ReasoningResponseItem) MarshalJSON ¶
func (v ReasoningResponseItem) MarshalJSON() ([]byte, error)
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"`
}
type ReasoningThreadItem ¶
type Request ¶
type Request struct {
ID RequestID `json:"id"`
Method string `json:"method"`
Params any `json:"params,omitempty"`
}
Request is an outbound Memoh → app-server request.
func (Request) MarshalJSON ¶
type RequestID ¶
type RequestID struct {
// contains filtered or unexported fields
}
RequestID mirrors the app-server RequestId, which is a string or a number. The original JSON representation is preserved so ids echo back byte-for-byte: 42 must not become "42".
func NewRequestID ¶
NewRequestID returns a numeric request id.
func (RequestID) MarshalJSON ¶
func (*RequestID) UnmarshalJSON ¶
type RequestPermissionProfile ¶
type RequestPermissionProfile struct {
FileSystem *AdditionalFileSystemPermissions `json:"fileSystem,omitempty"`
Network *AdditionalNetworkPermissions `json:"network,omitempty"`
}
type Resource ¶
type Resource struct {
Meta any `json:"_meta,omitempty"`
Annotations any `json:"annotations,omitempty"`
Description *string `json:"description,omitempty"`
Icons []any `json:"icons,omitempty"`
MimeType *string `json:"mimeType,omitempty"`
Name string `json:"name"`
Size *int64 `json:"size,omitempty"`
Title *string `json:"title,omitempty"`
URI string `json:"uri"`
}
A known resource that the server is capable of reading.
type ResourceTemplate ¶
type ResourceTemplate struct {
Annotations any `json:"annotations,omitempty"`
Description *string `json:"description,omitempty"`
MimeType *string `json:"mimeType,omitempty"`
Name string `json:"name"`
Title *string `json:"title,omitempty"`
URITemplate string `json:"uriTemplate"`
}
A template description for resources available on the server.
type ResponseItem ¶
type ResponseItem struct {
// Tag is the value of the "type" property observed on decode.
Tag string
AgentMessage *AgentMessageResponseItem
Compaction *CompactionResponseItem
CompactionTrigger *CompactionTriggerResponseItem
ConfigurationUpdate *ConfigurationUpdateResponseItem
ContextCompaction *ContextCompactionResponseItem
CustomToolCall *CustomToolCallResponseItem
CustomToolCallOutput *CustomToolCallOutputResponseItem
FunctionCall *FunctionCallResponseItem
FunctionCallOutput *FunctionCallOutputResponseItem
ImageGenerationCall *ImageGenerationCallResponseItem
LocalShellCall *LocalShellCallResponseItem
Message *MessageResponseItem
Other *OtherResponseItem
Reasoning *ReasoningResponseItem
ToolSearchCall *ToolSearchCallResponseItem
ToolSearchOutput *ToolSearchOutputResponseItem
WebSearchCall *WebSearchCallResponseItem
// contains filtered or unexported fields
}
ResponseItem is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ResponseItem) MarshalJSON ¶
func (u ResponseItem) MarshalJSON() ([]byte, error)
func (ResponseItem) Raw ¶
func (u ResponseItem) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ResponseItem) UnmarshalJSON ¶
func (u *ResponseItem) UnmarshalJSON(data []byte) error
type ResponsesApiWebSearchAction ¶
type ResponsesApiWebSearchAction struct {
// Tag is the value of the "type" property observed on decode.
Tag string
FindInPage *FindInPageResponsesApiWebSearchAction
OpenPage *OpenPageResponsesApiWebSearchAction
Other *OtherResponsesApiWebSearchAction
Search *SearchResponsesApiWebSearchAction
// contains filtered or unexported fields
}
ResponsesApiWebSearchAction is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ResponsesApiWebSearchAction) MarshalJSON ¶
func (u ResponsesApiWebSearchAction) MarshalJSON() ([]byte, error)
func (ResponsesApiWebSearchAction) Raw ¶
func (u ResponsesApiWebSearchAction) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ResponsesApiWebSearchAction) UnmarshalJSON ¶
func (u *ResponsesApiWebSearchAction) UnmarshalJSON(data []byte) error
type ReviewDelivery ¶
type ReviewDelivery string
const ( ReviewDeliveryDetached ReviewDelivery = "detached" ReviewDeliveryInline ReviewDelivery = "inline" )
type ReviewStartParams ¶
type ReviewStartParams struct {
// Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`). Detached delivery is deprecated and emits `deprecationNotice`. Use `thread/start` followed by an inline review for a separate review thread.
Delivery *ReviewDelivery `json:"delivery,omitempty"`
Target ReviewTarget `json:"target"`
ThreadID string `json:"threadId"`
}
type ReviewStartResponse ¶
type ReviewTarget ¶
type ReviewTarget struct {
// Tag is the value of the "type" property observed on decode.
Tag string
BaseBranch *BaseBranchReviewTarget
Commit *CommitReviewTarget
Custom *CustomReviewTarget
UncommittedChanges *UncommittedChangesReviewTarget
// contains filtered or unexported fields
}
ReviewTarget is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ReviewTarget) MarshalJSON ¶
func (u ReviewTarget) MarshalJSON() ([]byte, error)
func (ReviewTarget) Raw ¶
func (u ReviewTarget) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ReviewTarget) UnmarshalJSON ¶
func (u *ReviewTarget) UnmarshalJSON(data []byte) error
type RootFileSystemSpecialPath ¶
type RootFileSystemSpecialPath struct {
}
type SandboxMode ¶
type SandboxMode string
const ( SandboxModeDangerFullAccess SandboxMode = "danger-full-access" SandboxModeReadOnly SandboxMode = "read-only" SandboxModeWorkspaceWrite SandboxMode = "workspace-write" )
type SandboxPolicy ¶
type SandboxPolicy struct {
// Tag is the value of the "type" property observed on decode.
Tag string
DangerFullAccess *DangerFullAccessSandboxPolicy
ExternalSandbox *ExternalSandboxSandboxPolicy
ReadOnly *ReadOnlySandboxPolicy
WorkspaceWrite *WorkspaceWriteSandboxPolicy
// contains filtered or unexported fields
}
SandboxPolicy is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (SandboxPolicy) MarshalJSON ¶
func (u SandboxPolicy) MarshalJSON() ([]byte, error)
func (SandboxPolicy) Raw ¶
func (u SandboxPolicy) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*SandboxPolicy) UnmarshalJSON ¶
func (u *SandboxPolicy) UnmarshalJSON(data []byte) error
type SearchCommandAction ¶
type SearchWebSearchAction ¶
type SelectedCapabilityRoot ¶
type SelectedCapabilityRoot struct {
// Stable identifier supplied by the capability selection platform.
ID string `json:"id"`
// Where the selected root can be resolved.
Location CapabilityRootLocation `json:"location"`
}
A user-selected root that can expose one or more runtime capabilities.
type SessionSource ¶
type SessionSource struct {
// Unit holds the bare-string variant value, if that form was used.
Unit string
Custom *string
SubAgent *SubAgentSource
// contains filtered or unexported fields
}
SessionSource is a mixed union: on the wire it is either a bare string (Unit) or a single-key object (one payload field set). Unknown variants decode without error and are retained in Raw().
func (SessionSource) MarshalJSON ¶
func (u SessionSource) MarshalJSON() ([]byte, error)
func (SessionSource) Raw ¶
func (u SessionSource) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*SessionSource) UnmarshalJSON ¶
func (u *SessionSource) UnmarshalJSON(data []byte) error
type Settings ¶
type Settings struct {
DeveloperInstructions *string `json:"developer_instructions,omitempty"`
Model string `json:"model"`
ReasoningEffort *ReasoningEffort `json:"reasoning_effort,omitempty"`
}
Settings for a collaboration mode.
type SkillDependencies ¶
type SkillDependencies struct {
Tools []SkillToolDependency `json:"tools"`
}
func (SkillDependencies) MarshalJSON ¶
func (v SkillDependencies) MarshalJSON() ([]byte, error)
type SkillErrorInfo ¶
type SkillInterface ¶
type SkillInterface struct {
BrandColor *string `json:"brandColor,omitempty"`
DefaultPrompt *string `json:"defaultPrompt,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
IconLarge *AbsolutePathBuf `json:"iconLarge,omitempty"`
// Remote large icon URL from the plugin catalog.
IconLargeURL *string `json:"iconLargeUrl,omitempty"`
IconSmall *AbsolutePathBuf `json:"iconSmall,omitempty"`
// Remote small icon URL from the plugin catalog.
IconSmallURL *string `json:"iconSmallUrl,omitempty"`
ShortDescription *string `json:"shortDescription,omitempty"`
}
type SkillMetadata ¶
type SkillMetadata struct {
Dependencies *SkillDependencies `json:"dependencies,omitempty"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Interface *SkillInterface `json:"interface,omitempty"`
Name string `json:"name"`
Path AbsolutePathBuf `json:"path"`
// Owning plugin ID, matching `PluginSummary.id`, when known.
PluginID *string `json:"pluginId,omitempty"`
Scope SkillScope `json:"scope"`
// Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.
ShortDescription *string `json:"shortDescription,omitempty"`
}
type SkillScope ¶
type SkillScope string
const ( SkillScopeAdmin SkillScope = "admin" SkillScopeRepo SkillScope = "repo" SkillScopeSystem SkillScope = "system" SkillScopeUser SkillScope = "user" )
type SkillToolDependency ¶
type SkillUserInput ¶
type SkillsListEntry ¶
type SkillsListEntry struct {
Cwd string `json:"cwd"`
Errors []SkillErrorInfo `json:"errors"`
Skills []SkillMetadata `json:"skills"`
}
func (SkillsListEntry) MarshalJSON ¶
func (v SkillsListEntry) MarshalJSON() ([]byte, error)
type SkillsListParams ¶
type SkillsListResponse ¶
type SkillsListResponse struct {
Data []SkillsListEntry `json:"data"`
}
func (SkillsListResponse) MarshalJSON ¶
func (v SkillsListResponse) MarshalJSON() ([]byte, error)
type SlashTmpFileSystemSpecialPath ¶
type SlashTmpFileSystemSpecialPath struct {
}
type SleepThreadItem ¶
Display item emitted by the interruptible `clock.sleep` tool.
type SortDirection ¶
type SortDirection string
const ( SortDirectionAsc SortDirection = "asc" SortDirectionDesc SortDirection = "desc" )
type SpecialFileSystemPath ¶
type SpecialFileSystemPath struct {
Value FileSystemSpecialPath `json:"value"`
}
type SubAgentActivityKind ¶
type SubAgentActivityKind string
const ( SubAgentActivityKindCompleted SubAgentActivityKind = "completed" SubAgentActivityKindInteracted SubAgentActivityKind = "interacted" SubAgentActivityKindInterrupted SubAgentActivityKind = "interrupted" SubAgentActivityKindStarted SubAgentActivityKind = "started" )
type SubAgentActivityThreadItem ¶
type SubAgentActivityThreadItem struct {
AgentPath string `json:"agentPath"`
AgentThreadID string `json:"agentThreadId"`
ID string `json:"id"`
Kind SubAgentActivityKind `json:"kind"`
}
type SubAgentSource ¶
type SubAgentSource struct {
// Unit holds the bare-string variant value, if that form was used.
Unit string
Other *string
ThreadSpawn *SubAgentSourceThreadSpawn
// contains filtered or unexported fields
}
SubAgentSource is a mixed union: on the wire it is either a bare string (Unit) or a single-key object (one payload field set). Unknown variants decode without error and are retained in Raw().
func (SubAgentSource) MarshalJSON ¶
func (u SubAgentSource) MarshalJSON() ([]byte, error)
func (SubAgentSource) Raw ¶
func (u SubAgentSource) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*SubAgentSource) UnmarshalJSON ¶
func (u *SubAgentSource) UnmarshalJSON(data []byte) error
type SummaryTextReasoningItemReasoningSummary ¶
type SummaryTextReasoningItemReasoningSummary struct {
Text string `json:"text"`
}
type SystemErrorThreadStatus ¶
type SystemErrorThreadStatus struct {
}
type TextElement ¶
type TextPosition ¶
type TextRange ¶
type TextRange struct {
End TextPosition `json:"end"`
Start TextPosition `json:"start"`
}
type TextReasoningItemContent ¶
type TextReasoningItemContent struct {
Text string `json:"text"`
}
type TextUserInput ¶
type TextUserInput struct {
Text string `json:"text"`
// UI-defined spans within `text` used to render or persist special elements.
TextElements []TextElement `json:"text_elements,omitempty"`
}
type Thread ¶
type Thread struct {
// Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
AgentNickname *string `json:"agentNickname,omitempty"`
// Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
AgentRole *string `json:"agentRole,omitempty"`
// 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 *bool `json:"canAcceptDirectInput,omitempty"`
// Version of the CLI that created the thread.
CliVersion string `json:"cliVersion"`
// Unix timestamp (in seconds) when the thread was created.
CreatedAt int64 `json:"createdAt"`
// Working directory captured for the thread.
Cwd AbsolutePathBuf `json:"cwd"`
// Saved Daybreak choice, independent of turn execution. Null if unset.
DaybreakEnabled *bool `json:"daybreakEnabled,omitempty"`
// 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 []ThreadEnvironment `json:"environments,omitempty"`
// Whether the thread is ephemeral and should not be materialized on disk.
Ephemeral bool `json:"ephemeral"`
// Optional implementation-specific thread data.
Extra *ThreadExtra `json:"extra,omitempty"`
// Source thread id when this thread was created by forking another thread.
ForkedFromID *string `json:"forkedFromId,omitempty"`
// Optional Git metadata captured when the thread was created.
GitInfo *GitInfo `json:"gitInfo,omitempty"`
// Persisted thread history contract selected when this thread was created.
HistoryMode *ThreadHistoryMode `json:"historyMode,omitempty"`
// Identifier for this thread. Codex-generated thread IDs are UUIDv7.
ID string `json:"id"`
// Current configured model when loaded, otherwise the latest persisted model. Null when unavailable. This is not per-turn execution telemetry.
Model *string `json:"model,omitempty"`
// Model provider used for this thread (for example, 'openai').
ModelProvider string `json:"modelProvider"`
// Optional user-facing thread title.
Name *string `json:"name,omitempty"`
// Originator recorded when the thread was created, independent of its current client or executor. Null when the recorded originator is unavailable.
Originator *string `json:"originator,omitempty"`
// The ID of the parent thread. This will only be set if this thread is a subagent.
ParentThreadID *string `json:"parentThreadId,omitempty"`
// [UNSTABLE] Path to the thread on disk.
Path *string `json:"path,omitempty"`
// Usually the first user message in the thread, if available.
Preview string `json:"preview"`
// Canonical project assignment owned by app-server, if any.
ProjectID *string `json:"projectId"`
// Current configured reasoning effort when loaded, otherwise the latest persisted effort. Null when unset or unavailable. This is not per-turn execution telemetry.
ReasoningEffort *ReasoningEffort `json:"reasoningEffort,omitempty"`
// Unix timestamp (in seconds) used for thread recency ordering.
RecencyAt *int64 `json:"recencyAt,omitempty"`
// The independently persisted section selected for this thread, if any.
Section *ThreadSection `json:"section,omitempty"`
// Unix timestamp in seconds when the thread entered its current section.
SectionEnteredAt *int64 `json:"sectionEnteredAt,omitempty"`
// Session id shared by threads that belong to the same session tree.
SessionID string `json:"sessionId"`
// Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
Source SessionSource `json:"source"`
// Current runtime status for the thread.
Status ThreadStatus `json:"status"`
// Optional analytics source classification for this thread.
ThreadSource *ThreadSource `json:"threadSource,omitempty"`
// Only populated on `thread/resume`, `thread/rollback`, `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"`
// Unix timestamp (in seconds) when the thread was last updated.
UpdatedAt int64 `json:"updatedAt"`
}
func (Thread) MarshalJSON ¶
type ThreadActiveFlag ¶
type ThreadActiveFlag string
const ( ThreadActiveFlagWaitingOnApproval ThreadActiveFlag = "waitingOnApproval" ThreadActiveFlagWaitingOnUserInput ThreadActiveFlag = "waitingOnUserInput" )
type ThreadCompactStartParams ¶
type ThreadCompactStartParams struct {
ThreadID string `json:"threadId"`
}
type ThreadCompactStartResponse ¶
type ThreadCompactStartResponse struct {
}
type ThreadEnvironment ¶
type ThreadEnvironment struct {
Cwd LegacyAppPathString `json:"cwd"`
EnvironmentID string `json:"environmentId"`
RuntimeWorkspaceRoots []LegacyAppPathString `json:"runtimeWorkspaceRoots"`
}
An environment selected by a loaded thread, independent of connection status.
func (ThreadEnvironment) MarshalJSON ¶
func (v ThreadEnvironment) MarshalJSON() ([]byte, error)
type ThreadForkParams ¶
type ThreadForkParams struct {
ApprovalPolicy *AskForApproval `json:"approvalPolicy,omitempty"`
// Override where approval requests are routed for review on this thread and subsequent turns.
ApprovalsReviewer *ApprovalsReviewer `json:"approvalsReviewer,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
// Optional turn id to fork before, excluding that turn and all later turns. Cannot be combined with `last_turn_id`.
BeforeTurnID *string `json:"beforeTurnId,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd *string `json:"cwd,omitempty"`
// When true, carry the source thread's current goal into the fork without starting its initial automatic continuation. The next explicit turn owns the goal lifecycle, and normal automatic continuation resumes after it.
DeferGoalContinuation *bool `json:"deferGoalContinuation,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
Ephemeral *bool `json:"ephemeral,omitempty"`
// When true, return only thread metadata and live fork state without populating `thread.turns`. This is useful when the client plans to call `thread/turns/list` immediately after forking. Full-history hydration is deprecated for paginated threads; use this with `thread/turns/list` and `thread/items/list` instead.
ExcludeTurns *bool `json:"excludeTurns,omitempty"`
// Optional last turn id to fork through, inclusive.
LastTurnID *string `json:"lastTurnId,omitempty"`
// Configuration overrides for the forked thread, if any.
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
// [UNSTABLE] Specify the rollout path to fork from. If specified, the thread_id param will be ignored.
Path *string `json:"path,omitempty"`
// Named profile id for the forked thread. Cannot be combined with `sandbox`.
Permissions *string `json:"permissions,omitempty"`
// Replace the thread's runtime workspace roots. Paths must be absolute.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
Sandbox *SandboxMode `json:"sandbox,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
ThreadID string `json:"threadId"`
// Optional client-supplied analytics source classification for this forked thread.
ThreadSource *ThreadSource `json:"threadSource,omitempty"`
}
There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.
type ThreadForkResponse ¶
type ThreadForkResponse struct {
// Named or implicit built-in profile that produced the active permissions, when known.
ActivePermissionProfile *ActivePermissionProfile `json:"activePermissionProfile,omitempty"`
ApprovalPolicy AskForApproval `json:"approvalPolicy"`
// Reviewer currently used for approval requests on this thread.
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer"`
Cwd AbsolutePathBuf `json:"cwd"`
// Environment-native paths to instruction source files currently loaded for this thread.
InstructionSources []LegacyAppPathString `json:"instructionSources,omitempty"`
Model string `json:"model"`
ModelProvider string `json:"modelProvider"`
// @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior.
MultiAgentMode *MultiAgentMode `json:"multiAgentMode,omitempty"`
ReasoningEffort *ReasoningEffort `json:"reasoningEffort,omitempty"`
// Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
// Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.
Sandbox SandboxPolicy `json:"sandbox"`
ServiceTier *string `json:"serviceTier,omitempty"`
Thread Thread `json:"thread"`
}
type ThreadGoal ¶
type ThreadGoal struct {
CreatedAt int64 `json:"createdAt"`
Objective string `json:"objective"`
Status ThreadGoalStatus `json:"status"`
ThreadID string `json:"threadId"`
TimeUsedSeconds int64 `json:"timeUsedSeconds"`
TokenBudget *int64 `json:"tokenBudget,omitempty"`
TokensUsed int64 `json:"tokensUsed"`
UpdatedAt int64 `json:"updatedAt"`
}
type ThreadGoalClearParams ¶
type ThreadGoalClearParams struct {
ThreadID string `json:"threadId"`
}
type ThreadGoalClearResponse ¶
type ThreadGoalClearResponse struct {
Cleared bool `json:"cleared"`
}
type ThreadGoalClearedNotification ¶
type ThreadGoalClearedNotification struct {
ThreadID string `json:"threadId"`
}
type ThreadGoalGetParams ¶
type ThreadGoalGetParams struct {
ThreadID string `json:"threadId"`
}
type ThreadGoalGetResponse ¶
type ThreadGoalGetResponse struct {
Goal *ThreadGoal `json:"goal,omitempty"`
}
type ThreadGoalSetParams ¶
type ThreadGoalSetParams struct {
Objective *string `json:"objective,omitempty"`
Status *ThreadGoalStatus `json:"status,omitempty"`
ThreadID string `json:"threadId"`
TokenBudget *int64 `json:"tokenBudget,omitempty"`
}
type ThreadGoalSetResponse ¶
type ThreadGoalSetResponse struct {
Goal ThreadGoal `json:"goal"`
}
type ThreadGoalStatus ¶
type ThreadGoalStatus string
const ( ThreadGoalStatusActive ThreadGoalStatus = "active" ThreadGoalStatusBlocked ThreadGoalStatus = "blocked" ThreadGoalStatusBudgetLimited ThreadGoalStatus = "budgetLimited" ThreadGoalStatusComplete ThreadGoalStatus = "complete" ThreadGoalStatusPaused ThreadGoalStatus = "paused" ThreadGoalStatusUsageLimited ThreadGoalStatus = "usageLimited" )
type ThreadGoalUpdatedNotification ¶
type ThreadGoalUpdatedNotification struct {
Goal ThreadGoal `json:"goal"`
ThreadID string `json:"threadId"`
TurnID *string `json:"turnId,omitempty"`
}
type ThreadHistoryMode ¶
type ThreadHistoryMode string
const ( ThreadHistoryModeLegacy ThreadHistoryMode = "legacy" ThreadHistoryModePaginated ThreadHistoryMode = "paginated" )
type ThreadItem ¶
type ThreadItem struct {
// Tag is the value of the "type" property observed on decode.
Tag string
AgentMessage *AgentMessageThreadItem
CollabAgentToolCall *CollabAgentToolCallThreadItem
CommandExecution *CommandExecutionThreadItem
ContextCompaction *ContextCompactionThreadItem
DynamicToolCall *DynamicToolCallThreadItem
EnteredReviewMode *EnteredReviewModeThreadItem
ExitedReviewMode *ExitedReviewModeThreadItem
FileChange *FileChangeThreadItem
FunctionCallOutput *FunctionCallOutputThreadItem
HookPrompt *HookPromptThreadItem
ImageGeneration *ImageGenerationThreadItem
ImageView *ImageViewThreadItem
MCPToolCall *McpToolCallThreadItem
Plan *PlanThreadItem
Reasoning *ReasoningThreadItem
Sleep *SleepThreadItem
SubAgentActivity *SubAgentActivityThreadItem
UserMessage *UserMessageThreadItem
WebSearch *WebSearchThreadItem
// contains filtered or unexported fields
}
ThreadItem is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ThreadItem) MarshalJSON ¶
func (u ThreadItem) MarshalJSON() ([]byte, error)
func (ThreadItem) Raw ¶
func (u ThreadItem) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ThreadItem) UnmarshalJSON ¶
func (u *ThreadItem) 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 *bool `json:"includeTurns,omitempty"`
ThreadID string `json:"threadId"`
}
type ThreadReadResponse ¶
type ThreadReadResponse struct {
Thread Thread `json:"thread"`
}
type ThreadResumeInitialTurnsPageParams ¶
type ThreadResumeInitialTurnsPageParams struct {
// How much item detail to include for each returned turn; defaults to summary.
ItemsView *TurnItemsView `json:"itemsView,omitempty"`
// Optional turn page size.
Limit *uint64 `json:"limit,omitempty"`
// Optional turn pagination direction; defaults to descending.
SortDirection *SortDirection `json:"sortDirection,omitempty"`
}
type ThreadResumeParams ¶
type ThreadResumeParams struct {
ApprovalPolicy *AskForApproval `json:"approvalPolicy,omitempty"`
// Override where approval requests are routed for review on this thread and subsequent turns.
ApprovalsReviewer *ApprovalsReviewer `json:"approvalsReviewer,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd *string `json:"cwd,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
// 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 *bool `json:"excludeTurns,omitempty"`
// [UNSTABLE] FOR CODEX CLOUD - DO NOT USE. If specified, the thread will be resumed with the provided history instead of loaded from disk.
History []ResponseItem `json:"history,omitempty"`
// When present, include a `thread/turns/list` page in the resume response so clients can bootstrap recent turns without a second request.
InitialTurnsPage *ThreadResumeInitialTurnsPageParams `json:"initialTurnsPage,omitempty"`
// Configuration overrides for the resumed thread, if any.
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
// [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 *string `json:"path,omitempty"`
// Named profile id for the resumed thread. Cannot be combined with `sandbox`.
Permissions *string `json:"permissions,omitempty"`
Personality *Personality `json:"personality,omitempty"`
// Replace the thread's runtime workspace roots. Paths must be absolute.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
Sandbox *SandboxMode `json:"sandbox,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
ThreadID string `json:"threadId"`
}
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.
type ThreadResumeResponse ¶
type ThreadResumeResponse struct {
// Named or implicit built-in profile that produced the active permissions, when known.
ActivePermissionProfile *ActivePermissionProfile `json:"activePermissionProfile,omitempty"`
ApprovalPolicy AskForApproval `json:"approvalPolicy"`
// Reviewer currently used for approval requests on this thread.
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer"`
Cwd AbsolutePathBuf `json:"cwd"`
// `thread/turns/list` page returned when requested by `initialTurnsPage`.
InitialTurnsPage *TurnsPage `json:"initialTurnsPage,omitempty"`
// Environment-native paths to instruction source files currently loaded for this thread.
InstructionSources []LegacyAppPathString `json:"instructionSources,omitempty"`
// Opaque cursor for hydrating paginated items backwards.
ItemsBackwardsCursor *string `json:"itemsBackwardsCursor,omitempty"`
Model string `json:"model"`
ModelProvider string `json:"modelProvider"`
// @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior.
MultiAgentMode *MultiAgentMode `json:"multiAgentMode,omitempty"`
ReasoningEffort *ReasoningEffort `json:"reasoningEffort,omitempty"`
// Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
// Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.
Sandbox SandboxPolicy `json:"sandbox"`
ServiceTier *string `json:"serviceTier,omitempty"`
Thread Thread `json:"thread"`
// Opaque cursor for hydrating paginated turns backwards.
TurnsBackwardsCursor *string `json:"turnsBackwardsCursor,omitempty"`
}
type ThreadSection ¶
type ThreadSection struct {
// Optional appearance synchronized across clients.
Appearance *ThreadSectionAppearance `json:"appearance,omitempty"`
// Opaque UUIDv7 identity that remains stable when the section is renamed.
ID string `json:"id"`
// The current user-visible section name.
Name string `json:"name"`
}
An independently persisted, user-visible thread section.
type ThreadSectionAppearance ¶
type ThreadSectionAppearance struct {
Color *string `json:"color,omitempty"`
Icon *string `json:"icon,omitempty"`
}
Extensible visual presentation for a custom thread section.
type ThreadSettingsUpdateParams ¶
type ThreadSettingsUpdateParams struct {
// Override the approval policy for subsequent turns.
ApprovalPolicy *AskForApproval `json:"approvalPolicy,omitempty"`
// Override where approval requests are routed for subsequent turns.
ApprovalsReviewer *ApprovalsReviewer `json:"approvalsReviewer,omitempty"`
// EXPERIMENTAL - Set a pre-set collaboration mode for subsequent turns.
CollaborationMode *CollaborationMode `json:"collaborationMode,omitempty"`
// Override the working directory for subsequent turns.
Cwd *string `json:"cwd,omitempty"`
// Override the reasoning effort for subsequent turns.
Effort *ReasoningEffort `json:"effort,omitempty"`
// Override the model for subsequent turns.
Model *string `json:"model,omitempty"`
// @deprecated Ignored. Use `effort: "ultra"` for proactive multi-agent behavior.
MultiAgentMode *MultiAgentMode `json:"multiAgentMode,omitempty"`
// Select a named permissions profile id for subsequent turns. Cannot be combined with `sandboxPolicy`.
Permissions *string `json:"permissions,omitempty"`
// Override the personality for subsequent turns.
Personality *Personality `json:"personality,omitempty"`
// Override the sandbox policy for subsequent turns.
SandboxPolicy *SandboxPolicy `json:"sandboxPolicy,omitempty"`
// Override the service tier for subsequent turns. `null` clears the current service tier; omission leaves it unchanged.
ServiceTier *string `json:"serviceTier,omitempty"`
// Override the reasoning summary for subsequent turns.
Summary *ReasoningSummary `json:"summary,omitempty"`
ThreadID string `json:"threadId"`
}
type ThreadSettingsUpdateResponse ¶
type ThreadSettingsUpdateResponse struct {
}
type ThreadSource ¶
type ThreadSource = string
type ThreadStartParams ¶
type ThreadStartParams struct {
// Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default.
AllowProviderModelFallback *bool `json:"allowProviderModelFallback,omitempty"`
ApprovalPolicy *AskForApproval `json:"approvalPolicy,omitempty"`
// Override where approval requests are routed for review on this thread and subsequent turns.
ApprovalsReviewer *ApprovalsReviewer `json:"approvalsReviewer,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd *string `json:"cwd,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
DynamicTools []DynamicToolSpec `json:"dynamicTools,omitempty"`
// Optional sticky environments for this thread.
Environments []TurnEnvironmentParams `json:"environments,omitempty"`
Ephemeral *bool `json:"ephemeral,omitempty"`
// If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud).
ExperimentalRawEvents *bool `json:"experimentalRawEvents,omitempty"`
// Persisted thread history contract to use for this new thread.
HistoryMode *ThreadHistoryMode `json:"historyMode,omitempty"`
// Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way.
MockExperimentalField *string `json:"mockExperimentalField,omitempty"`
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
// @deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior.
MultiAgentMode *MultiAgentMode `json:"multiAgentMode,omitempty"`
// Named profile id for this thread. Cannot be combined with `sandbox`.
Permissions *string `json:"permissions,omitempty"`
Personality *Personality `json:"personality,omitempty"`
// Optional project identity for this new thread. Durable threads persist the assignment; ephemeral threads expose it only in live responses.
ProjectID *string `json:"projectId,omitempty"`
// Replace the thread's runtime workspace roots. Paths must be absolute.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
Sandbox *SandboxMode `json:"sandbox,omitempty"`
// Capability roots selected for this thread by the hosting platform.
SelectedCapabilityRoots []SelectedCapabilityRoot `json:"selectedCapabilityRoots,omitempty"`
ServiceName *string `json:"serviceName,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
SessionStartSource *ThreadStartSource `json:"sessionStartSource,omitempty"`
// Optional client-supplied analytics source classification for this thread.
ThreadSource *ThreadSource `json:"threadSource,omitempty"`
}
type ThreadStartResponse ¶
type ThreadStartResponse struct {
// Named or implicit built-in profile that produced the active permissions, when known.
ActivePermissionProfile *ActivePermissionProfile `json:"activePermissionProfile,omitempty"`
ApprovalPolicy AskForApproval `json:"approvalPolicy"`
// Reviewer currently used for approval requests on this thread.
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer"`
Cwd AbsolutePathBuf `json:"cwd"`
// Environment-native paths to instruction source files currently loaded for this thread.
InstructionSources []LegacyAppPathString `json:"instructionSources,omitempty"`
Model string `json:"model"`
ModelProvider string `json:"modelProvider"`
// @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior.
MultiAgentMode *MultiAgentMode `json:"multiAgentMode,omitempty"`
ReasoningEffort *ReasoningEffort `json:"reasoningEffort,omitempty"`
// Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
// Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.
Sandbox SandboxPolicy `json:"sandbox"`
ServiceTier *string `json:"serviceTier,omitempty"`
Thread Thread `json:"thread"`
}
type ThreadStartSource ¶
type ThreadStartSource string
const ( ThreadStartSourceClear ThreadStartSource = "clear" ThreadStartSourceStartup ThreadStartSource = "startup" )
type ThreadStartedNotification ¶
type ThreadStartedNotification struct {
Thread Thread `json:"thread"`
}
type ThreadStatus ¶
type ThreadStatus struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Active *ActiveThreadStatus
Idle *IdleThreadStatus
NotLoaded *NotLoadedThreadStatus
SystemError *SystemErrorThreadStatus
// contains filtered or unexported fields
}
ThreadStatus is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (ThreadStatus) MarshalJSON ¶
func (u ThreadStatus) MarshalJSON() ([]byte, error)
func (ThreadStatus) Raw ¶
func (u ThreadStatus) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*ThreadStatus) UnmarshalJSON ¶
func (u *ThreadStatus) UnmarshalJSON(data []byte) error
type ThreadStatusChangedNotification ¶
type ThreadStatusChangedNotification struct {
Status ThreadStatus `json:"status"`
ThreadID string `json:"threadId"`
}
type ThreadTokenUsage ¶
type ThreadTokenUsage struct {
Last TokenUsageBreakdown `json:"last"`
ModelContextWindow *int64 `json:"modelContextWindow,omitempty"`
Total TokenUsageBreakdown `json:"total"`
}
type ThreadTokenUsageUpdatedNotification ¶
type ThreadTokenUsageUpdatedNotification struct {
ThreadID string `json:"threadId"`
TokenUsage ThreadTokenUsage `json:"tokenUsage"`
TurnID string `json:"turnId"`
}
type TmpdirFileSystemSpecialPath ¶
type TmpdirFileSystemSpecialPath struct {
}
type TokenUsageBreakdown ¶
type TokenUsageBreakdown struct {
CacheWriteInputTokens *int64 `json:"cacheWriteInputTokens,omitempty"`
CachedInputTokens int64 `json:"cachedInputTokens"`
InputTokens int64 `json:"inputTokens"`
OutputTokens int64 `json:"outputTokens"`
ReasoningOutputTokens int64 `json:"reasoningOutputTokens"`
TotalTokens int64 `json:"totalTokens"`
}
type Tool ¶
type Tool struct {
Meta any `json:"_meta,omitempty"`
Annotations any `json:"annotations,omitempty"`
Description *string `json:"description,omitempty"`
Icons []any `json:"icons,omitempty"`
InputSchema any `json:"inputSchema"`
Name string `json:"name"`
OutputSchema any `json:"outputSchema,omitempty"`
Title *string `json:"title,omitempty"`
}
Definition for a tool the client can call.
type ToolRequestUserInputAnswer ¶
type ToolRequestUserInputAnswer struct {
Answers []string `json:"answers"`
}
EXPERIMENTAL. Captures a user's answer to a request_user_input question.
func (ToolRequestUserInputAnswer) MarshalJSON ¶
func (v ToolRequestUserInputAnswer) MarshalJSON() ([]byte, error)
type ToolRequestUserInputOption ¶
type ToolRequestUserInputOption struct {
Description string `json:"description"`
Label string `json:"label"`
}
EXPERIMENTAL. Defines a single selectable option for request_user_input.
type ToolRequestUserInputParams ¶
type ToolRequestUserInputParams struct {
// @deprecated Use `isBlocking` to decide whether the request should block.
AutoResolutionMs *uint64 `json:"autoResolutionMs,omitempty"`
IsBlocking bool `json:"isBlocking"`
ItemID string `json:"itemId"`
Questions []ToolRequestUserInputQuestion `json:"questions"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
EXPERIMENTAL. Params sent with a request_user_input event.
func (ToolRequestUserInputParams) MarshalJSON ¶
func (v ToolRequestUserInputParams) MarshalJSON() ([]byte, error)
type ToolRequestUserInputQuestion ¶
type ToolRequestUserInputQuestion struct {
Header string `json:"header"`
ID string `json:"id"`
IsOther *bool `json:"isOther,omitempty"`
IsSecret *bool `json:"isSecret,omitempty"`
Options []ToolRequestUserInputOption `json:"options,omitempty"`
Question string `json:"question"`
}
EXPERIMENTAL. Represents one request_user_input question and its required options.
type ToolRequestUserInputResponse ¶
type ToolRequestUserInputResponse struct {
Answers map[string]ToolRequestUserInputAnswer `json:"answers"`
}
EXPERIMENTAL. Response payload mapping question ids to answers.
func (ToolRequestUserInputResponse) MarshalJSON ¶
func (v ToolRequestUserInputResponse) MarshalJSON() ([]byte, error)
type ToolSearchCallResponseItem ¶
type ToolSearchCallResponseItem struct {
Arguments any `json:"arguments"`
CallID *string `json:"call_id,omitempty"`
Execution string `json:"execution"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Status *string `json:"status,omitempty"`
}
type ToolSearchOutputResponseItem ¶
type ToolSearchOutputResponseItem struct {
CallID *string `json:"call_id,omitempty"`
Execution string `json:"execution"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Status string `json:"status"`
Tools []any `json:"tools"`
}
func (ToolSearchOutputResponseItem) MarshalJSON ¶
func (v ToolSearchOutputResponseItem) MarshalJSON() ([]byte, error)
type Turn ¶
type Turn struct {
// Unix timestamp (in seconds) when the turn completed.
CompletedAt *int64 `json:"completedAt,omitempty"`
// Duration between turn start and completion in milliseconds, if known.
DurationMs *int64 `json:"durationMs,omitempty"`
// Only populated when the Turn's status is failed.
Error *TurnError `json:"error,omitempty"`
// Identifier for this turn. Codex-generated turn IDs are UUIDv7.
ID string `json:"id"`
// Thread items currently included in this turn payload.
Items []ThreadItem `json:"items"`
// Describes how much of `items` has been loaded for this turn.
ItemsView *TurnItemsView `json:"itemsView,omitempty"`
// Unix timestamp (in seconds) when the turn started.
StartedAt *int64 `json:"startedAt,omitempty"`
Status TurnStatus `json:"status"`
}
func (Turn) MarshalJSON ¶
type TurnEnvironmentParams ¶
type TurnEnvironmentParams struct {
Cwd LegacyAppPathString `json:"cwd"`
EnvironmentID string `json:"environmentId"`
// Environment-native runtime workspace roots. Omitted defaults to `cwd`.
RuntimeWorkspaceRoots []LegacyAppPathString `json:"runtimeWorkspaceRoots,omitempty"`
}
type TurnError ¶
type TurnError struct {
AdditionalDetails *string `json:"additionalDetails,omitempty"`
CodexErrorInfo *CodexErrorInfo `json:"codexErrorInfo,omitempty"`
Message string `json:"message"`
// Optional public explanation and continuation instruction for a misalignment block.
Misalignment *MisalignmentErrorDetails `json:"misalignment,omitempty"`
}
type TurnInterruptParams ¶
type TurnInterruptResponse ¶
type TurnInterruptResponse struct {
}
type TurnItemsView ¶
type TurnItemsView string
const ( TurnItemsViewFull TurnItemsView = "full" TurnItemsViewNotLoaded TurnItemsView = "notLoaded" TurnItemsViewSummary TurnItemsView = "summary" )
type TurnPlanStep ¶
type TurnPlanStep struct {
Status TurnPlanStepStatus `json:"status"`
Step string `json:"step"`
}
type TurnPlanStepStatus ¶
type TurnPlanStepStatus string
const ( TurnPlanStepStatusCompleted TurnPlanStepStatus = "completed" TurnPlanStepStatusInProgress TurnPlanStepStatus = "inProgress" TurnPlanStepStatusPending TurnPlanStepStatus = "pending" )
type TurnPlanUpdatedNotification ¶
type TurnPlanUpdatedNotification struct {
Explanation *string `json:"explanation,omitempty"`
Plan []TurnPlanStep `json:"plan"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
func (TurnPlanUpdatedNotification) MarshalJSON ¶
func (v TurnPlanUpdatedNotification) MarshalJSON() ([]byte, error)
type TurnStartParams ¶
type TurnStartParams struct {
// Optional client-provided context fragments keyed by an opaque source identifier.
AdditionalContext map[string]AdditionalContextEntry `json:"additionalContext,omitempty"`
// Override the approval policy for this turn and subsequent turns.
ApprovalPolicy *AskForApproval `json:"approvalPolicy,omitempty"`
// Override where approval requests are routed for review on this turn and subsequent turns.
ApprovalsReviewer *ApprovalsReviewer `json:"approvalsReviewer,omitempty"`
ClientUserMessageID *string `json:"clientUserMessageId,omitempty"`
// EXPERIMENTAL - Set a pre-set collaboration mode. Takes precedence over model, reasoning_effort, and developer instructions if set.
CollaborationMode *CollaborationMode `json:"collaborationMode,omitempty"`
// Override the working directory for this turn and subsequent turns.
Cwd *string `json:"cwd,omitempty"`
// EXPERIMENTAL - Request a workspace-authorized cyber program for this turn. Omission preserves automatic behavior. This does not grant access.
CyberAccessProgram *CyberAccessProgram `json:"cyberAccessProgram,omitempty"`
// Override the reasoning effort for this turn and subsequent turns.
Effort *ReasoningEffort `json:"effort,omitempty"`
// Optional environments for this turn and subsequent turns.
Environments []TurnEnvironmentParams `json:"environments,omitempty"`
Input []UserInput `json:"input"`
// Override the model for this turn and subsequent turns.
Model *string `json:"model,omitempty"`
// @deprecated Ignored. Use `effort: "ultra"` for proactive multi-agent behavior.
MultiAgentMode *MultiAgentMode `json:"multiAgentMode,omitempty"`
// Optional JSON Schema used to constrain the final assistant message for this turn.
OutputSchema any `json:"outputSchema,omitempty"`
// Select a named permissions profile id for this turn and subsequent turns. Cannot be combined with `sandboxPolicy`.
Permissions *string `json:"permissions,omitempty"`
// Override the personality for this turn and subsequent turns.
Personality *Personality `json:"personality,omitempty"`
// Optional metadata to enrich Codex's ResponsesAPI turn metadata.
ResponsesapiClientMetadata map[string]string `json:"responsesapiClientMetadata,omitempty"`
// Replace the thread's runtime workspace roots for this turn and subsequent turns. Paths must be absolute.
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
// Override the sandbox policy for this turn and subsequent turns.
SandboxPolicy *SandboxPolicy `json:"sandboxPolicy,omitempty"`
// Override the service tier for this turn and subsequent turns.
ServiceTier *string `json:"serviceTier,omitempty"`
// 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 *string `json:"serviceTierForTurn,omitempty"`
// Override the reasoning summary for this turn and subsequent turns.
Summary *ReasoningSummary `json:"summary,omitempty"`
ThreadID string `json:"threadId"`
ToolOutput *TurnToolOutput `json:"toolOutput,omitempty"`
// Optional source classification for the caller that starts this turn. Ignored when this request steers an already-active turn.
TurnTrigger *string `json:"turnTrigger,omitempty"`
}
func (TurnStartParams) MarshalJSON ¶
func (v TurnStartParams) MarshalJSON() ([]byte, error)
type TurnStartResponse ¶
type TurnStartResponse struct {
Turn Turn `json:"turn"`
}
type TurnStartedNotification ¶
type TurnStatus ¶
type TurnStatus string
const ( TurnStatusCompleted TurnStatus = "completed" TurnStatusFailed TurnStatus = "failed" TurnStatusInProgress TurnStatus = "inProgress" TurnStatusInterrupted TurnStatus = "interrupted" )
type TurnSteerParams ¶
type TurnSteerParams struct {
// Optional client-provided context fragments keyed by an opaque source identifier.
AdditionalContext map[string]AdditionalContextEntry `json:"additionalContext,omitempty"`
ClientUserMessageID *string `json:"clientUserMessageId,omitempty"`
// Required active turn id precondition. The request fails when it does not match the currently active turn.
ExpectedTurnID string `json:"expectedTurnId"`
Input []UserInput `json:"input"`
// Optional metadata to enrich Codex's ResponsesAPI turn metadata.
ResponsesapiClientMetadata map[string]string `json:"responsesapiClientMetadata,omitempty"`
ThreadID string `json:"threadId"`
}
func (TurnSteerParams) MarshalJSON ¶
func (v TurnSteerParams) MarshalJSON() ([]byte, error)
type TurnSteerResponse ¶
type TurnSteerResponse struct {
TurnID string `json:"turnId"`
}
type TurnToolOutput ¶
type TurnsPage ¶
type TurnsPage struct {
BackwardsCursor *string `json:"backwardsCursor,omitempty"`
Data []Turn `json:"data"`
NextCursor *string `json:"nextCursor,omitempty"`
}
func (TurnsPage) MarshalJSON ¶
type UncommittedChangesReviewTarget ¶
type UncommittedChangesReviewTarget struct {
}
Review the working tree: staged, unstaged, and untracked files.
type UnknownCommandAction ¶
type UnknownCommandAction struct {
Command string `json:"command"`
}
type UnknownFileSystemSpecialPath ¶
type UnknownFileSystemSpecialPath struct {
Path string `json:"path"`
Subpath *LegacyAppPathString `json:"subpath,omitempty"`
}
type UpdatePatchChangeKind ¶
type UpdatePatchChangeKind struct {
MovePath *string `json:"move_path,omitempty"`
}
type UserInput ¶
type UserInput struct {
// Tag is the value of the "type" property observed on decode.
Tag string
Audio *AudioUserInput
Image *ImageUserInput
LocalAudio *LocalAudioUserInput
LocalImage *LocalImageUserInput
Mention *MentionUserInput
Skill *SkillUserInput
Text *TextUserInput
// contains filtered or unexported fields
}
UserInput is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (UserInput) MarshalJSON ¶
func (*UserInput) UnmarshalJSON ¶
type UserMessageThreadItem ¶
type UserMessageThreadItem struct {
ClientID *string `json:"clientId,omitempty"`
Content []UserInput `json:"content"`
ID string `json:"id"`
}
func (UserMessageThreadItem) MarshalJSON ¶
func (v UserMessageThreadItem) MarshalJSON() ([]byte, error)
type WarningNotification ¶
type WebSearchAction ¶
type WebSearchAction struct {
// Tag is the value of the "type" property observed on decode.
Tag string
FindInPage *FindInPageWebSearchAction
OpenPage *OpenPageWebSearchAction
Other *OtherWebSearchAction
Search *SearchWebSearchAction
// contains filtered or unexported fields
}
WebSearchAction is an internally-tagged union (tag property "type"). Unknown variants decode without error: only Tag and Raw() are populated.
func (WebSearchAction) MarshalJSON ¶
func (u WebSearchAction) MarshalJSON() ([]byte, error)
func (WebSearchAction) Raw ¶
func (u WebSearchAction) Raw() []byte
Raw returns the original JSON for this union value, if it was decoded.
func (*WebSearchAction) UnmarshalJSON ¶
func (u *WebSearchAction) UnmarshalJSON(data []byte) error
type WebSearchCallResponseItem ¶
type WebSearchCallResponseItem struct {
Action *ResponsesApiWebSearchAction `json:"action,omitempty"`
ID *string `json:"id,omitempty"`
InternalChatMessageMetadataPassthrough *InternalChatMessageMetadataPassthrough `json:"internal_chat_message_metadata_passthrough,omitempty"`
Status *string `json:"status,omitempty"`
}
type WebSearchThreadItem ¶
type WebSearchThreadItem struct {
Action *WebSearchAction `json:"action,omitempty"`
ID string `json:"id"`
Query string `json:"query"`
// Structured search results returned out-of-band by standalone web search.
Results []any `json:"results,omitempty"`
}
type WorkspaceWriteSandboxPolicy ¶
type WorkspaceWriteSandboxPolicy struct {
ExcludeSlashTmp *bool `json:"excludeSlashTmp,omitempty"`
ExcludeTmpdirEnvVar *bool `json:"excludeTmpdirEnvVar,omitempty"`
NetworkAccess *bool `json:"networkAccess,omitempty"`
WritableRoots []AbsolutePathBuf `json:"writableRoots,omitempty"`
}