| 486 | } |
| 487 | |
| 488 | fn openclaw_config_get_json_at_path<R: OpenclawRunner>( |
| 489 | runner: &mut R, |
| 490 | path: &str, |
| 491 | approval_mode: OpenclawApprovalMode, |
| 492 | ) -> Result<Value, Box<dyn Error>> { |
| 493 | let args = vec![ |
| 494 | "config".to_string(), |
| 495 | "get".to_string(), |
| 496 | path.to_string(), |
| 497 | "--json".to_string(), |
| 498 | ]; |
| 499 | let stdout = run_openclaw_checked(runner, args, approval_mode)?; |
| 500 | parse_config_get_output(&stdout) |
| 501 | } |
| 502 | |
| 503 | fn parse_config_get_output(output: &str) -> Result<Value, Box<dyn Error>> { |
| 504 | let trimmed = output.trim(); |