feat: default codex permissions (#886)
* add codex option * update default codex configurations * fix ci
This commit is contained in:
committed by
GitHub
parent
091e903cf6
commit
4177a54d91
@@ -41,26 +41,30 @@
|
||||
"CODEX": {
|
||||
"DEFAULT": {
|
||||
"CODEX": {
|
||||
"sandbox": "auto",
|
||||
"sandbox": "danger-full-access",
|
||||
"model_reasoning_summary_format": "experimental",
|
||||
"model": "gpt-5-codex"
|
||||
}
|
||||
},
|
||||
"HIGH": {
|
||||
"CODEX": {
|
||||
"sandbox": "auto",
|
||||
"sandbox": "danger-full-access",
|
||||
"model_reasoning_effort": "high",
|
||||
"model_reasoning_summary_format": "experimental",
|
||||
"model": "gpt-5-codex"
|
||||
}
|
||||
},
|
||||
"GPT_5": {
|
||||
"CODEX": {
|
||||
"sandbox": "auto",
|
||||
"sandbox": "danger-full-access",
|
||||
"model_reasoning_summary_format": "experimental",
|
||||
"model": "gpt-5"
|
||||
}
|
||||
},
|
||||
"GPT_5_HIGH": {
|
||||
"CODEX": {
|
||||
"sandbox": "auto",
|
||||
"sandbox": "danger-full-access",
|
||||
"model_reasoning_summary_format": "experimental",
|
||||
"model_reasoning_effort": "high",
|
||||
"model": "gpt-5"
|
||||
}
|
||||
|
||||
@@ -65,6 +65,15 @@ pub enum ReasoningSummary {
|
||||
None,
|
||||
}
|
||||
|
||||
/// Format for model reasoning summaries
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, TS, JsonSchema, AsRefStr)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
pub enum ReasoningSummaryFormat {
|
||||
None,
|
||||
Experimental,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, TS, JsonSchema)]
|
||||
pub struct Codex {
|
||||
#[serde(default)]
|
||||
@@ -79,6 +88,8 @@ pub struct Codex {
|
||||
pub model_reasoning_effort: Option<ReasoningEffort>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub model_reasoning_summary: Option<ReasoningSummary>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub model_reasoning_summary_format: Option<ReasoningSummaryFormat>,
|
||||
#[serde(flatten)]
|
||||
pub cmd: CmdOverrides,
|
||||
}
|
||||
@@ -114,6 +125,15 @@ impl Codex {
|
||||
]);
|
||||
}
|
||||
|
||||
if let Some(format) = &self.model_reasoning_summary_format
|
||||
&& format != &ReasoningSummaryFormat::None
|
||||
{
|
||||
builder = builder.extend_params([
|
||||
"--config",
|
||||
&format!("model_reasoning_summary_format={}", format.as_ref()),
|
||||
]);
|
||||
}
|
||||
|
||||
if let Some(summary) = &self.model_reasoning_summary {
|
||||
builder = builder.extend_params([
|
||||
"--config",
|
||||
|
||||
@@ -78,6 +78,7 @@ fn generate_types_content() -> String {
|
||||
executors::executors::codex::SandboxMode::decl(),
|
||||
executors::executors::codex::ReasoningEffort::decl(),
|
||||
executors::executors::codex::ReasoningSummary::decl(),
|
||||
executors::executors::codex::ReasoningSummaryFormat::decl(),
|
||||
executors::executors::cursor::Cursor::decl(),
|
||||
executors::executors::opencode::Opencode::decl(),
|
||||
executors::executors::qwen::QwenCode::decl(),
|
||||
|
||||
@@ -64,6 +64,18 @@
|
||||
null
|
||||
]
|
||||
},
|
||||
"model_reasoning_summary_format": {
|
||||
"description": "Format for model reasoning summaries",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"none",
|
||||
"experimental",
|
||||
null
|
||||
]
|
||||
},
|
||||
"base_command_override": {
|
||||
"title": "Base Command Override",
|
||||
"description": "Override the base command with a custom command",
|
||||
|
||||
@@ -160,7 +160,7 @@ export type GeminiModel = "default" | "flash";
|
||||
|
||||
export type Amp = { append_prompt: AppendPrompt, dangerously_allow_all?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, oss?: boolean | null, model?: string | null, model_reasoning_effort?: ReasoningEffort | null, model_reasoning_summary?: ReasoningSummary | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, oss?: boolean | null, model?: string | null, model_reasoning_effort?: ReasoningEffort | null, model_reasoning_summary?: ReasoningSummary | null, model_reasoning_summary_format?: ReasoningSummaryFormat | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
export type SandboxMode = "auto" | "read-only" | "workspace-write" | "danger-full-access";
|
||||
|
||||
@@ -168,6 +168,8 @@ export type ReasoningEffort = "low" | "medium" | "high";
|
||||
|
||||
export type ReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
||||
|
||||
export type ReasoningSummaryFormat = "none" | "experimental";
|
||||
|
||||
export type Cursor = { append_prompt: AppendPrompt, force?: boolean | null, model?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
export type Opencode = { append_prompt: AppendPrompt, model?: string | null, agent?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
Reference in New Issue
Block a user