mirror of
https://github.com/openai/codex.git
synced 2026-04-25 07:05:38 +00:00
Update guardian output schema (#17061)
## Summary - Update guardian output schema to separate risk, authorization, outcome, and rationale. - Feed guardian rationale into rejection messages. - Split the guardian policy into template and tenant-config sections. ## Validation - `cargo test -p codex-core mcp_tool_call` - `env -u CODEX_SANDBOX_NETWORK_DISABLED INSTA_UPDATE=always cargo test -p codex-core guardian::` --------- Co-authored-by: Owen Lin <owen@openai.com>
This commit is contained in:
@@ -20,16 +20,18 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"riskScore": {
|
||||
"format": "uint8",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/GuardianApprovalReviewStatus"
|
||||
},
|
||||
"userAuthorization": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GuardianUserAuthorization"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -227,6 +229,17 @@
|
||||
"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"
|
||||
|
||||
Reference in New Issue
Block a user