源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s

This commit is contained in:
agent-radar committed 2026-09-01 20:17:27 +08:00
commit 2ed3415fb7
8018 files changed
+1936476

No files matched your search

@@ -0,0 +1,169 @@
// Code generated by runtime/codexproto/internal/codegen. DO NOT EDIT.
// Source codex commit: 6d2168f06ae275d5e1f73cabf935d2bcc8549998
package codexproto
// Aliases for JSON-suffixed schema types.
type SanitizedAccountLoginCompletedNotification = SanitizedAccountLoginCompletedNotificationJSON
type SanitizedAccountRateLimitsUpdatedNotification = SanitizedAccountRateLimitsUpdatedNotificationJSON
type SanitizedAccountUpdatedNotification = SanitizedAccountUpdatedNotificationJSON
type SanitizedAgentMessageDeltaNotification = SanitizedAgentMessageDeltaNotificationJSON
type SanitizedAppListUpdatedNotification = SanitizedAppListUpdatedNotificationJSON
type SanitizedApplyPatchApprovalParams = SanitizedApplyPatchApprovalParamsJSON
type SanitizedApplyPatchApprovalResponse = SanitizedApplyPatchApprovalResponseJSON
type SanitizedAppsListParams = SanitizedAppsListParamsJSON
type SanitizedAppsListResponse = SanitizedAppsListResponseJSON
type SanitizedAttestationGenerateResponse = SanitizedAttestationGenerateResponseJSON
type SanitizedCancelLoginAccountParams = SanitizedCancelLoginAccountParamsJSON
type SanitizedCancelLoginAccountResponse = SanitizedCancelLoginAccountResponseJSON
type SanitizedChatgptAuthTokensRefreshParams = SanitizedChatgptAuthTokensRefreshParamsJSON
type SanitizedChatgptAuthTokensRefreshResponse = SanitizedChatgptAuthTokensRefreshResponseJSON
type SanitizedCommandExecResponse = SanitizedCommandExecResponseJSON
type SanitizedCommandExecTerminateParams = SanitizedCommandExecTerminateParamsJSON
type SanitizedCommandExecWriteParams = SanitizedCommandExecWriteParamsJSON
type SanitizedCommandExecutionOutputDeltaNotification = SanitizedCommandExecutionOutputDeltaNotificationJSON
type SanitizedCommandExecutionRequestApprovalResponse = SanitizedCommandExecutionRequestApprovalResponseJSON
type SanitizedConfigBatchWriteParams = SanitizedConfigBatchWriteParamsJSON
type SanitizedConfigReadParams = SanitizedConfigReadParamsJSON
type SanitizedConfigRequirementsReadResponse = SanitizedConfigRequirementsReadResponseJSON
type SanitizedConfigValueWriteParams = SanitizedConfigValueWriteParamsJSON
type SanitizedConfigWarningNotification = SanitizedConfigWarningNotificationJSON
type SanitizedConsumeAccountRateLimitResetCreditParams = SanitizedConsumeAccountRateLimitResetCreditParamsJSON
type SanitizedConsumeAccountRateLimitResetCreditResponse = SanitizedConsumeAccountRateLimitResetCreditResponseJSON
type SanitizedContextCompactedNotification = SanitizedContextCompactedNotificationJSON
type SanitizedDeprecationNoticeNotification = SanitizedDeprecationNoticeNotificationJSON
type SanitizedDynamicToolCallParams = SanitizedDynamicToolCallParamsJSON
type SanitizedDynamicToolCallResponse = SanitizedDynamicToolCallResponseJSON
type SanitizedErrorNotification = SanitizedErrorNotificationJSON
type SanitizedExecCommandApprovalParams = SanitizedExecCommandApprovalParamsJSON
type SanitizedExecCommandApprovalResponse = SanitizedExecCommandApprovalResponseJSON
type SanitizedExperimentalFeatureEnablementSetParams = SanitizedExperimentalFeatureEnablementSetParamsJSON
type SanitizedExperimentalFeatureEnablementSetResponse = SanitizedExperimentalFeatureEnablementSetResponseJSON
type SanitizedExperimentalFeatureListParams = SanitizedExperimentalFeatureListParamsJSON
type SanitizedExternalAgentConfigDetectParams = SanitizedExternalAgentConfigDetectParamsJSON
type SanitizedExternalAgentConfigDetectResponse = SanitizedExternalAgentConfigDetectResponseJSON
type SanitizedExternalAgentConfigImportCompletedNotification = SanitizedExternalAgentConfigImportCompletedNotificationJSON
type SanitizedExternalAgentConfigImportHistoriesReadResponse = SanitizedExternalAgentConfigImportHistoriesReadResponseJSON
type SanitizedExternalAgentConfigImportParams = SanitizedExternalAgentConfigImportParamsJSON
type SanitizedExternalAgentConfigImportProgressNotification = SanitizedExternalAgentConfigImportProgressNotificationJSON
type SanitizedExternalAgentConfigImportResponse = SanitizedExternalAgentConfigImportResponseJSON
type SanitizedFeedbackUploadParams = SanitizedFeedbackUploadParamsJSON
type SanitizedFeedbackUploadResponse = SanitizedFeedbackUploadResponseJSON
type SanitizedFileChangeOutputDeltaNotification = SanitizedFileChangeOutputDeltaNotificationJSON
type SanitizedFileChangePatchUpdatedNotification = SanitizedFileChangePatchUpdatedNotificationJSON
type SanitizedFileChangeRequestApprovalParams = SanitizedFileChangeRequestApprovalParamsJSON
type SanitizedFileChangeRequestApprovalResponse = SanitizedFileChangeRequestApprovalResponseJSON
type SanitizedFsGetMetadataResponse = SanitizedFsGetMetadataResponseJSON
type SanitizedFsReadDirectoryResponse = SanitizedFsReadDirectoryResponseJSON
type SanitizedFsReadFileResponse = SanitizedFsReadFileResponseJSON
type SanitizedFsUnwatchParams = SanitizedFsUnwatchParamsJSON
type SanitizedFuzzyFileSearchParams = SanitizedFuzzyFileSearchParamsJSON
type SanitizedFuzzyFileSearchResponse = SanitizedFuzzyFileSearchResponseJSON
type SanitizedFuzzyFileSearchSessionCompletedNotification = SanitizedFuzzyFileSearchSessionCompletedNotificationJSON
type SanitizedFuzzyFileSearchSessionUpdatedNotification = SanitizedFuzzyFileSearchSessionUpdatedNotificationJSON
type SanitizedGetAccountParams = SanitizedGetAccountParamsJSON
type SanitizedGetAccountResponse = SanitizedGetAccountResponseJSON
type SanitizedGetAccountTokenUsageResponse = SanitizedGetAccountTokenUsageResponseJSON
type SanitizedGetWorkspaceMessagesResponse = SanitizedGetWorkspaceMessagesResponseJSON
type SanitizedGuardianWarningNotification = SanitizedGuardianWarningNotificationJSON
type SanitizedHooksListParams = SanitizedHooksListParamsJSON
type SanitizedInitializeParams = SanitizedInitializeParamsJSON
type SanitizedListMCPServerStatusParams = SanitizedListMCPServerStatusParamsJSON
type SanitizedListMCPServerStatusResponse = SanitizedListMCPServerStatusResponseJSON
type SanitizedMCPResourceReadParams = SanitizedMCPResourceReadParamsJSON
type SanitizedMCPResourceReadResponse = SanitizedMCPResourceReadResponseJSON
type SanitizedMCPServerElicitationRequestResponse = SanitizedMCPServerElicitationRequestResponseJSON
type SanitizedMCPServerOauthLoginCompletedNotification = SanitizedMCPServerOauthLoginCompletedNotificationJSON
type SanitizedMCPServerOauthLoginParams = SanitizedMCPServerOauthLoginParamsJSON
type SanitizedMCPServerOauthLoginResponse = SanitizedMCPServerOauthLoginResponseJSON
type SanitizedMCPServerStatusUpdatedNotification = SanitizedMCPServerStatusUpdatedNotificationJSON
type SanitizedMCPServerToolCallParams = SanitizedMCPServerToolCallParamsJSON
type SanitizedMCPServerToolCallResponse = SanitizedMCPServerToolCallResponseJSON
type SanitizedMCPToolCallProgressNotification = SanitizedMCPToolCallProgressNotificationJSON
type SanitizedMarketplaceAddParams = SanitizedMarketplaceAddParamsJSON
type SanitizedMarketplaceRemoveParams = SanitizedMarketplaceRemoveParamsJSON
type SanitizedMarketplaceUpgradeParams = SanitizedMarketplaceUpgradeParamsJSON
type SanitizedModelListParams = SanitizedModelListParamsJSON
type SanitizedModelListResponse = SanitizedModelListResponseJSON
type SanitizedModelProviderCapabilitiesReadResponse = SanitizedModelProviderCapabilitiesReadResponseJSON
type SanitizedModelReroutedNotification = SanitizedModelReroutedNotificationJSON
type SanitizedModelSafetyBufferingUpdatedNotification = SanitizedModelSafetyBufferingUpdatedNotificationJSON
type SanitizedModelVerificationNotification = SanitizedModelVerificationNotificationJSON
type SanitizedPermissionProfileListParams = SanitizedPermissionProfileListParamsJSON
type SanitizedPermissionProfileListResponse = SanitizedPermissionProfileListResponseJSON
type SanitizedPermissionsRequestApprovalResponse = SanitizedPermissionsRequestApprovalResponseJSON
type SanitizedPlanDeltaNotification = SanitizedPlanDeltaNotificationJSON
type SanitizedPluginInstallResponse = SanitizedPluginInstallResponseJSON
type SanitizedPluginShareCheckoutParams = SanitizedPluginShareCheckoutParamsJSON
type SanitizedPluginShareDeleteParams = SanitizedPluginShareDeleteParamsJSON
type SanitizedPluginShareSaveResponse = SanitizedPluginShareSaveResponseJSON
type SanitizedPluginShareUpdateTargetsParams = SanitizedPluginShareUpdateTargetsParamsJSON
type SanitizedPluginShareUpdateTargetsResponse = SanitizedPluginShareUpdateTargetsResponseJSON
type SanitizedPluginSkillReadParams = SanitizedPluginSkillReadParamsJSON
type SanitizedPluginSkillReadResponse = SanitizedPluginSkillReadResponseJSON
type SanitizedPluginUninstallParams = SanitizedPluginUninstallParamsJSON
type SanitizedProcessExitedNotification = SanitizedProcessExitedNotificationJSON
type SanitizedRawResponseItemCompletedNotification = SanitizedRawResponseItemCompletedNotificationJSON
type SanitizedReasoningSummaryPartAddedNotification = SanitizedReasoningSummaryPartAddedNotificationJSON
type SanitizedReasoningSummaryTextDeltaNotification = SanitizedReasoningSummaryTextDeltaNotificationJSON
type SanitizedReasoningTextDeltaNotification = SanitizedReasoningTextDeltaNotificationJSON
type SanitizedRemoteControlStatusChangedNotification = SanitizedRemoteControlStatusChangedNotificationJSON
type SanitizedReviewStartParams = SanitizedReviewStartParamsJSON
type SanitizedSendAddCreditsNudgeEmailParams = SanitizedSendAddCreditsNudgeEmailParamsJSON
type SanitizedSendAddCreditsNudgeEmailResponse = SanitizedSendAddCreditsNudgeEmailResponseJSON
type SanitizedServerRequestResolvedNotification = SanitizedServerRequestResolvedNotificationJSON
type SanitizedSkillsConfigWriteResponse = SanitizedSkillsConfigWriteResponseJSON
type SanitizedSkillsListParams = SanitizedSkillsListParamsJSON
type SanitizedTerminalInteractionNotification = SanitizedTerminalInteractionNotificationJSON
type SanitizedThreadApproveGuardianDeniedActionParams = SanitizedThreadApproveGuardianDeniedActionParamsJSON
type SanitizedThreadArchiveParams = SanitizedThreadArchiveParamsJSON
type SanitizedThreadArchivedNotification = SanitizedThreadArchivedNotificationJSON
type SanitizedThreadClosedNotification = SanitizedThreadClosedNotificationJSON
type SanitizedThreadCompactStartParams = SanitizedThreadCompactStartParamsJSON
type SanitizedThreadDeleteParams = SanitizedThreadDeleteParamsJSON
type SanitizedThreadDeletedNotification = SanitizedThreadDeletedNotificationJSON
type SanitizedThreadGoalClearParams = SanitizedThreadGoalClearParamsJSON
type SanitizedThreadGoalClearResponse = SanitizedThreadGoalClearResponseJSON
type SanitizedThreadGoalClearedNotification = SanitizedThreadGoalClearedNotificationJSON
type SanitizedThreadGoalGetParams = SanitizedThreadGoalGetParamsJSON
type SanitizedThreadGoalGetResponse = SanitizedThreadGoalGetResponseJSON
type SanitizedThreadGoalSetParams = SanitizedThreadGoalSetParamsJSON
type SanitizedThreadGoalSetResponse = SanitizedThreadGoalSetResponseJSON
type SanitizedThreadGoalUpdatedNotification = SanitizedThreadGoalUpdatedNotificationJSON
type SanitizedThreadInjectItemsParams = SanitizedThreadInjectItemsParamsJSON
type SanitizedThreadListParams = SanitizedThreadListParamsJSON
type SanitizedThreadLoadedListParams = SanitizedThreadLoadedListParamsJSON
type SanitizedThreadLoadedListResponse = SanitizedThreadLoadedListResponseJSON
type SanitizedThreadMetadataUpdateParams = SanitizedThreadMetadataUpdateParamsJSON
type SanitizedThreadNameUpdatedNotification = SanitizedThreadNameUpdatedNotificationJSON
type SanitizedThreadReadParams = SanitizedThreadReadParamsJSON
type SanitizedThreadRealtimeClosedNotification = SanitizedThreadRealtimeClosedNotificationJSON
type SanitizedThreadRealtimeErrorNotification = SanitizedThreadRealtimeErrorNotificationJSON
type SanitizedThreadRealtimeItemAddedNotification = SanitizedThreadRealtimeItemAddedNotificationJSON
type SanitizedThreadRealtimeOutputAudioDeltaNotification = SanitizedThreadRealtimeOutputAudioDeltaNotificationJSON
type SanitizedThreadRealtimeSdpNotification = SanitizedThreadRealtimeSdpNotificationJSON
type SanitizedThreadRealtimeStartedNotification = SanitizedThreadRealtimeStartedNotificationJSON
type SanitizedThreadRealtimeTranscriptDeltaNotification = SanitizedThreadRealtimeTranscriptDeltaNotificationJSON
type SanitizedThreadRealtimeTranscriptDoneNotification = SanitizedThreadRealtimeTranscriptDoneNotificationJSON
type SanitizedThreadRollbackParams = SanitizedThreadRollbackParamsJSON
type SanitizedThreadSetNameParams = SanitizedThreadSetNameParamsJSON
type SanitizedThreadShellCommandParams = SanitizedThreadShellCommandParamsJSON
type SanitizedThreadStatusChangedNotification = SanitizedThreadStatusChangedNotificationJSON
type SanitizedThreadTokenUsageUpdatedNotification = SanitizedThreadTokenUsageUpdatedNotificationJSON
type SanitizedThreadUnarchiveParams = SanitizedThreadUnarchiveParamsJSON
type SanitizedThreadUnarchivedNotification = SanitizedThreadUnarchivedNotificationJSON
type SanitizedThreadUnsubscribeParams = SanitizedThreadUnsubscribeParamsJSON
type SanitizedThreadUnsubscribeResponse = SanitizedThreadUnsubscribeResponseJSON
type SanitizedToolRequestUserInputParams = SanitizedToolRequestUserInputParamsJSON
type SanitizedToolRequestUserInputResponse = SanitizedToolRequestUserInputResponseJSON
type SanitizedTurnDiffUpdatedNotification = SanitizedTurnDiffUpdatedNotificationJSON
type SanitizedTurnInterruptParams = SanitizedTurnInterruptParamsJSON
type SanitizedTurnModerationMetadataNotification = SanitizedTurnModerationMetadataNotificationJSON
type SanitizedTurnPlanUpdatedNotification = SanitizedTurnPlanUpdatedNotificationJSON
type SanitizedTurnSteerParams = SanitizedTurnSteerParamsJSON
type SanitizedTurnSteerResponse = SanitizedTurnSteerResponseJSON
type SanitizedWarningNotification = SanitizedWarningNotificationJSON
type SanitizedWindowsSandboxReadinessResponse = SanitizedWindowsSandboxReadinessResponseJSON
type SanitizedWindowsSandboxSetupCompletedNotification = SanitizedWindowsSandboxSetupCompletedNotificationJSON
type SanitizedWindowsSandboxSetupStartResponse = SanitizedWindowsSandboxSetupStartResponseJSON
type SanitizedWindowsWorldWritableWarningNotification = SanitizedWindowsWorldWritableWarningNotificationJSON
@@ -0,0 +1,34 @@
package codexproto
import (
"context"
"encoding/json"
)
// JSONRPCRequest is the minimal JSON-RPC request envelope used by generated
// request builders and server-request dispatch.
type JSONRPCRequest struct {
ID RequestID `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
// Caller is the transport seam used by generated client request helpers.
type Caller interface {
Call(ctx context.Context, method string, params any, result any) error
}
// Client implements generated typed client request helpers over a Caller.
type Client struct {
caller Caller
}
// NewClient returns a typed Codex app-server protocol client wrapper.
func NewClient(caller Caller) *Client {
return &Client{caller: caller}
}
// Call forwards an untyped JSON-RPC call through the wrapped transport.
func (c *Client) Call(ctx context.Context, method string, params any, result any) error {
return c.caller.Call(ctx, method, params, result)
}
@@ -0,0 +1,819 @@
// Code generated by runtime/codexproto/internal/codegen. DO NOT EDIT.
// Source codex commit: 6d2168f06ae275d5e1f73cabf935d2bcc8549998
package codexproto
import (
"context"
"encoding/json"
)
// ClientRequests exposes typed JSON-RPC calls supported by the app-server.
type ClientRequests interface {
AccountLoginCancel(ctx context.Context, params CancelLoginAccountParams) (*CancelLoginAccountResponse, error)
AccountLoginStart(ctx context.Context, params LoginAccountParams) (*LoginAccountResponse, error)
AccountLogout(ctx context.Context) (*LogoutAccountResponse, error)
AccountRateLimitResetCreditConsume(ctx context.Context, params ConsumeAccountRateLimitResetCreditParams) (*ConsumeAccountRateLimitResetCreditResponse, error)
AccountRateLimitsRead(ctx context.Context) (*GetAccountRateLimitsResponse, error)
AccountRead(ctx context.Context, params GetAccountParams) (*GetAccountResponse, error)
AccountSendAddCreditsNudgeEmail(ctx context.Context, params SendAddCreditsNudgeEmailParams) (*SendAddCreditsNudgeEmailResponse, error)
AccountUsageRead(ctx context.Context) (*GetAccountTokenUsageResponse, error)
AccountWorkspaceMessagesRead(ctx context.Context) (*GetWorkspaceMessagesResponse, error)
AppList(ctx context.Context, params AppsListParams) (*AppsListResponse, error)
CollaborationModeList(ctx context.Context, params CollaborationModeListParams) (*CollaborationModeListResponse, error)
CommandExec(ctx context.Context, params CommandExecParams) (*CommandExecResponse, error)
CommandExecResize(ctx context.Context, params CommandExecResizeParams) (*CommandExecResizeResponse, error)
CommandExecTerminate(ctx context.Context, params CommandExecTerminateParams) (*CommandExecTerminateResponse, error)
CommandExecWrite(ctx context.Context, params CommandExecWriteParams) (*CommandExecWriteResponse, error)
ConfigBatchWrite(ctx context.Context, params ConfigBatchWriteParams) (*ConfigWriteResponse, error)
ConfigMcpServerReload(ctx context.Context) (*McpServerRefreshResponse, error)
ConfigRead(ctx context.Context, params ConfigReadParams) (*ConfigReadResponse, error)
ConfigValueWrite(ctx context.Context, params ConfigValueWriteParams) (*ConfigWriteResponse, error)
ConfigRequirementsRead(ctx context.Context) (*ConfigRequirementsReadResponse, error)
ExperimentalFeatureEnablementSet(ctx context.Context, params ExperimentalFeatureEnablementSetParams) (*ExperimentalFeatureEnablementSetResponse, error)
ExperimentalFeatureList(ctx context.Context, params ExperimentalFeatureListParams) (*ExperimentalFeatureListResponse, error)
ExternalAgentConfigDetect(ctx context.Context, params ExternalAgentConfigDetectParams) (*ExternalAgentConfigDetectResponse, error)
ExternalAgentConfigImport(ctx context.Context, params ExternalAgentConfigImportParams) (*ExternalAgentConfigImportResponse, error)
ExternalAgentConfigImportReadHistories(ctx context.Context) (*ExternalAgentConfigImportHistoriesReadResponse, error)
FeedbackUpload(ctx context.Context, params FeedbackUploadParams) (*FeedbackUploadResponse, error)
FsCopy(ctx context.Context, params FsCopyParams) (*FsCopyResponse, error)
FsCreateDirectory(ctx context.Context, params FsCreateDirectoryParams) (*FsCreateDirectoryResponse, error)
FsGetMetadata(ctx context.Context, params FsGetMetadataParams) (*FsGetMetadataResponse, error)
FsReadDirectory(ctx context.Context, params FsReadDirectoryParams) (*FsReadDirectoryResponse, error)
FsReadFile(ctx context.Context, params FsReadFileParams) (*FsReadFileResponse, error)
FsRemove(ctx context.Context, params FsRemoveParams) (*FsRemoveResponse, error)
FsUnwatch(ctx context.Context, params FsUnwatchParams) (*FsUnwatchResponse, error)
FsWatch(ctx context.Context, params FsWatchParams) (*FsWatchResponse, error)
FsWriteFile(ctx context.Context, params FsWriteFileParams) (*FsWriteFileResponse, error)
FuzzyFileSearch(ctx context.Context, params FuzzyFileSearchParams) (*FuzzyFileSearchResponse, error)
HooksList(ctx context.Context, params HooksListParams) (*HooksListResponse, error)
Initialize(ctx context.Context, params InitializeParams) (*InitializeResponse, error)
MarketplaceAdd(ctx context.Context, params MarketplaceAddParams) (*MarketplaceAddResponse, error)
MarketplaceRemove(ctx context.Context, params MarketplaceRemoveParams) (*MarketplaceRemoveResponse, error)
MarketplaceUpgrade(ctx context.Context, params MarketplaceUpgradeParams) (*MarketplaceUpgradeResponse, error)
McpServerOauthLogin(ctx context.Context, params McpServerOauthLoginParams) (*McpServerOauthLoginResponse, error)
McpServerResourceRead(ctx context.Context, params McpResourceReadParams) (*McpResourceReadResponse, error)
McpServerToolCall(ctx context.Context, params McpServerToolCallParams) (*McpServerToolCallResponse, error)
McpServerStatusList(ctx context.Context, params ListMcpServerStatusParams) (*ListMcpServerStatusResponse, error)
ModelList(ctx context.Context, params ModelListParams) (*ModelListResponse, error)
ModelProviderCapabilitiesRead(ctx context.Context, params ModelProviderCapabilitiesReadParams) (*ModelProviderCapabilitiesReadResponse, error)
PermissionProfileList(ctx context.Context, params PermissionProfileListParams) (*PermissionProfileListResponse, error)
PluginInstall(ctx context.Context, params PluginInstallParams) (*PluginInstallResponse, error)
PluginInstalled(ctx context.Context, params PluginInstalledParams) (*PluginInstalledResponse, error)
PluginList(ctx context.Context, params PluginListParams) (*PluginListResponse, error)
PluginRead(ctx context.Context, params PluginReadParams) (*PluginReadResponse, error)
PluginShareCheckout(ctx context.Context, params PluginShareCheckoutParams) (*PluginShareCheckoutResponse, error)
PluginShareDelete(ctx context.Context, params PluginShareDeleteParams) (*PluginShareDeleteResponse, error)
PluginShareList(ctx context.Context, params PluginShareListParams) (*PluginShareListResponse, error)
PluginShareSave(ctx context.Context, params PluginShareSaveParams) (*PluginShareSaveResponse, error)
PluginShareUpdateTargets(ctx context.Context, params PluginShareUpdateTargetsParams) (*PluginShareUpdateTargetsResponse, error)
PluginSkillRead(ctx context.Context, params PluginSkillReadParams) (*PluginSkillReadResponse, error)
PluginUninstall(ctx context.Context, params PluginUninstallParams) (*PluginUninstallResponse, error)
ReviewStart(ctx context.Context, params ReviewStartParams) (*ReviewStartResponse, error)
SkillsConfigWrite(ctx context.Context, params SkillsConfigWriteParams) (*SkillsConfigWriteResponse, error)
SkillsExtraRootsSet(ctx context.Context, params SkillsExtraRootsSetParams) (*SkillsExtraRootsSetResponse, error)
SkillsList(ctx context.Context, params SkillsListParams) (*SkillsListResponse, error)
ThreadApproveGuardianDeniedAction(ctx context.Context, params ThreadApproveGuardianDeniedActionParams) (*ThreadApproveGuardianDeniedActionResponse, error)
ThreadArchive(ctx context.Context, params ThreadArchiveParams) (*ThreadArchiveResponse, error)
ThreadCompactStart(ctx context.Context, params ThreadCompactStartParams) (*ThreadCompactStartResponse, error)
ThreadDelete(ctx context.Context, params ThreadDeleteParams) (*ThreadDeleteResponse, error)
ThreadFork(ctx context.Context, params ThreadForkParams) (*ThreadForkResponse, error)
ThreadGoalClear(ctx context.Context, params ThreadGoalClearParams) (*ThreadGoalClearResponse, error)
ThreadGoalGet(ctx context.Context, params ThreadGoalGetParams) (*ThreadGoalGetResponse, error)
ThreadGoalSet(ctx context.Context, params ThreadGoalSetParams) (*ThreadGoalSetResponse, error)
ThreadInjectItems(ctx context.Context, params ThreadInjectItemsParams) (*ThreadInjectItemsResponse, error)
ThreadList(ctx context.Context, params ThreadListParams) (*ThreadListResponse, error)
ThreadLoadedList(ctx context.Context, params ThreadLoadedListParams) (*ThreadLoadedListResponse, error)
ThreadMetadataUpdate(ctx context.Context, params ThreadMetadataUpdateParams) (*ThreadMetadataUpdateResponse, error)
ThreadNameSet(ctx context.Context, params ThreadSetNameParams) (*ThreadSetNameResponse, error)
ThreadRead(ctx context.Context, params ThreadReadParams) (*ThreadReadResponse, error)
ThreadResume(ctx context.Context, params ThreadResumeParams) (*ThreadResumeResponse, error)
ThreadRollback(ctx context.Context, params ThreadRollbackParams) (*ThreadRollbackResponse, error)
ThreadShellCommand(ctx context.Context, params ThreadShellCommandParams) (*ThreadShellCommandResponse, error)
ThreadStart(ctx context.Context, params ThreadStartParams) (*ThreadStartResponse, error)
ThreadUnarchive(ctx context.Context, params ThreadUnarchiveParams) (*ThreadUnarchiveResponse, error)
ThreadUnsubscribe(ctx context.Context, params ThreadUnsubscribeParams) (*ThreadUnsubscribeResponse, error)
TurnInterrupt(ctx context.Context, params TurnInterruptParams) (*TurnInterruptResponse, error)
TurnStart(ctx context.Context, params TurnStartParams) (*TurnStartResponse, error)
TurnSteer(ctx context.Context, params TurnSteerParams) (*TurnSteerResponse, error)
WindowsSandboxReadiness(ctx context.Context) (*WindowsSandboxReadinessResponse, error)
WindowsSandboxSetupStart(ctx context.Context, params WindowsSandboxSetupStartParams) (*WindowsSandboxSetupStartResponse, error)
}
// Client implements ClientRequests using JSON-RPC.
func (c *Client) AccountLoginCancel(ctx context.Context, params CancelLoginAccountParams) (*CancelLoginAccountResponse, error) {
var result CancelLoginAccountResponse
if err := c.Call(ctx, "account/login/cancel", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountLoginStart(ctx context.Context, params LoginAccountParams) (*LoginAccountResponse, error) {
var result LoginAccountResponse
if err := c.Call(ctx, "account/login/start", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountLogout(ctx context.Context) (*LogoutAccountResponse, error) {
var result LogoutAccountResponse
if err := c.Call(ctx, "account/logout", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountRateLimitResetCreditConsume(ctx context.Context, params ConsumeAccountRateLimitResetCreditParams) (*ConsumeAccountRateLimitResetCreditResponse, error) {
var result ConsumeAccountRateLimitResetCreditResponse
if err := c.Call(ctx, "account/rateLimitResetCredit/consume", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountRateLimitsRead(ctx context.Context) (*GetAccountRateLimitsResponse, error) {
var result GetAccountRateLimitsResponse
if err := c.Call(ctx, "account/rateLimits/read", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountRead(ctx context.Context, params GetAccountParams) (*GetAccountResponse, error) {
var result GetAccountResponse
if err := c.Call(ctx, "account/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountSendAddCreditsNudgeEmail(ctx context.Context, params SendAddCreditsNudgeEmailParams) (*SendAddCreditsNudgeEmailResponse, error) {
var result SendAddCreditsNudgeEmailResponse
if err := c.Call(ctx, "account/sendAddCreditsNudgeEmail", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountUsageRead(ctx context.Context) (*GetAccountTokenUsageResponse, error) {
var result GetAccountTokenUsageResponse
if err := c.Call(ctx, "account/usage/read", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AccountWorkspaceMessagesRead(ctx context.Context) (*GetWorkspaceMessagesResponse, error) {
var result GetWorkspaceMessagesResponse
if err := c.Call(ctx, "account/workspaceMessages/read", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) AppList(ctx context.Context, params AppsListParams) (*AppsListResponse, error) {
var result AppsListResponse
if err := c.Call(ctx, "app/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) CollaborationModeList(ctx context.Context, params CollaborationModeListParams) (*CollaborationModeListResponse, error) {
var result CollaborationModeListResponse
if err := c.Call(ctx, "collaborationMode/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) CommandExec(ctx context.Context, params CommandExecParams) (*CommandExecResponse, error) {
var result CommandExecResponse
if err := c.Call(ctx, "command/exec", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) CommandExecResize(ctx context.Context, params CommandExecResizeParams) (*CommandExecResizeResponse, error) {
var result CommandExecResizeResponse
if err := c.Call(ctx, "command/exec/resize", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) CommandExecTerminate(ctx context.Context, params CommandExecTerminateParams) (*CommandExecTerminateResponse, error) {
var result CommandExecTerminateResponse
if err := c.Call(ctx, "command/exec/terminate", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) CommandExecWrite(ctx context.Context, params CommandExecWriteParams) (*CommandExecWriteResponse, error) {
var result CommandExecWriteResponse
if err := c.Call(ctx, "command/exec/write", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ConfigBatchWrite(ctx context.Context, params ConfigBatchWriteParams) (*ConfigWriteResponse, error) {
var result ConfigWriteResponse
if err := c.Call(ctx, "config/batchWrite", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ConfigMcpServerReload(ctx context.Context) (*McpServerRefreshResponse, error) {
var result McpServerRefreshResponse
if err := c.Call(ctx, "config/mcpServer/reload", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ConfigRead(ctx context.Context, params ConfigReadParams) (*ConfigReadResponse, error) {
var result ConfigReadResponse
if err := c.Call(ctx, "config/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ConfigValueWrite(ctx context.Context, params ConfigValueWriteParams) (*ConfigWriteResponse, error) {
var result ConfigWriteResponse
if err := c.Call(ctx, "config/value/write", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ConfigRequirementsRead(ctx context.Context) (*ConfigRequirementsReadResponse, error) {
var result ConfigRequirementsReadResponse
if err := c.Call(ctx, "configRequirements/read", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ExperimentalFeatureEnablementSet(ctx context.Context, params ExperimentalFeatureEnablementSetParams) (*ExperimentalFeatureEnablementSetResponse, error) {
var result ExperimentalFeatureEnablementSetResponse
if err := c.Call(ctx, "experimentalFeature/enablement/set", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ExperimentalFeatureList(ctx context.Context, params ExperimentalFeatureListParams) (*ExperimentalFeatureListResponse, error) {
var result ExperimentalFeatureListResponse
if err := c.Call(ctx, "experimentalFeature/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ExternalAgentConfigDetect(ctx context.Context, params ExternalAgentConfigDetectParams) (*ExternalAgentConfigDetectResponse, error) {
var result ExternalAgentConfigDetectResponse
if err := c.Call(ctx, "externalAgentConfig/detect", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ExternalAgentConfigImport(ctx context.Context, params ExternalAgentConfigImportParams) (*ExternalAgentConfigImportResponse, error) {
var result ExternalAgentConfigImportResponse
if err := c.Call(ctx, "externalAgentConfig/import", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ExternalAgentConfigImportReadHistories(ctx context.Context) (*ExternalAgentConfigImportHistoriesReadResponse, error) {
var result ExternalAgentConfigImportHistoriesReadResponse
if err := c.Call(ctx, "externalAgentConfig/import/readHistories", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FeedbackUpload(ctx context.Context, params FeedbackUploadParams) (*FeedbackUploadResponse, error) {
var result FeedbackUploadResponse
if err := c.Call(ctx, "feedback/upload", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsCopy(ctx context.Context, params FsCopyParams) (*FsCopyResponse, error) {
var result FsCopyResponse
if err := c.Call(ctx, "fs/copy", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsCreateDirectory(ctx context.Context, params FsCreateDirectoryParams) (*FsCreateDirectoryResponse, error) {
var result FsCreateDirectoryResponse
if err := c.Call(ctx, "fs/createDirectory", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsGetMetadata(ctx context.Context, params FsGetMetadataParams) (*FsGetMetadataResponse, error) {
var result FsGetMetadataResponse
if err := c.Call(ctx, "fs/getMetadata", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsReadDirectory(ctx context.Context, params FsReadDirectoryParams) (*FsReadDirectoryResponse, error) {
var result FsReadDirectoryResponse
if err := c.Call(ctx, "fs/readDirectory", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsReadFile(ctx context.Context, params FsReadFileParams) (*FsReadFileResponse, error) {
var result FsReadFileResponse
if err := c.Call(ctx, "fs/readFile", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsRemove(ctx context.Context, params FsRemoveParams) (*FsRemoveResponse, error) {
var result FsRemoveResponse
if err := c.Call(ctx, "fs/remove", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsUnwatch(ctx context.Context, params FsUnwatchParams) (*FsUnwatchResponse, error) {
var result FsUnwatchResponse
if err := c.Call(ctx, "fs/unwatch", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsWatch(ctx context.Context, params FsWatchParams) (*FsWatchResponse, error) {
var result FsWatchResponse
if err := c.Call(ctx, "fs/watch", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FsWriteFile(ctx context.Context, params FsWriteFileParams) (*FsWriteFileResponse, error) {
var result FsWriteFileResponse
if err := c.Call(ctx, "fs/writeFile", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) FuzzyFileSearch(ctx context.Context, params FuzzyFileSearchParams) (*FuzzyFileSearchResponse, error) {
var result FuzzyFileSearchResponse
if err := c.Call(ctx, "fuzzyFileSearch", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) HooksList(ctx context.Context, params HooksListParams) (*HooksListResponse, error) {
var result HooksListResponse
if err := c.Call(ctx, "hooks/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) Initialize(ctx context.Context, params InitializeParams) (*InitializeResponse, error) {
var result InitializeResponse
if err := c.Call(ctx, "initialize", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) MarketplaceAdd(ctx context.Context, params MarketplaceAddParams) (*MarketplaceAddResponse, error) {
var result MarketplaceAddResponse
if err := c.Call(ctx, "marketplace/add", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) MarketplaceRemove(ctx context.Context, params MarketplaceRemoveParams) (*MarketplaceRemoveResponse, error) {
var result MarketplaceRemoveResponse
if err := c.Call(ctx, "marketplace/remove", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) MarketplaceUpgrade(ctx context.Context, params MarketplaceUpgradeParams) (*MarketplaceUpgradeResponse, error) {
var result MarketplaceUpgradeResponse
if err := c.Call(ctx, "marketplace/upgrade", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) McpServerOauthLogin(ctx context.Context, params McpServerOauthLoginParams) (*McpServerOauthLoginResponse, error) {
var result McpServerOauthLoginResponse
if err := c.Call(ctx, "mcpServer/oauth/login", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) McpServerResourceRead(ctx context.Context, params McpResourceReadParams) (*McpResourceReadResponse, error) {
var result McpResourceReadResponse
if err := c.Call(ctx, "mcpServer/resource/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) McpServerToolCall(ctx context.Context, params McpServerToolCallParams) (*McpServerToolCallResponse, error) {
var result McpServerToolCallResponse
if err := c.Call(ctx, "mcpServer/tool/call", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) McpServerStatusList(ctx context.Context, params ListMcpServerStatusParams) (*ListMcpServerStatusResponse, error) {
var result ListMcpServerStatusResponse
if err := c.Call(ctx, "mcpServerStatus/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ModelList(ctx context.Context, params ModelListParams) (*ModelListResponse, error) {
var result ModelListResponse
if err := c.Call(ctx, "model/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ModelProviderCapabilitiesRead(ctx context.Context, params ModelProviderCapabilitiesReadParams) (*ModelProviderCapabilitiesReadResponse, error) {
var result ModelProviderCapabilitiesReadResponse
if err := c.Call(ctx, "modelProvider/capabilities/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PermissionProfileList(ctx context.Context, params PermissionProfileListParams) (*PermissionProfileListResponse, error) {
var result PermissionProfileListResponse
if err := c.Call(ctx, "permissionProfile/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginInstall(ctx context.Context, params PluginInstallParams) (*PluginInstallResponse, error) {
var result PluginInstallResponse
if err := c.Call(ctx, "plugin/install", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginInstalled(ctx context.Context, params PluginInstalledParams) (*PluginInstalledResponse, error) {
var result PluginInstalledResponse
if err := c.Call(ctx, "plugin/installed", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginList(ctx context.Context, params PluginListParams) (*PluginListResponse, error) {
var result PluginListResponse
if err := c.Call(ctx, "plugin/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginRead(ctx context.Context, params PluginReadParams) (*PluginReadResponse, error) {
var result PluginReadResponse
if err := c.Call(ctx, "plugin/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginShareCheckout(ctx context.Context, params PluginShareCheckoutParams) (*PluginShareCheckoutResponse, error) {
var result PluginShareCheckoutResponse
if err := c.Call(ctx, "plugin/share/checkout", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginShareDelete(ctx context.Context, params PluginShareDeleteParams) (*PluginShareDeleteResponse, error) {
var result PluginShareDeleteResponse
if err := c.Call(ctx, "plugin/share/delete", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginShareList(ctx context.Context, params PluginShareListParams) (*PluginShareListResponse, error) {
var result PluginShareListResponse
if err := c.Call(ctx, "plugin/share/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginShareSave(ctx context.Context, params PluginShareSaveParams) (*PluginShareSaveResponse, error) {
var result PluginShareSaveResponse
if err := c.Call(ctx, "plugin/share/save", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginShareUpdateTargets(ctx context.Context, params PluginShareUpdateTargetsParams) (*PluginShareUpdateTargetsResponse, error) {
var result PluginShareUpdateTargetsResponse
if err := c.Call(ctx, "plugin/share/updateTargets", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginSkillRead(ctx context.Context, params PluginSkillReadParams) (*PluginSkillReadResponse, error) {
var result PluginSkillReadResponse
if err := c.Call(ctx, "plugin/skill/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) PluginUninstall(ctx context.Context, params PluginUninstallParams) (*PluginUninstallResponse, error) {
var result PluginUninstallResponse
if err := c.Call(ctx, "plugin/uninstall", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ReviewStart(ctx context.Context, params ReviewStartParams) (*ReviewStartResponse, error) {
var result ReviewStartResponse
if err := c.Call(ctx, "review/start", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) SkillsConfigWrite(ctx context.Context, params SkillsConfigWriteParams) (*SkillsConfigWriteResponse, error) {
var result SkillsConfigWriteResponse
if err := c.Call(ctx, "skills/config/write", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) SkillsExtraRootsSet(ctx context.Context, params SkillsExtraRootsSetParams) (*SkillsExtraRootsSetResponse, error) {
var result SkillsExtraRootsSetResponse
if err := c.Call(ctx, "skills/extraRoots/set", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) SkillsList(ctx context.Context, params SkillsListParams) (*SkillsListResponse, error) {
var result SkillsListResponse
if err := c.Call(ctx, "skills/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadApproveGuardianDeniedAction(ctx context.Context, params ThreadApproveGuardianDeniedActionParams) (*ThreadApproveGuardianDeniedActionResponse, error) {
var result ThreadApproveGuardianDeniedActionResponse
if err := c.Call(ctx, "thread/approveGuardianDeniedAction", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadArchive(ctx context.Context, params ThreadArchiveParams) (*ThreadArchiveResponse, error) {
var result ThreadArchiveResponse
if err := c.Call(ctx, "thread/archive", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadCompactStart(ctx context.Context, params ThreadCompactStartParams) (*ThreadCompactStartResponse, error) {
var result ThreadCompactStartResponse
if err := c.Call(ctx, "thread/compact/start", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadDelete(ctx context.Context, params ThreadDeleteParams) (*ThreadDeleteResponse, error) {
var result ThreadDeleteResponse
if err := c.Call(ctx, "thread/delete", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadFork(ctx context.Context, params ThreadForkParams) (*ThreadForkResponse, error) {
var result ThreadForkResponse
if err := c.Call(ctx, "thread/fork", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadGoalClear(ctx context.Context, params ThreadGoalClearParams) (*ThreadGoalClearResponse, error) {
var result ThreadGoalClearResponse
if err := c.Call(ctx, "thread/goal/clear", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadGoalGet(ctx context.Context, params ThreadGoalGetParams) (*ThreadGoalGetResponse, error) {
var result ThreadGoalGetResponse
if err := c.Call(ctx, "thread/goal/get", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadGoalSet(ctx context.Context, params ThreadGoalSetParams) (*ThreadGoalSetResponse, error) {
var result ThreadGoalSetResponse
if err := c.Call(ctx, "thread/goal/set", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadInjectItems(ctx context.Context, params ThreadInjectItemsParams) (*ThreadInjectItemsResponse, error) {
var result ThreadInjectItemsResponse
if err := c.Call(ctx, "thread/inject_items", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadList(ctx context.Context, params ThreadListParams) (*ThreadListResponse, error) {
var result ThreadListResponse
if err := c.Call(ctx, "thread/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadLoadedList(ctx context.Context, params ThreadLoadedListParams) (*ThreadLoadedListResponse, error) {
var result ThreadLoadedListResponse
if err := c.Call(ctx, "thread/loaded/list", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadMetadataUpdate(ctx context.Context, params ThreadMetadataUpdateParams) (*ThreadMetadataUpdateResponse, error) {
var result ThreadMetadataUpdateResponse
if err := c.Call(ctx, "thread/metadata/update", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadNameSet(ctx context.Context, params ThreadSetNameParams) (*ThreadSetNameResponse, error) {
var result ThreadSetNameResponse
if err := c.Call(ctx, "thread/name/set", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadRead(ctx context.Context, params ThreadReadParams) (*ThreadReadResponse, error) {
var result ThreadReadResponse
if err := c.Call(ctx, "thread/read", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadResume(ctx context.Context, params ThreadResumeParams) (*ThreadResumeResponse, error) {
var result ThreadResumeResponse
if err := c.Call(ctx, "thread/resume", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadRollback(ctx context.Context, params ThreadRollbackParams) (*ThreadRollbackResponse, error) {
var result ThreadRollbackResponse
if err := c.Call(ctx, "thread/rollback", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadShellCommand(ctx context.Context, params ThreadShellCommandParams) (*ThreadShellCommandResponse, error) {
var result ThreadShellCommandResponse
if err := c.Call(ctx, "thread/shellCommand", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadStart(ctx context.Context, params ThreadStartParams) (*ThreadStartResponse, error) {
var result ThreadStartResponse
if err := c.Call(ctx, "thread/start", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadUnarchive(ctx context.Context, params ThreadUnarchiveParams) (*ThreadUnarchiveResponse, error) {
var result ThreadUnarchiveResponse
if err := c.Call(ctx, "thread/unarchive", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) ThreadUnsubscribe(ctx context.Context, params ThreadUnsubscribeParams) (*ThreadUnsubscribeResponse, error) {
var result ThreadUnsubscribeResponse
if err := c.Call(ctx, "thread/unsubscribe", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) TurnInterrupt(ctx context.Context, params TurnInterruptParams) (*TurnInterruptResponse, error) {
var result TurnInterruptResponse
if err := c.Call(ctx, "turn/interrupt", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) TurnStart(ctx context.Context, params TurnStartParams) (*TurnStartResponse, error) {
var result TurnStartResponse
if err := c.Call(ctx, "turn/start", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) TurnSteer(ctx context.Context, params TurnSteerParams) (*TurnSteerResponse, error) {
var result TurnSteerResponse
if err := c.Call(ctx, "turn/steer", params, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) WindowsSandboxReadiness(ctx context.Context) (*WindowsSandboxReadinessResponse, error) {
var result WindowsSandboxReadinessResponse
if err := c.Call(ctx, "windowsSandbox/readiness", nil, &result); err != nil {
return nil, err
}
return &result, nil
}
func (c *Client) WindowsSandboxSetupStart(ctx context.Context, params WindowsSandboxSetupStartParams) (*WindowsSandboxSetupStartResponse, error) {
var result WindowsSandboxSetupStartResponse
if err := c.Call(ctx, "windowsSandbox/setupStart", params, &result); err != nil {
return nil, err
}
return &result, nil
}
// BuildClientRequest builds a JSON-RPC request for a client method.
func BuildClientRequest(method string, params any, id RequestID) (JSONRPCRequest, error) {
var raw json.RawMessage
if params != nil {
data, err := json.Marshal(params)
if err != nil {
return JSONRPCRequest{}, err
}
raw = data
}
return JSONRPCRequest{ID: id, Method: method, Params: raw}, nil
}
@@ -0,0 +1,6 @@
// Package codexproto contains the generated Codex app-server protocol surface.
//
// The package is generated from vendored upstream JSON Schema artifacts pinned
// to a Codex source commit. It is additive infrastructure for the app-server
// adapter refactor; runtime wiring happens in later steps.
package codexproto
@@ -0,0 +1,196 @@
// Code generated by runtime/codexproto/internal/codegen. DO NOT EDIT.
// Source codex commit: 6d2168f06ae275d5e1f73cabf935d2bcc8549998
package codexproto
// Fallback types for schemas that failed to generate.
type AccountLoginCompletedNotification = SanitizedAccountLoginCompletedNotificationJSON
type AccountRateLimitsUpdatedNotification = SanitizedAccountRateLimitsUpdatedNotificationJSON
type AccountUpdatedNotification = SanitizedAccountUpdatedNotificationJSON
type AgentMessageDeltaNotification = SanitizedAgentMessageDeltaNotificationJSON
type AppListUpdatedNotification = SanitizedAppListUpdatedNotificationJSON
type AppsListResponse = SanitizedAppsListResponseJSON
type AttestationGenerateResponse = SanitizedAttestationGenerateResponseJSON
type CancelLoginAccountResponse = SanitizedCancelLoginAccountResponseJSON
type ChatgptAuthTokensRefreshParams = SanitizedChatgptAuthTokensRefreshParamsJSON
type ChatgptAuthTokensRefreshResponse = SanitizedChatgptAuthTokensRefreshResponseJSON
type CommandExecResponse = SanitizedCommandExecResponseJSON
type CommandExecutionOutputDeltaNotification = SanitizedCommandExecutionOutputDeltaNotificationJSON
type ConfigRequirementsReadResponse = SanitizedConfigRequirementsReadResponseJSON
type ConfigWarningNotification = SanitizedConfigWarningNotificationJSON
type ConsumeAccountRateLimitResetCreditResponse = SanitizedConsumeAccountRateLimitResetCreditResponseJSON
type ContextCompactedNotification = SanitizedContextCompactedNotificationJSON
type DeprecationNoticeNotification = SanitizedDeprecationNoticeNotificationJSON
type DynamicToolCallParams = SanitizedDynamicToolCallParamsJSON
type DynamicToolCallResponse = SanitizedDynamicToolCallResponseJSON
type ExperimentalFeatureEnablementSetResponse = SanitizedExperimentalFeatureEnablementSetResponseJSON
type ExternalAgentConfigDetectResponse = SanitizedExternalAgentConfigDetectResponseJSON
type ExternalAgentConfigImportCompletedNotification = SanitizedExternalAgentConfigImportCompletedNotificationJSON
type ExternalAgentConfigImportHistoriesReadResponse = SanitizedExternalAgentConfigImportHistoriesReadResponseJSON
type ExternalAgentConfigImportProgressNotification = SanitizedExternalAgentConfigImportProgressNotificationJSON
type ExternalAgentConfigImportResponse = SanitizedExternalAgentConfigImportResponseJSON
type FeedbackUploadResponse = SanitizedFeedbackUploadResponseJSON
type FileChangeOutputDeltaNotification = SanitizedFileChangeOutputDeltaNotificationJSON
type FileChangePatchUpdatedNotification = SanitizedFileChangePatchUpdatedNotificationJSON
type FsGetMetadataResponse = SanitizedFsGetMetadataResponseJSON
type FsReadDirectoryResponse = SanitizedFsReadDirectoryResponseJSON
type FsReadFileResponse = SanitizedFsReadFileResponseJSON
type FuzzyFileSearchResponse = SanitizedFuzzyFileSearchResponseJSON
type FuzzyFileSearchSessionCompletedNotification = SanitizedFuzzyFileSearchSessionCompletedNotificationJSON
type FuzzyFileSearchSessionUpdatedNotification = SanitizedFuzzyFileSearchSessionUpdatedNotificationJSON
type GetAccountResponse = SanitizedGetAccountResponseJSON
type GetAccountTokenUsageResponse = SanitizedGetAccountTokenUsageResponseJSON
type GetWorkspaceMessagesResponse = SanitizedGetWorkspaceMessagesResponseJSON
type GuardianWarningNotification = SanitizedGuardianWarningNotificationJSON
type ModelListResponse = SanitizedModelListResponseJSON
type ModelProviderCapabilitiesReadResponse = SanitizedModelProviderCapabilitiesReadResponseJSON
type ModelReroutedNotification = SanitizedModelReroutedNotificationJSON
type ModelSafetyBufferingUpdatedNotification = SanitizedModelSafetyBufferingUpdatedNotificationJSON
type ModelVerificationNotification = SanitizedModelVerificationNotificationJSON
type PermissionProfileListResponse = SanitizedPermissionProfileListResponseJSON
type PlanDeltaNotification = SanitizedPlanDeltaNotificationJSON
type PluginInstallResponse = SanitizedPluginInstallResponseJSON
type PluginShareSaveResponse = SanitizedPluginShareSaveResponseJSON
type PluginShareUpdateTargetsResponse = SanitizedPluginShareUpdateTargetsResponseJSON
type PluginSkillReadResponse = SanitizedPluginSkillReadResponseJSON
type ProcessExitedNotification = SanitizedProcessExitedNotificationJSON
type RawResponseItemCompletedNotification = SanitizedRawResponseItemCompletedNotificationJSON
type ReasoningSummaryPartAddedNotification = SanitizedReasoningSummaryPartAddedNotificationJSON
type ReasoningSummaryTextDeltaNotification = SanitizedReasoningSummaryTextDeltaNotificationJSON
type ReasoningTextDeltaNotification = SanitizedReasoningTextDeltaNotificationJSON
type RemoteControlStatusChangedNotification = SanitizedRemoteControlStatusChangedNotificationJSON
type SendAddCreditsNudgeEmailParams = SanitizedSendAddCreditsNudgeEmailParamsJSON
type SendAddCreditsNudgeEmailResponse = SanitizedSendAddCreditsNudgeEmailResponseJSON
type ServerRequestResolvedNotification = SanitizedServerRequestResolvedNotificationJSON
type SkillsConfigWriteResponse = SanitizedSkillsConfigWriteResponseJSON
type SkillsListParams = SanitizedSkillsListParamsJSON
type TerminalInteractionNotification = SanitizedTerminalInteractionNotificationJSON
type ThreadApproveGuardianDeniedActionParams = SanitizedThreadApproveGuardianDeniedActionParamsJSON
type ThreadArchiveParams = SanitizedThreadArchiveParamsJSON
type ThreadArchivedNotification = SanitizedThreadArchivedNotificationJSON
type ThreadClosedNotification = SanitizedThreadClosedNotificationJSON
type ThreadCompactStartParams = SanitizedThreadCompactStartParamsJSON
type ThreadDeleteParams = SanitizedThreadDeleteParamsJSON
type ThreadDeletedNotification = SanitizedThreadDeletedNotificationJSON
type ThreadGoalClearParams = SanitizedThreadGoalClearParamsJSON
type ThreadGoalClearResponse = SanitizedThreadGoalClearResponseJSON
type ThreadGoalClearedNotification = SanitizedThreadGoalClearedNotificationJSON
type ThreadGoalGetParams = SanitizedThreadGoalGetParamsJSON
type ThreadGoalGetResponse = SanitizedThreadGoalGetResponseJSON
type ThreadGoalSetParams = SanitizedThreadGoalSetParamsJSON
type ThreadGoalSetResponse = SanitizedThreadGoalSetResponseJSON
type ThreadInjectItemsParams = SanitizedThreadInjectItemsParamsJSON
type ThreadListParams = SanitizedThreadListParamsJSON
type ThreadLoadedListParams = SanitizedThreadLoadedListParamsJSON
type ThreadLoadedListResponse = SanitizedThreadLoadedListResponseJSON
type ThreadMetadataUpdateParams = SanitizedThreadMetadataUpdateParamsJSON
type ThreadNameUpdatedNotification = SanitizedThreadNameUpdatedNotificationJSON
type ThreadReadParams = SanitizedThreadReadParamsJSON
type ThreadRealtimeClosedNotification = SanitizedThreadRealtimeClosedNotificationJSON
type ThreadRealtimeErrorNotification = SanitizedThreadRealtimeErrorNotificationJSON
type ThreadRealtimeItemAddedNotification = SanitizedThreadRealtimeItemAddedNotificationJSON
type ThreadRealtimeOutputAudioDeltaNotification = SanitizedThreadRealtimeOutputAudioDeltaNotificationJSON
type ThreadRealtimeSdpNotification = SanitizedThreadRealtimeSdpNotificationJSON
type ThreadRealtimeStartedNotification = SanitizedThreadRealtimeStartedNotificationJSON
type ThreadRealtimeTranscriptDeltaNotification = SanitizedThreadRealtimeTranscriptDeltaNotificationJSON
type ThreadRealtimeTranscriptDoneNotification = SanitizedThreadRealtimeTranscriptDoneNotificationJSON
type ThreadRollbackParams = SanitizedThreadRollbackParamsJSON
type ThreadSetNameParams = SanitizedThreadSetNameParamsJSON
type ThreadShellCommandParams = SanitizedThreadShellCommandParamsJSON
type ThreadStatusChangedNotification = SanitizedThreadStatusChangedNotificationJSON
type ThreadTokenUsageUpdatedNotification = SanitizedThreadTokenUsageUpdatedNotificationJSON
type ThreadUnarchiveParams = SanitizedThreadUnarchiveParamsJSON
type ThreadUnarchivedNotification = SanitizedThreadUnarchivedNotificationJSON
type ThreadUnsubscribeParams = SanitizedThreadUnsubscribeParamsJSON
type ThreadUnsubscribeResponse = SanitizedThreadUnsubscribeResponseJSON
type TurnDiffUpdatedNotification = SanitizedTurnDiffUpdatedNotificationJSON
type TurnInterruptParams = SanitizedTurnInterruptParamsJSON
type TurnModerationMetadataNotification = SanitizedTurnModerationMetadataNotificationJSON
type TurnPlanUpdatedNotification = SanitizedTurnPlanUpdatedNotificationJSON
type TurnSteerParams = SanitizedTurnSteerParamsJSON
type TurnSteerResponse = SanitizedTurnSteerResponseJSON
type WarningNotification = SanitizedWarningNotificationJSON
type WindowsSandboxReadinessResponse = SanitizedWindowsSandboxReadinessResponseJSON
type WindowsSandboxSetupCompletedNotification = SanitizedWindowsSandboxSetupCompletedNotificationJSON
type WindowsSandboxSetupStartResponse = SanitizedWindowsSandboxSetupStartResponseJSON
type WindowsWorldWritableWarningNotification = SanitizedWindowsWorldWritableWarningNotificationJSON
type AttestationGenerateParams interface{}
type ClientNotification interface{}
type ClientRequest interface{}
type CodexAppServerProtocolV2 interface{}
type CommandExecOutputDeltaNotification interface{}
type CommandExecResizeResponse interface{}
type CommandExecTerminateResponse interface{}
type CommandExecWriteResponse interface{}
type ConfigReadResponse interface{}
type ConfigWriteResponse interface{}
type ExperimentalFeatureListResponse interface{}
type FsChangedNotification interface{}
type FsCopyResponse interface{}
type FsCreateDirectoryResponse interface{}
type FsRemoveResponse interface{}
type FsUnwatchResponse interface{}
type FsWatchResponse interface{}
type FsWriteFileResponse interface{}
type GetAccountRateLimitsResponse interface{}
type HookCompletedNotification interface{}
type HookStartedNotification interface{}
type HooksListResponse interface{}
type InitializeResponse interface{}
type ItemGuardianApprovalReviewCompletedNotification interface{}
type ItemGuardianApprovalReviewStartedNotification interface{}
type ItemStartedNotification interface{}
type ListMcpServerStatusParams interface{}
type ListMcpServerStatusResponse interface{}
type LoginAccountResponse interface{}
type LogoutAccountResponse interface{}
type MarketplaceAddResponse interface{}
type MarketplaceRemoveResponse interface{}
type MarketplaceUpgradeResponse interface{}
type McpResourceReadParams interface{}
type McpResourceReadResponse interface{}
type McpServerElicitationRequestParams interface{}
type McpServerElicitationRequestResponse interface{}
type McpServerOauthLoginCompletedNotification interface{}
type McpServerOauthLoginParams interface{}
type McpServerOauthLoginResponse interface{}
type McpServerRefreshResponse interface{}
type McpServerStatusUpdatedNotification interface{}
type McpServerToolCallParams interface{}
type McpServerToolCallResponse interface{}
type McpToolCallProgressNotification interface{}
type ModelProviderCapabilitiesReadParams interface{}
type PluginInstalledResponse interface{}
type PluginListResponse interface{}
type PluginReadResponse interface{}
type PluginShareCheckoutResponse interface{}
type PluginShareDeleteResponse interface{}
type PluginShareListParams interface{}
type PluginShareListResponse interface{}
type PluginUninstallResponse interface{}
type ProcessOutputDeltaNotification interface{}
type ReviewStartResponse interface{}
type ServerNotification interface{}
type ServerRequest interface{}
type SkillsChangedNotification interface{}
type SkillsConfigWriteParams interface{}
type SkillsExtraRootsSetParams interface{}
type SkillsExtraRootsSetResponse interface{}
type SkillsListResponse interface{}
type ThreadApproveGuardianDeniedActionResponse interface{}
type ThreadArchiveResponse interface{}
type ThreadCompactStartResponse interface{}
type ThreadDeleteResponse interface{}
type ThreadInjectItemsResponse interface{}
type ThreadListResponse interface{}
type ThreadMetadataUpdateResponse interface{}
type ThreadReadResponse interface{}
type ThreadRollbackResponse interface{}
type ThreadSetNameResponse interface{}
type ThreadSettingsUpdatedNotification interface{}
type ThreadShellCommandResponse interface{}
type ThreadStartedNotification interface{}
type ThreadUnarchiveResponse interface{}
type TurnInterruptResponse interface{}
type TurnStartResponse interface{}
type WindowsSandboxSetupStartParams interface{}
@@ -0,0 +1,971 @@
//revive:disable:file-length-limit
package main
import (
"encoding/json"
"fmt"
"go/format"
"os"
"path/filepath"
"sort"
"strings"
"github.com/atombender/go-jsonschema/pkg/generator"
)
const (
schemaBundleFile = "codex_app_server_protocol.schemas.json"
generatedHeaderBase = "// Code generated by runtime/codexproto/internal/codegen. DO NOT EDIT.\n"
codexSourceCommit = "6d2168f06ae275d5e1f73cabf935d2bcc8549998"
codexSourceVersion = "0.0.0"
)
func main() {
packageRoot, err := repoRoot()
if err != nil {
fatal(err)
}
schemaDir := filepath.Join(packageRoot, "schema", "json")
if err := generateProtocolTypes(schemaDir, packageRoot, codexSourceCommit, codexSourceVersion); err != nil {
fatal(err)
}
if err := generateRPCStubs(schemaDir, packageRoot, codexSourceCommit); err != nil {
fatal(err)
}
}
func generateProtocolTypes(schemaDir, repoRoot, codexCommit, codexVersion string) error {
cfg := generator.Config{
DefaultPackageName: "codexproto",
DefaultOutputName: "types_gen.go",
Tags: []string{"json"},
Capitalizations: []string{"ID", "JSON", "RPC", "MCP", "HTTP", "URL", "SSE", "UUID"},
OnlyModels: true,
}
gen, err := generator.New(cfg)
if err != nil {
return err
}
schemaFiles, err := findSchemaFiles(schemaDir)
if err != nil {
return err
}
skip := skipSchemaFiles()
var fallbacks []string
var titles []string
for _, file := range schemaFiles {
if filepath.Base(file) == schemaBundleFile {
continue
}
if skip[filepath.Base(file)] {
continue
}
title, titleErr := schemaTitle(file)
if titleErr != nil {
return titleErr
}
if title != "" {
titles = append(titles, title)
}
if err := safeDoFile(gen, file); err != nil {
if title == "" {
return fmt.Errorf("generate types from %s: %w", file, err)
}
fallbacks = append(fallbacks, title)
}
}
sources, err := gen.Sources()
if err != nil {
return err
}
manualTypes := manualProtocolTypes()
for name, src := range sources {
sources[name] = filterManualTypeDeclarations(src, manualTypes)
}
outDir := repoRoot
generated := collectGeneratedTypes(sources)
for name := range manualTypes {
generated[name] = struct{}{}
}
for _, title := range titles {
if title == "" {
continue
}
if _, ok := generated[title]; ok {
continue
}
if _, ok := generated[title+"JSON"]; ok {
continue
}
fallbacks = append(fallbacks, title)
}
for name, src := range sources {
normalized := normalizeGeneratedHeader(src, codexCommit)
if err := os.WriteFile(filepath.Join(outDir, name), normalized, 0o644); err != nil {
return err
}
}
if err := writeFallbackTypes(outDir, fallbacks, generated, codexCommit); err != nil {
return err
}
if err := writeProtocolAliases(outDir, generated, fallbacks, codexCommit); err != nil {
return err
}
return writeProtocolMetadata(outDir, codexCommit, codexVersion)
}
func filterManualTypeDeclarations(src []byte, manualTypes map[string]struct{}) []byte {
lines := strings.SplitAfter(string(src), "\n")
out := make([]string, 0, len(lines))
for i := 0; i < len(lines); {
line := lines[i]
trimmed := strings.TrimSpace(line)
if strings.HasPrefix(trimmed, "type ") {
fields := strings.Fields(trimmed)
if len(fields) >= 2 {
if _, ok := manualTypes[fields[1]]; ok {
i++
balance := strings.Count(line, "{") - strings.Count(line, "}")
for i < len(lines) && balance > 0 {
balance += strings.Count(lines[i], "{") - strings.Count(lines[i], "}")
i++
}
continue
}
}
}
out = append(out, line)
i++
}
return []byte(strings.Join(out, ""))
}
type schemaVariant struct {
Properties map[string]schemaProperty `json:"properties"`
}
type schemaProperty struct {
Enum []string `json:"enum"`
Ref string `json:"$ref"`
Type string `json:"type"`
Items *struct {
Ref string `json:"$ref"`
} `json:"items"`
}
type oneOfSchema struct {
OneOf []schemaVariant `json:"oneOf"`
}
func generateRPCStubs(schemaDir, repoRoot, codexCommit string) error {
defs, err := parseDefinitionNames(schemaDir)
if err != nil {
return err
}
clientMethods, err := loadMethods(filepath.Join(schemaDir, "ClientRequest.json"))
if err != nil {
return err
}
clientMethods = append(clientMethods, manualClientMethods()...)
sort.Slice(clientMethods, func(i, j int) bool { return clientMethods[i].Method < clientMethods[j].Method })
serverMethods, err := loadMethods(filepath.Join(schemaDir, "ServerRequest.json"))
if err != nil {
return err
}
notifications, err := loadNotifications(filepath.Join(schemaDir, "ServerNotification.json"))
if err != nil {
return err
}
clientRPC, err := buildRPCMethods(clientMethods, defs, clientResponseOverrides())
if err != nil {
return err
}
serverRPC, err := buildRPCMethods(serverMethods, defs, nil)
if err != nil {
return err
}
outDir := repoRoot
if err := writeFile(outDir, "client_requests_gen.go", renderClientRequests(clientRPC, codexCommit)); err != nil {
return err
}
if err := writeFile(outDir, "server_requests_gen.go", renderServerRequests(serverRPC, codexCommit)); err != nil {
return err
}
return writeFile(outDir, "notifications_gen.go", renderNotifications(notifications, codexCommit))
}
func parseDefinitionNames(schemaDir string) (map[string]struct{}, error) {
files, err := findSchemaFiles(schemaDir)
if err != nil {
return nil, err
}
defs := make(map[string]struct{})
for _, file := range files {
data, err := os.ReadFile(file)
if err != nil {
return nil, err
}
var doc struct {
Title string `json:"title"`
Definitions map[string]json.RawMessage `json:"definitions"`
}
if err := json.Unmarshal(data, &doc); err != nil {
return nil, err
}
if doc.Title != "" {
defs[doc.Title] = struct{}{}
}
for name := range doc.Definitions {
defs[name] = struct{}{}
}
}
return defs, nil
}
func schemaTitle(path string) (string, error) {
data, err := os.ReadFile(path)
if err != nil {
return "", err
}
var doc struct {
Title string `json:"title"`
}
if err := json.Unmarshal(data, &doc); err != nil {
return "", err
}
return doc.Title, nil
}
func writeFallbackTypes(outDir string, titles []string, generated map[string]struct{}, codexCommit string) error {
fallbackPath := filepath.Join(outDir, "fallback_gen.go")
if len(titles) == 0 {
_ = os.Remove(fallbackPath)
return nil
}
unique := map[string]struct{}{}
for _, title := range titles {
if title != "" {
unique[title] = struct{}{}
}
}
aliases := map[string]string{}
var names []string
for name := range unique {
if _, exists := generated[name]; exists {
continue
}
if target, ok := sanitizedFallbackTarget(name, generated); ok {
aliases[name] = target
continue
}
names = append(names, name)
}
if len(names) == 0 && len(aliases) == 0 {
_ = os.Remove(fallbackPath)
return nil
}
sort.Strings(names)
aliasNames := make([]string, 0, len(aliases))
for name := range aliases {
aliasNames = append(aliasNames, name)
}
sort.Strings(aliasNames)
var b strings.Builder
b.WriteString(generatedHeader(codexCommit))
b.WriteString("package codexproto\n\n")
b.WriteString("// Fallback types for schemas that failed to generate.\n")
for _, name := range aliasNames {
b.WriteString("type ")
b.WriteString(name)
b.WriteString(" = ")
b.WriteString(aliases[name])
b.WriteString("\n")
}
for _, name := range names {
b.WriteString("type ")
b.WriteString(name)
b.WriteString(" interface{}\n")
}
return os.WriteFile(fallbackPath, []byte(b.String()), 0o644)
}
func sanitizedFallbackTarget(name string, generated map[string]struct{}) (string, bool) {
target := "Sanitized" + name + "JSON"
if _, ok := generated[target]; ok {
return target, true
}
return "", false
}
func collectGeneratedTypes(sources map[string][]byte) map[string]struct{} {
generated := map[string]struct{}{}
for _, src := range sources {
lines := strings.Split(string(src), "\n")
for _, line := range lines {
line = strings.TrimSpace(line)
if strings.HasPrefix(line, "type ") {
fields := strings.Fields(line)
if len(fields) >= 2 {
generated[fields[1]] = struct{}{}
}
}
}
}
return generated
}
func writeProtocolAliases(outDir string, generated map[string]struct{}, fallbacks []string, codexCommit string) error {
existing := map[string]struct{}{}
for name := range generated {
existing[name] = struct{}{}
}
for _, name := range fallbacks {
if name != "" {
existing[name] = struct{}{}
}
}
aliases := map[string]string{}
for name := range generated {
if !strings.HasSuffix(name, "JSON") {
continue
}
base := strings.TrimSuffix(name, "JSON")
if base == "" {
continue
}
if _, ok := existing[base]; ok {
continue
}
aliases[base] = name
}
aliasPath := filepath.Join(outDir, "aliases_gen.go")
if len(aliases) == 0 {
_ = os.Remove(aliasPath)
return nil
}
names := make([]string, 0, len(aliases))
for name := range aliases {
names = append(names, name)
}
sort.Strings(names)
var b strings.Builder
b.WriteString(generatedHeader(codexCommit))
b.WriteString("package codexproto\n\n")
b.WriteString("// Aliases for JSON-suffixed schema types.\n")
for _, name := range names {
b.WriteString("type ")
b.WriteString(name)
b.WriteString(" = ")
b.WriteString(aliases[name])
b.WriteString("\n")
}
return os.WriteFile(aliasPath, []byte(b.String()), 0o644)
}
func skipSchemaFiles() map[string]bool {
return map[string]bool{
"JSONRPCMessage.json": true,
"JSONRPCRequest.json": true,
"JSONRPCResponse.json": true,
"JSONRPCNotification.json": true,
"JSONRPCError.json": true,
"JSONRPCErrorError.json": true,
"EventMsg.json": true,
"RequestId.json": true,
}
}
func loadMethods(path string) ([]rpcMethod, error) {
data, err := os.ReadFile(path)
if err != nil {
return nil, err
}
var doc oneOfSchema
if err := json.Unmarshal(data, &doc); err != nil {
return nil, err
}
methods := make([]rpcMethod, 0, len(doc.OneOf))
for _, variant := range doc.OneOf {
method := ""
if prop, ok := variant.Properties["method"]; ok && len(prop.Enum) == 1 {
method = prop.Enum[0]
}
if method == "" {
continue
}
paramsType := ""
if prop, ok := variant.Properties["params"]; ok {
if prop.Ref != "" {
paramsType = refName(prop.Ref)
} else if prop.Type == "null" {
paramsType = ""
}
}
methods = append(methods, rpcMethod{
Method: method,
ParamsType: paramsType,
})
}
sort.Slice(methods, func(i, j int) bool { return methods[i].Method < methods[j].Method })
return methods, nil
}
func loadNotifications(path string) ([]rpcNotification, error) {
data, err := os.ReadFile(path)
if err != nil {
return nil, err
}
var doc oneOfSchema
if err := json.Unmarshal(data, &doc); err != nil {
return nil, err
}
notifications := make([]rpcNotification, 0, len(doc.OneOf))
for _, variant := range doc.OneOf {
method := ""
if prop, ok := variant.Properties["method"]; ok && len(prop.Enum) == 1 {
method = prop.Enum[0]
}
if method == "" {
continue
}
paramsType := ""
if prop, ok := variant.Properties["params"]; ok {
if prop.Ref != "" {
paramsType = refName(prop.Ref)
} else if prop.Type == "null" {
paramsType = ""
}
}
notifications = append(notifications, rpcNotification{
Method: method,
ParamsType: paramsType,
})
}
sort.Slice(notifications, func(i, j int) bool { return notifications[i].Method < notifications[j].Method })
return notifications, nil
}
func refName(ref string) string {
const prefix = "#/definitions/"
if strings.HasPrefix(ref, prefix) {
return strings.TrimPrefix(ref, prefix)
}
return ref
}
type rpcMethod struct {
Method string
ParamsType string
ResponseType string
}
type rpcNotification struct {
Method string
ParamsType string
}
func buildRPCMethods(methods []rpcMethod, defs map[string]struct{}, overrides map[string]string) ([]rpcMethod, error) {
resolved := make([]rpcMethod, 0, len(methods))
for _, method := range methods {
if method.ResponseType != "" {
resolved = append(resolved, method)
continue
}
responseType, err := resolveResponseType(method, defs, overrides)
if err != nil {
return nil, err
}
method.ResponseType = responseType
resolved = append(resolved, method)
}
return resolved, nil
}
func resolveResponseType(method rpcMethod, defs map[string]struct{}, overrides map[string]string) (string, error) {
if overrides != nil {
if override, ok := overrides[method.Method]; ok {
return override, nil
}
}
if method.ParamsType != "" {
base := strings.TrimSuffix(method.ParamsType, "Params")
candidate := base + "Response"
if _, ok := defs[candidate]; ok {
return candidate, nil
}
}
candidate := methodBaseName(method.Method) + "Response"
if _, ok := defs[candidate]; ok {
return candidate, nil
}
return "", fmt.Errorf("unable to resolve response type for method %q", method.Method)
}
func methodBaseName(method string) string {
parts := strings.FieldsFunc(method, func(r rune) bool {
return (r < 'a' || r > 'z') && (r < 'A' || r > 'Z') && (r < '0' || r > '9')
})
var b strings.Builder
for _, part := range parts {
if part == "" {
continue
}
b.WriteString(strings.ToUpper(part[:1]))
if len(part) > 1 {
b.WriteString(part[1:])
}
}
return b.String()
}
func clientResponseOverrides() map[string]string {
return map[string]string{
"account/logout": "LogoutAccountResponse",
"account/rateLimits/read": "GetAccountRateLimitsResponse",
"account/usage/read": "GetAccountTokenUsageResponse",
"account/workspaceMessages/read": "GetWorkspaceMessagesResponse",
"addConversationListener": "AddConversationSubscriptionResponse",
"config/value/write": "ConfigWriteResponse",
"config/batchWrite": "ConfigWriteResponse",
"config/mcpServer/reload": "McpServerRefreshResponse",
"externalAgentConfig/import/readHistories": "ExternalAgentConfigImportHistoriesReadResponse",
"removeConversationListener": "RemoveConversationSubscriptionResponse",
}
}
func manualClientMethods() []rpcMethod {
return []rpcMethod{
{
Method: "collaborationMode/list",
ParamsType: "CollaborationModeListParams",
ResponseType: "CollaborationModeListResponse",
},
}
}
func renderClientRequests(methods []rpcMethod, codexCommit string) []byte {
var b strings.Builder
b.WriteString(generatedHeader(codexCommit))
b.WriteString("package codexproto\n\n")
b.WriteString("import (\n\t\"context\"\n\t\"encoding/json\"\n)\n\n")
b.WriteString("// ClientRequests exposes typed JSON-RPC calls supported by the app-server.\n")
b.WriteString("type ClientRequests interface {\n")
for _, method := range methods {
if method.ParamsType == "" {
fmt.Fprintf(&b, "\t%s(ctx context.Context) (*%s, error)\n", methodName(method.Method), method.ResponseType)
} else {
fmt.Fprintf(&b, "\t%s(ctx context.Context, params %s) (*%s, error)\n", methodName(method.Method), paramsType(method.ParamsType), method.ResponseType)
}
}
b.WriteString("}\n\n")
b.WriteString("// Client implements ClientRequests using JSON-RPC.\n")
for _, method := range methods {
if method.ParamsType == "" {
fmt.Fprintf(&b, "func (c *Client) %s(ctx context.Context) (*%s, error) {\n", methodName(method.Method), method.ResponseType)
} else {
fmt.Fprintf(&b, "func (c *Client) %s(ctx context.Context, params %s) (*%s, error) {\n", methodName(method.Method), paramsType(method.ParamsType), method.ResponseType)
}
b.WriteString("\tvar result ")
b.WriteString(method.ResponseType)
b.WriteString("\n")
if method.ParamsType == "" {
fmt.Fprintf(&b, "\tif err := c.Call(ctx, %q, nil, &result); err != nil {\n", method.Method)
} else {
fmt.Fprintf(&b, "\tif err := c.Call(ctx, %q, params, &result); err != nil {\n", method.Method)
}
b.WriteString("\t\treturn nil, err\n\t}\n\treturn &result, nil\n}\n\n")
}
b.WriteString("// BuildClientRequest builds a JSON-RPC request for a client method.\n")
b.WriteString("func BuildClientRequest(method string, params any, id RequestID) (JSONRPCRequest, error) {\n")
b.WriteString("\tvar raw json.RawMessage\n\tif params != nil {\n\t\tdata, err := json.Marshal(params)\n\t\tif err != nil {\n\t\t\treturn JSONRPCRequest{}, err\n\t\t}\n\t\traw = data\n\t}\n\treturn JSONRPCRequest{ID: id, Method: method, Params: raw}, nil\n}\n")
return []byte(b.String())
}
func renderServerRequests(methods []rpcMethod, codexCommit string) []byte {
var b strings.Builder
b.WriteString(generatedHeader(codexCommit))
b.WriteString("package codexproto\n\n")
b.WriteString("import (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\n")
b.WriteString("// ServerRequestHandler handles requests initiated by the app-server.\n")
b.WriteString("type ServerRequestHandler interface {\n")
for _, method := range methods {
if method.ParamsType == "" {
fmt.Fprintf(&b, "\t%s(ctx context.Context) (*%s, error)\n", methodName(method.Method), method.ResponseType)
} else {
fmt.Fprintf(&b, "\t%s(ctx context.Context, params %s) (*%s, error)\n", methodName(method.Method), paramsType(method.ParamsType), method.ResponseType)
}
}
b.WriteString("}\n\n")
b.WriteString("// ParsedServerRequest represents a typed server request envelope.\n")
b.WriteString("type ParsedServerRequest struct {\n\tMethod string\n\tParams any\n\tRaw json.RawMessage\n}\n\n")
b.WriteString("type serverRequestParser func(json.RawMessage) (ParsedServerRequest, error)\n\n")
b.WriteString("var serverRequestParsers = map[string]serverRequestParser{\n")
for _, method := range methods {
fmt.Fprintf(&b, "\t%q: func(params json.RawMessage) (ParsedServerRequest, error) {\n", method.Method)
if method.ParamsType == "" {
fmt.Fprintf(&b, "\t\treturn ParsedServerRequest{Method: %q, Params: nil, Raw: params}, nil\n", method.Method)
} else {
b.WriteString("\t\tvar payload ")
b.WriteString(method.ParamsType)
b.WriteString("\n")
b.WriteString("\t\tif len(params) > 0 {\n\t\t\tif err := json.Unmarshal(params, &payload); err != nil {\n\t\t\t\treturn ParsedServerRequest{Method: ")
fmt.Fprintf(&b, "%q", method.Method)
b.WriteString(", Raw: params}, err\n\t\t\t}\n\t\t}\n")
b.WriteString("\t\treturn ParsedServerRequest{Method: ")
fmt.Fprintf(&b, "%q", method.Method)
b.WriteString(", Params: payload, Raw: params}, nil\n")
}
b.WriteString("\t},\n")
}
b.WriteString("}\n\n")
b.WriteString("// ParseServerRequest parses a server request by method.\n")
b.WriteString("func ParseServerRequest(method string, params json.RawMessage) (ParsedServerRequest, error) {\n")
b.WriteString("\tif parser, ok := serverRequestParsers[method]; ok {\n\t\treturn parser(params)\n\t}\n")
b.WriteString("\treturn ParsedServerRequest{Method: method, Raw: params}, nil\n}\n\n")
b.WriteString("// IsKnownServerRequestMethod reports whether method is in the generated server request surface.\n")
b.WriteString("func IsKnownServerRequestMethod(method string) bool {\n")
b.WriteString("\t_, ok := serverRequestParsers[method]\n\treturn ok\n}\n\n")
b.WriteString("// ServerRequestMethods returns the generated server request surface in stable order.\n")
b.WriteString("func ServerRequestMethods() []string {\n")
b.WriteString("\treturn []string{\n")
for _, method := range methods {
fmt.Fprintf(&b, "\t\t%q,\n", method.Method)
}
b.WriteString("\t}\n}\n\n")
b.WriteString("func dispatchServerRequest(ctx context.Context, handler ServerRequestHandler, req JSONRPCRequest) (any, error) {\n")
b.WriteString("\tswitch req.Method {\n")
for _, method := range methods {
fmt.Fprintf(&b, "\tcase %q:\n", method.Method)
if method.ParamsType == "" {
b.WriteString("\t\treturn handler.")
b.WriteString(methodName(method.Method))
b.WriteString("(ctx)\n")
} else {
b.WriteString("\t\tvar params ")
b.WriteString(method.ParamsType)
b.WriteString("\n")
b.WriteString("\t\tif len(req.Params) > 0 {\n\t\t\tif err := json.Unmarshal(req.Params, &params); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n")
b.WriteString("\t\treturn handler.")
b.WriteString(methodName(method.Method))
b.WriteString("(ctx, params)\n")
}
}
b.WriteString("\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported server request %q\", req.Method)\n\t}\n}\n")
return []byte(b.String())
}
func renderNotifications(notifications []rpcNotification, codexCommit string) []byte {
var b strings.Builder
b.WriteString(generatedHeader(codexCommit))
b.WriteString("package codexproto\n\n")
b.WriteString("import \"encoding/json\"\n\n")
b.WriteString("// Notification represents a typed server notification.\n")
b.WriteString("type Notification struct {\n\tMethod string\n\tParams any\n\tRaw json.RawMessage\n}\n\n")
b.WriteString("type notificationParser func(json.RawMessage) (Notification, error)\n\n")
b.WriteString("var notificationParsers = map[string]notificationParser{\n")
for _, notification := range notifications {
fmt.Fprintf(&b, "\t%q: func(params json.RawMessage) (Notification, error) {\n", notification.Method)
if notification.ParamsType == "" {
fmt.Fprintf(&b, "\t\treturn Notification{Method: %q, Params: nil, Raw: params}, nil\n", notification.Method)
} else {
b.WriteString("\t\tvar payload ")
b.WriteString(notification.ParamsType)
b.WriteString("\n")
b.WriteString("\t\tif len(params) > 0 {\n\t\t\tif err := json.Unmarshal(params, &payload); err != nil {\n\t\t\t\treturn Notification{Method: ")
fmt.Fprintf(&b, "%q", notification.Method)
b.WriteString(", Raw: params}, err\n\t\t\t}\n\t\t}\n")
b.WriteString("\t\treturn Notification{Method: ")
fmt.Fprintf(&b, "%q", notification.Method)
b.WriteString(", Params: payload, Raw: params}, nil\n")
}
b.WriteString("\t},\n")
}
b.WriteString("}\n\n")
b.WriteString("// ParseServerNotification parses a server notification by method.\n")
b.WriteString("func ParseServerNotification(method string, params json.RawMessage) (Notification, error) {\n")
b.WriteString("\tif handler, ok := notificationParsers[method]; ok {\n\t\treturn handler(params)\n\t}\n")
b.WriteString("\treturn Notification{Method: method, Raw: params}, nil\n}\n")
b.WriteString("\n// IsKnownServerNotificationMethod reports whether method is in the generated server notification surface.\n")
b.WriteString("func IsKnownServerNotificationMethod(method string) bool {\n")
b.WriteString("\t_, ok := notificationParsers[method]\n\treturn ok\n}\n")
return []byte(b.String())
}
func paramsType(name string) string {
if name == "" {
return "struct{}"
}
return name
}
func manualProtocolTypes() map[string]struct{} {
return map[string]struct{}{
"ApplyPatchApprovalParams": {},
"ApplyPatchApprovalResponse": {},
"CommandExecutionRequestApprovalParams": {},
"CommandExecutionRequestApprovalResponse": {},
"ErrorNotification": {},
"ExecCommandApprovalParams": {},
"ExecCommandApprovalResponse": {},
"FileChangeRequestApprovalParams": {},
"FileChangeRequestApprovalResponse": {},
"ItemCompletedNotification": {},
"PermissionsRequestApprovalParams": {},
"PermissionsRequestApprovalResponse": {},
"ReviewStartParams": {},
"ThreadResumeResponse": {},
"ThreadGoal": {},
"ThreadGoalUpdatedNotification": {},
"ThreadForkParams": {},
"ThreadForkResponse": {},
"ThreadResumeParams": {},
"ThreadStartParams": {},
"ThreadStartResponse": {},
"ToolRequestUserInputParams": {},
"ToolRequestUserInputResponse": {},
"TurnStartParams": {},
"TurnStartParamsInputElem": {},
"TurnSteerParamsInputElem": {},
"TurnCompletedNotification": {},
"TurnStartedNotification": {},
}
}
func methodName(method string) string {
base := methodBaseName(method)
if base == "" {
return "Unknown"
}
return base
}
func normalizeGeneratedHeader(src []byte, codexCommit string) []byte {
if len(src) == 0 {
return src
}
parts := strings.SplitN(string(src), "\n", 2)
if len(parts) == 0 {
return src
}
header := strings.TrimSpace(parts[0])
headerLower := strings.ToLower(header)
if !strings.HasPrefix(headerLower, "// code generated") && !strings.HasPrefix(headerLower, "// generated") {
return src
}
rest := ""
if len(parts) > 1 {
rest = strings.TrimLeft(parts[1], "\n")
}
for strings.Contains(rest, "\n\n\n") {
rest = strings.ReplaceAll(rest, "\n\n\n", "\n\n")
}
return []byte(generatedHeader(codexCommit) + rest)
}
func generatedHeader(codexCommit string) string {
return generatedHeaderBase + "// Source codex commit: " + codexCommit + "\n\n"
}
func writeProtocolMetadata(outDir, codexCommit, codexVersion string) error {
var b strings.Builder
b.WriteString(generatedHeader(codexCommit))
b.WriteString("package codexproto\n\n")
b.WriteString("// GeneratedCodexCommit is the Codex source commit used to generate this protocol package.\n")
fmt.Fprintf(&b, "const GeneratedCodexCommit = %q\n\n", codexCommit)
b.WriteString("// GeneratedCodexVersion is the Codex package version used to generate this protocol package.\n")
fmt.Fprintf(&b, "const GeneratedCodexVersion = %q\n", codexVersion)
return writeFile(outDir, "metadata_gen.go", []byte(b.String()))
}
func writeFile(dir, name string, contents []byte) error {
path := filepath.Join(dir, name)
if filepath.Ext(name) == ".go" {
formatted, err := format.Source(contents)
if err != nil {
return fmt.Errorf("format %s: %w", name, err)
}
contents = formatted
}
return os.WriteFile(path, contents, 0o644)
}
func findSchemaFiles(schemaDir string) ([]string, error) {
var files []string
err := filepath.WalkDir(schemaDir, func(path string, d os.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() {
return nil
}
if filepath.Ext(path) != ".json" {
return nil
}
files = append(files, path)
return nil
})
if err != nil {
return nil, err
}
sort.Strings(files)
return files, nil
}
func safeDoFile(gen *generator.Generator, file string) (err error) {
sanitized, cleanup, err := sanitizeSchemaFile(file)
if err != nil {
return err
}
defer cleanup()
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("panic: %v", r)
}
}()
return gen.DoFile(sanitized)
}
func sanitizeSchemaFile(path string) (string, func(), error) {
data, err := os.ReadFile(path)
if err != nil {
return "", nil, err
}
var node any
if err := json.Unmarshal(data, &node); err != nil {
return "", nil, err
}
stripSubschemas(node)
out, err := json.Marshal(node)
if err != nil {
return "", nil, err
}
tempDir, err := os.MkdirTemp("", "tutti-codexproto-sanitized-*")
if err != nil {
return "", nil, err
}
sanitizedName := "sanitized-" + filepath.Base(path)
sanitizedPath := filepath.Join(tempDir, sanitizedName)
if err := os.WriteFile(sanitizedPath, out, 0o644); err != nil {
_ = os.RemoveAll(tempDir)
return "", nil, err
}
cleanup := func() {
_ = os.RemoveAll(tempDir)
}
return sanitizedPath, cleanup, nil
}
func stripSubschemas(node any) {
switch value := node.(type) {
case map[string]any:
delete(value, "oneOf")
delete(value, "anyOf")
for _, child := range value {
stripSubschemas(child)
}
case []any:
for _, child := range value {
stripSubschemas(child)
}
}
}
func repoRoot() (string, error) {
cwd, err := os.Getwd()
if err != nil {
return "", err
}
if packageRoot := filepath.Join(cwd, "runtime", "codexproto"); isPackageRoot(packageRoot) {
return packageRoot, nil
}
// Walk up until we find the codexproto package root.
current := cwd
for {
if isPackageRoot(current) {
return current, nil
}
parent := filepath.Dir(current)
if parent == current {
break
}
current = parent
}
return "", fmt.Errorf("unable to locate codexproto package root from %s", cwd)
}
func isPackageRoot(path string) bool {
return exists(filepath.Join(path, "schema", "json", schemaBundleFile)) &&
exists(filepath.Join(path, "internal", "codegen", "main.go"))
}
func exists(path string) bool {
_, err := os.Stat(path)
return err == nil
}
func fatal(err error) {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
@@ -0,0 +1,267 @@
package codexproto
import "encoding/json"
// CollaborationModeListParams is maintained manually because
// collaborationMode/list is experimental and omitted from the exported
// ClientRequest union even though the runtime serves it.
type CollaborationModeListParams struct{}
// CollaborationModeMask describes a collaboration-mode preset returned by the
// experimental collaborationMode/list method.
type CollaborationModeMask struct {
Name string `json:"name"`
Mode *ModeKind `json:"mode,omitempty"`
Model *string `json:"model,omitempty"`
ReasoningEffort any `json:"reasoning_effort,omitempty"`
DeveloperInstructions any `json:"developer_instructions,omitempty"`
}
// CollaborationModeListResponse is the response payload for
// collaborationMode/list.
type CollaborationModeListResponse struct {
Data []CollaborationModeMask `json:"data"`
}
// Thread represents the subset of a thread descriptor needed by session
// lifecycle and fork responses.
type Thread struct {
ID string `json:"id,omitempty"`
ForkedFromID *string `json:"forkedFromId,omitempty"`
ThreadSource *string `json:"threadSource,omitempty"`
Turns []ThreadTurn `json:"turns,omitempty"`
}
// ThreadTurn represents the stable turn identity and status needed to verify a
// provider-native fork boundary. Items remain owned by canonical history copy.
type ThreadTurn struct {
ID string `json:"id"`
Status json.RawMessage `json:"status,omitempty"`
}
// ThreadResponse is the shared shape for thread/start and thread/resume responses.
type ThreadResponse struct {
ThreadID string `json:"threadId,omitempty"`
Thread *Thread `json:"thread,omitempty"`
}
// ThreadStartResponse is the response payload for thread/start.
type ThreadStartResponse = ThreadResponse
// ThreadResumeResponse is the response payload for thread/resume.
type ThreadResumeResponse = ThreadResponse
// ThreadForkResponse is the response payload for thread/fork.
type ThreadForkResponse = ThreadResponse
// ThreadStartParams is maintained manually because the raw schema currently
// exceeds the generator's capabilities.
type ThreadStartParams struct {
Model *string `json:"model,omitempty"`
Cwd *string `json:"cwd,omitempty"`
ApprovalPolicy json.RawMessage `json:"approvalPolicy,omitempty"`
Sandbox json.RawMessage `json:"sandbox,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
Config *map[string]any `json:"config,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
}
// ThreadResumeParams is maintained manually because the raw schema currently
// exceeds the generator's capabilities.
type ThreadResumeParams struct {
ThreadID string `json:"threadId"`
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
Cwd *string `json:"cwd,omitempty"`
ApprovalPolicy json.RawMessage `json:"approvalPolicy,omitempty"`
Sandbox json.RawMessage `json:"sandbox,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
Config *map[string]any `json:"config,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
}
// ThreadForkParams is maintained manually because the raw schema currently
// exceeds the generator's capabilities.
type ThreadForkParams struct {
ThreadID string `json:"threadId"`
LastTurnID *string `json:"lastTurnId,omitempty"`
Ephemeral *bool `json:"ephemeral,omitempty"`
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
Cwd *string `json:"cwd,omitempty"`
ApprovalPolicy json.RawMessage `json:"approvalPolicy,omitempty"`
Sandbox json.RawMessage `json:"sandbox,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
Config *map[string]any `json:"config,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
ThreadSource *string `json:"threadSource,omitempty"`
}
// TurnStartParamsInputElem is maintained manually because turn input entries are
// represented by the high-level codex.Input type before marshaling.
type TurnStartParamsInputElem interface{}
// TurnStartParams is maintained manually because the raw schema currently
// exceeds the generator's capabilities.
type TurnStartParams struct {
ThreadID string `json:"threadId"`
Input []TurnStartParamsInputElem `json:"input"`
ClientUserMessageID *string `json:"clientUserMessageId,omitempty"`
Cwd *string `json:"cwd,omitempty"`
ApprovalPolicy json.RawMessage `json:"approvalPolicy,omitempty"`
SandboxPolicy json.RawMessage `json:"sandboxPolicy,omitempty"`
Model *string `json:"model,omitempty"`
Effort json.RawMessage `json:"effort,omitempty"`
Summary json.RawMessage `json:"summary,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
CollaborationMode json.RawMessage `json:"collaborationMode,omitempty"`
OutputSchema json.RawMessage `json:"outputSchema,omitempty"`
ResponsesAPIClientMetadata map[string]string `json:"responsesapiClientMetadata,omitempty"`
}
// ReviewStartParams is maintained manually because tutti sends the live
// `summary` field used by the runtime but omitted from the generated schema.
type ReviewStartParams struct {
ThreadID string `json:"threadId"`
Target any `json:"target"`
Delivery any `json:"delivery,omitempty"`
Summary any `json:"summary,omitempty"`
}
// TurnSteerParamsInputElem aliases the sanitized generated input element type.
type TurnSteerParamsInputElem = SanitizedTurnSteerParamsJSONInputElem
// TurnNotification describes turn/started and turn/completed notifications.
type TurnNotification struct {
ThreadID string `json:"threadId,omitempty"`
Turn *TurnNotificationTurn `json:"turn,omitempty"`
}
// TurnStartedNotification is the payload for turn/started.
type TurnStartedNotification = TurnNotification
// TurnCompletedNotification is the payload for turn/completed.
type TurnCompletedNotification = TurnNotification
// TurnNotificationTurn describes a turn summary in notifications.
type TurnNotificationTurn struct {
ID string `json:"id,omitempty"`
Status string `json:"status,omitempty"`
Error *TurnNotificationError `json:"error,omitempty"`
}
// TurnNotificationError describes a turn error payload.
type TurnNotificationError struct {
Message string `json:"message,omitempty"`
}
// ItemCompletedNotification is the payload for item/completed.
type ItemCompletedNotification struct {
ThreadID string `json:"threadId,omitempty"`
Item json.RawMessage `json:"item,omitempty"`
}
// ErrorNotification is the payload for error notifications.
type ErrorNotification struct {
ThreadID string `json:"threadId,omitempty"`
WillRetry *bool `json:"willRetry,omitempty"`
Error *TurnNotificationError `json:"error,omitempty"`
}
// ThreadGoal describes persisted long-running goal metadata for a thread.
type ThreadGoal struct {
ThreadID string `json:"threadId"`
Objective string `json:"objective"`
Status ThreadGoalStatus `json:"status"`
TokenBudget *int64 `json:"tokenBudget"`
TokensUsed int64 `json:"tokensUsed"`
TimeUsedSeconds int64 `json:"timeUsedSeconds"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
}
// ThreadGoalUpdatedNotification is the payload for thread/goal/updated.
type ThreadGoalUpdatedNotification struct {
ThreadID string `json:"threadId"`
TurnID *string `json:"turnId"`
Goal ThreadGoal `json:"goal"`
}
// ApplyPatchApprovalParams uses the sanitized schema variant because the raw
// schema currently exceeds the generator's capabilities.
type ApplyPatchApprovalParams = SanitizedApplyPatchApprovalParams
// ApplyPatchApprovalResponse uses the sanitized schema variant because the raw
// schema currently exceeds the generator's capabilities.
type ApplyPatchApprovalResponse = SanitizedApplyPatchApprovalResponse
// ExecCommandApprovalParams uses the sanitized schema variant because the raw
// schema currently exceeds the generator's capabilities.
type ExecCommandApprovalParams = SanitizedExecCommandApprovalParams
// ExecCommandApprovalResponse uses the sanitized schema variant because the raw
// schema currently exceeds the generator's capabilities.
type ExecCommandApprovalResponse = SanitizedExecCommandApprovalResponse
// FileChangeRequestApprovalParams uses the sanitized schema variant because the
// raw schema currently exceeds the generator's capabilities.
type FileChangeRequestApprovalParams = SanitizedFileChangeRequestApprovalParams
// FileChangeRequestApprovalResponse uses the sanitized schema variant because
// the raw schema currently exceeds the generator's capabilities.
type FileChangeRequestApprovalResponse = SanitizedFileChangeRequestApprovalResponse
// ToolRequestUserInputParams uses the sanitized schema variant because the raw
// schema currently exceeds the generator's capabilities.
type ToolRequestUserInputParams = SanitizedToolRequestUserInputParams
// ToolRequestUserInputResponse uses the sanitized schema variant because the raw
// schema currently exceeds the generator's capabilities.
type ToolRequestUserInputResponse = SanitizedToolRequestUserInputResponse
// CommandExecutionRequestApprovalParams is maintained manually because the raw
// schema uses nested unions that the generator does not currently emit.
type CommandExecutionRequestApprovalParams struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
ItemID string `json:"itemId"`
ApprovalID *string `json:"approvalId,omitempty"`
Reason *string `json:"reason,omitempty"`
NetworkApprovalContext interface{} `json:"networkApprovalContext,omitempty"`
Command *string `json:"command,omitempty"`
Cwd *string `json:"cwd,omitempty"`
CommandActions []interface{} `json:"commandActions,omitempty"`
AdditionalPermissions interface{} `json:"additionalPermissions,omitempty"`
ProposedExecpolicyAmendment []string `json:"proposedExecpolicyAmendment,omitempty"`
ProposedNetworkPolicyAmendments []NetworkPolicyAmendment `json:"proposedNetworkPolicyAmendments,omitempty"`
AvailableDecisions []CommandExecutionApprovalDecision `json:"availableDecisions,omitempty"`
}
// CommandExecutionRequestApprovalResponse is maintained manually because the raw
// schema uses nested unions that the generator does not currently emit.
type CommandExecutionRequestApprovalResponse struct {
Decision CommandExecutionApprovalDecision `json:"decision"`
}
// PermissionsRequestApprovalParams is maintained manually because the raw
// schema uses nested unions that the generator does not currently emit.
type PermissionsRequestApprovalParams struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
ItemID string `json:"itemId"`
Reason *string `json:"reason,omitempty"`
Permissions interface{} `json:"permissions"`
}
// PermissionsRequestApprovalResponse is maintained manually because the raw
// schema uses nested unions that the generator does not currently emit.
type PermissionsRequestApprovalResponse struct {
Permissions interface{} `json:"permissions"`
Scope interface{} `json:"scope,omitempty"`
}
@@ -0,0 +1,10 @@
// Code generated by runtime/codexproto/internal/codegen. DO NOT EDIT.
// Source codex commit: 6d2168f06ae275d5e1f73cabf935d2bcc8549998
package codexproto
// GeneratedCodexCommit is the Codex source commit used to generate this protocol package.
const GeneratedCodexCommit = "6d2168f06ae275d5e1f73cabf935d2bcc8549998"
// GeneratedCodexVersion is the Codex package version used to generate this protocol package.
const GeneratedCodexVersion = "0.0.0"
@@ -0,0 +1,644 @@
// Code generated by runtime/codexproto/internal/codegen. DO NOT EDIT.
// Source codex commit: 6d2168f06ae275d5e1f73cabf935d2bcc8549998
package codexproto
import "encoding/json"
// Notification represents a typed server notification.
type Notification struct {
Method string
Params any
Raw json.RawMessage
}
type notificationParser func(json.RawMessage) (Notification, error)
var notificationParsers = map[string]notificationParser{
"account/login/completed": func(params json.RawMessage) (Notification, error) {
var payload AccountLoginCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "account/login/completed", Raw: params}, err
}
}
return Notification{Method: "account/login/completed", Params: payload, Raw: params}, nil
},
"account/rateLimits/updated": func(params json.RawMessage) (Notification, error) {
var payload AccountRateLimitsUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "account/rateLimits/updated", Raw: params}, err
}
}
return Notification{Method: "account/rateLimits/updated", Params: payload, Raw: params}, nil
},
"account/updated": func(params json.RawMessage) (Notification, error) {
var payload AccountUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "account/updated", Raw: params}, err
}
}
return Notification{Method: "account/updated", Params: payload, Raw: params}, nil
},
"app/list/updated": func(params json.RawMessage) (Notification, error) {
var payload AppListUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "app/list/updated", Raw: params}, err
}
}
return Notification{Method: "app/list/updated", Params: payload, Raw: params}, nil
},
"command/exec/outputDelta": func(params json.RawMessage) (Notification, error) {
var payload CommandExecOutputDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "command/exec/outputDelta", Raw: params}, err
}
}
return Notification{Method: "command/exec/outputDelta", Params: payload, Raw: params}, nil
},
"configWarning": func(params json.RawMessage) (Notification, error) {
var payload ConfigWarningNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "configWarning", Raw: params}, err
}
}
return Notification{Method: "configWarning", Params: payload, Raw: params}, nil
},
"deprecationNotice": func(params json.RawMessage) (Notification, error) {
var payload DeprecationNoticeNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "deprecationNotice", Raw: params}, err
}
}
return Notification{Method: "deprecationNotice", Params: payload, Raw: params}, nil
},
"error": func(params json.RawMessage) (Notification, error) {
var payload ErrorNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "error", Raw: params}, err
}
}
return Notification{Method: "error", Params: payload, Raw: params}, nil
},
"externalAgentConfig/import/completed": func(params json.RawMessage) (Notification, error) {
var payload ExternalAgentConfigImportCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "externalAgentConfig/import/completed", Raw: params}, err
}
}
return Notification{Method: "externalAgentConfig/import/completed", Params: payload, Raw: params}, nil
},
"externalAgentConfig/import/progress": func(params json.RawMessage) (Notification, error) {
var payload ExternalAgentConfigImportProgressNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "externalAgentConfig/import/progress", Raw: params}, err
}
}
return Notification{Method: "externalAgentConfig/import/progress", Params: payload, Raw: params}, nil
},
"fs/changed": func(params json.RawMessage) (Notification, error) {
var payload FsChangedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "fs/changed", Raw: params}, err
}
}
return Notification{Method: "fs/changed", Params: payload, Raw: params}, nil
},
"fuzzyFileSearch/sessionCompleted": func(params json.RawMessage) (Notification, error) {
var payload FuzzyFileSearchSessionCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "fuzzyFileSearch/sessionCompleted", Raw: params}, err
}
}
return Notification{Method: "fuzzyFileSearch/sessionCompleted", Params: payload, Raw: params}, nil
},
"fuzzyFileSearch/sessionUpdated": func(params json.RawMessage) (Notification, error) {
var payload FuzzyFileSearchSessionUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "fuzzyFileSearch/sessionUpdated", Raw: params}, err
}
}
return Notification{Method: "fuzzyFileSearch/sessionUpdated", Params: payload, Raw: params}, nil
},
"guardianWarning": func(params json.RawMessage) (Notification, error) {
var payload GuardianWarningNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "guardianWarning", Raw: params}, err
}
}
return Notification{Method: "guardianWarning", Params: payload, Raw: params}, nil
},
"hook/completed": func(params json.RawMessage) (Notification, error) {
var payload HookCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "hook/completed", Raw: params}, err
}
}
return Notification{Method: "hook/completed", Params: payload, Raw: params}, nil
},
"hook/started": func(params json.RawMessage) (Notification, error) {
var payload HookStartedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "hook/started", Raw: params}, err
}
}
return Notification{Method: "hook/started", Params: payload, Raw: params}, nil
},
"item/agentMessage/delta": func(params json.RawMessage) (Notification, error) {
var payload AgentMessageDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/agentMessage/delta", Raw: params}, err
}
}
return Notification{Method: "item/agentMessage/delta", Params: payload, Raw: params}, nil
},
"item/autoApprovalReview/completed": func(params json.RawMessage) (Notification, error) {
var payload ItemGuardianApprovalReviewCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/autoApprovalReview/completed", Raw: params}, err
}
}
return Notification{Method: "item/autoApprovalReview/completed", Params: payload, Raw: params}, nil
},
"item/autoApprovalReview/started": func(params json.RawMessage) (Notification, error) {
var payload ItemGuardianApprovalReviewStartedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/autoApprovalReview/started", Raw: params}, err
}
}
return Notification{Method: "item/autoApprovalReview/started", Params: payload, Raw: params}, nil
},
"item/commandExecution/outputDelta": func(params json.RawMessage) (Notification, error) {
var payload CommandExecutionOutputDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/commandExecution/outputDelta", Raw: params}, err
}
}
return Notification{Method: "item/commandExecution/outputDelta", Params: payload, Raw: params}, nil
},
"item/commandExecution/terminalInteraction": func(params json.RawMessage) (Notification, error) {
var payload TerminalInteractionNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/commandExecution/terminalInteraction", Raw: params}, err
}
}
return Notification{Method: "item/commandExecution/terminalInteraction", Params: payload, Raw: params}, nil
},
"item/completed": func(params json.RawMessage) (Notification, error) {
var payload ItemCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/completed", Raw: params}, err
}
}
return Notification{Method: "item/completed", Params: payload, Raw: params}, nil
},
"item/fileChange/outputDelta": func(params json.RawMessage) (Notification, error) {
var payload FileChangeOutputDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/fileChange/outputDelta", Raw: params}, err
}
}
return Notification{Method: "item/fileChange/outputDelta", Params: payload, Raw: params}, nil
},
"item/fileChange/patchUpdated": func(params json.RawMessage) (Notification, error) {
var payload FileChangePatchUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/fileChange/patchUpdated", Raw: params}, err
}
}
return Notification{Method: "item/fileChange/patchUpdated", Params: payload, Raw: params}, nil
},
"item/mcpToolCall/progress": func(params json.RawMessage) (Notification, error) {
var payload McpToolCallProgressNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/mcpToolCall/progress", Raw: params}, err
}
}
return Notification{Method: "item/mcpToolCall/progress", Params: payload, Raw: params}, nil
},
"item/plan/delta": func(params json.RawMessage) (Notification, error) {
var payload PlanDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/plan/delta", Raw: params}, err
}
}
return Notification{Method: "item/plan/delta", Params: payload, Raw: params}, nil
},
"item/reasoning/summaryPartAdded": func(params json.RawMessage) (Notification, error) {
var payload ReasoningSummaryPartAddedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/reasoning/summaryPartAdded", Raw: params}, err
}
}
return Notification{Method: "item/reasoning/summaryPartAdded", Params: payload, Raw: params}, nil
},
"item/reasoning/summaryTextDelta": func(params json.RawMessage) (Notification, error) {
var payload ReasoningSummaryTextDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/reasoning/summaryTextDelta", Raw: params}, err
}
}
return Notification{Method: "item/reasoning/summaryTextDelta", Params: payload, Raw: params}, nil
},
"item/reasoning/textDelta": func(params json.RawMessage) (Notification, error) {
var payload ReasoningTextDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/reasoning/textDelta", Raw: params}, err
}
}
return Notification{Method: "item/reasoning/textDelta", Params: payload, Raw: params}, nil
},
"item/started": func(params json.RawMessage) (Notification, error) {
var payload ItemStartedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "item/started", Raw: params}, err
}
}
return Notification{Method: "item/started", Params: payload, Raw: params}, nil
},
"mcpServer/oauthLogin/completed": func(params json.RawMessage) (Notification, error) {
var payload McpServerOauthLoginCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "mcpServer/oauthLogin/completed", Raw: params}, err
}
}
return Notification{Method: "mcpServer/oauthLogin/completed", Params: payload, Raw: params}, nil
},
"mcpServer/startupStatus/updated": func(params json.RawMessage) (Notification, error) {
var payload McpServerStatusUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "mcpServer/startupStatus/updated", Raw: params}, err
}
}
return Notification{Method: "mcpServer/startupStatus/updated", Params: payload, Raw: params}, nil
},
"model/rerouted": func(params json.RawMessage) (Notification, error) {
var payload ModelReroutedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "model/rerouted", Raw: params}, err
}
}
return Notification{Method: "model/rerouted", Params: payload, Raw: params}, nil
},
"model/safetyBuffering/updated": func(params json.RawMessage) (Notification, error) {
var payload ModelSafetyBufferingUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "model/safetyBuffering/updated", Raw: params}, err
}
}
return Notification{Method: "model/safetyBuffering/updated", Params: payload, Raw: params}, nil
},
"model/verification": func(params json.RawMessage) (Notification, error) {
var payload ModelVerificationNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "model/verification", Raw: params}, err
}
}
return Notification{Method: "model/verification", Params: payload, Raw: params}, nil
},
"process/exited": func(params json.RawMessage) (Notification, error) {
var payload ProcessExitedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "process/exited", Raw: params}, err
}
}
return Notification{Method: "process/exited", Params: payload, Raw: params}, nil
},
"process/outputDelta": func(params json.RawMessage) (Notification, error) {
var payload ProcessOutputDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "process/outputDelta", Raw: params}, err
}
}
return Notification{Method: "process/outputDelta", Params: payload, Raw: params}, nil
},
"remoteControl/status/changed": func(params json.RawMessage) (Notification, error) {
var payload RemoteControlStatusChangedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "remoteControl/status/changed", Raw: params}, err
}
}
return Notification{Method: "remoteControl/status/changed", Params: payload, Raw: params}, nil
},
"serverRequest/resolved": func(params json.RawMessage) (Notification, error) {
var payload ServerRequestResolvedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "serverRequest/resolved", Raw: params}, err
}
}
return Notification{Method: "serverRequest/resolved", Params: payload, Raw: params}, nil
},
"skills/changed": func(params json.RawMessage) (Notification, error) {
var payload SkillsChangedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "skills/changed", Raw: params}, err
}
}
return Notification{Method: "skills/changed", Params: payload, Raw: params}, nil
},
"thread/archived": func(params json.RawMessage) (Notification, error) {
var payload ThreadArchivedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/archived", Raw: params}, err
}
}
return Notification{Method: "thread/archived", Params: payload, Raw: params}, nil
},
"thread/closed": func(params json.RawMessage) (Notification, error) {
var payload ThreadClosedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/closed", Raw: params}, err
}
}
return Notification{Method: "thread/closed", Params: payload, Raw: params}, nil
},
"thread/compacted": func(params json.RawMessage) (Notification, error) {
var payload ContextCompactedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/compacted", Raw: params}, err
}
}
return Notification{Method: "thread/compacted", Params: payload, Raw: params}, nil
},
"thread/deleted": func(params json.RawMessage) (Notification, error) {
var payload ThreadDeletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/deleted", Raw: params}, err
}
}
return Notification{Method: "thread/deleted", Params: payload, Raw: params}, nil
},
"thread/goal/cleared": func(params json.RawMessage) (Notification, error) {
var payload ThreadGoalClearedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/goal/cleared", Raw: params}, err
}
}
return Notification{Method: "thread/goal/cleared", Params: payload, Raw: params}, nil
},
"thread/goal/updated": func(params json.RawMessage) (Notification, error) {
var payload ThreadGoalUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/goal/updated", Raw: params}, err
}
}
return Notification{Method: "thread/goal/updated", Params: payload, Raw: params}, nil
},
"thread/name/updated": func(params json.RawMessage) (Notification, error) {
var payload ThreadNameUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/name/updated", Raw: params}, err
}
}
return Notification{Method: "thread/name/updated", Params: payload, Raw: params}, nil
},
"thread/realtime/closed": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeClosedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/closed", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/closed", Params: payload, Raw: params}, nil
},
"thread/realtime/error": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeErrorNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/error", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/error", Params: payload, Raw: params}, nil
},
"thread/realtime/itemAdded": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeItemAddedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/itemAdded", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/itemAdded", Params: payload, Raw: params}, nil
},
"thread/realtime/outputAudio/delta": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeOutputAudioDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/outputAudio/delta", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/outputAudio/delta", Params: payload, Raw: params}, nil
},
"thread/realtime/sdp": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeSdpNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/sdp", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/sdp", Params: payload, Raw: params}, nil
},
"thread/realtime/started": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeStartedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/started", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/started", Params: payload, Raw: params}, nil
},
"thread/realtime/transcript/delta": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeTranscriptDeltaNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/transcript/delta", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/transcript/delta", Params: payload, Raw: params}, nil
},
"thread/realtime/transcript/done": func(params json.RawMessage) (Notification, error) {
var payload ThreadRealtimeTranscriptDoneNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/realtime/transcript/done", Raw: params}, err
}
}
return Notification{Method: "thread/realtime/transcript/done", Params: payload, Raw: params}, nil
},
"thread/settings/updated": func(params json.RawMessage) (Notification, error) {
var payload ThreadSettingsUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/settings/updated", Raw: params}, err
}
}
return Notification{Method: "thread/settings/updated", Params: payload, Raw: params}, nil
},
"thread/started": func(params json.RawMessage) (Notification, error) {
var payload ThreadStartedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/started", Raw: params}, err
}
}
return Notification{Method: "thread/started", Params: payload, Raw: params}, nil
},
"thread/status/changed": func(params json.RawMessage) (Notification, error) {
var payload ThreadStatusChangedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/status/changed", Raw: params}, err
}
}
return Notification{Method: "thread/status/changed", Params: payload, Raw: params}, nil
},
"thread/tokenUsage/updated": func(params json.RawMessage) (Notification, error) {
var payload ThreadTokenUsageUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/tokenUsage/updated", Raw: params}, err
}
}
return Notification{Method: "thread/tokenUsage/updated", Params: payload, Raw: params}, nil
},
"thread/unarchived": func(params json.RawMessage) (Notification, error) {
var payload ThreadUnarchivedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "thread/unarchived", Raw: params}, err
}
}
return Notification{Method: "thread/unarchived", Params: payload, Raw: params}, nil
},
"turn/completed": func(params json.RawMessage) (Notification, error) {
var payload TurnCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "turn/completed", Raw: params}, err
}
}
return Notification{Method: "turn/completed", Params: payload, Raw: params}, nil
},
"turn/diff/updated": func(params json.RawMessage) (Notification, error) {
var payload TurnDiffUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "turn/diff/updated", Raw: params}, err
}
}
return Notification{Method: "turn/diff/updated", Params: payload, Raw: params}, nil
},
"turn/moderationMetadata": func(params json.RawMessage) (Notification, error) {
var payload TurnModerationMetadataNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "turn/moderationMetadata", Raw: params}, err
}
}
return Notification{Method: "turn/moderationMetadata", Params: payload, Raw: params}, nil
},
"turn/plan/updated": func(params json.RawMessage) (Notification, error) {
var payload TurnPlanUpdatedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "turn/plan/updated", Raw: params}, err
}
}
return Notification{Method: "turn/plan/updated", Params: payload, Raw: params}, nil
},
"turn/started": func(params json.RawMessage) (Notification, error) {
var payload TurnStartedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "turn/started", Raw: params}, err
}
}
return Notification{Method: "turn/started", Params: payload, Raw: params}, nil
},
"warning": func(params json.RawMessage) (Notification, error) {
var payload WarningNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "warning", Raw: params}, err
}
}
return Notification{Method: "warning", Params: payload, Raw: params}, nil
},
"windows/worldWritableWarning": func(params json.RawMessage) (Notification, error) {
var payload WindowsWorldWritableWarningNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "windows/worldWritableWarning", Raw: params}, err
}
}
return Notification{Method: "windows/worldWritableWarning", Params: payload, Raw: params}, nil
},
"windowsSandbox/setupCompleted": func(params json.RawMessage) (Notification, error) {
var payload WindowsSandboxSetupCompletedNotification
if len(params) > 0 {
if err := json.Unmarshal(params, &payload); err != nil {
return Notification{Method: "windowsSandbox/setupCompleted", Raw: params}, err
}
}
return Notification{Method: "windowsSandbox/setupCompleted", Params: payload, Raw: params}, nil
},
}
// ParseServerNotification parses a server notification by method.
func ParseServerNotification(method string, params json.RawMessage) (Notification, error) {
if handler, ok := notificationParsers[method]; ok {
return handler(params)
}
return Notification{Method: method, Raw: params}, nil
}
// IsKnownServerNotificationMethod reports whether method is in the generated server notification surface.
func IsKnownServerNotificationMethod(method string) bool {
_, ok := notificationParsers[method]
return ok
}
@@ -0,0 +1,86 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"FileChange": {
"oneOf": [
{
"properties": {
"content": {
"type": "string"
},
"type": {
"enum": ["add"],
"title": "AddFileChangeType",
"type": "string"
}
},
"required": ["content", "type"],
"title": "AddFileChange",
"type": "object"
},
{
"properties": {
"content": {
"type": "string"
},
"type": {
"enum": ["delete"],
"title": "DeleteFileChangeType",
"type": "string"
}
},
"required": ["content", "type"],
"title": "DeleteFileChange",
"type": "object"
},
{
"properties": {
"move_path": {
"type": ["string", "null"]
},
"type": {
"enum": ["update"],
"title": "UpdateFileChangeType",
"type": "string"
},
"unified_diff": {
"type": "string"
}
},
"required": ["type", "unified_diff"],
"title": "UpdateFileChange",
"type": "object"
}
]
},
"ThreadId": {
"type": "string"
}
},
"properties": {
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].",
"type": "string"
},
"conversationId": {
"$ref": "#/definitions/ThreadId"
},
"fileChanges": {
"additionalProperties": {
"$ref": "#/definitions/FileChange"
},
"type": "object"
},
"grantRoot": {
"description": "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).",
"type": ["string", "null"]
},
"reason": {
"description": "Optional explanatory reason (e.g. request for extra write access).",
"type": ["string", "null"]
}
},
"required": ["callId", "conversationId", "fileChanges"],
"title": "ApplyPatchApprovalParams",
"type": "object"
}
@@ -0,0 +1,98 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": ["action", "host"],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": ["allow", "deny"],
"type": "string"
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"enum": ["approved"],
"type": "string"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"properties": {
"approved_execpolicy_amendment": {
"properties": {
"proposed_execpolicy_amendment": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["proposed_execpolicy_amendment"],
"type": "object"
}
},
"required": ["approved_execpolicy_amendment"],
"title": "ApprovedExecpolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session.",
"enum": ["approved_for_session"],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"properties": {
"network_policy_amendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": ["network_policy_amendment"],
"type": "object"
}
},
"required": ["network_policy_amendment"],
"title": "NetworkPolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"enum": ["denied"],
"type": "string"
},
{
"description": "Automatic approval review timed out before reaching a decision.",
"enum": ["timed_out"],
"type": "string"
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"enum": ["abort"],
"type": "string"
}
]
}
},
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"required": ["decision"],
"title": "ApplyPatchApprovalResponse",
"type": "object"
}
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AttestationGenerateParams",
"type": "object"
}
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"token": {
"description": "Opaque client attestation token.",
"type": "string"
}
},
"required": ["token"],
"title": "AttestationGenerateResponse",
"type": "object"
}
@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ChatgptAuthTokensRefreshReason": {
"oneOf": [
{
"description": "Codex attempted a backend request and received `401 Unauthorized`.",
"enum": ["unauthorized"],
"type": "string"
}
]
}
},
"properties": {
"previousAccountId": {
"description": "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).",
"type": ["string", "null"]
},
"reason": {
"$ref": "#/definitions/ChatgptAuthTokensRefreshReason"
}
},
"required": ["reason"],
"title": "ChatgptAuthTokensRefreshParams",
"type": "object"
}
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"accessToken": {
"type": "string"
},
"chatgptAccountId": {
"type": "string"
},
"chatgptPlanType": {
"type": ["string", "null"]
}
},
"required": ["accessToken", "chatgptAccountId"],
"title": "ChatgptAuthTokensRefreshResponse",
"type": "object"
}
@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"properties": {
"method": {
"enum": ["initialized"],
"title": "InitializedNotificationMethod",
"type": "string"
}
},
"required": ["method"],
"title": "InitializedNotification",
"type": "object"
}
],
"title": "ClientNotification"
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,472 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AdditionalFileSystemPermissions": {
"properties": {
"entries": {
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
},
"type": ["array", "null"]
},
"globScanMaxDepth": {
"format": "uint",
"minimum": 1.0,
"type": ["integer", "null"]
},
"read": {
"description": "This will be removed in favor of `entries`.",
"items": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": ["array", "null"]
},
"write": {
"description": "This will be removed in favor of `entries`.",
"items": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": ["array", "null"]
}
},
"type": "object"
},
"AdditionalNetworkPermissions": {
"properties": {
"enabled": {
"type": ["boolean", "null"]
}
},
"type": "object"
},
"AdditionalPermissionProfile": {
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
],
"description": "Partial overlay used for per-command permission requests."
}
},
"type": "object"
},
"CommandAction": {
"oneOf": [
{
"properties": {
"command": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"enum": ["read"],
"title": "ReadCommandActionType",
"type": "string"
}
},
"required": ["command", "name", "path", "type"],
"title": "ReadCommandAction",
"type": "object"
},
{
"properties": {
"command": {
"type": "string"
},
"path": {
"type": ["string", "null"]
},
"type": {
"enum": ["listFiles"],
"title": "ListFilesCommandActionType",
"type": "string"
}
},
"required": ["command", "type"],
"title": "ListFilesCommandAction",
"type": "object"
},
{
"properties": {
"command": {
"type": "string"
},
"path": {
"type": ["string", "null"]
},
"query": {
"type": ["string", "null"]
},
"type": {
"enum": ["search"],
"title": "SearchCommandActionType",
"type": "string"
}
},
"required": ["command", "type"],
"title": "SearchCommandAction",
"type": "object"
},
{
"properties": {
"command": {
"type": "string"
},
"type": {
"enum": ["unknown"],
"title": "UnknownCommandActionType",
"type": "string"
}
},
"required": ["command", "type"],
"title": "UnknownCommandAction",
"type": "object"
}
]
},
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"enum": ["accept"],
"type": "string"
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"enum": ["acceptForSession"],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"properties": {
"acceptWithExecpolicyAmendment": {
"properties": {
"execpolicy_amendment": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["execpolicy_amendment"],
"type": "object"
}
},
"required": ["acceptWithExecpolicyAmendment"],
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision",
"type": "object"
},
{
"additionalProperties": false,
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"properties": {
"applyNetworkPolicyAmendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": ["network_policy_amendment"],
"type": "object"
}
},
"required": ["applyNetworkPolicyAmendment"],
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User denied the command. The agent will continue the turn.",
"enum": ["decline"],
"type": "string"
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"enum": ["cancel"],
"type": "string"
}
]
},
"FileSystemAccessMode": {
"enum": ["read", "write", "deny"],
"type": "string"
},
"FileSystemPath": {
"oneOf": [
{
"properties": {
"path": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"enum": ["path"],
"title": "PathFileSystemPathType",
"type": "string"
}
},
"required": ["path", "type"],
"title": "PathFileSystemPath",
"type": "object"
},
{
"properties": {
"pattern": {
"type": "string"
},
"type": {
"enum": ["glob_pattern"],
"title": "GlobPatternFileSystemPathType",
"type": "string"
}
},
"required": ["pattern", "type"],
"title": "GlobPatternFileSystemPath",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["special"],
"title": "SpecialFileSystemPathType",
"type": "string"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"required": ["type", "value"],
"title": "SpecialFileSystemPath",
"type": "object"
}
]
},
"FileSystemSandboxEntry": {
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
},
"required": ["access", "path"],
"type": "object"
},
"FileSystemSpecialPath": {
"oneOf": [
{
"properties": {
"kind": {
"enum": ["root"],
"type": "string"
}
},
"required": ["kind"],
"title": "RootFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["minimal"],
"type": "string"
}
},
"required": ["kind"],
"title": "MinimalFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["project_roots"],
"type": "string"
},
"subpath": {
"type": ["string", "null"]
}
},
"required": ["kind"],
"title": "KindFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["tmpdir"],
"type": "string"
}
},
"required": ["kind"],
"title": "TmpdirFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["slash_tmp"],
"type": "string"
}
},
"required": ["kind"],
"title": "SlashTmpFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["unknown"],
"type": "string"
},
"path": {
"type": "string"
},
"subpath": {
"type": ["string", "null"]
}
},
"required": ["kind", "path"],
"type": "object"
}
]
},
"LegacyAppPathString": {
"type": "string"
},
"NetworkApprovalContext": {
"properties": {
"host": {
"type": "string"
},
"protocol": {
"$ref": "#/definitions/NetworkApprovalProtocol"
}
},
"required": ["host", "protocol"],
"type": "object"
},
"NetworkApprovalProtocol": {
"enum": ["http", "https", "socks5Tcp", "socks5Udp"],
"type": "string"
},
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": ["action", "host"],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": ["allow", "deny"],
"type": "string"
}
},
"properties": {
"approvalId": {
"description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.",
"type": ["string", "null"]
},
"command": {
"description": "The command to be executed.",
"type": ["string", "null"]
},
"commandActions": {
"description": "Best-effort parsed command actions for friendly display.",
"items": {
"$ref": "#/definitions/CommandAction"
},
"type": ["array", "null"]
},
"cwd": {
"anyOf": [
{
"$ref": "#/definitions/LegacyAppPathString"
},
{
"type": "null"
}
],
"description": "The command's working directory."
},
"environmentId": {
"default": null,
"description": "Environment in which the command will run.",
"type": ["string", "null"]
},
"itemId": {
"type": "string"
},
"networkApprovalContext": {
"anyOf": [
{
"$ref": "#/definitions/NetworkApprovalContext"
},
{
"type": "null"
}
],
"description": "Optional context for a managed-network approval prompt."
},
"proposedExecpolicyAmendment": {
"description": "Optional proposed execpolicy amendment to allow similar commands without prompting.",
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"proposedNetworkPolicyAmendments": {
"description": "Optional proposed network policy amendments (allow/deny host) for future requests.",
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
},
"type": ["array", "null"]
},
"reason": {
"description": "Optional explanatory reason (e.g. request for network access).",
"type": ["string", "null"]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["itemId", "startedAtMs", "threadId", "turnId"],
"title": "CommandExecutionRequestApprovalParams",
"type": "object"
}
@@ -0,0 +1,92 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"enum": ["accept"],
"type": "string"
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"enum": ["acceptForSession"],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"properties": {
"acceptWithExecpolicyAmendment": {
"properties": {
"execpolicy_amendment": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["execpolicy_amendment"],
"type": "object"
}
},
"required": ["acceptWithExecpolicyAmendment"],
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision",
"type": "object"
},
{
"additionalProperties": false,
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"properties": {
"applyNetworkPolicyAmendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": ["network_policy_amendment"],
"type": "object"
}
},
"required": ["applyNetworkPolicyAmendment"],
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User denied the command. The agent will continue the turn.",
"enum": ["decline"],
"type": "string"
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"enum": ["cancel"],
"type": "string"
}
]
},
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": ["action", "host"],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": ["allow", "deny"],
"type": "string"
}
},
"properties": {
"decision": {
"$ref": "#/definitions/CommandExecutionApprovalDecision"
}
},
"required": ["decision"],
"title": "CommandExecutionRequestApprovalResponse",
"type": "object"
}
@@ -0,0 +1,24 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"arguments": true,
"callId": {
"type": "string"
},
"namespace": {
"type": ["string", "null"]
},
"threadId": {
"type": "string"
},
"tool": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["arguments", "callId", "threadId", "tool", "turnId"],
"title": "DynamicToolCallParams",
"type": "object"
}
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"DynamicToolCallOutputContentItem": {
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": ["inputText"],
"title": "InputTextDynamicToolCallOutputContentItemType",
"type": "string"
}
},
"required": ["text", "type"],
"title": "InputTextDynamicToolCallOutputContentItem",
"type": "object"
},
{
"properties": {
"imageUrl": {
"type": "string"
},
"type": {
"enum": ["inputImage"],
"title": "InputImageDynamicToolCallOutputContentItemType",
"type": "string"
}
},
"required": ["imageUrl", "type"],
"title": "InputImageDynamicToolCallOutputContentItem",
"type": "object"
}
]
}
},
"properties": {
"contentItems": {
"items": {
"$ref": "#/definitions/DynamicToolCallOutputContentItem"
},
"type": "array"
},
"success": {
"type": "boolean"
}
},
"required": ["contentItems", "success"],
"title": "DynamicToolCallResponse",
"type": "object"
}
@@ -0,0 +1,122 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ParsedCommand": {
"oneOf": [
{
"properties": {
"cmd": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"description": "(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.",
"type": "string"
},
"type": {
"enum": ["read"],
"title": "ReadParsedCommandType",
"type": "string"
}
},
"required": ["cmd", "name", "path", "type"],
"title": "ReadParsedCommand",
"type": "object"
},
{
"properties": {
"cmd": {
"type": "string"
},
"path": {
"type": ["string", "null"]
},
"type": {
"enum": ["list_files"],
"title": "ListFilesParsedCommandType",
"type": "string"
}
},
"required": ["cmd", "type"],
"title": "ListFilesParsedCommand",
"type": "object"
},
{
"properties": {
"cmd": {
"type": "string"
},
"path": {
"type": ["string", "null"]
},
"query": {
"type": ["string", "null"]
},
"type": {
"enum": ["search"],
"title": "SearchParsedCommandType",
"type": "string"
}
},
"required": ["cmd", "type"],
"title": "SearchParsedCommand",
"type": "object"
},
{
"properties": {
"cmd": {
"type": "string"
},
"type": {
"enum": ["unknown"],
"title": "UnknownParsedCommandType",
"type": "string"
}
},
"required": ["cmd", "type"],
"title": "UnknownParsedCommand",
"type": "object"
}
]
},
"ThreadId": {
"type": "string"
}
},
"properties": {
"approvalId": {
"description": "Identifier for this specific approval callback.",
"type": ["string", "null"]
},
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].",
"type": "string"
},
"command": {
"items": {
"type": "string"
},
"type": "array"
},
"conversationId": {
"$ref": "#/definitions/ThreadId"
},
"cwd": {
"type": "string"
},
"parsedCmd": {
"items": {
"$ref": "#/definitions/ParsedCommand"
},
"type": "array"
},
"reason": {
"type": ["string", "null"]
}
},
"required": ["callId", "command", "conversationId", "cwd", "parsedCmd"],
"title": "ExecCommandApprovalParams",
"type": "object"
}
@@ -0,0 +1,98 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": ["action", "host"],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": ["allow", "deny"],
"type": "string"
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"enum": ["approved"],
"type": "string"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"properties": {
"approved_execpolicy_amendment": {
"properties": {
"proposed_execpolicy_amendment": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["proposed_execpolicy_amendment"],
"type": "object"
}
},
"required": ["approved_execpolicy_amendment"],
"title": "ApprovedExecpolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session.",
"enum": ["approved_for_session"],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"properties": {
"network_policy_amendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": ["network_policy_amendment"],
"type": "object"
}
},
"required": ["network_policy_amendment"],
"title": "NetworkPolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"enum": ["denied"],
"type": "string"
},
{
"description": "Automatic approval review timed out before reaching a decision.",
"enum": ["timed_out"],
"type": "string"
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"enum": ["abort"],
"type": "string"
}
]
}
},
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"required": ["decision"],
"title": "ExecCommandApprovalResponse",
"type": "object"
}
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"grantRoot": {
"description": "[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).",
"type": ["string", "null"]
},
"itemId": {
"type": "string"
},
"reason": {
"description": "Optional explanatory reason (e.g. request for extra write access).",
"type": ["string", "null"]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["itemId", "startedAtMs", "threadId", "turnId"],
"title": "FileChangeRequestApprovalParams",
"type": "object"
}
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"FileChangeApprovalDecision": {
"oneOf": [
{
"description": "User approved the file changes.",
"enum": ["accept"],
"type": "string"
},
{
"description": "User approved the file changes and future changes to the same files should run without prompting.",
"enum": ["acceptForSession"],
"type": "string"
},
{
"description": "User denied the file changes. The agent will continue the turn.",
"enum": ["decline"],
"type": "string"
},
{
"description": "User denied the file changes. The turn will also be immediately interrupted.",
"enum": ["cancel"],
"type": "string"
}
]
}
},
"properties": {
"decision": {
"$ref": "#/definitions/FileChangeApprovalDecision"
}
},
"required": ["decision"],
"title": "FileChangeRequestApprovalResponse",
"type": "object"
}
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cancellationToken": {
"type": ["string", "null"]
},
"query": {
"type": "string"
},
"roots": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["query", "roots"],
"title": "FuzzyFileSearchParams",
"type": "object"
}
@@ -0,0 +1,52 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"FuzzyFileSearchMatchType": {
"enum": ["file", "directory"],
"type": "string"
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"items": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"type": ["array", "null"]
},
"match_type": {
"$ref": "#/definitions/FuzzyFileSearchMatchType"
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
}
},
"required": ["file_name", "match_type", "path", "root", "score"],
"type": "object"
}
},
"properties": {
"files": {
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
},
"type": "array"
}
},
"required": ["files"],
"title": "FuzzyFileSearchResponse",
"type": "object"
}
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sessionId": {
"type": "string"
}
},
"required": ["sessionId"],
"title": "FuzzyFileSearchSessionCompletedNotification",
"type": "object"
}
@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"FuzzyFileSearchMatchType": {
"enum": ["file", "directory"],
"type": "string"
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"items": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"type": ["array", "null"]
},
"match_type": {
"$ref": "#/definitions/FuzzyFileSearchMatchType"
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
}
},
"required": ["file_name", "match_type", "path", "root", "score"],
"type": "object"
}
},
"properties": {
"files": {
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
},
"type": "array"
},
"query": {
"type": "string"
},
"sessionId": {
"type": "string"
}
},
"required": ["files", "query", "sessionId"],
"title": "FuzzyFileSearchSessionUpdatedNotification",
"type": "object"
}
@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"JSONRPCErrorError": {
"properties": {
"code": {
"format": "int64",
"type": "integer"
},
"data": true,
"message": {
"type": "string"
}
},
"required": ["code", "message"],
"type": "object"
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"format": "int64",
"type": "integer"
}
]
}
},
"description": "A response to a request that indicates an error occurred.",
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
},
"required": ["error", "id"],
"title": "JSONRPCError",
"type": "object"
}
@@ -0,0 +1,16 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"code": {
"format": "int64",
"type": "integer"
},
"data": true,
"message": {
"type": "string"
}
},
"required": ["code", "message"],
"title": "JSONRPCErrorError",
"type": "object"
}
@@ -0,0 +1,117 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"anyOf": [
{
"$ref": "#/definitions/JSONRPCRequest"
},
{
"$ref": "#/definitions/JSONRPCNotification"
},
{
"$ref": "#/definitions/JSONRPCResponse"
},
{
"$ref": "#/definitions/JSONRPCError"
}
],
"definitions": {
"JSONRPCError": {
"description": "A response to a request that indicates an error occurred.",
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
},
"required": ["error", "id"],
"type": "object"
},
"JSONRPCErrorError": {
"properties": {
"code": {
"format": "int64",
"type": "integer"
},
"data": true,
"message": {
"type": "string"
}
},
"required": ["code", "message"],
"type": "object"
},
"JSONRPCNotification": {
"description": "A notification which does not expect a response.",
"properties": {
"method": {
"type": "string"
},
"params": true
},
"required": ["method"],
"type": "object"
},
"JSONRPCRequest": {
"description": "A request that expects a response.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true,
"trace": {
"anyOf": [
{
"$ref": "#/definitions/W3cTraceContext"
},
{
"type": "null"
}
],
"description": "Optional W3C Trace Context for distributed tracing."
}
},
"required": ["id", "method"],
"type": "object"
},
"JSONRPCResponse": {
"description": "A successful (non-error) response to a request.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
},
"required": ["id", "result"],
"type": "object"
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"format": "int64",
"type": "integer"
}
]
},
"W3cTraceContext": {
"properties": {
"traceparent": {
"type": ["string", "null"]
},
"tracestate": {
"type": ["string", "null"]
}
},
"type": "object"
}
},
"description": "Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.",
"title": "JSONRPCMessage"
}
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A notification which does not expect a response.",
"properties": {
"method": {
"type": "string"
},
"params": true
},
"required": ["method"],
"title": "JSONRPCNotification",
"type": "object"
}
@@ -0,0 +1,51 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"format": "int64",
"type": "integer"
}
]
},
"W3cTraceContext": {
"properties": {
"traceparent": {
"type": ["string", "null"]
},
"tracestate": {
"type": ["string", "null"]
}
},
"type": "object"
}
},
"description": "A request that expects a response.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true,
"trace": {
"anyOf": [
{
"$ref": "#/definitions/W3cTraceContext"
},
{
"type": "null"
}
],
"description": "Optional W3C Trace Context for distributed tracing."
}
},
"required": ["id", "method"],
"title": "JSONRPCRequest",
"type": "object"
}
@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"format": "int64",
"type": "integer"
}
]
}
},
"description": "A successful (non-error) response to a request.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
},
"required": ["id", "result"],
"title": "JSONRPCResponse",
"type": "object"
}
@@ -0,0 +1,452 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"McpElicitationArrayType": {
"enum": ["array"],
"type": "string"
},
"McpElicitationBooleanSchema": {
"additionalProperties": false,
"properties": {
"default": {
"type": ["boolean", "null"]
},
"description": {
"type": ["string", "null"]
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationBooleanType"
}
},
"required": ["type"],
"type": "object"
},
"McpElicitationBooleanType": {
"enum": ["boolean"],
"type": "string"
},
"McpElicitationConstOption": {
"additionalProperties": false,
"properties": {
"const": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": ["const", "title"],
"type": "object"
},
"McpElicitationEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationSingleSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationMultiSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationLegacyTitledEnumSchema"
}
]
},
"McpElicitationLegacyTitledEnumSchema": {
"additionalProperties": false,
"properties": {
"default": {
"type": ["string", "null"]
},
"description": {
"type": ["string", "null"]
},
"enum": {
"items": {
"type": "string"
},
"type": "array"
},
"enumNames": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"required": ["enum", "type"],
"type": "object"
},
"McpElicitationMultiSelectEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationUntitledMultiSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationTitledMultiSelectEnumSchema"
}
]
},
"McpElicitationNumberSchema": {
"additionalProperties": false,
"properties": {
"default": {
"format": "double",
"type": ["number", "null"]
},
"description": {
"type": ["string", "null"]
},
"maximum": {
"format": "double",
"type": ["number", "null"]
},
"minimum": {
"format": "double",
"type": ["number", "null"]
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationNumberType"
}
},
"required": ["type"],
"type": "object"
},
"McpElicitationNumberType": {
"enum": ["number", "integer"],
"type": "string"
},
"McpElicitationObjectType": {
"enum": ["object"],
"type": "string"
},
"McpElicitationPrimitiveSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationStringSchema"
},
{
"$ref": "#/definitions/McpElicitationNumberSchema"
},
{
"$ref": "#/definitions/McpElicitationBooleanSchema"
}
]
},
"McpElicitationSchema": {
"additionalProperties": false,
"description": "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.",
"properties": {
"$schema": {
"type": ["string", "null"]
},
"properties": {
"additionalProperties": {
"$ref": "#/definitions/McpElicitationPrimitiveSchema"
},
"type": "object"
},
"required": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationObjectType"
}
},
"required": ["properties", "type"],
"type": "object"
},
"McpElicitationSingleSelectEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationUntitledSingleSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationTitledSingleSelectEnumSchema"
}
]
},
"McpElicitationStringFormat": {
"enum": ["email", "uri", "date", "date-time"],
"type": "string"
},
"McpElicitationStringSchema": {
"additionalProperties": false,
"properties": {
"default": {
"type": ["string", "null"]
},
"description": {
"type": ["string", "null"]
},
"format": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationStringFormat"
},
{
"type": "null"
}
]
},
"maxLength": {
"format": "uint32",
"minimum": 0.0,
"type": ["integer", "null"]
},
"minLength": {
"format": "uint32",
"minimum": 0.0,
"type": ["integer", "null"]
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"required": ["type"],
"type": "object"
},
"McpElicitationStringType": {
"enum": ["string"],
"type": "string"
},
"McpElicitationTitledEnumItems": {
"additionalProperties": false,
"properties": {
"anyOf": {
"items": {
"$ref": "#/definitions/McpElicitationConstOption"
},
"type": "array"
}
},
"required": ["anyOf"],
"type": "object"
},
"McpElicitationTitledMultiSelectEnumSchema": {
"additionalProperties": false,
"properties": {
"default": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"description": {
"type": ["string", "null"]
},
"items": {
"$ref": "#/definitions/McpElicitationTitledEnumItems"
},
"maxItems": {
"format": "uint64",
"minimum": 0.0,
"type": ["integer", "null"]
},
"minItems": {
"format": "uint64",
"minimum": 0.0,
"type": ["integer", "null"]
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationArrayType"
}
},
"required": ["items", "type"],
"type": "object"
},
"McpElicitationTitledSingleSelectEnumSchema": {
"additionalProperties": false,
"properties": {
"default": {
"type": ["string", "null"]
},
"description": {
"type": ["string", "null"]
},
"oneOf": {
"items": {
"$ref": "#/definitions/McpElicitationConstOption"
},
"type": "array"
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"required": ["oneOf", "type"],
"type": "object"
},
"McpElicitationUntitledEnumItems": {
"additionalProperties": false,
"properties": {
"enum": {
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"required": ["enum", "type"],
"type": "object"
},
"McpElicitationUntitledMultiSelectEnumSchema": {
"additionalProperties": false,
"properties": {
"default": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"description": {
"type": ["string", "null"]
},
"items": {
"$ref": "#/definitions/McpElicitationUntitledEnumItems"
},
"maxItems": {
"format": "uint64",
"minimum": 0.0,
"type": ["integer", "null"]
},
"minItems": {
"format": "uint64",
"minimum": 0.0,
"type": ["integer", "null"]
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationArrayType"
}
},
"required": ["items", "type"],
"type": "object"
},
"McpElicitationUntitledSingleSelectEnumSchema": {
"additionalProperties": false,
"properties": {
"default": {
"type": ["string", "null"]
},
"description": {
"type": ["string", "null"]
},
"enum": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": ["string", "null"]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"required": ["enum", "type"],
"type": "object"
}
},
"oneOf": [
{
"properties": {
"_meta": true,
"message": {
"type": "string"
},
"mode": {
"enum": ["form"],
"type": "string"
},
"requestedSchema": {
"$ref": "#/definitions/McpElicitationSchema"
}
},
"required": ["message", "mode", "requestedSchema"],
"type": "object"
},
{
"properties": {
"_meta": true,
"message": {
"type": "string"
},
"mode": {
"enum": ["openai/form"],
"type": "string"
},
"requestedSchema": true
},
"required": ["message", "mode", "requestedSchema"],
"type": "object"
},
{
"properties": {
"_meta": true,
"elicitationId": {
"type": "string"
},
"message": {
"type": "string"
},
"mode": {
"enum": ["url"],
"type": "string"
},
"url": {
"type": "string"
}
},
"required": ["elicitationId", "message", "mode", "url"],
"type": "object"
}
],
"properties": {
"serverName": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"description": "Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.",
"type": ["string", "null"]
}
},
"required": ["serverName", "threadId"],
"title": "McpServerElicitationRequestParams",
"type": "object"
}
@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"McpServerElicitationAction": {
"enum": ["accept", "decline", "cancel"],
"type": "string"
}
},
"properties": {
"_meta": {
"description": "Optional client metadata for form-mode action handling."
},
"action": {
"$ref": "#/definitions/McpServerElicitationAction"
},
"content": {
"description": "Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.\n\nThis is nullable because decline/cancel responses have no content."
}
},
"required": ["action"],
"title": "McpServerElicitationRequestResponse",
"type": "object"
}
@@ -0,0 +1,258 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AdditionalFileSystemPermissions": {
"properties": {
"entries": {
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
},
"type": ["array", "null"]
},
"globScanMaxDepth": {
"format": "uint",
"minimum": 1.0,
"type": ["integer", "null"]
},
"read": {
"description": "This will be removed in favor of `entries`.",
"items": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": ["array", "null"]
},
"write": {
"description": "This will be removed in favor of `entries`.",
"items": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": ["array", "null"]
}
},
"type": "object"
},
"AdditionalNetworkPermissions": {
"properties": {
"enabled": {
"type": ["boolean", "null"]
}
},
"type": "object"
},
"FileSystemAccessMode": {
"enum": ["read", "write", "deny"],
"type": "string"
},
"FileSystemPath": {
"oneOf": [
{
"properties": {
"path": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"enum": ["path"],
"title": "PathFileSystemPathType",
"type": "string"
}
},
"required": ["path", "type"],
"title": "PathFileSystemPath",
"type": "object"
},
{
"properties": {
"pattern": {
"type": "string"
},
"type": {
"enum": ["glob_pattern"],
"title": "GlobPatternFileSystemPathType",
"type": "string"
}
},
"required": ["pattern", "type"],
"title": "GlobPatternFileSystemPath",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["special"],
"title": "SpecialFileSystemPathType",
"type": "string"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"required": ["type", "value"],
"title": "SpecialFileSystemPath",
"type": "object"
}
]
},
"FileSystemSandboxEntry": {
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
},
"required": ["access", "path"],
"type": "object"
},
"FileSystemSpecialPath": {
"oneOf": [
{
"properties": {
"kind": {
"enum": ["root"],
"type": "string"
}
},
"required": ["kind"],
"title": "RootFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["minimal"],
"type": "string"
}
},
"required": ["kind"],
"title": "MinimalFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["project_roots"],
"type": "string"
},
"subpath": {
"type": ["string", "null"]
}
},
"required": ["kind"],
"title": "KindFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["tmpdir"],
"type": "string"
}
},
"required": ["kind"],
"title": "TmpdirFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["slash_tmp"],
"type": "string"
}
},
"required": ["kind"],
"title": "SlashTmpFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["unknown"],
"type": "string"
},
"path": {
"type": "string"
},
"subpath": {
"type": ["string", "null"]
}
},
"required": ["kind", "path"],
"type": "object"
}
]
},
"LegacyAppPathString": {
"type": "string"
},
"RequestPermissionProfile": {
"additionalProperties": false,
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
},
"type": "object"
}
},
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"environmentId": {
"default": null,
"type": ["string", "null"]
},
"itemId": {
"type": "string"
},
"permissions": {
"$ref": "#/definitions/RequestPermissionProfile"
},
"reason": {
"type": ["string", "null"]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"cwd",
"itemId",
"permissions",
"startedAtMs",
"threadId",
"turnId"
],
"title": "PermissionsRequestApprovalParams",
"type": "object"
}
@@ -0,0 +1,238 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AdditionalFileSystemPermissions": {
"properties": {
"entries": {
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
},
"type": ["array", "null"]
},
"globScanMaxDepth": {
"format": "uint",
"minimum": 1.0,
"type": ["integer", "null"]
},
"read": {
"description": "This will be removed in favor of `entries`.",
"items": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": ["array", "null"]
},
"write": {
"description": "This will be removed in favor of `entries`.",
"items": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": ["array", "null"]
}
},
"type": "object"
},
"AdditionalNetworkPermissions": {
"properties": {
"enabled": {
"type": ["boolean", "null"]
}
},
"type": "object"
},
"FileSystemAccessMode": {
"enum": ["read", "write", "deny"],
"type": "string"
},
"FileSystemPath": {
"oneOf": [
{
"properties": {
"path": {
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"enum": ["path"],
"title": "PathFileSystemPathType",
"type": "string"
}
},
"required": ["path", "type"],
"title": "PathFileSystemPath",
"type": "object"
},
{
"properties": {
"pattern": {
"type": "string"
},
"type": {
"enum": ["glob_pattern"],
"title": "GlobPatternFileSystemPathType",
"type": "string"
}
},
"required": ["pattern", "type"],
"title": "GlobPatternFileSystemPath",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["special"],
"title": "SpecialFileSystemPathType",
"type": "string"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"required": ["type", "value"],
"title": "SpecialFileSystemPath",
"type": "object"
}
]
},
"FileSystemSandboxEntry": {
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
},
"required": ["access", "path"],
"type": "object"
},
"FileSystemSpecialPath": {
"oneOf": [
{
"properties": {
"kind": {
"enum": ["root"],
"type": "string"
}
},
"required": ["kind"],
"title": "RootFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["minimal"],
"type": "string"
}
},
"required": ["kind"],
"title": "MinimalFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["project_roots"],
"type": "string"
},
"subpath": {
"type": ["string", "null"]
}
},
"required": ["kind"],
"title": "KindFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["tmpdir"],
"type": "string"
}
},
"required": ["kind"],
"title": "TmpdirFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["slash_tmp"],
"type": "string"
}
},
"required": ["kind"],
"title": "SlashTmpFileSystemSpecialPath",
"type": "object"
},
{
"properties": {
"kind": {
"enum": ["unknown"],
"type": "string"
},
"path": {
"type": "string"
},
"subpath": {
"type": ["string", "null"]
}
},
"required": ["kind", "path"],
"type": "object"
}
]
},
"GrantedPermissionProfile": {
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"LegacyAppPathString": {
"type": "string"
},
"PermissionGrantScope": {
"enum": ["turn", "session"],
"type": "string"
}
},
"properties": {
"permissions": {
"$ref": "#/definitions/GrantedPermissionProfile"
},
"scope": {
"allOf": [
{
"$ref": "#/definitions/PermissionGrantScope"
}
],
"default": "turn"
},
"strictAutoReview": {
"description": "Review every subsequent command in this turn before normal sandboxed execution.",
"type": ["boolean", "null"]
}
},
"required": ["permissions"],
"title": "PermissionsRequestApprovalResponse",
"type": "object"
}
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"anyOf": [
{
"type": "string"
},
{
"format": "int64",
"type": "integer"
}
],
"title": "RequestId"
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,75 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ToolRequestUserInputOption": {
"description": "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
"properties": {
"description": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": ["description", "label"],
"type": "object"
},
"ToolRequestUserInputQuestion": {
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"items": {
"$ref": "#/definitions/ToolRequestUserInputOption"
},
"type": ["array", "null"]
},
"question": {
"type": "string"
}
},
"required": ["header", "id", "question"],
"type": "object"
}
},
"description": "EXPERIMENTAL. Params sent with a request_user_input event.",
"properties": {
"autoResolutionMs": {
"default": null,
"format": "uint64",
"minimum": 0.0,
"type": ["integer", "null"]
},
"itemId": {
"type": "string"
},
"questions": {
"items": {
"$ref": "#/definitions/ToolRequestUserInputQuestion"
},
"type": "array"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["itemId", "questions", "threadId", "turnId"],
"title": "ToolRequestUserInputParams",
"type": "object"
}
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ToolRequestUserInputAnswer": {
"description": "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
"properties": {
"answers": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["answers"],
"type": "object"
}
},
"description": "EXPERIMENTAL. Response payload mapping question ids to answers.",
"properties": {
"answers": {
"additionalProperties": {
"$ref": "#/definitions/ToolRequestUserInputAnswer"
},
"type": "object"
}
},
"required": ["answers"],
"title": "ToolRequestUserInputResponse",
"type": "object"
}
@@ -0,0 +1,65 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ClientInfo": {
"properties": {
"name": {
"type": "string"
},
"title": {
"type": ["string", "null"]
},
"version": {
"type": "string"
}
},
"required": ["name", "version"],
"type": "object"
},
"InitializeCapabilities": {
"description": "Client-declared capabilities negotiated during initialize.",
"properties": {
"experimentalApi": {
"default": false,
"description": "Opt into receiving experimental API methods and fields.",
"type": "boolean"
},
"mcpServerOpenaiFormElicitation": {
"description": "Allow downstream MCP servers to request OpenAI extended form elicitations.",
"type": "boolean"
},
"optOutNotificationMethods": {
"description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"requestAttestation": {
"default": false,
"description": "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
"type": "boolean"
}
},
"type": "object"
}
},
"properties": {
"capabilities": {
"anyOf": [
{
"$ref": "#/definitions/InitializeCapabilities"
},
{
"type": "null"
}
]
},
"clientInfo": {
"$ref": "#/definitions/ClientInfo"
}
},
"required": ["clientInfo"],
"title": "InitializeParams",
"type": "object"
}
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
},
"properties": {
"codexHome": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "Absolute path to the server's $CODEX_HOME directory."
},
"platformFamily": {
"description": "Platform family for the running app-server target, for example `\"unix\"` or `\"windows\"`.",
"type": "string"
},
"platformOs": {
"description": "Operating system for the running app-server target, for example `\"macos\"`, `\"linux\"`, or `\"windows\"`.",
"type": "string"
},
"userAgent": {
"type": "string"
}
},
"required": ["codexHome", "platformFamily", "platformOs", "userAgent"],
"title": "InitializeResponse",
"type": "object"
}
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"error": {
"type": ["string", "null"]
},
"loginId": {
"type": ["string", "null"]
},
"success": {
"type": "boolean"
}
},
"required": ["success"],
"title": "AccountLoginCompletedNotification",
"type": "object"
}
@@ -0,0 +1,165 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CreditsSnapshot": {
"properties": {
"balance": {
"type": ["string", "null"]
},
"hasCredits": {
"type": "boolean"
},
"unlimited": {
"type": "boolean"
}
},
"required": ["hasCredits", "unlimited"],
"type": "object"
},
"PlanType": {
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
],
"type": "string"
},
"RateLimitReachedType": {
"enum": [
"rate_limit_reached",
"workspace_owner_credits_depleted",
"workspace_member_credits_depleted",
"workspace_owner_usage_limit_reached",
"workspace_member_usage_limit_reached"
],
"type": "string"
},
"RateLimitSnapshot": {
"properties": {
"credits": {
"anyOf": [
{
"$ref": "#/definitions/CreditsSnapshot"
},
{
"type": "null"
}
]
},
"individualLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": ["string", "null"]
},
"limitName": {
"type": ["string", "null"]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/PlanType"
},
{
"type": "null"
}
]
},
"primary": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitWindow"
},
{
"type": "null"
}
]
},
"rateLimitReachedType": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitReachedType"
},
{
"type": "null"
}
]
},
"secondary": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitWindow"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"RateLimitWindow": {
"properties": {
"resetsAt": {
"format": "int64",
"type": ["integer", "null"]
},
"usedPercent": {
"format": "int32",
"type": "integer"
},
"windowDurationMins": {
"format": "int64",
"type": ["integer", "null"]
}
},
"required": ["usedPercent"],
"type": "object"
},
"SpendControlLimitSnapshot": {
"properties": {
"limit": {
"type": "string"
},
"remainingPercent": {
"format": "int32",
"type": "integer"
},
"resetsAt": {
"format": "int64",
"type": "integer"
},
"used": {
"type": "string"
}
},
"required": ["limit", "remainingPercent", "resetsAt", "used"],
"type": "object"
}
},
"description": "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.",
"properties": {
"rateLimits": {
"$ref": "#/definitions/RateLimitSnapshot"
}
},
"required": ["rateLimits"],
"title": "AccountRateLimitsUpdatedNotification",
"type": "object"
}
@@ -0,0 +1,81 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AuthMode": {
"description": "Authentication mode for OpenAI-backed providers.",
"oneOf": [
{
"description": "OpenAI API key provided by the caller and stored by Codex.",
"enum": ["apikey"],
"type": "string"
},
{
"description": "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
"enum": ["chatgpt"],
"type": "string"
},
{
"description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
"enum": ["chatgptAuthTokens"],
"type": "string"
},
{
"description": "Programmatic Codex auth backed by a registered Agent Identity.",
"enum": ["agentIdentity"],
"type": "string"
},
{
"description": "Programmatic Codex auth backed by a personal access token.",
"enum": ["personalAccessToken"],
"type": "string"
},
{
"description": "Amazon Bedrock bearer token managed by Codex.",
"enum": ["bedrockApiKey"],
"type": "string"
}
]
},
"PlanType": {
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
],
"type": "string"
}
},
"properties": {
"authMode": {
"anyOf": [
{
"$ref": "#/definitions/AuthMode"
},
{
"type": "null"
}
]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/PlanType"
},
{
"type": "null"
}
]
}
},
"title": "AccountUpdatedNotification",
"type": "object"
}
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["delta", "itemId", "threadId", "turnId"],
"title": "AgentMessageDeltaNotification",
"type": "object"
}
@@ -0,0 +1,205 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"properties": {
"category": {
"type": ["string", "null"]
},
"developer": {
"type": ["string", "null"]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": ["string", "null"]
},
"termsOfService": {
"type": ["string", "null"]
},
"website": {
"type": ["string", "null"]
}
},
"required": ["isDiscoverableApp"],
"type": "object"
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": ["string", "null"]
},
"distributionChannel": {
"type": ["string", "null"]
},
"iconAssets": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"iconDarkAssets": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"id": {
"type": "string"
},
"installUrl": {
"type": ["string", "null"]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"default": true,
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"type": "boolean"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"logoUrl": {
"type": ["string", "null"]
},
"logoUrlDark": {
"type": ["string", "null"]
},
"name": {
"type": "string"
},
"pluginDisplayNames": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["id", "name"],
"type": "object"
},
"AppMetadata": {
"properties": {
"categories": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"developer": {
"type": ["string", "null"]
},
"firstPartyRequiresInstall": {
"type": ["boolean", "null"]
},
"firstPartyType": {
"type": ["string", "null"]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"items": {
"$ref": "#/definitions/AppScreenshot"
},
"type": ["array", "null"]
},
"seoDescription": {
"type": ["string", "null"]
},
"showInComposerWhenUnlinked": {
"type": ["boolean", "null"]
},
"subCategories": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"version": {
"type": ["string", "null"]
},
"versionId": {
"type": ["string", "null"]
},
"versionNotes": {
"type": ["string", "null"]
}
},
"type": "object"
},
"AppReview": {
"properties": {
"status": {
"type": "string"
}
},
"required": ["status"],
"type": "object"
},
"AppScreenshot": {
"properties": {
"fileId": {
"type": ["string", "null"]
},
"url": {
"type": ["string", "null"]
},
"userPrompt": {
"type": "string"
}
},
"required": ["userPrompt"],
"type": "object"
}
},
"description": "EXPERIMENTAL - notification emitted when the app list changes.",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/AppInfo"
},
"type": "array"
}
},
"required": ["data"],
"title": "AppListUpdatedNotification",
"type": "object"
}
@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL - list available apps/connectors.",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": ["string", "null"]
},
"forceRefetch": {
"description": "When true, bypass app caches and fetch the latest data from sources.",
"type": "boolean"
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"format": "uint32",
"minimum": 0.0,
"type": ["integer", "null"]
},
"threadId": {
"description": "Optional thread id used to evaluate app feature gating from that thread's config.",
"type": ["string", "null"]
}
},
"title": "AppsListParams",
"type": "object"
}
@@ -0,0 +1,209 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"properties": {
"category": {
"type": ["string", "null"]
},
"developer": {
"type": ["string", "null"]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": ["string", "null"]
},
"termsOfService": {
"type": ["string", "null"]
},
"website": {
"type": ["string", "null"]
}
},
"required": ["isDiscoverableApp"],
"type": "object"
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": ["string", "null"]
},
"distributionChannel": {
"type": ["string", "null"]
},
"iconAssets": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"iconDarkAssets": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"id": {
"type": "string"
},
"installUrl": {
"type": ["string", "null"]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"default": true,
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"type": "boolean"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"logoUrl": {
"type": ["string", "null"]
},
"logoUrlDark": {
"type": ["string", "null"]
},
"name": {
"type": "string"
},
"pluginDisplayNames": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["id", "name"],
"type": "object"
},
"AppMetadata": {
"properties": {
"categories": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"developer": {
"type": ["string", "null"]
},
"firstPartyRequiresInstall": {
"type": ["boolean", "null"]
},
"firstPartyType": {
"type": ["string", "null"]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"items": {
"$ref": "#/definitions/AppScreenshot"
},
"type": ["array", "null"]
},
"seoDescription": {
"type": ["string", "null"]
},
"showInComposerWhenUnlinked": {
"type": ["boolean", "null"]
},
"subCategories": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"version": {
"type": ["string", "null"]
},
"versionId": {
"type": ["string", "null"]
},
"versionNotes": {
"type": ["string", "null"]
}
},
"type": "object"
},
"AppReview": {
"properties": {
"status": {
"type": "string"
}
},
"required": ["status"],
"type": "object"
},
"AppScreenshot": {
"properties": {
"fileId": {
"type": ["string", "null"]
},
"url": {
"type": ["string", "null"]
},
"userPrompt": {
"type": "string"
}
},
"required": ["userPrompt"],
"type": "object"
}
},
"description": "EXPERIMENTAL - app list response.",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/AppInfo"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": ["string", "null"]
}
},
"required": ["data"],
"title": "AppsListResponse",
"type": "object"
}
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"loginId": {
"type": "string"
}
},
"required": ["loginId"],
"title": "CancelLoginAccountParams",
"type": "object"
}
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CancelLoginAccountStatus": {
"enum": ["canceled", "notFound"],
"type": "string"
}
},
"properties": {
"status": {
"$ref": "#/definitions/CancelLoginAccountStatus"
}
},
"required": ["status"],
"title": "CancelLoginAccountResponse",
"type": "object"
}
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommandExecOutputStream": {
"description": "Stream label for `command/exec/outputDelta` notifications.",
"oneOf": [
{
"description": "stdout stream. PTY mode multiplexes terminal output here.",
"enum": ["stdout"],
"type": "string"
},
{
"description": "stderr stream.",
"enum": ["stderr"],
"type": "string"
}
]
}
},
"description": "Base64-encoded output chunk emitted for a streaming `command/exec` request.\n\nThese notifications are connection-scoped. If the originating connection closes, the server terminates the process.",
"properties": {
"capReached": {
"description": "`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
"type": "boolean"
},
"deltaBase64": {
"description": "Base64-encoded output bytes.",
"type": "string"
},
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
},
"stream": {
"allOf": [
{
"$ref": "#/definitions/CommandExecOutputStream"
}
],
"description": "Output stream for this chunk."
}
},
"required": ["capReached", "deltaBase64", "processId", "stream"],
"title": "CommandExecOutputDeltaNotification",
"type": "object"
}
@@ -0,0 +1,196 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.",
"properties": {
"cols": {
"description": "Terminal width in character cells.",
"format": "uint16",
"minimum": 0.0,
"type": "integer"
},
"rows": {
"description": "Terminal height in character cells.",
"format": "uint16",
"minimum": 0.0,
"type": "integer"
}
},
"required": ["cols", "rows"],
"type": "object"
},
"NetworkAccess": {
"enum": ["restricted", "enabled"],
"type": "string"
},
"SandboxPolicy": {
"oneOf": [
{
"properties": {
"type": {
"enum": ["dangerFullAccess"],
"title": "DangerFullAccessSandboxPolicyType",
"type": "string"
}
},
"required": ["type"],
"title": "DangerFullAccessSandboxPolicy",
"type": "object"
},
{
"properties": {
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"enum": ["readOnly"],
"title": "ReadOnlySandboxPolicyType",
"type": "string"
}
},
"required": ["type"],
"title": "ReadOnlySandboxPolicy",
"type": "object"
},
{
"properties": {
"networkAccess": {
"allOf": [
{
"$ref": "#/definitions/NetworkAccess"
}
],
"default": "restricted"
},
"type": {
"enum": ["externalSandbox"],
"title": "ExternalSandboxSandboxPolicyType",
"type": "string"
}
},
"required": ["type"],
"title": "ExternalSandboxSandboxPolicy",
"type": "object"
},
{
"properties": {
"excludeSlashTmp": {
"default": false,
"type": "boolean"
},
"excludeTmpdirEnvVar": {
"default": false,
"type": "boolean"
},
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"enum": ["workspaceWrite"],
"title": "WorkspaceWriteSandboxPolicyType",
"type": "string"
},
"writableRoots": {
"default": [],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": "array"
}
},
"required": ["type"],
"title": "WorkspaceWriteSandboxPolicy",
"type": "object"
}
]
}
},
"description": "Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.",
"properties": {
"command": {
"description": "Command argv vector. Empty arrays are rejected.",
"items": {
"type": "string"
},
"type": "array"
},
"cwd": {
"description": "Optional working directory. Defaults to the server cwd.",
"type": ["string", "null"]
},
"disableOutputCap": {
"description": "Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.",
"type": "boolean"
},
"disableTimeout": {
"description": "Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.",
"type": "boolean"
},
"env": {
"additionalProperties": {
"type": ["string", "null"]
},
"description": "Optional environment overrides merged into the server-computed environment.\n\nMatching names override inherited values. Set a key to `null` to unset an inherited variable.",
"type": ["object", "null"]
},
"outputBytesCap": {
"description": "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
"format": "uint",
"minimum": 0.0,
"type": ["integer", "null"]
},
"processId": {
"description": "Optional client-supplied, connection-scoped process id.\n\nRequired for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up `command/exec/write`, `command/exec/resize`, and `command/exec/terminate` calls. When omitted, buffered execution gets an internal id that is not exposed to the client.",
"type": ["string", "null"]
},
"sandboxPolicy": {
"anyOf": [
{
"$ref": "#/definitions/SandboxPolicy"
},
{
"type": "null"
}
],
"description": "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted. Cannot be combined with `permissionProfile`."
},
"size": {
"anyOf": [
{
"$ref": "#/definitions/CommandExecTerminalSize"
},
{
"type": "null"
}
],
"description": "Optional initial PTY size in character cells. Only valid when `tty` is true."
},
"streamStdin": {
"description": "Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.",
"type": "boolean"
},
"streamStdoutStderr": {
"description": "Stream stdout/stderr via `command/exec/outputDelta` notifications.\n\nStreamed bytes are not duplicated into the final response and require a client-supplied `processId`.",
"type": "boolean"
},
"timeoutMs": {
"description": "Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.",
"format": "int64",
"type": ["integer", "null"]
},
"tty": {
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
"type": "boolean"
}
},
"required": ["command"],
"title": "CommandExecParams",
"type": "object"
}
@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.",
"properties": {
"cols": {
"description": "Terminal width in character cells.",
"format": "uint16",
"minimum": 0.0,
"type": "integer"
},
"rows": {
"description": "Terminal height in character cells.",
"format": "uint16",
"minimum": 0.0,
"type": "integer"
}
},
"required": ["cols", "rows"],
"type": "object"
}
},
"description": "Resize a running PTY-backed `command/exec` session.",
"properties": {
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
},
"size": {
"allOf": [
{
"$ref": "#/definitions/CommandExecTerminalSize"
}
],
"description": "New PTY size in character cells."
}
},
"required": ["processId", "size"],
"title": "CommandExecResizeParams",
"type": "object"
}
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Empty success response for `command/exec/resize`.",
"title": "CommandExecResizeResponse",
"type": "object"
}
@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Final buffered result for `command/exec`.",
"properties": {
"exitCode": {
"description": "Process exit code.",
"format": "int32",
"type": "integer"
},
"stderr": {
"description": "Buffered stderr capture.\n\nEmpty when stderr was streamed via `command/exec/outputDelta`.",
"type": "string"
},
"stdout": {
"description": "Buffered stdout capture.\n\nEmpty when stdout was streamed via `command/exec/outputDelta`.",
"type": "string"
}
},
"required": ["exitCode", "stderr", "stdout"],
"title": "CommandExecResponse",
"type": "object"
}
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Terminate a running `command/exec` session.",
"properties": {
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
}
},
"required": ["processId"],
"title": "CommandExecTerminateParams",
"type": "object"
}
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Empty success response for `command/exec/terminate`.",
"title": "CommandExecTerminateResponse",
"type": "object"
}
@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
"properties": {
"closeStdin": {
"description": "Close stdin after writing `deltaBase64`, if present.",
"type": "boolean"
},
"deltaBase64": {
"description": "Optional base64-encoded stdin bytes to write.",
"type": ["string", "null"]
},
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
}
},
"required": ["processId"],
"title": "CommandExecWriteParams",
"type": "object"
}
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Empty success response for `command/exec/write`.",
"title": "CommandExecWriteResponse",
"type": "object"
}
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["delta", "itemId", "threadId", "turnId"],
"title": "CommandExecutionOutputDeltaNotification",
"type": "object"
}
@@ -0,0 +1,44 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ConfigEdit": {
"properties": {
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/MergeStrategy"
},
"value": true
},
"required": ["keyPath", "mergeStrategy", "value"],
"type": "object"
},
"MergeStrategy": {
"enum": ["replace", "upsert"],
"type": "string"
}
},
"properties": {
"edits": {
"items": {
"$ref": "#/definitions/ConfigEdit"
},
"type": "array"
},
"expectedVersion": {
"type": ["string", "null"]
},
"filePath": {
"description": "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
"type": ["string", "null"]
},
"reloadUserConfig": {
"description": "When true, hot-reload the updated user config into all loaded threads after writing.",
"type": "boolean"
}
},
"required": ["edits"],
"title": "ConfigBatchWriteParams",
"type": "object"
}
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cwd": {
"description": "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
"type": ["string", "null"]
},
"includeLayers": {
"type": "boolean"
}
},
"title": "ConfigReadParams",
"type": "object"
}
@@ -0,0 +1,711 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AnalyticsConfig": {
"additionalProperties": true,
"properties": {
"enabled": {
"type": ["boolean", "null"]
}
},
"type": "object"
},
"AppConfig": {
"properties": {
"approvals_reviewer": {
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"default_tools_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"default_tools_enabled": {
"type": ["boolean", "null"]
},
"destructive_enabled": {
"type": ["boolean", "null"]
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"type": ["boolean", "null"]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/AppToolsConfig"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"AppToolApproval": {
"enum": ["auto", "prompt", "approve"],
"type": "string"
},
"AppToolConfig": {
"properties": {
"approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"enabled": {
"type": ["boolean", "null"]
}
},
"type": "object"
},
"AppToolsConfig": {
"type": "object"
},
"ApprovalsReviewer": {
"description": "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.",
"enum": ["user", "auto_review", "guardian_subagent"],
"type": "string"
},
"AppsConfig": {
"properties": {
"_default": {
"anyOf": [
{
"$ref": "#/definitions/AppsDefaultConfig"
},
{
"type": "null"
}
],
"default": null
}
},
"type": "object"
},
"AppsDefaultConfig": {
"properties": {
"approvals_reviewer": {
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"default_tools_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"destructive_enabled": {
"default": true,
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"default": true,
"type": "boolean"
}
},
"type": "object"
},
"AskForApproval": {
"oneOf": [
{
"enum": ["untrusted", "on-request", "never"],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"granular": {
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
},
"required": ["mcp_elicitations", "rules", "sandbox_approval"],
"type": "object"
}
},
"required": ["granular"],
"title": "GranularAskForApproval",
"type": "object"
}
]
},
"AutoCompactTokenLimitScope": {
"description": "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
"oneOf": [
{
"description": "Count the full active context against the limit.",
"enum": ["total"],
"type": "string"
},
{
"description": "Count sampled output and later growth after the carried window prefix.",
"enum": ["body_after_prefix"],
"type": "string"
}
]
},
"Config": {
"additionalProperties": true,
"properties": {
"analytics": {
"anyOf": [
{
"$ref": "#/definitions/AnalyticsConfig"
},
{
"type": "null"
}
]
},
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvals_reviewer": {
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
],
"description": "[UNSTABLE] Optional default for where approval requests are routed for review."
},
"compact_prompt": {
"type": ["string", "null"]
},
"desktop": {
"additionalProperties": true,
"type": ["object", "null"]
},
"developer_instructions": {
"type": ["string", "null"]
},
"forced_chatgpt_workspace_id": {
"anyOf": [
{
"$ref": "#/definitions/ForcedChatgptWorkspaceIds"
},
{
"type": "null"
}
]
},
"forced_login_method": {
"anyOf": [
{
"$ref": "#/definitions/ForcedLoginMethod"
},
{
"type": "null"
}
]
},
"instructions": {
"type": ["string", "null"]
},
"model": {
"type": ["string", "null"]
},
"model_auto_compact_token_limit": {
"format": "int64",
"type": ["integer", "null"]
},
"model_auto_compact_token_limit_scope": {
"anyOf": [
{
"$ref": "#/definitions/AutoCompactTokenLimitScope"
},
{
"type": "null"
}
]
},
"model_context_window": {
"format": "int64",
"type": ["integer", "null"]
},
"model_provider": {
"type": ["string", "null"]
},
"model_reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model_reasoning_summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
},
"model_verbosity": {
"anyOf": [
{
"$ref": "#/definitions/Verbosity"
},
{
"type": "null"
}
]
},
"review_model": {
"type": ["string", "null"]
},
"sandbox_mode": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"sandbox_workspace_write": {
"anyOf": [
{
"$ref": "#/definitions/SandboxWorkspaceWrite"
},
{
"type": "null"
}
]
},
"service_tier": {
"type": ["string", "null"]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/ToolsV2"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchMode"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"ConfigLayer": {
"properties": {
"config": true,
"disabledReason": {
"type": ["string", "null"]
},
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
},
"required": ["config", "name", "version"],
"type": "object"
},
"ConfigLayerMetadata": {
"properties": {
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
},
"required": ["name", "version"],
"type": "object"
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"enum": ["mdm"],
"title": "MdmConfigLayerSourceType",
"type": "string"
}
},
"required": ["domain", "key", "type"],
"title": "MdmConfigLayerSource",
"type": "object"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"properties": {
"file": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist."
},
"type": {
"enum": ["system"],
"title": "SystemConfigLayerSourceType",
"type": "string"
}
},
"required": ["file", "type"],
"title": "SystemConfigLayerSource",
"type": "object"
},
{
"description": "Enterprise-managed config layer delivered by the cloud config bundle.",
"properties": {
"id": {
"description": "Stable identifier for the delivered layer.",
"type": "string"
},
"name": {
"description": "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.",
"type": "string"
},
"type": {
"enum": ["enterpriseManaged"],
"title": "EnterpriseManagedConfigLayerSourceType",
"type": "string"
}
},
"required": ["id", "name", "type"],
"title": "EnterpriseManagedConfigLayerSource",
"type": "object"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"properties": {
"file": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist."
},
"profile": {
"description": "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.",
"type": ["string", "null"]
},
"type": {
"enum": ["user"],
"title": "UserConfigLayerSourceType",
"type": "string"
}
},
"required": ["file", "type"],
"title": "UserConfigLayerSource",
"type": "object"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"enum": ["project"],
"title": "ProjectConfigLayerSourceType",
"type": "string"
}
},
"required": ["dotCodexFolder", "type"],
"title": "ProjectConfigLayerSource",
"type": "object"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"properties": {
"type": {
"enum": ["sessionFlags"],
"title": "SessionFlagsConfigLayerSourceType",
"type": "string"
}
},
"required": ["type"],
"title": "SessionFlagsConfigLayerSource",
"type": "object"
},
{
"description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`.",
"properties": {
"file": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"enum": ["legacyManagedConfigTomlFromFile"],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType",
"type": "string"
}
},
"required": ["file", "type"],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["legacyManagedConfigTomlFromMdm"],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType",
"type": "string"
}
},
"required": ["type"],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource",
"type": "object"
}
]
},
"ForcedChatgptWorkspaceIds": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"description": "Backward-compatible API shape for ChatGPT workspace login restrictions."
},
"ForcedLoginMethod": {
"enum": ["chatgpt", "api"],
"type": "string"
},
"ReasoningEffort": {
"description": "A non-empty reasoning effort value advertised by the model.",
"minLength": 1,
"type": "string"
},
"ReasoningSummary": {
"description": "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",
"oneOf": [
{
"enum": ["auto", "concise", "detailed"],
"type": "string"
},
{
"description": "Option to disable reasoning summaries.",
"enum": ["none"],
"type": "string"
}
]
},
"SandboxMode": {
"enum": ["read-only", "workspace-write", "danger-full-access"],
"type": "string"
},
"SandboxWorkspaceWrite": {
"properties": {
"exclude_slash_tmp": {
"default": false,
"type": "boolean"
},
"exclude_tmpdir_env_var": {
"default": false,
"type": "boolean"
},
"network_access": {
"default": false,
"type": "boolean"
},
"writable_roots": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"ToolsV2": {
"properties": {
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchToolConfig"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"Verbosity": {
"description": "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
"enum": ["low", "medium", "high"],
"type": "string"
},
"WebSearchContextSize": {
"enum": ["low", "medium", "high"],
"type": "string"
},
"WebSearchLocation": {
"additionalProperties": false,
"properties": {
"city": {
"type": ["string", "null"]
},
"country": {
"type": ["string", "null"]
},
"region": {
"type": ["string", "null"]
},
"timezone": {
"type": ["string", "null"]
}
},
"type": "object"
},
"WebSearchMode": {
"enum": ["disabled", "cached", "indexed", "live"],
"type": "string"
},
"WebSearchToolConfig": {
"additionalProperties": false,
"properties": {
"allowed_domains": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"context_size": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchContextSize"
},
{
"type": "null"
}
]
},
"location": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchLocation"
},
{
"type": "null"
}
]
}
},
"type": "object"
}
},
"properties": {
"config": {
"$ref": "#/definitions/Config"
},
"layers": {
"items": {
"$ref": "#/definitions/ConfigLayer"
},
"type": ["array", "null"]
},
"origins": {
"additionalProperties": {
"$ref": "#/definitions/ConfigLayerMetadata"
},
"type": "object"
}
},
"required": ["config", "origins"],
"title": "ConfigReadResponse",
"type": "object"
}
@@ -0,0 +1,393 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ApprovalsReviewer": {
"description": "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.",
"enum": ["user", "auto_review", "guardian_subagent"],
"type": "string"
},
"AskForApproval": {
"oneOf": [
{
"enum": ["untrusted", "on-request", "never"],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"granular": {
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
},
"required": ["mcp_elicitations", "rules", "sandbox_approval"],
"type": "object"
}
},
"required": ["granular"],
"title": "GranularAskForApproval",
"type": "object"
}
]
},
"ComputerUseRequirements": {
"properties": {
"allowLockedComputerUse": {
"type": ["boolean", "null"]
}
},
"type": "object"
},
"ConfigRequirements": {
"properties": {
"allowAppshots": {
"type": ["boolean", "null"]
},
"allowManagedHooksOnly": {
"type": ["boolean", "null"]
},
"allowRemoteControl": {
"type": ["boolean", "null"]
},
"allowedApprovalPolicies": {
"items": {
"$ref": "#/definitions/AskForApproval"
},
"type": ["array", "null"]
},
"allowedPermissionProfiles": {
"additionalProperties": {
"type": "boolean"
},
"type": ["object", "null"]
},
"allowedSandboxModes": {
"items": {
"$ref": "#/definitions/SandboxMode"
},
"type": ["array", "null"]
},
"allowedWebSearchModes": {
"items": {
"$ref": "#/definitions/WebSearchMode"
},
"type": ["array", "null"]
},
"allowedWindowsSandboxImplementations": {
"items": {
"$ref": "#/definitions/WindowsSandboxSetupMode"
},
"type": ["array", "null"]
},
"computerUse": {
"anyOf": [
{
"$ref": "#/definitions/ComputerUseRequirements"
},
{
"type": "null"
}
]
},
"defaultPermissions": {
"type": ["string", "null"]
},
"enforceResidency": {
"anyOf": [
{
"$ref": "#/definitions/ResidencyRequirement"
},
{
"type": "null"
}
]
},
"featureRequirements": {
"additionalProperties": {
"type": "boolean"
},
"type": ["object", "null"]
}
},
"type": "object"
},
"ConfiguredHookHandler": {
"oneOf": [
{
"properties": {
"async": {
"type": "boolean"
},
"command": {
"type": "string"
},
"commandWindows": {
"type": ["string", "null"]
},
"statusMessage": {
"type": ["string", "null"]
},
"timeoutSec": {
"format": "uint64",
"minimum": 0.0,
"type": ["integer", "null"]
},
"type": {
"enum": ["command"],
"title": "CommandConfiguredHookHandlerType",
"type": "string"
}
},
"required": ["async", "command", "type"],
"title": "CommandConfiguredHookHandler",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["prompt"],
"title": "PromptConfiguredHookHandlerType",
"type": "string"
}
},
"required": ["type"],
"title": "PromptConfiguredHookHandler",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["agent"],
"title": "AgentConfiguredHookHandlerType",
"type": "string"
}
},
"required": ["type"],
"title": "AgentConfiguredHookHandler",
"type": "object"
}
]
},
"ConfiguredHookMatcherGroup": {
"properties": {
"hooks": {
"items": {
"$ref": "#/definitions/ConfiguredHookHandler"
},
"type": "array"
},
"matcher": {
"type": ["string", "null"]
}
},
"required": ["hooks"],
"type": "object"
},
"ManagedHooksRequirements": {
"properties": {
"PermissionRequest": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"PostCompact": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"PostToolUse": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"PreCompact": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"PreToolUse": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"SessionStart": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"Stop": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"SubagentStart": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"SubagentStop": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"UserPromptSubmit": {
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
},
"type": "array"
},
"managedDir": {
"type": ["string", "null"]
},
"windowsManagedDir": {
"type": ["string", "null"]
}
},
"required": [
"PermissionRequest",
"PostCompact",
"PostToolUse",
"PreCompact",
"PreToolUse",
"SessionStart",
"Stop",
"SubagentStart",
"SubagentStop",
"UserPromptSubmit"
],
"type": "object"
},
"NetworkDomainPermission": {
"enum": ["allow", "deny"],
"type": "string"
},
"NetworkRequirements": {
"properties": {
"allowLocalBinding": {
"type": ["boolean", "null"]
},
"allowUnixSockets": {
"description": "Legacy compatibility view derived from `unix_sockets`.",
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"allowUpstreamProxy": {
"type": ["boolean", "null"]
},
"allowedDomains": {
"description": "Legacy compatibility view derived from `domains`.",
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"dangerouslyAllowAllUnixSockets": {
"type": ["boolean", "null"]
},
"dangerouslyAllowNonLoopbackProxy": {
"type": ["boolean", "null"]
},
"deniedDomains": {
"description": "Legacy compatibility view derived from `domains`.",
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"domains": {
"additionalProperties": {
"$ref": "#/definitions/NetworkDomainPermission"
},
"description": "Canonical network permission map for `experimental_network`.",
"type": ["object", "null"]
},
"enabled": {
"type": ["boolean", "null"]
},
"httpPort": {
"format": "uint16",
"minimum": 0.0,
"type": ["integer", "null"]
},
"managedAllowedDomainsOnly": {
"description": "When true, only managed allowlist entries are respected while managed network enforcement is active.",
"type": ["boolean", "null"]
},
"socksPort": {
"format": "uint16",
"minimum": 0.0,
"type": ["integer", "null"]
},
"unixSockets": {
"additionalProperties": {
"$ref": "#/definitions/NetworkUnixSocketPermission"
},
"description": "Canonical unix socket permission map for `experimental_network`.",
"type": ["object", "null"]
}
},
"type": "object"
},
"NetworkUnixSocketPermission": {
"enum": ["allow", "deny"],
"type": "string"
},
"ResidencyRequirement": {
"enum": ["us"],
"type": "string"
},
"SandboxMode": {
"enum": ["read-only", "workspace-write", "danger-full-access"],
"type": "string"
},
"WebSearchMode": {
"enum": ["disabled", "cached", "indexed", "live"],
"type": "string"
},
"WindowsSandboxSetupMode": {
"enum": ["elevated", "unelevated"],
"type": "string"
}
},
"properties": {
"requirements": {
"anyOf": [
{
"$ref": "#/definitions/ConfigRequirements"
},
{
"type": "null"
}
],
"description": "Null if no requirements are configured (e.g. no requirements.toml/MDM entries)."
}
},
"title": "ConfigRequirementsReadResponse",
"type": "object"
}
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"MergeStrategy": {
"enum": ["replace", "upsert"],
"type": "string"
}
},
"properties": {
"expectedVersion": {
"type": ["string", "null"]
},
"filePath": {
"description": "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
"type": ["string", "null"]
},
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/MergeStrategy"
},
"value": true
},
"required": ["keyPath", "mergeStrategy", "value"],
"title": "ConfigValueWriteParams",
"type": "object"
}
@@ -0,0 +1,63 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"TextPosition": {
"properties": {
"column": {
"description": "1-based column number (in Unicode scalar values).",
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"line": {
"description": "1-based line number.",
"format": "uint",
"minimum": 0.0,
"type": "integer"
}
},
"required": ["column", "line"],
"type": "object"
},
"TextRange": {
"properties": {
"end": {
"$ref": "#/definitions/TextPosition"
},
"start": {
"$ref": "#/definitions/TextPosition"
}
},
"required": ["end", "start"],
"type": "object"
}
},
"properties": {
"details": {
"description": "Optional extra guidance or error details.",
"type": ["string", "null"]
},
"path": {
"description": "Optional path to the config file that triggered the warning.",
"type": ["string", "null"]
},
"range": {
"anyOf": [
{
"$ref": "#/definitions/TextRange"
},
{
"type": "null"
}
],
"description": "Optional range for the error location inside the config file."
},
"summary": {
"description": "Concise summary of the warning.",
"type": "string"
}
},
"required": ["summary"],
"title": "ConfigWarningNotification",
"type": "object"
}
@@ -0,0 +1,214 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"ConfigLayerMetadata": {
"properties": {
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
},
"required": ["name", "version"],
"type": "object"
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"enum": ["mdm"],
"title": "MdmConfigLayerSourceType",
"type": "string"
}
},
"required": ["domain", "key", "type"],
"title": "MdmConfigLayerSource",
"type": "object"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"properties": {
"file": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist."
},
"type": {
"enum": ["system"],
"title": "SystemConfigLayerSourceType",
"type": "string"
}
},
"required": ["file", "type"],
"title": "SystemConfigLayerSource",
"type": "object"
},
{
"description": "Enterprise-managed config layer delivered by the cloud config bundle.",
"properties": {
"id": {
"description": "Stable identifier for the delivered layer.",
"type": "string"
},
"name": {
"description": "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.",
"type": "string"
},
"type": {
"enum": ["enterpriseManaged"],
"title": "EnterpriseManagedConfigLayerSourceType",
"type": "string"
}
},
"required": ["id", "name", "type"],
"title": "EnterpriseManagedConfigLayerSource",
"type": "object"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"properties": {
"file": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist."
},
"profile": {
"description": "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.",
"type": ["string", "null"]
},
"type": {
"enum": ["user"],
"title": "UserConfigLayerSourceType",
"type": "string"
}
},
"required": ["file", "type"],
"title": "UserConfigLayerSource",
"type": "object"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"enum": ["project"],
"title": "ProjectConfigLayerSourceType",
"type": "string"
}
},
"required": ["dotCodexFolder", "type"],
"title": "ProjectConfigLayerSource",
"type": "object"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"properties": {
"type": {
"enum": ["sessionFlags"],
"title": "SessionFlagsConfigLayerSourceType",
"type": "string"
}
},
"required": ["type"],
"title": "SessionFlagsConfigLayerSource",
"type": "object"
},
{
"description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`.",
"properties": {
"file": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"enum": ["legacyManagedConfigTomlFromFile"],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType",
"type": "string"
}
},
"required": ["file", "type"],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["legacyManagedConfigTomlFromMdm"],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType",
"type": "string"
}
},
"required": ["type"],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource",
"type": "object"
}
]
},
"OverriddenMetadata": {
"properties": {
"effectiveValue": true,
"message": {
"type": "string"
},
"overridingLayer": {
"$ref": "#/definitions/ConfigLayerMetadata"
}
},
"required": ["effectiveValue", "message", "overridingLayer"],
"type": "object"
},
"WriteStatus": {
"enum": ["ok", "okOverridden"],
"type": "string"
}
},
"properties": {
"filePath": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "Canonical path to the config file that was written."
},
"overriddenMetadata": {
"anyOf": [
{
"$ref": "#/definitions/OverriddenMetadata"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/WriteStatus"
},
"version": {
"type": "string"
}
},
"required": ["filePath", "status", "version"],
"title": "ConfigWriteResponse",
"type": "object"
}
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"idempotencyKey": {
"description": "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
"type": "string"
}
},
"required": ["idempotencyKey"],
"title": "ConsumeAccountRateLimitResetCreditParams",
"type": "object"
}
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ConsumeAccountRateLimitResetCreditOutcome": {
"oneOf": [
{
"description": "A reset credit was consumed and the eligible rate-limit windows were reset.",
"enum": ["reset"],
"type": "string"
},
{
"description": "No current rate-limit window is eligible for a reset.",
"enum": ["nothingToReset"],
"type": "string"
},
{
"description": "The account has no earned reset credits available.",
"enum": ["noCredit"],
"type": "string"
},
{
"description": "The same idempotency key already completed a reset successfully.",
"enum": ["alreadyRedeemed"],
"type": "string"
}
]
}
},
"properties": {
"outcome": {
"$ref": "#/definitions/ConsumeAccountRateLimitResetCreditOutcome"
}
},
"required": ["outcome"],
"title": "ConsumeAccountRateLimitResetCreditResponse",
"type": "object"
}
@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Deprecated: Use `ContextCompaction` item type instead.",
"properties": {
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["threadId", "turnId"],
"title": "ContextCompactedNotification",
"type": "object"
}
@@ -0,0 +1,16 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"details": {
"description": "Optional extra guidance, such as migration steps or rationale.",
"type": ["string", "null"]
},
"summary": {
"description": "Concise summary of what is deprecated.",
"type": "string"
}
},
"required": ["summary"],
"title": "DeprecationNoticeNotification",
"type": "object"
}
@@ -0,0 +1,163 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CodexErrorInfo": {
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
"oneOf": [
{
"enum": [
"contextWindowExceeded",
"sessionBudgetExceeded",
"usageLimitExceeded",
"serverOverloaded",
"cyberPolicy",
"internalServerError",
"unauthorized",
"badRequest",
"threadRollbackFailed",
"sandboxError",
"other"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"httpConnectionFailed": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": ["integer", "null"]
}
},
"type": "object"
}
},
"required": ["httpConnectionFailed"],
"title": "HttpConnectionFailedCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "Failed to connect to the response SSE stream.",
"properties": {
"responseStreamConnectionFailed": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": ["integer", "null"]
}
},
"type": "object"
}
},
"required": ["responseStreamConnectionFailed"],
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
"properties": {
"responseStreamDisconnected": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": ["integer", "null"]
}
},
"type": "object"
}
},
"required": ["responseStreamDisconnected"],
"title": "ResponseStreamDisconnectedCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "Reached the retry limit for responses.",
"properties": {
"responseTooManyFailedAttempts": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": ["integer", "null"]
}
},
"type": "object"
}
},
"required": ["responseTooManyFailedAttempts"],
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
"properties": {
"activeTurnNotSteerable": {
"properties": {
"turnKind": {
"$ref": "#/definitions/NonSteerableTurnKind"
}
},
"required": ["turnKind"],
"type": "object"
}
},
"required": ["activeTurnNotSteerable"],
"title": "ActiveTurnNotSteerableCodexErrorInfo",
"type": "object"
}
]
},
"NonSteerableTurnKind": {
"enum": ["review", "compact"],
"type": "string"
},
"TurnError": {
"properties": {
"additionalDetails": {
"default": null,
"type": ["string", "null"]
},
"codexErrorInfo": {
"anyOf": [
{
"$ref": "#/definitions/CodexErrorInfo"
},
{
"type": "null"
}
]
},
"message": {
"type": "string"
}
},
"required": ["message"],
"type": "object"
}
},
"properties": {
"error": {
"$ref": "#/definitions/TurnError"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"willRetry": {
"type": "boolean"
}
},
"required": ["error", "threadId", "turnId", "willRetry"],
"title": "ErrorNotification",
"type": "object"
}
@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"enablement": {
"additionalProperties": {
"type": "boolean"
},
"description": "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.",
"type": "object"
}
},
"required": ["enablement"],
"title": "ExperimentalFeatureEnablementSetParams",
"type": "object"
}
@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"enablement": {
"additionalProperties": {
"type": "boolean"
},
"description": "Feature enablement entries updated by this request.",
"type": "object"
}
},
"required": ["enablement"],
"title": "ExperimentalFeatureEnablementSetResponse",
"type": "object"
}
@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": ["string", "null"]
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"format": "uint32",
"minimum": 0.0,
"type": ["integer", "null"]
},
"threadId": {
"description": "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
"type": ["string", "null"]
}
},
"title": "ExperimentalFeatureListParams",
"type": "object"
}
@@ -0,0 +1,87 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ExperimentalFeature": {
"properties": {
"announcement": {
"description": "Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.",
"type": ["string", "null"]
},
"defaultEnabled": {
"description": "Whether this feature is enabled by default.",
"type": "boolean"
},
"description": {
"description": "Short summary describing what the feature does. Null when this feature is not in beta.",
"type": ["string", "null"]
},
"displayName": {
"description": "User-facing display name shown in the experimental features UI. Null when this feature is not in beta.",
"type": ["string", "null"]
},
"enabled": {
"description": "Whether this feature is currently enabled in the loaded config.",
"type": "boolean"
},
"name": {
"description": "Stable key used in config.toml and CLI flag toggles.",
"type": "string"
},
"stage": {
"allOf": [
{
"$ref": "#/definitions/ExperimentalFeatureStage"
}
],
"description": "Lifecycle stage of this feature flag."
}
},
"required": ["defaultEnabled", "enabled", "name", "stage"],
"type": "object"
},
"ExperimentalFeatureStage": {
"oneOf": [
{
"description": "Feature is available for user testing and feedback.",
"enum": ["beta"],
"type": "string"
},
{
"description": "Feature is still being built and not ready for broad use.",
"enum": ["underDevelopment"],
"type": "string"
},
{
"description": "Feature is production-ready.",
"enum": ["stable"],
"type": "string"
},
{
"description": "Feature is deprecated and should be avoided.",
"enum": ["deprecated"],
"type": "string"
},
{
"description": "Feature flag is retained only for backwards compatibility.",
"enum": ["removed"],
"type": "string"
}
]
}
},
"properties": {
"data": {
"items": {
"$ref": "#/definitions/ExperimentalFeature"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": ["string", "null"]
}
},
"required": ["data"],
"title": "ExperimentalFeatureListResponse",
"type": "object"
}
@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cwds": {
"description": "Zero or more working directories to include for repo-scoped detection.",
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"includeHome": {
"description": "If true, include detection under the user's home directory.",
"type": "boolean"
}
},
"title": "ExternalAgentConfigDetectParams",
"type": "object"
}
@@ -0,0 +1,185 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommandMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"ExternalAgentConfigMigrationItem": {
"properties": {
"cwd": {
"description": "Null or empty means home-scoped migration; non-empty means repo-scoped migration.",
"type": ["string", "null"]
},
"description": {
"type": "string"
},
"details": {
"anyOf": [
{
"$ref": "#/definitions/MigrationDetails"
},
{
"type": "null"
}
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
}
},
"required": ["description", "itemType"],
"type": "object"
},
"ExternalAgentConfigMigrationItemType": {
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
],
"type": "string"
},
"HookMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"McpServerMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"MigrationDetails": {
"properties": {
"commands": {
"default": [],
"items": {
"$ref": "#/definitions/CommandMigration"
},
"type": "array"
},
"hooks": {
"default": [],
"items": {
"$ref": "#/definitions/HookMigration"
},
"type": "array"
},
"mcpServers": {
"default": [],
"items": {
"$ref": "#/definitions/McpServerMigration"
},
"type": "array"
},
"plugins": {
"default": [],
"items": {
"$ref": "#/definitions/PluginsMigration"
},
"type": "array"
},
"sessions": {
"default": [],
"items": {
"$ref": "#/definitions/SessionMigration"
},
"type": "array"
},
"skills": {
"default": [],
"items": {
"$ref": "#/definitions/SkillMigration"
},
"type": "array"
},
"subagents": {
"default": [],
"items": {
"$ref": "#/definitions/SubagentMigration"
},
"type": "array"
}
},
"type": "object"
},
"PluginsMigration": {
"properties": {
"marketplaceName": {
"type": "string"
},
"pluginNames": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["marketplaceName", "pluginNames"],
"type": "object"
},
"SessionMigration": {
"properties": {
"cwd": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": ["string", "null"]
}
},
"required": ["cwd", "path"],
"type": "object"
},
"SkillMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"SubagentMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
}
},
"properties": {
"items": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
},
"type": "array"
}
},
"required": ["items"],
"title": "ExternalAgentConfigDetectResponse",
"type": "object"
}
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ExternalAgentConfigImportItemTypeFailure": {
"properties": {
"cwd": {
"type": ["string", "null"]
},
"errorType": {
"type": ["string", "null"]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": ["string", "null"]
}
},
"required": ["failureStage", "itemType", "message"],
"type": "object"
},
"ExternalAgentConfigImportItemTypeSuccess": {
"properties": {
"cwd": {
"type": ["string", "null"]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": ["string", "null"]
},
"target": {
"type": ["string", "null"]
}
},
"required": ["itemType"],
"type": "object"
},
"ExternalAgentConfigImportTypeResult": {
"properties": {
"failures": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
},
"type": "array"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"successes": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
},
"type": "array"
}
},
"required": ["failures", "itemType", "successes"],
"type": "object"
},
"ExternalAgentConfigMigrationItemType": {
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
],
"type": "string"
}
},
"properties": {
"importId": {
"type": "string"
},
"itemTypeResults": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportTypeResult"
},
"type": "array"
}
},
"required": ["importId", "itemTypeResults"],
"title": "ExternalAgentConfigImportCompletedNotification",
"type": "object"
}
@@ -0,0 +1,97 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ExternalAgentConfigImportHistory": {
"properties": {
"completedAtMs": {
"format": "int64",
"type": "integer"
},
"failures": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
},
"type": "array"
},
"importId": {
"type": "string"
},
"successes": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
},
"type": "array"
}
},
"required": ["completedAtMs", "failures", "importId", "successes"],
"type": "object"
},
"ExternalAgentConfigImportItemTypeFailure": {
"properties": {
"cwd": {
"type": ["string", "null"]
},
"errorType": {
"type": ["string", "null"]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": ["string", "null"]
}
},
"required": ["failureStage", "itemType", "message"],
"type": "object"
},
"ExternalAgentConfigImportItemTypeSuccess": {
"properties": {
"cwd": {
"type": ["string", "null"]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": ["string", "null"]
},
"target": {
"type": ["string", "null"]
}
},
"required": ["itemType"],
"type": "object"
},
"ExternalAgentConfigMigrationItemType": {
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
],
"type": "string"
}
},
"properties": {
"data": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportHistory"
},
"type": "array"
}
},
"required": ["data"],
"title": "ExternalAgentConfigImportHistoriesReadResponse",
"type": "object"
}
@@ -0,0 +1,189 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommandMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"ExternalAgentConfigMigrationItem": {
"properties": {
"cwd": {
"description": "Null or empty means home-scoped migration; non-empty means repo-scoped migration.",
"type": ["string", "null"]
},
"description": {
"type": "string"
},
"details": {
"anyOf": [
{
"$ref": "#/definitions/MigrationDetails"
},
{
"type": "null"
}
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
}
},
"required": ["description", "itemType"],
"type": "object"
},
"ExternalAgentConfigMigrationItemType": {
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
],
"type": "string"
},
"HookMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"McpServerMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"MigrationDetails": {
"properties": {
"commands": {
"default": [],
"items": {
"$ref": "#/definitions/CommandMigration"
},
"type": "array"
},
"hooks": {
"default": [],
"items": {
"$ref": "#/definitions/HookMigration"
},
"type": "array"
},
"mcpServers": {
"default": [],
"items": {
"$ref": "#/definitions/McpServerMigration"
},
"type": "array"
},
"plugins": {
"default": [],
"items": {
"$ref": "#/definitions/PluginsMigration"
},
"type": "array"
},
"sessions": {
"default": [],
"items": {
"$ref": "#/definitions/SessionMigration"
},
"type": "array"
},
"skills": {
"default": [],
"items": {
"$ref": "#/definitions/SkillMigration"
},
"type": "array"
},
"subagents": {
"default": [],
"items": {
"$ref": "#/definitions/SubagentMigration"
},
"type": "array"
}
},
"type": "object"
},
"PluginsMigration": {
"properties": {
"marketplaceName": {
"type": "string"
},
"pluginNames": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["marketplaceName", "pluginNames"],
"type": "object"
},
"SessionMigration": {
"properties": {
"cwd": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": ["string", "null"]
}
},
"required": ["cwd", "path"],
"type": "object"
},
"SkillMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
},
"SubagentMigration": {
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"type": "object"
}
},
"properties": {
"migrationItems": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
},
"type": "array"
},
"source": {
"description": "Source product that produced the migration items. Missing means unspecified.",
"type": ["string", "null"]
}
},
"required": ["migrationItems"],
"title": "ExternalAgentConfigImportParams",
"type": "object"
}
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ExternalAgentConfigImportItemTypeFailure": {
"properties": {
"cwd": {
"type": ["string", "null"]
},
"errorType": {
"type": ["string", "null"]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": ["string", "null"]
}
},
"required": ["failureStage", "itemType", "message"],
"type": "object"
},
"ExternalAgentConfigImportItemTypeSuccess": {
"properties": {
"cwd": {
"type": ["string", "null"]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": ["string", "null"]
},
"target": {
"type": ["string", "null"]
}
},
"required": ["itemType"],
"type": "object"
},
"ExternalAgentConfigImportTypeResult": {
"properties": {
"failures": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
},
"type": "array"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"successes": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
},
"type": "array"
}
},
"required": ["failures", "itemType", "successes"],
"type": "object"
},
"ExternalAgentConfigMigrationItemType": {
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
],
"type": "string"
}
},
"properties": {
"importId": {
"type": "string"
},
"itemTypeResults": {
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportTypeResult"
},
"type": "array"
}
},
"required": ["importId", "itemTypeResults"],
"title": "ExternalAgentConfigImportProgressNotification",
"type": "object"
}
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"importId": {
"type": "string"
}
},
"required": ["importId"],
"title": "ExternalAgentConfigImportResponse",
"type": "object"
}
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"classification": {
"type": "string"
},
"extraLogFiles": {
"items": {
"type": "string"
},
"type": ["array", "null"]
},
"includeLogs": {
"type": "boolean"
},
"reason": {
"type": ["string", "null"]
},
"tags": {
"additionalProperties": {
"type": "string"
},
"type": ["object", "null"]
},
"threadId": {
"type": ["string", "null"]
}
},
"required": ["classification"],
"title": "FeedbackUploadParams",
"type": "object"
}
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": ["threadId"],
"title": "FeedbackUploadResponse",
"type": "object"
}
@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["delta", "itemId", "threadId", "turnId"],
"title": "FileChangeOutputDeltaNotification",
"type": "object"
}
@@ -0,0 +1,83 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"FileUpdateChange": {
"properties": {
"diff": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/PatchChangeKind"
},
"path": {
"type": "string"
}
},
"required": ["diff", "kind", "path"],
"type": "object"
},
"PatchChangeKind": {
"oneOf": [
{
"properties": {
"type": {
"enum": ["add"],
"title": "AddPatchChangeKindType",
"type": "string"
}
},
"required": ["type"],
"title": "AddPatchChangeKind",
"type": "object"
},
{
"properties": {
"type": {
"enum": ["delete"],
"title": "DeletePatchChangeKindType",
"type": "string"
}
},
"required": ["type"],
"title": "DeletePatchChangeKind",
"type": "object"
},
{
"properties": {
"move_path": {
"type": ["string", "null"]
},
"type": {
"enum": ["update"],
"title": "UpdatePatchChangeKindType",
"type": "string"
}
},
"required": ["type"],
"title": "UpdatePatchChangeKind",
"type": "object"
}
]
}
},
"properties": {
"changes": {
"items": {
"$ref": "#/definitions/FileUpdateChange"
},
"type": "array"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": ["changes", "itemId", "threadId", "turnId"],
"title": "FileChangePatchUpdatedNotification",
"type": "object"
}
@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
},
"description": "Filesystem watch notification emitted for `fs/watch` subscribers.",
"properties": {
"changedPaths": {
"description": "File or directory paths associated with this event.",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": "array"
},
"watchId": {
"description": "Watch identifier previously provided to `fs/watch`.",
"type": "string"
}
},
"required": ["changedPaths", "watchId"],
"title": "FsChangedNotification",
"type": "object"
}
@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
},
"description": "Copy a file or directory tree on the host filesystem.",
"properties": {
"destinationPath": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "Absolute destination path."
},
"recursive": {
"description": "Required for directory copies; ignored for file copies.",
"type": "boolean"
},
"sourcePath": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "Absolute source path."
}
},
"required": ["destinationPath", "sourcePath"],
"title": "FsCopyParams",
"type": "object"
}
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Successful response for `fs/copy`.",
"title": "FsCopyResponse",
"type": "object"
}
@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
},
"description": "Create a directory on the host filesystem.",
"properties": {
"path": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "Absolute directory path to create."
},
"recursive": {
"description": "Whether parent directories should also be created. Defaults to `true`.",
"type": ["boolean", "null"]
}
},
"required": ["path"],
"title": "FsCreateDirectoryParams",
"type": "object"
}
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Successful response for `fs/createDirectory`.",
"title": "FsCreateDirectoryResponse",
"type": "object"
}
@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
},
"description": "Request metadata for an absolute path.",
"properties": {
"path": {
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
],
"description": "Absolute path to inspect."
}
},
"required": ["path"],
"title": "FsGetMetadataParams",
"type": "object"
}
Loaded 100 of 8018 files, more files were not shown because too many files have changed in this diff. Show more