pub fn run(
db_path: &Path,
args: &WrapArgs,
app_config: &AppConfig,
_out: &mut CliOutput<'_>,
) -> Result<i32>Expand description
ai-memory wrap entry point. Returns the wrapped agent’s exit code
so daemon_runtime can std::process::exit(code) on a non-zero
outcome — that’s how shell pipelines and CI gates branch on the
agent’s success.
§Errors
- The wrapped agent binary cannot be spawned (
Command::statussurfaces the OS-level error). tempfile::NamedTempFile::new()fails when the strategy isMessageFile(very rare;/tmpfull or unwritable).