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§
- Execution
Error - Error returned by
Shell::exec. Mirrors TSExecutionError. - File
Error - Error returned by
FileSystemoperations. Mirrors TSFileError.
Enums§
- Execution
Error Code - Backend-independent execution-error codes. Mirrors TS
ExecutionErrorCode. - File
Error Code - Backend-independent file-error codes. Mirrors TS
FileErrorCode.
Functions§
- io_
to_ file_ code - Classify an
io::Error(fromtokio::fs/ std) into aFileErrorcode. Mirrors the mapping the TS Node.js env applies when it catchesio::Error. - io_
to_ file_ error - Build a
FileErrorfrom anio::Error, classifying the code + preserving the source.pathis attached when the caller knows it.