mirror of
https://github.com/openai/codex.git
synced 2026-04-26 07:35:29 +00:00
Rename the PermissionRequest advisory field to guardian_review, drop the redundant source field, and share one hook-side guardian review type with protocol risk and authorization enums. Co-authored-by: Codex <noreply@openai.com>
174 lines
3.4 KiB
JSON
174 lines
3.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"GuardianRiskLevel": {
|
|
"enum": [
|
|
"low",
|
|
"medium",
|
|
"high",
|
|
"critical"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"GuardianUserAuthorization": {
|
|
"enum": [
|
|
"unknown",
|
|
"low",
|
|
"medium",
|
|
"high"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"NullableString": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"PermissionRequestGuardianReview": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"decision": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PermissionRequestGuardianReviewDecision"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"rationale": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"risk_level": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/GuardianRiskLevel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/PermissionRequestGuardianReviewStatus"
|
|
},
|
|
"user_authorization": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/GuardianUserAuthorization"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"decision",
|
|
"rationale",
|
|
"risk_level",
|
|
"status",
|
|
"user_authorization"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"PermissionRequestGuardianReviewDecision": {
|
|
"enum": [
|
|
"allow",
|
|
"deny"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"PermissionRequestGuardianReviewStatus": {
|
|
"enum": [
|
|
"approved",
|
|
"denied",
|
|
"aborted",
|
|
"failed",
|
|
"timed_out"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"PermissionRequestToolInput": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"cwd": {
|
|
"type": "string"
|
|
},
|
|
"guardian_review": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PermissionRequestGuardianReview"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hook_event_name": {
|
|
"const": "PermissionRequest",
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"permission_mode": {
|
|
"enum": [
|
|
"default",
|
|
"acceptEdits",
|
|
"plan",
|
|
"dontAsk",
|
|
"bypassPermissions"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
},
|
|
"tool_input": {
|
|
"$ref": "#/definitions/PermissionRequestToolInput"
|
|
},
|
|
"tool_name": {
|
|
"const": "Bash",
|
|
"type": "string"
|
|
},
|
|
"transcript_path": {
|
|
"$ref": "#/definitions/NullableString"
|
|
},
|
|
"turn_id": {
|
|
"description": "Codex extension: expose the active turn id to internal turn-scoped hooks.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"cwd",
|
|
"guardian_review",
|
|
"hook_event_name",
|
|
"model",
|
|
"permission_mode",
|
|
"session_id",
|
|
"tool_input",
|
|
"tool_name",
|
|
"transcript_path",
|
|
"turn_id"
|
|
],
|
|
"title": "permission-request.command.input",
|
|
"type": "object"
|
|
} |