Files
codex/codex-rs/ext/multi-env-copy-file/tests/copy_file.rs
T
Adam Perry @ OpenAI e7de1f4440 Add an opt-in tool for copying files between environments (#54674)
## What changed

Add the `codex-multi-env-copy-file` extension, exposing `multi_env_copy_file` when registered by the host. Copy files between distinct selected environments without loading their contents into model context, and return `bytes_copied` on completion.

Require absolute paths in each environment's native path convention and enforce each endpoint's sandbox policy and permission grants. Stream file contents where supported, with a buffered fallback for older executors. Reject same-environment copies and report I/O error kinds without exposing connection details. Warn that failed writes may leave a truncated or partially written target.

## Testing

Add integration tests for binary transfers in both directions, local and remote executors, path validation, opt-in tool visibility, endpoint permissions and grants, and unavailable or disconnected executors. Verify that copied contents stay outside model context.

GitOrigin-RevId: f5d9e423d105019834e0288828cb68c5711b3a49
2026-10-16 18:39:31 +00:00

6 lines
108 B
Rust

//! Integration tests for the multi-environment file-copy tool.
#![allow(clippy::expect_used)]
mod suite;