Skip to main content

agentos_v8_runtime/
ipc.rs

1// IPC message types used by the execution engine.
2//
3// The binary header wire format (ipc_binary.rs) handles serialization;
4// these types are used in-process only (no serde needed).
5
6use std::collections::HashMap;
7
8/// Process configuration injected into the V8 global as _processConfig
9#[derive(Debug, Clone, PartialEq)]
10pub struct ProcessConfig {
11    pub cwd: String,
12    pub env: HashMap<String, String>,
13    pub timing_mitigation: String,
14    pub frozen_time_ms: Option<f64>,
15    pub high_resolution_time: bool,
16}
17
18/// OS configuration injected into the V8 global as _osConfig
19#[derive(Debug, Clone, PartialEq)]
20pub struct OsConfig {
21    pub homedir: String,
22    pub tmpdir: String,
23    pub platform: String,
24    pub arch: String,
25}
26
27/// Structured error information from V8 execution
28#[derive(Debug, Clone, PartialEq)]
29pub struct ExecutionError {
30    pub error_type: String,
31    pub message: String,
32    pub stack: String,
33    pub code: Option<String>,
34}