Files
codex/codex-rs/plugin-host/Cargo.toml
T
Joe Savona 2d1984b9f7 Add a bounded V8 runtime for UI plugin processes (#57508)
## What changed

- Add `--codex-ui-plugin-process` to `codex-code-mode-host` and a typed protocol for initializing, invoking, and closing UI plugin isolates.
- Support persistent module state and string results from synchronous or promise-based exports across up to 32 isolates in one helper process.
- Require sandbox-enabled V8 with JIT disabled, restrict executable loading and globals, and enforce execution deadlines and per-instance queue, source, result, and promise limits.
- Close affected isolates on script failures, cancellation, or overload, and return bounded script diagnostics.
- Bump the helper handshake to version 3 and increase the maximum frame size to 1 MiB.

## Testing

Add wire-level integration tests and runtime unit tests covering promise settlement, cancellation, loading restrictions, diagnostics, failure isolation, capacity reuse, transport bounds, and watchdog synchronization. Add CLI tests for argument validation before helper startup.

GitOrigin-RevId: bad6a57c84d9197c1fd76a78cf060502c5bc8bb8
2026-10-27 16:36:32 +00:00

41 lines
1.0 KiB
TOML

[package]
name = "codex-plugin-host"
autotests = false
version.workspace = true
edition.workspace = true
license.workspace = true
[lib]
doctest = false
test = false
[[bin]]
name = "codex-plugin-test-helper"
path = "tests/fixtures/plugin_process.rs"
test = false
bench = false
doc = false
[[test]]
name = "process"
path = "tests/process.rs"
[lints]
workspace = true
[dependencies]
futures = { workspace = true, features = ["executor", "std"] }
tokio-util = { workspace = true, features = ["codec", "compat", "rt"] }
codex-utils-process = { workspace = true }
codex-utils-pty = { workspace = true }
libc = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["io-util", "macros", "process", "rt", "sync", "time"] }
[dev-dependencies]
codex-utils-cargo-bin = { workspace = true }
pretty_assertions = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["macros", "net", "rt-multi-thread"] }