Skip to main content

run

Function run 

Source
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::status surfaces the OS-level error).
  • tempfile::NamedTempFile::new() fails when the strategy is MessageFile (very rare; /tmp full or unwritable).