mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
310 lines
8.3 KiB
JSON
310 lines
8.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"AbsolutePathBuf": {
|
|
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
|
|
"type": "string"
|
|
},
|
|
"AutoReviewDecisionSource": {
|
|
"description": "[UNSTABLE] Source that produced a terminal guardian approval review decision.",
|
|
"enum": [
|
|
"agent"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"GuardianApprovalReview": {
|
|
"description": "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
|
|
"properties": {
|
|
"rationale": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"riskLevel": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/GuardianRiskLevel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/GuardianApprovalReviewStatus"
|
|
},
|
|
"userAuthorization": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/GuardianUserAuthorization"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"GuardianApprovalReviewAction": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"cwd": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"source": {
|
|
"$ref": "#/definitions/GuardianCommandSource"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"command"
|
|
],
|
|
"title": "CommandGuardianApprovalReviewActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"cwd",
|
|
"source",
|
|
"type"
|
|
],
|
|
"title": "CommandGuardianApprovalReviewAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"argv": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"cwd": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"program": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"$ref": "#/definitions/GuardianCommandSource"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"execve"
|
|
],
|
|
"title": "ExecveGuardianApprovalReviewActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"argv",
|
|
"cwd",
|
|
"program",
|
|
"source",
|
|
"type"
|
|
],
|
|
"title": "ExecveGuardianApprovalReviewAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"cwd": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"files": {
|
|
"items": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"applyPatch"
|
|
],
|
|
"title": "ApplyPatchGuardianApprovalReviewActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"cwd",
|
|
"files",
|
|
"type"
|
|
],
|
|
"title": "ApplyPatchGuardianApprovalReviewAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"format": "uint16",
|
|
"minimum": 0.0,
|
|
"type": "integer"
|
|
},
|
|
"protocol": {
|
|
"$ref": "#/definitions/NetworkApprovalProtocol"
|
|
},
|
|
"target": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"networkAccess"
|
|
],
|
|
"title": "NetworkAccessGuardianApprovalReviewActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"host",
|
|
"port",
|
|
"protocol",
|
|
"target",
|
|
"type"
|
|
],
|
|
"title": "NetworkAccessGuardianApprovalReviewAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"connectorId": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"connectorName": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"toolName": {
|
|
"type": "string"
|
|
},
|
|
"toolTitle": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"mcpToolCall"
|
|
],
|
|
"title": "McpToolCallGuardianApprovalReviewActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"server",
|
|
"toolName",
|
|
"type"
|
|
],
|
|
"title": "McpToolCallGuardianApprovalReviewAction",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"GuardianApprovalReviewStatus": {
|
|
"description": "[UNSTABLE] Lifecycle state for a guardian approval review.",
|
|
"enum": [
|
|
"inProgress",
|
|
"approved",
|
|
"denied",
|
|
"timedOut",
|
|
"aborted"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"GuardianCommandSource": {
|
|
"enum": [
|
|
"shell",
|
|
"unifiedExec"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"GuardianRiskLevel": {
|
|
"description": "[UNSTABLE] Risk level assigned by guardian approval review.",
|
|
"enum": [
|
|
"low",
|
|
"medium",
|
|
"high",
|
|
"critical"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"GuardianUserAuthorization": {
|
|
"description": "[UNSTABLE] Authorization level assigned by guardian approval review.",
|
|
"enum": [
|
|
"unknown",
|
|
"low",
|
|
"medium",
|
|
"high"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"NetworkApprovalProtocol": {
|
|
"enum": [
|
|
"http",
|
|
"https",
|
|
"socks5Tcp",
|
|
"socks5Udp"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.",
|
|
"properties": {
|
|
"action": {
|
|
"$ref": "#/definitions/GuardianApprovalReviewAction"
|
|
},
|
|
"decisionSource": {
|
|
"$ref": "#/definitions/AutoReviewDecisionSource"
|
|
},
|
|
"review": {
|
|
"$ref": "#/definitions/GuardianApprovalReview"
|
|
},
|
|
"reviewId": {
|
|
"description": "Stable identifier for this review.",
|
|
"type": "string"
|
|
},
|
|
"targetItemId": {
|
|
"description": "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"threadId": {
|
|
"type": "string"
|
|
},
|
|
"turnId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"decisionSource",
|
|
"review",
|
|
"reviewId",
|
|
"threadId",
|
|
"turnId"
|
|
],
|
|
"title": "ItemGuardianApprovalReviewCompletedNotification",
|
|
"type": "object"
|
|
} |