pub struct ProcessSpawnParams {
pub command: Vec<String>,
pub cwd: AbsolutePathBuf,
pub env: Option<HashMap<String, Option<String>>>,
pub output_bytes_cap: Option<u32>,
pub process_handle: String,
pub size: Option<ProcessTerminalSize>,
pub stream_stdin: Option<bool>,
pub stream_stdout_stderr: Option<bool>,
pub timeout_ms: Option<i64>,
pub tty: Option<bool>,
}Expand description
Spawn a standalone process (argv vector) without a Codex sandbox on the host where the app server is running.
process/spawn returns after the process has started and the connection-scoped processHandle has been registered. Process output and exit are reported via process/outputDelta and process/exited notifications.
JSON schema
{
"title": "ProcessSpawnParams",
"description": "Spawn a standalone process (argv vector) without a Codex sandbox on the host where the app server is running.\n\n`process/spawn` returns after the process has started and the connection-scoped `processHandle` has been registered. Process output and exit are reported via `process/outputDelta` and `process/exited` notifications.",
"type": "object",
"required": [
"command",
"cwd",
"processHandle"
],
"properties": {
"command": {
"description": "Command argv vector. Empty arrays are rejected.",
"type": "array",
"items": {
"type": "string"
}
},
"cwd": {
"description": "Absolute working directory for the process.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"env": {
"description": "Optional environment overrides merged into the app-server process environment.\n\nMatching names override inherited values. Set a key to `null` to unset an inherited variable.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": [
"string",
"null"
]
}
},
"outputBytesCap": {
"description": "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Set to `null` to disable the cap.",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
},
"processHandle": {
"description": "Client-supplied, connection-scoped process handle.\n\nDuplicate active handles are rejected on the same connection. The same handle can be reused after the prior process exits.",
"type": "string"
},
"size": {
"description": "Optional initial PTY size in character cells. Only valid when `tty` is true.",
"anyOf": [
{
"$ref": "#/definitions/ProcessTerminalSize"
},
{
"type": "null"
}
]
},
"streamStdin": {
"description": "Allow follow-up `process/writeStdin` requests to write stdin bytes.",
"type": "boolean"
},
"streamStdoutStderr": {
"description": "Stream stdout/stderr via `process/outputDelta` notifications.\n\nStreamed bytes are not duplicated into the `process/exited` notification.",
"type": "boolean"
},
"timeoutMs": {
"description": "Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Set to `null` to disable the timeout.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"tty": {
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}Fields§
§command: Vec<String>Command argv vector. Empty arrays are rejected.
cwd: AbsolutePathBufAbsolute working directory for the process.
env: Option<HashMap<String, Option<String>>>Optional environment overrides merged into the app-server process environment.
Matching names override inherited values. Set a key to null to unset an inherited variable.
output_bytes_cap: Option<u32>Optional per-stream stdout/stderr capture cap in bytes.
When omitted, the server default applies. Set to null to disable the cap.
process_handle: StringClient-supplied, connection-scoped process handle.
Duplicate active handles are rejected on the same connection. The same handle can be reused after the prior process exits.
size: Option<ProcessTerminalSize>Optional initial PTY size in character cells. Only valid when tty is true.
stream_stdin: Option<bool>Allow follow-up process/writeStdin requests to write stdin bytes.
stream_stdout_stderr: Option<bool>Stream stdout/stderr via process/outputDelta notifications.
Streamed bytes are not duplicated into the process/exited notification.
timeout_ms: Option<i64>Optional timeout in milliseconds.
When omitted, the server default applies. Set to null to disable the timeout.
tty: Option<bool>Enable PTY mode.
This implies streamStdin and streamStdoutStderr.
Trait Implementations§
Source§impl Clone for ProcessSpawnParams
impl Clone for ProcessSpawnParams
Source§fn clone(&self) -> ProcessSpawnParams
fn clone(&self) -> ProcessSpawnParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more