Skip to main content

Module error

Module error 

Source
Expand description

Mirrors packages/agent/src/harness/types.ts — the FileError / ExecutionError shapes + their stable code enums used by the ExecutionEnv trait. Drops the TS ok/err/getOrThrow helpers (Rust has these natively) and the CompactionError/BranchSummaryError (those live in pi-harness).

The stable code enums are backend-independent: OsExecutionEnv and InMemoryExecutionEnv both classify failures into the same codes so tool logic and tests can match on them without knowing the backend.

Structs§

ExecutionError
Error returned by Shell::exec. Mirrors TS ExecutionError.
FileError
Error returned by FileSystem operations. Mirrors TS FileError.

Enums§

ExecutionErrorCode
Backend-independent execution-error codes. Mirrors TS ExecutionErrorCode.
FileErrorCode
Backend-independent file-error codes. Mirrors TS FileErrorCode.

Functions§

io_to_file_code
Classify an io::Error (from tokio::fs / std) into a FileError code. Mirrors the mapping the TS Node.js env applies when it catches io::Error.
io_to_file_error
Build a FileError from an io::Error, classifying the code + preserving the source. path is attached when the caller knows it.