Initial codex telegram bot source

This commit is contained in:
Codex
2026-05-21 08:40:16 +00:00
commit ad61f7eeed
275 changed files with 101972 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ApplyPatchApprovalParams",
"type": "object",
"required": [
"callId",
"conversationId",
"fileChanges"
],
"properties": {
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].",
"type": "string"
},
"conversationId": {
"$ref": "#/definitions/ThreadId"
},
"fileChanges": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/FileChange"
}
},
"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"
]
}
},
"definitions": {
"FileChange": {
"oneOf": [
{
"type": "object",
"required": [
"content",
"type"
],
"properties": {
"content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"add"
],
"title": "AddFileChangeType"
}
},
"title": "AddFileChange"
},
{
"type": "object",
"required": [
"content",
"type"
],
"properties": {
"content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"delete"
],
"title": "DeleteFileChangeType"
}
},
"title": "DeleteFileChange"
},
{
"type": "object",
"required": [
"type",
"unified_diff"
],
"properties": {
"move_path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"update"
],
"title": "UpdateFileChangeType"
},
"unified_diff": {
"type": "string"
}
},
"title": "UpdateFileChange"
}
]
},
"ThreadId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,124 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ApplyPatchApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"definitions": {
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"type": "string",
"enum": [
"approved"
]
},
{
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"type": "object",
"required": [
"approved_execpolicy_amendment"
],
"properties": {
"approved_execpolicy_amendment": {
"type": "object",
"required": [
"proposed_execpolicy_amendment"
],
"properties": {
"proposed_execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "ApprovedExecpolicyAmendmentReviewDecision"
},
{
"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.",
"type": "string",
"enum": [
"approved_for_session"
]
},
{
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "NetworkPolicyAmendmentReviewDecision"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"type": "string",
"enum": [
"denied"
]
},
{
"description": "Automatic approval review timed out before reaching a decision.",
"type": "string",
"enum": [
"timed_out"
]
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"type": "string",
"enum": [
"abort"
]
}
]
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AttestationGenerateParams",
"type": "object"
}

View File

@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AttestationGenerateResponse",
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"description": "Opaque client attestation token.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ChatgptAuthTokensRefreshParams",
"type": "object",
"required": [
"reason"
],
"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"
}
},
"definitions": {
"ChatgptAuthTokensRefreshReason": {
"oneOf": [
{
"description": "Codex attempted a backend request and received `401 Unauthorized`.",
"type": "string",
"enum": [
"unauthorized"
]
}
]
}
}
}

View File

@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ChatgptAuthTokensRefreshResponse",
"type": "object",
"required": [
"accessToken",
"chatgptAccountId"
],
"properties": {
"accessToken": {
"type": "string"
},
"chatgptAccountId": {
"type": "string"
},
"chatgptPlanType": {
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ClientNotification",
"oneOf": [
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"initialized"
],
"title": "InitializedNotificationMethod"
}
},
"title": "InitializedNotification"
}
]
}

5972
schemas/ClientRequest.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,616 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecutionRequestApprovalParams",
"type": "object",
"required": [
"itemId",
"startedAtMs",
"threadId",
"turnId"
],
"properties": {
"turnId": {
"type": "string"
},
"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"
]
},
"threadId": {
"type": "string"
},
"command": {
"description": "The command to be executed.",
"type": [
"string",
"null"
]
},
"commandActions": {
"description": "Best-effort parsed command actions for friendly display.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/CommandAction"
}
},
"cwd": {
"description": "The command's working directory.",
"anyOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
},
{
"type": "null"
}
]
},
"itemId": {
"type": "string"
},
"networkApprovalContext": {
"description": "Optional context for a managed-network approval prompt.",
"anyOf": [
{
"$ref": "#/definitions/NetworkApprovalContext"
},
{
"type": "null"
}
]
},
"proposedExecpolicyAmendment": {
"description": "Optional proposed execpolicy amendment to allow similar commands without prompting.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"proposedNetworkPolicyAmendments": {
"description": "Optional proposed network policy amendments (allow/deny host) for future requests.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"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.",
"type": "integer",
"format": "int64"
}
},
"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": {
"type": "object",
"properties": {
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
}
},
"globScanMaxDepth": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 1.0
},
"read": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"write": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
}
},
"AdditionalNetworkPermissions": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"AdditionalPermissionProfile": {
"type": "object",
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"description": "Partial overlay used for per-command permission requests.",
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
}
},
"CommandAction": {
"oneOf": [
{
"type": "object",
"required": [
"command",
"name",
"path",
"type"
],
"properties": {
"command": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"read"
],
"title": "ReadCommandActionType"
}
},
"title": "ReadCommandAction"
},
{
"type": "object",
"required": [
"command",
"type"
],
"properties": {
"command": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"listFiles"
],
"title": "ListFilesCommandActionType"
}
},
"title": "ListFilesCommandAction"
},
{
"type": "object",
"required": [
"command",
"type"
],
"properties": {
"command": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"query": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"search"
],
"title": "SearchCommandActionType"
}
},
"title": "SearchCommandAction"
},
{
"type": "object",
"required": [
"command",
"type"
],
"properties": {
"command": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"unknown"
],
"title": "UnknownCommandActionType"
}
},
"title": "UnknownCommandAction"
}
]
},
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"type": "object",
"required": [
"acceptWithExecpolicyAmendment"
],
"properties": {
"acceptWithExecpolicyAmendment": {
"type": "object",
"required": [
"execpolicy_amendment"
],
"properties": {
"execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"type": "object",
"required": [
"applyNetworkPolicyAmendment"
],
"properties": {
"applyNetworkPolicyAmendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User denied the command. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
},
"FileSystemAccessMode": {
"type": "string",
"enum": [
"read",
"write",
"none"
]
},
"FileSystemPath": {
"oneOf": [
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"path"
],
"title": "PathFileSystemPathType"
}
},
"title": "PathFileSystemPath"
},
{
"type": "object",
"required": [
"pattern",
"type"
],
"properties": {
"pattern": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"glob_pattern"
],
"title": "GlobPatternFileSystemPathType"
}
},
"title": "GlobPatternFileSystemPath"
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"special"
],
"title": "SpecialFileSystemPathType"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"title": "SpecialFileSystemPath"
}
]
},
"FileSystemSandboxEntry": {
"type": "object",
"required": [
"access",
"path"
],
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
}
},
"FileSystemSpecialPath": {
"oneOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"root"
]
}
},
"title": "RootFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"minimal"
]
}
},
"title": "MinimalFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"project_roots"
]
},
"subpath": {
"type": [
"string",
"null"
]
}
},
"title": "KindFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"tmpdir"
]
}
},
"title": "TmpdirFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"slash_tmp"
]
}
},
"title": "SlashTmpFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"unknown"
]
},
"path": {
"type": "string"
},
"subpath": {
"type": [
"string",
"null"
]
}
}
}
]
},
"NetworkApprovalContext": {
"type": "object",
"required": [
"host",
"protocol"
],
"properties": {
"host": {
"type": "string"
},
"protocol": {
"$ref": "#/definitions/NetworkApprovalProtocol"
}
}
},
"NetworkApprovalProtocol": {
"type": "string",
"enum": [
"http",
"https",
"socks5Tcp",
"socks5Udp"
]
},
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
}
}
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecutionRequestApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/CommandExecutionApprovalDecision"
}
},
"definitions": {
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"type": "object",
"required": [
"acceptWithExecpolicyAmendment"
],
"properties": {
"acceptWithExecpolicyAmendment": {
"type": "object",
"required": [
"execpolicy_amendment"
],
"properties": {
"execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"type": "object",
"required": [
"applyNetworkPolicyAmendment"
],
"properties": {
"applyNetworkPolicyAmendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User denied the command. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
},
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
}
}
}

View File

@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DynamicToolCallParams",
"type": "object",
"required": [
"arguments",
"callId",
"threadId",
"tool",
"turnId"
],
"properties": {
"arguments": true,
"callId": {
"type": "string"
},
"namespace": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"tool": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,66 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DynamicToolCallResponse",
"type": "object",
"required": [
"contentItems",
"success"
],
"properties": {
"contentItems": {
"type": "array",
"items": {
"$ref": "#/definitions/DynamicToolCallOutputContentItem"
}
},
"success": {
"type": "boolean"
}
},
"definitions": {
"DynamicToolCallOutputContentItem": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"inputText"
],
"title": "InputTextDynamicToolCallOutputContentItemType"
}
},
"title": "InputTextDynamicToolCallOutputContentItem"
},
{
"type": "object",
"required": [
"imageUrl",
"type"
],
"properties": {
"imageUrl": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"inputImage"
],
"title": "InputImageDynamicToolCallOutputContentItemType"
}
},
"title": "InputImageDynamicToolCallOutputContentItem"
}
]
}
}
}

View File

@@ -0,0 +1,165 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecCommandApprovalParams",
"type": "object",
"required": [
"callId",
"command",
"conversationId",
"cwd",
"parsedCmd"
],
"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": {
"type": "array",
"items": {
"type": "string"
}
},
"conversationId": {
"$ref": "#/definitions/ThreadId"
},
"cwd": {
"type": "string"
},
"parsedCmd": {
"type": "array",
"items": {
"$ref": "#/definitions/ParsedCommand"
}
},
"reason": {
"type": [
"string",
"null"
]
}
},
"definitions": {
"ParsedCommand": {
"oneOf": [
{
"type": "object",
"required": [
"cmd",
"name",
"path",
"type"
],
"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": {
"type": "string",
"enum": [
"read"
],
"title": "ReadParsedCommandType"
}
},
"title": "ReadParsedCommand"
},
{
"type": "object",
"required": [
"cmd",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"list_files"
],
"title": "ListFilesParsedCommandType"
}
},
"title": "ListFilesParsedCommand"
},
{
"type": "object",
"required": [
"cmd",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"query": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"search"
],
"title": "SearchParsedCommandType"
}
},
"title": "SearchParsedCommand"
},
{
"type": "object",
"required": [
"cmd",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"unknown"
],
"title": "UnknownParsedCommandType"
}
},
"title": "UnknownParsedCommand"
}
]
},
"ThreadId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,124 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecCommandApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"definitions": {
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"type": "string",
"enum": [
"approved"
]
},
{
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"type": "object",
"required": [
"approved_execpolicy_amendment"
],
"properties": {
"approved_execpolicy_amendment": {
"type": "object",
"required": [
"proposed_execpolicy_amendment"
],
"properties": {
"proposed_execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "ApprovedExecpolicyAmendmentReviewDecision"
},
{
"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.",
"type": "string",
"enum": [
"approved_for_session"
]
},
{
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "NetworkPolicyAmendmentReviewDecision"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"type": "string",
"enum": [
"denied"
]
},
{
"description": "Automatic approval review timed out before reaching a decision.",
"type": "string",
"enum": [
"timed_out"
]
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"type": "string",
"enum": [
"abort"
]
}
]
}
}
}

View File

@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangeRequestApprovalParams",
"type": "object",
"required": [
"itemId",
"startedAtMs",
"threadId",
"turnId"
],
"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.",
"type": "integer",
"format": "int64"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangeRequestApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/FileChangeApprovalDecision"
}
},
"definitions": {
"FileChangeApprovalDecision": {
"oneOf": [
{
"description": "User approved the file changes.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the file changes and future changes to the same files should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"description": "User denied the file changes. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the file changes. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
}
}
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchParams",
"type": "object",
"required": [
"query",
"roots"
],
"properties": {
"cancellationToken": {
"type": [
"string",
"null"
]
},
"query": {
"type": "string"
},
"roots": {
"type": "array",
"items": {
"type": "string"
}
}
}
}

View File

@@ -0,0 +1,66 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchResponse",
"type": "object",
"required": [
"files"
],
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
}
}
},
"definitions": {
"FuzzyFileSearchMatchType": {
"type": "string",
"enum": [
"file",
"directory"
]
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"type": "object",
"required": [
"file_name",
"match_type",
"path",
"root",
"score"
],
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"match_type": {
"$ref": "#/definitions/FuzzyFileSearchMatchType"
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchSessionCompletedNotification",
"type": "object",
"required": [
"sessionId"
],
"properties": {
"sessionId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchSessionUpdatedNotification",
"type": "object",
"required": [
"files",
"query",
"sessionId"
],
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
}
},
"query": {
"type": "string"
},
"sessionId": {
"type": "string"
}
},
"definitions": {
"FuzzyFileSearchMatchType": {
"type": "string",
"enum": [
"file",
"directory"
]
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"type": "object",
"required": [
"file_name",
"match_type",
"path",
"root",
"score"
],
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"match_type": {
"$ref": "#/definitions/FuzzyFileSearchMatchType"
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
}

48
schemas/JSONRPCError.json Normal file
View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCError",
"description": "A response to a request that indicates an error occurred.",
"type": "object",
"required": [
"error",
"id"
],
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
},
"definitions": {
"JSONRPCErrorError": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"data": true,
"message": {
"type": "string"
}
}
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}
}
}

View File

@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCErrorError",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"data": true,
"message": {
"type": "string"
}
}
}

137
schemas/JSONRPCMessage.json Normal file
View File

@@ -0,0 +1,137 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCMessage",
"description": "Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.",
"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.",
"type": "object",
"required": [
"error",
"id"
],
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
}
},
"JSONRPCErrorError": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"data": true,
"message": {
"type": "string"
}
}
},
"JSONRPCNotification": {
"description": "A notification which does not expect a response.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string"
},
"params": true
}
},
"JSONRPCRequest": {
"description": "A request that expects a response.",
"type": "object",
"required": [
"id",
"method"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true,
"trace": {
"description": "Optional W3C Trace Context for distributed tracing.",
"anyOf": [
{
"$ref": "#/definitions/W3cTraceContext"
},
{
"type": "null"
}
]
}
}
},
"JSONRPCResponse": {
"description": "A successful (non-error) response to a request.",
"type": "object",
"required": [
"id",
"result"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
}
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
},
"W3cTraceContext": {
"type": "object",
"properties": {
"traceparent": {
"type": [
"string",
"null"
]
},
"tracestate": {
"type": [
"string",
"null"
]
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCNotification",
"description": "A notification which does not expect a response.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string"
},
"params": true
}
}

View File

@@ -0,0 +1,60 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCRequest",
"description": "A request that expects a response.",
"type": "object",
"required": [
"id",
"method"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true,
"trace": {
"description": "Optional W3C Trace Context for distributed tracing.",
"anyOf": [
{
"$ref": "#/definitions/W3cTraceContext"
},
{
"type": "null"
}
]
}
},
"definitions": {
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
},
"W3cTraceContext": {
"type": "object",
"properties": {
"traceparent": {
"type": [
"string",
"null"
]
},
"tracestate": {
"type": [
"string",
"null"
]
}
}
}
}
}

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCResponse",
"description": "A successful (non-error) response to a request.",
"type": "object",
"required": [
"id",
"result"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
},
"definitions": {
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}
}
}

View File

@@ -0,0 +1,609 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerElicitationRequestParams",
"type": "object",
"oneOf": [
{
"type": "object",
"required": [
"message",
"mode",
"requestedSchema"
],
"properties": {
"_meta": true,
"message": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"form"
]
},
"requestedSchema": {
"$ref": "#/definitions/McpElicitationSchema"
}
}
},
{
"type": "object",
"required": [
"elicitationId",
"message",
"mode",
"url"
],
"properties": {
"_meta": true,
"elicitationId": {
"type": "string"
},
"message": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"url"
]
},
"url": {
"type": "string"
}
}
}
],
"required": [
"serverName",
"threadId"
],
"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"
]
}
},
"definitions": {
"McpElicitationArrayType": {
"type": "string",
"enum": [
"array"
]
},
"McpElicitationBooleanSchema": {
"type": "object",
"required": [
"type"
],
"properties": {
"default": {
"type": [
"boolean",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationBooleanType"
}
},
"additionalProperties": false
},
"McpElicitationBooleanType": {
"type": "string",
"enum": [
"boolean"
]
},
"McpElicitationConstOption": {
"type": "object",
"required": [
"const",
"title"
],
"properties": {
"const": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
},
"McpElicitationEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationSingleSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationMultiSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationLegacyTitledEnumSchema"
}
]
},
"McpElicitationLegacyTitledEnumSchema": {
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"enumNames": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationMultiSelectEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationUntitledMultiSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationTitledMultiSelectEnumSchema"
}
]
},
"McpElicitationNumberSchema": {
"type": "object",
"required": [
"type"
],
"properties": {
"default": {
"type": [
"number",
"null"
],
"format": "double"
},
"description": {
"type": [
"string",
"null"
]
},
"maximum": {
"type": [
"number",
"null"
],
"format": "double"
},
"minimum": {
"type": [
"number",
"null"
],
"format": "double"
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationNumberType"
}
},
"additionalProperties": false
},
"McpElicitationNumberType": {
"type": "string",
"enum": [
"number",
"integer"
]
},
"McpElicitationObjectType": {
"type": "string",
"enum": [
"object"
]
},
"McpElicitationPrimitiveSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationStringSchema"
},
{
"$ref": "#/definitions/McpElicitationNumberSchema"
},
{
"$ref": "#/definitions/McpElicitationBooleanSchema"
}
]
},
"McpElicitationSchema": {
"description": "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.",
"type": "object",
"required": [
"properties",
"type"
],
"properties": {
"$schema": {
"type": [
"string",
"null"
]
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/McpElicitationPrimitiveSchema"
}
},
"required": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"type": {
"$ref": "#/definitions/McpElicitationObjectType"
}
},
"additionalProperties": false
},
"McpElicitationSingleSelectEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationUntitledSingleSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationTitledSingleSelectEnumSchema"
}
]
},
"McpElicitationStringFormat": {
"type": "string",
"enum": [
"email",
"uri",
"date",
"date-time"
]
},
"McpElicitationStringSchema": {
"type": "object",
"required": [
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"format": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationStringFormat"
},
{
"type": "null"
}
]
},
"maxLength": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationStringType": {
"type": "string",
"enum": [
"string"
]
},
"McpElicitationTitledEnumItems": {
"type": "object",
"required": [
"anyOf"
],
"properties": {
"anyOf": {
"type": "array",
"items": {
"$ref": "#/definitions/McpElicitationConstOption"
}
}
},
"additionalProperties": false
},
"McpElicitationTitledMultiSelectEnumSchema": {
"type": "object",
"required": [
"items",
"type"
],
"properties": {
"default": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"description": {
"type": [
"string",
"null"
]
},
"items": {
"$ref": "#/definitions/McpElicitationTitledEnumItems"
},
"maxItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"minItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationArrayType"
}
},
"additionalProperties": false
},
"McpElicitationTitledSingleSelectEnumSchema": {
"type": "object",
"required": [
"oneOf",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"oneOf": {
"type": "array",
"items": {
"$ref": "#/definitions/McpElicitationConstOption"
}
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationUntitledEnumItems": {
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationUntitledMultiSelectEnumSchema": {
"type": "object",
"required": [
"items",
"type"
],
"properties": {
"default": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"description": {
"type": [
"string",
"null"
]
},
"items": {
"$ref": "#/definitions/McpElicitationUntitledEnumItems"
},
"maxItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"minItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationArrayType"
}
},
"additionalProperties": false
},
"McpElicitationUntitledSingleSelectEnumSchema": {
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerElicitationRequestResponse",
"type": "object",
"required": [
"action"
],
"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."
}
},
"definitions": {
"McpServerElicitationAction": {
"type": "string",
"enum": [
"accept",
"decline",
"cancel"
]
}
}
}

View File

@@ -0,0 +1,322 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PermissionsRequestApprovalParams",
"type": "object",
"required": [
"cwd",
"itemId",
"permissions",
"startedAtMs",
"threadId",
"turnId"
],
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"itemId": {
"type": "string"
},
"permissions": {
"$ref": "#/definitions/RequestPermissionProfile"
},
"reason": {
"type": [
"string",
"null"
]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"type": "integer",
"format": "int64"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"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": {
"type": "object",
"properties": {
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
}
},
"globScanMaxDepth": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 1.0
},
"read": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"write": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
}
},
"AdditionalNetworkPermissions": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"FileSystemAccessMode": {
"type": "string",
"enum": [
"read",
"write",
"none"
]
},
"FileSystemPath": {
"oneOf": [
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"path"
],
"title": "PathFileSystemPathType"
}
},
"title": "PathFileSystemPath"
},
{
"type": "object",
"required": [
"pattern",
"type"
],
"properties": {
"pattern": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"glob_pattern"
],
"title": "GlobPatternFileSystemPathType"
}
},
"title": "GlobPatternFileSystemPath"
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"special"
],
"title": "SpecialFileSystemPathType"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"title": "SpecialFileSystemPath"
}
]
},
"FileSystemSandboxEntry": {
"type": "object",
"required": [
"access",
"path"
],
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
}
},
"FileSystemSpecialPath": {
"oneOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"root"
]
}
},
"title": "RootFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"minimal"
]
}
},
"title": "MinimalFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"project_roots"
]
},
"subpath": {
"type": [
"string",
"null"
]
}
},
"title": "KindFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"tmpdir"
]
}
},
"title": "TmpdirFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"slash_tmp"
]
}
},
"title": "SlashTmpFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"unknown"
]
},
"path": {
"type": "string"
},
"subpath": {
"type": [
"string",
"null"
]
}
}
}
]
},
"RequestPermissionProfile": {
"type": "object",
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,315 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PermissionsRequestApprovalResponse",
"type": "object",
"required": [
"permissions"
],
"properties": {
"permissions": {
"$ref": "#/definitions/GrantedPermissionProfile"
},
"scope": {
"default": "turn",
"allOf": [
{
"$ref": "#/definitions/PermissionGrantScope"
}
]
},
"strictAutoReview": {
"description": "Review every subsequent command in this turn before normal sandboxed execution.",
"type": [
"boolean",
"null"
]
}
},
"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": {
"type": "object",
"properties": {
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
}
},
"globScanMaxDepth": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 1.0
},
"read": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"write": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
}
},
"AdditionalNetworkPermissions": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"FileSystemAccessMode": {
"type": "string",
"enum": [
"read",
"write",
"none"
]
},
"FileSystemPath": {
"oneOf": [
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"path"
],
"title": "PathFileSystemPathType"
}
},
"title": "PathFileSystemPath"
},
{
"type": "object",
"required": [
"pattern",
"type"
],
"properties": {
"pattern": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"glob_pattern"
],
"title": "GlobPatternFileSystemPathType"
}
},
"title": "GlobPatternFileSystemPath"
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"special"
],
"title": "SpecialFileSystemPathType"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"title": "SpecialFileSystemPath"
}
]
},
"FileSystemSandboxEntry": {
"type": "object",
"required": [
"access",
"path"
],
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
}
},
"FileSystemSpecialPath": {
"oneOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"root"
]
}
},
"title": "RootFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"minimal"
]
}
},
"title": "MinimalFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"project_roots"
]
},
"subpath": {
"type": [
"string",
"null"
]
}
},
"title": "KindFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"tmpdir"
]
}
},
"title": "TmpdirFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"slash_tmp"
]
}
},
"title": "SlashTmpFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"unknown"
]
},
"path": {
"type": "string"
},
"subpath": {
"type": [
"string",
"null"
]
}
}
}
]
},
"GrantedPermissionProfile": {
"type": "object",
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
}
},
"PermissionGrantScope": {
"type": "string",
"enum": [
"turn",
"session"
]
}
}
}

13
schemas/RequestId.json Normal file
View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RequestId",
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}

File diff suppressed because it is too large Load Diff

2001
schemas/ServerRequest.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ToolRequestUserInputParams",
"description": "EXPERIMENTAL. Params sent with a request_user_input event.",
"type": "object",
"required": [
"itemId",
"questions",
"threadId",
"turnId"
],
"properties": {
"itemId": {
"type": "string"
},
"questions": {
"type": "array",
"items": {
"$ref": "#/definitions/ToolRequestUserInputQuestion"
}
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"definitions": {
"ToolRequestUserInputOption": {
"description": "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
"type": "object",
"required": [
"description",
"label"
],
"properties": {
"description": {
"type": "string"
},
"label": {
"type": "string"
}
}
},
"ToolRequestUserInputQuestion": {
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
"type": "object",
"required": [
"header",
"id",
"question"
],
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ToolRequestUserInputOption"
}
},
"question": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ToolRequestUserInputResponse",
"description": "EXPERIMENTAL. Response payload mapping question ids to answers.",
"type": "object",
"required": [
"answers"
],
"properties": {
"answers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ToolRequestUserInputAnswer"
}
}
},
"definitions": {
"ToolRequestUserInputAnswer": {
"description": "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
"type": "object",
"required": [
"answers"
],
"properties": {
"answers": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,72 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InitializeParams",
"type": "object",
"required": [
"clientInfo"
],
"properties": {
"capabilities": {
"anyOf": [
{
"$ref": "#/definitions/InitializeCapabilities"
},
{
"type": "null"
}
]
},
"clientInfo": {
"$ref": "#/definitions/ClientInfo"
}
},
"definitions": {
"ClientInfo": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
}
}
},
"InitializeCapabilities": {
"description": "Client-declared capabilities negotiated during initialize.",
"type": "object",
"properties": {
"experimentalApi": {
"description": "Opt into receiving experimental API methods and fields.",
"default": false,
"type": "boolean"
},
"optOutNotificationMethods": {
"description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"requestAttestation": {
"description": "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
"default": false,
"type": "boolean"
}
}
}
}
}

View File

@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InitializeResponse",
"type": "object",
"required": [
"codexHome",
"platformFamily",
"platformOs",
"userAgent"
],
"properties": {
"codexHome": {
"description": "Absolute path to the server's $CODEX_HOME directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"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"
}
},
"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"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountLoginCompletedNotification",
"type": "object",
"required": [
"success"
],
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"loginId": {
"type": [
"string",
"null"
]
},
"success": {
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,156 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountRateLimitsUpdatedNotification",
"type": "object",
"required": [
"rateLimits"
],
"properties": {
"rateLimits": {
"$ref": "#/definitions/RateLimitSnapshot"
}
},
"definitions": {
"CreditsSnapshot": {
"type": "object",
"required": [
"hasCredits",
"unlimited"
],
"properties": {
"balance": {
"type": [
"string",
"null"
]
},
"hasCredits": {
"type": "boolean"
},
"unlimited": {
"type": "boolean"
}
}
},
"PlanType": {
"type": "string",
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
]
},
"RateLimitReachedType": {
"type": "string",
"enum": [
"rate_limit_reached",
"workspace_owner_credits_depleted",
"workspace_member_credits_depleted",
"workspace_owner_usage_limit_reached",
"workspace_member_usage_limit_reached"
]
},
"RateLimitSnapshot": {
"type": "object",
"properties": {
"credits": {
"anyOf": [
{
"$ref": "#/definitions/CreditsSnapshot"
},
{
"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"
}
]
}
}
},
"RateLimitWindow": {
"type": "object",
"required": [
"usedPercent"
],
"properties": {
"resetsAt": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"usedPercent": {
"type": "integer",
"format": "int32"
},
"windowDurationMins": {
"type": [
"integer",
"null"
],
"format": "int64"
}
}
}
}
}

View File

@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountUpdatedNotification",
"type": "object",
"properties": {
"authMode": {
"anyOf": [
{
"$ref": "#/definitions/AuthMode"
},
{
"type": "null"
}
]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/PlanType"
},
{
"type": "null"
}
]
}
},
"definitions": {
"AuthMode": {
"description": "Authentication mode for OpenAI-backed providers.",
"oneOf": [
{
"description": "OpenAI API key provided by the caller and stored by Codex.",
"type": "string",
"enum": [
"apikey"
]
},
{
"description": "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
"type": "string",
"enum": [
"chatgpt"
]
},
{
"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.",
"type": "string",
"enum": [
"chatgptAuthTokens"
]
},
{
"description": "Programmatic Codex auth backed by a registered Agent Identity.",
"type": "string",
"enum": [
"agentIdentity"
]
}
]
},
"PlanType": {
"type": "string",
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
]
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AgentMessageDeltaNotification",
"type": "object",
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,276 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AppListUpdatedNotification",
"description": "EXPERIMENTAL - notification emitted when the app list changes.",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AppInfo"
}
}
},
"definitions": {
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"isDiscoverableApp"
],
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"developer": {
"type": [
"string",
"null"
]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": [
"string",
"null"
]
},
"termsOfService": {
"type": [
"string",
"null"
]
},
"website": {
"type": [
"string",
"null"
]
}
}
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": [
"string",
"null"
]
},
"distributionChannel": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"installUrl": {
"type": [
"string",
"null"
]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"default": true,
"type": "boolean"
},
"labels": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"logoUrl": {
"type": [
"string",
"null"
]
},
"logoUrlDark": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"pluginDisplayNames": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"AppMetadata": {
"type": "object",
"properties": {
"categories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"developer": {
"type": [
"string",
"null"
]
},
"firstPartyRequiresInstall": {
"type": [
"boolean",
"null"
]
},
"firstPartyType": {
"type": [
"string",
"null"
]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AppScreenshot"
}
},
"seoDescription": {
"type": [
"string",
"null"
]
},
"showInComposerWhenUnlinked": {
"type": [
"boolean",
"null"
]
},
"subCategories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"version": {
"type": [
"string",
"null"
]
},
"versionId": {
"type": [
"string",
"null"
]
},
"versionNotes": {
"type": [
"string",
"null"
]
}
}
},
"AppReview": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string"
}
}
},
"AppScreenshot": {
"type": "object",
"required": [
"userPrompt"
],
"properties": {
"fileId": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"userPrompt": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AppsListParams",
"description": "EXPERIMENTAL - list available apps/connectors.",
"type": "object",
"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.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"threadId": {
"description": "Optional thread id used to evaluate app feature gating from that thread's config.",
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,283 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AppsListResponse",
"description": "EXPERIMENTAL - app list response.",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AppInfo"
}
},
"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"
]
}
},
"definitions": {
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"isDiscoverableApp"
],
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"developer": {
"type": [
"string",
"null"
]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": [
"string",
"null"
]
},
"termsOfService": {
"type": [
"string",
"null"
]
},
"website": {
"type": [
"string",
"null"
]
}
}
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": [
"string",
"null"
]
},
"distributionChannel": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"installUrl": {
"type": [
"string",
"null"
]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"default": true,
"type": "boolean"
},
"labels": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"logoUrl": {
"type": [
"string",
"null"
]
},
"logoUrlDark": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"pluginDisplayNames": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"AppMetadata": {
"type": "object",
"properties": {
"categories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"developer": {
"type": [
"string",
"null"
]
},
"firstPartyRequiresInstall": {
"type": [
"boolean",
"null"
]
},
"firstPartyType": {
"type": [
"string",
"null"
]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AppScreenshot"
}
},
"seoDescription": {
"type": [
"string",
"null"
]
},
"showInComposerWhenUnlinked": {
"type": [
"boolean",
"null"
]
},
"subCategories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"version": {
"type": [
"string",
"null"
]
},
"versionId": {
"type": [
"string",
"null"
]
},
"versionNotes": {
"type": [
"string",
"null"
]
}
}
},
"AppReview": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string"
}
}
},
"AppScreenshot": {
"type": "object",
"required": [
"userPrompt"
],
"properties": {
"fileId": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"userPrompt": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CancelLoginAccountParams",
"type": "object",
"required": [
"loginId"
],
"properties": {
"loginId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CancelLoginAccountResponse",
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"$ref": "#/definitions/CancelLoginAccountStatus"
}
},
"definitions": {
"CancelLoginAccountStatus": {
"type": "string",
"enum": [
"canceled",
"notFound"
]
}
}
}

View File

@@ -0,0 +1,55 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecOutputDeltaNotification",
"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.",
"type": "object",
"required": [
"capReached",
"deltaBase64",
"processId",
"stream"
],
"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": {
"description": "Output stream for this chunk.",
"allOf": [
{
"$ref": "#/definitions/CommandExecOutputStream"
}
]
}
},
"definitions": {
"CommandExecOutputStream": {
"description": "Stream label for `command/exec/outputDelta` notifications.",
"oneOf": [
{
"description": "stdout stream. PTY mode multiplexes terminal output here.",
"type": "string",
"enum": [
"stdout"
]
},
{
"description": "stderr stream.",
"type": "string",
"enum": [
"stderr"
]
}
]
}
}
}

View File

@@ -0,0 +1,258 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecParams",
"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.",
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"description": "Command argv vector. Empty arrays are rejected.",
"type": "array",
"items": {
"type": "string"
}
},
"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": {
"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"
],
"additionalProperties": {
"type": [
"string",
"null"
]
}
},
"outputBytesCap": {
"description": "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
},
"tty": {
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
"type": "boolean"
},
"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": {
"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`.",
"anyOf": [
{
"$ref": "#/definitions/SandboxPolicy"
},
{
"type": "null"
}
]
},
"size": {
"description": "Optional initial PTY size in character cells. Only valid when `tty` is true.",
"anyOf": [
{
"$ref": "#/definitions/CommandExecTerminalSize"
},
{
"type": "null"
}
]
},
"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`.",
"type": [
"integer",
"null"
],
"format": "int64"
}
},
"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"
},
"ActivePermissionProfile": {
"type": "object",
"required": [
"id"
],
"properties": {
"extends": {
"description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.",
"default": null,
"type": [
"string",
"null"
]
},
"id": {
"description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
"type": "string"
}
}
},
"CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.",
"type": "object",
"required": [
"cols",
"rows"
],
"properties": {
"cols": {
"description": "Terminal width in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"rows": {
"description": "Terminal height in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
}
},
"NetworkAccess": {
"type": "string",
"enum": [
"restricted",
"enabled"
]
},
"SandboxPolicy": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"dangerFullAccess"
],
"title": "DangerFullAccessSandboxPolicyType"
}
},
"title": "DangerFullAccessSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"readOnly"
],
"title": "ReadOnlySandboxPolicyType"
}
},
"title": "ReadOnlySandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": "restricted",
"allOf": [
{
"$ref": "#/definitions/NetworkAccess"
}
]
},
"type": {
"type": "string",
"enum": [
"externalSandbox"
],
"title": "ExternalSandboxSandboxPolicyType"
}
},
"title": "ExternalSandboxSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"excludeSlashTmp": {
"default": false,
"type": "boolean"
},
"excludeTmpdirEnvVar": {
"default": false,
"type": "boolean"
},
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"workspaceWrite"
],
"title": "WorkspaceWriteSandboxPolicyType"
},
"writableRoots": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
},
"title": "WorkspaceWriteSandboxPolicy"
}
]
}
}
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecResizeParams",
"description": "Resize a running PTY-backed `command/exec` session.",
"type": "object",
"required": [
"processId",
"size"
],
"properties": {
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
},
"size": {
"description": "New PTY size in character cells.",
"allOf": [
{
"$ref": "#/definitions/CommandExecTerminalSize"
}
]
}
},
"definitions": {
"CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.",
"type": "object",
"required": [
"cols",
"rows"
],
"properties": {
"cols": {
"description": "Terminal width in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"rows": {
"description": "Terminal height in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecResizeResponse",
"description": "Empty success response for `command/exec/resize`.",
"type": "object"
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecResponse",
"description": "Final buffered result for `command/exec`.",
"type": "object",
"required": [
"exitCode",
"stderr",
"stdout"
],
"properties": {
"exitCode": {
"description": "Process exit code.",
"type": "integer",
"format": "int32"
},
"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"
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecTerminateParams",
"description": "Terminate a running `command/exec` session.",
"type": "object",
"required": [
"processId"
],
"properties": {
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecTerminateResponse",
"description": "Empty success response for `command/exec/terminate`.",
"type": "object"
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecWriteParams",
"description": "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
"type": "object",
"required": [
"processId"
],
"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"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecWriteResponse",
"description": "Empty success response for `command/exec/write`.",
"type": "object"
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecutionOutputDeltaNotification",
"type": "object",
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,59 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigBatchWriteParams",
"type": "object",
"required": [
"edits"
],
"properties": {
"edits": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfigEdit"
}
},
"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"
}
},
"definitions": {
"ConfigEdit": {
"type": "object",
"required": [
"keyPath",
"mergeStrategy",
"value"
],
"properties": {
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/MergeStrategy"
},
"value": true
}
},
"MergeStrategy": {
"type": "string",
"enum": [
"replace",
"upsert"
]
}
}
}

View File

@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigReadParams",
"type": "object",
"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": {
"default": false,
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,913 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigReadResponse",
"type": "object",
"required": [
"config",
"origins"
],
"properties": {
"config": {
"$ref": "#/definitions/Config"
},
"layers": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ConfigLayer"
}
},
"origins": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ConfigLayerMetadata"
}
}
},
"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": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": true
},
"AppConfig": {
"type": "object",
"properties": {
"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"
}
]
}
}
},
"AppToolApproval": {
"type": "string",
"enum": [
"auto",
"prompt",
"approve"
]
},
"AppToolConfig": {
"type": "object",
"properties": {
"approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"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.",
"type": "string",
"enum": [
"user",
"auto_review",
"guardian_subagent"
]
},
"AppsConfig": {
"type": "object",
"properties": {
"_default": {
"default": null,
"anyOf": [
{
"$ref": "#/definitions/AppsDefaultConfig"
},
{
"type": "null"
}
]
}
}
},
"AppsDefaultConfig": {
"type": "object",
"properties": {
"destructive_enabled": {
"default": true,
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"default": true,
"type": "boolean"
}
}
},
"AskForApproval": {
"oneOf": [
{
"type": "string",
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
]
},
{
"type": "object",
"required": [
"granular"
],
"properties": {
"granular": {
"type": "object",
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
}
}
},
"additionalProperties": false,
"title": "GranularAskForApproval"
}
]
},
"Config": {
"type": "object",
"properties": {
"analytics": {
"anyOf": [
{
"$ref": "#/definitions/AnalyticsConfig"
},
{
"type": "null"
}
]
},
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvals_reviewer": {
"description": "[UNSTABLE] Optional default for where approval requests are routed for review.",
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchMode"
},
{
"type": "null"
}
]
},
"compact_prompt": {
"type": [
"string",
"null"
]
},
"desktop": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"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": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"model_context_window": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"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"
}
]
},
"profile": {
"type": [
"string",
"null"
]
},
"profiles": {
"default": {},
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ProfileV2"
}
},
"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"
}
]
}
},
"additionalProperties": true
},
"ConfigLayer": {
"type": "object",
"required": [
"config",
"name",
"version"
],
"properties": {
"config": true,
"disabledReason": {
"type": [
"string",
"null"
]
},
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
}
},
"ConfigLayerMetadata": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
}
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"type": "object",
"required": [
"domain",
"key",
"type"
],
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"mdm"
],
"title": "MdmConfigLayerSourceType"
}
},
"title": "MdmConfigLayerSource"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"type": {
"type": "string",
"enum": [
"system"
],
"title": "SystemConfigLayerSourceType"
}
},
"title": "SystemConfigLayerSource"
},
{
"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",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"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": {
"type": "string",
"enum": [
"user"
],
"title": "UserConfigLayerSourceType"
}
},
"title": "UserConfigLayerSource"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"type": "object",
"required": [
"dotCodexFolder",
"type"
],
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"project"
],
"title": "ProjectConfigLayerSourceType"
}
},
"title": "ProjectConfigLayerSource"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"sessionFlags"
],
"title": "SessionFlagsConfigLayerSourceType"
}
},
"title": "SessionFlagsConfigLayerSource"
},
{
"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`.",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromFile"
],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromMdm"
],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource"
}
]
},
"ForcedChatgptWorkspaceIds": {
"description": "Backward-compatible API shape for ChatGPT workspace login restrictions.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"ForcedLoginMethod": {
"type": "string",
"enum": [
"chatgpt",
"api"
]
},
"ProfileV2": {
"type": "object",
"properties": {
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvals_reviewer": {
"description": "[UNSTABLE] Optional profile-level override for where approval requests are routed for review. If omitted, the enclosing config default is used.",
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"chatgpt_base_url": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"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"
}
]
},
"service_tier": {
"type": [
"string",
"null"
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/ToolsV2"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchMode"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
},
"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": [
{
"type": "string",
"enum": [
"auto",
"concise",
"detailed"
]
},
{
"description": "Option to disable reasoning summaries.",
"type": "string",
"enum": [
"none"
]
}
]
},
"SandboxMode": {
"type": "string",
"enum": [
"read-only",
"workspace-write",
"danger-full-access"
]
},
"SandboxWorkspaceWrite": {
"type": "object",
"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": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ToolsV2": {
"type": "object",
"properties": {
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchToolConfig"
},
{
"type": "null"
}
]
}
}
},
"Verbosity": {
"description": "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"WebSearchContextSize": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"WebSearchLocation": {
"type": "object",
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"WebSearchMode": {
"type": "string",
"enum": [
"disabled",
"cached",
"live"
]
},
"WebSearchToolConfig": {
"type": "object",
"properties": {
"allowed_domains": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"context_size": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchContextSize"
},
{
"type": "null"
}
]
},
"location": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchLocation"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,455 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigRequirementsReadResponse",
"type": "object",
"properties": {
"requirements": {
"description": "Null if no requirements are configured (e.g. no requirements.toml/MDM entries).",
"anyOf": [
{
"$ref": "#/definitions/ConfigRequirements"
},
{
"type": "null"
}
]
}
},
"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.",
"type": "string",
"enum": [
"user",
"auto_review",
"guardian_subagent"
]
},
"AskForApproval": {
"oneOf": [
{
"type": "string",
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
]
},
{
"type": "object",
"required": [
"granular"
],
"properties": {
"granular": {
"type": "object",
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
}
}
},
"additionalProperties": false,
"title": "GranularAskForApproval"
}
]
},
"ConfigRequirements": {
"type": "object",
"properties": {
"allowManagedHooksOnly": {
"type": [
"boolean",
"null"
]
},
"allowedApprovalPolicies": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AskForApproval"
}
},
"featureRequirements": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "boolean"
}
},
"allowedSandboxModes": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/SandboxMode"
}
},
"allowedWebSearchModes": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/WebSearchMode"
}
},
"enforceResidency": {
"anyOf": [
{
"$ref": "#/definitions/ResidencyRequirement"
},
{
"type": "null"
}
]
}
}
},
"ConfiguredHookHandler": {
"oneOf": [
{
"type": "object",
"required": [
"async",
"command",
"type"
],
"properties": {
"async": {
"type": "boolean"
},
"command": {
"type": "string"
},
"commandWindows": {
"type": [
"string",
"null"
]
},
"statusMessage": {
"type": [
"string",
"null"
]
},
"timeoutSec": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"type": {
"type": "string",
"enum": [
"command"
],
"title": "CommandConfiguredHookHandlerType"
}
},
"title": "CommandConfiguredHookHandler"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"prompt"
],
"title": "PromptConfiguredHookHandlerType"
}
},
"title": "PromptConfiguredHookHandler"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"agent"
],
"title": "AgentConfiguredHookHandlerType"
}
},
"title": "AgentConfiguredHookHandler"
}
]
},
"ConfiguredHookMatcherGroup": {
"type": "object",
"required": [
"hooks"
],
"properties": {
"hooks": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookHandler"
}
},
"matcher": {
"type": [
"string",
"null"
]
}
}
},
"ManagedHooksRequirements": {
"type": "object",
"required": [
"PermissionRequest",
"PostCompact",
"PostToolUse",
"PreCompact",
"PreToolUse",
"SessionStart",
"Stop",
"UserPromptSubmit"
],
"properties": {
"PermissionRequest": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PostCompact": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PostToolUse": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PreCompact": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PreToolUse": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"SessionStart": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"Stop": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"UserPromptSubmit": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"managedDir": {
"type": [
"string",
"null"
]
},
"windowsManagedDir": {
"type": [
"string",
"null"
]
}
}
},
"NetworkDomainPermission": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"NetworkRequirements": {
"type": "object",
"properties": {
"allowLocalBinding": {
"type": [
"boolean",
"null"
]
},
"allowUnixSockets": {
"description": "Legacy compatibility view derived from `unix_sockets`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"allowUpstreamProxy": {
"type": [
"boolean",
"null"
]
},
"allowedDomains": {
"description": "Legacy compatibility view derived from `domains`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dangerouslyAllowAllUnixSockets": {
"type": [
"boolean",
"null"
]
},
"dangerouslyAllowNonLoopbackProxy": {
"type": [
"boolean",
"null"
]
},
"deniedDomains": {
"description": "Legacy compatibility view derived from `domains`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"domains": {
"description": "Canonical network permission map for `experimental_network`.",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/definitions/NetworkDomainPermission"
}
},
"enabled": {
"type": [
"boolean",
"null"
]
},
"httpPort": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"managedAllowedDomainsOnly": {
"description": "When true, only managed allowlist entries are respected while managed network enforcement is active.",
"type": [
"boolean",
"null"
]
},
"socksPort": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"unixSockets": {
"description": "Canonical unix socket permission map for `experimental_network`.",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/definitions/NetworkUnixSocketPermission"
}
}
}
},
"NetworkUnixSocketPermission": {
"type": "string",
"enum": [
"allow",
"none"
]
},
"ResidencyRequirement": {
"type": "string",
"enum": [
"us"
]
},
"SandboxMode": {
"type": "string",
"enum": [
"read-only",
"workspace-write",
"danger-full-access"
]
},
"WebSearchMode": {
"type": "string",
"enum": [
"disabled",
"cached",
"live"
]
}
}
}

View File

@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigValueWriteParams",
"type": "object",
"required": [
"keyPath",
"mergeStrategy",
"value"
],
"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
},
"definitions": {
"MergeStrategy": {
"type": "string",
"enum": [
"replace",
"upsert"
]
}
}
}

View File

@@ -0,0 +1,77 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigWarningNotification",
"type": "object",
"required": [
"summary"
],
"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": {
"description": "Optional range for the error location inside the config file.",
"anyOf": [
{
"$ref": "#/definitions/TextRange"
},
{
"type": "null"
}
]
},
"summary": {
"description": "Concise summary of the warning.",
"type": "string"
}
},
"definitions": {
"TextPosition": {
"type": "object",
"required": [
"column",
"line"
],
"properties": {
"column": {
"description": "1-based column number (in Unicode scalar values).",
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"line": {
"description": "1-based line number.",
"type": "integer",
"format": "uint",
"minimum": 0.0
}
}
},
"TextRange": {
"type": "object",
"required": [
"end",
"start"
],
"properties": {
"end": {
"$ref": "#/definitions/TextPosition"
},
"start": {
"$ref": "#/definitions/TextPosition"
}
}
}
}
}

View File

@@ -0,0 +1,244 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigWriteResponse",
"type": "object",
"required": [
"filePath",
"status",
"version"
],
"properties": {
"filePath": {
"description": "Canonical path to the config file that was written.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"overriddenMetadata": {
"anyOf": [
{
"$ref": "#/definitions/OverriddenMetadata"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/WriteStatus"
},
"version": {
"type": "string"
}
},
"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": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
}
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"type": "object",
"required": [
"domain",
"key",
"type"
],
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"mdm"
],
"title": "MdmConfigLayerSourceType"
}
},
"title": "MdmConfigLayerSource"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"type": {
"type": "string",
"enum": [
"system"
],
"title": "SystemConfigLayerSourceType"
}
},
"title": "SystemConfigLayerSource"
},
{
"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",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"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": {
"type": "string",
"enum": [
"user"
],
"title": "UserConfigLayerSourceType"
}
},
"title": "UserConfigLayerSource"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"type": "object",
"required": [
"dotCodexFolder",
"type"
],
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"project"
],
"title": "ProjectConfigLayerSourceType"
}
},
"title": "ProjectConfigLayerSource"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"sessionFlags"
],
"title": "SessionFlagsConfigLayerSourceType"
}
},
"title": "SessionFlagsConfigLayerSource"
},
{
"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`.",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromFile"
],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromMdm"
],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource"
}
]
},
"OverriddenMetadata": {
"type": "object",
"required": [
"effectiveValue",
"message",
"overridingLayer"
],
"properties": {
"effectiveValue": true,
"message": {
"type": "string"
},
"overridingLayer": {
"$ref": "#/definitions/ConfigLayerMetadata"
}
}
},
"WriteStatus": {
"type": "string",
"enum": [
"ok",
"okOverridden"
]
}
}
}

View File

@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ContextCompactedNotification",
"description": "Deprecated: Use `ContextCompaction` item type instead.",
"type": "object",
"required": [
"threadId",
"turnId"
],
"properties": {
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DeprecationNoticeNotification",
"type": "object",
"required": [
"summary"
],
"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"
}
}
}

View File

@@ -0,0 +1,199 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ErrorNotification",
"type": "object",
"required": [
"error",
"threadId",
"turnId",
"willRetry"
],
"properties": {
"error": {
"$ref": "#/definitions/TurnError"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"willRetry": {
"type": "boolean"
}
},
"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": [
{
"type": "string",
"enum": [
"contextWindowExceeded",
"usageLimitExceeded",
"serverOverloaded",
"cyberPolicy",
"internalServerError",
"unauthorized",
"badRequest",
"threadRollbackFailed",
"sandboxError",
"other"
]
},
{
"type": "object",
"required": [
"httpConnectionFailed"
],
"properties": {
"httpConnectionFailed": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "HttpConnectionFailedCodexErrorInfo"
},
{
"description": "Failed to connect to the response SSE stream.",
"type": "object",
"required": [
"responseStreamConnectionFailed"
],
"properties": {
"responseStreamConnectionFailed": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "ResponseStreamConnectionFailedCodexErrorInfo"
},
{
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
"type": "object",
"required": [
"responseStreamDisconnected"
],
"properties": {
"responseStreamDisconnected": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "ResponseStreamDisconnectedCodexErrorInfo"
},
{
"description": "Reached the retry limit for responses.",
"type": "object",
"required": [
"responseTooManyFailedAttempts"
],
"properties": {
"responseTooManyFailedAttempts": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo"
},
{
"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`.",
"type": "object",
"required": [
"activeTurnNotSteerable"
],
"properties": {
"activeTurnNotSteerable": {
"type": "object",
"required": [
"turnKind"
],
"properties": {
"turnKind": {
"$ref": "#/definitions/NonSteerableTurnKind"
}
}
}
},
"additionalProperties": false,
"title": "ActiveTurnNotSteerableCodexErrorInfo"
}
]
},
"NonSteerableTurnKind": {
"type": "string",
"enum": [
"review",
"compact"
]
},
"TurnError": {
"type": "object",
"required": [
"message"
],
"properties": {
"additionalDetails": {
"default": null,
"type": [
"string",
"null"
]
},
"codexErrorInfo": {
"anyOf": [
{
"$ref": "#/definitions/CodexErrorInfo"
},
{
"type": "null"
}
]
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureEnablementSetParams",
"type": "object",
"required": [
"enablement"
],
"properties": {
"enablement": {
"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",
"additionalProperties": {
"type": "boolean"
}
}
}
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureEnablementSetResponse",
"type": "object",
"required": [
"enablement"
],
"properties": {
"enablement": {
"description": "Feature enablement entries updated by this request.",
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}

View File

@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureListParams",
"type": "object",
"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.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"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"
]
}
}
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureListResponse",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/ExperimentalFeature"
}
},
"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"
]
}
},
"definitions": {
"ExperimentalFeature": {
"type": "object",
"required": [
"defaultEnabled",
"enabled",
"name",
"stage"
],
"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": {
"description": "Lifecycle stage of this feature flag.",
"allOf": [
{
"$ref": "#/definitions/ExperimentalFeatureStage"
}
]
}
}
},
"ExperimentalFeatureStage": {
"oneOf": [
{
"description": "Feature is available for user testing and feedback.",
"type": "string",
"enum": [
"beta"
]
},
{
"description": "Feature is still being built and not ready for broad use.",
"type": "string",
"enum": [
"underDevelopment"
]
},
{
"description": "Feature is production-ready.",
"type": "string",
"enum": [
"stable"
]
},
{
"description": "Feature is deprecated and should be avoided.",
"type": "string",
"enum": [
"deprecated"
]
},
{
"description": "Feature flag is retained only for backwards compatibility.",
"type": "string",
"enum": [
"removed"
]
}
]
}
}
}

View File

@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigDetectParams",
"type": "object",
"properties": {
"cwds": {
"description": "Zero or more working directories to include for repo-scoped detection.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"includeHome": {
"description": "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).",
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,194 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigDetectResponse",
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
}
}
},
"definitions": {
"CommandMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"ExternalAgentConfigMigrationItem": {
"type": "object",
"required": [
"description",
"itemType"
],
"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"
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
},
"HookMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"McpServerMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"MigrationDetails": {
"type": "object",
"properties": {
"commands": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/CommandMigration"
}
},
"hooks": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/HookMigration"
}
},
"mcpServers": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/McpServerMigration"
}
},
"plugins": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginsMigration"
}
},
"sessions": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SessionMigration"
}
},
"subagents": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SubagentMigration"
}
}
}
},
"PluginsMigration": {
"type": "object",
"required": [
"marketplaceName",
"pluginNames"
],
"properties": {
"marketplaceName": {
"type": "string"
},
"pluginNames": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SessionMigration": {
"type": "object",
"required": [
"cwd",
"path"
],
"properties": {
"cwd": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
}
},
"SubagentMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportCompletedNotification",
"type": "object"
}

View File

@@ -0,0 +1,194 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportParams",
"type": "object",
"required": [
"migrationItems"
],
"properties": {
"migrationItems": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
}
}
},
"definitions": {
"CommandMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"ExternalAgentConfigMigrationItem": {
"type": "object",
"required": [
"description",
"itemType"
],
"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"
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
},
"HookMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"McpServerMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"MigrationDetails": {
"type": "object",
"properties": {
"commands": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/CommandMigration"
}
},
"hooks": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/HookMigration"
}
},
"mcpServers": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/McpServerMigration"
}
},
"plugins": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginsMigration"
}
},
"sessions": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SessionMigration"
}
},
"subagents": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SubagentMigration"
}
}
}
},
"PluginsMigration": {
"type": "object",
"required": [
"marketplaceName",
"pluginNames"
],
"properties": {
"marketplaceName": {
"type": "string"
},
"pluginNames": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SessionMigration": {
"type": "object",
"required": [
"cwd",
"path"
],
"properties": {
"cwd": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
}
},
"SubagentMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportResponse",
"type": "object"
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FeedbackUploadParams",
"type": "object",
"required": [
"classification",
"includeLogs"
],
"properties": {
"classification": {
"type": "string"
},
"extraLogFiles": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"includeLogs": {
"type": "boolean"
},
"reason": {
"type": [
"string",
"null"
]
},
"tags": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"threadId": {
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FeedbackUploadResponse",
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangeOutputDeltaNotification",
"description": "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
"type": "object",
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangePatchUpdatedNotification",
"type": "object",
"required": [
"changes",
"itemId",
"threadId",
"turnId"
],
"properties": {
"changes": {
"type": "array",
"items": {
"$ref": "#/definitions/FileUpdateChange"
}
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"definitions": {
"FileUpdateChange": {
"type": "object",
"required": [
"diff",
"kind",
"path"
],
"properties": {
"diff": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/PatchChangeKind"
},
"path": {
"type": "string"
}
}
},
"PatchChangeKind": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"add"
],
"title": "AddPatchChangeKindType"
}
},
"title": "AddPatchChangeKind"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"delete"
],
"title": "DeletePatchChangeKindType"
}
},
"title": "DeletePatchChangeKind"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"move_path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"update"
],
"title": "UpdatePatchChangeKindType"
}
},
"title": "UpdatePatchChangeKind"
}
]
}
}
}

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsChangedNotification",
"description": "Filesystem watch notification emitted for `fs/watch` subscribers.",
"type": "object",
"required": [
"changedPaths",
"watchId"
],
"properties": {
"changedPaths": {
"description": "File or directory paths associated with this event.",
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"watchId": {
"description": "Watch identifier previously provided to `fs/watch`.",
"type": "string"
}
},
"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"
}
}
}

View File

@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCopyParams",
"description": "Copy a file or directory tree on the host filesystem.",
"type": "object",
"required": [
"destinationPath",
"sourcePath"
],
"properties": {
"destinationPath": {
"description": "Absolute destination path.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"recursive": {
"description": "Required for directory copies; ignored for file copies.",
"type": "boolean"
},
"sourcePath": {
"description": "Absolute source path.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCopyResponse",
"description": "Successful response for `fs/copy`.",
"type": "object"
}

View File

@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCreateDirectoryParams",
"description": "Create a directory on the host filesystem.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute directory path to create.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"recursive": {
"description": "Whether parent directories should also be created. Defaults to `true`.",
"type": [
"boolean",
"null"
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCreateDirectoryResponse",
"description": "Successful response for `fs/createDirectory`.",
"type": "object"
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsGetMetadataParams",
"description": "Request metadata for an absolute path.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute path to inspect.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsGetMetadataResponse",
"description": "Metadata returned by `fs/getMetadata`.",
"type": "object",
"required": [
"createdAtMs",
"isDirectory",
"isFile",
"isSymlink",
"modifiedAtMs"
],
"properties": {
"createdAtMs": {
"description": "File creation time in Unix milliseconds when available, otherwise `0`.",
"type": "integer",
"format": "int64"
},
"isDirectory": {
"description": "Whether the path resolves to a directory.",
"type": "boolean"
},
"isFile": {
"description": "Whether the path resolves to a regular file.",
"type": "boolean"
},
"isSymlink": {
"description": "Whether the path itself is a symbolic link.",
"type": "boolean"
},
"modifiedAtMs": {
"description": "File modification time in Unix milliseconds when available, otherwise `0`.",
"type": "integer",
"format": "int64"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadDirectoryParams",
"description": "List direct child names for a directory.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute directory path to read.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadDirectoryResponse",
"description": "Directory entries returned by `fs/readDirectory`.",
"type": "object",
"required": [
"entries"
],
"properties": {
"entries": {
"description": "Direct child entries in the requested directory.",
"type": "array",
"items": {
"$ref": "#/definitions/FsReadDirectoryEntry"
}
}
},
"definitions": {
"FsReadDirectoryEntry": {
"description": "A directory entry returned by `fs/readDirectory`.",
"type": "object",
"required": [
"fileName",
"isDirectory",
"isFile"
],
"properties": {
"fileName": {
"description": "Direct child entry name only, not an absolute or relative path.",
"type": "string"
},
"isDirectory": {
"description": "Whether this entry resolves to a directory.",
"type": "boolean"
},
"isFile": {
"description": "Whether this entry resolves to a regular file.",
"type": "boolean"
}
}
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadFileParams",
"description": "Read a file from the host filesystem.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute path to read.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadFileResponse",
"description": "Base64-encoded file contents returned by `fs/readFile`.",
"type": "object",
"required": [
"dataBase64"
],
"properties": {
"dataBase64": {
"description": "File contents encoded as base64.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsRemoveParams",
"description": "Remove a file or directory tree from the host filesystem.",
"type": "object",
"required": [
"path"
],
"properties": {
"force": {
"description": "Whether missing paths should be ignored. Defaults to `true`.",
"type": [
"boolean",
"null"
]
},
"path": {
"description": "Absolute path to remove.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"recursive": {
"description": "Whether directory removal should recurse. Defaults to `true`.",
"type": [
"boolean",
"null"
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsRemoveResponse",
"description": "Successful response for `fs/remove`.",
"type": "object"
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsUnwatchParams",
"description": "Stop filesystem watch notifications for a prior `fs/watch`.",
"type": "object",
"required": [
"watchId"
],
"properties": {
"watchId": {
"description": "Watch identifier previously provided to `fs/watch`.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsUnwatchResponse",
"description": "Successful response for `fs/unwatch`.",
"type": "object"
}

View File

@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsWatchParams",
"description": "Start filesystem watch notifications for an absolute path.",
"type": "object",
"required": [
"path",
"watchId"
],
"properties": {
"path": {
"description": "Absolute file or directory path to watch.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"watchId": {
"description": "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.",
"type": "string"
}
},
"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"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsWatchResponse",
"description": "Successful response for `fs/watch`.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Canonicalized path associated with the watch.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsWriteFileParams",
"description": "Write a file on the host filesystem.",
"type": "object",
"required": [
"dataBase64",
"path"
],
"properties": {
"dataBase64": {
"description": "File contents encoded as base64.",
"type": "string"
},
"path": {
"description": "Absolute path to write.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"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"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsWriteFileResponse",
"description": "Successful response for `fs/writeFile`.",
"type": "object"
}

Some files were not shown because too many files have changed in this diff Show More