mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
Use camelCase for policy responses
This commit is contained in:
@@ -24,10 +24,10 @@ prefix_rule(
|
||||
{
|
||||
"match": {
|
||||
"decision": "allow|prompt|forbidden",
|
||||
"matched_rules": [
|
||||
"matchedRules": [
|
||||
{
|
||||
"prefixRuleMatch": {
|
||||
"matched_prefix": ["<token>", "..."],
|
||||
"matchedPrefix": ["<token>", "..."],
|
||||
"decision": "allow|prompt|forbidden"
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ prefix_rule(
|
||||
"noMatch"
|
||||
```
|
||||
|
||||
- `matched_rules` lists every rule whose prefix matched the command; `matched_prefix` is the exact prefix that matched.
|
||||
- `matchedRules` lists every rule whose prefix matched the command; `matchedPrefix` is the exact prefix that matched.
|
||||
- The effective `decision` is the strictest severity across all matches (`forbidden` > `prompt` > `allow`).
|
||||
|
||||
## CLI
|
||||
|
||||
@@ -46,6 +46,7 @@ pub enum Evaluation {
|
||||
NoMatch,
|
||||
Match {
|
||||
decision: Decision,
|
||||
#[serde(rename = "matchedRules")]
|
||||
matched_rules: Vec<RuleMatch>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ impl PrefixPattern {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum RuleMatch {
|
||||
PrefixRuleMatch {
|
||||
#[serde(rename = "matchedPrefix")]
|
||||
matched_prefix: Vec<String>,
|
||||
decision: Decision,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user