mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
feat(tui): add managed worktree flow
This commit is contained in:
@@ -266,6 +266,10 @@
|
||||
"tty": {
|
||||
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"useCodexSelfExe": {
|
||||
"description": "Replace argv[0] with the app-server's own Codex executable.\n\nThis is for internal helper commands that must run on the same machine as the app-server while still using the generic command execution path.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
+4
@@ -6862,6 +6862,10 @@
|
||||
"tty": {
|
||||
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"useCodexSelfExe": {
|
||||
"description": "Replace argv[0] with the app-server's own Codex executable.\n\nThis is for internal helper commands that must run on the same machine as the app-server while still using the generic command execution path.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
+4
@@ -3251,6 +3251,10 @@
|
||||
"tty": {
|
||||
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"useCodexSelfExe": {
|
||||
"description": "Replace argv[0] with the app-server's own Codex executable.\n\nThis is for internal helper commands that must run on the same machine as the app-server while still using the generic command execution path.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -553,6 +553,10 @@
|
||||
"tty": {
|
||||
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"useCodexSelfExe": {
|
||||
"description": "Replace argv[0] with the app-server's own Codex executable.\n\nThis is for internal helper commands that must run on the same machine as the app-server while still using the generic command execution path.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -16,6 +16,12 @@ export type CommandExecParams = {/**
|
||||
* Command argv vector. Empty arrays are rejected.
|
||||
*/
|
||||
command: Array<string>, /**
|
||||
* Replace argv[0] with the app-server's own Codex executable.
|
||||
*
|
||||
* This is for internal helper commands that must run on the same machine
|
||||
* as the app-server while still using the generic command execution path.
|
||||
*/
|
||||
useCodexSelfExe?: boolean, /**
|
||||
* Optional client-supplied, connection-scoped process id.
|
||||
*
|
||||
* Required for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up
|
||||
|
||||
@@ -1601,6 +1601,7 @@ mod tests {
|
||||
request_id: request_id(),
|
||||
params: v2::CommandExecParams {
|
||||
command: vec!["sleep".to_string(), "10".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: Some("proc-1".to_string()),
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
@@ -1842,6 +1843,7 @@ mod tests {
|
||||
request_id: request_id(),
|
||||
params: v2::CommandExecParams {
|
||||
command: vec!["true".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: None,
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
@@ -2911,6 +2913,7 @@ mod tests {
|
||||
request_id: RequestId::Integer(1),
|
||||
params: v2::CommandExecParams {
|
||||
command: vec!["pwd".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: None,
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
|
||||
@@ -4,6 +4,7 @@ impl From<v1::ExecOneOffCommandParams> for v2::CommandExecParams {
|
||||
fn from(value: v1::ExecOneOffCommandParams) -> Self {
|
||||
Self {
|
||||
command: value.command,
|
||||
use_codex_self_exe: false,
|
||||
process_id: None,
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
|
||||
@@ -31,6 +31,12 @@ pub struct CommandExecTerminalSize {
|
||||
pub struct CommandExecParams {
|
||||
/// Command argv vector. Empty arrays are rejected.
|
||||
pub command: Vec<String>,
|
||||
/// Replace argv[0] with the app-server's own Codex executable.
|
||||
///
|
||||
/// This is for internal helper commands that must run on the same machine
|
||||
/// as the app-server while still using the generic command execution path.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub use_codex_self_exe: bool,
|
||||
/// Optional client-supplied, connection-scoped process id.
|
||||
///
|
||||
/// Required for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up
|
||||
|
||||
@@ -858,6 +858,7 @@ fn command_exec_params_default_optional_streaming_flags() {
|
||||
params,
|
||||
CommandExecParams {
|
||||
command: vec!["ls".to_string(), "-la".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: None,
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
@@ -879,6 +880,7 @@ fn command_exec_params_default_optional_streaming_flags() {
|
||||
fn command_exec_params_round_trips_disable_timeout() {
|
||||
let params = CommandExecParams {
|
||||
command: vec!["sleep".to_string(), "30".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: Some("sleep-1".to_string()),
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
@@ -1011,6 +1013,7 @@ fn process_spawn_params_distinguish_omitted_null_and_value_limits() {
|
||||
fn command_exec_params_round_trips_disable_output_cap() {
|
||||
let params = CommandExecParams {
|
||||
command: vec!["yes".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: Some("yes-1".to_string()),
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
@@ -1053,6 +1056,7 @@ fn command_exec_params_round_trips_disable_output_cap() {
|
||||
fn command_exec_params_round_trips_env_overrides_and_unsets() {
|
||||
let params = CommandExecParams {
|
||||
command: vec!["printenv".to_string(), "FOO".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: Some("env-1".to_string()),
|
||||
tty: false,
|
||||
stream_stdin: false,
|
||||
@@ -1143,6 +1147,7 @@ fn command_exec_terminate_round_trips() {
|
||||
fn command_exec_params_round_trip_with_size() {
|
||||
let params = CommandExecParams {
|
||||
command: vec!["top".to_string()],
|
||||
use_codex_self_exe: false,
|
||||
process_id: Some("pty-1".to_string()),
|
||||
tty: true,
|
||||
stream_stdin: false,
|
||||
|
||||
Reference in New Issue
Block a user