//! Machine files: TOML state machines that drive one session (see ORCHESTRATOR.md section 3). // shortcut: nothing calls this yet; the session runner (milestone 2) does. Remove then. #![allow(dead_code)] use anyhow::{Context, Result, bail, ensure}; use indexmap::IndexMap; use serde::Deserialize; use std::path::{Path, PathBuf}; #[derive(Deserialize, Clone, Copy, PartialEq, Eq, Debug, Default)] #[serde(rename_all = "lowercase")] pub enum Kind { Start, #[default] Normal, Gate, Exit, Abort, } #[derive(Deserialize, serde::Serialize, Clone, Copy, PartialEq, Eq, Debug)] #[serde(rename_all = "lowercase")] pub enum RunOn { Computer, Agent, Human, } #[derive(Deserialize, Clone, Debug)] #[serde(deny_unknown_fields)] pub struct Step { pub name: String, pub run: RunOn, /// Shell command (`computer`); supports {{session}} {{scope}} {{worktree}} {{branch}}. pub cmd: Option, /// Status label shown as `■