Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 88 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 79 additions & 1 deletion crates/codex-runtime/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sha2 = "0.10"
hex = "0.4"
libc = "0.2"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "process", "time", "io-util", "net", "sync"] }
notify = "8"

[dev-dependencies]
tempfile = "3"
4 changes: 4 additions & 0 deletions crates/runner/src/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::PathSandbox;
impl InProcessRunner {
pub async fn read_file(&self, ws: &Workspace, path: &str) -> Result<ReadResult, ErrorBody> {
ws.require_file_read()?;
self.touch_watch(ws);
PathSandbox::new(ws.clone()).read_file(path).await
}

Expand All @@ -19,11 +20,13 @@ impl InProcessRunner {
glob: Option<&str>,
) -> Result<FindResult, ErrorBody> {
ws.require_file_read()?;
self.touch_watch(ws);
PathSandbox::new(ws.clone()).find(glob).await
}

pub async fn file_version(&self, ws: &Workspace, path: &str) -> Result<String, ErrorBody> {
ws.require_file_read()?;
self.touch_watch(ws);
PathSandbox::new(ws.clone()).version(path).await
}

Expand All @@ -33,6 +36,7 @@ impl InProcessRunner {
req: RunnerApplyPatchRequest,
) -> Result<RunnerApplyPatchResult, ErrorBody> {
ws.require_file_write()?;
self.touch_watch(ws);
let sandbox = PathSandbox::new(ws.clone());
for (path, expected) in &req.expected_versions {
let actual = sandbox.version(path).await?;
Expand Down
2 changes: 2 additions & 0 deletions crates/runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ mod process;
mod rollback;
mod socket;
mod uds;
mod watch;
mod wire;

pub use api::{
Expand All @@ -135,6 +136,7 @@ pub use socket::{
runner_socket_path, RUNNER_SOCKET_NAME,
};
pub use uds::{DisconnectHook, UdsRunner, RUNNER_CALL_DEADLINE};
pub use watch::{FsWatchEvent, FsWatchKind, WatchClosed, WatchSubscription};
pub use wire::{
host_worker, read_frame, serve_runner_connection, write_frame, RunnerEvent, RunnerOp,
RunnerOpResult, WireEnvelope, WireKind, WIRE_PROTOCOL,
Expand Down
Loading
Loading